From d191bafc851b0507e7bd6bf34d92860aa6b3864c Mon Sep 17 00:00:00 2001 From: Victor Antonovich Date: Tue, 10 Nov 2020 19:26:36 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=82=D0=B0=D0=B9=D0=BC=D0=B8=D0=BD=D0=B3?= =?UTF-8?q?=D0=B8=20=D0=B3=D0=B5=D0=BD=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B5=D1=80=D1=8B=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D0=BE=D1=82=20=D1=82=D0=B0=D0=B9=D0=BC=D0=B5=D1=80=D0=B0=20?= =?UTF-8?q?50=D0=93=D1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/su/comp/bk/arch/io/VideoController.java | 8 ++++---- app/src/main/res/raw-ru/changelog_data.xml | 1 + app/src/main/res/raw/changelog_data.xml | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/su/comp/bk/arch/io/VideoController.java b/app/src/main/java/su/comp/bk/arch/io/VideoController.java index f53d1a8..a9ace10 100644 --- a/app/src/main/java/su/comp/bk/arch/io/VideoController.java +++ b/app/src/main/java/su/comp/bk/arch/io/VideoController.java @@ -187,9 +187,8 @@ public DisplayMode getNext() { private final static int FRAME_LINES_VISIBLE = 256; // Frame horizontal sync period (64 uS, in nanoseconds) private final static long FRAME_SYNC_PERIOD_HORIZONTAL = 64 * 1000L; - // Frame vertical sync period - private final static long FRAME_SYNC_PERIOD_VERTICAL = - FRAME_SYNC_PERIOD_HORIZONTAL * FRAME_LINES_TOTAL; + // Frame vertical sync line number + private final static long FRAME_SYNC_LINE_VERTICAL = FRAME_LINES_VISIBLE + 1; // Current displayed line number private long currentLine; // Current displayed frame number @@ -402,7 +401,8 @@ public void uptimeUpdated(long uptime) { // Check for VSync // Get displayed frame number (numbered from 0) long currentLineFrame = currentLine / FRAME_LINES_TOTAL; - if (currentLineFrame >= currentFrame) { + if (currentLineFrameLine >= FRAME_SYNC_LINE_VERTICAL + && currentLineFrame >= currentFrame) { // VSync storeLastFrameVideoData(); notifyFrameSyncListenersVerticalSync(); diff --git a/app/src/main/res/raw-ru/changelog_data.xml b/app/src/main/res/raw-ru/changelog_data.xml index 69d03f3..e2d3fe0 100644 --- a/app/src/main/res/raw-ru/changelog_data.xml +++ b/app/src/main/res/raw-ru/changelog_data.xml @@ -4,6 +4,7 @@ Реализован режим "чтение/запись" для образов флоппи-дисков. Добавлен полноэкранный режим. + Поправлены тайминги генерации прерывания от таймера 50Гц. diff --git a/app/src/main/res/raw/changelog_data.xml b/app/src/main/res/raw/changelog_data.xml index 2f94450..1795dc9 100644 --- a/app/src/main/res/raw/changelog_data.xml +++ b/app/src/main/res/raw/changelog_data.xml @@ -4,6 +4,7 @@ Implemented read/write mode for floppy disk images. Added full-screen mode. + Fixed 50 Hz timer interrupt timings.