mirror of https://github.com/mgba-emu/mgba.git
GBA: Clean up BIOS skip detection; add second multiboot entry
This commit is contained in:
parent
83578d915b
commit
d2949383d5
|
@ -700,8 +700,8 @@ static void _GBACoreReset(struct mCore* core) {
|
|||
#endif
|
||||
|
||||
ARMReset(core->cpu);
|
||||
bool forceSkip = gba->mbVf;
|
||||
if (!(forceSkip || core->opts.skipBios) && (gba->romVf || gba->memory.rom) && gba->pristineRomSize >= 0xA0 && gba->biosVf) {
|
||||
bool forceSkip = gba->mbVf || core->opts.skipBios;
|
||||
if (!forceSkip && (gba->romVf || gba->memory.rom) && gba->pristineRomSize >= 0xA0 && gba->biosVf) {
|
||||
uint32_t crc = doCrc32(&gba->memory.rom[1], 0x9C);
|
||||
if (crc != LOGO_CRC32) {
|
||||
mLOG(STATUS, WARN, "Invalid logo, skipping BIOS");
|
||||
|
@ -709,7 +709,7 @@ static void _GBACoreReset(struct mCore* core) {
|
|||
}
|
||||
}
|
||||
|
||||
if (forceSkip || (core->opts.skipBios && (gba->romVf || gba->memory.rom))) {
|
||||
if (forceSkip) {
|
||||
GBASkipBIOS(core->board);
|
||||
}
|
||||
|
||||
|
|
|
@ -275,8 +275,10 @@ void GBASkipBIOS(struct GBA* gba) {
|
|||
if (cpu->gprs[ARM_PC] == BASE_RESET + WORD_SIZE_ARM) {
|
||||
if (gba->memory.rom) {
|
||||
cpu->gprs[ARM_PC] = BASE_CART0;
|
||||
} else {
|
||||
} else if (gba->memory.wram[0x30]) {
|
||||
cpu->gprs[ARM_PC] = BASE_WORKING_RAM + 0xC0;
|
||||
} else {
|
||||
cpu->gprs[ARM_PC] = BASE_WORKING_RAM;
|
||||
}
|
||||
gba->video.vcount = 0x7E;
|
||||
gba->memory.io[REG_VCOUNT >> 1] = 0x7E;
|
||||
|
|
Loading…
Reference in New Issue