Add mapper 459

This commit is contained in:
NewRisingSun
2022-07-27 11:56:35 +02:00
parent 868edfb32d
commit c80d2b1297
3 changed files with 20 additions and 0 deletions

View File

@@ -758,6 +758,24 @@ void Mapper435_Init(CartInfo *info) {
Latch_Init(info, M435Sync, NULL, 0x0000, 0x8000, 0xFFFF, 1);
}
/*------------------ Map 459 ---------------------------*/
static void M459Sync(void) {
int p =latche >>5;
int c =latche &0x03 | latche >>2 &0x04 | latche >>4 &0x08;
if (latche &0x04) {
setprg32(0x8000, p);
} else {
setprg16(0x8000, p <<1);
setprg16(0xC000, p <<1 |7);
}
setchr8(c &(latche &0x08? 0x0F: 0x08));
setmirror(latche &0x100? MI_H: MI_V);
}
void Mapper459_Init(CartInfo *info) {
Latch_Init(info, M459Sync, NULL, 0x0000, 0x8000, 0xFFFF, 1);
}
/*------------------ Map 464 ---------------------------*/
static void M464Sync(void) {
int p =latche >>7;