mirror of https://github.com/mgba-emu/mgba.git
Store vcount back in IO
This commit is contained in:
parent
0048de2108
commit
97b669e4d1
|
@ -100,6 +100,7 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
|||
case REG_DMA3CNT_LO:
|
||||
// Write-only register
|
||||
return 0;
|
||||
case REG_VCOUNT:
|
||||
case REG_DMA0CNT_HI:
|
||||
case REG_DMA1CNT_HI:
|
||||
case REG_DMA2CNT_HI:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "gba-video.h"
|
||||
|
||||
#include "gba.h"
|
||||
#include "gba-io.h"
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
|
@ -55,6 +56,7 @@ int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) {
|
|||
video->nextEvent = video->nextHblank;
|
||||
|
||||
++video->vcount;
|
||||
video->p->memory.io[REG_VCOUNT >> 1] = video->vcount;
|
||||
|
||||
switch (video->vcount) {
|
||||
case VIDEO_VERTICAL_PIXELS:
|
||||
|
|
Loading…
Reference in New Issue