From ff5d9d8ff5010be7b45d737549fc1fac0f26da6d Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 9 Dec 2021 14:43:55 +1100 Subject: spinb/inder.cpp: WIP. Moved metalman from inder to spinb. --- src/mame/drivers/inder.cpp | 96 ++--- src/mame/drivers/spinb.cpp | 945 +++++++++++++++++++++++++++++-------------- src/mame/layout/metalman.lay | 142 +++++++ 3 files changed, 803 insertions(+), 380 deletions(-) create mode 100644 src/mame/layout/metalman.lay diff --git a/src/mame/drivers/inder.cpp b/src/mame/drivers/inder.cpp index 4d45fee07aa..6b331766ae5 100644 --- a/src/mame/drivers/inder.cpp +++ b/src/mame/drivers/inder.cpp @@ -6,7 +6,7 @@ PINBALL Inder S.A. of Spain All manuals are in Spanish (including the 'English' ones), so some guesswork will be needed. -The schematics for Brave Team, Canasta, Metal Man are too blurry to read. +The schematics for Brave Team, Canasta are too blurry to read. Each game has different hardware. Note with switches: "Veleta" is normally closed. Order of dips on "new cpu" games: 3,2,1,0,4,5,6,7 (so SL1(1) uses bit 3 of input definition). @@ -26,11 +26,10 @@ Note switches to the next player, or ends. Status: -- All games are playable with sound, except Metal Man. +- All games are playable with sound. ToDo: - The "new cpu" machines are lacking mechanical sounds. The output bits vary per game. -- Metal Man: playable, very bad sound. It uses 2 speech cards which are different to the other games. - La Rana: playable. Needs its own layout. Inputs to be figured out. ********************************************************************************************************/ @@ -65,7 +64,7 @@ public: , m_9a(*this, "9a") , m_9b(*this, "9b") , m_13(*this, "13") - , m_p_speech(*this, "speech") + , m_p_audio(*this, "audiorom") , m_io_keyboard(*this, "X%d", 0U) , m_digits(*this, "digit%d", 0U) , m_io_outputs(*this, "out%d", 0U) @@ -78,7 +77,6 @@ public: void init_0(); void init_1(); - void init_2(); private: virtual void machine_reset() override; @@ -98,9 +96,7 @@ private: void ppi6ca_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[40U+i] = BIT(data, i); } void ppi6cb_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[48U+i] = BIT(data, i); } void ppi6cc_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[56U+i] = BIT(data, i); } - void extras_w(offs_t offset, u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[64U+offset*8+i] = BIT(data, i); } u8 sw_r(); - u8 ppi60b_r() { return 0xff; } // metalman checks bit 1 and hangs if not high void sw_w(offs_t offset, u8 data); void sol_brvteam_w(u8 data); void sol_canasta_w(u8 data); @@ -130,7 +126,7 @@ private: u8 m_sndcmd = 0; u8 m_sndbank = 0; u32 m_sound_addr = 0; - u32 m_speech_size = 0; + u32 m_audio_size = 0; required_device m_maincpu; optional_device m_audiocpu; @@ -140,10 +136,10 @@ private: optional_device m_9a; optional_device m_9b; optional_device m_13; - optional_region_ptr m_p_speech; + optional_region_ptr m_p_audio; required_ioport_array<11> m_io_keyboard; output_finder<50> m_digits; - output_finder<128> m_io_outputs; + output_finder<64> m_io_outputs; }; void inder_state::brvteam_map(address_map &map) @@ -205,7 +201,6 @@ void inder_state::main_map(address_map &map) map(0x6800, 0x6803).mirror(0x13fc).rw("ppi68", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x6c00, 0x6c03).mirror(0x131c).rw("ppi6c", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x6c20, 0x6c3f).mirror(0x1300).w(FUNC(inder_state::sndcmd_w)); - map(0x6c40, 0x6c47).mirror(0x1300).w(FUNC(inder_state::extras_w)); // metalman; presume some kind of output map(0x6c60, 0x6c7f).mirror(0x1300).w(FUNC(inder_state::disp_w)); map(0x6ce0, 0x6ce0).nopw(); } @@ -1039,8 +1034,7 @@ static INPUT_PORTS_START( ind250cc ) PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END -// wrong -static INPUT_PORTS_START( metalman ) +static INPUT_PORTS_START( larana ) // to be determined, need the manual PORT_START("X0") PORT_DIPNAME( 0x01, 0x00, "Coin control 1") PORT_DIPSETTING( 0x00, "Off") @@ -1254,14 +1248,11 @@ void inder_state::ppi64c_w(u8 data) data &= 15; if (BIT(data, 3)) // 8 to 15) { - if (m_game == 2) - data &= 7; // metalman - else - data ^= 15; // now 7 to 0 + data ^= 15; // now 7 to 0 for (i = 0; i < 5; i++) { - if (m_game && (i == 4)) // metalan,mundial,clown,250cc,atleta have credit and ball displays swapped + if (m_game && (i == 4)) // mundial,clown,250cc,atleta have credit and ball displays swapped data ^= 4; m_digits[i*10+data] = m_segment[i]; } @@ -1281,10 +1272,10 @@ void inder_state::sndbank_w(u8 data) void inder_state::update_mus() { - if (!m_speech_size) + if (!m_audio_size) return; - if ((m_sound_addr < m_speech_size) && (m_sndbank != 0xff)) - m_13->ba_w(m_p_speech[m_sound_addr]); + if ((m_sound_addr < m_audio_size) && (m_sndbank != 0xff)) + m_13->ba_w(m_p_audio[m_sound_addr]); else m_13->ba_w(0); } @@ -1315,21 +1306,20 @@ u8 inder_state::ppic_r() void inder_state::ppia_w(u8 data) { - m_sound_addr = (m_sound_addr & 0x3ff00) | data; + m_sound_addr = (m_sound_addr & 0xffff00) | data; update_mus(); } void inder_state::ppib_w(u8 data) { - m_sound_addr = (m_sound_addr & 0x300ff) | (data << 8); + m_sound_addr = (m_sound_addr & 0xff00ff) | (data << 8); update_mus(); } void inder_state::ppic_w(u8 data) { // pc4 - READY line back to cpu board, but not used - if (BIT(data, 5) != BIT(m_portc, 5)) - m_msm->set_prescaler_selector(BIT(data, 5) ? msm5205_device::S48_4B : msm5205_device::S96_4B); // S1 pin + m_msm->s1_w(BIT(data, 5)); m_7a->clock_w(BIT(data, 6)); m_7a->preset_w(!BIT(data, 7)); m_9a->preset_w(!BIT(data, 7)); @@ -1353,9 +1343,9 @@ void inder_state::machine_start() save_item(NAME(m_sndbank)); save_item(NAME(m_sound_addr)); - m_speech_size = 0; - if (memregion("speech")) - m_speech_size = memregion("speech")->bytes(); + m_audio_size = 0; + if (memregion("audiorom")) + m_audio_size = memregion("audiorom")->bytes(); } void inder_state::machine_reset() @@ -1392,12 +1382,6 @@ void inder_state::init_1() m_game = 1; } -void inder_state::init_2() -{ - init_0(); - m_game = 2; -} - void inder_state::brvteam(machine_config &config) { // basic machine hardware @@ -1481,14 +1465,13 @@ void inder_state::inder(machine_config &config) MSM5205(config, m_msm, 384_kHz_XTAL); m_msm->vck_callback().set(m_9a, FUNC(ttl7474_device::clock_w)); m_msm->vck_callback().append(m_9b, FUNC(ttl7474_device::clock_w)); // order of writes is sensitive - m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 4KHz 4-bit + m_msm->set_prescaler_selector(msm5205_device::S96_4B); // 4KHz 4-bit m_msm->add_route(ALL_OUTPUTS, "msmvol", 1.0); // Devices i8255_device &ppi60(I8255A(config, "ppi60")); ppi60.out_pa_callback().set(FUNC(inder_state::ppi60a_w)); ppi60.out_pb_callback().set(FUNC(inder_state::ppi60b_w)); - ppi60.in_pb_callback().set(FUNC(inder_state::ppi60b_r)); ppi60.in_pc_callback().set(FUNC(inder_state::sw_r)); i8255_device &ppi64(I8255A(config, "ppi64")); @@ -1566,7 +1549,7 @@ ROM_START(pinmoonl) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("ci-11.bin", 0x0000, 0x2000, CRC(a0732fe4) SHA1(54f62cd81bdb7e1924acb67ddbe43eb3d0a4eab0)) - ROM_REGION(0x40000, "speech", 0) + ROM_REGION(0x40000, "audiorom", 0) ROM_LOAD("ci-24.bin", 0x00000, 0x10000, CRC(6406bd18) SHA1(ae45ed9e8b1fd278a36a68b780352dbbb6ee781e)) ROM_LOAD("ci-23.bin", 0x10000, 0x10000, CRC(eac346da) SHA1(7c4c26ae089dda0dcd7300fd1ecabf5a91099c41)) ROM_LOAD("ci-22.bin", 0x20000, 0x10000, CRC(379740da) SHA1(83ad13ab7f1f37c78397d8e830bd74c5a7aea758)) @@ -1583,7 +1566,7 @@ ROM_START(pinclown) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("clown_b.bin", 0x0000, 0x2000, CRC(c223c961) SHA1(ed5180505b6ebbfb9451f67a44d07df3555c8f8d)) - ROM_REGION(0x40000, "speech", 0) + ROM_REGION(0x40000, "audiorom", 0) ROM_LOAD("clown_c.bin", 0x00000, 0x10000, CRC(dff89319) SHA1(3745a02c3755d11ea7fb552f7a5df2e8bbee2c29)) ROM_LOAD("clown_d.bin", 0x10000, 0x10000, CRC(cce4e1dc) SHA1(561c9331d2d110d34cf250cd7b25be16a72a1d79)) ROM_LOAD("clown_e.bin", 0x20000, 0x10000, CRC(98263526) SHA1(509764e65847637824ba93f7e6ce926501c431ce)) @@ -1600,7 +1583,7 @@ ROM_START(corsario) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("a-corsar.bin", 0x0000, 0x2000, CRC(e14b7918) SHA1(5a5fc308b0b70fe041b81071ba4820782b6ff988)) - ROM_REGION(0x40000, "speech", 0) + ROM_REGION(0x40000, "audiorom", 0) ROM_LOAD("b-corsar.bin", 0x00000, 0x10000, CRC(7f155828) SHA1(e459c81b2c2e47d4276344d8d6a08c2c6242f941)) ROM_LOAD("c-corsar.bin", 0x10000, 0x10000, CRC(047fd722) SHA1(2385507459f85c68141adc7084cb51dfa02462f6)) ROM_LOAD("d-corsar.bin", 0x20000, 0x10000, CRC(10d8b448) SHA1(ed1918e6c55eba07dde31b9755c9403e073cad98)) @@ -1617,7 +1600,7 @@ ROM_START(mundial) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("snd11.bin", 0x0000, 0x2000, CRC(2cebc1a5) SHA1(e0dae2b1ce31ff436b55ceb1ec71d39fc56694da)) - ROM_REGION(0x40000, "speech", 0) + ROM_REGION(0x40000, "audiorom", 0) ROM_LOAD("snd24.bin", 0x00000, 0x10000, CRC(603bfc3c) SHA1(8badd9731243270ce5b8003373ed09ec7eac6ca6)) ROM_LOAD("snd23.bin", 0x10000, 0x10000, CRC(2868ce6f) SHA1(317457763f764be08cbe6a5dd4008ba2257c9d78)) ROM_LOAD("snd22.bin", 0x20000, 0x10000, CRC(2559f874) SHA1(cbf57f29e394d5dc320e7dcbd2625f6c96412a06)) @@ -1635,7 +1618,7 @@ ROM_START(atleta) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("atletaa.snd", 0x0000, 0x2000, CRC(051c5329) SHA1(339115af4a2e3f1f2c31073cbed1842518d5916e)) - ROM_REGION(0x40000, "speech", 0) + ROM_REGION(0x40000, "audiorom", 0) ROM_LOAD("atletab.snd", 0x00000, 0x10000, CRC(7f155828) SHA1(e459c81b2c2e47d4276344d8d6a08c2c6242f941)) ROM_LOAD("atletac.snd", 0x10000, 0x10000, CRC(20456363) SHA1(b226400dac35dedc039a7e03cb525c6033b24ebc)) ROM_LOAD("atletad.snd", 0x20000, 0x10000, CRC(6518e3a4) SHA1(6b1d852005dabb76c7c65b87ecc9ee1422f16737)) @@ -1654,7 +1637,7 @@ ROM_START(larana) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("inder_sa_mod_la_rana_a_050690.bin", 0x0000, 0x2000, CRC(1513fd92) SHA1(6ca0723f5d7c86b844476a4830c8fc3744cbf918)) - ROM_REGION(0x10000, "speech", ROMREGION_ERASEFF) + ROM_REGION(0x10000, "audiorom", ROMREGION_ERASEFF) ROM_LOAD("inder_sa_mod_la_rana_b_200690.bin", 0x00000, 0x10000, CRC(3aaa7c7d) SHA1(4a8531b6859fc1f2a4bb63a51da35e9081b7e88b)) ROM_END @@ -1668,35 +1651,13 @@ ROM_START(ind250cc) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("a-250cc.bin", 0x0000, 0x2000, CRC(b64bdafb) SHA1(eab6d54d34b44187d454c1999e4bcf455183d5a0)) - ROM_REGION(0x40000, "speech", 0) + ROM_REGION(0x40000, "audiorom", 0) ROM_LOAD("b-250cc.bin", 0x00000, 0x10000, CRC(884c31c8) SHA1(23a838f1f0cb4905fa8552579b5452134f0fc9cc)) ROM_LOAD("c-250cc.bin", 0x10000, 0x10000, CRC(5a1dfa1d) SHA1(4957431d87be0bb6d27910b718f7b7edcd405fff)) ROM_LOAD("d-250cc.bin", 0x20000, 0x10000, CRC(a0940387) SHA1(0e06483e3e823bf4673d8e0bd120b0a6b802035d)) ROM_LOAD("e-250cc.bin", 0x30000, 0x10000, CRC(538b3274) SHA1(eb76c41a60199bb94aec4666222e405bbcc33494)) ROM_END -/*------------------------------------------------------------------- -/ Metal Man (1992) -/-------------------------------------------------------------------*/ -ROM_START(metalman) - ROM_REGION(0x4000, "maincpu", 0) - ROM_LOAD("cpu_0.bin", 0x0000, 0x2000, CRC(7fe4335b) SHA1(52ef2efa29337eebd8c2c9a8aec864356a6829b6)) - ROM_LOAD("cpu_1.bin", 0x2000, 0x2000, CRC(2cca735e) SHA1(6a76017dfbcac0d57fcec8f07f92d5e04dd3e00b)) - - ROM_REGION(0x2000, "audiocpu", 0) - ROM_LOAD("sound_e1.bin", 0x0000, 0x2000, CRC(55e889e8) SHA1(0a240868c1b17762588c0ed9a14f568a6e50f409)) - - ROM_REGION(0x20000, "speech", ROMREGION_ERASEFF) - ROM_LOAD("sound_e2.bin", 0x00000, 0x20000, CRC(5ac61535) SHA1(75b9a805f8639554251192e3777073c29952c78f)) - - ROM_REGION(0x2000, "audiocpu2", 0) - ROM_LOAD("sound_m1.bin", 0x0000, 0x2000, CRC(21a9ee1d) SHA1(d906ac7d6e741f05e81076a5be33fc763f0de9c1)) - - ROM_REGION(0x60000, "speech2", ROMREGION_ERASEFF) - ROM_LOAD("sound_m2.bin", 0x00000, 0x20000, CRC(349df1fe) SHA1(47e7ddbdc398396e40bb5340e5edcb8baf06c255)) - ROM_LOAD("sound_m3.bin", 0x40000, 0x20000, CRC(15ef1866) SHA1(4ffa3b29bf3c30a9a5bc622adde16a1a13833b22)) -ROM_END - } // Anonymous namespace @@ -1715,8 +1676,5 @@ GAME(1988, pinclown, 0, inder, pinclown, inder_state, init_1, ROT0, "Inder", GAME(1989, corsario, 0, inder, corsario, inder_state, init_1, ROT0, "Inder", "Corsario", MACHINE_IS_SKELETON_MECHANICAL ) GAME(1990, mundial, 0, inder, mundial, inder_state, init_1, ROT0, "Inder", "Mundial 90", MACHINE_IS_SKELETON_MECHANICAL ) GAME(1991, atleta, 0, inder, atleta, inder_state, init_1, ROT0, "Inder", "Atleta", MACHINE_IS_SKELETON_MECHANICAL ) -GAME(1991, larana, 0, inder, metalman, inder_state, init_0, ROT0, "Inder", "La Rana", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1991, larana, 0, inder, larana, inder_state, init_0, ROT0, "Inder", "La Rana", MACHINE_IS_SKELETON_MECHANICAL ) GAME(1992, ind250cc, 0, inder, ind250cc, inder_state, init_1, ROT0, "Inder", "250 CC", MACHINE_IS_SKELETON_MECHANICAL ) - -// new cpu board, uses 2x a later revision of msm5205 sound board -GAME(1992, metalman, 0, inder, metalman, inder_state, init_2, ROT0, "Inder", "Metal Man", MACHINE_IS_SKELETON_MECHANICAL ) diff --git a/src/mame/drivers/spinb.cpp b/src/mame/drivers/spinb.cpp index 0794e9bf27e..5091aa2c4c8 100644 --- a/src/mame/drivers/spinb.cpp +++ b/src/mame/drivers/spinb.cpp @@ -2,31 +2,36 @@ // copyright-holders:Robbbert /*************************************************************************************************** - PINBALL - Spinball (previously Inder) +PINBALL +Spinball (previously Inder) - Hardware is much the same as Inder, except the digital display is replaced by a DMD controlled by - a i8031. You need to pick "Pixel Aspect (4:1)" video option in the tab menu. +Hardware is much the same as Inder, except the digital display is replaced by a DMD controlled by + a i8031. - There are mistakes in the sound board schematic: IC14 pin12 goes to IC5 pin13 only. IC16 pin 22 - is the CS0 line only. So, they are not joined but are separate tracks. Also, according to PinMAME, - the outputs of IC11 are all wrong. They should be (from top to bottom): A16, A17, A18, NC, NC, - CS2, CS1, CS0. +Each machine has 2 identical sound card, each with different roms. One card plays music and the + other does effects. The first version of the cards uses MSM5205, this was upgraded to MSM6585 + (Jolly Park, Verne's World). - Also, very unobvious is the fact that PIA ports A and B are swapped around compared to the Inder - soundcard. +There are mistakes in the sound board schematic: IC14 pin12 goes to IC5 pin13 only. IC16 pin 22 + is the CS0 line only. So, they are not joined but are separate tracks. Also, according to PinMAME, + the outputs of IC11 are all wrong. They should be (from top to bottom): A16, A17, A18, NC, NC, + CS2, CS1, CS0. -Status -- Bushido: Displays Bushido logo. If you quickly press 5 you get a sound. -- Mach 2: Displays Mach2 logo. Makes a sound if 5 pressed -- Jolly Park: Displays the Spinball logo. After a few moments it plays music -- Verne's World: Display flashes for a second then goes blank. After a few moments music plays. +Also, very unobvious is the fact that PIA ports A and B are swapped around compared to the Inder + soundcard. -ToDo: -- Inputs and outputs (currently a copy of inder.c) -- DMD doesn't act on commands -- Electronic volume control on the music card +Status: +- Metal Man is the only playable machine. +- The other machines firstly need balls in the machine to get attract mode. After the ball begins, + then the playfield needs enabling. Each of these situations requires a key combination. +- mach2/a can start by pressing ASX together. +- vrnwrld can start by pressing ASDX together. +- jolypark can start by pressing ASDX together. +ToDo: +- Multiball games - find out the key combinations +- Bushidoa non-functional (bad maincpu rom?) +- Sounds are running at half speed. ****************************************************************************************************/ @@ -43,6 +48,7 @@ ToDo: #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "metalman.lh" class spinb_state : public genpin_class @@ -54,99 +60,118 @@ public: , m_audiocpu(*this, "audiocpu") , m_musiccpu(*this, "musiccpu") , m_dmdcpu(*this, "dmdcpu") + , m_p_audio(*this, "audiorom") + , m_p_music(*this, "musicrom") + , m_p_dmdcpu(*this, "dmdcpu") , m_msm_a(*this, "msm_a") , m_msm_m(*this, "msm_m") , m_ic5a(*this, "ic5a") , m_ic5m(*this, "ic5m") , m_ic14a(*this, "ic14a") , m_ic14m(*this, "ic14m") - , m_switches(*this, "SW.%u", 0) + , m_io_keyboard(*this, "X%d", 0U) + , m_digits(*this, "digit%d", 0U) + , m_io_outputs(*this, "out%d", 0U) { } void jolypark(machine_config &config); void vrnwrld(machine_config &config); void spinb(machine_config &config); + void metalman(machine_config &config); - void init_game0(); - void init_game1(); - void init_game2(); + void init_0() { m_game = 0; } + void init_1() { m_game = 1; } + void init_2() { m_game = 2; } + void init_3() { m_game = 3; } -protected: +private: virtual void machine_reset() override; virtual void machine_start() override; - -private: - void p1_w(uint8_t data); - uint8_t p3_r(); - void p3_w(uint8_t data); - uint8_t ppia_c_r(); - void ppia_a_w(uint8_t data); - void ppia_b_w(uint8_t data); - void ppia_c_w(uint8_t data); - uint8_t ppim_c_r(); - void ppim_a_w(uint8_t data); - void ppim_b_w(uint8_t data); - void ppim_c_w(uint8_t data); - void ppi60a_w(uint8_t data); - void ppi60b_w(uint8_t data); - void ppi64c_w(uint8_t data); - uint8_t sw_r(); - void dmdram_w(offs_t offset, uint8_t data); - uint8_t dmdram_r(offs_t offset); - uint8_t sndcmd_r(); - void sndbank_a_w(uint8_t data); - void sndbank_m_w(uint8_t data); - void sndcmd_w(uint8_t data); - void lamp_w(uint8_t data) { }; - void lamp1_w(uint8_t data) { }; - void volume_w(uint8_t data) { }; - void disp_w(uint8_t data); + void p1_w(u8 data); + u8 p3_r(); + void p3_w(u8 data); + u8 ppia_c_r(); + void ppia_a_w(u8 data); + void ppia_b_w(u8 data); + void ppia_c_w(u8 data); + u8 ppim_c_r(); + u8 ppi60b_r() { return BIT(m_return_status, 4) ? 0 : 2; } // metalman + u8 ppi64c_r(); + void ppim_a_w(u8 data); + void ppim_b_w(u8 data); + void ppim_c_w(u8 data); + void ppi60a_w(u8 data); + void ppi60b_w(u8 data); + void ppi64a_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[i] = BIT(data, i); } + void ppi64b_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[8U+i] = BIT(data, i); } + void ppi64c_w(u8 data); // metalman + void ppi68a_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[16U+i] = BIT(data, i); } + void ppi68b_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[24U+i] = BIT(data, i) ^ 1; } + void ppi68c_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[32U+i] = BIT(data, i); } + void ppi6ca_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[40U+i] = BIT(data, i); } + void ppi6cb_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[48U+i] = BIT(data, i); } + void ppi6cc_w(u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[56U+i] = BIT(data, i); } + void extras_w(offs_t offset, u8 data) { for (u8 i = 0; i < 8; i++) m_io_outputs[64U+offset*8+i] = BIT(data, i); } + u8 sw_r(); + void dmdram_w(offs_t offset, u8 data); + u8 dmdram_r(offs_t offset); + u8 sndcmd_r(); + void sndbank_a_w(u8 data); + void sndbank_m_w(u8 data); + void sndcmd_w(u8 data); + void volume_w(u8 data) { }; + void disp_w(offs_t, u8 data); + void update_sound_a(); + void update_sound_m(); DECLARE_WRITE_LINE_MEMBER(ic5a_w); DECLARE_WRITE_LINE_MEMBER(ic5m_w); void spinb_palette(palette_device &palette) const; - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void dmd_io(address_map &map); void dmd_mem(address_map &map); - void spinb_audio_map(address_map &map); + void audio_map(address_map &map); void spinb_map(address_map &map); - void spinb_music_map(address_map &map); + void music_map(address_map &map); void vrnwrld_map(address_map &map); - bool m_pc0a; - bool m_pc0m; - uint8_t m_game; - uint8_t m_portc_a; - uint8_t m_portc_m; - uint8_t m_row; - uint8_t m_p3; - uint8_t m_p32; - uint8_t m_dmdcmd; - uint8_t m_dmdbank; - uint8_t m_dmdextaddr; - uint8_t m_dmdram[0x2000]; - uint8_t m_sndcmd; - uint8_t m_sndbank_a; - uint8_t m_sndbank_m; - uint32_t m_sound_addr_a; - uint32_t m_sound_addr_m; - uint8_t *m_p_audio; - uint8_t *m_p_music; - uint8_t *m_p_dmdcpu; - void update_sound_a(); - void update_sound_m(); + bool m_pc0a = 0; + bool m_pc0m = 0; + u8 m_game = 0; + u8 m_row = 0; + u8 m_p3 = 0; + u8 m_p32 = 0; + u8 m_dmdcmd = 0; + u8 m_dmdbank = 0; + u8 m_dmdextaddr = 0; + u8 m_dmdram[0x2000]{}; + u8 m_sndcmd = 0; + u8 m_sndbank_a = 0; + u8 m_sndbank_m = 0; + u32 m_sound_addr_a = 0; + u32 m_sound_addr_m = 0; + u32 m_audio_size = 0; + u32 m_music_size = 0; + u32 m_dmd_size = 0; + u8 m_return_status = 0; + u8 m_segment[8]{}; // metalman required_device m_maincpu; required_device m_audiocpu; required_device m_musiccpu; - required_device m_dmdcpu; + optional_device m_dmdcpu; + required_region_ptr m_p_audio; + required_region_ptr m_p_music; + required_region_ptr m_p_dmdcpu; required_device m_msm_a; required_device m_msm_m; required_device m_ic5a; required_device m_ic5m; required_device m_ic14a; required_device m_ic14m; - required_ioport_array<11> m_switches; + required_ioport_array<10> m_io_keyboard; + output_finder<50> m_digits; + output_finder<112> m_io_outputs; }; void spinb_state::spinb_map(address_map &map) @@ -158,8 +183,8 @@ void spinb_state::spinb_map(address_map &map) map(0x6800, 0x6803).mirror(0x13fc).rw("ppi68", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x6c00, 0x6c03).mirror(0x131c).rw("ppi6c", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0x6c20, 0x6c3f).mirror(0x1300).w(FUNC(spinb_state::sndcmd_w)); - map(0x6c40, 0x6c45).mirror(0x1300).w(FUNC(spinb_state::lamp1_w)); - map(0x6c60, 0x6c60).mirror(0x1300).w(FUNC(spinb_state::disp_w)); + map(0x6c40, 0x6c45).mirror(0x1300).w(FUNC(spinb_state::extras_w)); + map(0x6c60, 0x6c67).mirror(0x1300).w(FUNC(spinb_state::disp_w)); map(0x6ce0, 0x6ce0).nopw(); } @@ -172,12 +197,12 @@ void spinb_state::vrnwrld_map(address_map &map) map(0xc800, 0xc803).mirror(0x13fc).rw("ppi68", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0xcc00, 0xcc03).mirror(0x131c).rw("ppi6c", FUNC(i8255_device::read), FUNC(i8255_device::write)); map(0xcc20, 0xcc3f).mirror(0x1300).w(FUNC(spinb_state::sndcmd_w)); - map(0xcc40, 0xcc45).mirror(0x1300).w(FUNC(spinb_state::lamp1_w)); + map(0xcc40, 0xcc45).mirror(0x1300).w(FUNC(spinb_state::extras_w)); map(0xcc60, 0xcc60).mirror(0x1300).w(FUNC(spinb_state::disp_w)); map(0xcce0, 0xcce0).nopw(); } -void spinb_state::spinb_audio_map(address_map &map) +void spinb_state::audio_map(address_map &map) { map(0x0000, 0x1fff).rom(); map(0x2000, 0x3fff).ram(); // 6164 @@ -186,7 +211,7 @@ void spinb_state::spinb_audio_map(address_map &map) map(0x8000, 0x8000).r(FUNC(spinb_state::sndcmd_r)); } -void spinb_state::spinb_music_map(address_map &map) +void spinb_state::music_map(address_map &map) { map(0x0000, 0x1fff).rom(); map(0x2000, 0x3fff).ram(); // 6164 @@ -208,99 +233,329 @@ void spinb_state::dmd_io(address_map &map) } static INPUT_PORTS_START( spinb ) - PORT_START("SW.0") - PORT_DIPNAME( 0x80, 0x80, "Balls") - PORT_DIPSETTING( 0x80, "3") - PORT_DIPSETTING( 0x00, "5") - PORT_DIPNAME( 0x30, 0x30, "Coin Slot 1") - PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C )) // slot 2: 1 moneda 4 partidas - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C )) // and 4c_3c; slot 2: 1 moneda 3 partidas - PORT_DIPNAME( 0x0c, 0x0c, "Points for free game") - PORT_DIPSETTING( 0x0c, "2600000") - PORT_DIPSETTING( 0x08, "3000000") - PORT_DIPSETTING( 0x04, "3400000") - PORT_DIPSETTING( 0x00, "3800000") - - PORT_START("SW.1") - PORT_DIPNAME( 0x30, 0x30, "High Score") //"Handicap" - PORT_DIPSETTING( 0x30, "4800000") - PORT_DIPSETTING( 0x20, "5000000") - PORT_DIPSETTING( 0x10, "5200000") - PORT_DIPSETTING( 0x00, "5400000") - PORT_DIPNAME( 0x08, 0x08, "Especial en Picabolas") - PORT_DIPSETTING( 0x08, "1st Derribo") - PORT_DIPSETTING( 0x00, "2nd Derribo") - PORT_DIPNAME( 0x04, 0x04, "Bola Extra En Rampas") - PORT_DIPSETTING( 0x04, "4 dianas") - PORT_DIPSETTING( 0x00, "2 dianas") - PORT_BIT( 0xc3, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("SW.2") - PORT_DIPNAME( 0x04, 0x04, "Quita bola extra en passillos 1,2,y 3") - PORT_DIPSETTING( 0x04, DEF_STR(No)) - PORT_DIPSETTING( 0x00, DEF_STR(Yes)) - PORT_BIT( 0xfb, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("SW.3") + PORT_START("X0") + PORT_DIPNAME( 0x01, 0x00, "Coin control 1") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x01, "On") + PORT_DIPNAME( 0x02, 0x00, "Coin control 2") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x02, "On") + PORT_DIPNAME( 0x04, 0x00, "Coin control 3") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x04, "On") + PORT_DIPNAME( 0x08, 0x00, "Coin control 4") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x08, "On") + PORT_DIPNAME( 0x30, 0x00, "Points for free game") + PORT_DIPSETTING( 0x00, "300 million") + PORT_DIPSETTING( 0x10, "400 million") + PORT_DIPSETTING( 0x20, "500 million") + PORT_DIPSETTING( 0x30, "600 million") + PORT_DIPNAME( 0x80, 0x00, "Selection Mode") + PORT_DIPSETTING( 0x00, "Normal") + PORT_DIPSETTING( 0x80, "Exhibition") + + PORT_START("X1") + PORT_DIPNAME( 0x08, 0x00, "Balls") + PORT_DIPSETTING( 0x00, "3") + PORT_DIPSETTING( 0x08, "5") + PORT_DIPNAME( 0x03, 0x00, "High Score") //"Handicap" + PORT_DIPSETTING( 0x00, "700 million") + PORT_DIPSETTING( 0x01, "750 million") + PORT_DIPSETTING( 0x02, "800 million") + PORT_DIPSETTING( 0x03, "850 million") + PORT_DIPNAME( 0x30, 0x00, "Time for New Ticket") + PORT_DIPSETTING( 0x00, "None") + PORT_DIPSETTING( 0x10, "Short") + PORT_DIPSETTING( 0x20, "Medium") + PORT_DIPSETTING( 0x30, "Long") + + PORT_START("X2") + PORT_DIPNAME( 0x08, 0x00, "Automatic Punctuation") + PORT_DIPSETTING( 0x00, DEF_STR(No)) + PORT_DIPSETTING( 0x08, DEF_STR(Yes)) + PORT_DIPNAME( 0x03, 0x00, "Laps for extra ball in looping") + PORT_DIPSETTING( 0x00, "0") + PORT_DIPSETTING( 0x01, "1") + PORT_DIPSETTING( 0x02, "2") + PORT_DIPSETTING( 0x03, "3") + PORT_DIPNAME( 0x30, 0x00, "Time for 3-ball multiball") + PORT_DIPSETTING( 0x00, "None") + PORT_DIPSETTING( 0x10, "Short") + PORT_DIPSETTING( 0x20, "Medium") + PORT_DIPSETTING( 0x30, "Long") + PORT_DIPNAME( 0x40, 0x00, "Difficulty of Special") + PORT_DIPSETTING( 0x00, "Easy") + PORT_DIPSETTING( 0x40, "Hard") + + PORT_START("X3") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) // "Monedero A" PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) // "Monedero B" - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_QUOTE) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT ) // "Falta" + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 ) // "Monedero C" + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_NAME("Tilt") // "Falta" PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) // "Pulsador Partidas" - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE3 ) PORT_NAME("Reset") // "Puesta a cero" - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_NAME("Accounting info") // "Test economico" - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Test") // "Test tecnico" - - PORT_START("SW.4") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Q) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_U) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_I) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_O) - - PORT_START("SW.5") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_A) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_S) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_D) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_F) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_G) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_J) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_K) - - PORT_START("SW.6") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_Z) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_C) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_V) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_B) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_N) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_M) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_STOP) - - PORT_START("SW.7") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_L) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("Outhole") - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_COLON) - - PORT_START("SW.8") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Reset") // "Puesta a cero" + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Accounting info") // "Test economico" + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Test") // "Test tecnico" + PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Test Contactos") + + PORT_START("X4") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("INP40") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("INP41") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("INP42") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("INP43") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) PORT_NAME("INP44") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("INP45") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("INP46") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("INP47") + + PORT_START("X5") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("INP50") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("INP51") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("INP52") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("INP53") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_NAME("INP54") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("INP55") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("INP56") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("INP57") + + PORT_START("X6") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("INP60") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("INP61") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("INP62") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("INP63") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("INP64") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("INP65") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) PORT_NAME("INP66") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("INP67") + + PORT_START("X7") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("INP70") // 4th stored ball + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("INP71") // 3rd stored ball + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("INP72") // 2nd stored ball + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("INP73") // first stored ball + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("INP74") // At shooter + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COLON) PORT_NAME("INP75") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_QUOTE) PORT_NAME("INP76") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("INP77") + + PORT_START("X8") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("INP80") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("INP81") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("INP82") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_MINUS) PORT_NAME("INP83") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("INP84") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("INP85") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SPACE) PORT_NAME("INP86") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DEL) PORT_NAME("INP87") + + PORT_START("X9") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) PORT_NAME("INP90") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("INP91") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("INP92") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_DOWN) PORT_NAME("INP93") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_HOME) PORT_NAME("INP94") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_END) PORT_NAME("INP95") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGUP) PORT_NAME("INP96") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_PGDN) PORT_NAME("INP97") +INPUT_PORTS_END + +static INPUT_PORTS_START( vrnwrld ) + PORT_INCLUDE( spinb ) + PORT_MODIFY("X1") + PORT_DIPNAME( 0x30, 0x00, "Time for New Travel") + PORT_DIPSETTING( 0x00, "None") + PORT_DIPSETTING( 0x10, "Short") + PORT_DIPSETTING( 0x20, "Medium") + PORT_DIPSETTING( 0x30, "Long") + + PORT_MODIFY("X2") + PORT_DIPNAME( 0x03, 0x00, "Difficulty") + PORT_DIPSETTING( 0x00, "Very Easy") + PORT_DIPSETTING( 0x01, "Easy") + PORT_DIPSETTING( 0x02, "Hard") + PORT_DIPSETTING( 0x03, "Very Hard") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END + +static INPUT_PORTS_START( mach2 ) + PORT_INCLUDE( spinb ) + PORT_MODIFY("X0") + PORT_DIPNAME( 0x30, 0x00, "Points for free game") + PORT_DIPSETTING( 0x00, "100 million") + PORT_DIPSETTING( 0x10, "150 million") + PORT_DIPSETTING( 0x20, "200 million") + PORT_DIPSETTING( 0x30, "250 million") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_MODIFY("X1") + PORT_DIPNAME( 0x03, 0x00, "High Score") //"Handicap" + PORT_DIPSETTING( 0x00, "250 million") + PORT_DIPSETTING( 0x01, "300 million") + PORT_DIPSETTING( 0x02, "350 million") + PORT_DIPSETTING( 0x03, "400 million") + PORT_DIPNAME( 0x30, 0x00, "Time for New Shot") + PORT_DIPSETTING( 0x00, "None") + PORT_DIPSETTING( 0x10, "10 seconds") + PORT_DIPSETTING( 0x20, "12 seconds") + PORT_DIPSETTING( 0x30, "15 seconds") + PORT_DIPNAME( 0xc0, 0x00, "Laps to activate ramp") + PORT_DIPSETTING( 0x00, "1") + PORT_DIPSETTING( 0x40, "2") + PORT_DIPSETTING( 0x80, "3") + PORT_DIPSETTING( 0xc0, "4") + + PORT_MODIFY("X2") + PORT_DIPNAME( 0x04, 0x00, "Aeroplane Special") + PORT_DIPSETTING( 0x00, DEF_STR(No)) + PORT_DIPSETTING( 0x04, DEF_STR(Yes)) + PORT_DIPNAME( 0x01, 0x00, "Lock") + PORT_DIPSETTING( 0x00, "Easy") + PORT_DIPSETTING( 0x01, "Hard") + PORT_DIPNAME( 0x80, 0x00, "Rescue") + PORT_DIPSETTING( 0x00, "Easy") + PORT_DIPSETTING( 0x80, "Hard") + PORT_BIT( 0x72, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_MODIFY("X7") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("INP73") // At shooter + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("INP74") +INPUT_PORTS_END + +static INPUT_PORTS_START( bushido ) + PORT_INCLUDE( mach2 ) + PORT_MODIFY("X1") + PORT_DIPNAME( 0x30, 0x00, "Time for Shoot Again") + PORT_DIPSETTING( 0x00, "8 seconds") + PORT_DIPSETTING( 0x10, "10 seconds") + PORT_DIPSETTING( 0x20, "12 seconds") + PORT_DIPSETTING( 0x30, "15 seconds") + PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_MODIFY("X2") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("SW.9") + PORT_MODIFY("X3") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("INP31") // first stored ball + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_LEFT) PORT_NAME("INP32") + + PORT_MODIFY("X6") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("INP64") // 2nd stored ball + + PORT_MODIFY("X7") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("INP70") // 3rd stored ball + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("INP71") // outhole + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("INP72") // At shooter + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("INP73") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_UP) PORT_NAME("INP74") + + PORT_MODIFY("X9") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) +INPUT_PORTS_END - PORT_START("SW.10") +static INPUT_PORTS_START( metalman ) + PORT_START("X0") + PORT_DIPNAME( 0x01, 0x00, "Coin control 1") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x01, "On") + PORT_DIPNAME( 0x02, 0x00, "Coin control 2") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x02, "On") + PORT_DIPNAME( 0x04, 0x00, "Coin control 3") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x04, "On") + PORT_DIPNAME( 0x08, 0x00, "Coin control 4") + PORT_DIPSETTING( 0x00, "Off") + PORT_DIPSETTING( 0x08, "On") + PORT_DIPNAME( 0x30, 0x00, "Points for free game") + PORT_DIPSETTING( 0x00, "3600000") + PORT_DIPSETTING( 0x10, "4000000") + PORT_DIPSETTING( 0x20, "4400000") + PORT_DIPSETTING( 0x30, "4800000") + + PORT_START("X1") + PORT_DIPNAME( 0x08, 0x00, "Balls") + PORT_DIPSETTING( 0x00, "3") + PORT_DIPSETTING( 0x08, "5") + PORT_DIPNAME( 0x03, 0x00, "High Score") //"Handicap" + PORT_DIPSETTING( 0x00, "5600000") + PORT_DIPSETTING( 0x01, "6000000") + PORT_DIPSETTING( 0x02, "6400000") + PORT_DIPSETTING( 0x03, "6800000") + PORT_DIPNAME( 0x10, 0x00, "Dificultad de Especiales") + PORT_DIPSETTING( 0x00, "Varios por partida") + PORT_DIPSETTING( 0x10, "Solo uno por partida") + + PORT_START("X2") // not on the pcb + + PORT_START("X3") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) // "Monedero A" + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_NAME("INP32") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_NAME("Tilt") // "Falta" + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 ) // "Pulsador Partidas" + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Reset") // "Puesta a cero" + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Accounting info") // "Test economico" + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Test") // "Test tecnico" + + PORT_START("X4") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_B) PORT_NAME("INP40") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_C) PORT_NAME("INP41") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_D) PORT_NAME("INP42") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_E) PORT_NAME("INP43") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_F) PORT_NAME("INP44") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_G) PORT_NAME("INP45") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_H) PORT_NAME("INP46") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_I) PORT_NAME("INP47") + + PORT_START("X5") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_J) PORT_NAME("INP50") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_K) PORT_NAME("INP51") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_L) PORT_NAME("INP52") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_M) PORT_NAME("INP53") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_N) PORT_NAME("INP54") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_O) PORT_NAME("INP55") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_P) PORT_NAME("INP56") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Q) PORT_NAME("INP57") + + PORT_START("X6") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_R) PORT_NAME("INP60") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_S) PORT_NAME("INP61") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_T) PORT_NAME("INP62") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_U) PORT_NAME("INP63") + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_V) PORT_NAME("INP64") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_W) PORT_NAME("INP65") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Y) PORT_NAME("INP66") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_Z) PORT_NAME("INP67") + + PORT_START("X7") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COMMA) PORT_NAME("INP70") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_X) PORT_NAME("Outhole") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_STOP) PORT_NAME("INP72") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_SLASH) PORT_NAME("INP74") + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_COLON) PORT_NAME("INP75") + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_QUOTE) PORT_NAME("INP76") + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD ) PORT_CODE(KEYCODE_ENTER) PORT_NAME("INP77") + + PORT_START("X8") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START("X9") PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END +//Metalman +void spinb_state::ppi64c_w(u8 data) +{ + if (BIT(data, 3)) + { + data &= 7; + for (u8 i = 0; i < 5; i++) + m_digits[i*10+data] = m_segment[i]; + } +} + /* d0 = / enable RAM d1 = display enable @@ -311,14 +566,16 @@ d5 = part of the data input circuit d6 = STAT0 d7 = STAT1 -m_game == 0 : P1.0 low for RAM, P1.5 low for data input. They shouldn't both be low. +m_game == 0 : P1.0 low for RAM, P1.5 low for data input. They shouldn't both be low. (0=bad; 1=input; 2=ram; 3=none) m_game == 1 : P1.0 low for RAM, P1.5 low for data input. They shouldn't both be low. Extra ROM selected by P3.4 m_game == 2 : P1.0 and P1.5 go to 74LS139 selector: 0 = RAM; 1 = ROM1; 2 = ROM2; 3 = data input */ -void spinb_state::p1_w(uint8_t data) +void spinb_state::p1_w(u8 data) { - m_dmdbank = (BIT(data, 5) << 1) + BIT(data, 0); + m_return_status = (m_return_status & 0xfc) | BIT(data, 6, 2); + m_dmdbank = (BIT(data, 5) << 1) + BIT(data, 0); // vrnwrld + // map the other games into vrnwrld's arrangement if (m_game < 2) { switch (m_dmdbank) @@ -326,12 +583,12 @@ void spinb_state::p1_w(uint8_t data) case 0: printf("DMD Illegal selection\n"); break; - case 1: // ram - m_dmdbank = 0; - break; - case 2: // input + case 1: // input m_dmdbank = 3; break; + case 2: // ram + m_dmdbank = 0; + break; case 3: // nothing or (game1 external rom) m_dmdbank = 1; break; @@ -339,7 +596,7 @@ void spinb_state::p1_w(uint8_t data) } } -uint8_t spinb_state::p3_r() +u8 spinb_state::p3_r() { return m_p3 | m_p32; } @@ -351,7 +608,7 @@ d2 = Interrupt Input when data is coming from maincpu d6 = External /WR d7 = External /RD */ -void spinb_state::p3_w(uint8_t data) +void spinb_state::p3_w(u8 data) { m_p3 = data & 0xfb; m_dmdextaddr = 0; @@ -363,104 +620,139 @@ void spinb_state::p3_w(uint8_t data) m_dmdextaddr = BIT(data, 3) | (BIT(data, 5) << 1) | (BIT(data, 4) << 2); } -uint8_t spinb_state::sw_r() +u8 spinb_state::sw_r() { - return m_switches[m_row]->read(); + if (m_row < 10) + return m_io_keyboard[m_row]->read(); + else + return 0; } -void spinb_state::sndcmd_w(uint8_t data) +void spinb_state::sndcmd_w(u8 data) { m_sndcmd = data; } -uint8_t spinb_state::sndcmd_r() +u8 spinb_state::sndcmd_r() { return m_sndcmd; } -void spinb_state::dmdram_w(offs_t offset, uint8_t data) +void spinb_state::dmdram_w(offs_t offset, u8 data) { m_dmdram[offset & 0x1fff] = data; } -uint8_t spinb_state::dmdram_r(offs_t offset) +u8 spinb_state::dmdram_r(offs_t offset) { + u32 t; switch (m_dmdbank) { case 0: return m_dmdram[offset & 0x1fff]; case 1: - return m_p_dmdcpu[offset + (m_dmdextaddr << 16)]; + t = 0x10000 + offset + (m_dmdextaddr << 16); + if (t < m_dmd_size) + return m_p_dmdcpu[t]; + else + return m_p_dmdcpu[offset]; case 2: - return m_p_dmdcpu[0x80000 + offset + (m_dmdextaddr << 16)]; + t = 0x90000 + offset + (m_dmdextaddr << 16); + if (t < m_dmd_size) + return m_p_dmdcpu[t]; + else + return m_p_dmdcpu[offset]; } m_p32 = 4; m_dmdcpu->set_input_line(MCS51_INT0_LINE, CLEAR_LINE); + m_return_status &= 0xfb; return m_dmdcmd; } -void spinb_state::disp_w(uint8_t data) +void spinb_state::disp_w(offs_t offset, u8 data) { - m_dmdcmd = data; - m_p32 = 0; - m_dmdcpu->set_input_line(MCS51_INT0_LINE, HOLD_LINE); + if (m_game == 3) + m_segment[offset] = data; + else + { + m_dmdcmd = data; + m_p32 = 0; + m_return_status |= 4; + m_dmdcpu->set_input_line(MCS51_INT0_LINE, HOLD_LINE); + } } -void spinb_state::ppi60a_w(uint8_t data) +void spinb_state::ppi60a_w(u8 data) { if (data) - for (uint8_t i = 0; i < 8; i++) + for (u8 i = 0; i < 8; i++) if (BIT(data, i)) m_row = i; } -// always 0 but we'll support it anyway -void spinb_state::ppi60b_w(uint8_t data) +void spinb_state::ppi60b_w(u8 data) { if (data & 7) - for (uint8_t i = 0; i < 3; i++) + for (u8 i = 0; i < 3; i++) if (BIT(data, i)) m_row = i+8; } -void spinb_state::ppi64c_w(uint8_t data) +u8 spinb_state::ppi64c_r() { + u8 data = BIT(m_io_keyboard[3]->read(), 8); + return m_return_status | (data << 3); } -void spinb_state::sndbank_a_w (uint8_t data) +void spinb_state::sndbank_a_w(u8 data) { m_sndbank_a = data; m_sound_addr_a = (m_sound_addr_a & 0xffff) | ((data & 7) << 16); - - if (!BIT(data, 6)) - m_sound_addr_a |= (1<<19); - else if (!BIT(data, 5)) - m_sound_addr_a |= (2<<19); - else if (BIT(data, 7)) - m_sndbank_a = 0xff; + switch(BIT(data, 5, 3)) + { + case 3: + break; + case 5: + m_sound_addr_a |= (1<<19); + break; + case 6: + m_sound_addr_a |= (2<<19); + break; + default: + m_sndbank_a = 0xff; + break; + } update_sound_a(); } -void spinb_state::sndbank_m_w(uint8_t data) +void spinb_state::sndbank_m_w(u8 data) { m_sndbank_m = data; m_sound_addr_m = (m_sound_addr_m & 0xffff) | ((data & 7) << 16); - if (!BIT(data, 6)) - m_sound_addr_m |= (1<<19); - else if (!BIT(data, 5)) - m_sound_addr_m |= (2<<19); - else if (BIT(data, 7)) - m_sndbank_m = 0xff; + switch(BIT(data, 5, 3)) + { + case 3: + break; + case 5: + m_sound_addr_m |= (1<<19); + break; + case 6: + m_sound_addr_m |= (2<<19); + break; + default: + m_sndbank_m = 0xff; + break; + } update_sound_m(); } void spinb_state::update_sound_a() { - if (m_sndbank_a != 0xff) + if ((m_sound_addr_a < m_audio_size) && (m_sndbank_a != 0xff)) m_ic14a->ba_w(m_p_audio[m_sound_addr_a]); else m_ic14a->ba_w(0); @@ -468,7 +760,7 @@ void spinb_state::update_sound_a() void spinb_state::update_sound_m() { - if (m_sndbank_m != 0xff) + if ((m_sound_addr_m < m_music_size) && (m_sndbank_m != 0xff)) m_ic14m->ba_w(m_p_music[m_sound_addr_m]); else m_ic14m->ba_w(0); @@ -488,60 +780,94 @@ WRITE_LINE_MEMBER( spinb_state::ic5m_w ) m_ic14m->select_w(state); } -uint8_t spinb_state::ppia_c_r() +u8 spinb_state::ppia_c_r() { - return (m_pc0a ? 1 : 0) | m_portc_a; + return m_pc0a ? 15 : 14; } -uint8_t spinb_state::ppim_c_r() +u8 spinb_state::ppim_c_r() { - return (m_pc0m ? 1 : 0) | m_portc_m; + return m_pc0m ? 15 : 14; } -void spinb_state::ppia_b_w(uint8_t data) +void spinb_state::ppia_b_w(u8 data) { m_sound_addr_a = (m_sound_addr_a & 0xffff00) | data; update_sound_a(); } -void spinb_state::ppim_b_w(uint8_t data) +void spinb_state::ppim_b_w(u8 data) { m_sound_addr_m = (m_sound_addr_m & 0xffff00) | data; update_sound_m(); } -void spinb_state::ppia_a_w(uint8_t data) +void spinb_state::ppia_a_w(u8 data) { m_sound_addr_a = (m_sound_addr_a & 0xff00ff) | (data << 8); update_sound_a(); } -void spinb_state::ppim_a_w(uint8_t data) +void spinb_state::ppim_a_w(u8 data) { m_sound_addr_m = (m_sound_addr_m & 0xff00ff) | (data << 8); update_sound_m(); } -void spinb_state::ppia_c_w(uint8_t data) +void spinb_state::ppia_c_w(u8 data) { - // pc4 - READY line back to cpu board, but not used + m_return_status = (m_return_status & 0xef) | (data & 0x10); m_msm_a->s1_w(BIT(data, 5)); m_msm_a->reset_w(BIT(data, 6)); m_ic5a->clear_w(!BIT(data, 6)); - m_portc_a = data & 0xfe; } -void spinb_state::ppim_c_w(uint8_t data) +void spinb_state::ppim_c_w(u8 data) { // pc4 - READY line back to cpu board, but not used m_msm_m->s1_w(BIT(data, 5)); m_msm_m->reset_w(BIT(data, 6)); m_ic5m->clear_w(!BIT(data, 6)); - m_portc_m = data & 0xfe; +} + +void spinb_state::machine_start() +{ + genpin_class::machine_start(); + m_digits.resolve(); + m_io_outputs.resolve(); + + m_dmd_size = memregion("dmdcpu")->bytes(); + m_audio_size = memregion("audiorom")->bytes(); + m_music_size = memregion("musicrom")->bytes(); + + save_item(NAME(m_pc0a)); + save_item(NAME(m_pc0m)); + save_item(NAME(m_game)); + save_item(NAME(m_row)); + save_item(NAME(m_p3)); + save_item(NAME(m_p32)); + save_item(NAME(m_dmdcmd)); + save_item(NAME(m_dmdbank)); + save_item(NAME(m_dmdextaddr)); + save_item(NAME(m_dmdram)); + save_item(NAME(m_sndcmd)); + save_item(NAME(m_sndbank_a)); + save_item(NAME(m_sndbank_m)); + save_item(NAME(m_sound_addr_a)); + save_item(NAME(m_sound_addr_m)); + save_item(NAME(m_audio_size)); + save_item(NAME(m_music_size)); + save_item(NAME(m_dmd_size)); + save_item(NAME(m_return_status)); + save_item(NAME(m_segment)); } void spinb_state::machine_reset() { + genpin_class::machine_reset(); + for (u8 i = 0; i < m_io_outputs.size(); i++) + m_io_outputs[i] = 0; + m_sound_addr_a = 0; m_sound_addr_m = 0; m_sndbank_a = 0xff; @@ -551,34 +877,6 @@ void spinb_state::machine_reset() update_sound_m(); } -void spinb_state::machine_start() -{ - save_item(NAME(m_dmdram)); // make it visible in the debugger -} - -void spinb_state::init_game0() -{ - m_p_audio = memregion("audiorom")->base(); - m_p_music = memregion("musicrom")->base(); - m_game = 0; -} - -void spinb_state::init_game1() -{ - m_p_audio = memregion("audiorom")->base(); - m_p_music = memregion("musicrom")->base(); - m_p_dmdcpu = memregion("dmdcpu")->base()+0x10000; - m_game = 1; -} - -void spinb_state::init_game2() -{ - m_p_audio = memregion("audiorom")->base(); - m_p_music = memregion("musicrom")->base(); - m_p_dmdcpu = memregion("dmdcpu")->base()+0x10000; - m_game = 2; -} - void spinb_state::spinb_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(0x00, 0x00, 0x00)); @@ -586,9 +884,9 @@ void spinb_state::spinb_palette(palette_device &palette) const palette.set_pen_color(2, rgb_t(0x7c, 0x55, 0x00)); } -uint32_t spinb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 spinb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - uint16_t sy=0,ma; + u16 sy=0,ma; address_space &internal = m_dmdcpu->space(AS_DATA); ma = internal.read_byte(0x05) << 8; // find where display memory is @@ -597,13 +895,13 @@ uint32_t spinb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, ma = ((ma - 0x200) & 0x1c00) + 0x200; if (ma > 0x1c00) return 1; // not initialised yet - for (uint8_t y = 0; y < 32; y++) + for (u8 y = 0; y < 32; y++) { - uint16_t *p = &bitmap.pix(sy++); + u16 *p = &bitmap.pix(sy++); for (uint16_t x = 0; x < 16; x++) { - uint8_t const gfx = m_dmdram[ma+0x200]; - uint8_t const gfx1 = m_dmdram[ma++]; + u8 const gfx = m_dmdram[ma+0x200]; + u8 const gfx1 = m_dmdram[ma++]; *p++ = BIT(gfx1, 0) ? 1 : BIT(gfx, 0) ? 2 : 0; *p++ = BIT(gfx1, 1) ? 1 : BIT(gfx, 1) ? 2 : 0; @@ -620,12 +918,12 @@ uint32_t spinb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, { ma &= 0x1e00; - for (uint8_t y = 0; y < 32; y++) + for (u8 y = 0; y < 32; y++) { - uint16_t *p = &bitmap.pix(sy++); + u16 *p = &bitmap.pix(sy++); for (uint16_t x = 0; x < 16; x++) { - uint8_t const gfx = m_dmdram[ma++]; + u8 const gfx = m_dmdram[ma++]; *p++ = BIT(gfx, 0); *p++ = BIT(gfx, 1); @@ -646,13 +944,13 @@ void spinb_state::spinb(machine_config &config) // Basic machine hardware Z80(config, m_maincpu, XTAL(5'000'000) / 2); m_maincpu->set_addrmap(AS_PROGRAM, &spinb_state::spinb_map); - m_maincpu->set_periodic_int(FUNC(spinb_state::irq0_line_hold), attotime::from_hz(160)); // NE556 adjustable (if faster, then jolypark has a stack problem) + m_maincpu->set_periodic_int(FUNC(spinb_state::irq0_line_hold), attotime::from_hz(175)); // NE556 Z80(config, m_audiocpu, XTAL(5'000'000) / 2); - m_audiocpu->set_addrmap(AS_PROGRAM, &spinb_state::spinb_audio_map); + m_audiocpu->set_addrmap(AS_PROGRAM, &spinb_state::audio_map); Z80(config, m_musiccpu, XTAL(5'000'000) / 2); - m_musiccpu->set_addrmap(AS_PROGRAM, &spinb_state::spinb_music_map); + m_musiccpu->set_addrmap(AS_PROGRAM, &spinb_state::music_map); I8031(config, m_dmdcpu, XTAL(16'000'000)); m_dmdcpu->set_addrmap(AS_PROGRAM, &spinb_state::dmd_mem); @@ -680,47 +978,39 @@ void spinb_state::spinb(machine_config &config) SPEAKER(config, "msmavol").front_center(); MSM5205(config, m_msm_a, XTAL(384'000)); m_msm_a->vck_callback().set("ic5a", FUNC(ttl7474_device::clock_w)); - m_msm_a->set_prescaler_selector(msm5205_device::S48_4B); // 4KHz 4-bit + m_msm_a->set_prescaler_selector(msm5205_device::S96_4B); // 4KHz 4-bit m_msm_a->add_route(ALL_OUTPUTS, "msmavol", 1.0); SPEAKER(config, "msmmvol").front_center(); MSM5205(config, m_msm_m, XTAL(384'000)); m_msm_m->vck_callback().set("ic5m", FUNC(ttl7474_device::clock_w)); - m_msm_m->set_prescaler_selector(msm5205_device::S48_4B); // 4KHz 4-bit + m_msm_m->set_prescaler_selector(msm5205_device::S96_4B); // 4KHz 4-bit m_msm_m->add_route(ALL_OUTPUTS, "msmmvol", 1.0); // Devices i8255_device &ppi60(I8255A(config, "ppi60")); //ppi60.in_pa_callback().set(FUNC(spinb_state::ppi60a_r)); ppi60.out_pa_callback().set(FUNC(spinb_state::ppi60a_w)); - //ppi60.in_pb_callback().set(FUNC(spinb_state::ppi60b_r)); + ppi60.in_pb_callback().set(FUNC(spinb_state::ppi60b_r)); ppi60.out_pb_callback().set(FUNC(spinb_state::ppi60b_w)); ppi60.in_pc_callback().set(FUNC(spinb_state::sw_r)); //ppi60.out_pc_callback().set(FUNC(spinb_state::ppi60c_w)); i8255_device &ppi64(I8255A(config, "ppi64")); - //ppi64.in_pa_callback().set(FUNC(spinb_state::ppi64a_r)); - //ppi64.out_pa_callback().set(FUNC(spinb_state::ppi64a_w)); - //ppi64.in_pb_callback().set(FUNC(spinb_state::ppi64b_r)); - //ppi64.out_pb_callback().set(FUNC(spinb_state::ppi64b_w)); - //ppi64.in_pc_callback().set(FUNC(spinb_state::ppi64c_r)); + ppi64.in_pc_callback().set(FUNC(spinb_state::ppi64c_r)); + ppi64.out_pa_callback().set(FUNC(spinb_state::ppi64a_w)); + ppi64.out_pb_callback().set(FUNC(spinb_state::ppi64b_w)); ppi64.out_pc_callback().set(FUNC(spinb_state::ppi64c_w)); - I8255A(config, "ppi68"); - //ppi68.in_pa_callback().set(FUNC(spinb_state::ppi68a_r)); - //ppi68.out_pa_callback().set(FUNC(spinb_state::ppi68a_w)); - //ppi68.in_pb_callback().set(FUNC(spinb_state::ppi68b_r)); - //ppi68.out_pb_callback().set(FUNC(spinb_state::ppi68b_w)); - //ppi68.in_pc_callback().set(FUNC(spinb_state::ppi68c_r)); - //ppi68.out_pc_callback().set(FUNC(spinb_state::ppi68c_w)); - - I8255A(config, "ppi6c"); - //ppi6c.in_pa_callback().set(FUNC(spinb_state::ppi6ca_r)); - //ppi6c.out_pa_callback().set(FUNC(spinb_state::ppi6ca_w)); - //ppi6c.in_pb_callback().set(FUNC(spinb_state::ppi6cb_r)); - //ppi6c.out_pb_callback().set(FUNC(spinb_state::ppi6cb_w)); - //ppi6c.in_pc_callback().set(FUNC(spinb_state::ppi6cc_r)); - //ppi6c.out_pc_callback().set(FUNC(spinb_state::ppi6cc_w)); + i8255_device &ppi68(I8255A(config, "ppi68")); + ppi68.out_pa_callback().set(FUNC(spinb_state::ppi68a_w)); + ppi68.out_pb_callback().set(FUNC(spinb_state::ppi68b_w)); + ppi68.out_pc_callback().set(FUNC(spinb_state::ppi68c_w)); + + i8255_device &ppi6c(I8255A(config, "ppi6c")); + ppi6c.out_pa_callback().set(FUNC(spinb_state::ppi6ca_w)); + ppi6c.out_pb_callback().set(FUNC(spinb_state::ppi6cb_w)); + ppi6c.out_pc_callback().set(FUNC(spinb_state::ppi6cc_w)); i8255_device &ppia(I8255A(config, "ppia")); ppia.out_pa_callback().set(FUNC(spinb_state::ppia_a_w)); @@ -737,13 +1027,13 @@ void spinb_state::spinb(machine_config &config) TTL7474(config, m_ic5a, 0); m_ic5a->comp_output_cb().set(FUNC(spinb_state::ic5a_w)); - HC157(config, m_ic14a, 0); // actually IC15 on Jolly Park + HC157(config, m_ic14a, 0); // IC15 on Jolly Park m_ic14a->out_callback().set("msm_a", FUNC(msm5205_device::data_w)); TTL7474(config, m_ic5m, 0); m_ic5m->comp_output_cb().set(FUNC(spinb_state::ic5m_w)); - HC157(config, m_ic14m, 0); // actually IC15 on Jolly Park + HC157(config, m_ic14m, 0); // IC15 on Jolly Park m_ic14m->out_callback().set("msm_m", FUNC(msm5205_device::data_w)); } @@ -753,12 +1043,12 @@ void spinb_state::jolypark(machine_config &config) MSM6585(config.replace(), m_msm_a, XTAL(640'000)); m_msm_a->vck_callback().set("ic5a", FUNC(ttl7474_device::clock_w)); - m_msm_a->set_prescaler_selector(msm6585_device::S40); + m_msm_a->set_prescaler_selector(msm6585_device::S160); // 4KHz 4-bit m_msm_a->add_route(ALL_OUTPUTS, "msmavol", 1.0); MSM6585(config.replace(), m_msm_m, XTAL(640'000)); m_msm_m->vck_callback().set("ic5m", FUNC(ttl7474_device::clock_w)); - m_msm_m->set_prescaler_selector(msm6585_device::S40); + m_msm_m->set_prescaler_selector(msm6585_device::S160); // 4KHz 4-bit m_msm_m->add_route(ALL_OUTPUTS, "msmmvol", 1.0); } @@ -768,9 +1058,41 @@ void spinb_state::vrnwrld(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &spinb_state::vrnwrld_map); } +void spinb_state::metalman(machine_config &config) +{ + spinb(config); + config.device_remove("dmdcpu"); + config.device_remove("screen"); + config.device_remove("palette"); + config.set_default_layout(layout_metalman); +} /*------------------------------------------------------------------- -/ Bushido (1993) - ( Last game by Inder - before becoming Spinball - but same hardware) +/ Metal Man (1992) +/-------------------------------------------------------------------*/ +ROM_START(metalman) + ROM_REGION(0x4000, "maincpu", 0) + ROM_LOAD("cpu_0.bin", 0x0000, 0x2000, CRC(7fe4335b) SHA1(52ef2efa29337eebd8c2c9a8aec864356a6829b6)) + ROM_LOAD("cpu_1.bin", 0x2000, 0x2000, CRC(2cca735e) SHA1(6a76017dfbcac0d57fcec8f07f92d5e04dd3e00b)) + + ROM_REGION(0x10000, "dmdcpu", ROMREGION_ERASEFF) + + ROM_REGION(0x2000, "audiocpu", 0) + ROM_LOAD("sound_e1.bin", 0x0000, 0x2000, CRC(55e889e8) SHA1(0a240868c1b17762588c0ed9a14f568a6e50f409)) + + ROM_REGION(0x60000, "audiorom", ROMREGION_ERASEFF) + ROM_LOAD("sound_e2.bin", 0x40000, 0x20000, CRC(5ac61535) SHA1(75b9a805f8639554251192e3777073c29952c78f)) + + ROM_REGION(0x2000, "musiccpu", 0) + ROM_LOAD("sound_m1.bin", 0x0000, 0x2000, CRC(21a9ee1d) SHA1(d906ac7d6e741f05e81076a5be33fc763f0de9c1)) + + ROM_REGION(0xa0000, "musicrom", ROMREGION_ERASEFF) + ROM_LOAD("sound_m2.bin", 0x40000, 0x20000, CRC(349df1fe) SHA1(47e7ddbdc398396e40bb5340e5edcb8baf06c255)) + ROM_LOAD("sound_m3.bin", 0x80000, 0x20000, CRC(15ef1866) SHA1(4ffa3b29bf3c30a9a5bc622adde16a1a13833b22)) +ROM_END + +/*------------------------------------------------------------------- +/ Bushido (1993) /-------------------------------------------------------------------*/ ROM_START(bushido) ROM_REGION(0x4000, "maincpu", 0) @@ -783,14 +1105,14 @@ ROM_START(bushido) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("a-sonido.bin", 0x0000, 0x2000, CRC(cf7d5399) SHA1(c79145826cfa6be2487e3add477d9b452c553762)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x100000, "audiorom", 0) ROM_LOAD("b-sonido.bin", 0x00000, 0x80000, CRC(cb4fc885) SHA1(569f389fa8f91f886b58f44f701d2752ef01f3fa)) ROM_LOAD("c-sonido.bin", 0x80000, 0x80000, CRC(35a43dd8) SHA1(f2b1994f67f749c65a88c95d970b655990d85b96)) ROM_REGION(0x2000, "musiccpu", 0) ROM_LOAD("d-musica.bin", 0x0000, 0x2000, CRC(2cb9697c) SHA1(d5c66d616ccd5e299832704e494743429dafd569)) - ROM_REGION(0x180000, "musicrom", 0) + ROM_REGION(0x100000, "musicrom", 0) ROM_LOAD("e-musica.bin", 0x00000, 0x80000, CRC(1414b921) SHA1(5df9e538ee109df28953ec8f162c60cb8c6e4d96)) ROM_LOAD("f-musica.bin", 0x80000, 0x80000, CRC(80f3a6df) SHA1(e09ad4660e511779c6e55559fa0c2c0b0c6600c8)) ROM_END @@ -806,14 +1128,14 @@ ROM_START(bushidoa) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("a-sonido.bin", 0x0000, 0x2000, CRC(cf7d5399) SHA1(c79145826cfa6be2487e3add477d9b452c553762)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x100000, "audiorom", 0) ROM_LOAD("b-sonido.bin", 0x00000, 0x80000, CRC(cb4fc885) SHA1(569f389fa8f91f886b58f44f701d2752ef01f3fa)) ROM_LOAD("c-sonido.bin", 0x80000, 0x80000, CRC(35a43dd8) SHA1(f2b1994f67f749c65a88c95d970b655990d85b96)) ROM_REGION(0x2000, "musiccpu", 0) ROM_LOAD("d-musica.bin", 0x0000, 0x2000, CRC(2cb9697c) SHA1(d5c66d616ccd5e299832704e494743429dafd569)) - ROM_REGION(0x180000, "musicrom", 0) + ROM_REGION(0x100000, "musicrom", 0) ROM_LOAD("e-musica.bin", 0x00000, 0x80000, CRC(1414b921) SHA1(5df9e538ee109df28953ec8f162c60cb8c6e4d96)) ROM_LOAD("f-musica.bin", 0x80000, 0x80000, CRC(80f3a6df) SHA1(e09ad4660e511779c6e55559fa0c2c0b0c6600c8)) ROM_END @@ -829,14 +1151,14 @@ ROM_START(bushidob) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("a-sonido.bin", 0x0000, 0x2000, CRC(cf7d5399) SHA1(c79145826cfa6be2487e3add477d9b452c553762)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x100000, "audiorom", 0) ROM_LOAD("b-sonido.bin", 0x00000, 0x80000, CRC(cb4fc885) SHA1(569f389fa8f91f886b58f44f701d2752ef01f3fa)) ROM_LOAD("c-sonido.bin", 0x80000, 0x80000, CRC(35a43dd8) SHA1(f2b1994f67f749c65a88c95d970b655990d85b96)) ROM_REGION(0x2000, "musiccpu", 0) ROM_LOAD("d-musica.bin", 0x0000, 0x2000, CRC(2cb9697c) SHA1(d5c66d616ccd5e299832704e494743429dafd569)) - ROM_REGION(0x180000, "musicrom", 0) + ROM_REGION(0x100000, "musicrom", 0) ROM_LOAD("e-musica.bin", 0x00000, 0x80000, CRC(1414b921) SHA1(5df9e538ee109df28953ec8f162c60cb8c6e4d96)) ROM_LOAD("f-musica.bin", 0x80000, 0x80000, CRC(80f3a6df) SHA1(e09ad4660e511779c6e55559fa0c2c0b0c6600c8)) ROM_END @@ -855,13 +1177,13 @@ ROM_START(mach2) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("m2sndd.01", 0x0000, 0x2000, CRC(e789f22d) SHA1(36aa7eac1dd37a02c982d109462dddbd85a305cc)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x80000, "audiorom", 0) ROM_LOAD("m2snde.01", 0x00000, 0x80000, CRC(f5721119) SHA1(9082198e8d875b67323266c4bf8c2c378b63dfbb)) ROM_REGION(0x2000, "musiccpu", 0) ROM_LOAD("m2musa.01", 0x0000, 0x2000, CRC(2d92a882) SHA1(cead22e434445e5c25414646b1e9ae2b9457439d)) - ROM_REGION(0x180000, "musicrom", 0) + ROM_REGION(0x100000, "musicrom", 0) ROM_LOAD("m2musb.01", 0x00000, 0x80000, CRC(6689cd19) SHA1(430092d51704dfda8bd8264875f1c1f4461c56e5)) ROM_LOAD("m2musc.01", 0x80000, 0x80000, CRC(88851b82) SHA1(d0c9fa391ca213a69b7c8ae7ca52063503b5656e)) ROM_END @@ -877,13 +1199,13 @@ ROM_START(mach2a) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("m2sndd.01", 0x0000, 0x2000, CRC(e789f22d) SHA1(36aa7eac1dd37a02c982d109462dddbd85a305cc)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x80000, "audiorom", 0) ROM_LOAD("m2snde.01", 0x00000, 0x80000, CRC(f5721119) SHA1(9082198e8d875b67323266c4bf8c2c378b63dfbb)) ROM_REGION(0x2000, "musiccpu", 0) ROM_LOAD("m2musa.01", 0x0000, 0x2000, CRC(2d92a882) SHA1(cead22e434445e5c25414646b1e9ae2b9457439d)) - ROM_REGION(0x180000, "musicrom", 0) + ROM_REGION(0x100000, "musicrom", 0) ROM_LOAD("m2musb.01", 0x00000, 0x80000, CRC(6689cd19) SHA1(430092d51704dfda8bd8264875f1c1f4461c56e5)) ROM_LOAD("m2musc.01", 0x80000, 0x80000, CRC(88851b82) SHA1(d0c9fa391ca213a69b7c8ae7ca52063503b5656e)) ROM_END @@ -898,12 +1220,12 @@ ROM_START(jolypark) ROM_REGION(0x30000, "dmdcpu", 0) ROM_LOAD("jpdmd0.rom", 0x00000, 0x10000, CRC(b57565cb) SHA1(3fef66d298893029de78fdb6ecdb562c33d76180)) - ROM_LOAD("jpdmd1.rom", 0x10000, 0x20000, CRC(40d1563f) SHA1(90dbea742202340da6fa950eedc2bceec5a2af7e)) // according to schematic this rom should be twice as big + ROM_LOAD("jpdmd1.rom", 0x10000, 0x20000, CRC(40d1563f) SHA1(90dbea742202340da6fa950eedc2bceec5a2af7e)) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("jpsndc1.rom", 0x0000, 0x2000, CRC(0475318f) SHA1(7154bd5ca5b28019eb0ff598ec99bbe49260932b)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x100000, "audiorom", 0) ROM_LOAD("jpsndm4.rom", 0x00000, 0x80000, CRC(735f3db7) SHA1(81dc893f5194d6ac1af54b262555a40c5c3e0292)) ROM_LOAD("jpsndm5.rom", 0x80000, 0x80000, CRC(769374bd) SHA1(8121369714c55cc06c493b15e5c2ca79b13aff52)) @@ -932,7 +1254,7 @@ ROM_START(vrnwrld) ROM_REGION(0x2000, "audiocpu", 0) ROM_LOAD("vws2ic9.rom", 0x0000, 0x2000, CRC(ab8cb4c5) SHA1(92a702c11e2cef703992244529ba86079d5ab9b0)) - ROM_REGION(0x180000, "audiorom", 0) + ROM_REGION(0x80000, "audiorom", 0) ROM_LOAD("vws3ic15.rom", 0x00000, 0x80000, CRC(d62c9443) SHA1(7c6b8662d88ba6592da8b83af11087647105e8dd)) ROM_REGION(0x2000, "musiccpu", 0) @@ -944,10 +1266,11 @@ ROM_START(vrnwrld) ROM_LOAD("vws7ic27.rom", 0x100000, 0x80000, CRC(7335b29c) SHA1(4de6de09f069feecbad2e5ef50032e8d381ff9b1)) ROM_END -GAME(1993, bushido, 0, spinb, spinb, spinb_state, init_game0, ROT0, "Inder/Spinball", "Bushido (set 1)", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1993, bushidoa, bushido, spinb, spinb, spinb_state, init_game0, ROT0, "Inder/Spinball", "Bushido (set 2)", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1993, bushidob, bushido, spinb, spinb, spinb_state, init_game0, ROT0, "Inder/Spinball", "Bushido (set 3)", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1995, mach2, 0, spinb, spinb, spinb_state, init_game0, ROT0, "Spinball", "Mach 2 (set 1)", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1995, mach2a, mach2, spinb, spinb, spinb_state, init_game0, ROT0, "Spinball", "Mach 2 (set 2)", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1996, jolypark, 0, jolypark, spinb, spinb_state, init_game1, ROT0, "Spinball", "Jolly Park", MACHINE_IS_SKELETON_MECHANICAL) -GAME(1996, vrnwrld, 0, vrnwrld, spinb, spinb_state, init_game2, ROT0, "Spinball", "Verne's World", MACHINE_IS_SKELETON_MECHANICAL) +GAME(1992, metalman, 0, metalman, metalman, spinb_state, init_3, ROT0, "Inder", "Metal Man", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1993, bushido, 0, spinb, bushido, spinb_state, init_0, ROT0, "Inder", "Bushido (set 1)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1993, bushidoa, bushido, spinb, bushido, spinb_state, init_0, ROT0, "Inder", "Bushido (set 2)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1993, bushidob, bushido, spinb, bushido, spinb_state, init_0, ROT0, "Inder", "Bushido (set 3)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1995, mach2, 0, spinb, mach2, spinb_state, init_0, ROT0, "Spinball", "Mach 2 (set 1)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1995, mach2a, mach2, spinb, mach2, spinb_state, init_0, ROT0, "Spinball", "Mach 2 (set 2)", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1996, jolypark, 0, jolypark, spinb, spinb_state, init_1, ROT0, "Spinball", "Jolly Park", MACHINE_IS_SKELETON_MECHANICAL ) +GAME(1996, vrnwrld, 0, vrnwrld, vrnwrld, spinb_state, init_2, ROT0, "Spinball", "Verne's World", MACHINE_IS_SKELETON_MECHANICAL ) diff --git a/src/mame/layout/metalman.lay b/src/mame/layout/metalman.lay new file mode 100644 index 00000000000..e80be5076e5 --- /dev/null +++ b/src/mame/layout/metalman.lay @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3