32x: skip unnecessary bios work in cd mode

This commit is contained in:
notaz 2017-08-19 00:38:03 +03:00
parent 6a5b1b362e
commit 61c4e5117a

View file

@ -134,6 +134,9 @@ void p32x_reset_sh2s(void)
// if we don't have BIOS set, perform it's work here. // if we don't have BIOS set, perform it's work here.
// MSH2 // MSH2
if (p32x_bios_m == NULL) { if (p32x_bios_m == NULL) {
sh2_set_gbr(0, 0x20004000);
if (!(PicoAHW & PAHW_MCD)) {
unsigned int idl_src, idl_dst, idl_size; // initial data load unsigned int idl_src, idl_dst, idl_size; // initial data load
unsigned int vbr; unsigned int vbr;
@ -149,13 +152,13 @@ void p32x_reset_sh2s(void)
else else
memcpy(Pico32xMem->sdram + idl_dst, Pico.rom + idl_src, idl_size); memcpy(Pico32xMem->sdram + idl_dst, Pico.rom + idl_src, idl_size);
// GBR/VBR // VBR
vbr = HWSWAP(*(unsigned int *)(Pico.rom + 0x3e8)); vbr = HWSWAP(*(unsigned int *)(Pico.rom + 0x3e8));
sh2_set_gbr(0, 0x20004000);
sh2_set_vbr(0, vbr); sh2_set_vbr(0, vbr);
// checksum and M_OK // checksum and M_OK
Pico32x.regs[0x28 / 2] = *(unsigned short *)(Pico.rom + 0x18e); Pico32x.regs[0x28 / 2] = *(unsigned short *)(Pico.rom + 0x18e);
}
// program will set M_OK // program will set M_OK
} }