Skip to content

Commit

Permalink
Поправлены тайминги генерации прерывания от таймера 50Гц
Browse files Browse the repository at this point in the history
  • Loading branch information
3cky committed Nov 10, 2020
1 parent 0c7233d commit d191baf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/su/comp/bk/arch/io/VideoController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/raw-ru/changelog_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<changes>
<change>Реализован режим "чтение/запись" для образов флоппи-дисков.</change>
<change>Добавлен полноэкранный режим.</change>
<change>Поправлены тайминги генерации прерывания от таймера 50Гц.</change>
</changes>
</release>
<release version="0.7.0" date="05.06.2020">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/raw/changelog_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<changes>
<change>Implemented read/write mode for floppy disk images.</change>
<change>Added full-screen mode.</change>
<change>Fixed 50 Hz timer interrupt timings.</change>
</changes>
</release>
<release version="0.7.0" date="2020-06-05">
Expand Down

0 comments on commit d191baf

Please sign in to comment.