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;

View File

@ -820,6 +820,7 @@ INES_BOARD_BEGIN()
INES_BOARD( "NC-7000M/NC-8000M", 444, Mapper444_Init )
INES_BOARD( "DS-9-27", 452, Mapper452_Init )
INES_BOARD( "K6C3001A", 456, Mapper456_Init )
INES_BOARD( "8-in-1", 459, Mapper459_Init )
INES_BOARD( "YH810X1", 463, Mapper463_Init )
INES_BOARD( "NTDEC 9012", 464, Mapper464_Init )
INES_BOARD( "Keybyte Computer", 466, Mapper466_Init )

View File

@ -328,6 +328,7 @@ void Mapper443_Init(CartInfo *);
void Mapper444_Init(CartInfo *);
void Mapper452_Init(CartInfo *);
void Mapper456_Init(CartInfo *);
void Mapper459_Init(CartInfo *);
void Mapper463_Init(CartInfo *);
void Mapper464_Init(CartInfo *);
void Mapper466_Init(CartInfo *);