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.