Skip to content

Commit

Permalink
ddenlovr.cpp: Added DIP switch definitions for Hanafuda Night Rose. (#…
Browse files Browse the repository at this point in the history
…13353)

Game is still marked not working due to game-breaking emulation issues similar to Hanafuda Hana Gokou and Hanafuda Gokou.
  • Loading branch information
Osso13 authored Feb 13, 2025
1 parent 222c44e commit a069c12
Showing 1 changed file with 162 additions and 5 deletions.
167 changes: 162 additions & 5 deletions src/mame/dynax/ddenlovr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4695,7 +4695,7 @@ void hanakanz_state::daireach_portmap(address_map &map)
}

/***************************************************************************
Hana Night Rose
Hanafuda Night Rose
***************************************************************************/

// 29EE: D4 ED 76 C9 CB
Expand Down Expand Up @@ -4723,8 +4723,7 @@ void hanakanz_state::hnrose_portmap(address_map &map)
map(0x60, 0x61).w("ym2413", FUNC(ym2413_device::write));
map(0x62, 0x62).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write));
map(0x68, 0x68).portr("SYSTEM");
map(0x6a, 0x6a).r(FUNC(hanakanz_state::daimyojn_keyb1_r));
map(0x6c, 0x6c).r(FUNC(hanakanz_state::daimyojn_keyb2_r));
map(0x6a, 0x6c).r(FUNC(hanakanz_state::hanakanz_keyb_r));
map(0x6e, 0x6e).w(FUNC(hanakanz_state::hanakanz_coincounter_w));
map(0x70, 0x70).w(FUNC(hanakanz_state::mjmyster_rambank_w));
map(0x80, 0x8f).rw("rtc", FUNC(msm6242_device::read), FUNC(msm6242_device::write));
Expand Down Expand Up @@ -8758,6 +8757,164 @@ static INPUT_PORTS_START( daimyojn )
INPUT_PORTS_END


static INPUT_PORTS_START( hnrose )
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test))
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )

PORT_INCLUDE( dynax_hanafuda_keys_bet )

// Note the PCB has 4x 10-position DIP switches and SW5 is a 4-position DIP switch.
// SW5 is marked as Unused and 'leave all off' in the manual
// A manual for a different version of this game has been found, but the settings don't all match the version that has been dumped.
// The manual provides four sets of standard settings (definitions below use the first one):
// 標準設定 コインプールタイプA 標準設定 コインプールタイプB 標準設定 メダルコーナータイプ クレジット・タイマータイプ(標準設定 アミューズコーナータイプ)
// SW 1 ON ON OFF ON OFF ON OFF OFF OFF OFF OFF ON OFF ON OFF ON OFF OFF OFF OFF OFF ON OFF ON OFF ON OFF OFF OFF OFF OFF OFF OFF ON OFF ON OFF OFF ON OFF
// SW 2 OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF
// SW 3 ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF
// SW 4 ON ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF
PORT_START("DSW1")
PORT_DIPNAME( 0x07, 0x04, "Hanafuda Game Payout Rate" ) PORT_DIPLOCATION("DIP-SW1:1,2,3") // 花札 ゲーム 配当率 (from manual, not verified)
PORT_DIPSETTING( 0x00, "8 (Low)" ) // 低い8
PORT_DIPSETTING( 0x01, "7" ) //   7
PORT_DIPSETTING( 0x02, "6" ) //   6
PORT_DIPSETTING( 0x03, "5" ) //   5
PORT_DIPSETTING( 0x04, "4" ) //   4
PORT_DIPSETTING( 0x05, "3" ) //   3
PORT_DIPSETTING( 0x06, "2" ) //   2
PORT_DIPSETTING( 0x07, "1 (High)" ) // 高い1
PORT_DIPNAME( 0x08, 0x00, "Payout Variation" ) PORT_DIPLOCATION("DIP-SW1:4") // 配当の波 (from manual, not verified)
PORT_DIPSETTING( 0x00, "Small" ) // 小さい
PORT_DIPSETTING( 0x08, "Large" ) // 大きい
PORT_DIPNAME( 0x10, 0x10, "Gokou Yaku" ) PORT_DIPLOCATION("DIP-SW1:5") // 五光役 (from manual, not verified)
PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 出ない
PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 出る
PORT_DIPNAME( 0x60, 0x40, "Double-Up Game Win Rate" ) PORT_DIPLOCATION("DIP-SW1:6,7") // W-UPゲーム勝率 (from manual, not verified)
PORT_DIPSETTING( 0x00, "55%" )
PORT_DIPSETTING( 0x20, "60%" )
PORT_DIPSETTING( 0x40, "65%" )
PORT_DIPSETTING( 0x60, "70%" )
PORT_DIPNAME( 0x80, 0x80, "Maximum Bet" ) PORT_DIPLOCATION("DIP-SW1:8") // BET MAX
PORT_DIPSETTING( 0x00, "5" )
PORT_DIPSETTING( 0x80, "10" )

PORT_START("DSW2")
MAHJONG_COINAGE( 0, "DIP-SW2:1,2" ) // COIN RATE
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIP-SW2:3" ) // (not listed in the manual)
PORT_DIPNAME( 0x38, 0x38, "Minimum Bet" ) PORT_DIPLOCATION("DIP-SW2:4,5,6") // ゲーム・スタート時の最低レート枚数 (if set higher than the maximum bet, the maximum bet will be used)
PORT_DIPSETTING( 0x38, "1" ) // レート1
PORT_DIPSETTING( 0x30, "2" ) // レート2
PORT_DIPSETTING( 0x28, "3" ) // レート3
PORT_DIPSETTING( 0x20, "4" ) // レート4
PORT_DIPSETTING( 0x18, "5" ) // レート5
PORT_DIPSETTING( 0x10, "6" ) // レート6
PORT_DIPSETTING( 0x08, "7" ) // レート7
PORT_DIPSETTING( 0x00, "8" ) // レート8
PORT_DIPNAME( 0xc0, 0x40, "Credit Limit" ) PORT_DIPLOCATION("DIP-SW2:7,8") // クレジット・リミット
PORT_DIPSETTING( 0xc0, "1000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 1000クレジット
PORT_DIPSETTING( 0xc0, "2000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0xc0, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0xc0, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
PORT_DIPSETTING( 0x80, "2000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 2000クレジット
PORT_DIPSETTING( 0x80, "4000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x80, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x80, "20000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
PORT_DIPSETTING( 0x40, "3000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 3000クレジット
PORT_DIPSETTING( 0x40, "6000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x40, "15000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x40, "30000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
PORT_DIPSETTING( 0x00, "5000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // 5000クレジット
PORT_DIPSETTING( 0x00, "10000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x00, "25000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x00, "50000" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)

PORT_START("DSW3")
PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "DIP-SW3:1")
PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "DIP-SW3:2")
PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "DIP-SW3:3")
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "DIP-SW3:4")
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP-SW3:5")
PORT_DIPNAME( 0x20, 0x20, "Gokou Odds" ) PORT_DIPLOCATION("DIP-SW3:6") // 五光ODDS
PORT_DIPSETTING( 0x20, "100" )
PORT_DIPSETTING( 0x00, "200" )
PORT_DIPNAME( 0x40, 0x40, "Shikou Odds" ) PORT_DIPLOCATION("DIP-SW3:7") // 四光ODDS
PORT_DIPSETTING( 0x40, "50" )
PORT_DIPSETTING( 0x00, "60" )
PORT_DIPNAME( 0x80, 0x80, "Ameshikou Odds" ) PORT_DIPLOCATION("DIP-SW3:8") // 雨四光ODDS
PORT_DIPSETTING( 0x80, "20" )
PORT_DIPSETTING( 0x00, "30" )

PORT_START("DSW4")
PORT_DIPNAME( 0x01, 0x01, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP-SW4:1") // デモ・サウンド
PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x01, DEF_STR(On) ) // 有
PORT_DIPNAME( 0x02, 0x02, "In-Game Music" ) PORT_DIPLOCATION("DIP-SW4:2") // ゲーム・サウンド
PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x02, DEF_STR(On) ) // 有
PORT_DIPNAME( 0x04, 0x04, "Gal Voice" ) PORT_DIPLOCATION("DIP-SW4:3") // ギャル音声 (only affects in-game speech, not attract mode or odds screen)
PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x04, DEF_STR(On) ) // 有
PORT_DIPNAME( 0x08, 0x08, "Show Winning Streak Gal" ) PORT_DIPLOCATION("DIP-SW4:4") // 連勝ギャル表示 (from manual, not verified)
PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有
PORT_DIPNAME( 0x10, 0x10, "Odds Type" ) PORT_DIPLOCATION("DIP-SW4:5") // オッズタイプ
PORT_DIPSETTING( 0x10, "Punch Board" ) // パンチボード
PORT_DIPSETTING( 0x00, "Slots" ) // スロット
PORT_DIPNAME( 0x20, 0x20, "Winning Streak Bonus" ) PORT_DIPLOCATION("DIP-SW4:6") // 連勝ボーナス
PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無
PORT_DIPSETTING( 0x20, DEF_STR(On) ) // 有
PORT_DIPNAME( 0xc0, 0xc0, "Game Mode" ) PORT_DIPLOCATION("DIP-SW4:7,8")
PORT_DIPSETTING( 0xc0, "Credits" ) // クレジットタイプ
PORT_DIPSETTING( 0x80, "Medal with timer" ) // メダルタイマータイプ
PORT_DIPSETTING( 0x40, "Credits with timer" ) // クレジットタイマータイプ (doesn't seem to work properly - probably an emulation bug)
//PORT_DIPSETTING( 0x00, "Credits" ) // (not listed in the manual, functions the same way as "Credits")

PORT_START("DSW5")
PORT_DIPNAME( 0x01, 0x01, "Credits Per Note" ) PORT_DIPLOCATION("DIP-SW1:9") // NOTE RATE
PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // × 5
PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
PORT_DIPSETTING( 0x01, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // ×10
PORT_DIPSETTING( 0x01, "20" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02)
PORT_DIPSETTING( 0x01, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01)
PORT_DIPSETTING( 0x01, "100" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00)
PORT_DIPNAME( 0x02, 0x02, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("DIP-SW1:10") // 画面反転
PORT_DIPSETTING( 0x02, DEF_STR(Off ) ) // 通常
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転
PORT_DIPNAME( 0x0c, 0x0c, "Gokou/Shikou Generation Interval" ) PORT_DIPLOCATION("DIP-SW2:9,10") // 玉光、四光発生間隔 (from manual, not verified)
PORT_DIPSETTING( 0x00, "4 (longer)" ) // やや広い 4
PORT_DIPSETTING( 0x04, "3" ) //      3
PORT_DIPSETTING( 0x08, "2" ) //      2
PORT_DIPSETTING( 0x0c, "1 (shorter)" ) // やや狭い 1
PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP-SW3:9" )
PORT_DIPNAME( 0x20, 0x20, "Maximum Bonus Points" ) PORT_DIPLOCATION("DIP-SW3:10") // BONUS POINT MAX (from manual, not verified)
PORT_DIPSETTING( 0x20, "99" )
PORT_DIPSETTING( 0x00, "999" )
PORT_DIPNAME( 0xc0, 0xc0, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP-SW4:9,10") // パネルタイプ
PORT_DIPSETTING( 0xc0, "Hanafuda Panel" ) // 花札パネルパネル表示 (numbers/yes/no, uses take/w-up/big/small)
PORT_DIPSETTING( 0x80, "Mahjong Panel" ) // 麻雀パネルパネル表示 (letters, uses take/w-up/big/small)
PORT_DIPSETTING( 0x40, "Hanafuda Amusement" ) // 花札アミューズメント表示 (numbers/yes/no, doesn't use take/w-up/big/small)
PORT_DIPSETTING( 0x00, "Mahjong Amusement" ) // 麻雀アミューズメント表示 (letters, doesn't use take/w-up/big/small)

PORT_START("BET")
PORT_DIPNAME( 0x40, 0x40, "Auto Bet" )
PORT_DIPSETTING( 0x40, DEF_STR(Off) )
PORT_DIPSETTING( 0x00, DEF_STR(On) ) // overrides game mode setting, any credits added are bet immediately

PORT_START("HOPPER")
PORT_DIPNAME( 0x40, 0x40, "? Hopper M." )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END


/***************************************************************************


Expand Down Expand Up @@ -12441,7 +12598,7 @@ ROM_END

/***************************************************************************

Hana Night Rose
Hanafuda Night Rose

Techno-Top, Limited

Expand Down Expand Up @@ -12552,7 +12709,7 @@ GAME( 2000, jongteia, jongtei, jongteia, jongtei, hanakanz_state, empty_

GAME( 2000, mjgnight, 0, mjgnight, mjgnight, hanakanz_state, empty_init, ROT0, "Techno-Top", "Mahjong Gorgeous Night (Japan, TSM003-01)", MACHINE_NO_COCKTAIL )

GAME( 2000, hnrose, 0, hnrose, daimyojn, hanakanz_state, empty_init, ROT0, "Techno-Top", "Hana Night Rose (Japan, TSM008-04)", MACHINE_NOT_WORKING | MACHINE_NO_COCKTAIL )
GAME( 2000, hnrose, 0, hnrose, hnrose, hanakanz_state, empty_init, ROT0, "Techno-Top", "Hanafuda Night Rose (Japan, TSM008-04)", MACHINE_NOT_WORKING | MACHINE_NO_COCKTAIL )

GAME( 2001, daireach, 0, daireach, seljan2, hanakanz_state, empty_init, ROT0, "Techno-Top", "Mahjong Dai-Reach (Japan, TSM012-C01)", MACHINE_NOT_WORKING | MACHINE_NO_COCKTAIL )

Expand Down

0 comments on commit a069c12

Please sign in to comment.