2008-09-02 03:55:12 +02:00
|
|
|
#include "mapinc.h"
|
|
|
|
|
|
|
|
static DECLFW(M241wr)
|
|
|
|
{
|
2009-07-17 19:27:04 +02:00
|
|
|
// FCEU_printf("Wr: $%04x:$%02x, $%04x\n",A,V,X.PC);
|
2008-09-02 03:55:12 +02:00
|
|
|
if(A<0x8000)
|
|
|
|
{
|
2009-07-17 19:27:04 +02:00
|
|
|
// printf("$%04x:$%02x, $%04x\n",A,V,X.PC);
|
2008-09-02 03:55:12 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
ROM_BANK32(V);
|
|
|
|
}
|
|
|
|
|
|
|
|
static DECLFR(M241rd)
|
|
|
|
{
|
|
|
|
//DumpMem("out",0x8000,0xffff);
|
|
|
|
//printf("Rd: $%04x, $%04x\n",A,X.PC);
|
|
|
|
return(0x50);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Mapper241_init(void)
|
|
|
|
{
|
|
|
|
ROM_BANK32(0);
|
|
|
|
SetWriteHandler(0x5000,0x5fff,M241wr);
|
|
|
|
SetWriteHandler(0x8000,0xFFFF,M241wr);
|
|
|
|
SetReadHandler(0x4020,0x5fff,M241rd);
|
|
|
|
}
|