mirror of https://github.com/mgba-emu/mgba.git
GBA: Reset now reloads multiboot ROMs
This commit is contained in:
parent
ed0a7c68ea
commit
f6b88660d2
1
CHANGES
1
CHANGES
|
@ -1,6 +1,7 @@
|
||||||
0.8.0: (Future)
|
0.8.0: (Future)
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
- GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208)
|
- GBA: All IRQs have 7 cycle delay (fixes mgba.io/i/539, mgba.io/i/1208)
|
||||||
|
- GBA: Reset now reloads multiboot ROMs
|
||||||
Misc:
|
Misc:
|
||||||
- GBA Savedata: EEPROM performance fixes
|
- GBA Savedata: EEPROM performance fixes
|
||||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||||
|
|
|
@ -216,6 +216,20 @@ void GBAReset(struct ARMCore* cpu) {
|
||||||
|
|
||||||
GBASIOReset(&gba->sio);
|
GBASIOReset(&gba->sio);
|
||||||
|
|
||||||
|
bool isELF = false;
|
||||||
|
#ifdef USE_ELF
|
||||||
|
struct ELF* elf = ELFOpen(gba->romVf);
|
||||||
|
if (elf) {
|
||||||
|
isELF = true;
|
||||||
|
ELFClose(elf);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (GBAIsMB(gba->romVf) && !isELF) {
|
||||||
|
gba->romVf->seek(gba->romVf, 0, SEEK_SET);
|
||||||
|
gba->romVf->read(gba->romVf, gba->memory.wram, gba->pristineRomSize);
|
||||||
|
}
|
||||||
|
|
||||||
gba->lastJump = 0;
|
gba->lastJump = 0;
|
||||||
gba->haltPending = false;
|
gba->haltPending = false;
|
||||||
gba->idleDetectionStep = 0;
|
gba->idleDetectionStep = 0;
|
||||||
|
@ -343,11 +357,6 @@ bool GBALoadMB(struct GBA* gba, struct VFile* vf) {
|
||||||
}
|
}
|
||||||
gba->isPristine = true;
|
gba->isPristine = true;
|
||||||
memset(gba->memory.wram, 0, SIZE_WORKING_RAM);
|
memset(gba->memory.wram, 0, SIZE_WORKING_RAM);
|
||||||
vf->read(vf, gba->memory.wram, gba->pristineRomSize);
|
|
||||||
if (!gba->memory.wram) {
|
|
||||||
mLOG(GBA, WARN, "Couldn't map ROM");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
gba->yankedRomSize = 0;
|
gba->yankedRomSize = 0;
|
||||||
gba->memory.romSize = 0;
|
gba->memory.romSize = 0;
|
||||||
gba->memory.romMask = 0;
|
gba->memory.romMask = 0;
|
||||||
|
|
Loading…
Reference in New Issue