diff options
Diffstat (limited to 'src/mame/drivers/cointek.cpp')
-rw-r--r-- | src/mame/drivers/cointek.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mame/drivers/cointek.cpp b/src/mame/drivers/cointek.cpp index eb18f3b6fb5..b72e93f6dda 100644 --- a/src/mame/drivers/cointek.cpp +++ b/src/mame/drivers/cointek.cpp @@ -20,7 +20,11 @@ The daughter card has a big box on it labelled as follows: Mask Microcomputer CODE NUM -The daughter board is connected to the main board via 40 pin socket +The daughter board is connected to the main board via 40 pin socket. + +TODO: +- decryption is only preliminary. The game puts some strings at 0xc000 and at 0xf800 then stops in a loop reading 0xf810; +- after decryption is completed, everything else. */ #include "emu.h" @@ -64,6 +68,7 @@ void cointek_state::prg_map(address_map &map) { map(0x0000, 0xbfff).rom(); // banking? map(0xc000, 0xc7ff).ram(); + map(0xf800, 0xffff).ram(); } void cointek_state::io_map(address_map &map) @@ -130,6 +135,7 @@ void cointek_state::cointek(machine_config &config) z80_device &audiocpu(Z80(config, "audiocpu", 12_MHz_XTAL / 3)); // divisor guessed audiocpu.set_addrmap(AS_PROGRAM, &cointek_state::audio_prg_map); audiocpu.set_addrmap(AS_IO, &cointek_state::audio_io_map); + audiocpu.set_disable(); // TODO: disabled for now to avoid clogging the error log I8255(config, "ppi1"); I8255(config, "ppi2"); @@ -205,8 +211,9 @@ void cointek_state::init_unkct() { uint8_t *rom = memregion("maincpu")->base(); - for (int i = 0; i < 0x8000; i++) // TODO: Is this all there is to it? Is the second ROM scrambled, too? - rom[i] = bitswap<8>(rom[i], 7, 6, 3, 4, 5, 2, 1, 0); + for (int i = 0; i < 0x10000; i++) // TODO: This is only enough to show some strings, but the encryption is conditional, possibly based on addresses. The second ROM is also conditionally scrambled. + if (!(i & 0x1000)) + rom[i] = bitswap<8>(rom[i], 7, 6, 3, 4, 5, 2, 1, 0); } } // Anonymous namespace |