10 static unsigned int bank_upper_bits;
11 static unsigned int ram_select;
14 unsigned int MBC3_write_byte(
unsigned short d,
unsigned char i)
30 mem_bank_switch(bank);
38 return NO_FILTER_WRITE;
40 unsigned int MBC1_write_byte(
unsigned short d,
unsigned char i)
51 if(d >= 0x2000 && d < 0x4000)
59 bank |= bank_upper_bits;
67 if(bank == 0 || bank == 0x20 || bank == 0x40 || bank == 0x60)
70 mem_bank_switch(bank);
76 if(d >= 0x4000 && d < 0x6000)
78 bank_upper_bits = (i & 0x3)<<5;
82 if(d >= 0x6000 && d <= 0x7FFF)
87 return NO_FILTER_WRITE;