mirror of https://github.com/mgba-emu/mgba.git
Remove special treatment for DISPSTAT
This commit is contained in:
parent
8e51ffbf2c
commit
683e90fa06
|
@ -355,10 +355,6 @@ void GBAIOWrite32(struct GBA* gba, uint32_t address, uint32_t value) {
|
||||||
|
|
||||||
uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
||||||
switch (address) {
|
switch (address) {
|
||||||
case REG_DISPSTAT:
|
|
||||||
return gba->memory.io[REG_DISPSTAT >> 1] | GBAVideoReadDISPSTAT(&gba->video);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case REG_TM0CNT_LO:
|
case REG_TM0CNT_LO:
|
||||||
GBATimerUpdateRegister(gba, 0);
|
GBATimerUpdateRegister(gba, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -390,6 +386,7 @@ uint16_t GBAIORead(struct GBA* gba, uint32_t address) {
|
||||||
// Write-only register
|
// Write-only register
|
||||||
return 0;
|
return 0;
|
||||||
case REG_DISPCNT:
|
case REG_DISPCNT:
|
||||||
|
case REG_DISPSTAT:
|
||||||
case REG_VCOUNT:
|
case REG_VCOUNT:
|
||||||
case REG_BG0CNT:
|
case REG_BG0CNT:
|
||||||
case REG_BG1CNT:
|
case REG_BG1CNT:
|
||||||
|
|
|
@ -134,6 +134,8 @@ int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) {
|
||||||
|
|
||||||
video->eventDiff = 0;
|
video->eventDiff = 0;
|
||||||
}
|
}
|
||||||
|
video->p->memory.io[REG_DISPSTAT >> 1] &= 0xFFF8;
|
||||||
|
video->p->memory.io[REG_DISPSTAT >> 1] |= (video->inVblank) | (video->inHblank << 1) | (video->vcounter << 2);
|
||||||
return video->nextEvent;
|
return video->nextEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,10 +156,6 @@ void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t GBAVideoReadDISPSTAT(struct GBAVideo* video) {
|
|
||||||
return (video->inVblank) | (video->inHblank << 1) | (video->vcounter << 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void GBAVideoDummyRendererInit(struct GBAVideoRenderer* renderer) {
|
static void GBAVideoDummyRendererInit(struct GBAVideoRenderer* renderer) {
|
||||||
(void)(renderer);
|
(void)(renderer);
|
||||||
// Nothing to do
|
// Nothing to do
|
||||||
|
|
|
@ -218,7 +218,6 @@ void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer*
|
||||||
int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles);
|
int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles);
|
||||||
|
|
||||||
void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value);
|
void GBAVideoWriteDISPSTAT(struct GBAVideo* video, uint16_t value);
|
||||||
uint16_t GBAVideoReadDISPSTAT(struct GBAVideo* video);
|
|
||||||
|
|
||||||
struct GBASerializedState;
|
struct GBASerializedState;
|
||||||
void GBAVideoSerialize(struct GBAVideo* video, struct GBASerializedState* state);
|
void GBAVideoSerialize(struct GBAVideo* video, struct GBASerializedState* state);
|
||||||
|
|
Loading…
Reference in New Issue