-dynax.cpp: More I/O stuff:

* Added hopper to Mahjong Electron Base games.
* Suppress side effects for Mahjong Electromagnetic Base keyboard read.
* Started moving common mahjong DIP switches to macros.

-toaplan: Cleanup:
* Renamed "reset" member function as it clashes with device_t::reset.
* Removed some pointless tests of required object finders.
* Sorted #includes.

-Tidied some other stuff.
This commit is contained in:
Vas Crabb 2024-11-30 10:39:48 +11:00
parent 27fb4e3b68
commit 2fc18e504a
21 changed files with 540 additions and 633 deletions

View File

@ -39,6 +39,8 @@
#define FUNCNAME __PRETTY_FUNCTION__
#endif
namespace {
class heath_h17_fdc_device : public device_t, public device_h89bus_right_card_interface
{
public:
@ -49,7 +51,7 @@ public:
virtual void write(u8 select_lines, u8 offset, u8 data) override;
virtual u8 read(u8 select_lines, u8 offset) override;
void side_select_w(int state);
[[maybe_unused]] void side_select_w(int state);
protected:
static constexpr u8 MAX_FLOPPY_DRIVES = 3;
@ -360,4 +362,6 @@ void heath_h17_fdc_device::sync_character_received(int state)
m_sync_char_received = bool(!BIT(state, 0));
}
} // anonymous namespace
DEFINE_DEVICE_TYPE_PRIVATE(H89BUS_H_17_FDC, device_h89bus_right_card_interface, heath_h17_fdc_device, "h89_h17_fdc", "Heath H-17 Hard-sectored Controller (H-88-1)");

View File

@ -964,7 +964,7 @@ void dynax_adpcm_state::mjelctrn_io_map(address_map &map)
map(0x80, 0x80).w(FUNC(dynax_adpcm_state::hanamai_keyboard_w)); // keyboard row select
map(0x81, 0x81).portr("COINS"); // Coins
map(0x82, 0x82).r(FUNC(dynax_adpcm_state::mjelctrn_keyboard_1_r)); // P2
map(0x83, 0x83).r(FUNC(dynax_adpcm_state::hanamai_keyboard_0_r)); // P1
map(0x83, 0x83).r(FUNC(dynax_adpcm_state::hjingi_keyboard_0_r)); // P1
map(0x84, 0x84).r(FUNC(dynax_adpcm_state::mjelctrn_dsw_r)); // DSW8 x 4
map(0x85, 0x85).portr("SW1"); // DSW2
map(0xa1, 0xa7).w(m_blitter, FUNC(dynax_blitter_rev2_device::regs_w)); // Blitter
@ -1050,58 +1050,64 @@ uint8_t dynax_state::tenkai_ip_r(offs_t offset)
static const char *const keynames0[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4" };
//static const char *const keynames1[] = { "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" };
uint8_t result = 0xff;
switch (offset)
{
case 0:
case 0:
switch (m_input_sel)
{
switch (m_input_sel)
{
case 0x00:
case 0x80:
return ioport("COINS")->read(); // coins
case 0x00:
case 0x80:
result = ioport("COINS")->read(); // coins
break;
case 0x02:
case 0x82:
// do other bits do anything?
return m_hopper->line_r() ? 0xbf : 0xff;
case 0x02:
case 0x82:
// do other bits do anything?
result = m_hopper->line_r() ? 0xbf : 0xff;
break;
default:
logerror("%s: unmapped ip_sel=%02x read from offs %x\n", machine().describe_context(), m_input_sel, offset);
return 0xff;
}
default:
logerror("%s: unmapped ip_sel=%02x read from offs %x\n", machine().describe_context(), m_input_sel, offset);
}
break;
case 1:
case 1:
switch (m_input_sel)
{
switch (m_input_sel)
case 0x0d:
result = 0xff;
break;
// player 2
case 0x81:
if (m_keyb >= 5)
logerror("%s: unmapped keyb=%02x read\n", machine().describe_context(), m_keyb);
result = 0xff;//ioport(keynames1[m_keyb++])->read();
break;
// player 1
case 0x82:
if (m_input_mode != 0xff)
{
case 0x0d:
return 0xff;
// player 2
case 0x81:
if (m_keyb >= 5)
logerror("%s: unmapped keyb=%02x read\n", machine().describe_context(), m_keyb);
return 0xff;//ioport(keynames1[m_keyb++])->read();
// player 1
case 0x82:
if (m_input_mode != 0xff)
return 0x00;
if (m_keyb >= 5)
{
logerror("%s: unmapped keyb=%02x read\n", machine().describe_context(), m_keyb);
return 0x00;
}
return ioport(keynames0[m_keyb++])->read();
default:
logerror("%s: unmapped ip_sel=%02x read from offs %x\n", machine().describe_context(), m_input_sel, offset);
return 0xff;
result = 0x00;
}
else if (m_keyb >= 5)
{
logerror("%s: unmapped keyb=%02x read\n", machine().describe_context(), m_keyb);
result = 0x00;
}
result = ioport(keynames0[m_keyb])->read();
if (!machine().side_effects_disabled())
++m_keyb;
break;
default:
logerror("%s: unmapped ip_sel=%02x read from offs %x\n", machine().describe_context(), m_input_sel, offset);
}
break;
}
return 0xff;
return result;
}
@ -1112,14 +1118,14 @@ void dynax_state::tenkai_dswsel_w(uint8_t data)
uint8_t dynax_state::tenkai_dsw_r()
{
if (!BIT(m_dsw_sel, 0)) return ioport("DSW0")->read();
if (!BIT(m_dsw_sel, 1)) return ioport("DSW1")->read();
if (!BIT(m_dsw_sel, 2)) return ioport("DSW2")->read();
if (!BIT(m_dsw_sel, 3)) return ioport("DSW3")->read();
if (!BIT(m_dsw_sel, 4)) return ioport("DSW4")->read();
logerror("%s: unmapped dsw %02x read\n", machine().describe_context(), m_dsw_sel);
uint8_t result = 0xff;
if (!BIT(m_dsw_sel, 0)) result &= ioport("DSW0")->read();
if (!BIT(m_dsw_sel, 1)) result &= ioport("DSW1")->read();
if (!BIT(m_dsw_sel, 2)) result &= ioport("DSW2")->read();
if (!BIT(m_dsw_sel, 3)) result &= ioport("DSW3")->read();
if (!BIT(m_dsw_sel, 4)) result &= ioport("DSW4")->read();
return 0xff;
return result;
}
uint8_t dynax_state::tenkai_palette_r(offs_t offset)
@ -1671,6 +1677,73 @@ INPUT_PORTS_END
INPUT_PORTS_END
#endif
#define MAHJONG_COIN_TEST(ct, cm) \
PORT_START("COINS") \
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION(ct, cm, EQUALS, 0) /* Pay */ \
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION(ct, cm, EQUALS, cm) \
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* 18B */ \
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE /* Test */ \
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) /* Analyzer */ \
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) /* Memory Reset */ \
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) /* Note */ \
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) /* Coin */ \
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service */
#define MAHJONG_PAYOUT_RATE(shift, loc) \
PORT_DIPNAME( 0x0f << shift, 0x07 << shift, "Payout Rate" ) PORT_DIPLOCATION(loc) \
PORT_DIPSETTING( 0x00 << shift, "50%" ) \
PORT_DIPSETTING( 0x01 << shift, "53%" ) \
PORT_DIPSETTING( 0x02 << shift, "56%" ) \
PORT_DIPSETTING( 0x03 << shift, "59%" ) \
PORT_DIPSETTING( 0x04 << shift, "62%" ) \
PORT_DIPSETTING( 0x05 << shift, "65%" ) \
PORT_DIPSETTING( 0x06 << shift, "68%" ) \
PORT_DIPSETTING( 0x07 << shift, "71%" ) \
PORT_DIPSETTING( 0x08 << shift, "75%" ) \
PORT_DIPSETTING( 0x09 << shift, "78%" ) \
PORT_DIPSETTING( 0x0a << shift, "81%" ) \
PORT_DIPSETTING( 0x0b << shift, "84%" ) \
PORT_DIPSETTING( 0x0c << shift, "87%" ) \
PORT_DIPSETTING( 0x0d << shift, "90%" ) \
PORT_DIPSETTING( 0x0e << shift, "93%" ) \
PORT_DIPSETTING( 0x0f << shift, "96%" )
#define MAHJONG_ODDS_RATE(shift, loc) \
PORT_DIPNAME( 0x03 << shift, 0x00 << shift, "Odds Rate" ) PORT_DIPLOCATION(loc) \
PORT_DIPSETTING( 0x03 << shift, "1 2 4 8 12 16 24 32" ) \
PORT_DIPSETTING( 0x00 << shift, "1 2 3 5 8 15 30 50" ) \
PORT_DIPSETTING( 0x01 << shift, "1 2 3 5 10 25 50 100" ) \
PORT_DIPSETTING( 0x02 << shift, "1 2 3 5 10 50 100 200" )
#define MAHJONG_COINAGE(shift, loc) \
PORT_DIPNAME( 0x03 << shift, 0x03 << shift, DEF_STR(Coinage) ) PORT_DIPLOCATION(loc) /*   */ \
PORT_DIPSETTING( 0x03 << shift, DEF_STR(1C_1C) ) /* 1コイン  1プレイ */ \
PORT_DIPSETTING( 0x02 << shift, DEF_STR(1C_2C) ) /* 1コイン  2プレイ */ \
PORT_DIPSETTING( 0x01 << shift, DEF_STR(1C_5C) ) /* 1コイン  5プレイ */ \
PORT_DIPSETTING( 0x00 << shift, "1 Coin/10 Credits" ) /* 1コイン 10プレイ */
#define MAHJONG_NOTE_CREDITS(shift, loc, ct, cs) \
PORT_DIPNAME( 0x01 << shift, 0x00 << shift, "Credits Per Note" ) PORT_DIPLOCATION(loc) /*   */ \
PORT_DIPSETTING( 0x01 << shift, "5" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x03 << cs) /* × */ \
PORT_DIPSETTING( 0x01 << shift, "10" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x02 << cs) \
PORT_DIPSETTING( 0x01 << shift, "25" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x01 << cs) \
PORT_DIPSETTING( 0x01 << shift, "50" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x00 << cs) \
PORT_DIPSETTING( 0x00 << shift, "10" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x03 << cs) /* × */ \
PORT_DIPSETTING( 0x00 << shift, "20" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x02 << cs) \
PORT_DIPSETTING( 0x00 << shift, "50" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x01 << cs) \
PORT_DIPSETTING( 0x00 << shift, "100" ) PORT_CONDITION(ct, 0x03 << cs, EQUALS, 0x00 << cs)
#define MAHJONG_YAKUMAN_BONUS(shift, loc) \
PORT_DIPNAME( 0x07 << shift, 0x04 << shift, "Yakuman Bonus Cycle" ) PORT_DIPLOCATION(loc) /* 役満ボーナスの設定周期 */ \
PORT_DIPSETTING( 0x07 << shift, "None" ) /* 無し */ \
PORT_DIPSETTING( 0x06 << shift, "First time only" ) /* 初回のみ */ \
PORT_DIPSETTING( 0x05 << shift, "Every 300 coins" ) /* 300コイン毎 */ \
PORT_DIPSETTING( 0x04 << shift, "Every 500 coins" ) /* 500コイン毎 */ \
PORT_DIPSETTING( 0x03 << shift, "Every 700 coins" ) /* 700コイン毎 */ \
PORT_DIPSETTING( 0x02 << shift, "Every 1000 coins" ) /* 1000コイン毎 */ \
/* PORT_DIPSETTING( 0x01 << shift, "Every 1000 coins" )*/ \
/* PORT_DIPSETTING( 0x00 << shift, "Every 1000 coins" )*/
static INPUT_PORTS_START( cdracula )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
@ -2981,52 +3054,20 @@ INPUT_PORTS_END
static INPUT_PORTS_START( mjembase )
PORT_START("DSW2") /* DIP1, 7c20 (port $1e) */
PORT_DIPNAME( 0x0f, 0x07, "Payout Rate" ) PORT_DIPLOCATION("SW 1:1,2,3,4")
PORT_DIPSETTING( 0x00, "50%" )
PORT_DIPSETTING( 0x01, "53%" )
PORT_DIPSETTING( 0x02, "56%" )
PORT_DIPSETTING( 0x03, "59%" )
PORT_DIPSETTING( 0x04, "62%" )
PORT_DIPSETTING( 0x05, "65%" )
PORT_DIPSETTING( 0x06, "68%" )
PORT_DIPSETTING( 0x07, "71%" )
PORT_DIPSETTING( 0x08, "75%" )
PORT_DIPSETTING( 0x09, "78%" )
PORT_DIPSETTING( 0x0a, "81%" )
PORT_DIPSETTING( 0x0b, "84%" )
PORT_DIPSETTING( 0x0c, "87%" )
PORT_DIPSETTING( 0x0d, "90%" )
PORT_DIPSETTING( 0x0e, "93%" )
PORT_DIPSETTING( 0x0f, "96%" )
MAHJONG_PAYOUT_RATE(0, "SW 1:1,2,3,4")
PORT_DIPNAME( 0x30, 0x10, "Maximum Bet" ) PORT_DIPLOCATION("SW 1:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_DIPNAME( 0x40, 0x00, "Credits Per Note" ) PORT_DIPLOCATION("SW 1:7")
PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x0c)
PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x08)
PORT_DIPSETTING( 0x40, "25" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x04)
PORT_DIPSETTING( 0x40, "50" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x00)
PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x0c)
PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x08)
PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x04)
PORT_DIPSETTING( 0x00, "100" ) PORT_CONDITION("DSW1", 0x0c, EQUALS, 0x00)
MAHJONG_NOTE_CREDITS(6, "SW 1:7", "DSW1", 2)
PORT_DIPNAME( 0x80, 0x80, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW 1:8")
PORT_DIPSETTING( 0x80, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_START("DSW1") /* DIP2, 7c21 (port $1c) */
PORT_DIPNAME( 0x03, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW 2:1,2")
PORT_DIPSETTING( 0x03, "1 2 4 8 12 16 24 32" )
PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
PORT_DIPSETTING( 0x01, "1 2 3 5 10 25 50 100" )
PORT_DIPSETTING( 0x02, "1 2 3 5 10 50 100 200" )
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR(1C_1C) )
PORT_DIPSETTING( 0x08, DEF_STR(1C_2C) )
PORT_DIPSETTING( 0x04, DEF_STR(1C_5C) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
MAHJONG_ODDS_RATE(0, "SW 2:1,2")
MAHJONG_COINAGE(2, "SW 2:3,4")
PORT_DIPNAME( 0x30, 0x30, "Minimum Bet" ) PORT_DIPLOCATION("SW 2:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "2" )
@ -3084,7 +3125,7 @@ static INPUT_PORTS_START( mjembase )
PORT_DIPNAME( 0x20, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW 4:6")
PORT_DIPSETTING( 0x20, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x40, 0x40, "Gal Selectt" ) PORT_DIPLOCATION("SW 4:7")
PORT_DIPNAME( 0x40, 0x40, "Gal Select" ) PORT_DIPLOCATION("SW 4:7")
PORT_DIPSETTING( 0x40, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x80, 0x80, "Gal H Pose" ) PORT_DIPLOCATION("SW 4:8")
@ -3096,32 +3137,15 @@ static INPUT_PORTS_START( mjembase )
PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
PORT_CONFSETTING( 0xff, DEF_STR( On ) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // Pay
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) // Note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
MAHJONG_COIN_TEST("DSW1", 0x40)
PORT_INCLUDE( MAHJONG_KEYS_BET )
INPUT_PORTS_END
// DIP switch locations verified on mjelctrb PCB
// DIP switch locations verified on mjelctrb PCB - disagrees with input test
static INPUT_PORTS_START( mjelct3 )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
MAHJONG_COIN_TEST("DSW1", 0x40)
PORT_INCLUDE( MAHJONG_KEYS_BET )
@ -3135,64 +3159,34 @@ static INPUT_PORTS_START( mjelct3 )
PORT_DIPSETTING( 0x00, "1" ) // 32
PORT_DIPSETTING( 0x01, "2" ) // 64
PORT_DIPSETTING( 0x02, "3" ) // c8
PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW3:3,4")
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
PORT_DIPNAME( 0x30, 0x30, "Min Pay?" ) PORT_DIPLOCATION("SW3:5,6")
MAHJONG_COINAGE(2, "SW3:3,4")
PORT_DIPNAME( 0x30, 0x30, "Minimum Bet" ) PORT_DIPLOCATION("SW3:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "2" )
PORT_DIPSETTING( 0x10, "3" )
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPNAME( 0x40, 0x40, "Allow Coin Out" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Win A Prize?" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW3:7")
PORT_DIPSETTING( 0x40, "Key-out" )
PORT_DIPSETTING( 0x00, "Hopper" )
PORT_DIPNAME( 0x80, 0x80, "Hopper Polarity" ) PORT_DIPLOCATION("SW3:8")
PORT_DIPSETTING( 0x80, DEF_STR(Normal) )
PORT_DIPSETTING( 0x00, "Inverted" )
PORT_START("DSW1") /* 7c20 (select = 40) */
PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" ) PORT_DIPLOCATION("SW4:1,2,3,4")
PORT_DIPSETTING( 0x00, "50" )
PORT_DIPSETTING( 0x01, "53" )
PORT_DIPSETTING( 0x02, "56" )
PORT_DIPSETTING( 0x03, "59" )
PORT_DIPSETTING( 0x04, "62" )
PORT_DIPSETTING( 0x05, "65" )
PORT_DIPSETTING( 0x06, "68" )
PORT_DIPSETTING( 0x07, "71" )
PORT_DIPSETTING( 0x08, "75" )
PORT_DIPSETTING( 0x09, "78" )
PORT_DIPSETTING( 0x0a, "81" )
PORT_DIPSETTING( 0x0b, "84" )
PORT_DIPSETTING( 0x0c, "87" )
PORT_DIPSETTING( 0x0d, "90" )
PORT_DIPSETTING( 0x0e, "93" )
PORT_DIPSETTING( 0x0f, "96" )
PORT_DIPNAME( 0x30, 0x30, "Max Bet" ) PORT_DIPLOCATION("SW4:5,6")
MAHJONG_PAYOUT_RATE(0, "SW4:1,2,3,4")
PORT_DIPNAME( 0x30, 0x30, "Maximum Bet" ) PORT_DIPLOCATION("SW4:5,6")
PORT_DIPSETTING( 0x30, "1" )
PORT_DIPSETTING( 0x20, "5" )
PORT_DIPSETTING( 0x10, "10" )
PORT_DIPSETTING( 0x00, "20" )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW4:7")
PORT_DIPSETTING( 0x40, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" )
MAHJONG_NOTE_CREDITS(6, "SW4:7", "DSW0", 2)
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW4:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2") /* 7c22 (select = 80) */
PORT_DIPNAME( 0x07, 0x07, "YAKUMAN Bonus" ) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, "Cut" )
PORT_DIPSETTING( 0x06, "1 T" )
PORT_DIPSETTING( 0x05, "300" )
PORT_DIPSETTING( 0x04, "500" )
PORT_DIPSETTING( 0x03, "700" )
PORT_DIPSETTING( 0x02, "1000" )
// PORT_DIPSETTING( 0x01, "1000" )
// PORT_DIPSETTING( 0x00, "1000" )
PORT_DIPNAME( 0x08, 0x08, "YAKU times" ) PORT_DIPLOCATION("SW2:4")
MAHJONG_YAKUMAN_BONUS(0, "SW2:1,2,3")
PORT_DIPNAME( 0x08, 0x08, "Yakuman Bonuses Per Cycle" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "1" )
PORT_DIPSETTING( 0x00, "2" )
PORT_DIPNAME( 0x10, 0x10, "Win Rate?" ) PORT_DIPLOCATION("SW2:5")
@ -3201,7 +3195,7 @@ static INPUT_PORTS_START( mjelct3 )
PORT_DIPNAME( 0x20, 0x20, "Draw New Tile (Part 3 Only)" ) PORT_DIPLOCATION("SW2:6")
PORT_DIPSETTING( 0x00, "Automatic" )
PORT_DIPSETTING( 0x20, "Manual" )
PORT_DIPNAME( 0x40, 0x40, "DonDen Key" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPNAME( 0x40, 0x00, "Don Den Button" ) PORT_DIPLOCATION("SW2:7")
PORT_DIPSETTING( 0x40, "A" )
PORT_DIPSETTING( 0x00, "Flip Flop" )
PORT_DIPNAME( 0x80, 0x00, "Subtitle" ) PORT_DIPLOCATION("SW2:8")
@ -3210,8 +3204,8 @@ static INPUT_PORTS_START( mjelct3 )
PORT_START("DSW3") /* 7c23 (select = c0) */
PORT_DIPNAME( 0x01, 0x01, "Last Chance" ) PORT_DIPLOCATION("SW5:1")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
PORT_DIPSETTING( 0x00, DEF_STR(Off) )
PORT_DIPSETTING( 0x01, DEF_STR(On) )
PORT_DIPNAME( 0x02, 0x02, "Pay Rate?" ) PORT_DIPLOCATION("SW5:2")
PORT_DIPSETTING( 0x02, DEF_STR( High ) )
PORT_DIPSETTING( 0x00, DEF_STR( Low ) )
@ -3221,15 +3215,15 @@ static INPUT_PORTS_START( mjelct3 )
PORT_DIPNAME( 0x08, 0x08, "In-Game Bet?" ) PORT_DIPLOCATION("SW5:4")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW5:5")
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x10, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW5:5")
PORT_DIPSETTING( 0x10, DEF_STR(Off ) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x20, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW5:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, "Select Girl" ) PORT_DIPLOCATION("SW5:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPSETTING( 0x20, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x40, 0x40, "Gal Select" ) PORT_DIPLOCATION("SW5:7")
PORT_DIPSETTING( 0x40, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) )
PORT_DIPNAME( 0x80, 0x00, "Nudity" ) PORT_DIPLOCATION("SW5:8")
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_DIPSETTING( 0x80, DEF_STR( No ) ) // Moles On Gal's Face
@ -3318,15 +3312,7 @@ static INPUT_PORTS_START( mjelctrn )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("DSW2") /* 7c22 (select = 80) */
PORT_DIPNAME( 0x07, 0x04, "Yakuman Bonus Cycle" ) PORT_DIPLOCATION("SW2:1,2,3")
PORT_DIPSETTING( 0x07, "None" )
PORT_DIPSETTING( 0x06, "First time only" )
PORT_DIPSETTING( 0x05, "Every 300 coins" )
PORT_DIPSETTING( 0x04, "Every 500 coins" )
PORT_DIPSETTING( 0x03, "Every 700 coins" )
PORT_DIPSETTING( 0x02, "Every 1000 coins" )
// PORT_DIPSETTING( 0x01, "Every 1000 coins" )
// PORT_DIPSETTING( 0x00, "Every 1000 coins" )
MAHJONG_YAKUMAN_BONUS(0, "SW2:1,2,3")
PORT_DIPNAME( 0x08, 0x08, "Yakuman Bonuses Per Cycle" ) PORT_DIPLOCATION("SW2:4")
PORT_DIPSETTING( 0x08, "1" )
PORT_DIPSETTING( 0x00, "2" )
@ -3601,28 +3587,8 @@ static INPUT_PORTS_START( tenkai )
// There is an additional 4-switch bank (SW 5) for selecting the wiring options.
PORT_START("DSW0")
PORT_DIPNAME( 0x0f, 0x07, "Payout Rate" ) PORT_DIPLOCATION("SW 1:1,2,3,4") //  
PORT_DIPSETTING( 0x00, "50%" )
PORT_DIPSETTING( 0x01, "53%" )
PORT_DIPSETTING( 0x02, "56%" )
PORT_DIPSETTING( 0x03, "59%" )
PORT_DIPSETTING( 0x04, "62%" )
PORT_DIPSETTING( 0x05, "65%" )
PORT_DIPSETTING( 0x06, "68%" )
PORT_DIPSETTING( 0x07, "71%" )
PORT_DIPSETTING( 0x08, "75%" )
PORT_DIPSETTING( 0x09, "78%" )
PORT_DIPSETTING( 0x0a, "81%" )
PORT_DIPSETTING( 0x0b, "84%" )
PORT_DIPSETTING( 0x0c, "87%" )
PORT_DIPSETTING( 0x0d, "90%" )
PORT_DIPSETTING( 0x0e, "93%" )
PORT_DIPSETTING( 0x0f, "96%" )
PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW 1:5,6") //  
PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" )
PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" )
PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" )
PORT_DIPSETTING( 0x20, "1 2 3 5 10 50 100 200" )
MAHJONG_PAYOUT_RATE(0, "SW 1:1,2,3,4") //  
MAHJONG_ODDS_RATE(4, "SW 1:5,6") //  
PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW 1:7,8") //
PORT_DIPSETTING( 0xc0, "1" )
PORT_DIPSETTING( 0x80, "5" )
@ -3630,25 +3596,13 @@ static INPUT_PORTS_START( tenkai )
PORT_DIPSETTING( 0x00, "20" )
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:1,2") //  
PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) // 1コイン  1プレイ
PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) // 1コイン  2プレイ
PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) // 1コイン  5プレイ
PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) // 1コイン 10プレイ
MAHJONG_COINAGE(0, "SW 2:1,2") //  
PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW 2:3,4") // ゲーム・スタート時の最低レート数
PORT_DIPSETTING( 0x0c, "1" ) // レート 1
PORT_DIPSETTING( 0x08, "2" ) // レート 2
PORT_DIPSETTING( 0x04, "3" ) // レート 3
PORT_DIPSETTING( 0x00, "5" ) // レート 5
PORT_DIPNAME( 0x70, 0x40, "Yakuman Bonus Cycle" ) PORT_DIPLOCATION("SW 2:5,6,7") // 役満ボーナスの設定周期
PORT_DIPSETTING( 0x70, "None" ) // 無し
PORT_DIPSETTING( 0x60, "First time only" ) // 初回のみ
PORT_DIPSETTING( 0x50, "Every 300 coins" ) // 300コイン毎
PORT_DIPSETTING( 0x40, "Every 500 coins" ) // 500コイン毎
PORT_DIPSETTING( 0x30, "Every 700 coins" ) // 700コイン毎
PORT_DIPSETTING( 0x20, "Every 1000 coins" ) // 1000コイン毎
// PORT_DIPSETTING( 0x10, "Every 1000 coins" )
// PORT_DIPSETTING( 0x00, "Every 1000 coins" )
MAHJONG_YAKUMAN_BONUS(4, "SW 2:5,6,7") // 役満ボーナスの設定周期
PORT_DIPNAME( 0x80, 0x00, "Yakuman Bonuses Per Cycle" ) PORT_DIPLOCATION("SW 2:8") // 役満ボーナスの回数設定周期毎に
PORT_DIPSETTING( 0x00, "1" ) // 1回
PORT_DIPSETTING( 0x80, "2" ) // 2回
@ -3706,15 +3660,7 @@ static INPUT_PORTS_START( tenkai )
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有
PORT_START("DSW4") /* (top) */
PORT_DIPNAME( 0x01, 0x00, "Credits Per Note" ) PORT_DIPLOCATION("SW 1:9") //  
PORT_DIPSETTING( 0x01, "5" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x03) // ×
PORT_DIPSETTING( 0x01, "10" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x01, "25" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x01, "50" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x00)
PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x03) // ×
PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x00, "100" ) PORT_CONDITION("DSW1", 0x03, EQUALS, 0x00)
MAHJONG_NOTE_CREDITS(0, "SW 1:9", "DSW1", 0) //  
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW 1:10") // モニター画面反転
PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 通常
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転
@ -3740,16 +3686,7 @@ static INPUT_PORTS_START( tenkai )
PORT_DIPSETTING( 0x80, DEF_STR(No) )
PORT_DIPSETTING( 0x00, DEF_STR(Yes) )
PORT_START("COINS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) // Pay (default assignment conflicts with I)
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE // Test
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) // Note (default assignment conflicts with Small)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) // Service
MAHJONG_COIN_TEST("DSW2", 0x01)
PORT_INCLUDE( MAHJONG_KEYS_BET )
INPUT_PORTS_END
@ -4770,8 +4707,11 @@ void dynax_adpcm_state::mjelctrn(machine_config &config)
m_mainlatch->q_out_cb<2>().set(FUNC(dynax_adpcm_state::layer_half2_w));
// Q3, Q4 seem to be related to wrap around enable
subdevice<ls259_device>("outlatch")->q_out_cb<2>().set(m_hopper, FUNC(hopper_device::motor_w));
config.device_remove("mainirq");
HOPPER(config, m_hopper, attotime::from_msec(50));
m_screen->screen_vblank().set(m_maincpu, FUNC(tmpz84c015_device::trg0)).invert();
m_blitter->ready_cb().set(m_maincpu, FUNC(tmpz84c015_device::trg1));
@ -4796,8 +4736,6 @@ void dynax_adpcm_state::mjembase(machine_config &config)
config.device_remove("outlatch");
HOPPER(config, m_hopper, attotime::from_msec(50));
MCFG_VIDEO_START_OVERRIDE(dynax_adpcm_state, mjembase)
}

View File

@ -40,6 +40,7 @@
#include "bus/rs232/rs232.h"
#include "cpu/z80/z80.h"
#include "imagedev/floppy.h"
#include "imagedev/snapquik.h"
#include "machine/am9517a.h"
#include "machine/i8255.h"
#include "machine/mc146818.h"
@ -50,13 +51,12 @@
#include "machine/upd765.h"
#include "machine/z80sio.h"
#include "sound/spkrdev.h"
#include "speaker.h"
#include "video/upd7220.h"
#include "emupal.h"
#include "emupal.h"
#include "speaker.h"
#include "screen.h"
#include "softlist_dev.h"
#include "imagedev/snapquik.h"
namespace {

View File

@ -3,20 +3,20 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/nec/v25.h"
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -51,7 +51,7 @@ public:
, m_coincounter(*this, "coincounter")
{ }
void batsugun(machine_config &config);
void batsugun(machine_config &config) ATTR_COLD;
protected:
virtual void machine_reset() override ATTR_COLD;
@ -74,7 +74,7 @@ private:
void screen_vblank(int state);
void reset(int state);
void reset_audiocpu(int state);
optional_shared_ptr<u8> m_shared_ram; // 8 bit RAM shared between 68K and sound CPU
optional_device<cpu_device> m_audiocpu;
@ -190,7 +190,7 @@ void batsugun_state::screen_vblank(int state)
}
void batsugun_state::reset(int state)
void batsugun_state::reset_audiocpu(int state)
{
if (state)
coin_sound_reset_w(0);
@ -198,7 +198,7 @@ void batsugun_state::reset(int state)
void batsugun_state::machine_reset()
{
if (m_audiocpu.found())
if (m_audiocpu)
coin_sound_reset_w(0);
}
@ -389,7 +389,7 @@ void batsugun_state::batsugun(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &batsugun_state::batsugun_68k_mem);
m_maincpu->reset_cb().set(FUNC(batsugun_state::reset));
m_maincpu->reset_cb().set(FUNC(batsugun_state::reset_audiocpu));
v25_device &audiocpu(V25(config, m_audiocpu, 32_MHz_XTAL/2)); // NEC V25 type Toaplan marked CPU ???
audiocpu.set_addrmap(AS_PROGRAM, &batsugun_state::v25_mem);

View File

@ -3,15 +3,10 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplan_v25_tables.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/nec/v25.h"
@ -19,6 +14,11 @@
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -35,10 +35,10 @@ dogyuun - In the location test version, if you are hit while you have a bomb, t
namespace {
class dogyuun_base_state : public driver_device
class dogyuun_state : public driver_device
{
public:
dogyuun_base_state(const machine_config &mconfig, device_type type, const char *tag)
dogyuun_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_audiocpu(*this, "audiocpu")
@ -50,7 +50,8 @@ public:
, m_screen(*this, "screen")
{ }
void dogyuun_base(machine_config &config);
void dogyuun(machine_config &config) ATTR_COLD;
void dogyuunto(machine_config &config) ATTR_COLD;
protected:
virtual void machine_reset() override ATTR_COLD;
@ -59,9 +60,9 @@ protected:
u8 shared_ram_r(offs_t offset) { return m_shared_ram[offset]; }
void shared_ram_w(offs_t offset, u8 data) { m_shared_ram[offset] = data; }
void coin_sound_reset_w(u8 data);
template <unsigned B> void coin_sound_reset_w(u8 data);
u8 m_sound_reset_bit = 0;
void dogyuun_base(machine_config &config) ATTR_COLD;
required_device<m68000_base_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
@ -75,7 +76,12 @@ private:
void screen_vblank(int state);
void reset(int state);
void reset_audiocpu(int state);
void dogyuun_68k_mem(address_map &map) ATTR_COLD;
void v25_mem(address_map &map) ATTR_COLD;
void dogyuunto_68k_mem(address_map &map) ATTR_COLD;
void dogyuunto_sound_z80_mem(address_map &map) ATTR_COLD;
required_device<toaplan_coincounter_device> m_coincounter;
required_device<screen_device> m_screen;
@ -83,50 +89,22 @@ private:
bitmap_ind16 m_secondary_render_bitmap;
};
class dogyuun_state : public dogyuun_base_state
{
public:
dogyuun_state(const machine_config &mconfig, device_type type, const char *tag)
: dogyuun_base_state(mconfig, type, tag)
{
m_sound_reset_bit = 0x20;
}
void dogyuun(machine_config &config);
private:
void dogyuun_68k_mem(address_map &map) ATTR_COLD;
void v25_mem(address_map &map) ATTR_COLD;
};
class dogyuunto_state : public dogyuun_base_state
{
public:
dogyuunto_state(const machine_config &mconfig, device_type type, const char *tag)
: dogyuun_base_state(mconfig, type, tag)
{
m_sound_reset_bit = 0x10;
}
void dogyuunto(machine_config &config);
private:
void dogyuunto_68k_mem(address_map &map) ATTR_COLD;
void dogyuunto_sound_z80_mem(address_map &map) ATTR_COLD;
};
void dogyuun_base_state::reset(int state)
void dogyuun_state::reset_audiocpu(int state)
{
if (state)
coin_sound_reset_w(0);
{
m_coincounter->coin_w(0);
m_audiocpu->set_input_line(ASSERT_LINE);
}
}
void dogyuun_base_state::machine_reset()
void dogyuun_state::machine_reset()
{
coin_sound_reset_w(0);
m_coincounter->coin_w(0);
m_audiocpu->set_input_line(ASSERT_LINE);
}
void dogyuun_base_state::video_start()
void dogyuun_state::video_start()
{
m_screen->register_screen_bitmap(m_custom_priority_bitmap);
m_secondary_render_bitmap.reset();
@ -135,7 +113,7 @@ void dogyuun_base_state::video_start()
m_vdp[1]->custom_priority_bitmap = &m_custom_priority_bitmap;
}
void dogyuun_base_state::screen_vblank(int state)
void dogyuun_state::screen_vblank(int state)
{
if (state) // rising edge
{
@ -144,7 +122,7 @@ void dogyuun_base_state::screen_vblank(int state)
}
}
u32 dogyuun_base_state::screen_update_dogyuun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
u32 dogyuun_state::screen_update_dogyuun(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0, cliprect);
m_custom_priority_bitmap.fill(0, cliprect);
@ -286,10 +264,11 @@ static INPUT_PORTS_START( dogyuunt )
PORT_CONFSETTING( 0x00f0, "Japan (Taito Corp.)" )
INPUT_PORTS_END
void dogyuun_base_state::coin_sound_reset_w(u8 data)
template <unsigned B>
void dogyuun_state::coin_sound_reset_w(u8 data)
{
m_coincounter->coin_w(data & ~m_sound_reset_bit);
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & m_sound_reset_bit) ? CLEAR_LINE : ASSERT_LINE);
m_coincounter->coin_w(data & ~(u8(1) << B));
m_audiocpu->set_input_line(INPUT_LINE_RESET, BIT(data, B) ? CLEAR_LINE : ASSERT_LINE);
}
void dogyuun_state::dogyuun_68k_mem(address_map &map)
@ -299,7 +278,7 @@ void dogyuun_state::dogyuun_68k_mem(address_map &map)
map(0x200010, 0x200011).portr("IN1");
map(0x200014, 0x200015).portr("IN2");
map(0x200018, 0x200019).portr("SYS");
map(0x20001d, 0x20001d).w(FUNC(dogyuun_state::coin_sound_reset_w)); // Coin count/lock + v25 reset line
map(0x20001d, 0x20001d).w(FUNC(dogyuun_state::coin_sound_reset_w<5>)); // Coin count/lock + v25 reset line
map(0x210000, 0x21ffff).rw(FUNC(dogyuun_state::shared_ram_r), FUNC(dogyuun_state::shared_ram_w)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp[0], FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
@ -308,12 +287,12 @@ void dogyuun_state::dogyuun_68k_mem(address_map &map)
}
void dogyuunto_state::dogyuunto_68k_mem(address_map &map)
void dogyuun_state::dogyuunto_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram();
map(0x218000, 0x218fff).rw(FUNC(dogyuunto_state::shared_ram_r), FUNC(dogyuunto_state::shared_ram_w)).umask16(0x00ff); // reads the same area as the finished game on startup, but then uses only this part
map(0x21c01d, 0x21c01d).w(FUNC(dogyuunto_state::coin_sound_reset_w)); // Coin count/lock + Z80 reset line
map(0x218000, 0x218fff).rw(FUNC(dogyuun_state::shared_ram_r), FUNC(dogyuun_state::shared_ram_w)).umask16(0x00ff); // reads the same area as the finished game on startup, but then uses only this part
map(0x21c01d, 0x21c01d).w(FUNC(dogyuun_state::coin_sound_reset_w<4>)); // Coin count/lock + Z80 reset line
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
@ -325,7 +304,7 @@ void dogyuunto_state::dogyuunto_68k_mem(address_map &map)
map(0x700000, 0x700001).r(m_vdp[0], FUNC(gp9001vdp_device::vdpcount_r)); // test bit 8
}
void dogyuunto_state::dogyuunto_sound_z80_mem(address_map &map)
void dogyuun_state::dogyuunto_sound_z80_mem(address_map &map)
{
map(0x0000, 0x7fff).rom();
map(0xc000, 0xc7ff).ram().share(m_shared_ram);
@ -340,11 +319,11 @@ void dogyuun_state::v25_mem(address_map &map)
map(0x80000, 0x87fff).mirror(0x78000).ram().share(m_shared_ram);
}
void dogyuun_base_state::dogyuun_base(machine_config &config)
void dogyuun_state::dogyuun_base(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, 25_MHz_XTAL/2); /* verified on pcb */
m_maincpu->reset_cb().set(FUNC(dogyuun_base_state::reset));
m_maincpu->reset_cb().set(FUNC(dogyuun_state::reset_audiocpu));
TOAPLAN_COINCOUNTER(config, m_coincounter, 0);
@ -352,8 +331,8 @@ void dogyuun_base_state::dogyuun_base(machine_config &config)
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_video_attributes(VIDEO_UPDATE_BEFORE_VBLANK);
m_screen->set_raw(27_MHz_XTAL/4, 432, 0, 320, 262, 0, 240);
m_screen->set_screen_update(FUNC(dogyuun_base_state::screen_update_dogyuun));
m_screen->screen_vblank().set(FUNC(dogyuun_base_state::screen_vblank));
m_screen->set_screen_update(FUNC(dogyuun_state::screen_update_dogyuun));
m_screen->screen_vblank().set(FUNC(dogyuun_state::screen_vblank));
m_screen->set_palette(m_palette);
PALETTE(config, m_palette).set_format(palette_device::xBGR_555, gp9001vdp_device::VDP_PALETTE_LENGTH);
@ -390,15 +369,15 @@ void dogyuun_state::dogyuun(machine_config& config)
}
void dogyuunto_state::dogyuunto(machine_config &config)
void dogyuun_state::dogyuunto(machine_config &config)
{
dogyuun_base(config);
m_maincpu->set_addrmap(AS_PROGRAM, &dogyuunto_state::dogyuunto_68k_mem);
m_maincpu->set_addrmap(AS_PROGRAM, &dogyuun_state::dogyuunto_68k_mem);
m_maincpu->set_clock(24_MHz_XTAL / 2); // 24 MHz instead of 25
z80_device &audiocpu(Z80(config, "audiocpu", 27_MHz_XTAL / 8)); // guessed divisor
audiocpu.set_addrmap(AS_PROGRAM, &dogyuunto_state::dogyuunto_sound_z80_mem);
audiocpu.set_addrmap(AS_PROGRAM, &dogyuun_state::dogyuunto_sound_z80_mem);
m_oki->set_clock(1.056_MHz_XTAL); // blue resonator 1056J
}
@ -524,4 +503,4 @@ GAME( 1992, dogyuun, 0, dogyuun, dogyuun, dogyuun_state, empt
GAME( 1992, dogyuuna, dogyuun, dogyuun, dogyuuna, dogyuun_state, empty_init, ROT270, "Toaplan", "Dogyuun (older set)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, dogyuunb, dogyuun, dogyuun, dogyuunt, dogyuun_state, empty_init, ROT270, "Toaplan", "Dogyuun (oldest set)", MACHINE_SUPPORTS_SAVE ) // maybe a newer location test version, instead
GAME( 1992, dogyuunt, dogyuun, dogyuun, dogyuunt, dogyuun_state, empty_init, ROT270, "Toaplan", "Dogyuun (10/9/1992 location test)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, dogyuunto, dogyuun, dogyuunto, dogyuunt, dogyuunto_state, empty_init, ROT270, "Toaplan", "Dogyuun (8/25/1992 location test)", MACHINE_SUPPORTS_SAVE )
GAME( 1992, dogyuunto, dogyuun, dogyuunto, dogyuunt, dogyuun_state, empty_init, ROT270, "Toaplan", "Dogyuun (8/25/1992 location test)", MACHINE_SUPPORTS_SAVE )

View File

@ -20,6 +20,7 @@
#include "emu.h"
#include "toaplipt.h"
#include "toaplan_v25_tables.h"
#include "gp9001.h"
@ -57,10 +58,10 @@ public:
{ }
public:
void dt7(machine_config &config);
void dt7(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override;
virtual void video_start() override ATTR_COLD;
private:
void dt7_reset(int state);
@ -83,8 +84,6 @@ private:
uint8_t unmapped_v25_io1_r();
uint8_t unmapped_v25_io2_r();
uint8_t m_ioport_state = 0x00;
uint8_t read_port_t();
uint8_t read_port_2();
void write_port_2(uint8_t data);
@ -94,6 +93,8 @@ private:
void screen_vblank(int state);
uint8_t m_ioport_state = 0x00;
tilemap_t *m_tx_tilemap[2]; /* Tilemap for extra-text-layer */
bitmap_ind8 m_custom_priority_bitmap;
@ -216,31 +217,31 @@ void dt7_state::write_port_2(uint8_t data)
// hacks because the sound CPU isn't running properly
u8 dt7_state::dt7_shared_ram_hack_r(offs_t offset)
{
u16 ret = m_shared_ram[offset];
u16 ret = m_shared_ram[offset];
u32 addr = (offset * 2) + 0x610000;
u32 addr = (offset * 2) + 0x610000;
if (addr == 0x061f00c)
return ioport("SYS")->read();// machine().rand();
if (addr == 0x061f00c)
return ioport("SYS")->read();// machine().rand();
//return ret;
//return ret;
u32 pc = m_maincpu->pc();
if (pc == 0x7d84)
return 0xff;
if (addr == 0x061d000) // settings (from EEPROM?) including flipscreen
return 0x00;
if (addr == 0x061d002) // settings (from EEPROM?) dipswitch?
return 0x00;
if (addr == 0x061d004) // settings (from EEPROM?) region
return 0xff;
if (addr == 0x061f004)
return ioport("IN1")->read(); ;// machine().rand(); // p1 inputs
if (addr == 0x061f006)
return ioport("IN2")->read();// machine().rand(); // P2 inputs
u32 pc = m_maincpu->pc();
if (pc == 0x7d84)
return 0xff;
if (addr == 0x061d000) // settings (from EEPROM?) including flipscreen
return 0x00;
if (addr == 0x061d002) // settings (from EEPROM?) dipswitch?
return 0x00;
if (addr == 0x061d004) // settings (from EEPROM?) region
return 0xff;
if (addr == 0x061f004)
return ioport("IN1")->read(); ;// machine().rand(); // p1 inputs
if (addr == 0x061f006)
return ioport("IN2")->read();// machine().rand(); // P2 inputs
// logerror("%08x: dt7_shared_ram_hack_r address %08x ret %02x\n", pc, addr, ret);
return ret;
return ret;
}
void dt7_state::shared_ram_w(offs_t offset, u8 data)
@ -285,7 +286,7 @@ void dt7_state::dt7_shared_mem(address_map &map)
}
void dt7_state::dt7_68k_1_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom().mirror(0x80000); // mirror needed or road doesn't draw
map(0x000000, 0x07ffff).rom().mirror(0x080000); // mirror needed or road doesn't draw
dt7_shared_mem(map);
}

View File

@ -3,18 +3,18 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "toaplipt.h"
#include "cpu/m68000/m68000.h"
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -36,9 +36,9 @@ public:
, m_okibank(*this, "okibank")
{ }
void enmadaio(machine_config &config);
void enmadaio(machine_config &config) ATTR_COLD;
void init_enmadaio();
void init_enmadaio() ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;

View File

@ -3,15 +3,10 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplan_v25_tables.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/nec/v25.h"
@ -20,6 +15,11 @@
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -79,19 +79,19 @@ public:
, m_palette(*this, "palette")
{ }
void fixeight(machine_config &config);
void init_fixeight();
void fixeight(machine_config &config) ATTR_COLD;
void init_fixeight() ATTR_COLD;
protected:
virtual void machine_reset() override ATTR_COLD;
virtual void video_start() override ATTR_COLD;
virtual void device_post_load() override;
virtual void device_post_load() override ATTR_COLD;
void fixeight_68k_mem(address_map &map) ATTR_COLD;
void fixeight_v25_mem(address_map &map) ATTR_COLD;
void create_tx_tilemap(int dx = 0, int dx_flipped = 0);
void create_tx_tilemap(int dx = 0, int dx_flipped = 0) ATTR_COLD;
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_vblank(int state);
@ -110,7 +110,7 @@ protected:
optional_shared_ptr<u16> m_tx_lineselect; // originals only
optional_shared_ptr<u16> m_tx_linescroll; // originals only
optional_shared_ptr<u16> m_tx_gfxram; // originals only
void reset(int state);
void reset_audiocpu(int state);
optional_shared_ptr<u8> m_shared_ram; // originals only - 8 bit RAM shared between 68K and sound CPU
@ -133,10 +133,11 @@ public:
, m_okibank(*this, "okibank")
{ }
void fixeightbl(machine_config &config);
void fixeightbl(machine_config &config) ATTR_COLD;
void init_fixeightbl();
void init_fixeightbl() ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
void fixeightbl_68k_mem(address_map &map) ATTR_COLD;
@ -154,11 +155,11 @@ public:
void fixeight_state::machine_reset()
{
if (m_audiocpu.found())
if (m_audiocpu)
sound_reset_w(0);
}
void fixeight_state::reset(int state)
void fixeight_state::reset_audiocpu(int state)
{
if (state)
sound_reset_w(0);
@ -523,7 +524,7 @@ void fixeight_state::fixeight(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 16_MHz_XTAL); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &fixeight_state::fixeight_68k_mem);
m_maincpu->reset_cb().set(FUNC(fixeight_state::reset));
m_maincpu->reset_cb().set(FUNC(fixeight_state::reset_audiocpu));
v25_device &audiocpu(V25(config, m_audiocpu, 16_MHz_XTAL)); // NEC V25 type Toaplan marked CPU ???
audiocpu.set_addrmap(AS_PROGRAM, &fixeight_state::fixeight_v25_mem);

View File

@ -3,19 +3,19 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z180/hd647180x.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -43,7 +43,8 @@ public:
, m_screen(*this, "screen")
, m_palette(*this, "palette")
{ }
void ghox(machine_config &config);
void ghox(machine_config &config) ATTR_COLD;
protected:
virtual void machine_start() override ATTR_COLD;

View File

@ -15,6 +15,8 @@ class gp9001vdp_device : public device_t,
public device_memory_interface
{
public:
static constexpr unsigned VDP_PALETTE_LENGTH = 0x10000;
typedef device_delegate<void (u8 layer, u32 &code)> gp9001_cb_delegate;
gp9001vdp_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
@ -59,8 +61,6 @@ public:
void bootleg_spriteram16_w(offs_t offset, u16 data, u16 mem_mask = ~0);
void bootleg_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
static constexpr unsigned VDP_PALETTE_LENGTH = 0x10000;
protected:
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
virtual void device_start() override ATTR_COLD;

View File

@ -3,21 +3,21 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplan_v25_tables.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/nec/v25.h"
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -41,8 +41,10 @@ public:
, m_palette(*this, "palette")
{ }
void kbash(machine_config &config);
void kbash(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
void kbash_68k_mem(address_map &map) ATTR_COLD;
void kbash_v25_mem(address_map &map) ATTR_COLD;
@ -64,10 +66,6 @@ public:
required_device<screen_device> m_screen;
required_device<palette_device> m_palette;
bitmap_ind8 m_custom_priority_bitmap;
protected:
virtual void video_start() override ATTR_COLD;
};
class kbash2_state : public kbash_state
@ -78,11 +76,12 @@ public:
, m_musicoki(*this, "musicoki")
{ }
void kbash2(machine_config &config);
void kbash2(machine_config &config) ATTR_COLD;
protected:
void kbash2_68k_mem(address_map &map) ATTR_COLD;
optional_device<okim6295_device> m_musicoki;
required_device<okim6295_device> m_musicoki;
};
void kbash_state::video_start()

View File

@ -3,20 +3,20 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
#include "sound/ymopm.h"
#include "sound/ymopl.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
* Name Board No Maker Game name
----------------------------------------------------------------------------
@ -44,7 +44,7 @@ public:
, m_palette(*this, "palette")
{ }
void pipibibs(machine_config &config);
void pipibibs(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
@ -73,14 +73,13 @@ public:
: pipibibi_state(mconfig, type, tag)
{ }
void pipibibsbl(machine_config &config);
void pipibibsbl(machine_config &config) ATTR_COLD;
void init_pipibibsbl();
void init_pipibibsbl() ATTR_COLD;
private:
void cpu_space_pipibibsbl_map(address_map &map) ATTR_COLD;
void pipibibi_bootleg_68k_mem(address_map &map) ATTR_COLD;
};
void pipibibi_state::video_start()
@ -485,5 +484,3 @@ GAME( 1991, pipibibsp, pipibibs, pipibibs, pipibibsp, pipibibi_state, emp
GAME( 1991, pipibibsbl, pipibibs, pipibibsbl, pipibibsbl, pipibibi_bootleg_state, init_pipibibsbl, ROT0, "bootleg (Ryouta Kikaku)", "Pipi & Bibis / Whoopee!! (Ryouta Kikaku bootleg, encrypted)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, pipibibsbl2, pipibibs, pipibibsbl, pipibibsbl, pipibibi_bootleg_state, empty_init, ROT0, "bootleg", "Pipi & Bibis / Whoopee!! (bootleg, decrypted)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // different memory map, not scrambled
GAME( 1991, pipibibsbl3, pipibibs, pipibibsbl, pipibibsbl, pipibibi_bootleg_state, empty_init, ROT0, "bootleg (Ryouta Kikaku)", "Pipi & Bibis / Whoopee!! (Ryouta Kikaku bootleg, decrypted)", MACHINE_SUPPORTS_SAVE )

View File

@ -109,68 +109,7 @@ To Do / Unknowns:
*****************************************************************************/
class bgaregga_state : public raizing_base_state
{
public:
bgaregga_state(const machine_config &mconfig, device_type type, const char *tag)
: raizing_base_state(mconfig, type, tag)
{ }
void bgaregga(machine_config &config);
void init_bgaregga();
protected:
virtual void machine_reset() override ATTR_COLD;
virtual void video_start() override ATTR_COLD;
private:
void bgaregga_68k_mem(address_map &map) ATTR_COLD;
void bgaregga_sound_z80_mem(address_map &map) ATTR_COLD;
u8 bgaregga_E01D_r();
};
class bgaregga_bootleg_state : public bgaregga_state
{
public:
bgaregga_bootleg_state(const machine_config &mconfig, device_type type, const char *tag)
: bgaregga_state(mconfig, type, tag)
{ }
void bgareggabl(machine_config &config);
protected:
virtual void video_start() override ATTR_COLD;
private:
u32 screen_update_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
class sstriker_state : public raizing_base_state
{
public:
sstriker_state(const machine_config &mconfig, device_type type, const char *tag)
: raizing_base_state(mconfig, type, tag)
{ }
void mahoudai(machine_config &config);
void shippumd(machine_config &config);
protected:
virtual void video_start() override ATTR_COLD;
private:
void mahoudai_68k_mem(address_map &map) ATTR_COLD;
void shippumd_68k_mem(address_map &map) ATTR_COLD;
void raizing_sound_z80_mem(address_map &map) ATTR_COLD;
void shippumd_coin_w(u8 data);
};
void raizing_base_state::reset(int state)
void raizing_base_state::reset_audiocpu(int state)
{
if (m_audiocpu != nullptr)
m_audiocpu->set_input_line(INPUT_LINE_RESET, state);
@ -271,6 +210,137 @@ void raizing_base_state::bgaregga_common_video_start()
create_tx_tilemap(0x1d4, 0x16b);
}
void raizing_base_state::raizing_z80_bankswitch_w(u8 data)
{
m_audiobank->set_entry(data & 0x0f);
}
// bgaregga and batrider don't actually have a NMK112, but rather a GAL
// programmed to bankswitch the sound ROMs in a similar fashion.
// it may not be a coincidence that the composer and sound designer for
// these two games, Manabu "Santaruru" Namiki, came to Raizing from NMK...
void raizing_base_state::raizing_oki_bankswitch_w(offs_t offset, u8 data)
{
m_raizing_okibank[(offset & 4) >> 2][offset & 3]->set_entry(data & 0xf);
m_raizing_okibank[(offset & 4) >> 2][4 + (offset & 3)]->set_entry(data & 0xf);
offset++;
data >>= 4;
m_raizing_okibank[(offset & 4) >> 2][offset & 3]->set_entry(data & 0xf);
m_raizing_okibank[(offset & 4) >> 2][4 + (offset & 3)]->set_entry(data & 0xf);
}
void raizing_base_state::common_bgaregga_reset()
{
for (int chip = 0; chip < 2; chip++)
{
for (int i = 0; i < 8; i++)
{
if (m_raizing_okibank[chip][i] != nullptr)
m_raizing_okibank[chip][i]->set_entry(0);
}
}
}
void raizing_base_state::common_mem(address_map &map, offs_t rom_limit)
{
map(0x000000, rom_limit).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(raizing_base_state::shared_ram_r), FUNC(raizing_base_state::shared_ram_w)).umask16(0x00ff);
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(m_vdp, FUNC(gp9001vdp_device::vdpcount_r));
map(0x300000, 0x30000d).rw(m_vdp, FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x501fff).ram().w(FUNC(raizing_base_state::tx_videoram_w)).share(m_tx_videoram);
map(0x502000, 0x502fff).ram().share(m_tx_lineselect);
map(0x503000, 0x5031ff).ram().w(FUNC(raizing_base_state::tx_linescroll_w)).share(m_tx_linescroll);
map(0x503200, 0x503fff).ram();
}
void raizing_base_state::install_raizing_okibank(int chip)
{
assert(m_oki_rom[chip] && m_raizing_okibank[chip][0]);
for (int i = 0; i < 4; i++)
{
m_raizing_okibank[chip][i]->configure_entries(0, 16, &m_oki_rom[chip][(i * 0x100)], 0x10000);
}
m_raizing_okibank[chip][4]->configure_entries(0, 16, &m_oki_rom[chip][0x400], 0x10000);
for (int i = 5; i < 8; i++)
{
m_raizing_okibank[chip][i]->configure_entries(0, 16, &m_oki_rom[chip][0], 0x10000);
}
}
namespace {
class bgaregga_state : public raizing_base_state
{
public:
bgaregga_state(const machine_config &mconfig, device_type type, const char *tag)
: raizing_base_state(mconfig, type, tag)
{ }
void bgaregga(machine_config &config) ATTR_COLD;
void init_bgaregga() ATTR_COLD;
protected:
virtual void machine_reset() override ATTR_COLD;
virtual void video_start() override ATTR_COLD;
private:
void bgaregga_68k_mem(address_map &map) ATTR_COLD;
void bgaregga_sound_z80_mem(address_map &map) ATTR_COLD;
u8 bgaregga_E01D_r();
};
class bgaregga_bootleg_state : public bgaregga_state
{
public:
bgaregga_bootleg_state(const machine_config &mconfig, device_type type, const char *tag)
: bgaregga_state(mconfig, type, tag)
{ }
void bgareggabl(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
private:
u32 screen_update_bootleg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
};
class sstriker_state : public raizing_base_state
{
public:
sstriker_state(const machine_config &mconfig, device_type type, const char *tag)
: raizing_base_state(mconfig, type, tag)
{ }
void mahoudai(machine_config &config) ATTR_COLD;
void shippumd(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
private:
void mahoudai_68k_mem(address_map &map) ATTR_COLD;
void shippumd_68k_mem(address_map &map) ATTR_COLD;
void raizing_sound_z80_mem(address_map &map) ATTR_COLD;
void shippumd_coin_w(u8 data);
};
void bgaregga_state::video_start()
{
bgaregga_common_video_start();
@ -668,25 +738,6 @@ INPUT_PORTS_END
void raizing_base_state::raizing_z80_bankswitch_w(u8 data)
{
m_audiobank->set_entry(data & 0x0f);
}
// bgaregga and batrider don't actually have a NMK112, but rather a GAL
// programmed to bankswitch the sound ROMs in a similar fashion.
// it may not be a coincidence that the composer and sound designer for
// these two games, Manabu "Santaruru" Namiki, came to Raizing from NMK...
void raizing_base_state::raizing_oki_bankswitch_w(offs_t offset, u8 data)
{
m_raizing_okibank[(offset & 4) >> 2][offset & 3]->set_entry(data & 0xf);
m_raizing_okibank[(offset & 4) >> 2][4 + (offset & 3)]->set_entry(data & 0xf);
offset++;
data >>= 4;
m_raizing_okibank[(offset & 4) >> 2][offset & 3]->set_entry(data & 0xf);
m_raizing_okibank[(offset & 4) >> 2][4 + (offset & 3)]->set_entry(data & 0xf);
}
u8 bgaregga_state::bgaregga_E01D_r()
{
// the Z80 reads this address during its IRQ routine,
@ -700,87 +751,35 @@ void sstriker_state::shippumd_coin_w(u8 data)
m_oki[0]->set_rom_bank(BIT(data, 4));
}
void raizing_base_state::common_bgaregga_reset()
{
for (int chip = 0; chip < 2; chip++)
{
for (int i = 0; i < 8; i++)
{
if (m_raizing_okibank[chip][i] != nullptr)
m_raizing_okibank[chip][i]->set_entry(0);
}
}
}
void bgaregga_state::machine_reset()
{
raizing_base_state::machine_reset();
common_bgaregga_reset();
}
void sstriker_state::mahoudai_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(sstriker_state::shared_ram_r), FUNC(sstriker_state::shared_ram_w)).umask16(0x00ff);
map(0x21c01d, 0x21c01d).w("coincounter", FUNC(toaplan_coincounter_device::coin_w));
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(m_vdp, FUNC(gp9001vdp_device::vdpcount_r));
map(0x300000, 0x30000d).rw(m_vdp, FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
common_mem(map, 0x07ffff);
map(0x21c01d, 0x21c01d).w(m_coincounter, FUNC(toaplan_coincounter_device::coin_w));
map(0x401000, 0x4017ff).ram(); // Unused palette RAM
map(0x500000, 0x501fff).ram().w(FUNC(sstriker_state::tx_videoram_w)).share(m_tx_videoram);
map(0x502000, 0x502fff).ram().share(m_tx_lineselect);
map(0x503000, 0x5031ff).ram().w(FUNC(sstriker_state::tx_linescroll_w)).share(m_tx_linescroll);
map(0x503200, 0x503fff).ram();
}
void sstriker_state::shippumd_68k_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(sstriker_state::shared_ram_r), FUNC(sstriker_state::shared_ram_w)).umask16(0x00ff);
common_mem(map, 0x0fffff);
// map(0x21c008, 0x21c009).nopw(); // ???
map(0x21c01d, 0x21c01d).w(FUNC(sstriker_state::shippumd_coin_w)); // Coin count/lock + oki bankswitch
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(m_vdp, FUNC(gp9001vdp_device::vdpcount_r));
map(0x300000, 0x30000d).rw(m_vdp, FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x401000, 0x4017ff).ram(); // Unused palette RAM
map(0x500000, 0x501fff).ram().w(FUNC(sstriker_state::tx_videoram_w)).share(m_tx_videoram);
map(0x502000, 0x502fff).ram().share(m_tx_lineselect);
map(0x503000, 0x5031ff).ram().w(FUNC(sstriker_state::tx_linescroll_w)).share(m_tx_linescroll);
map(0x503200, 0x503fff).ram();
}
void bgaregga_state::bgaregga_68k_mem(address_map &map)
{
map(0x000000, 0x0fffff).rom();
map(0x100000, 0x10ffff).ram();
map(0x218000, 0x21bfff).rw(FUNC(bgaregga_state::shared_ram_r), FUNC(bgaregga_state::shared_ram_w)).umask16(0x00ff);
map(0x21c01d, 0x21c01d).w("coincounter", FUNC(toaplan_coincounter_device::coin_w));
map(0x21c020, 0x21c021).portr("IN1");
map(0x21c024, 0x21c025).portr("IN2");
map(0x21c028, 0x21c029).portr("SYS");
map(0x21c02c, 0x21c02d).portr("DSWA");
map(0x21c030, 0x21c031).portr("DSWB");
map(0x21c034, 0x21c035).portr("JMPR");
map(0x21c03c, 0x21c03d).r(m_vdp, FUNC(gp9001vdp_device::vdpcount_r));
map(0x300000, 0x30000d).rw(m_vdp, FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x500000, 0x501fff).ram().w(FUNC(bgaregga_state::tx_videoram_w)).share(m_tx_videoram);
map(0x502000, 0x502fff).ram().share(m_tx_lineselect);
map(0x503000, 0x5031ff).ram().w(FUNC(bgaregga_state::tx_linescroll_w)).share(m_tx_linescroll);
map(0x503200, 0x503fff).ram();
common_mem(map, 0x0fffff);
map(0x21c01d, 0x21c01d).w(m_coincounter, FUNC(toaplan_coincounter_device::coin_w));
map(0x600001, 0x600001).w(m_soundlatch[0], FUNC(generic_latch_8_device::write));
}
@ -790,7 +789,7 @@ void sstriker_state::raizing_sound_z80_mem(address_map &map)
map(0xc000, 0xdfff).ram().share(m_shared_ram);
map(0xe000, 0xe001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
map(0xe004, 0xe004).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0xe00e, 0xe00e).w("coincounter", FUNC(toaplan_coincounter_device::coin_w));
map(0xe00e, 0xe00e).w(m_coincounter, FUNC(toaplan_coincounter_device::coin_w));
}
void bgaregga_state::bgaregga_sound_z80_mem(address_map &map)
@ -816,7 +815,7 @@ void sstriker_state::mahoudai(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &sstriker_state::mahoudai_68k_mem);
m_maincpu->reset_cb().set(FUNC(sstriker_state::reset));
m_maincpu->reset_cb().set(FUNC(sstriker_state::reset_audiocpu));
Z80(config, m_audiocpu, 32_MHz_XTAL/8); // 4MHz, 32MHz Oscillator
m_audiocpu->set_addrmap(AS_PROGRAM, &sstriker_state::raizing_sound_z80_mem);
@ -861,7 +860,7 @@ void bgaregga_state::bgaregga(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &bgaregga_state::bgaregga_68k_mem);
m_maincpu->reset_cb().set(FUNC(bgaregga_state::reset));
m_maincpu->reset_cb().set(FUNC(bgaregga_state::reset_audiocpu));
Z80(config, m_audiocpu, 32_MHz_XTAL/8); // 4MHz, 32MHz Oscillator
m_audiocpu->set_addrmap(AS_PROGRAM, &bgaregga_state::bgaregga_sound_z80_mem);
@ -908,21 +907,6 @@ void bgaregga_bootleg_state::bgareggabl(machine_config &config)
}
void raizing_base_state::install_raizing_okibank(int chip)
{
assert(m_oki_rom[chip] && m_raizing_okibank[chip][0]);
for (int i = 0; i < 4; i++)
{
m_raizing_okibank[chip][i]->configure_entries(0, 16, &m_oki_rom[chip][(i * 0x100)], 0x10000);
}
m_raizing_okibank[chip][4]->configure_entries(0, 16, &m_oki_rom[chip][0x400], 0x10000);
for (int i = 5; i < 8; i++)
{
m_raizing_okibank[chip][i]->configure_entries(0, 16, &m_oki_rom[chip][0], 0x10000);
}
}
void bgaregga_state::init_bgaregga()
{
u8 *Z80 = memregion("audiocpu")->base();
@ -1334,6 +1318,8 @@ ROM_START( bgareggablj ) // fixed on Japanese region
ROM_LOAD( "rom5.bin", 0x000000, 0x100000, CRC(f6d49863) SHA1(3a3c354852adad06e8a051511abfab7606bce382) )
ROM_END
} // anonymous namespace
GAME( 1993, sstriker, 0, mahoudai, sstriker, sstriker_state, empty_init, ROT270, "Raizing", "Sorcer Striker", MACHINE_SUPPORTS_SAVE ) // verified on two different PCBs
GAME( 1993, sstrikerk, sstriker, mahoudai, sstrikerk, sstriker_state, empty_init, ROT270, "Raizing (Unite Trading license)", "Sorcer Striker (Korea)", MACHINE_SUPPORTS_SAVE ) // Although the region jumper is functional, it's a Korean board / version

View File

@ -1,14 +1,13 @@
// license:BSD-3-Clause
// copyright-holders:Quench, Yochizo, David Haywood
#ifndef MAME_TOAPLAN_RAIZING_H
#define MAME_TOAPLAN_RAIZING_H
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#pragma once
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z80/z80.h"
@ -19,6 +18,11 @@
#include "sound/ymopm.h"
#include "sound/ymz280b.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
class raizing_base_state : public driver_device
{
@ -48,7 +52,7 @@ public:
protected:
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual void device_post_load() override;
virtual void device_post_load() override ATTR_COLD;
// used by everything
void create_tx_tilemap(int dx = 0, int dx_flipped = 0);
@ -59,6 +63,8 @@ protected:
void install_raizing_okibank(int chip);
void common_bgaregga_reset();
void common_mem(address_map &map, offs_t rom_limit) ATTR_COLD;
// similar as NMK112, but GAL-driven; NOT actual NMK112 is present
template<unsigned Chip>
void raizing_oki(address_map &map)
@ -84,7 +90,7 @@ protected:
TILE_GET_INFO_MEMBER(get_text_tile_info);
void coin_w(u8 data);
void reset(int state);
void reset_audiocpu(int state);
tilemap_t *m_tx_tilemap = nullptr; /* Tilemap for extra-text-layer */
required_shared_ptr<u16> m_tx_videoram;
@ -106,3 +112,5 @@ protected:
required_device<toaplan_coincounter_device> m_coincounter;
bitmap_ind8 m_custom_priority_bitmap;
};
#endif // MAME_TOAPLAN_RAIZING_H

View File

@ -154,9 +154,9 @@ public:
, m_z80_rom(*this, "audiocpu")
{ }
void batrider(machine_config &config);
void batrider(machine_config &config) ATTR_COLD;
void init_batrider();
void init_batrider() ATTR_COLD;
protected:
virtual void machine_start() override ATTR_COLD;
@ -203,11 +203,10 @@ public:
, m_eeprom(*this, "eeprom")
{ }
void bbakraid(machine_config &config);
void bbakraid(machine_config &config) ATTR_COLD;
void init_bbakraid();
void init_bbakraid() ATTR_COLD;
protected:
private:
void bbakraid_68k_mem(address_map &map) ATTR_COLD;
void bbakraid_sound_z80_mem(address_map &map) ATTR_COLD;
@ -218,8 +217,8 @@ private:
u16 bbakraid_eeprom_r();
void bbakraid_eeprom_w(u8 data);
optional_ioport m_eepromout;
optional_device<eeprom_serial_93cxx_device> m_eeprom;
required_ioport m_eepromout;
required_device<eeprom_serial_93cxx_device> m_eeprom;
};
@ -230,9 +229,8 @@ public:
: batrider_state(mconfig, type, tag)
{ }
void nprobowl(machine_config &config);
void nprobowl(machine_config &config) ATTR_COLD;
protected:
private:
void nprobowl_68k_mem(address_map &map) ATTR_COLD;
};
@ -293,6 +291,8 @@ void batrider_state::batrider_bank_cb(u8 layer, u32 &code)
void batrider_state::video_start()
{
raizing_base_state::video_start();
m_screen->register_screen_bitmap(m_custom_priority_bitmap);
m_vdp->custom_priority_bitmap = &m_custom_priority_bitmap;
@ -398,6 +398,8 @@ void bbakraid_state::bbakraid_eeprom_w(u8 data)
void batrider_state::machine_start()
{
raizing_base_state::machine_start();
save_item(NAME(m_z80_busreq));
}
@ -409,6 +411,8 @@ INTERRUPT_GEN_MEMBER(bbakraid_state::bbakraid_snd_interrupt)
void batrider_state::machine_reset()
{
raizing_base_state::machine_reset();
common_bgaregga_reset();
}
@ -795,7 +799,7 @@ void batrider_state::batrider(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator (verified)
m_maincpu->set_addrmap(AS_PROGRAM, &batrider_state::batrider_68k_mem);
m_maincpu->reset_cb().set(FUNC(batrider_state::reset));
m_maincpu->reset_cb().set(FUNC(batrider_state::reset_audiocpu));
Z80(config, m_audiocpu, 32_MHz_XTAL/6); // 5.333MHz, 32MHz Oscillator (verified)
m_audiocpu->set_addrmap(AS_PROGRAM, &batrider_state::batrider_sound_z80_mem);
@ -854,7 +858,7 @@ void bbakraid_state::bbakraid(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 32_MHz_XTAL/2); // 16MHz, 32MHz Oscillator
m_maincpu->set_addrmap(AS_PROGRAM, &bbakraid_state::bbakraid_68k_mem);
m_maincpu->reset_cb().set(FUNC(bbakraid_state::reset));
m_maincpu->reset_cb().set(FUNC(bbakraid_state::reset_audiocpu));
Z80(config, m_audiocpu, XTAL(32'000'000)/6); /* 5.3333MHz , 32MHz Oscillator */
m_audiocpu->set_addrmap(AS_PROGRAM, &bbakraid_state::bbakraid_sound_z80_mem);
@ -909,7 +913,7 @@ void nprobowl_state::nprobowl(machine_config &config)
// basic machine hardware
M68000(config, m_maincpu, 32_MHz_XTAL / 2); // 32MHz Oscillator, divisor not verified
m_maincpu->set_addrmap(AS_PROGRAM, &nprobowl_state::nprobowl_68k_mem);
m_maincpu->reset_cb().set(FUNC(nprobowl_state::reset));
m_maincpu->reset_cb().set(FUNC(nprobowl_state::reset_audiocpu));
ADDRESS_MAP_BANK(config, m_dma_space, 0);
m_dma_space->set_addrmap(0, &nprobowl_state::batrider_dma_mem);
@ -945,9 +949,7 @@ void nprobowl_state::nprobowl(machine_config &config)
void batrider_state::init_batrider()
{
u8 *Z80 = memregion("audiocpu")->base();
m_audiobank->configure_entries(0, 16, Z80, 0x4000);
m_audiobank->configure_entries(0, 16, &m_z80_rom[0], 0x4000);
install_raizing_okibank(0);
install_raizing_okibank(1);
m_sndirq_line = 4;

View File

@ -3,19 +3,19 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -37,8 +37,8 @@ public:
, m_palette(*this, "palette")
{ }
void snowbro2(machine_config &config);
void snowbro2b3(machine_config &config);
void snowbro2(machine_config &config) ATTR_COLD;
void snowbro2b3(machine_config &config) ATTR_COLD;
protected:
virtual void video_start() override ATTR_COLD;
@ -49,8 +49,8 @@ protected:
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_vblank(int state);
void sb2_oki_bankswitch_w(u8 data);
private:
private:
required_device<m68000_base_device> m_maincpu;
required_device<gp9001vdp_device> m_vdp;
required_device<okim6295_device> m_oki;

View File

@ -3,14 +3,9 @@
#include "emu.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "cpu/m68000/m68000.h"
#include "machine/nvram.h"
@ -18,6 +13,11 @@
#include "machine/upd4992.h"
#include "sound/okim6295.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*****************************************************************************
Name Board No Maker Game name
@ -60,13 +60,15 @@ public:
protected:
virtual void video_start() override ATTR_COLD;
void othldrby_68k_mem(address_map &map) ATTR_COLD;
void common_mem(address_map &map) ATTR_COLD;
void pwrkick_68k_mem(address_map &map) ATTR_COLD;
void othldrby_68k_mem(address_map &map) ATTR_COLD;
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_vblank(int state);
void sw_oki_bankswitch_w(u8 data);
private:
void pwrkick_coin_w(u8 data);
void pwrkick_coin_lockout_w(u8 data);
@ -393,7 +395,7 @@ void sunwise_state::pwrkick_coin_lockout_w(u8 data)
}
void sunwise_state::pwrkick_68k_mem(address_map &map)
void sunwise_state::common_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram().share("nvram"); // Only 10022C-10037B is actually saved as NVRAM
@ -407,33 +409,27 @@ void sunwise_state::pwrkick_68k_mem(address_map &map)
map(0x700000, 0x700001).r(m_vdp, FUNC(gp9001vdp_device::vdpcount_r));
map(0x700004, 0x700005).portr("DSWA");
map(0x700008, 0x700009).portr("DSWB");
map(0x70001c, 0x70001d).portr("SYS");
map(0x700031, 0x700031).w(FUNC(sunwise_state::sw_oki_bankswitch_w));
}
void sunwise_state::pwrkick_68k_mem(address_map &map)
{
common_mem(map);
map(0x70000c, 0x70000d).portr("IN1");
map(0x700014, 0x700015).portr("IN2");
map(0x700018, 0x700019).portr("DSWC");
map(0x70001c, 0x70001d).portr("SYS");
map(0x700031, 0x700031).w(FUNC(sunwise_state::sw_oki_bankswitch_w));
map(0x700035, 0x700035).w(FUNC(sunwise_state::pwrkick_coin_w));
map(0x700039, 0x700039).w(FUNC(sunwise_state::pwrkick_coin_lockout_w));
}
void sunwise_state::othldrby_68k_mem(address_map &map)
{
map(0x000000, 0x07ffff).rom();
map(0x100000, 0x103fff).ram().share("nvram"); // Only 10331E-103401 is actually saved as NVRAM
map(0x104000, 0x10ffff).ram();
common_mem(map);
map(0x200000, 0x20000f).rw(m_rtc, FUNC(upd4992_device::read), FUNC(upd4992_device::write)).umask16(0x00ff);
map(0x300000, 0x30000d).rw(m_vdp, FUNC(gp9001vdp_device::read), FUNC(gp9001vdp_device::write));
map(0x400000, 0x400fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x600001, 0x600001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x700000, 0x700001).r(m_vdp, FUNC(gp9001vdp_device::vdpcount_r));
map(0x700004, 0x700005).portr("DSWA");
map(0x700008, 0x700009).portr("DSWB");
map(0x70000c, 0x70000d).portr("IN1");
map(0x700010, 0x700011).portr("IN2");
map(0x70001c, 0x70001d).portr("SYS");
map(0x700031, 0x700031).w(FUNC(sunwise_state::sw_oki_bankswitch_w));
map(0x700035, 0x700035).w("coincounter", FUNC(toaplan_coincounter_device::coin_w));
}

View File

@ -3,20 +3,20 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/z180/hd647180x.h"
#include "machine/gen_latch.h"
#include "sound/ymopl.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name

View File

@ -41,6 +41,3 @@ void toaplan_coincounter_device::coin_w(u8 data)
logerror("Writing unknown upper bits (%02x) to coin control\n",data);
}
}

View File

@ -3,19 +3,19 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "sound/okim6295.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
//#define TRUXTON2_STEREO /* Uncomment to hear truxton2 music in stereo */
/*
@ -103,8 +103,7 @@ private:
void truxton2_state::device_post_load()
{
if (m_tx_gfxram != nullptr)
m_gfxdecode->gfx(0)->mark_all_dirty();
m_gfxdecode->gfx(0)->mark_all_dirty();
}
@ -365,8 +364,6 @@ void truxton2_state::truxton2(machine_config &config)
#endif
}
} // anonymous namespace
ROM_START( truxton2 )
ROM_REGION( 0x080000, "maincpu", 0 ) /* Main 68K code */
/* program ROM is byte swapped ! */
@ -380,4 +377,6 @@ ROM_START( truxton2 )
ROM_LOAD( "tp024_2.bin", 0x00000, 0x80000, CRC(f2f6cae4) SHA1(bb4e8c36531bed97ced4696ca12fd40ede2531aa) )
ROM_END
} // anonymous namespace
GAME( 1992, truxton2, 0, truxton2, truxton2, truxton2_state, empty_init, ROT270, "Toaplan", "Truxton II / Tatsujin Oh", MACHINE_SUPPORTS_SAVE )

View File

@ -3,20 +3,20 @@
#include "emu.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
#include "gp9001.h"
#include "toaplan_coincounter.h"
#include "toaplan_v25_tables.h"
#include "toaplipt.h"
#include "gp9001.h"
#include "cpu/m68000/m68000.h"
#include "cpu/nec/v25.h"
#include "sound/ymopm.h"
#include "emupal.h"
#include "screen.h"
#include "speaker.h"
#include "tilemap.h"
/*
Name Board No Maker Game name
----------------------------------------------------------------------------
@ -61,7 +61,7 @@ private:
u8 shared_ram_r(offs_t offset) { return m_shared_ram[offset]; }
void shared_ram_w(offs_t offset, u8 data) { m_shared_ram[offset] = data; }
void coin_sound_reset_w(u8 data);
void reset(int state);
void reset_audiocpu(int state);
u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void screen_vblank(int state);
@ -99,7 +99,7 @@ void vfive_state::screen_vblank(int state)
}
}
void vfive_state::reset(int state)
void vfive_state::reset_audiocpu(int state)
{
if (state)
coin_sound_reset_w(0);
@ -270,7 +270,7 @@ void vfive_state::vfive(machine_config &config)
/* basic machine hardware */
M68000(config, m_maincpu, 20_MHz_XTAL/2); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &vfive_state::vfive_68k_mem);
m_maincpu->reset_cb().set(FUNC(vfive_state::reset));
m_maincpu->reset_cb().set(FUNC(vfive_state::reset_audiocpu));
v25_device &audiocpu(V25(config, m_audiocpu, 20_MHz_XTAL/2)); // Verified on PCB, NEC V25 type Toaplan mark scratched out
audiocpu.set_addrmap(AS_PROGRAM, &vfive_state::vfive_v25_mem);
@ -347,4 +347,3 @@ ROM_END
GAME( 1992, grindstm, 0, vfive, grindstm, vfive_state, empty_init, ROT270, "Toaplan", "Grind Stormer", MACHINE_SUPPORTS_SAVE )
GAME( 1992, grindstma, grindstm, vfive, grindstma, vfive_state, empty_init, ROT270, "Toaplan", "Grind Stormer (older set)", MACHINE_SUPPORTS_SAVE )
GAME( 1993, vfive, grindstm, vfive, vfive, vfive_state, empty_init, ROT270, "Toaplan", "V-Five (Japan)", MACHINE_SUPPORTS_SAVE )