| 1 | #include "mapinc.h" |
| 2 | |
| 3 | static DECLFW(M241wr) |
| 4 | { |
| 5 | // FCEU_printf("Wr: $%04x:$%02x, $%04x\n",A,V,X.PC); |
| 6 | if(A<0x8000) |
| 7 | { |
| 8 | // printf("$%04x:$%02x, $%04x\n",A,V,X.PC); |
| 9 | } |
| 10 | else |
| 11 | ROM_BANK32(V); |
| 12 | } |
| 13 | |
| 14 | static DECLFR(M241rd) |
| 15 | { |
| 16 | //DumpMem("out",0x8000,0xffff); |
| 17 | //printf("Rd: $%04x, $%04x\n",A,X.PC); |
| 18 | return(0x50); |
| 19 | } |
| 20 | |
| 21 | void Mapper241_init(void) |
| 22 | { |
| 23 | ROM_BANK32(0); |
| 24 | SetWriteHandler(0x5000,0x5fff,M241wr); |
| 25 | SetWriteHandler(0x8000,0xFFFF,M241wr); |
| 26 | SetReadHandler(0x4020,0x5fff,M241rd); |
| 27 | } |