diff options
-rw-r--r-- | docs/source/techspecs/device_sound_interface.rst | 36 | ||||
-rw-r--r-- | src/devices/sound/spkrdev.cpp | 2 | ||||
-rw-r--r-- | src/emu/sound.cpp | 2 | ||||
-rw-r--r-- | src/emu/sound.h | 6 | ||||
-rw-r--r-- | src/mame/bmc/bmcpokr.cpp | 382 | ||||
-rw-r--r-- | src/mame/bmc/koftball.cpp | 40 | ||||
-rw-r--r-- | src/mame/igs/igs_m027.cpp | 6 | ||||
-rw-r--r-- | src/mame/misc/carrera.cpp | 477 | ||||
-rw-r--r-- | src/mame/misc/gms.cpp | 143 |
9 files changed, 654 insertions, 440 deletions
diff --git a/docs/source/techspecs/device_sound_interface.rst b/docs/source/techspecs/device_sound_interface.rst index 859d2497477..8355781effc 100644 --- a/docs/source/techspecs/device_sound_interface.rst +++ b/docs/source/techspecs/device_sound_interface.rst @@ -238,8 +238,40 @@ hardware. Between gains and effects there is a fair chance saturation can be avoided later in the chain. +3.4 Timing +~~~~~~~~~~ -3.4 Gain management +.. code-block:: C++ + u32 sample_rate() const; + attotime sample_period() const; + + u64 start_index() const; + u64 end_index() const; + attotime start_time() const; + attotime end_time() const; + + attotime sample_to_time(u64 index) const; + +``sample_rate`` gives the current sample rate of the stream and +``sample_period`` the corresponding duration. + +Within a call to the update callback, ``start_index`` gives the number +(starting at zero at system power on) and ``start_time`` the time of +the first sample to compute in the update. ``end_index`` and +``end_time`` correspondingly indicate one past the last sample to +update, or in other words the first sample of the next update call. +Outside of an update callback, they all point to the first sample of +the next update call. + +Finally ``sample_to_time`` allows to convert from a sample number to a +time. + +Note that in case of change of sample rate sample numbers are +recalculated to end up as if the stream had had the new rate from the +start. And the times will still be such that sample 0 is at time 0. + + +3.5 Gain management ~~~~~~~~~~~~~~~~~~~ .. code-block:: C++ @@ -261,7 +293,7 @@ This is similar to the device gain control, with a twist: apply multiplies the current gain by the given value. -3.5 Misc. actions +3.6 Misc. actions ~~~~~~~~~~~~~~~~~ .. code-block:: C++ diff --git a/src/devices/sound/spkrdev.cpp b/src/devices/sound/spkrdev.cpp index 841656ab4ac..16dc6199c2f 100644 --- a/src/devices/sound/spkrdev.cpp +++ b/src/devices/sound/spkrdev.cpp @@ -268,7 +268,7 @@ void speaker_sound_device::level_w(int new_level) /* This is redundant because time update has to be done within sound_stream_update() anyway, * however this ensures synchronization between the speaker and stream timing: */ - m_channel_last_sample_time = m_channel->sample_time(); + m_channel_last_sample_time = m_channel->end_time(); /* sample_time() may be ahead of us */ if (m_channel_last_sample_time > time) diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 696742a87e2..a393fcefb46 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -859,7 +859,7 @@ void sound_manager::after_devices_init() void sound_manager::input_get(int id, sound_stream &stream) { u32 samples = stream.samples(); - u64 end_pos = stream.sample_index(); + u64 end_pos = stream.end_index(); u32 skip = stream.output_count(); for(const auto &step : m_microphones[id].m_input_mixing_steps) { diff --git a/src/emu/sound.h b/src/emu/sound.h index 6d699dbb8d9..57c96683f0a 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -35,7 +35,7 @@ For example, if you have a 10Hz clock, and call stream.update() at t=0.91, it will compute 10 samples (for clock edges 0.0, 0.1, 0.2, ..., 0.7, 0.8, and 0.9). And then if you ask the stream what its - current end time is (via stream.sample_time()), it will say t=1.0, + current end time is (via stream.end_time()), it will say t=1.0, which is in the future, because it knows it will hold that last sample until 1.0s. @@ -210,11 +210,9 @@ public: // sample id and timing of the first and last sample of the current update block, and first of the next sample block u64 start_index() const { return m_output_buffer.write_sample(); } - u64 end_index() const { return m_output_buffer.write_sample() + samples() - 1; } - u64 sample_index() const { return m_output_buffer.write_sample() + samples(); } + u64 end_index() const { return m_output_buffer.write_sample() + samples(); } attotime start_time() const { return sample_to_time(start_index()); } attotime end_time() const { return sample_to_time(end_index()); } - attotime sample_time() const { return sample_to_time(sample_index()); } // convert from absolute sample index to time attotime sample_to_time(u64 index) const; diff --git a/src/mame/bmc/bmcpokr.cpp b/src/mame/bmc/bmcpokr.cpp index 95c0ec5808e..f8b94ae5e8f 100644 --- a/src/mame/bmc/bmcpokr.cpp +++ b/src/mame/bmc/bmcpokr.cpp @@ -681,7 +681,7 @@ static INPUT_PORTS_START( bmcpokr ) PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x02, DEF_STR( No ) ) PORT_DIPNAME( 0x04, 0x00, "Slot Machine" ) PORT_DIPLOCATION("DIP1:3") @@ -719,7 +719,7 @@ static INPUT_PORTS_START( bmcpokr ) PORT_DIPSETTING( 0x01, "97" ) PORT_DIPSETTING( 0x03, "98" ) PORT_DIPSETTING( 0x00, "99" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") PORT_DIPSETTING( 0x08, "93" ) PORT_DIPSETTING( 0x04, "94" ) PORT_DIPSETTING( 0x00, "95" ) @@ -780,17 +780,17 @@ static INPUT_PORTS_START( mjmaglmp ) PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x04, "Coin Sw. Function" ) PORT_DIPLOCATION("DIP1:3") PORT_DIPSETTING( 0x00, "Coin" ) PORT_DIPSETTING( 0x04, "Note" ) PORT_DIPNAME( 0x08, 0x08, "Pay Sw. Function" ) PORT_DIPLOCATION("DIP1:4") PORT_DIPSETTING( 0x00, "Pay-Out" ) - PORT_DIPSETTING( 0x08, "Key-Down" ) + PORT_DIPSETTING( 0x08, "Key-Out" ) PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") PORT_DIPSETTING( 0x10, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) @@ -822,42 +822,42 @@ static INPUT_PORTS_START( mjmaglmp ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") - PORT_DIPSETTING( 0x02, "75" ) - PORT_DIPSETTING( 0x01, "82" ) - PORT_DIPSETTING( 0x03, "85" ) - PORT_DIPSETTING( 0x00, "88" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") - PORT_DIPSETTING( 0x08, "95" ) - PORT_DIPSETTING( 0x04, "96" ) - PORT_DIPSETTING( 0x00, "97" ) - PORT_DIPSETTING( 0x0c, "98" ) - PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") + PORT_DIPSETTING( 0x02, "75%" ) + PORT_DIPSETTING( 0x01, "82%" ) + PORT_DIPSETTING( 0x03, "85%" ) + PORT_DIPSETTING( 0x00, "88%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") + PORT_DIPSETTING( 0x08, "95%" ) + PORT_DIPSETTING( 0x04, "96%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPSETTING( 0x0c, "98%" ) + PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6") PORT_DIPSETTING( 0x10, "Small" ) PORT_DIPSETTING( 0x00, "Big" ) PORT_DIPSETTING( 0x30, "Normal" ) PORT_DIPSETTING( 0x20, "Bonus" ) - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") PORT_DIPSETTING( 0x00, "300" ) PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0x40, "1000" ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x06, "3" ) PORT_DIPSETTING( 0x04, "6" ) PORT_DIPSETTING( 0x02, "9" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") + PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) @@ -889,92 +889,95 @@ static INPUT_PORTS_START( fengyunh ) MAHJONG_KEYS_COMMON("DSW3", 0x01) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x06, "6" ) PORT_DIPSETTING( 0x02, "9" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 + PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 + PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) ) + PORT_DIPSETTING( 0x00, DEF_STR(1C_5C) ) + PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) - PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) - PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) + PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) + PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 - PORT_DIPSETTING( 0x02, "75" ) - PORT_DIPSETTING( 0x01, "78" ) - PORT_DIPSETTING( 0x03, "80" ) - PORT_DIPSETTING( 0x00, "85" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 - PORT_DIPSETTING( 0x08, "95" ) - PORT_DIPSETTING( 0x04, "96" ) - PORT_DIPSETTING( 0x00, "97" ) - PORT_DIPSETTING( 0x0c, "98" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // " - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 + PORT_DIPSETTING( 0x02, "75%" ) + PORT_DIPSETTING( 0x01, "78%" ) + PORT_DIPSETTING( 0x03, "80%" ) + PORT_DIPSETTING( 0x00, "85%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 + PORT_DIPSETTING( 0x08, "95%" ) + PORT_DIPSETTING( 0x04, "96%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPSETTING( 0x0c, "98%" ) + PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式 + PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x20, "Increase Manguan" ) // 滿貫加強 + PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強 + PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強 + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制 PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0x40, "1000" ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) + PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 + PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 PORT_DIPSETTING( 0x00, "50" ) PORT_DIPSETTING( 0x04, "100" ) - PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") + PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分 PORT_DIPSETTING( 0x10, "100 / 10" ) PORT_DIPSETTING( 0x18, "200 / 10" ) PORT_DIPSETTING( 0x08, "300 / 15" ) PORT_DIPSETTING( 0x00, "500 / 25" ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位 + PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位 PORT_DIPSETTING( 0x40, "10" ) PORT_DIPSETTING( 0x20, "20" ) PORT_DIPSETTING( 0x60, "30" ) PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) - PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 - PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 - PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 - PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate) - PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at rate set for coin input) - PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 - PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 - PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 - PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) + PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 + PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 + PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 + PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate) + PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at rate set for coin input) + PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 + PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 + PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode // Credit Mode Payout Mode | Pay Out Rate Key Out Rate // -----------------------------+------------------------------ @@ -988,95 +991,98 @@ static INPUT_PORTS_START( shendeng ) PORT_INCLUDE(fengyunh) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 + PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 + PORT_DIPSETTING( 0x00, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) ) + PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) - PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) - PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits) + PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) + PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits) PORT_MODIFY("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 - PORT_DIPSETTING( 0x02, "82" ) - PORT_DIPSETTING( 0x01, "88" ) - PORT_DIPSETTING( 0x03, "90" ) - PORT_DIPSETTING( 0x00, "93" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 - PORT_DIPSETTING( 0x08, "93" ) - PORT_DIPSETTING( 0x04, "94" ) - PORT_DIPSETTING( 0x00, "95" ) - PORT_DIPSETTING( 0x0c, "96" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // " - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 + PORT_DIPSETTING( 0x02, "82%" ) + PORT_DIPSETTING( 0x01, "88%" ) + PORT_DIPSETTING( 0x03, "90%" ) + PORT_DIPSETTING( 0x00, "93%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 + PORT_DIPSETTING( 0x08, "93%" ) + PORT_DIPSETTING( 0x04, "94%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPSETTING( 0x0c, "96%" ) + PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式 + PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x20, "Increase Zhima" ) // 芝麻加強 + PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強 + PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強 + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制 PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0xc0, "1000" ) PORT_DIPSETTING( 0x40, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) PORT_MODIFY("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) + PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 + PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 PORT_DIPSETTING( 0x00, "50" ) PORT_DIPSETTING( 0x04, "100" ) - PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") + PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分 PORT_DIPSETTING( 0x10, "100 / 10" ) PORT_DIPSETTING( 0x18, "200 / 10" ) PORT_DIPSETTING( 0x08, "300 / 15" ) PORT_DIPSETTING( 0x00, "500 / 25" ) - PORT_DIPNAME( 0xe0, 0xe0, "Cash Out Per Credit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode) - PORT_DIPSETTING( 0xe0, "1" ) - PORT_DIPSETTING( 0xc0, "2" ) - PORT_DIPSETTING( 0xa0, "5" ) - PORT_DIPSETTING( 0x80, "6" ) - PORT_DIPSETTING( 0x60, "7" ) - PORT_DIPSETTING( 0x40, "8" ) - PORT_DIPSETTING( 0x20, "9" ) - PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPNAME( 0xe0, 0xe0, "Payout Unit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode) + PORT_DIPSETTING( 0xe0, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0xc0, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0xa0, DEF_STR(5C_1C) ) + PORT_DIPSETTING( 0x80, DEF_STR(6C_1C) ) + PORT_DIPSETTING( 0x60, DEF_STR(7C_1C) ) + PORT_DIPSETTING( 0x40, DEF_STR(8C_1C) ) + PORT_DIPSETTING( 0x20, DEF_STR(9C_1C) ) + PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" ) PORT_MODIFY("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) - PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 - PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 - PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 - PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input) - PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at cash out rate) - PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 - PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 - PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 - PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) + PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 + PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 + PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 + PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input) + PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at cash out rate) + PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 + PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 + PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode // Credit Mode Payout Mode | Pay Out Rate Key Out Rate // -----------------------------+------------------------------ @@ -1089,22 +1095,22 @@ INPUT_PORTS_END static INPUT_PORTS_START( xyddzhh ) PORT_START("INPUTS") // Entertainment controls: - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // choose - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) // TODO: verify? - PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) + PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // bet + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) MAHJONG_KEYS_COMMON("DSW2", 0x01) @@ -1113,22 +1119,22 @@ static INPUT_PORTS_START( xyddzhh ) // Maximum Bet is fixed to 40 according to test mode (no DIP determines it) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") - PORT_DIPSETTING( 0x01, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") - PORT_DIPSETTING( 0x02, "Key-In Rate" ) - PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) - PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") - PORT_DIPSETTING( 0x04, DEF_STR(No) ) - PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x08, DEF_STR(On) ) - PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x10, DEF_STR(On) ) - PORT_DIPNAME( 0xe0, 0xe0, "Double-Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // 示範音樂 + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") // 洗分錶同 + PORT_DIPSETTING( 0x02, "Key-In Rate" ) // 開分 + PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) // 投幣 + PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") // 退幣有無 + PORT_DIPSETTING( 0x04, DEF_STR(No) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) // 有 + PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") // 報警音效 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") // 自動PASS + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0xe0, 0xe0, "Double Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") // 續玩破台 PORT_DIPSETTING( 0xc0, "5,000" ) PORT_DIPSETTING( 0xe0, "10,000" ) PORT_DIPSETTING( 0xa0, "15,000" ) @@ -1139,18 +1145,18 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x00, "50,000" ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") - PORT_DIPSETTING( 0x01, "Mahjong" ) - PORT_DIPSETTING( 0x00, "Entertainment" ) - PORT_DIPNAME( 0x06, 0x06, "Double-Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") + PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") // 版本 + PORT_DIPSETTING( 0x01, "Mahjong" ) // 麻將版 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) // 娛樂版 + PORT_DIPNAME( 0x06, 0x06, "Double Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") // 續玩過關 PORT_DIPSETTING( 0x06, "3000" ) PORT_DIPSETTING( 0x04, "4000" ) PORT_DIPSETTING( 0x02, "5000" ) PORT_DIPSETTING( 0x01, "6000" ) - PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") + PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") // 累積彩金 PORT_DIPSETTING( 0x08, "300" ) PORT_DIPSETTING( 0x00, "400" ) - PORT_DIPNAME( 0x70, 0x70, "Double-Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") + PORT_DIPNAME( 0x70, 0x70, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") // 續玩機率 PORT_DIPSETTING( 0x60, "92%" ) PORT_DIPSETTING( 0x50, "93%" ) PORT_DIPSETTING( 0x40, "94%" ) @@ -1159,12 +1165,12 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x20, "97%" ) PORT_DIPSETTING( 0x10, "98%" ) PORT_DIPSETTING( 0x00, "99%" ) - PORT_DIPNAME( 0x80, 0x80, "Double-Up Game" ) PORT_DIPLOCATION("DIP2:8") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x80, DEF_STR(On) ) + PORT_DIPNAME( 0x80, 0x80, "Double Up Game" ) PORT_DIPLOCATION("DIP2:8") // 續玩遊戲 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 PORT_START("DSW3") - PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") + PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") // 投幣單位 PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_DIPSETTING( 0x05, DEF_STR(1C_2C) ) PORT_DIPSETTING( 0x04, DEF_STR(1C_5C) ) @@ -1173,7 +1179,7 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x01, "1 Coin/50 Credits" ) PORT_DIPSETTING( 0x07, "1 Coin/100 Credits" ) PORT_DIPSETTING( 0x00, "1 Coin/200 Credits" ) - PORT_DIPNAME( 0x38, 0x38, "Key-In Rate" ) PORT_DIPLOCATION("DIP3:4,5,6") + PORT_DIPNAME( 0x38, 0x38, "Key-In Unit" ) PORT_DIPLOCATION("DIP3:4,5,6") // 開分單位 PORT_DIPSETTING( 0x30, "40" ) PORT_DIPSETTING( 0x28, "50" ) PORT_DIPSETTING( 0x38, "100" ) @@ -1182,15 +1188,15 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x10, "500" ) PORT_DIPSETTING( 0x08, "1000" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x40, 0x40, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7") + PORT_DIPNAME( 0x40, 0x40, "Key-In Limit" ) PORT_DIPLOCATION("DIP3:7") // 開分限制 PORT_DIPSETTING( 0x00, "10,000" ) PORT_DIPSETTING( 0x40, "99,000" ) - PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") - PORT_DIPSETTING( 0x80, DEF_STR ( Normal ) ) - PORT_DIPSETTING( 0x00, "Graphics" ) + PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") // 牌型選項 + PORT_DIPSETTING( 0x80, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x00, "Graphics" ) // 圖型 PORT_START("DSW4") - PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") + PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") // 最小押分 PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x05, "2" ) PORT_DIPSETTING( 0x04, "3" ) @@ -1199,7 +1205,7 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x02, "15" ) PORT_DIPSETTING( 0x01, "20" ) PORT_DIPSETTING( 0x00, "40" ) - PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") + PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") // 遊戲機率 PORT_DIPSETTING( 0x30, "90%" ) PORT_DIPSETTING( 0x28, "91%" ) PORT_DIPSETTING( 0x20, "92%" ) @@ -1208,10 +1214,10 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x10, "95%" ) PORT_DIPSETTING( 0x08, "96%" ) PORT_DIPSETTING( 0x00, "97%" ) - PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") + PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") // 炒場設定 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") // 系統破台 PORT_DIPSETTING( 0x00, "50,000" ) PORT_DIPSETTING( 0x80, "100,000" ) INPUT_PORTS_END diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp index a028cee9a84..4c0b27894b4 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -15,11 +15,9 @@ TODO: - jxzh and kaimenhu bookkeeping menus do not clear the background. - jxzh stops responding to inputs properly after winning a hand if stripping sequences are enabled. -- jxzh last chance tiles are not visible. -- kaimenhu will not let you play a hand. +- jxzh last chance type A tiles are not visible. - Better understanding of the koftball protection. --- MC68000P10 M28 (OKI 6295, next to ROM C9) @@ -27,7 +25,7 @@ BMC ADB40817(80 Pin PQFP - Google hits, but no datasheet or description) RAMDAC TRC1710-80PCA (Monolithic 256-word by 18bit Look-up Table & Triple Video DAC with 6-bit DACs) File 89C67 (Clone of YM2413. Next to 3.57954MHz OSC) OSC: 21.47727MHz & 3.57954MHz -2 8-way dipswitches +2 8-way DIP switches part # scratched 64 pin PLCC (soccer ball sticker over this chip ;-) ft5_v16_c5.u14 \ @@ -65,17 +63,20 @@ key-in limit 5000 上分上限 credit limit 50000 得分上限 -jxzh and kaimenhu use an unusual control scheme: +jxzh uses an unusual control scheme: * use Start to draw a tile * use Big (left) and Small (right) to select a tile to discard * use Start to discard the selected tile +* Kan, Pon, Chi, Reach, Ron, Flip Flop and Bet function as expected in the main game * use Big (left) and Small (right) to select a tile to exchange during "first chance" -* use Flip Flop to exchange a tile during "first chance" +* use Flip Flop to exchange the selected tile during "first chance" * use Start to end "first chance" * use Start to select a tile during "last chance" * use Flip Flop to stake winnings on the double up game * use Ron to take winnings -* kan, pon, chi, reach and ron function as expected + +kaimenhu appears to be just the first chance and double up games from +jxzh (i.e. like a draw poker game but with mahjong tiles and hands). jxzh/kaimenhu test menu: @@ -85,9 +86,13 @@ kan graphics test 槓:圖型測試 reach sound test 聽:音樂測試 ron memory test 胡:記憶體測試 chi DIP switch test 吃:DIP 測試 -big last hand test 大:前手牌 +big last hand test 大:前手牌測試 test exit 離開 按《測試》 + +kaimenhu has a full set of soft settings accessible from the bookeeping menu +(default password is Start eight times) + */ #include "emu.h" @@ -567,7 +572,7 @@ static INPUT_PORTS_START( kaimenhu ) PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x0040, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x0080, 0x0080, "Double Up Game" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW2:8") @@ -607,10 +612,13 @@ static INPUT_PORTS_START( jxzh ) PORT_DIPSETTING( 0x0000, "1 2 3 5 10 25 50 100" ) PORT_DIPNAME( 0x0040, 0x0040, "Last Chance Type" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x0040, "A" ) // choose three of ten tiles - PORT_DIPSETTING( 0x0000, "B" ) // deal ten tiles - PORT_DIPNAME( 0x0080, 0x0080, "Double Up Game" ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) - PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // also seems to enable stripping sequences + PORT_DIPSETTING( 0x0000, "B" ) // draw ten tiles + PORT_DIPNAME( 0x0400, 0x0400, "Nudity" ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x0400, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0800, 0x0800, "Auto Last Chance B" ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x0800, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // automatically draws tiles for last chance type B PORT_DIPNAME( 0x2000, 0x0000, "Gal Voice" ) PORT_DIPLOCATION("SW2:3") PORT_DIPSETTING( 0x2000, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // calls discarded tiles @@ -838,6 +846,6 @@ void koftball_state::init_koftball() } // anonymous namespace -GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, kaimenhu, jxzh, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAME( 1996, kaimenhu, 0, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 45a2f96fba3..1d2297a4c1d 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -725,7 +725,7 @@ INPUT_PORTS_START( jking02 ) PORT_DIPNAME( 0x10, 0x10, "Password" ) PORT_DIPLOCATION("SW2:5") PORT_DIPSETTING( 0x10, DEF_STR(No) ) PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW2:6") + PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW2:6") PORT_DIPSETTING( 0x20, DEF_STR(Off) ) PORT_DIPSETTING( 0x00, DEF_STR(On) ) PORT_DIPNAME( 0x40, 0x40, "Auto Stop" ) PORT_DIPLOCATION("SW2:7") @@ -1418,10 +1418,10 @@ INPUT_PORTS_START( oceanpar101us ) PORT_DIPNAME( 0x10, 0x10, "Auto Take" ) PORT_DIPLOCATION("SW1:5") PORT_DIPSETTING( 0x10, DEF_STR(No) ) PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW1:6") + PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x00, DEF_STR(Off) ) PORT_DIPSETTING( 0x20, DEF_STR(On) ) - PORT_DIPNAME( 0xc0, 0xc0, "Double-Up Game Type" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Double Up Game Type" ) PORT_DIPLOCATION("SW1:7,8") PORT_DIPSETTING( 0xc0, "Poker 1" ) PORT_DIPSETTING( 0x80, "Poker 2" ) PORT_DIPSETTING( 0x40, "Symbol" ) diff --git a/src/mame/misc/carrera.cpp b/src/mame/misc/carrera.cpp index 9e2bb3242db..3ad4b5be6d0 100644 --- a/src/mame/misc/carrera.cpp +++ b/src/mame/misc/carrera.cpp @@ -1,56 +1,117 @@ // license:BSD-3-Clause -// copyright-holders: David Haywood - -/* - -This is a simple 'Pairs' game called -Carrera or Bomberman by BS Electronics - - - -PCB Layout ----------- - -|----------------------------------------------| -| 22.1184MHz Z80 | -| ROM.IC1 | -|_ BATTERY ROM.IC22 | - | | - _| 6116 ROM.IC2 | -| | -| | -|J AY-3-8910 ROM.IC3 | -|A DSW1(8) | -|M | -|M DSW2(8) ROM.IC4 | -|A | -| DSW3(8) | -| ROM.IC5 | -|_ PROM.IC39 DSW4(8) | - | 6116 | - _| | -| HD6845 6116 | -|----------------------------------------------| -Notes: - Z80 @ 3.6864MHz [22.1184/6] - AY-3-8910 @ 1.8432MHz [22.1184/12] - - -Emulation Notes: - Corrupt Tile on the first R in Carrera? (unlikely to be a bug, HW is very simple..) - -TODO: -- Are colors 100% correct? Needs a reference to be sure. -- There are reel GFXs on the ROMs (near the end), left-over or there's a way to enable it? - Update: if you trigger a normal irq 0 instead of a NMI the game will change into a proper 8 liner game without inputs. Investigate on it... - Update 2: alantin, bsebmanbl, bsebmanbl2, drkseal start directly with the 8 liner game -- ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core) - -*/ +// copyright-holders: David Haywood, Roberto Fresca, Grull Osgo + +/*********************************************************************** + + Carrera / Bomberman + by BS Electronics. + + Video slots stealth games with selectable bomberman or fruits themes. + The front game is normally a "memory" pairs game, where the objetive + is to clear the screen. + + You can change the tileset, the game title (Carrera/Bomberman), and + switch the type of game (amusement/gambling). + + Some sets don't allow the title change. + + + PCB Layout + ---------- + + |----------------------------------------------| + | 22.1184MHz Z80 | + | ROM.IC1 | + |_ BATTERY ROM.IC22 | + | | + _| 6116 ROM.IC2 | + | | + | | + |J AY-3-8910 ROM.IC3 | + |A DSW1(8) | + |M | + |M DSW2(8) ROM.IC4 | + |A | + | DSW3(8) | + | ROM.IC5 | + |_ PROM.IC39 DSW4(8) | + | 6116 | + _| | + | HD6845 6116 | + |----------------------------------------------| + + Notes: + Z80 @ 3.6864MHz [22.1184/6] + AY-3-8910 @ 1.8432MHz [22.1184/12] + + +************************************************************************ + + Technical notes: + ---------------- + + The two first sets (carrera and bsebman) have a "bug" in the title if + the NVRAM was created from zero. This "bug" is intended to see at first + sight if the game NVRAM was manipulated in some way. + + In fact, each boot the code paint the game title properly, and then + force the graphics bug if a special value hardcoded in NVRAM doesn't + match the expected. + + $1da3.......$1dd6 ; loops to paint the title/logo on screen. + + then... + + $1dd7 ld, a ($e300) 3a 00 e3 ; take the hardcoded value from NVRAM. + $1dda ld, ($f616), a 32 16 f6 ; place this value as tile index, + ; halfway the title top line ($f616), + ; creating the intended GFX bug. + + $1ddd ret c9 ; return from subroutine. + + + For other bootleg sets, if the hardcoded value doesn't match, they force + another tile index very close to the original, so is way less notorious + and only the technical trained people can see these minimal differences. + + Note: This behavior is by design and should not be interpreted as a software + defect. It allows operators to instantly identify units with reset or modified + NVRAM and maintains system integrity without preventing gameplay functionality. + + +************************************************************************ + + Updates: + + [2025-05] + + - Fix color bipolar PROM decode and palette calculation, + based on real games screenshots. + - Added NVRAM support for all games. + - Created default NVRAM for carrera and bsebman sets, + with harcoded critical values/registers needed to get + the games working. + - Workaround that fix the titles corruption for both + carrera and bsebman sets. + - Inputs and DIP switches. + - Fix alantin colors, based on the real game screenshots. + - Changed bsebman description to: + Carrera (Version 6.7) / Bomberman (Version 6.6) + - Added technical and game notes. + + + TODO: + + - Analyze the carrera/bomberman sets and rename them accordingly. + - ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core) + + +***********************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" +#include "machine/nvram.h" #include "sound/ay8910.h" #include "video/mc6845.h" @@ -88,10 +149,69 @@ private: }; +/************************************************* +* Video Hardware * +*************************************************/ + +uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + int count = 0; + + for (int y = 0; y < 32; y++) + { + for (int x = 0; x < 64; x++) + { + int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8; + + m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8); + count++; + } + } + return 0; +} + +void carrera_state::palette(palette_device &palette) const +{ + uint8_t const *const color_prom = memregion("proms")->base(); + for (int i = 0; i < 0x20; ++i) + { + int bit0, bit1; + int const br_bit0 = BIT(color_prom[i], 6); + int const br_bit1 = BIT(color_prom[i], 7); + + bit0 = BIT(color_prom[i], 0); + bit1 = BIT(color_prom[i], 3); + int const b = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1; + bit0 = BIT(color_prom[i], 1); + bit1 = BIT(color_prom[i], 4); + int const g = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1; + bit0 = BIT(color_prom[i], 2); + bit1 = BIT(color_prom[i], 5); + int const r = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1; + + palette.set_pen_color(i, rgb_t(r, g, b)); + } +} + + +/************************************************* +* Read Write Handlers * +*************************************************/ + +uint8_t carrera_state::unknown_r() +{ + return machine().rand(); +} + + +/************************************************* +* Memory map information * +*************************************************/ + void carrera_state::prg_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0xe000, 0xe7ff).ram(); + map(0xe000, 0xe7ff).ram().share("nvram"); map(0xe800, 0xe800).w("crtc", FUNC(mc6845_device::address_w)); map(0xe801, 0xe801).w("crtc", FUNC(mc6845_device::register_w)); map(0xf000, 0xffff).ram().share(m_tileram); @@ -106,48 +226,35 @@ void carrera_state::io_map(address_map &map) map(0x03, 0x03).portr("IN3"); map(0x04, 0x04).portr("IN4"); map(0x05, 0x05).portr("IN5"); - map(0x06, 0x06).nopw(); // ? + map(0x06, 0x06).nopw(); // ? map(0x08, 0x09).w("aysnd", FUNC(ay8910_device::address_data_w)); } + +/************************************************* +* Input ports * +*************************************************/ + static INPUT_PORTS_START( carrera ) PORT_START("IN0") // Port 0 - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - // unused / unknown inputs, not dips - PORT_DIPNAME( 0x20, 0x20, "0" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset") - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Up - Bet") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Down - Start") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Auto Start") // autoplay + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-6") PORT_CODE(KEYCODE_Z) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_START("IN1") // Port 1 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - // unused / unknown inputs, not dips - PORT_DIPNAME( 0x04, 0x04, "1" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-3") PORT_CODE(KEYCODE_A) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-4") PORT_CODE(KEYCODE_S) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-5") PORT_CODE(KEYCODE_D) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-6") PORT_CODE(KEYCODE_F) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-7") PORT_CODE(KEYCODE_G) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset") // I suspect the 4 below are the 4xDSWs PORT_START("IN2") // Port 2 @@ -175,7 +282,7 @@ static INPUT_PORTS_START( carrera ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - + PORT_START("IN3") // Port 3 PORT_DIPNAME( 0x01, 0x01, "3" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -203,58 +310,67 @@ static INPUT_PORTS_START( carrera ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN4") // Port 4 - PORT_DIPNAME( 0x01, 0x01, "4" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x07, 0x00, "Coinage B" ) PORT_DIPLOCATION("IN4:6,7,8") + PORT_DIPSETTING( 0x07, "5" ) + PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPSETTING( 0x01, "20" ) + PORT_DIPSETTING( 0x02, "50" ) + PORT_DIPSETTING( 0x03, "100" ) + PORT_DIPSETTING( 0x04, "500" ) + PORT_DIPSETTING( 0x05, "1000" ) + PORT_DIPSETTING( 0x06, "1100" ) + PORT_DIPNAME( 0x08, 0x08, "Game Name" ) PORT_DIPLOCATION("IN4:5") + PORT_DIPSETTING( 0x08, "Bomber Man" ) + PORT_DIPSETTING( 0x00, "Carrera" ) + PORT_DIPNAME( 0x10, 0x10, "Bonus 10%" ) PORT_DIPLOCATION("IN4:4") + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x20, 0x20, "Key Out" ) PORT_DIPLOCATION("IN4:3") + PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPSETTING( 0x20, "100" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficult ) ) PORT_DIPLOCATION("IN4:2") + PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) + PORT_DIPNAME( 0x80, 0x80, "Max Bet" ) PORT_DIPLOCATION("IN4:1") + PORT_DIPSETTING( 0x80, "9" ) + PORT_DIPSETTING( 0x00, "5" ) PORT_START("IN5") // Port 5 - PORT_DIPNAME( 0x01, 0x01, "5" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Playing Graphics" ) + PORT_DIPNAME( 0x07, 0x00, "Coinage A" ) PORT_DIPLOCATION("IN5:1,2,3") + PORT_DIPSETTING( 0x07, "5" ) + PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPSETTING( 0x01, "20" ) + PORT_DIPSETTING( 0x02, "50" ) + PORT_DIPSETTING( 0x03, "100" ) + PORT_DIPSETTING( 0x04, "500" ) + PORT_DIPSETTING( 0x05, "1000" ) + PORT_DIPSETTING( 0x06, "1100" ) + PORT_DIPNAME( 0x08, 0x00, "Playing Graphics" ) PORT_DIPLOCATION("IN5:4") PORT_DIPSETTING( 0x08, "Bricks" ) PORT_DIPSETTING( 0x00, "Fruits" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Debug?" ) // displays numbers over the game area + + PORT_DIPNAME( 0x40, 0x40, "Game Mode" ) PORT_DIPLOCATION("IN5:7") + PORT_DIPSETTING( 0x40, "Gamble" ) + PORT_DIPSETTING( 0x00, "Amusement" ) + + // this one displays numbers over the game area + PORT_DIPNAME( 0x80, 0x80, "Debug?" ) PORT_DIPLOCATION("IN5:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END + +/************************************************* +* Graphics Layouts * +*************************************************/ + static const gfx_layout tiles8x8_layout = { 8,8, @@ -266,55 +382,19 @@ static const gfx_layout tiles8x8_layout = 8*8 }; + +/************************************************* +* Graphics Decode Information * +*************************************************/ + static GFXDECODE_START( gfx_carrera ) GFXDECODE_ENTRY( "tiles", 0, tiles8x8_layout, 0, 1 ) GFXDECODE_END -uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - int count = 0; - - for (int y = 0; y < 32; y++) - { - for (int x = 0; x < 64; x++) - { - int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8; - - m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8); - count++; - } - } - return 0; -} - -uint8_t carrera_state::unknown_r() -{ - return machine().rand(); -} - -void carrera_state::palette(palette_device &palette) const -{ - uint8_t const *const color_prom = memregion("proms")->base(); - for (int i = 0; i < 0x20; ++i) - { - int bit0, bit1; - int const br_bit0 = BIT(color_prom[i], 6); - int const br_bit1 = BIT(color_prom[i], 7); - - bit0 = BIT(color_prom[i], 0); - bit1 = BIT(color_prom[i], 3); - int const b = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1; - bit0 = BIT(color_prom[i], 1); - bit1 = BIT(color_prom[i], 4); - int const g = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1; - bit0 = BIT(color_prom[i], 2); - bit1 = BIT(color_prom[i], 5); - int const r = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1; - - palette.set_pen_color(i, rgb_t(r, g, b)); - } -} +/************************************************* +* Machine Drivers * +*************************************************/ void carrera_state::carrera(machine_config &config) { @@ -325,10 +405,11 @@ void carrera_state::carrera(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &carrera_state::prg_map); m_maincpu->set_addrmap(AS_IO, &carrera_state::io_map); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(512, 256); screen.set_visarea_full(); screen.set_screen_update(FUNC(carrera_state::screen_update)); @@ -353,6 +434,10 @@ void carrera_state::carrera(machine_config &config) } +/************************************************* +* ROM Load * +*************************************************/ + ROM_START( carrera ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(2385b9c8) SHA1(12d4397779e074096fbb23b114985f104366b79c) ) @@ -364,6 +449,9 @@ ROM_START( carrera ) ROM_LOAD( "27512.ic4", 0x30000, 0x10000, CRC(97433f36) SHA1(39f3c6b76ad540693682832aba6e4fc400ca3753) ) ROM_LOAD( "27512.ic5", 0x40000, 0x10000, CRC(ffa75920) SHA1(aa5619f5aabcdfa250bb24bcad101a8c512a1776) ) + ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) ) + ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) ) ROM_END @@ -379,15 +467,18 @@ ROM_START( bsebman ) ROM_LOAD( "ic4", 0x30000, 0x10000, CRC(6b569989) SHA1(e00263fae310094ad5119e3a9673fb342f643ddc) ) ROM_LOAD( "ic5", 0x40000, 0x10000, CRC(21635791) SHA1(514078694269582c33fb7dddd6171089f9e21ee2) ) + ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) ) + ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "am27s19.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) ) ROM_END ROM_START( bsebmanbl ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH + ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH - ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX + ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(a16e914e) SHA1(09f2271f193a7bffd62ef6e428ecbf9aa1154860) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(147036a5) SHA1(34b4818fe61c5b13220b0a2001987b68b655b2cb) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(920eee0e) SHA1(85e6d5292b751c57c64d17858bd00292356599e3) ) @@ -399,10 +490,10 @@ ROM_START( bsebmanbl ) ROM_END ROM_START( bsebmanbl2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings + ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(ca2c8962) SHA1(140a217bb0365ec55116ba483208bdf1d820a7af) ) - ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS + ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(65ad616a) SHA1(e87d6d187ec5c99628d767a9720dd9d634e39c2d) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(64004dcb) SHA1(f9af56035f00d3d914c8e83e941762cb6153fc16) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(c6e0a838) SHA1(e30d0f28845f331839afc44fb7358be72d2a88cb) ) @@ -415,24 +506,24 @@ ROM_END ROM_START( alantin ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512 + ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512 - ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX + ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX ROM_LOAD( "alantin1.ic1", 0x00000, 0x10000, CRC(feb49cfd) SHA1(696683375c832b4cd6db9eef0edf4919b90c97ef) ) ROM_LOAD( "alantin2.ic2", 0x10000, 0x10000, CRC(e79da4b9) SHA1(a80c5f6431fc755645a0c8cd0cb290669f0cbada) ) ROM_LOAD( "alantin3.ic3", 0x20000, 0x10000, CRC(73d7c748) SHA1(bf688b8f506859ed3c514915676b13cecfec0a81) ) ROM_LOAD( "alantin4.ic4", 0x30000, 0x10000, CRC(6a061afd) SHA1(f6d736bd284e97ab915adb249c371617daa02a36) ) ROM_LOAD( "alantin5.ic5", 0x40000, 0x10000, CRC(35d8fb1b) SHA1(5d7ff8089e16ebb792543eeb9cc682f9f5eba6fe) ) - ROM_REGION( 0x20, "proms", 0 ) - ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) ) + ROM_REGION( 0x20, "proms", 0 ) // swapping bytes through a driver init has no palette response. + ROM_LOAD16_WORD_SWAP( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) ) ROM_END ROM_START( drkseal ) - ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings - ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF + ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings + ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF - ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright + ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(fd3b6bbc) SHA1(b1fe09772a5d9a07077038244517fc7169266893) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(d3a048e3) SHA1(687d58b84ca5985f51755b09c8a8b2ef68d16399) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(50b8f9ee) SHA1(4f31e36eb54fde40e409f0ac18bf87126174be33) ) @@ -443,16 +534,17 @@ ROM_START( drkseal ) ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(03aadf73) SHA1(e5baf8c5e7276eb207357e4cbb694c75e8caab6a) ) ROM_END -// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU) +// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board +// (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU) ROM_START( ncarrera ) - ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings - ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF + ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings + ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF ROM_REGION( 0x2200, "mcu", 0 ) ROM_LOAD( "internal_eeprom", 0x0000, 0x0200, NO_DUMP ) ROM_LOAD( "internal_flash", 0x0200, 0x2000, NO_DUMP ) - ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX + ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(dbec54c7) SHA1(ca7e54c198ca8abeffba1b323a514678384c35f9) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(8e8c2b6d) SHA1(001121e0b91d8e0efdc3f5f99c43e1751b4be758) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(ac66cda8) SHA1(65fae21de9f9727c5d8198ff57b27d703a7518fc) ) @@ -466,10 +558,15 @@ ROM_END } // anonymous namespace -GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE ) -GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE ) -GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump +/********************************************* +* Game Drivers * +*********************************************/ + +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS +GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE ) +GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7) / Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump diff --git a/src/mame/misc/gms.cpp b/src/mame/misc/gms.cpp index c35e44609ca..c5271b4215d 100644 --- a/src/mame/misc/gms.cpp +++ b/src/mame/misc/gms.cpp @@ -131,6 +131,7 @@ public: , m_oki(*this, "oki") , m_ymsnd(*this, "ymsnd") , m_dsw(*this, "DSW%u", 1U) + , m_key(*this, "KEY%u", 0U) { } @@ -150,6 +151,8 @@ public: void init_sscs() ATTR_COLD; void init_super555() ATTR_COLD; + template <unsigned Shift> ioport_value keyboard_r(); + protected: virtual void video_start() override ATTR_COLD; @@ -165,6 +168,7 @@ protected: required_device<okim6295_device> m_oki; optional_device<ym2151_device> m_ymsnd; optional_ioport_array<4> m_dsw; + optional_ioport_array<5> m_key; uint16_t m_reels_toggle = 0; uint16_t m_tilebank = 0; @@ -225,6 +229,19 @@ private: TILE_GET_INFO_MEMBER(get_tile1_info); }; +template <unsigned Shift> +ioport_value gms_2layers_state::keyboard_r() +{ + unsigned const select = bitswap<5>(m_input_matrix, 6, 1, 5, 0, 4); + ioport_value result = 0x3f; + for (unsigned i = 0; 5 > i; ++i) + { + if (BIT(select, i)) + result &= m_key[i]->read(); + } + return result >> Shift; +} + uint16_t gms_2layers_state::unk_r() { return machine().rand(); @@ -1344,46 +1361,102 @@ static INPUT_PORTS_START( baile ) INPUT_PORTS_END static INPUT_PORTS_START( yyhm ) - PORT_INCLUDE( sc2in1 ) - - PORT_MODIFY("IN1") // TODO: likely incomplete - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) + // TODO: missing flip flop and payout/keyout inputs in mahjong mode + // TODO: missing payout/keyout input in joystick mode + PORT_START("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) // also used to select in test mode - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0c00, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<0>)) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) - // Only 1 8-DIP bank on PCB. Dips' effects as per test mode. - PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Test ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, "Voice Announcements" ) PORT_DIPLOCATION("SW1:2") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, "Scoring Type" ) PORT_DIPLOCATION("SW1:4") - PORT_DIPSETTING( 0x0000, "Mahjong Tile Scoring" ) - PORT_DIPSETTING( 0x0008, "Numeric Scoring" ) + PORT_START("IN2") + PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<4>)) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNKNOWN ) + //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify + + PORT_START("KEY0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + PORT_START("KEY4") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + + // Only 1 8-DIP bank on PCB. DIPs' effects as per test mode. + PORT_START("DSW1") + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW1:1") // 遊戲設定 + PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) // 正常 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 開機進入 + PORT_DIPNAME( 0x0002, 0x0002, "Voice Announcements" ) PORT_DIPLOCATION("SW1:2") // 語音報牌 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0002, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:3") // 示範音樂 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0004, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0008, 0x0008, "Score Display" ) PORT_DIPLOCATION("SW1:4") // 計分方式 + PORT_DIPSETTING( 0x0008, "Numbers" ) // 數字計分 + PORT_DIPSETTING( 0x0000, "Circle Tiles" ) // 筒子計分 PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:5") // No effect listed in test mode PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6") // " PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7") // " - PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x0000, "Joystick" ) - PORT_DIPSETTING( 0x0080, "Mahjong" ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Controls) ) PORT_DIPLOCATION("SW1:8") // 操作方式 + PORT_DIPSETTING( 0x0080, "Mahjong" ) // 鍵盤 + PORT_DIPSETTING( 0x0000, DEF_STR(Joystick) ) // 搖桿 INPUT_PORTS_END static INPUT_PORTS_START( ballch ) |