X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=fceu.git;a=blobdiff_plain;f=mappers%2Fsimple.c;h=de6c42f035bc49c8809a75192d91f4d5ebd53898;hp=93189332c34c07e452b8de4b19e0861b95efb972;hb=c0bf6f9f02a2b6afb961a7e9195e2168d7e9cecf;hpb=4e1934c1ee3a43796e68edc66b3c3f8e079caf7c diff --git a/mappers/simple.c b/mappers/simple.c index 9318933..de6c42f 100644 --- a/mappers/simple.c +++ b/mappers/simple.c @@ -27,6 +27,7 @@ static DECLFW(Mapper2_write) { latche=V; ROM_BANK16(0x8000,V); + X6502_Rebase(); } void Mapper2_init(void) @@ -52,6 +53,7 @@ DECLFW(Mapper7_write) ROM_BANK32(V&0xF); onemir((V>>4)&1); latche=V; + X6502_Rebase(); } void Mapper7_init(void) @@ -67,6 +69,7 @@ DECLFW(Mapper11_write) ROM_BANK32(V); VROM_BANK8(V>>4); latche=V; + X6502_Rebase(); } void Mapper11_init(void) @@ -81,6 +84,7 @@ static DECLFW(Mapper13_write) setchr4r(0x10,0x1000,V&3); setprg32(0x8000,(V>>4)&3); latche=V; + X6502_Rebase(); } static void Mapper13_StateRestore(int version) @@ -88,6 +92,7 @@ static void Mapper13_StateRestore(int version) setchr4r(0x10,0x0000,0); setchr4r(0x10,0x1000,latche&3); setprg32(0x8000,(latche>>4)&3); + X6502_Rebase(); } void Mapper13_init(void) @@ -106,12 +111,16 @@ DECLFW(Mapper34_write) { switch(A) { - case 0x7FFD:ROM_BANK32(V);break; + case 0x7FFD:ROM_BANK32(V); + X6502_Rebase();break; case 0x7FFE:VROM_BANK4(0x0000,V);break; case 0x7fff:VROM_BANK4(0x1000,V);break; } -if(A>=0x8000) - ROM_BANK32(V); + if(A>=0x8000) + { + ROM_BANK32(V); + X6502_Rebase(); + } } void Mapper34_init(void) @@ -124,6 +133,7 @@ DECLFW(Mapper66_write) VROM_BANK8(V&0xF); ROM_BANK32((V>>4)); latche=V; + X6502_Rebase(); } void Mapper66_init(void) @@ -139,6 +149,7 @@ DECLFW(Mapper152_write) VROM_BANK8(V&0xF); onemir((V>>7)&1); /* Saint Seiya...hmm. */ latche=V; + X6502_Rebase(); } void Mapper152_init(void) @@ -153,6 +164,7 @@ static DECLFW(Mapper70_write) ROM_BANK16(0x8000,V>>4); VROM_BANK8(V&0xF); latche=V; + X6502_Rebase(); } void Mapper70_init(void) @@ -168,6 +180,7 @@ static DECLFW(Mapper78_write) VROM_BANK8(V>>4); onemir((V>>3)&1); latche=V; + X6502_Rebase(); } void Mapper78_init(void) @@ -193,6 +206,7 @@ DECLFW(Mapper93_write) ROM_BANK16(0x8000,V>>4); MIRROR_SET(V&1); latche=V; + X6502_Rebase(); } void Mapper93_init(void) @@ -206,6 +220,7 @@ DECLFW(Mapper94_write) { ROM_BANK16(0x8000,V>>2); latche=V; + X6502_Rebase(); } void Mapper94_init(void) @@ -226,6 +241,7 @@ static DECLFW(Mapper96_write) setprg32(0x8000,V&3); setchr4r(0x10,0x0000,(latche&4)|M96LA); setchr4r(0x10,0x1000,(latche&4)|3); + X6502_Rebase(); } static void FP_FASTAPASS(1) M96Hook(uint32 A) @@ -241,6 +257,7 @@ static void M96Sync() setprg32(0x8000,latche&3); setchr4r(0x10,0x0000,(latche&4)|M96LA); setchr4r(0x10,0x1000,(latche&4)|3); + X6502_Rebase(); } void Mapper96_init(void) @@ -259,6 +276,7 @@ static DECLFW(Mapper140_write) { VROM_BANK8(V&0xF); ROM_BANK32((V>>4)&0xF); + X6502_Rebase(); } void Mapper140_init(void)