From db964f13cf1065b378efcc4314e5e21dfd524e12 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 6 Oct 2023 22:05:15 -0400 Subject: Revert fb32ae8e8f88669620ba973845ef192fdc5ea26e --- src/mame/pc/tandy1t.cpp | 2 +- src/mame/subsino/subsino.cpp | 255 +++++++++++++++++++++++-------------------- 2 files changed, 137 insertions(+), 120 deletions(-) diff --git a/src/mame/pc/tandy1t.cpp b/src/mame/pc/tandy1t.cpp index 5371e9ad90b..011fd551e2e 100644 --- a/src/mame/pc/tandy1t.cpp +++ b/src/mame/pc/tandy1t.cpp @@ -487,7 +487,7 @@ void tandy1000_state::tandy1000_bank_w(offs_t offset, uint8_t data) static INPUT_PORTS_START( t1000 ) PORT_START("IN0") /* IN0 */ PORT_BIT ( 0xf0, 0xf0, IPT_UNUSED ) - PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("pcvideo_t1000:screen", screen_device, vblank) + PORT_BIT ( 0x08, 0x08, IPT_CUSTOM ) PORT_VBLANK("pcvideo_t1000:screen") PORT_BIT ( 0x07, 0x07, IPT_UNUSED ) PORT_START("DSW0") /* IN1 */ diff --git a/src/mame/subsino/subsino.cpp b/src/mame/subsino/subsino.cpp index af10fbf9ded..a82ead5c1d2 100644 --- a/src/mame/subsino/subsino.cpp +++ b/src/mame/subsino/subsino.cpp @@ -288,7 +288,9 @@ public: void init_crsbingo(); void init_victor21(); void init_victor5(); + void init_tisuba(); void init_tisubb(); + void init_newhunter(); void init_sharkpye(); void init_tisub(); void init_mtrainnv(); @@ -326,7 +328,6 @@ private: uint8_t flash_r(); void flash_w(uint8_t data); uint8_t hwcheck_r(); - uint8_t out_c_r(); void out_c_w(uint8_t data); void reel_scrollattr_w(offs_t offset, uint8_t data); uint8_t reel_scrollattr_r(offs_t offset); @@ -936,41 +937,36 @@ uint8_t subsino_state::hwcheck_r() void subsino_state::crsbingo_map(address_map &map) { - map(0x06000, 0x0d7ff).rom().region("program", 0x4000); + map(0x00000, 0x8fff).rom(); //overlap unmapped regions - map(0x0f800, 0x0ffff).ram(); - - map(0x0f000, 0x0f000).portr("SW1"); - map(0x0f001, 0x0f001).portr("SW2"); - map(0x0f002, 0x0f002).portr("INA"); - map(0x0f003, 0x0f003).portr("INB"); - map(0x0f004, 0x0f004).portr("INC"); - map(0x0f005, 0x0f005).w(FUNC(subsino_state::out_a_w)); + map(0x09800, 0x09fff).ram(); - map(0x0f008, 0x0f008).portr("SW4"); - map(0x0f009, 0x0f009).portr("SW3"); // .w(FUNC(subsino_state::out_a_w)); - map(0x0f00a, 0x0f00a).rw(FUNC(subsino_state::hwcheck_r), FUNC(subsino_state::out_b_w)); + map(0x09000, 0x09000).portr("SW1"); + map(0x09001, 0x09001).portr("SW2"); + map(0x09002, 0x09002).portr("INA"); + map(0x09003, 0x09003).portr("INB"); + map(0x09004, 0x09004).portr("INC"); + map(0x09005, 0x09005).w(FUNC(subsino_state::out_a_w)); - map(0x0f010, 0x0f010).rw(FUNC(subsino_state::flash_r), FUNC(subsino_state::flash_w)); -// map(0x0f011, 0x0f011) //"flash" status, bit 0 -// map(0x0f00c, 0x0f00c).portr("INC"); - map(0x0f00c, 0x0f00d).w("ymsnd", FUNC(ym2413_device::write)); + map(0x09008, 0x09008).portr("SW4"); + map(0x09009, 0x09009).portr("SW3"); // .w(FUNC(subsino_state::out_a_w)); + map(0x0900a, 0x0900a).rw(FUNC(subsino_state::hwcheck_r), FUNC(subsino_state::out_b_w)); -// map(0x0f018, 0x0f018).w("oki", FUNC(okim6295_device::write)); + map(0x09010, 0x09010).rw(FUNC(subsino_state::flash_r), FUNC(subsino_state::flash_w)); +// map(0x09011, 0x09011) //"flash" status, bit 0 +// map(0x0900c, 0x0900c).portr("INC"); + map(0x0900c, 0x0900d).w("ymsnd", FUNC(ym2413_device::write)); -// map(0x0f00d, 0x0f00d).w(FUNC(subsino_state::tiles_offset_w)); +// map(0x09018, 0x09018).w("oki", FUNC(okim6295_device::write)); - map(0x0d800, 0x0dfff).ram(); - map(0x0e000, 0x0e7ff).ram().w(FUNC(subsino_state::videoram_w)).share("videoram"); - map(0x0e800, 0x0efff).ram().w(FUNC(subsino_state::colorram_w)).share("colorram"); +// map(0x0900d, 0x0900d).w(FUNC(subsino_state::tiles_offset_w)); - map(0x10000, 0x13fff).rom().region("program", 0); //overlap unmapped regions + map(0x07800, 0x07fff).ram(); + map(0x08000, 0x087ff).ram().w(FUNC(subsino_state::videoram_w)).share("videoram"); + map(0x08800, 0x08fff).ram().w(FUNC(subsino_state::colorram_w)).share("colorram"); -} + map(0x10000, 0x13fff).rom(); //overlap unmapped regions -uint8_t subsino_state::out_c_r() -{ - return m_out_c; } void subsino_state::out_c_w(uint8_t data) @@ -989,39 +985,39 @@ void subsino_state::out_c_w(uint8_t data) void subsino_state::tisub_map(address_map &map) { - map(0x06000, 0x0d7ff).rom().region("program", 0x4000); - map(0x0f800, 0x0ffff).ram(); + map(0x00000, 0x0bfff).rom(); // overlap unmapped regions + map(0x09800, 0x09fff).ram(); - map(0x0f000, 0x0f002).r("ppi1", FUNC(i8255_device::read)); - map(0x0f004, 0x0f006).r("ppi2", FUNC(i8255_device::read)); + map(0x09000, 0x09002).r("ppi1", FUNC(i8255_device::read)); + map(0x09004, 0x09006).r("ppi2", FUNC(i8255_device::read)); - // 0x0f008: is marked as OUTPUT C in the test mode. - map(0x0f008, 0x0f008).rw(FUNC(subsino_state::out_c_r), FUNC(subsino_state::out_c_w)); - map(0x0f009, 0x0f009).w(FUNC(subsino_state::out_b_w)); - map(0x0f00a, 0x0f00a).w(FUNC(subsino_state::out_a_w)); + // 0x09008: is marked as OUTPUT C in the test mode. + map(0x09008, 0x09008).w(FUNC(subsino_state::out_c_w)); + map(0x09009, 0x09009).w(FUNC(subsino_state::out_b_w)); + map(0x0900a, 0x0900a).w(FUNC(subsino_state::out_a_w)); - map(0x0f00c, 0x0f00c).portr("INC"); + map(0x0900c, 0x0900c).portr("INC"); - map(0x0f016, 0x0f017).w("ymsnd", FUNC(ym3812_device::write)); + map(0x09016, 0x09017).w("ymsnd", FUNC(ym3812_device::write)); -// map(0x0f00c, 0x0f00c).w("oki", FUNC(okim6295_device::write)); +// map(0x0900c, 0x0900c).w("oki", FUNC(okim6295_device::write)); - map(0x0f01b, 0x0f01b).w(FUNC(subsino_state::tiles_offset_w)); + map(0x0901b, 0x0901b).w(FUNC(subsino_state::tiles_offset_w)); - map(0x0d800, 0x0dfff).ram(); - map(0x0e800, 0x0efff).ram().w(FUNC(subsino_state::videoram_w)).share("videoram"); - map(0x0e000, 0x0e7ff).ram().w(FUNC(subsino_state::colorram_w)).share("colorram"); + map(0x07800, 0x07fff).ram(); + map(0x08800, 0x08fff).ram().w(FUNC(subsino_state::videoram_w)).share("videoram"); + map(0x08000, 0x087ff).ram().w(FUNC(subsino_state::colorram_w)).share("colorram"); - map(0x10000, 0x13fff).rom().region("program", 0); - map(0x1d000, 0x1dfff).rom().region("program", 0xd000); // reads the card face data here + map(0x10000, 0x13fff).rom(); + map(0x14000, 0x14fff).rom(); // reads the card face data here (see rom copy in rom loading) - map(0x1e0c0, 0x1e0ff).ram().share("reel_scroll.2"); - map(0x1e140, 0x1e17f).ram().share("reel_scroll.1"); - map(0x1e180, 0x1e1bf).ram().share("reel_scroll.0"); + map(0x150c0, 0x150ff).ram().share("reel_scroll.2"); + map(0x15140, 0x1517f).ram().share("reel_scroll.1"); + map(0x15180, 0x151bf).ram().share("reel_scroll.0"); - map(0x1e800, 0x1e9ff).ram().w(FUNC(subsino_state::reel_ram_w<0>)).share("reel_ram.0"); - map(0x1ea00, 0x1ebff).ram().w(FUNC(subsino_state::reel_ram_w<1>)).share("reel_ram.1"); - map(0x1ec00, 0x1edff).ram().w(FUNC(subsino_state::reel_ram_w<2>)).share("reel_ram.2"); + map(0x15800, 0x159ff).ram().w(FUNC(subsino_state::reel_ram_w<0>)).share("reel_ram.0"); + map(0x15a00, 0x15bff).ram().w(FUNC(subsino_state::reel_ram_w<1>)).share("reel_ram.1"); + map(0x15c00, 0x15dff).ram().w(FUNC(subsino_state::reel_ram_w<2>)).share("reel_ram.2"); } void subsino_state::ramdac_map(address_map &map) @@ -3155,18 +3151,10 @@ ROM_END ***************************************************************************/ ROM_START( tisub ) - ROM_REGION( 0x4000, "maincpu", 0 ) - ROM_FILL( 0x0000, 1, 0x3e ) - ROM_FILL( 0x0001, 1, 0x01 ) - ROM_FILL( 0x0002, 1, 0xed ) - ROM_FILL( 0x0003, 1, 0x39 ) - ROM_FILL( 0x0004, 1, 0x38 ) - ROM_FILL( 0x0005, 1, 0xc3 ) - ROM_FILL( 0x0006, 1, 0x16 ) - ROM_FILL( 0x0007, 1, 0xf0 ) - - ROM_REGION( 0x10000, "program", 0 ) - ROM_LOAD( "rom_1.bin", 0x00000, 0x10000, CRC(ed3b4a69) SHA1(c57985e8d19b2b495fc768e52b83cbbd75f027ad) ) + ROM_REGION( 0x18000, "maincpu", 0 ) + ROM_LOAD( "rom_1.bin", 0x10000, 0x4000, CRC(ed3b4a69) SHA1(c57985e8d19b2b495fc768e52b83cbbd75f027ad) ) + ROM_CONTINUE(0x0000,0xc000) + ROM_COPY( "maincpu", 0x09000, 0x14000, 0x1000) ROM_REGION( 0x40000, "tilemap", 0 ) ROM_LOAD( "rom_6.bin", 0x00000, 0x10000, CRC(c2c226df) SHA1(39762b390d6b271c3252342e843a181dd152a0cc) ) @@ -3203,18 +3191,10 @@ ROM_END */ ROM_START( tisuba ) - ROM_REGION( 0x4000, "maincpu", 0 ) - ROM_FILL( 0x0000, 1, 0x3e ) - ROM_FILL( 0x0001, 1, 0x01 ) - ROM_FILL( 0x0002, 1, 0xed ) - ROM_FILL( 0x0003, 1, 0x39 ) - ROM_FILL( 0x0004, 1, 0x38 ) - ROM_FILL( 0x0005, 1, 0xc3 ) - ROM_FILL( 0x0006, 1, 0x16 ) - ROM_FILL( 0x0007, 1, 0xf0 ) - - ROM_REGION( 0x10000, "program", 0 ) - ROM_LOAD( "01.bin", 0x00000, 0x10000, CRC(9967dd38) SHA1(63b74bc0c0952114b7321e8f399bd64dc293aade) ) + ROM_REGION( 0x18000, "maincpu", 0 ) + ROM_LOAD( "01.bin", 0x10000, 0x4000, CRC(9967dd38) SHA1(63b74bc0c0952114b7321e8f399bd64dc293aade) ) + ROM_CONTINUE(0x0000,0xc000) + ROM_COPY( "maincpu", 0x09000, 0x14000, 0x1000) ROM_REGION( 0x40000, "tilemap", 0 ) ROM_LOAD( "rom_6.bin", 0x00000, 0x10000, CRC(c2c226df) SHA1(39762b390d6b271c3252342e843a181dd152a0cc) ) @@ -3235,18 +3215,10 @@ ROM_START( tisuba ) ROM_END ROM_START( tisubb ) - ROM_REGION( 0x4000, "maincpu", 0 ) - ROM_FILL( 0x0000, 1, 0x3e ) - ROM_FILL( 0x0001, 1, 0x01 ) - ROM_FILL( 0x0002, 1, 0xed ) - ROM_FILL( 0x0003, 1, 0x39 ) - ROM_FILL( 0x0004, 1, 0x38 ) - ROM_FILL( 0x0005, 1, 0xc3 ) - ROM_FILL( 0x0006, 1, 0x16 ) - ROM_FILL( 0x0007, 1, 0xf0 ) - - ROM_REGION( 0x10000, "program", 0 ) - ROM_LOAD( "ti alpha rom_1 ver3.0n.u6", 0x00000, 0x10000, CRC(7f0756cc) SHA1(e383b6abea136b79acabbffd9d247cc51c9aaa85) ) + ROM_REGION( 0x18000, "maincpu", 0 ) + ROM_LOAD( "ti alpha rom_1 ver3.0n.u6", 0x10000, 0x4000, CRC(7f0756cc) SHA1(e383b6abea136b79acabbffd9d247cc51c9aaa85) ) + ROM_CONTINUE(0x0000, 0xc000) + ROM_COPY( "maincpu", 0x09000, 0x14000, 0x1000) ROM_REGION( 0x40000, "tilemap", 0 ) ROM_LOAD( "ti alpha rom_6 ver1.1.u43", 0x00000, 0x10000, CRC(e7abd3b6) SHA1(bb22161b6c082d3ea0c80e0ff413bc43edd6e678) ) @@ -3267,20 +3239,14 @@ ROM_START( tisubb ) ROM_END ROM_START( newhunter ) - // The MCU had its surface scratched out, but almost sure it's an HD647180X0CP8L - ROM_REGION( 0x4000, "maincpu", 0 ) + // The MCU had its surface scratched out, but almost sure it's an HD647180X0CP8L + ROM_REGION( 0x04000, "mcu", 0 ) ROM_LOAD( "hd647180.bin", 0x00000, 0x04000, NO_DUMP ) - ROM_FILL( 0x0000, 1, 0x3e ) - ROM_FILL( 0x0001, 1, 0x01 ) - ROM_FILL( 0x0002, 1, 0xed ) - ROM_FILL( 0x0003, 1, 0x39 ) - ROM_FILL( 0x0004, 1, 0x38 ) - ROM_FILL( 0x0005, 1, 0xc3 ) - ROM_FILL( 0x0006, 1, 0x16 ) - ROM_FILL( 0x0007, 1, 0xf0 ) - - ROM_REGION( 0x10000, "program", 0 ) - ROM_LOAD( "27c512.u18", 0x00000, 0x10000, CRC(d0d863a7) SHA1(0ee5ee04c3da83320bea8130be30f7fe6446b32f) ) + + ROM_REGION( 0x18000, "maincpu", 0 ) + ROM_LOAD( "27c512.u18", 0x10000, 0x04000, CRC(d0d863a7) SHA1(0ee5ee04c3da83320bea8130be30f7fe6446b32f) ) + ROM_CONTINUE( 0x00000, 0x0c000 ) + ROM_COPY( "maincpu", 0x09000, 0x14000, 0x1000) ROM_REGION( 0x40000, "tilemap", 0 ) ROM_LOAD( "d27c010a.u16", 0x00000, 0x08000, CRC(c1daa20f) SHA1(c46278a00b6cbbd79c4184db910bf2770d77d92f) ) @@ -3353,18 +3319,9 @@ Info by f205v (14/12/2008) ***************************************************************************/ ROM_START( crsbingo ) - ROM_REGION( 0x4000, "maincpu", 0 ) - ROM_FILL( 0x0000, 1, 0x3e ) - ROM_FILL( 0x0001, 1, 0x01 ) - ROM_FILL( 0x0002, 1, 0xed ) - ROM_FILL( 0x0003, 1, 0x39 ) - ROM_FILL( 0x0004, 1, 0x38 ) - ROM_FILL( 0x0005, 1, 0xc3 ) - ROM_FILL( 0x0006, 1, 0x16 ) - ROM_FILL( 0x0007, 1, 0xf0 ) - - ROM_REGION( 0x10000, "program", 0 ) - ROM_LOAD( "1.u36", 0x00000, 0x10000, CRC(c5aff4eb) SHA1(74f06d7735975657fca9be5fff9e7d53f38fcd02) ) + ROM_REGION( 0x14000, "maincpu", 0 ) + ROM_LOAD( "1.u36", 0x10000, 0x4000, CRC(c5aff4eb) SHA1(74f06d7735975657fca9be5fff9e7d53f38fcd02) ) + ROM_CONTINUE(0x0000,0xc000) ROM_REGION( 0x20000, "tilemap", 0 ) ROM_LOAD( "2.u4", 0x00000, 0x10000, CRC(ce527722) SHA1(f3759cefab902259eb25f8d4be2fcafc1afd90b9) ) @@ -4008,8 +3965,8 @@ void subsino_state::init_victor21() void subsino_state::init_crsbingo() { - uint8_t *rom = memregion( "program" )->base() + 0x4000; - subsino_decrypt(rom, crsbingo_bitswaps, crsbingo_xors, 0x8000); + uint8_t *rom = memregion( "maincpu" )->base(); + subsino_decrypt(rom, crsbingo_bitswaps, crsbingo_xors, 0xc000); m_flash_packet = 0; m_flash_packet_start = 0; @@ -4046,14 +4003,74 @@ void subsino_state::init_smoto13() void subsino_state::init_tisub() { - uint8_t *rom = memregion( "program" )->base() + 0x4000; - subsino_decrypt(rom, victor5_bitswaps, victor5_xors, 0x8000); + uint8_t *rom = memregion( "maincpu" )->base(); + subsino_decrypt(rom, victor5_bitswaps, victor5_xors, 0xc000); + + // this trips a z180 MMU core bug? It unmaps a region then the program code jumps to that region... + rom[0x64c8] = 0x00; + rom[0x64c9] = 0x00; + rom[0x64ca] = 0x00; + rom[0x64cd] = 0x00; + rom[0x64ce] = 0x00; + rom[0x64cf] = 0x00; +} + +void subsino_state::init_tisuba() +{ + uint8_t *rom = memregion( "maincpu" )->base(); + subsino_decrypt(rom, victor5_bitswaps, victor5_xors, 0xc000); + + // this trips a z180 MMU core bug? It unmaps a region then the program code jumps to that region... + rom[0x6491] = 0x00; + rom[0x6492] = 0x00; + rom[0x6493] = 0x00; + rom[0x6496] = 0x00; + rom[0x6497] = 0x00; + rom[0x6498] = 0x00; } void subsino_state::init_tisubb() { - uint8_t *rom = memregion( "maincpu" )->base() + 0x4000; - subsino_decrypt(rom, tisubb_bitswaps, tisubb_xors, 0x8000); + uint8_t *rom = memregion( "maincpu" )->base(); + subsino_decrypt(rom, tisubb_bitswaps, tisubb_xors, 0xc000); + + // this trips a z180 MMU core bug? It unmaps a region then the program code jumps to that region... + rom[0x60da] = 0x00; + rom[0x60db] = 0x00; + rom[0x60dc] = 0x00; + rom[0x60df] = 0x00; + rom[0x60e0] = 0x00; + rom[0x60e1] = 0x00; + + m_flash_packet = 0; + m_flash_packet_start = 0; + m_flash_val = 0; + + save_item(NAME(m_flash_packet)); + save_item(NAME(m_flash_packet_start)); + save_item(NAME(m_flash_val)); +} + +void subsino_state::init_newhunter() +{ + uint8_t *rom = memregion( "maincpu" )->base(); + subsino_decrypt(rom, tisubb_bitswaps, tisubb_xors, 0xc000); + + // This trips a z180 MMU core bug? It unmaps a region then the program code jumps to that region... + rom[0x5fe1] = 0x00; + rom[0x5fe2] = 0x00; + rom[0x5fe3] = 0x00; + rom[0x5fe6] = 0x00; + rom[0x5fe7] = 0x00; + rom[0x5fe8] = 0x00; + + m_flash_packet = 0; + m_flash_packet_start = 0; + m_flash_val = 0; + + save_item(NAME(m_flash_packet)); + save_item(NAME(m_flash_packet_start)); + save_item(NAME(m_flash_val)); } void subsino_state::init_stbsub() @@ -4150,9 +4167,9 @@ GAMEL( 1991, victor5, 0, victor5, victor5, subsino_state, init_victo GAMEL( 1991, victor5a, victor5, victor5, victor5, subsino_state, init_victor5, ROT0, "Subsino", "G.E.A.", 0, layout_victor5 ) // PCB black-box was marked 'victor 5' - in-game says G.E.A with no manufacturer info? GAMEL( 1992, tisub, 0, tisub, tisub, subsino_state, init_tisub, ROT0, "Subsino", "Treasure Island (Subsino, set 1)", 0, layout_tisub ) -GAMEL( 1992, tisuba, tisub, tisub, tisub, subsino_state, init_tisub, ROT0, "Subsino", "Treasure Island (Subsino, set 2)", 0, layout_tisub ) +GAMEL( 1992, tisuba, tisub, tisub, tisub, subsino_state, init_tisuba, ROT0, "Subsino", "Treasure Island (Subsino, set 2)", 0, layout_tisub ) GAMEL( 1992, tisubb, tisub, tisub, tisubb, subsino_state, init_tisubb, ROT0, "American Alpha", "Treasure Island (American Alpha, v3.0N)", 0, layout_tisubb ) -GAMEL( 1989, newhunter, tisub, tisub, tisub, subsino_state, init_tisubb, ROT0, "Karam", "New HUNTer", 0, layout_tisubb ) +GAMEL( 1989, newhunter, tisub, tisub, tisub, subsino_state, init_newhunter, ROT0, "Karam", "New HUNTer", 0, layout_tisubb ) GAMEL( 1991, crsbingo, 0, crsbingo, crsbingo, subsino_state, init_crsbingo, ROT0, "Subsino", "Poker Carnival", 0, layout_crsbingo ) -- cgit v1.2.3