* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+#include <string.h>
#include "mapinc.h"
static uint8 latche;
{
latche=V;
ROM_BANK16(0x8000,V);
+ X6502_Rebase();
}
void Mapper2_init(void)
ROM_BANK32(V&0xF);
onemir((V>>4)&1);
latche=V;
+ X6502_Rebase();
}
void Mapper7_init(void)
{
onemir(0);
+ ROM_BANK32(0);
SetWriteHandler(0x8000,0xFFFF,Mapper7_write);
AddExState(&latche, 1, 0, "LATC");
}
ROM_BANK32(V);
VROM_BANK8(V>>4);
latche=V;
+ X6502_Rebase();
}
void Mapper11_init(void)
setchr4r(0x10,0x1000,V&3);
setprg32(0x8000,(V>>4)&3);
latche=V;
+ X6502_Rebase();
}
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)
{
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)
VROM_BANK8(V&0xF);
ROM_BANK32((V>>4));
latche=V;
+ X6502_Rebase();
}
void Mapper66_init(void)
VROM_BANK8(V&0xF);
onemir((V>>7)&1); /* Saint Seiya...hmm. */
latche=V;
+ X6502_Rebase();
}
void Mapper152_init(void)
ROM_BANK16(0x8000,V>>4);
VROM_BANK8(V&0xF);
latche=V;
+ X6502_Rebase();
}
void Mapper70_init(void)
VROM_BANK8(V>>4);
onemir((V>>3)&1);
latche=V;
+ X6502_Rebase();
}
void Mapper78_init(void)
ROM_BANK16(0x8000,V>>4);
MIRROR_SET(V&1);
latche=V;
+ X6502_Rebase();
}
void Mapper93_init(void)
{
ROM_BANK16(0x8000,V>>2);
latche=V;
+ X6502_Rebase();
}
void Mapper94_init(void)
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)
{
- if(A<0x2000)
+ if((A&0x3000)!=0x2000)
return;
M96LA=(A>>8)&3;
setchr4r(0x10,0x0000,(latche&4)|M96LA);
setprg32(0x8000,latche&3);
setchr4r(0x10,0x0000,(latche&4)|M96LA);
setchr4r(0x10,0x1000,(latche&4)|3);
+ X6502_Rebase();
}
void Mapper96_init(void)
{
VROM_BANK8(V&0xF);
ROM_BANK32((V>>4)&0xF);
+ X6502_Rebase();
}
void Mapper140_init(void)