Skip to content

Commit

Permalink
nes, add mapper 72
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkc64 committed Oct 24, 2024
1 parent 508178d commit 3543bf1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/burn/drv/nes/d_nes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2563,6 +2563,38 @@ static void mapper193_map()
#undef mapper193_chr
#undef mapper193_mirror

// ---[ mapper 72: Jaleco JF-17 (JF-19?), Pinball Quest Japan
#define mapper72_prg (mapper_regs[0])
#define mapper72_prglatch (mapper_regs[1])
#define mapper72_chr (mapper_regs[2])
#define mapper72_chrlatch (mapper_regs[3])

static void mapper72_write(UINT16 address, UINT8 data)
{
if (mapper72_prglatch == 0 && data & 0x80) {
mapper72_prg = data & 0x0f;
}
if (mapper72_chrlatch == 0 && data & 0x40) {
mapper72_chr = data & 0x0f;
}
mapper72_prglatch = data & 0x80;
mapper72_chrlatch = data & 0x40;

mapper_map();
}

static void mapper72_map()
{
mapper_map_prg(16, 0, mapper72_prg);
mapper_map_prg(16, 1, -1);

mapper_map_chr( 8, 0, mapper72_chr);
}

#undef mapper72_prg
#undef mapper72_chr
#undef mapper72_mirror

// ---[ mapper 15 Contra 168-in-1 Multicart
#define mapper15_prg (mapper_regs[0])
#define mapper15_prgbit (mapper_regs[1])
Expand Down Expand Up @@ -8585,6 +8617,14 @@ static INT32 mapper_init(INT32 mappernum)
break;
}

case 72: { // Jaleco JF-17, Pinball Quest Japan
mapper_write = mapper72_write;
mapper_map = mapper72_map;
mapper_map();
retval = 0;
break;
}

case 41: { // Caltron 6-in-1
cart_exp_write = mapper41_write;
mapper_write = mapper41_write;
Expand Down

0 comments on commit 3543bf1

Please sign in to comment.