mirror of https://github.com/mgba-emu/mgba.git
GB: Fix reset not working properly
This commit is contained in:
parent
5e50a635cf
commit
7643e45212
|
@ -65,9 +65,6 @@ static void GBInit(void* cpu, struct mCPUComponent* component) {
|
||||||
gb->yankedRomSize = 0;
|
gb->yankedRomSize = 0;
|
||||||
|
|
||||||
gb->stream = NULL;
|
gb->stream = NULL;
|
||||||
|
|
||||||
gb->eiPending = INT_MAX;
|
|
||||||
gb->doubleSpeed = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GBLoadROM(struct GB* gb, struct VFile* vf) {
|
bool GBLoadROM(struct GB* gb, struct VFile* vf) {
|
||||||
|
@ -245,6 +242,9 @@ void GBReset(struct LR35902Core* cpu) {
|
||||||
cpu->b = 0;
|
cpu->b = 0;
|
||||||
cpu->d = 0;
|
cpu->d = 0;
|
||||||
|
|
||||||
|
gb->eiPending = INT_MAX;
|
||||||
|
gb->doubleSpeed = 0;
|
||||||
|
|
||||||
cpu->memory.setActiveRegion(cpu, cpu->pc);
|
cpu->memory.setActiveRegion(cpu, cpu->pc);
|
||||||
|
|
||||||
if (gb->yankedRomSize) {
|
if (gb->yankedRomSize) {
|
||||||
|
|
|
@ -43,6 +43,7 @@ void GBVideoInit(struct GBVideo* video) {
|
||||||
|
|
||||||
void GBVideoReset(struct GBVideo* video) {
|
void GBVideoReset(struct GBVideo* video) {
|
||||||
video->ly = 0;
|
video->ly = 0;
|
||||||
|
video->x = 0;
|
||||||
video->mode = 1;
|
video->mode = 1;
|
||||||
video->stat = 1;
|
video->stat = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue