X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico.c;h=a76c9e40cfc611a453d3638c97c10fa71fa62044;hb=a12b1b29cc7e394128da59614c2efe8f5d182741;hp=c47cf19002dc87c8a9aa063c4a58993de45ba602;hpb=89fea1e97270502440365bfd2f4aa34111847682;p=picodrive.git diff --git a/Pico/Pico.c b/Pico/Pico.c index c47cf19..a76c9e4 100644 --- a/Pico/Pico.c +++ b/Pico/Pico.c @@ -64,6 +64,9 @@ int PicoReset(int hard) if (Pico.romsize<=0) return 1; + /* must call now, so that banking is reset, and correct vectors get fetched */ + if (PicoResetHook) PicoResetHook(); + PicoMemReset(); SekReset(); // s68k doesn't have the TAS quirk, so we just globally set normal TAS handler in MCD mode (used by Batman games). @@ -79,7 +82,7 @@ int PicoReset(int hard) Pico.video.pending_ints=0; emustatus = 0; - if(hard) { + if (hard) { // clear all memory of the emulated machine memset(&Pico.ram,0,(unsigned int)&Pico.rom-(unsigned int)&Pico.ram); } @@ -142,8 +145,6 @@ int PicoReset(int hard) PsndReset(); // pal must be known here - if (PicoResetHook) PicoResetHook(); - if (PicoMCD & 1) { PicoResetMCD(hard); return 0;