all repos — mgba @ 97b669e4d16f610ec8f6b6058b99ea6740a39668

mGBA Game Boy Advance Emulator

Store vcount back in IO
Jeffrey Pfau jeffrey@endrift.com
Thu, 18 Apr 2013 01:19:41 -0700
commit

97b669e4d16f610ec8f6b6058b99ea6740a39668

parent

0048de21080d99957da8e8d0d81064fce53d78cb

2 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-io.csrc/gba/gba-io.c

@@ -100,6 +100,7 @@ case REG_DMA2CNT_LO:

case REG_DMA3CNT_LO: // Write-only register return 0; + case REG_VCOUNT: case REG_DMA0CNT_HI: case REG_DMA1CNT_HI: case REG_DMA2CNT_HI:
M src/gba/gba-video.csrc/gba/gba-video.c

@@ -1,6 +1,7 @@

#include "gba-video.h" #include "gba.h" +#include "gba-io.h" #include <limits.h>

@@ -55,6 +56,7 @@ video->inHblank = 0;

video->nextEvent = video->nextHblank; ++video->vcount; + video->p->memory.io[REG_VCOUNT >> 1] = video->vcount; switch (video->vcount) { case VIDEO_VERTICAL_PIXELS: