summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-24 03:05:08 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-24 03:05:08 +0000
commit13333c1469ac0484045ce5db1a15ae8e69c1d071 (patch)
tree64b61ca570d4ef50f54bfa2024e8e7ccef5d3937 /src
parentb46fae1d1d0750e00c0b03f438d960e66222d94e (diff)
From: Steve Golson
This more accurately describes the aux board behavior for Ms. Pac-Man. There is a thorough description of how the board works. mspacman is a more faithful emulation. In particular you can now enter service mode (F2) at anytime during game play.
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/pacman.c229
-rw-r--r--src/mame/includes/pacman.h5
-rw-r--r--src/mame/machine/mspacman.c195
-rw-r--r--src/mame/mame.mak1
-rw-r--r--src/mame/mamedriv.c2
5 files changed, 222 insertions, 210 deletions
diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c
index 0f702d43773..1707cd5ed01 100644
--- a/src/mame/drivers/pacman.c
+++ b/src/mame/drivers/pacman.c
@@ -280,6 +280,15 @@ Easter eggs:
- Pacman, Ms Pacman, Piranha and similar display "MADE BY NAMCO" sideways in power pellets. Hold start 1 and 2 and
toggle the test switch to get to the convergence grid. 4xUp, 4xL, 4xR, 4xD.
+- Ms. Pac-Man has a hidden message at the very end of ROM memory 0x97d0-0x97ff:
+
+ 000097d0: 4745 4e45 5241 4c20 434f 4d50 5554 4552 GENERAL COMPUTER
+ 000097e0: 2020 434f 5250 4f52 4154 494f 4e20 2020 CORPORATION
+ 000097f0: 4865 6c6c 6f2c 204e 616b 616d 7572 6121 Hello, Nakamura!
+
+ Masaya Nakamura is the founder of Namco who originally produced Pac-Man in Japan.
+ General Computer Corporation designed Ms. Pac-Man and licensed it to Midway for manufacture in North America.
+
Boards:
-------
- puckman is the same as pacman except they are slotted to break a part and have ribbon cables to connect the halves.
@@ -788,6 +797,90 @@ static READ8_HANDLER( pacman_read_nop )
}
+/************************************
+ *
+ * Ms. Pac-Man
+ *
+ ************************************/
+
+/*
+ Ms. Pac-Man has an auxiliary PCB with ribbon cable that plugs into the Z-80 CPU socket of a Pac-Man main PCB. Also the
+ graphics ROMs at 5E, 5F on the main board are replaced.
+
+ The aux board contains three ROMs (two 2532 at U6, U7 and one 2716 at U5), a Z-80, and four PAL/HAL logic chips.
+
+ The aux board logic decodes the Z-80 address and determines whether to enable the main board ROMs (containing Pac-Man
+ code) or the aux board ROMs (containing Ms. Pac-Man code). Normally the Pac-Man ROMs reside at address 0x0000-0x3fff
+ and are mirrored at 0x8000-0xbfff (Z-80 A15 is not used in Pac-Man). The aux board logic modifies the address map and
+ enables the aux board ROMs for addresses 0x3000-0x3fff and 0x8000-0x97ff. Furthermore there are forty 8-byte "patch"
+ regions which reside in the 0x0000-0x2fff address range. Any access to these patch addresses will disable the Pac-Man
+ ROMs and enable the aux board ROM. Aux board ROM addresses 0x8000-0x81ef are mapped onto the patch regions. These
+ patches typically insert jumps to new code above 0x8000.
+
+ The aux board logic also acts as a software protection circuit which inhibits dumping of the ROMs (e.g., using a
+ microprocessor emulator system). There are several "trap" address regions which enable and disable the decode
+ functions. In order to properly operate as Ms. Pac-Man you must access one of the "latch set" trap addresses. This
+ enables the decode. If a "latch clear" address is accessed then decode is disabled and all you get is Pac-Man. For
+ more info see U.S. Patent 4,525,599 "Software protection methods and apparatus".
+
+ The trap regions are 8 bytes in length starting on the following addresses:
+
+ latch clear, decode disable
+ 0x0038
+ 0x03b0
+ 0x1600
+ 0x2120
+ 0x3ff0
+ 0x8000
+ 0x97f0
+
+ latch set, decode enable
+ 0x3ff8
+
+ Any memory access will trigger the trap behavior: instruction fetch, data read, data write. The latch clear addresses
+ should never be accessed during normal Ms. Pac-Man operation, so when the circuitry detects an access it clears the
+ latch and prevents any further dumping of the aux board ROMs.
+
+ The Pac-Man self-test code does a checksum of the ROM 0x0000-0x2fff. This works because the checksum routine walks the
+ ROM starting from the low address and hits the latch clear trap at 0x0038 prior to encountering any of the patch
+ regions. The decode stays disabled for the rest of the checksum routine, and thus the checksum is calculated for the
+ Pac-Man ROMs with no patches applied.
+
+ During normal operation every VBLANK (60.6Hz) interrupt will fetch its interrupt vector from the 0x3ff8 trap region, so
+ the latch is continually being enabled.
+
+ David Widel points out that the Pac-Man pseudo-random number generator (RNG) routine at 0x2a23 might also access a
+ trap region. This RNG is only used when the monsters are blue (after a power pellet has been eaten) and is used to
+ select a "random" direction for the monsters to run away. The routine calculates a pointer address between
+ 0x0000-0x1fff and fetches the ROM value from that address. This value is the "random" number returned by the
+ routine. During the blue mode only Pac-Man code is being executed, so a trap hit that clears the decode latch will
+ have no effect on gameplay. Every VBLANK interrupt vector fetch re-enables the latch and you are back in Ms. Pac-Man
+ mode.
+
+ In a further attempt to thwart copying, the aux board ROMs have a simple encryption scheme: their address and data
+ lines are bit flipped (i.e., wired in a nonstandard fashion). The specific bit flips were selected to minimize the
+ vias required to lay out the aux PCB.
+*/
+
+#define mspacman_enable_decode_latch(m) memory_set_bank(m, 1, 1)
+#define mspacman_disable_decode_latch(m) memory_set_bank(m, 1, 0)
+
+// any access to these ROM addresses disables the decoder, and all you see is the original Pac-Man code
+static READ8_HANDLER( mspacman_disable_decode_r_0x0038 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x0038]; }
+static READ8_HANDLER( mspacman_disable_decode_r_0x03b0 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x03b0]; }
+static READ8_HANDLER( mspacman_disable_decode_r_0x1600 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x1600]; }
+static READ8_HANDLER( mspacman_disable_decode_r_0x2120 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x2120]; }
+static READ8_HANDLER( mspacman_disable_decode_r_0x3ff0 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x3ff0]; }
+static READ8_HANDLER( mspacman_disable_decode_r_0x8000 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x8000]; }
+static READ8_HANDLER( mspacman_disable_decode_r_0x97f0 ) { mspacman_disable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x97f0]; }
+static WRITE8_HANDLER( mspacman_disable_decode_w ) { mspacman_disable_decode_latch(space->machine); }
+
+// any access to these ROM addresses enables the decoder, and you'll see the Ms. Pac-Man code
+static READ8_HANDLER( mspacman_enable_decode_r_0x3ff8 ) { mspacman_enable_decode_latch(space->machine); return memory_region(space->machine, "main")[offset+0x3ff8+0x10000]; }
+static WRITE8_HANDLER( mspacman_enable_decode_w ) { mspacman_enable_decode_latch(space->machine); }
+
+
+
/*************************************
*
* Main CPU memory handlers
@@ -824,7 +917,6 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( mspacman_map, ADDRESS_SPACE_PROGRAM, 8 )
- AM_RANGE(0x0000, 0x3fff) AM_ROMBANK(1)
AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0xa000) AM_READWRITE(SMH_RAM,pacman_videoram_w) AM_BASE(&videoram) AM_SIZE(&videoram_size)
AM_RANGE(0x4400, 0x47ff) AM_MIRROR(0xa000) AM_READWRITE(SMH_RAM,pacman_colorram_w) AM_BASE(&colorram)
AM_RANGE(0x4800, 0x4bff) AM_MIRROR(0xa000) AM_READWRITE(pacman_read_nop,SMH_NOP)
@@ -835,7 +927,7 @@ static ADDRESS_MAP_START( mspacman_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x5002, 0x5002) AM_MIRROR(0xaf38) AM_WRITE(SMH_NOP)
AM_RANGE(0x5003, 0x5003) AM_MIRROR(0xaf38) AM_WRITE(pacman_flipscreen_w)
AM_RANGE(0x5004, 0x5005) AM_MIRROR(0xaf38) AM_WRITE(SMH_NOP) // AM_WRITE(pacman_leds_w)
- AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITE(mspacman_activate_rom) /* Not actually, just handy */ // AM_WRITE(pacman_coin_lockout_global_w)
+ AM_RANGE(0x5006, 0x5006) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_lockout_global_w)
AM_RANGE(0x5007, 0x5007) AM_MIRROR(0xaf38) AM_WRITE(pacman_coin_counter_w)
AM_RANGE(0x5040, 0x505f) AM_MIRROR(0xaf00) AM_WRITE(pacman_sound_w) AM_BASE(&pacman_soundregs)
AM_RANGE(0x5060, 0x506f) AM_MIRROR(0xaf00) AM_WRITE(SMH_RAM) AM_BASE(&spriteram_2)
@@ -846,7 +938,20 @@ static ADDRESS_MAP_START( mspacman_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x5040, 0x5040) AM_MIRROR(0xaf3f) AM_READ_PORT("IN1") /* IN1 */
AM_RANGE(0x5080, 0x5080) AM_MIRROR(0xaf3f) AM_READ_PORT("DSW1") /* DSW1 */
AM_RANGE(0x50c0, 0x50c0) AM_MIRROR(0xaf3f) AM_READ_PORT("DSW2") /* DSW2 */
- AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
+
+ /* overlay decode enable/disable on top */
+ AM_RANGE(0x0038, 0x003f) AM_READWRITE(mspacman_disable_decode_r_0x0038,mspacman_disable_decode_w)
+ AM_RANGE(0x03b0, 0x03b7) AM_READWRITE(mspacman_disable_decode_r_0x03b0,mspacman_disable_decode_w)
+ AM_RANGE(0x1600, 0x1607) AM_READWRITE(mspacman_disable_decode_r_0x1600,mspacman_disable_decode_w)
+ AM_RANGE(0x2120, 0x2127) AM_READWRITE(mspacman_disable_decode_r_0x2120,mspacman_disable_decode_w)
+ AM_RANGE(0x3ff0, 0x3ff7) AM_READWRITE(mspacman_disable_decode_r_0x3ff0,mspacman_disable_decode_w)
+ AM_RANGE(0x3ff8, 0x3fff) AM_READWRITE(mspacman_enable_decode_r_0x3ff8,mspacman_enable_decode_w)
+ AM_RANGE(0x8000, 0x8007) AM_READWRITE(mspacman_disable_decode_r_0x8000,mspacman_disable_decode_w)
+ AM_RANGE(0x97f0, 0x97f7) AM_READWRITE(mspacman_disable_decode_r_0x97f0,mspacman_disable_decode_w)
+
+ /* start with 0000-3fff and 8000-bfff mapped to the ROMs */
+ AM_RANGE(0x4000, 0x7fff) AM_MIRROR(0x8000) AM_UNMAP
+ AM_RANGE(0x0000, 0xffff) AM_ROMBANK(1)
ADDRESS_MAP_END
@@ -3123,8 +3228,6 @@ static MACHINE_DRIVER_START( mspacman )
MDRV_CPU_MODIFY("main")
MDRV_CPU_PROGRAM_MAP(mspacman_map,0)
-
- MDRV_MACHINE_RESET(mspacman)
MACHINE_DRIVER_END
@@ -5314,6 +5417,116 @@ static DRIVER_INIT( eyes )
eyes_decode(&RAM[i]);
}
+
+#define BITSWAP12(val,B11,B10,B9,B8,B7,B6,B5,B4,B3,B2,B1,B0) \
+ BITSWAP16(val,15,14,13,12,B11,B10,B9,B8,B7,B6,B5,B4,B3,B2,B1,B0)
+
+#define BITSWAP11(val,B10,B9,B8,B7,B6,B5,B4,B3,B2,B1,B0) \
+ BITSWAP16(val,15,14,13,12,11,B10,B9,B8,B7,B6,B5,B4,B3,B2,B1,B0)
+
+static void mspacman_install_patches(UINT8 *ROM)
+{
+ int i;
+
+ /* copy forty 8-byte patches into Pac-Man code */
+
+ for (i = 0; i < 8; i++)
+ {
+ ROM[0x0410+i] = ROM[0x8008+i];
+ ROM[0x08E0+i] = ROM[0x81D8+i];
+ ROM[0x0A30+i] = ROM[0x8118+i];
+ ROM[0x0BD0+i] = ROM[0x80D8+i];
+ ROM[0x0C20+i] = ROM[0x8120+i];
+ ROM[0x0E58+i] = ROM[0x8168+i];
+ ROM[0x0EA8+i] = ROM[0x8198+i];
+
+ ROM[0x1000+i] = ROM[0x8020+i];
+ ROM[0x1008+i] = ROM[0x8010+i];
+ ROM[0x1288+i] = ROM[0x8098+i];
+ ROM[0x1348+i] = ROM[0x8048+i];
+ ROM[0x1688+i] = ROM[0x8088+i];
+ ROM[0x16B0+i] = ROM[0x8188+i];
+ ROM[0x16D8+i] = ROM[0x80C8+i];
+ ROM[0x16F8+i] = ROM[0x81C8+i];
+ ROM[0x19A8+i] = ROM[0x80A8+i];
+ ROM[0x19B8+i] = ROM[0x81A8+i];
+
+ ROM[0x2060+i] = ROM[0x8148+i];
+ ROM[0x2108+i] = ROM[0x8018+i];
+ ROM[0x21A0+i] = ROM[0x81A0+i];
+ ROM[0x2298+i] = ROM[0x80A0+i];
+ ROM[0x23E0+i] = ROM[0x80E8+i];
+ ROM[0x2418+i] = ROM[0x8000+i];
+ ROM[0x2448+i] = ROM[0x8058+i];
+ ROM[0x2470+i] = ROM[0x8140+i];
+ ROM[0x2488+i] = ROM[0x8080+i];
+ ROM[0x24B0+i] = ROM[0x8180+i];
+ ROM[0x24D8+i] = ROM[0x80C0+i];
+ ROM[0x24F8+i] = ROM[0x81C0+i];
+ ROM[0x2748+i] = ROM[0x8050+i];
+ ROM[0x2780+i] = ROM[0x8090+i];
+ ROM[0x27B8+i] = ROM[0x8190+i];
+ ROM[0x2800+i] = ROM[0x8028+i];
+ ROM[0x2B20+i] = ROM[0x8100+i];
+ ROM[0x2B30+i] = ROM[0x8110+i];
+ ROM[0x2BF0+i] = ROM[0x81D0+i];
+ ROM[0x2CC0+i] = ROM[0x80D0+i];
+ ROM[0x2CD8+i] = ROM[0x80E0+i];
+ ROM[0x2CF0+i] = ROM[0x81E0+i];
+ ROM[0x2D60+i] = ROM[0x8160+i];
+ }
+}
+
+static DRIVER_INIT( mspacman )
+{
+ int i;
+ UINT8 *ROM, *DROM;
+
+ /* CPU ROMs */
+
+ /* Pac-Man code is in low bank */
+ ROM = memory_region(machine, "main");
+
+ /* decrypted Ms. Pac-Man code is in high bank */
+ DROM = &memory_region(machine, "main")[0x10000];
+
+ /* copy ROMs into decrypted bank */
+ for (i = 0; i < 0x1000; i++)
+ {
+ DROM[0x0000+i] = ROM[0x0000+i]; /* pacman.6e */
+ DROM[0x1000+i] = ROM[0x1000+i]; /* pacman.6f */
+ DROM[0x2000+i] = ROM[0x2000+i]; /* pacman.6h */
+ DROM[0x3000+i] = BITSWAP8(ROM[0xb000+BITSWAP12(i,11,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt u7 */
+ }
+ for (i = 0; i < 0x800; i++)
+ {
+ DROM[0x8000+i] = BITSWAP8(ROM[0x8000+BITSWAP11(i, 8,7,5,9,10,6,3,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt u5 */
+ DROM[0x8800+i] = BITSWAP8(ROM[0x9800+BITSWAP12(i,11,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt half of u6 */
+ DROM[0x9000+i] = BITSWAP8(ROM[0x9000+BITSWAP12(i,11,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt half of u6 */
+ DROM[0x9800+i] = ROM[0x1800+i]; /* mirror of pacman.6f high */
+ }
+ for (i = 0; i < 0x1000; i++)
+ {
+ DROM[0xa000+i] = ROM[0x2000+i]; /* mirror of pacman.6h */
+ DROM[0xb000+i] = ROM[0x3000+i]; /* mirror of pacman.6j */
+ }
+ /* install patches into decrypted bank */
+ mspacman_install_patches(DROM);
+
+ /* mirror Pac-Man ROMs into upper addresses of normal bank */
+ for (i = 0; i < 0x1000; i++)
+ {
+ ROM[0x8000+i] = ROM[0x0000+i];
+ ROM[0x9000+i] = ROM[0x1000+i];
+ ROM[0xa000+i] = ROM[0x2000+i];
+ ROM[0xb000+i] = ROM[0x3000+i];
+ }
+
+ /* initialize the banks */
+ memory_configure_bank(machine, 1, 0, 2, &ROM[0x00000], 0x10000);
+ memory_set_bank(machine, 1, 1);
+}
+
static DRIVER_INIT( woodpek )
{
int i, len;
@@ -5517,9 +5730,9 @@ GAME( 1981, piranhao, puckman, piranha, mspacman, eyes, ROT90, "GL (US Bi
GAME( 1981, abscam, puckman, piranha, mspacman, eyes, ROT90, "GL (US Billiards License)", "Abscam", GAME_SUPPORTS_SAVE )
GAME( 1981, nmouse, 0 , nmouse , nmouse, eyes, ROT90, "Amenip (Palcom Queen River)", "Naughty Mouse (set 1)", GAME_SUPPORTS_SAVE )
GAME( 1981, nmouseb, nmouse , nmouse , nmouse, eyes, ROT90, "Amenip Nova Games Ltd.", "Naughty Mouse (set 2)", GAME_SUPPORTS_SAVE )
-GAME( 1981, mspacman, 0, mspacman, mspacman, 0, ROT90, "Midway", "Ms. Pac-Man", GAME_SUPPORTS_SAVE )
-GAME( 1981, mspacmnf, mspacman, mspacman, mspacman, 0, ROT90, "Midway", "Ms. Pac-Man (with speedup hack)", GAME_SUPPORTS_SAVE )
-GAME( 1981, mspacmat, mspacman, mspacman, mspacman, 0, ROT90, "hack", "Ms. Pac Attack", GAME_SUPPORTS_SAVE )
+GAME( 1981, mspacman, 0, mspacman, mspacman, mspacman, ROT90, "Midway", "Ms. Pac-Man", GAME_SUPPORTS_SAVE )
+GAME( 1981, mspacmnf, mspacman, mspacman, mspacman, mspacman, ROT90, "Midway", "Ms. Pac-Man (with speedup hack)", GAME_SUPPORTS_SAVE )
+GAME( 1981, mspacmat, mspacman, mspacman, mspacman, mspacman, ROT90, "hack", "Ms. Pac Attack", GAME_SUPPORTS_SAVE )
GAME( 1981, woodpek, 0, woodpek, woodpek, woodpek, ROT90, "Amenip (Palcom Queen River)", "Woodpecker (set 1)", GAME_SUPPORTS_SAVE )
GAME( 1981, woodpeka, woodpek, woodpek, woodpek, woodpek, ROT90, "Amenip", "Woodpecker (set 2)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
GAME( 1981, mspacmab, mspacman, woodpek, mspacman, 0, ROT90, "bootleg", "Ms. Pac-Man (bootleg)", GAME_SUPPORTS_SAVE )
diff --git a/src/mame/includes/pacman.h b/src/mame/includes/pacman.h
index 147e72714b7..88bc5685b75 100644
--- a/src/mame/includes/pacman.h
+++ b/src/mame/includes/pacman.h
@@ -62,11 +62,6 @@ MACHINE_RESET( theglobp );
READ8_HANDLER( theglobp_decrypt_rom );
-/*----------- defined in machine/mspacman.c -----------*/
-
-MACHINE_RESET( mspacman );
-WRITE8_HANDLER( mspacman_activate_rom );
-
/*----------- defined in machine/acitya.c -------------*/
MACHINE_RESET( acitya );
diff --git a/src/mame/machine/mspacman.c b/src/mame/machine/mspacman.c
deleted file mode 100644
index 9769657026a..00000000000
--- a/src/mame/machine/mspacman.c
+++ /dev/null
@@ -1,195 +0,0 @@
-#include "driver.h"
-#include "includes/pacman.h"
-
-
-/*
- It turns out the bootleg is the decrypted version with the checksum check
- removed and interrupt mode changed to 1.
-
- u7= boot 4($3000-$3fff) other than 4 bytes(checksum check and interupt mode)
- u6= boot 6($9000-$9fff). The second half of u6 gets mirrored to the second
- half of boot5($8800-$8fff) where it is used.
- u5= first half of boot5($8000-$87ff)
-
- $8000-$81ef contain 8 byte patches that are overlayed on locations in $0000-$2fff
-
- The Ms Pacman daughter board is not activated with the mainboard. As near as I
- can tell it requires a sequence of bytes starting at around 3176 and ending with
- 3196. The location of the bytes doesn't seem to matter, just that those bytes
- are executed. That sequence of bytes includes a write to 5006 so I'm using that
- to bankswitch, but that is not accurate. The actual change is I believe at $317D.
- The daughterboard can also be deactivated. A read to any of the several 8 byte
- chunks listed will cause the Ms Pac roms to disappear and Pacman to show up.
- As a result I couldn't verify what they contained. They should be the same as the
- pacman roms, but I don't see how it could matter. These areas can be accessed by
- the random number generator at $2a23 and the board is deactivated but is
- immediately reactivated. So the net result is no change. The exact trigger for
- this is not yet known.
-
- deactivation, 8 bytes starting at:
- $38,$3b0,$1600,$2120,$3ff0,$8000
-
- David Widel
- d_widel@hotmail.com
-*/
-
-
-
-
-static UINT8 decryptd(UINT8 e)
-{
- UINT8 d;
-
- d = (e & 0x80) >> 3;
- d |= (e & 0x40) >> 3;
- d |= (e & 0x20) ;
- d |= (e & 0x10) << 2;
- d |= (e & 0x08) >> 1;
- d |= (e & 0x04) >> 1;
- d |= (e & 0x02) >> 1;
- d |= (e & 0x01) << 7;
-
- return d;
-}
-
-static UINT32 decrypta1(UINT32 e)
-{
- UINT32 d;
-
- d = (e & 0x800) ;
- d |= (e & 0x400) >> 7;
- d |= (e & 0x200) >> 2;
- d |= (e & 0x100) << 1;
- d |= (e & 0x80) << 3;
- d |= (e & 0x40) << 2;
- d |= (e & 0x20) << 1;
- d |= (e & 0x10) << 1;
- d |= (e & 0x08) << 1;
- d |= (e & 0x04) ;
- d |= (e & 0x02) ;
- d |= (e & 0x01) ;
-
- return d;
-}
-
-static UINT32 decrypta2(UINT32 e)
-{
- UINT32 d;
- d = (e & 0x800) ;
- d |= (e & 0x400) >> 2;
- d |= (e & 0x200) >> 2;
- d |= (e & 0x100) >> 3;
- d |= (e & 0x80) << 2;
- d |= (e & 0x40) << 4;
- d |= (e & 0x20) << 1;
- d |= (e & 0x10) >> 1;
- d |= (e & 0x08) << 1;
- d |= (e & 0x04) ;
- d |= (e & 0x02) ;
- d |= (e & 0x01) ;
-
- return d;
-}
-
-
-
-
-static void mspacman_decode(running_machine *machine)
-{
- int i;
- UINT8 *RAM;
-
-
-
- /* CPU ROMs */
-
- RAM = memory_region(machine, "main");
- for (i = 0; i < 0x1000; i++)
- {
- RAM[0x10000+i] = RAM[0x0000+i];
- RAM[0x11000+i] = RAM[0x1000+i];
- RAM[0x12000+i] = RAM[0x2000+i];
- RAM[0x1a000+i] = RAM[0x2000+i]; /*not needed but it's there*/
- RAM[0x1b000+i] = RAM[0x3000+i]; /*not needed but it's there*/
-
- }
-
-
- for (i = 0; i < 0x1000; i++)
- {
- RAM[decrypta1(i)+0x13000] = decryptd(RAM[0xb000+i]); /*u7*/
- RAM[decrypta1(i)+0x19000] = decryptd(RAM[0x9000+i]); /*u6*/
- }
-
- for (i = 0; i < 0x800; i++)
- {
- RAM[decrypta2(i)+0x18000] = decryptd(RAM[0x8000+i]); /*u5*/
- RAM[0x18800+i] = RAM[0x19800+i];
- }
-
-
-
- for (i = 0; i < 8; i++)
- {
- RAM[0x10410+i] = RAM[0x18008+i];
- RAM[0x108E0+i] = RAM[0x181D8+i];
- RAM[0x10A30+i] = RAM[0x18118+i];
- RAM[0x10BD0+i] = RAM[0x180D8+i];
- RAM[0x10C20+i] = RAM[0x18120+i];
- RAM[0x10E58+i] = RAM[0x18168+i];
- RAM[0x10EA8+i] = RAM[0x18198+i];
-
- RAM[0x11000+i] = RAM[0x18020+i];
- RAM[0x11008+i] = RAM[0x18010+i];
- RAM[0x11288+i] = RAM[0x18098+i];
- RAM[0x11348+i] = RAM[0x18048+i];
- RAM[0x11688+i] = RAM[0x18088+i];
- RAM[0x116B0+i] = RAM[0x18188+i];
- RAM[0x116D8+i] = RAM[0x180C8+i];
- RAM[0x116F8+i] = RAM[0x181C8+i];
- RAM[0x119A8+i] = RAM[0x180A8+i];
- RAM[0x119B8+i] = RAM[0x181A8+i];
-
- RAM[0x12060+i] = RAM[0x18148+i];
- RAM[0x12108+i] = RAM[0x18018+i];
- RAM[0x121A0+i] = RAM[0x181A0+i];
- RAM[0x12298+i] = RAM[0x180A0+i];
- RAM[0x123E0+i] = RAM[0x180E8+i];
- RAM[0x12418+i] = RAM[0x18000+i];
- RAM[0x12448+i] = RAM[0x18058+i];
- RAM[0x12470+i] = RAM[0x18140+i];
- RAM[0x12488+i] = RAM[0x18080+i];
- RAM[0x124B0+i] = RAM[0x18180+i];
- RAM[0x124D8+i] = RAM[0x180C0+i];
- RAM[0x124F8+i] = RAM[0x181C0+i];
- RAM[0x12748+i] = RAM[0x18050+i];
- RAM[0x12780+i] = RAM[0x18090+i];
- RAM[0x127B8+i] = RAM[0x18190+i];
- RAM[0x12800+i] = RAM[0x18028+i];
- RAM[0x12B20+i] = RAM[0x18100+i];
- RAM[0x12B30+i] = RAM[0x18110+i];
- RAM[0x12BF0+i] = RAM[0x181D0+i];
- RAM[0x12CC0+i] = RAM[0x180D0+i];
- RAM[0x12CD8+i] = RAM[0x180E0+i];
- RAM[0x12CF0+i] = RAM[0x181E0+i];
- RAM[0x12D60+i] = RAM[0x18160+i];
- }
-}
-
-
-MACHINE_RESET( mspacman )
-{
- UINT8 *RAM = memory_region(machine, "main");
- mspacman_decode(machine);
-
- memory_configure_bank(machine, 1, 0, 2, &RAM[0x00000], 0x10000);
- memory_set_bank(machine, 1, 0);
-}
-
-
-WRITE8_HANDLER( mspacman_activate_rom )
-{
- if (data==1) memory_set_bank(space->machine, 1, 1);
-}
-
-
diff --git a/src/mame/mame.mak b/src/mame/mame.mak
index aeeaab48754..cb13ddb651c 100644
--- a/src/mame/mame.mak
+++ b/src/mame/mame.mak
@@ -1128,7 +1128,6 @@ $(MAMEOBJ)/pacman.a: \
$(DRIVERS)/pengo.o \
$(MACHINE)/acitya.o \
$(MACHINE)/jumpshot.o \
- $(MACHINE)/mspacman.o \
$(MACHINE)/pacplus.o \
$(MACHINE)/theglobp.o \
diff --git a/src/mame/mamedriv.c b/src/mame/mamedriv.c
index 7133c6563a6..1bd7dceacf1 100644
--- a/src/mame/mamedriv.c
+++ b/src/mame/mamedriv.c
@@ -81,7 +81,7 @@ const game_driver * const drivers[] =
DRIVER( piranhao ) /* GL */
DRIVER( nmouse ) /* (c) 1981 Amenip (Palcom Queen River) */
DRIVER( nmouseb ) /* (c) 1981 Amenip Nova Games Ltd. */
- DRIVER( mspacman ) /* (c) 1981 Midway */ /* made by Gencomp */
+ DRIVER( mspacman ) /* (c) 1981 Midway */ /* made by General Computer */
DRIVER( mspacmnf ) /* hack */
DRIVER( mspacmat ) /* hack */
DRIVER( woodpek ) /* (c) 1981 Amenip (Palcom Queen River) */