Mspacii is basically a hack of mspacmab. I knew this because of the presence of "boot4" rom. I made a "diff" of the disassemblies between them. A custom memory map was made, so that I could change stuff without breaking other games. The "diff" revealed a few protections and other mystery things. It was simply a matter of patching with mspacmab code until it started to work. So, we had a game that looked identical in every way to mspacmab, except that the big MM symbol was missing.
Then, I remembered about the different rom earlier in this thread. I replaced "boot4" with the one from the original set, and it said BAD ROM 5. Hmm. I could either patch out the rom checksum code, or find a rom that was agreeable. So, being a hack of mspacmab, I tried "boot5", and yay, it fixed that. Now, the front screen was as you see it. Next, I could now remove all the patches, and it kept working.
This morning, I realised that one protection was really just something to get around a bug, so it was replaced by a 1-byte patch. So here it is, the final code:
Firstly you need to find the existing code for pacman and replace it with this:static ADDRESS_MAP_START( writeport, ADDRESS_SPACE_IO, 8 )
ADDRESS_MAP_FLAGS( AMEF_ABITS(8) )
AM_RANGE(0x00, 0xff) AM_WRITE(pacman_interrupt_vector_w) /* Pac-Man only */
ADDRESS_MAP_END
Then the rest is all new. Throw out any existing code you might have for mspacii./* used by extra routine at $3FE, bit 4 of 504d needs to be low, and of 504e to be high */
READ8_HANDLER( mspacii_prot_r )
{
return offset<<4;
}
static DRIVER_INIT( mspacii )
{
UINT8 *RAM = memory_region(REGION_CPU1);
RAM[0x3018] = 4; /* fix a bug with interrupt handling */
}
static ADDRESS_MAP_START( mspacii_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_ROM
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0xa000) AM_READWRITE(MRA8_RAM,pacman_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4400, 0x47ff) AM_MIRROR(0xa000) AM_READWRITE(MRA8_RAM,pacman_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x4800, 0x4bff) AM_MIRROR(0xa000) AM_READWRITE(pacman_read_nop,MWA8_NOP)
AM_RANGE(0x4c00, 0x4fef) AM_MIRROR(0xa000) AM_RAM
AM_RANGE(0x4ff0, 0x4fff) AM_MIRROR(0xa000) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x8000) AM_WRITE(interrupt_enable_w)
AM_RANGE(0x5001, 0x5001) AM_MIRROR(0x8000) AM_WRITE(pacman_sound_enable_w)
AM_RANGE(0x5002, 0x5002) AM_MIRROR(0x8000) AM_WRITENOP
AM_RANGE(0x5003, 0x5003) AM_MIRROR(0x8000) AM_WRITE(pacman_flipscreen_w)
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0x8000) AM_WRITE(pacman_leds_w)
AM_RANGE(0x5006, 0x5006) AM_MIRROR(0x8000) AM_WRITENOP
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0x8000) AM_WRITE(pacman_coin_counter_w)
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0x8000) AM_WRITE(pacman_sound_w) AM_BASE(&pacman_soundregs)
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0x8000) AM_RAM AM_BASE(&spriteram_2)
AM_RANGE(0x5070, 0x507f) AM_MIRROR(0x8000) AM_WRITENOP
AM_RANGE(0x50c0, 0x50c0) AM_MIRROR(0x8000) AM_WRITE(watchdog_reset_w)
AM_RANGE(0x5000, 0x5000) AM_MIRROR(0x8000) AM_READ(input_port_0_r) /* IN0 */
AM_RANGE(0x5040, 0x5040) AM_MIRROR(0x8000) AM_READ(input_port_1_r) /* IN1 */
AM_RANGE(0x504d, 0x504e) AM_READ(mspacii_prot_r)
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0x8000) AM_READ(input_port_2_r) /* DSW1 */
AM_RANGE(0x8000, 0x9fff) AM_ROM
AM_RANGE(0xfffc, 0xffff) AM_WRITENOP
ADDRESS_MAP_END
static MACHINE_DRIVER_START( mspacii )
MDRV_IMPORT_FROM(pacman)
MDRV_CPU_MODIFY("main")
MDRV_CPU_PROGRAM_MAP(mspacii_map,0)
MACHINE_DRIVER_END
ROM_START( mspacii )
ROM_REGION( 0x10000, REGION_CPU1, 0 )
ROM_LOAD( "mspacii.1", 0x0000, 0x1000, CRC(df673b57) SHA1(93ee4e8f9751db5f7d3c35988fcb8ae8037464ed) )
ROM_LOAD( "mspacii.2", 0x1000, 0x1000, CRC(7591f606) SHA1(0aead0ac5af602269df8732c5763147cdb543b8d) )
ROM_LOAD( "mspacii.3", 0x2000, 0x1000, CRC(c8ef1a7f) SHA1(0c9a28bbe63d7d44511a13316937a21b8846543e) )
ROM_LOAD( "mspacii.4", 0x3000, 0x1000, CRC(d498f435) SHA1(c041841b1349d8d5c2d560aed54c4aeb8adfddb8) )
ROM_LOAD( "boot5", 0x8000, 0x1000, CRC(8c3e6de6) SHA1(fed6e9a2b210b07e7189a18574f6b8c4ec5bb49b) )
ROM_LOAD( "mspacii.6", 0x9000, 0x1000, CRC(aba3096d) SHA1(661e28785931fa329c2ebdc95d78072a42c512ff) )
ROM_REGION( 0x2000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "mspacii.5e", 0x0000, 0x1000, CRC(04333722) SHA1(bb179d5302b26b815b5d7eff14865e7b4f8a6880) )
ROM_LOAD( "5f", 0x1000, 0x1000, CRC(615af909) SHA1(fd6a1dde780b39aea76bf1c4befa5882573c2ef4) )
ROM_REGION( 0x0120, REGION_PROMS, 0 )
ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) )
ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) )
ROM_REGION( 0x0200, REGION_SOUND1, 0 )
ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) )
ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) )
ROM_END
GAME( 1998, mspacii, mspacman, mspacii, mspacman, mspacii, ROT90, "[Midway] Orca?", "Ms. Pacman II", GAME_SUPPORTS_SAVE )