mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix VCOUNT being writable
This commit is contained in:
parent
40c6304cf0
commit
a6cd5f44db
1
CHANGES
1
CHANGES
|
@ -21,6 +21,7 @@ Bugfixes:
|
|||
- VFS: Fix resizing memory chunks when not needed
|
||||
- GB Memory: Fix patching ROM bank 0
|
||||
- GB: Fix audio not being deinitialized
|
||||
- GBA Memory: Fix VCOUNT being writable
|
||||
Misc:
|
||||
- SDL: Remove scancode key input
|
||||
- GBA Video: Clean up unused timers
|
||||
|
|
|
@ -336,7 +336,7 @@ void GBAIOInit(struct GBA* gba) {
|
|||
}
|
||||
|
||||
void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
||||
if (address < REG_SOUND1CNT_LO && address != REG_DISPSTAT) {
|
||||
if (address < REG_SOUND1CNT_LO && (address > REG_VCOUNT || address == REG_DISPCNT)) {
|
||||
value = gba->video.renderer->writeVideoRegister(gba->video.renderer, address, value);
|
||||
} else {
|
||||
switch (address) {
|
||||
|
@ -346,6 +346,10 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
|||
GBAVideoWriteDISPSTAT(&gba->video, value);
|
||||
return;
|
||||
|
||||
case REG_VCOUNT:
|
||||
mLOG(GBA_IO, GAME_ERROR, "Write to read-only I/O register: %03X", address);
|
||||
return;
|
||||
|
||||
// Audio
|
||||
case REG_SOUND1CNT_LO:
|
||||
GBAAudioWriteSOUND1CNT_LO(&gba->audio, value);
|
||||
|
|
Loading…
Reference in New Issue