summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/goldstar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/goldstar.cpp')
-rw-r--r--src/mame/drivers/goldstar.cpp100
1 files changed, 96 insertions, 4 deletions
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index f25318b9d52..0a3f83e6734 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -631,6 +631,37 @@ void cb3_state::ncb3_map(address_map &map)
map(0xf870, 0xf870).w("snsnd", FUNC(sn76489_device::write)); /* guess... device is initialized, but doesn't seems to be used.*/
}
+void cb3_state::chryangla_map(address_map &map) // most to be verified when the game will show more than test screens only
+{
+ map(0x0000, 0xbfff).rom();
+ map(0xc000, 0xc7ff).ram().share("nvram");
+ map(0xc800, 0xcfff).ram().w(FUNC(cb3_state::goldstar_fg_vidram_w)).share("fg_vidram");
+ map(0xd000, 0xd7ff).ram().w(FUNC(cb3_state::goldstar_fg_atrram_w)).share("fg_atrram");
+ map(0xd800, 0xd9ff).ram().w(FUNC(cb3_state::goldstar_reel1_ram_w)).share("reel1_ram");
+ map(0xe000, 0xe1ff).ram().w(FUNC(cb3_state::goldstar_reel2_ram_w)).share("reel2_ram");
+ map(0xe800, 0xe9ff).ram().w(FUNC(cb3_state::goldstar_reel3_ram_w)).share("reel3_ram");
+ map(0xf040, 0xf07f).ram().share("reel1_scroll");
+ map(0xf080, 0xf0bf).ram().share("reel2_scroll");
+ map(0xf100, 0xf17f).ram().share("reel3_scroll"); // moved compared to goldstar
+
+ map(0xf800, 0xf803).rw("ppi8255_0", FUNC(i8255_device::read), FUNC(i8255_device::write)); /* Input Ports */
+ map(0xf810, 0xf813).rw("ppi8255_1", FUNC(i8255_device::read), FUNC(i8255_device::write)); /* Input Ports */
+ map(0xf820, 0xf823).rw("ppi8255_2", FUNC(i8255_device::read), FUNC(i8255_device::write)); /* Input/Output Ports */
+ map(0xf822, 0xf822).w(FUNC(cb3_state::goldstar_fa00_w)); // hack (connected to ppi output port?, needed for colour banking)
+
+ map(0xf830, 0xf830).rw("aysnd", FUNC(ay8910_device::data_r), FUNC(ay8910_device::data_w));
+ map(0xf840, 0xf840).w("aysnd", FUNC(ay8910_device::address_w));
+ map(0xf850, 0xf850).w(FUNC(cb3_state::p1_lamps_w)); /* Control Set 1 lamps */
+ map(0xf860, 0xf860).w(FUNC(cb3_state::p2_lamps_w)); /* Control Set 2 lamps */
+ map(0xf870, 0xf870).w("snsnd", FUNC(sn76489_device::write)); /* guess... device is initialized, but doesn't seems to be used.*/
+}
+
+void cb3_state::chryangla_decrypted_opcodes_map(address_map &map)
+{
+ map(0x0000, 0xbfff).rom().share("decrypted_opcodes");
+ map(0xf800, 0xffff).ram();
+}
+
void goldstar_state::ncb3_readwriteport(address_map &map)
{
map.global_mask(0xff);
@@ -674,7 +705,6 @@ void goldstar_state::ncb3_readwriteport(address_map &map)
*/
-
void goldstar_state::wcherry_map(address_map &map)
{
map(0x0000, 0xb7ff).rom();
@@ -817,6 +847,11 @@ void cmaster_state::cm_portmap(address_map &map)
map(0x14, 0x14).w(FUNC(cmaster_state::girl_scroll_w));
}
+void cmaster_state::chryangl_decrypted_opcodes_map(address_map &map)
+{
+ map(0x0000, 0xf7ff).rom().share("decrypted_opcodes");
+ map(0xf800, 0xffff).ram();
+}
void goldstar_state::pkrmast_portmap(address_map &map)
{
@@ -8695,6 +8730,16 @@ void cb3_state::cb3e(machine_config &config)
m_gfxdecode->set_info(gfx_cb3e);
}
+void cb3_state::chryangla(machine_config &config)
+{
+ ncb3(config);
+
+ m_maincpu->set_addrmap(AS_PROGRAM, &cb3_state::chryangla_map);
+ m_maincpu->set_addrmap(AS_OPCODES, &cb3_state::chryangla_decrypted_opcodes_map);
+
+ m_palette->set_init(FUNC(goldstar_state::lucky8_palette));
+}
+
void cb3_state::chrygld(machine_config &config)
{
ncb3(config);
@@ -8806,6 +8851,12 @@ void cmaster_state::cmasterc(machine_config &config)
m_gfxdecode->set_info(gfx_cmasterc);
}
+void cmaster_state::chryangl(machine_config &config)
+{
+ cm(config);
+
+ m_maincpu->set_addrmap(AS_OPCODES, &cmaster_state::chryangl_decrypted_opcodes_map);
+}
void goldstar_state::cmast91(machine_config &config)
{
@@ -15960,7 +16011,7 @@ void goldstar_state::init_goldstar()
void goldstar_state::init_jkrmast()
{
uint8_t *ROM = memregion("maincpu")->base();
-
+
for (int A = 0; A < 0x8000; A++)
{
uint8_t x = ROM[A];
@@ -16086,6 +16137,47 @@ void cb3_state::init_cb3()
dump_to_file(ROM);
}
+void goldstar_state::init_chryangl()
+{
+ uint8_t *ROM = memregion("maincpu")->base();
+
+ for (int i = 0; i < 0x10000; i++)
+ {
+ uint8_t x = ROM[i];
+
+ switch (i & 0x83)
+ {
+ case 0x00: x = bitswap<8>(x ^ 0x80, 1, 6, 7, 4, 5, 2, 3, 0); break;
+ case 0x01: x = bitswap<8>(x ^ 0xa0, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ case 0x02: x = bitswap<8>(x ^ 0x02, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ case 0x03: x = bitswap<8>(x ^ 0xa0, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x80: x = bitswap<8>(x ^ 0x82, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x81: x = bitswap<8>(x ^ 0x02, 1, 6, 7, 4, 5, 2, 3, 0); break;
+ case 0x82: x = bitswap<8>(x ^ 0x08, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x83: x = bitswap<8>(x ^ 0x80, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ }
+
+ m_decrypted_opcodes[i] = x;
+ }
+
+ for (int i = 0; i < 0x10000; i++)
+ {
+ uint8_t x = ROM[i];
+ switch (i & 0x83)
+ {
+ case 0x00: x = bitswap<8>(x ^ 0x22, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x01: x = bitswap<8>(x ^ 0x2a, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ case 0x02: x = bitswap<8>(x ^ 0x82, 1, 6, 7, 4, 5, 2, 3, 0); break;
+ case 0x03: x = bitswap<8>(x ^ 0x2a, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x80: x = bitswap<8>(x ^ 0xa8, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ case 0x81: x = bitswap<8>(x ^ 0x88, 3, 6, 1, 4, 7, 2, 5, 0); break;
+ case 0x82: x = bitswap<8>(x ^ 0x22, 5, 6, 3, 4, 1, 2, 7, 0); break;
+ case 0x83: x = bitswap<8>(x ^ 0x88, 1, 6, 7, 4, 5, 2, 3, 0); break;
+ }
+
+ ROM[i] = x;
+ }
+}
void cb3_state::init_chrygld()
{
@@ -16750,11 +16842,12 @@ GAME( 199?, cb3c, ncb3, cb3c, chrygld, cb3_state, init_cb3,
GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, cb3_state, empty_init, ROT0, "bootleg", "Cherry Bonus III (set 3)", 0, layout_cherryb3 )
GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, init_cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_chrygld )
GAMEL( 199?, chryglda, ncb3, cb3e, chrygld, cb3_state, init_cb3e, ROT0, "bootleg", "Cherry Gold I (set 2, encrypted bootleg)", 0, layout_chrygld ) // Runs in CB3e hardware.
+GAME( 1994, chryangla, ncb3, chryangla,ncb3, cb3_state, init_chryangl, ROT0, "bootleg (G.C.I.)", "Cherry Angel (encrypted, W-4 hardware)", MACHINE_NOT_WORKING ) // DYNA CB3 V1.40 string, decrypted but only test screens work
GAME( 1996, cmast97, ncb3, cm97, chrygld, cb3_state, empty_init, ROT0, "Dyna", "Cherry Master '97", MACHINE_NOT_WORKING) // fix prom decode
// looks like a hack of Cherry Bonus 3
-GAME( 199?, chryangl, ncb3, cm, chryangl, cmaster_state, init_cmv4, ROT0, "<unknown>", "Cherry Angel", MACHINE_NOT_WORKING )
+GAME( 1994, chryangl, ncb3, chryangl, chryangl, cmaster_state, init_chryangl, ROT0, "bootleg (G.C.I.)", "Cherry Angel", MACHINE_NOT_WORKING ) // SKY SUPERCB 1.0 string, decrypted but hangs when betting
// cherry master hardware has a rather different mem map, but is basically the same
@@ -16809,7 +16902,6 @@ GAMEL( 198?, ns8linew, ns8lines, lucky8, ns8linew, wingco_state, empty_init
GAMEL( 198?, ns8linewa, ns8lines, lucky8, ns8linwa, wingco_state, empty_init, ROT0, "<unknown>", "New Lucky 8 Lines / New Super 8 Lines (W-4, Witch Bonus)", 0, layout_lucky8p1 ) // only 1 control set...
GAMEL( 198?, super972, ns8lines, lucky8, ns8linew, wingco_state, empty_init, ROT0, "<unknown>", "Super 97-2 (Witch Bonus)", MACHINE_NOT_WORKING, layout_lucky8 ) // ???
GAME( 198?, luckybar, 0, lucky8, ns8linew, wingco_state, empty_init, ROT0, "<unknown>", "Lucky Bar (W-4 with mc68705 MCU)", MACHINE_NOT_WORKING ) // MC68705 MCU
-GAME( 198?, chryangla, ncb3, lucky8, ns8linew, wingco_state, empty_init, ROT0, "<unknown>", "Cherry Angel (encrypted, W-4 hardware)", MACHINE_NOT_WORKING )
GAMEL( 198?, kkotnoli, 0, kkotnoli, kkotnoli, goldstar_state, empty_init, ROT0, "hack", "Kkot No Li (Kill the Bees)", MACHINE_IMPERFECT_COLORS, layout_lucky8 )
GAME( 198?, ladylinr, 0, ladylinr, ladylinr, goldstar_state, empty_init, ROT0, "TAB Austria", "Lady Liner", 0 )
GAME( 198?, wcat3, 0, wcat3, lucky8, wingco_state, empty_init, ROT0, "E.A.I.", "Wild Cat 3", MACHINE_NOT_WORKING )