diff options
Diffstat (limited to 'src/mame/igs/igs017.cpp')
-rw-r--r-- | src/mame/igs/igs017.cpp | 2738 |
1 files changed, 1671 insertions, 1067 deletions
diff --git a/src/mame/igs/igs017.cpp b/src/mame/igs/igs017.cpp index 753b237924b..6daced93f00 100644 --- a/src/mame/igs/igs017.cpp +++ b/src/mame/igs/igs017.cpp @@ -11,54 +11,89 @@ Video: IGS017 or IGS031 (2 tilemaps, variable size sprites, protection) Other: IGS025 (8255), IGS022 (protection, MCU), IGS029 (protection) Sound: M6295(K668/AR17961) + [YM2413(U3567)] --------------------------------------------------------------------------------------------------------- -Year + Game PCB CPU Sound Custom Other --------------------------------------------------------------------------------------------------------- -96 Shuzi Leyuan (V127M) NO-0131-4 Z180 AR17961 U3567 IGS017 8255 Battery -97 Chaoji Da Man Guan II (V754C) NO-0147-6 68000 K668 IGS031 8255 Battery -97 Tian Jiang Shen Bing (V137C) NO-0157-2 Z180 AR17961 U3567 IGS017 IGS025 Battery -97 Man Guan Daheng (V123T1) NO-0252 68000 M6295 IGS031 IGS025 IGS???* Battery -98 Genius 6 (V110F) NO-0131-4 Z180 K668 U3567 IGS017 IGS003c Battery -98 Long Hu Zhengba 2 (set 1) NO-0206 68000 K668 IGS031 IGS025 IGS022* Battery -98 Shuang Long Qiang Zhu 2 VS (VS203J) NO-0207 68000 K668 IGS031 IGS025 IGS022 Battery -98 Man Guan Caishen (V103CS) NO-0192-1 68000 K668 IGS017 IGS025 IGS029 Battery -99 Tarzan (V107) NO-0228? Z180 U6295 IGS031 IGS025 IGS029 Battery -99 Tarzan (V109C) NO-0248-1 Z180 U6295 IGS031 IGS025 Battery -00? Super Tarzan (V100I) NO-0230-1 Z180 K668 IGS031 IGS025 Battery -00? Happy Skill (V611IT) NO-0281 Z180 K668 IGS031 IGS025 Battery -00? Champion Poker 2 (V100A) unreadable Z180 M6295 IGS031 IGS025 Battery -00? Super Poker (V100xD03) / Formosa NO-0187 Z180 K668 U3567 IGS017 IGS025 Battery --------------------------------------------------------------------------------------------------------- - not present in another set * +-------------------------------------------------------------------------------------------------------------- +Year + Game PCB CPU Sound Custom Other +-------------------------------------------------------------------------------------------------------------- +96 Shuzi Leyuan (V127M) NO-0131-4 Z180 AR17961 U3567 IGS017 8255 Battery +97 Chaoji Da Manguan II (V754C) NO-0147-6 68000 K668 IGS031 8255 Battery +97 Tian Jiang Shen Bing (V137C) NO-0157-2 Z180 AR17961 U3567 IGS017 IGS025 Battery +97 Manguan Daheng (V123T1) NO-0252 68000 M6295 IGS031 IGS025 IGS???* Battery +98 Genius 6 (V110F) NO-0131-4 Z180 K668 U3567 IGS017 IGS003c Battery +98 Long Hu Zhengba 2 (set 1) NO-0206 68000 K668 IGS031 IGS025 IGS022* Battery +98 Long Hu Zhengba 2 (VS105M) NO-0182-2 68000 M6295 IGS031 IGS025 IGS022 Battery +98 Shuang Long Qiang Zhu 2 VS (VS203J) NO-0207 68000 K668 IGS031 IGS025 IGS022 Battery +98 Manguan Caishen (V103CS) NO-0192-1 68000 K668 IGS017 IGS025 IGS029 Battery +98 Manguan Caishen (V106CS) NO-0208 68000 M6295 IGS031 IGS025 IGS029 Battery +98 Manguan Caishen (V110C) NO-0266 68000 M6295 IGS031 IGS025 IGS026 Battery +99 Tarzan (V107) NO-0228? Z180 U6295 IGS031 IGS025 IGS029 Battery +99 Tarzan (V109C) NO-0248-1 Z180 U6295 IGS031 IGS025 Battery +00 Chaoji Da Manguan 2 - Jiaqiang Ban (V100C) NO-0271 68000 K668 IGS031 IGS025 Battery +00? Jungle King (V103A) NO-0230-1 Z180 U6295 IGS031 IGS025 (N9) Battery +00? Super Tarzan (V100I) NO-0230-1 Z180 K668 IGS031 IGS025 Battery +00? Happy Skill (V611IT) NO-0281 Z180 K668 IGS031 IGS025 Battery +00? Champion Poker 2 (V100A) unreadable Z180 M6295 IGS031 IGS025 Battery +00? Super Poker (V100xD03) / Formosa NO-0187 Z180 K668 U3567 IGS017 IGS025 Battery +00? Jungle King (V302US) NO-0214-7 68000 K668 IGS031 IGS025 IGS029 Battery +-------------------------------------------------------------------------------------------------------------- + not present in another set * To Do: -- Protection emulation in some games, instead of patching the roms. -- NVRAM. +- Protection emulation in some games, instead of patching the ROMs. +- Do iqblocka and clones, genius6 and clones, tjsb support NVRAM? - mgcs: Finish IGS029 protection simulation. +- jking302us: IGS025 and IGS029 protection simulation. +- sdmg2: different protection that kicks in after several dozens of hands Notes: - Test mode is usually accessed by keeping test (F2) pressed during boot. -- iqblocka: keep start (1) pressed during boot for DSWs & input test. Keep test (F2) pressed for book-keeping / setup [pass: press deal (2)]. +- The sound test is often accessed by holding test (F2) and bookkeeping (0) at the I/O test screen. +- The default bookkeeping password is often Start eight times. +- Some games (e.g. Tarzan Chuan Tian Guan) refer to the double-up game as 续玩 (literally "Continue Play"), + so settings like 续玩有无 refer to the double-up game, not a conventional "continue" feature. +- iqblocka: keep start (1) pressed during boot for DSWs & input test. Keep test (F2) pressed for bookkeeping / setup [pass: press deal (2)]. - iqblockf/genius6: press service1 (9) then press deal (2) eight times to switch to gambling. Then test (F2) enters book-keeping / setup. - lhzb2, mgcs, slqz2, tjsb: press test (F2) + book (0) during inputs test for sound test. - mgdh, sdmg2: press keys A + B during test mode for sound test (B1 + B2 + B3 when using a joystick in mgdh). - spkrform: to switch from poker to Formosa press service1 (9). To switch back, press in sequence: service3 (right of 0) then Bet (M) then press "Hold 1".."Hold 5" (Z, X, C, V, B) +- Tarzan Chuang Tian Guan mahjong controls: + Mahjong keyboard: + Start Start Stop All Take Score + Mahjong Bet Bet + Mahjong A Show Odds Stop 1 Double Up (twice winnings) + Mahjong B Stop 2 + Mahjong C Stop 3 Double Up (winnings) + Mahjong D Stop 4 + Mahjong E Double Up (half winnings) + Mahjong K Big + Mahjong M Small + Joystick: + Up Stop 1 + Down Stop 2 + Left Stop 3 + Right Stop 4 + Start Start Stop All Take Score + Button 1 Show Odds Big Double Up (twice winnings) + Button 2 Bet Double Up (winnings) + Button 3 Small Double Up (half winnings) ************************************************************************************************************/ #include "emu.h" +#include "igs017_igs031.h" +#include "igs022.h" +#include "igsmahjong.h" + #include "cpu/m68000/m68000.h" #include "cpu/z180/z180.h" #include "machine/i8255.h" -#include "igs022.h" +#include "machine/nvram.h" #include "machine/ticket.h" #include "machine/timer.h" #include "sound/okim6295.h" #include "sound/ymopl.h" -#include "igs017_igs031.h" #include "emupal.h" #include "screen.h" @@ -100,8 +135,8 @@ public: u8 data_r(); protected: - virtual void device_start() override; - virtual void device_reset() override; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; virtual space_config_vector memory_space_config() const override; @@ -168,8 +203,8 @@ public: void dump(const char *filename, u32 string_addr, u32 xor_addr, bool is_16bits) const; protected: - virtual void device_start() override; - virtual void device_reset() override; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; private: required_memory_region m_region_key; @@ -317,8 +352,8 @@ public: void set_val_xor(u16 val_xor); protected: - virtual void device_start() override; - virtual void device_reset() override; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; private: u8 m_m3 = 0, m_mf = 0; @@ -482,8 +517,8 @@ public: void dec_w(u8 data); protected: - virtual void device_start() override; - virtual void device_reset() override; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; private: u8 m_val = 0; @@ -550,8 +585,8 @@ public: void inc_w(u8 data); protected: - virtual void device_start() override; - virtual void device_reset() override; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; private: u8 m_val = 0; @@ -627,49 +662,62 @@ public: , m_lamps(*this, "lamp%u", 1U) { } - // Construct - void base_machine_oki(machine_config &config, const XTAL &xtal_oki); // Z180 - void cpoker2(machine_config &config); - void genius6(machine_config &config); - void happyskl(machine_config &config); - void iqblocka(machine_config &config); - void iqblockf(machine_config &config); - void spkrform(machine_config &config); - void starzan(machine_config &config); - void tarzan(machine_config &config); - void tjsb(machine_config &config); + void cpoker2(machine_config &config) ATTR_COLD; + void genius6(machine_config &config) ATTR_COLD; + void happyskl(machine_config &config) ATTR_COLD; + void iqblocka(machine_config &config) ATTR_COLD; + void iqblockf(machine_config &config) ATTR_COLD; + void spkrform(machine_config &config) ATTR_COLD; + void starzan(machine_config &config) ATTR_COLD; + void tarzan(machine_config &config) ATTR_COLD; + void tjsb(machine_config &config) ATTR_COLD; // 68000 - void lhzb2(machine_config &config); - void lhzb2a(machine_config &config); - void mgcs(machine_config &config); - void mgdh(machine_config &config); - void mgdha(machine_config &config); - void sdmg2(machine_config &config); - void slqz2(machine_config &config); + void jking302us(machine_config &config) ATTR_COLD; + void lhzb2(machine_config &config) ATTR_COLD; + void lhzb2a(machine_config &config) ATTR_COLD; + void mgcs(machine_config &config) ATTR_COLD; + void mgcsa(machine_config &config) ATTR_COLD; + void mgcsb(machine_config &config) ATTR_COLD; + void mgdh(machine_config &config) ATTR_COLD; + void mgdha(machine_config &config) ATTR_COLD; + void sdmg2(machine_config &config) ATTR_COLD; + void sdmg2p(machine_config &config) ATTR_COLD; + void slqz2(machine_config &config) ATTR_COLD; // Init - void init_cpoker2(); - void init_happyskl(); - void init_iqblocka(); - void init_lhzb2(); - void init_lhzb2a(); - void init_mgcs(); - void init_mgdh(); - void init_mgdha(); - void init_sdmg2(); - void init_slqz2(); - void init_spkrform(); - void init_starzan(); - void init_tarzan(); - void init_tarzana(); - void init_tarzanc(); - void init_tjsb(); + void init_cpoker2() ATTR_COLD; + void init_happyskl() ATTR_COLD; + void init_iqblocka() ATTR_COLD; + void init_jking103a() ATTR_COLD; + void init_jking200pr() ATTR_COLD; + void init_jking302us() ATTR_COLD; + void init_lhzb2() ATTR_COLD; + void init_lhzb2a() ATTR_COLD; + void init_mgcs() ATTR_COLD; + void init_mgcsa() ATTR_COLD; + void init_mgcsb() ATTR_COLD; + void init_mgdh() ATTR_COLD; + void init_mgdha() ATTR_COLD; + void init_sdmg2() ATTR_COLD; + void init_sdmg2754ca() ATTR_COLD; + void init_sdmg2754cb() ATTR_COLD; + void init_sdmg2p() ATTR_COLD; + void init_slqz2() ATTR_COLD; + void init_spkrform() ATTR_COLD; + void init_starzan() ATTR_COLD; + void init_tarzan() ATTR_COLD; + void init_tarzana() ATTR_COLD; + void init_tarzanc() ATTR_COLD; + void init_tjsb() ATTR_COLD; + + template <typename T = ioport_value, unsigned B = 0, unsigned R = 0> + T keys_ipt_r(); protected: - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; private: int m_remap_addr; @@ -798,11 +846,9 @@ private: u8 mgcs_igs029_data_r(); void mgcs_igs029_data_w(u8 data); - u8 mgdh_keys_r(); void mgdh_keys_hopper_w(u8 data); void mgdh_counter_w(u8 data); - u8 sdmg2_keys_joy_r(); void sdmg2_keys_hopper_w(u8 data); void slqz2_sound_hopper_w(u8 data); @@ -811,7 +857,6 @@ private: void starzan_counter_w(u8 data); void starzan_lamps_sound_w(u8 data); - u8 tarzan_keys_joy_r(); void tarzan_counter_w(u8 data); void tarzan_dsw_sound_w(u8 data); void tarzan_incdec_remap_addr_w(offs_t offset, u8 data); @@ -824,69 +869,73 @@ private: TIMER_DEVICE_CALLBACK_MEMBER(mgdh_interrupt); // Decrypt - void decrypt_program_rom(int mask, int a7, int a6, int a5, int a4, int a3, int a2, int a1, int a0); - - void lhzb2_decrypt_sprites(); - void lhzb2_decrypt_tiles(); - void mgcs_decrypt_program_rom(); - void mgcs_decrypt_tiles(); - void mgcs_flip_sprites(); - void mgcs_igs029_run(); - void slqz2_decrypt_tiles(); - void spkrform_decrypt_sprites(); - void starzan_decrypt_program_rom(); - void starzan_decrypt_sprites(); - void tarzan_decrypt_program_rom(); - void tarzan_decrypt_sprites(size_t max_size); - void tarzan_decrypt_tiles(int address_xor); - void tarzana_decrypt_program_rom(); - void tjsb_decrypt_sprites(); + void decrypt_program_rom(int mask, int a7, int a6, int a5, int a4, int a3, int a2, int a1, int a0) ATTR_COLD; + + void jking200pr_decrypt_program_rom() ATTR_COLD; + void mgcs_decrypt_program_rom() ATTR_COLD; + void mgcsa_decrypt_program_rom() ATTR_COLD; + void mgcsb_decrypt_program_rom() ATTR_COLD; + void mgcs_igs029_run() ATTR_COLD; + void starzan_decrypt_program_rom() ATTR_COLD; + void tarzan_decrypt_program_rom() ATTR_COLD; + void tarzana_decrypt_program_rom() ATTR_COLD; // ROM Patches -// void lhzb2_patch_rom(); -// void mgcs_patch_rom(); -// void slqz2_patch_rom(); - void mgdh_patch_rom(); - void spkrform_patch_rom(); +// void lhzb2_patch_rom() ATTR_COLD; +// void mgcs_patch_rom() ATTR_COLD; +// void slqz2_patch_rom() ATTR_COLD; + void mgdh_patch_rom() ATTR_COLD; + void spkrform_patch_rom() ATTR_COLD; + + // Construct + void base_machine_oki(machine_config &config, const XTAL &xtal_oki) ATTR_COLD; // Memory maps - void decrypted_opcodes_map(address_map &map); - - void igs_bitswap_mux_map(address_map &map); - void igs_fixed_data_mux_map(address_map &map); - void igs_string_mux_map(address_map &map); - - void cpoker2_io(address_map &map); - void cpoker2_map(address_map &map); - void cpoker2_mux_map(address_map &map); - void happyskl_io(address_map &map); - void happyskl_mux_map(address_map &map); - void iqblocka_io(address_map &map); - void iqblocka_map(address_map &map); - void iqblocka_mux_map(address_map &map); - void iqblockf_mux_map(address_map &map); - void lhzb2_map(address_map &map); - void lhzb2_mux_map(address_map &map); - void lhzb2a_map(address_map &map); - void lhzb2a_mux_map(address_map &map); - void mgcs_map(address_map &map); - void mgcs_mux_map(address_map &map); - void mgdh_mux_map(address_map &map); - void mgdh_map(address_map &map); - void mgdha_mux_map(address_map &map); - void sdmg2_map(address_map &map); - void sdmg2_mux_map(address_map &map); - void slqz2_map(address_map &map); - void slqz2_mux_map(address_map &map); - void spkrform_io(address_map &map); - void spkrform_mux_map(address_map &map); - void starzan_io(address_map &map); - void starzan_mux_map(address_map &map); - void tarzan_io(address_map &map); - void tarzan_mux_map(address_map &map); - void tjsb_io(address_map &map); - void tjsb_map(address_map &map); - void tjsb_mux_map(address_map &map); + void decrypted_opcodes_map(address_map &map) ATTR_COLD; + + void igs_bitswap_mux_map(address_map &map) ATTR_COLD; + void igs_fixed_data_mux_map(address_map &map) ATTR_COLD; + void igs_string_mux_map(address_map &map) ATTR_COLD; + + void cpoker2_io(address_map &map) ATTR_COLD; + void cpoker2_map(address_map &map) ATTR_COLD; + void cpoker2_mux_map(address_map &map) ATTR_COLD; + void happyskl_map(address_map &map) ATTR_COLD; + void happyskl_io(address_map &map) ATTR_COLD; + void happyskl_mux_map(address_map &map) ATTR_COLD; + void iqblocka_io(address_map &map) ATTR_COLD; + void iqblocka_map(address_map &map) ATTR_COLD; + void iqblocka_mux_map(address_map &map) ATTR_COLD; + void iqblockf_mux_map(address_map &map) ATTR_COLD; + void jking302us_map(address_map &map) ATTR_COLD; + void jking302us_mux_map(address_map &map) ATTR_COLD; + void lhzb2_map(address_map &map) ATTR_COLD; + void lhzb2_mux_map(address_map &map) ATTR_COLD; + void lhzb2a_map(address_map &map) ATTR_COLD; + void lhzb2a_mux_map(address_map &map) ATTR_COLD; + void mgcs_map(address_map &map) ATTR_COLD; + void mgcs_mux_map(address_map &map) ATTR_COLD; + void mgcsa_map(address_map &map) ATTR_COLD; + void mgcsb_map(address_map &map) ATTR_COLD; + void mgcsb_mux_map(address_map &map) ATTR_COLD; + void mgdh_mux_map(address_map &map) ATTR_COLD; + void mgdh_map(address_map &map) ATTR_COLD; + void mgdha_mux_map(address_map &map) ATTR_COLD; + void sdmg2_map(address_map &map) ATTR_COLD; + void sdmg2_mux_map(address_map &map) ATTR_COLD; + void sdmg2p_map(address_map &map) ATTR_COLD; + void sdmg2p_mux_map(address_map &map) ATTR_COLD; + void slqz2_map(address_map &map) ATTR_COLD; + void slqz2_mux_map(address_map &map) ATTR_COLD; + void spkrform_io(address_map &map) ATTR_COLD; + void spkrform_mux_map(address_map &map) ATTR_COLD; + void starzan_io(address_map &map) ATTR_COLD; + void starzan_mux_map(address_map &map) ATTR_COLD; + void tarzan_io(address_map &map) ATTR_COLD; + void tarzan_mux_map(address_map &map) ATTR_COLD; + void tjsb_io(address_map &map) ATTR_COLD; + void tjsb_map(address_map &map) ATTR_COLD; + void tjsb_mux_map(address_map &map) ATTR_COLD; }; void igs017_state::machine_start() @@ -1039,34 +1088,12 @@ void igs017_state::init_iqblocka() // tjsb -void igs017_state::tjsb_decrypt_sprites() -{ - const int rom_size = memregion("igs017_igs031:sprites")->bytes(); - u8 * const rom = memregion("igs017_igs031:sprites")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); - - // address lines swap - memcpy(tmp.get(), rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr = (i & ~0xff) | bitswap<8>(i,7,6,5,2,1,4,3,0); - rom[i] = tmp[addr]; - } - - // data lines swap - for (int i = 0; i < rom_size; i += 2) - { - u16 data = get_u16le(&rom[i]); // x-22222-11111-00000 - data = bitswap<16>(data, 15, 14,13,12,11,10, 9,1,7,6,5, 4,3,2,8,0); - put_u16le(&rom[i], data); - } -} void igs017_state::init_tjsb() { decrypt_program_rom(0x05, 7, 6, 3, 2, 5, 4, 1, 0); - tjsb_decrypt_sprites(); + m_igs017_igs031->tjsb_decrypt_sprites(); // m_igs_string->dump("tjsb_string.key", 0x1d24a, 0x1db4, false); } @@ -1122,39 +1149,89 @@ void igs017_state::mgcs_decrypt_program_rom() } } -void igs017_state::mgcs_decrypt_tiles() +void igs017_state::mgcsa_decrypt_program_rom() { - const int rom_size = memregion("igs017_igs031:tilemaps")->bytes(); - u8 * const rom = memregion("igs017_igs031:tilemaps")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); + const int rom_size = memregion("maincpu")->bytes(); + u16 * const rom = (u16 *)memregion("maincpu")->base(); - memcpy(&tmp[0], rom, rom_size); - for (int i = 0; i < rom_size; i++) + for (int i = 0; i < rom_size / 2; i++) { - int addr = (i & ~0xffff) | bitswap<16>(i,15,14,13,12,11,10,6,7,8,9,5,4,3,2,1,0); - rom[i^1] = bitswap<8>(tmp[addr],0,1,2,3,4,5,6,7); + u16 x = rom[i]; + + if (i & 0x20 / 2) + { + if (i & 0x02 / 2) + { + x ^= 0x0001; + } + } + + if (!(i & 0x4000 / 2)) + { + if (!(i & 0x300 / 2)) + { + x ^= 0x0001; + } + } + + if (!(i & 0x1000 / 2) && !(i & 0x100 / 2)) + { + if (!(i & 0x20 / 2)) + { + x ^= 0x0100; + } + } + else if (i & 0x1000 / 2) + { + if ((!(i & 0x100 / 2)) || ((i & 0x20 / 2) && (!(i & 0x400 / 2)))) + { + x ^= 0x0100; + } + } + + rom[i] = x; } } -void igs017_state::mgcs_flip_sprites() +void igs017_state::mgcsb_decrypt_program_rom() { - const int rom_size = memregion("igs017_igs031:sprites")->bytes(); - u8 * const rom = memregion("igs017_igs031:sprites")->base(); + const int rom_size = memregion("maincpu")->bytes(); + u16 * const rom = (u16 *)memregion("maincpu")->base(); - for (int i = 0; i < rom_size; i+=2) + for (int i = 0; i < rom_size / 2; i++) { - u16 pixels = get_u16le(&rom[i]); + u16 x = rom[i]; - // flip bits - pixels = bitswap<16>(pixels,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); + if (i & 0x20 / 2) + { + if (i & 0x02 / 2) + { + x ^= 0x0001; + } + } - // flip pixels - pixels = bitswap<16>(pixels,15, 0,1,2,3,4, 5,6,7,8,9, 10,11,12,13,14); + if (!(i & 0x4000 / 2)) + { + if (!(i & 0x300 / 2)) + { + x ^= 0x0001; + } + } + + if ((i & 0x50100 / 2) == 0x10100 / 2) // TODO: maybe incomplete + { + x ^= 0x0200; + } + if ((i & 0x50300 / 2) == 0x100 / 2) // TODO: maybe incomplete + { + x ^= 0x0200; + } - put_u16le(&rom[i], pixels); + rom[i] = x; } } + #if 0 void igs017_state::mgcs_patch_rom() { @@ -1174,29 +1251,32 @@ void igs017_state::init_mgcs() mgcs_decrypt_program_rom(); // mgcs_patch_rom(); - mgcs_decrypt_tiles(); - mgcs_flip_sprites(); + m_igs017_igs031->mgcs_decrypt_tiles(); + m_igs017_igs031->mgcs_flip_sprites(0); // m_igs_string->dump("mgcs_string.key", 0x1424, 0x1338, true); } +void igs017_state::init_mgcsa() +{ + mgcsa_decrypt_program_rom(); -// tarzan, tarzana + m_igs017_igs031->mgcs_decrypt_tiles(); + m_igs017_igs031->mgcs_flip_sprites(0); +} -void igs017_state::tarzan_decrypt_tiles(int address_xor) +void igs017_state::init_mgcsb() { - const int rom_size = memregion("igs017_igs031:tilemaps")->bytes(); - u8 * const rom = memregion("igs017_igs031:tilemaps")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); + mgcsb_decrypt_program_rom(); - memcpy(&tmp[0], rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr = (i & ~0xffff) | (bitswap<16>(i,15,14,13,12,11, 7,8,6,10,9, 5,4,3,2,1,0) ^ address_xor); - rom[i] = bitswap<8>(tmp[addr],0,1,2,3,4,5,6,7); - } + m_igs017_igs031->mgcs_decrypt_tiles(); + m_igs017_igs031->mgcs_flip_sprites(0); } + +// tarzan, tarzana + + void igs017_state::tarzan_decrypt_program_rom() { const int rom_size = memregion("maincpu")->bytes(); @@ -1231,8 +1311,8 @@ void igs017_state::tarzan_decrypt_program_rom() void igs017_state::init_tarzanc() { tarzan_decrypt_program_rom(); - tarzan_decrypt_tiles(1); - tarzan_decrypt_sprites(0); + m_igs017_igs031->tarzan_decrypt_tiles(1); + m_igs017_igs031->tarzan_decrypt_sprites(0, 0); // m_igs_string->dump("tarzan_string.key", 0xa98a, 0xab01, false); // tarzan / tarzanc (same program rom) } @@ -1276,7 +1356,7 @@ void igs017_state::tarzana_decrypt_program_rom() void igs017_state::init_tarzan() { tarzan_decrypt_program_rom(); - tarzan_decrypt_tiles(0); + m_igs017_igs031->tarzan_decrypt_tiles(0); // m_igs_string->dump("tarzan_string.key", 0xa98a, 0xab01, false); // tarzan / tarzanc (same program rom) } @@ -1284,7 +1364,7 @@ void igs017_state::init_tarzan() void igs017_state::init_tarzana() { tarzana_decrypt_program_rom(); - tarzan_decrypt_tiles(0); + m_igs017_igs031->tarzan_decrypt_tiles(0); // m_igs_string->dump("tarzana_string.key", 0xaa64, 0xabdb, false); // same data as tarzan / tarzanc } @@ -1331,47 +1411,63 @@ void igs017_state::starzan_decrypt_program_rom() void igs017_state::init_starzan() { starzan_decrypt_program_rom(); - tarzan_decrypt_tiles(1); - starzan_decrypt_sprites(); + m_igs017_igs031->tarzan_decrypt_tiles(1); + m_igs017_igs031->starzan_decrypt_sprites(0x200000, 0x400000); // m_igs_string->dump("starzan_string.key", 0xa86f, 0xa966, false); } - -void igs017_state::tarzan_decrypt_sprites(size_t max_size) +void igs017_state::init_jking103a() { - mgcs_flip_sprites(); - - const int rom_size = max_size ? max_size : memregion("igs017_igs031:sprites")->bytes(); - u8 *rom = memregion("igs017_igs031:sprites")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); + starzan_decrypt_program_rom(); + m_igs017_igs031->tarzan_decrypt_tiles(1); + m_igs017_igs031->tarzan_decrypt_sprites(0, 0); - // address lines swap - memcpy(tmp.get(), rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr = (i & ~0xffff) | bitswap<16>(i,15,14,13, 9,10,11,12, 5,6,7,8, 4,3,2,1,0); - rom[i] = tmp[addr]; - } +// m_igs_string->dump("jking103a_string.key", 0xb14d, 0xb244, false); } -void igs017_state::starzan_decrypt_sprites() +void igs017_state::jking200pr_decrypt_program_rom() { - tarzan_decrypt_sprites(0x200000); + const int rom_size = memregion("maincpu")->bytes(); + u8 * const rom = memregion("maincpu")->base(); - // Overlay rom: + for (int i = 0; i < rom_size; i++) + { + u8 x = rom[i]; - const int rom_size = 0x80000; - u8 *rom = memregion("igs017_igs031:sprites")->base() + 0x200000; - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); + if ((i & 0x00011) == 0x00011) x ^= 0x01; + if ((i & 0x02180) == 0x00000) x ^= 0x01; + if (((i & 0x00220) == 0x00020) || ((i & 0x002a0) == 0x002a0)) x ^= 0x20; + if (((i & 0x00200) == 0x00000) || ((i & 0x00220) == 0x00220)) x ^= 0x40; + if ((i & 0x001c0) != 0x00040) x ^= 0x80; - // address lines swap - memcpy(tmp.get(), rom, rom_size); - for (int i = 0; i < rom_size; i++) + m_decrypted_opcodes[i] = x; + } + + for (int i = 0; i < rom_size; i++) // by iq_132 { - int addr = (i & ~0xffff) | bitswap<16>(i,15,14,13,12,11,10,9, 6,5, 8,7, 1,2,3,4, 0); - rom[i] = tmp[addr]; + u8 x = rom[i]; + + if ((i & 0x00011) == 0x00011) x ^= 0x01; + if ((i & 0x02180) == 0x00000) x ^= 0x01; + if (((i & 0x001e0) == 0x00100) || ((i & 0x001e0) == 0x00140)) x ^= 0x20; + if ((i & 0x00260) != 0x00020) x ^= 0x40; + if (((i & 0x00020) == 0x00020) || ((i & 0x00180) == 0x00080)) x ^= 0x80; + + rom[i] = x; } + +// save_decrypted_rom(rom, rom_size); +// save_decrypted_rom(m_decrypted_opcodes, rom_size); +} + +void igs017_state::init_jking200pr() +{ + jking200pr_decrypt_program_rom(); + m_igs017_igs031->tarzan_decrypt_tiles(1); + m_igs017_igs031->tarzan_decrypt_sprites(0, 0); + +// m_igs_string->dump("jking200pr_string.key", 0xb14d, 0xb244, false); } void igs017_state::init_happyskl() @@ -1409,8 +1505,8 @@ void igs017_state::init_happyskl() rom[i] = x; } - tarzan_decrypt_tiles(1); - starzan_decrypt_sprites(); + m_igs017_igs031->tarzan_decrypt_tiles(1); + m_igs017_igs031->starzan_decrypt_sprites(0x200000, 0); } @@ -1434,14 +1530,14 @@ void igs017_state::init_cpoker2() rom[i] = x; } - tarzan_decrypt_tiles(1); - tarzan_decrypt_sprites(0); + m_igs017_igs031->tarzan_decrypt_tiles(1); + m_igs017_igs031->tarzan_decrypt_sprites(0, 0); } // sdmg2 -void igs017_state::init_sdmg2() +void igs017_state::init_sdmg2754ca() { const int rom_size = memregion("maincpu")->bytes(); u16 * const rom = (u16 *)memregion("maincpu")->base(); @@ -1491,6 +1587,116 @@ void igs017_state::init_sdmg2() } } +// +void igs017_state::init_sdmg2754cb() +{ + const int rom_size = memregion("maincpu")->bytes(); + u16 * const rom = (u16 *)memregion("maincpu")->base(); + + for (int i = 0; i < rom_size / 2; i++) + { + u16 x = rom[i]; + + // bit 0 xor layer + + if (i & 0x20/2) + { + if (i & 0x02/2) + { + x ^= 0x0001; + } + } + + if (!(i & 0x4000/2)) + { + if (!(i & 0x300/2)) + { + x ^= 0x0001; + } + } + + // bit 9 xor layer + if (i & 0x20000/2) + { + x ^= 0x0200; + } + else + { + if (!(i & 0x200/2)) + { + x ^= 0x0200; + } + } + + // bit 12 xor layer + if (i & 0x20000/2) + { + x ^= 0x1000; + } + + rom[i] = x; + } +} + +void igs017_state::init_sdmg2() +{ + const int rom_size = memregion("maincpu")->bytes(); + u16 * const rom = (u16 *)memregion("maincpu")->base(); + + for (int i = 0; i < rom_size / 2; i++) + { + u16 x = rom[i]; + + // bit 0 xor layer + if (i & 0x20 / 2) + if (i & 0x02 / 2) + x ^= 0x0001; + + if (!(i & 0x4000 / 2)) + if (!(i & 0x300 / 2)) + x ^= 0x0001; + + // bit 9 xor layer + if (!(i & 0x20000 / 2)) + if (i & 0x400 / 2) + x ^= 0x0200; + + // bit 12 xor layer + if (i & 0x20000 / 2) + x ^= 0x1000; + + rom[i] = x; + } +} + +// sdmg2p + +void igs017_state::init_sdmg2p() +{ + const int rom_size = memregion("maincpu")->bytes(); + u16 * const rom = (u16 *)memregion("maincpu")->base(); + + for (int i = 0; i < rom_size / 2; i++) + { + u16 x = rom[i]; + + // bit 0 xor layer + if (((i & 0x4320 / 2) == (0x0000 / 2)) || ((i & 0x4322 / 2) == (0x0020 / 2)) || ((i & 0x0122 / 2) == (0x0122 / 2)) || ((i & 0x0222 / 2) == (0x0222 / 2)) || ((i & 0x4322 / 2) == (0x4022 / 2))) + x ^= 0x0001; + + // bit 6 xor layer + if ((i & 0x4000 / 2) || (i & 0x0200 / 2) || ((i & 0x4b68 / 2) == (0x0048 / 2)) || ((i & 0x4b40 / 2) == (0x0840 / 2))) + x ^= 0x0040; + + // bit 13 xor layer + if (((i & 0x60000 / 2 ) == (0x00000 / 2)) || ((i & 0x60000 / 2 ) == (0x60000 / 2))) + x ^= 0x2000; + + rom[i] = x; + } + +// m_igs_string->dump("sdmg2p_string.key", 0x7f512, 0x?????, true); +} // mgdh, mgdha @@ -1523,7 +1729,7 @@ void igs017_state::init_mgdha() rom[i] = x; } - mgcs_flip_sprites(); + m_igs017_igs031->mgcs_flip_sprites(0); // m_igs_string->dump("mgdh_string.key", 0x7b214, 0x7b128, true); // mgdh, mgdha (0x7c5ba, ???) } @@ -1559,43 +1765,6 @@ void igs017_state::lhzb2_patch_rom() } #endif -void igs017_state::lhzb2_decrypt_tiles() -{ - const int rom_size = memregion("igs017_igs031:tilemaps")->bytes(); - u8 * const rom = memregion("igs017_igs031:tilemaps")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); - - memcpy(&tmp[0], rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr = (i & ~0xffffff) | bitswap<24>(i,23,22,21,20,19,18,17,1,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,0); - rom[i] = tmp[addr]; - } -} - -void igs017_state::lhzb2_decrypt_sprites() -{ - const int rom_size = memregion("igs017_igs031:sprites")->bytes(); - u8 * const rom = memregion("igs017_igs031:sprites")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); - - // address lines swap - memcpy(tmp.get(), rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr = (i & ~0xffff) | bitswap<16>(i,15,14,13,6,7,10,9,8,11,12,5,4,3,2,1,0); - rom[i] = tmp[addr]; - } - - // data lines swap - for (int i = 0; i < rom_size; i+=2) - { - u16 data = get_u16le(&rom[i]); // x-22222-11111-00000 - data = bitswap<16>(data, 15, 7,6,5,4,3, 2,1,0,14,13, 12,11,10,9,8); - put_u16le(&rom[i], data); - } -} - void igs017_state::init_lhzb2() { const int rom_size = memregion("maincpu")->bytes(); @@ -1679,8 +1848,8 @@ void igs017_state::init_lhzb2() rom[i] = x; } - lhzb2_decrypt_tiles(); - lhzb2_decrypt_sprites(); + m_igs017_igs031->lhzb2_decrypt_tiles(); + m_igs017_igs031->lhzb2_decrypt_sprites(); // lhzb2_patch_rom(); @@ -1745,8 +1914,8 @@ void igs017_state::init_lhzb2a() rom[i] = x; } - lhzb2_decrypt_tiles(); - lhzb2_decrypt_sprites(); + m_igs017_igs031->lhzb2_decrypt_tiles(); + m_igs017_igs031->lhzb2_decrypt_sprites(); // m_igs_string->dump("lhzb2a_string.key", 0x6e11c, 0x6e030, true); // same data as lhzb2 } @@ -1767,20 +1936,6 @@ void igs017_state::slqz2_patch_rom() } #endif -void igs017_state::slqz2_decrypt_tiles() -{ - const int rom_size = memregion("igs017_igs031:tilemaps")->bytes(); - u8 * const rom = memregion("igs017_igs031:tilemaps")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); - - memcpy(&tmp[0], rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr = (i & ~0xff) | bitswap<8>(i,7,4,5,6,3,2,1,0); - rom[i] = tmp[addr]; - } -} - void igs017_state::init_slqz2() { const int rom_size = memregion("maincpu")->bytes(); @@ -1855,8 +2010,8 @@ void igs017_state::init_slqz2() rom[i] = x; } - slqz2_decrypt_tiles(); - lhzb2_decrypt_sprites(); + m_igs017_igs031->slqz2_decrypt_tiles(); + m_igs017_igs031->lhzb2_decrypt_sprites(); // slqz2_patch_rom(); @@ -1866,26 +2021,6 @@ void igs017_state::init_slqz2() // spkrform -void igs017_state::spkrform_decrypt_sprites() -{ - const int rom_size = memregion("igs017_igs031:sprites")->bytes(); - u8 * const rom = memregion("igs017_igs031:sprites")->base(); - std::unique_ptr<u8[]> tmp = std::make_unique<u8[]>(rom_size); - - // address lines swap - memcpy(tmp.get(), rom, rom_size); - for (int i = 0; i < rom_size; i++) - { - int addr; - if (i & 0x80000) - addr = (i & ~0xff) | bitswap<8>(i,7,6,3,4,5,2,1,0); - else - addr = (i & ~0xffff) | bitswap<16>(i,15,14,13,12,11,10, 4, 8,7,6,5, 9,3,2,1,0); - - rom[i] = tmp[addr]; - } -} - void igs017_state::spkrform_patch_rom() { u8 * const rom = memregion("maincpu")->base(); @@ -1898,13 +2033,79 @@ void igs017_state::init_spkrform() { decrypt_program_rom(0x14, 7, 6, 5, 4, 3, 0, 1, 2); - spkrform_decrypt_sprites(); + m_igs017_igs031->spkrform_decrypt_sprites(); spkrform_patch_rom(); // m_igs_string->dump("spkrform_string.key", 0x9dec, 0x9d00, false); } + +void igs017_state::init_jking302us() +{ + const int rom_size = memregion("maincpu")->bytes(); + u16 * const rom = (u16 *)memregion("maincpu")->base(); + + for (int i = 0; i < rom_size / 2; i++) + { + u16 x = rom[i]; + + // bit 0 xor layer + + if (i & 0x0020 / 2) + if (i & 0x0002/ 2) + x ^= 0x0001; + + if (!(i & 0x4000 / 2)) + if (!(i & 0x0300 / 2)) + x ^= 0x0001; + + // bit 9 xor layer + + if (i & 0x1000 / 2) + { + if (i & 0x0400 / 2) + if (i & 0x0008 / 2) + x ^= 0x0200; + } + else + { + if (i & 0x4000 / 2) + { + if (i & 0x0080 / 2) + x ^= 0x0200; + else + { + if (i & 0x0400 / 2) + if (i & 0x0008 / 2) + x ^= 0x0200; + } + } + else + { + if (!(i & 0x0400 / 2)) + { + if (i & 0x0080 / 2) + if (i & 0x0004/ 2) + x ^= 0x0200; + } + else + { + if ((i & 0x0008 / 2) || ((i & 0x008c / 2) == 0x0084 /2)) + x ^= 0x0200; + } + } + } + + rom[i] = x; + } + + m_igs017_igs031->tarzan_decrypt_tiles(1); // TODO: verify once it works + m_igs017_igs031->tarzan_decrypt_sprites(0, 0); // TODO: verify once it works + +// m_igs_string->dump("jking103a_string.key", 0xb14d, 0xb244, false); // TODO +} + /*************************************************************************** Memory Maps ***************************************************************************/ @@ -1946,7 +2147,7 @@ void igs017_state::igs_fixed_data_mux_map(address_map &map) void igs017_state::iqblocka_map(address_map &map) { map(0x00000, 0x0dfff).rom(); - map(0x0e000, 0x0efff).ram(); + map(0x0e000, 0x0efff).ram().share("nvram"); map(0x0f000, 0x0ffff).ram(); map(0x10000, 0x3ffff).rom(); } @@ -2085,6 +2286,13 @@ void igs017_state::starzan_mux_map(address_map &map) // happyksl +void igs017_state::happyskl_map(address_map &map) +{ + map(0x00000, 0x0dfff).rom(); + map(0x0e000, 0x0ffff).ram().share("nvram"); + map(0x10000, 0x3ffff).rom(); +} + void igs017_state::happyskl_io(address_map &map) { map(0x0000, 0x7fff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)); @@ -2186,19 +2394,6 @@ void igs017_state::tarzan_io(address_map &map) map(0x2010, 0x2011).w(FUNC(igs017_state::tarzan_incdec_remap_addr_w)); } -u8 igs017_state::tarzan_keys_joy_r() -{ - if (BIT(m_input_select, 3, 5) == 0x1f) return m_io_joy->read(); // f8 (joystick mode) - - u8 ret = 0xff; - if (!BIT(m_input_select, 3)) ret &= m_io_key[0]->read(); // f0 (keyboard mode) - if (!BIT(m_input_select, 4)) ret &= m_io_key[1]->read(); // e8 "" - if (!BIT(m_input_select, 5)) ret &= m_io_key[2]->read(); // d8 "" - if (!BIT(m_input_select, 6)) ret &= m_io_key[3]->read(); // b8 "" - if (!BIT(m_input_select, 7)) ret &= m_io_key[4]->read(); // 78 "" (unused) - return ret; -} - void igs017_state::tarzan_counter_w(u8 data) { m_hopper->motor_w( BIT(data, 1)); // hopper @@ -2438,7 +2633,7 @@ u8 igs017_state::mgcs_keys_joy_r() void igs017_state::mgcs_map(address_map &map) { map(0x000000, 0x07ffff).rom(); - map(0x300000, 0x303fff).ram(); + map(0x300000, 0x303fff).ram().share("nvram"); map(0x49c000, 0x49c001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read map(0x49c002, 0x49c003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); @@ -2459,6 +2654,42 @@ void igs017_state::mgcs_mux_map(address_map &map) igs_string_mux_map(map); // 0x05 r, 0x20 - 0x27 w, 0x40 r } +void igs017_state::mgcsa_map(address_map &map) +{ + map(0x000000, 0x07ffff).rom(); + map(0x100000, 0x103fff).ram().share("nvram"); + + map(0x49c000, 0x49c001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read + map(0x49c002, 0x49c003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); + + map(0x900000, 0x90ffff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)).umask16(0x00ff); + + map(0x912001, 0x912001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); + // oki banking through protection (code at $1a350) +} + +void igs017_state::mgcsb_map(address_map &map) +{ + map(0x000000, 0x07ffff).rom(); + map(0x300000, 0x303fff).ram().share("nvram"); + + map(0x49c000, 0x49c001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read + map(0x49c002, 0x49c003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); + + map(0xa00000, 0xa0ffff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)).umask16(0x00ff); + + map(0xa10001, 0xa10001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); +} + +void igs017_state::mgcsb_mux_map(address_map &map) // TODO +{ + //map(0x00, 0x00).lr8(NAME([this](){ return m_input_select | 0x02; })).w(FUNC(igs017_state::mgcs_keys_hopper_igs029_w)); + //map(0x01, 0x01).r(FUNC(igs017_state::mgcs_scramble_data_r)).w(FUNC(igs017_state::mgcs_scramble_data_w)); + //map(0x02, 0x02).r(FUNC(igs017_state::mgcs_igs029_data_r)); + //map(0x03, 0x03).w(FUNC(igs017_state::mgcs_igs029_data_w)); + + //igs_string_mux_map(map); // 0x05 r, 0x20 - 0x27 w, 0x40 r +} // sdmg2 @@ -2472,7 +2703,7 @@ void igs017_state::sdmg2_map(address_map &map) map(0x002007, 0x002007).w(m_igs_incdec, FUNC(igs_incdec_device::inc_w)); map(0x00200b, 0x00200b).r(m_igs_incdec, FUNC(igs_incdec_device::result_r)); - map(0x1f0000, 0x1fffff).ram(); + map(0x1f0000, 0x1fffff).ram().share("nvram"); map(0x200000, 0x20ffff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)).umask16(0x00ff); @@ -2482,17 +2713,16 @@ void igs017_state::sdmg2_map(address_map &map) map(0x300002, 0x300003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); } -u8 igs017_state::sdmg2_keys_joy_r() +template <typename T, unsigned B, unsigned R> +T igs017_state::keys_ipt_r() { - if (BIT(m_input_select, 0, 5) == 0x1f) return m_io_joy->read(); // 1f/uninitialized in test screen (joystick mode) - - u8 ret = 0xff; - if (!BIT(m_input_select, 0)) ret &= m_io_key[0]->read(); // 1e (keyboard mode) - if (!BIT(m_input_select, 1)) ret &= m_io_key[1]->read(); // 1d "" - if (!BIT(m_input_select, 2)) ret &= m_io_key[2]->read(); // 1b "" - if (!BIT(m_input_select, 3)) ret &= m_io_key[3]->read(); // 17 "" - if (!BIT(m_input_select, 4)) ret &= m_io_key[4]->read(); // 0f "" - return ret; + ioport_value result = 0xff; + for (unsigned i = 0; std::size(m_io_key) > i; ++i) + { + if (!BIT(m_input_select, B + i)) + result &= m_io_key[i].read_safe(0xff); + } + return T((result >> (8 - R)) | (result << R)); } void igs017_state::sdmg2_keys_hopper_w(u8 data) @@ -2507,7 +2737,7 @@ void igs017_state::sdmg2_mux_map(address_map &map) { map(0x00, 0x00).portr("COINS"); map(0x01, 0x01).w(FUNC(igs017_state::sdmg2_keys_hopper_w)); - map(0x02, 0x02).r(FUNC(igs017_state::sdmg2_keys_joy_r)).w(NAME((&igs017_state::oki_sound_bank_w<7, 0x7f>))); + map(0x02, 0x02).portr("MATRIX").w(NAME((&igs017_state::oki_sound_bank_w<7, 0x7f>))); } // mgdh, mgdha @@ -2515,7 +2745,7 @@ void igs017_state::sdmg2_mux_map(address_map &map) void igs017_state::mgdh_map(address_map &map) { map(0x000000, 0x07ffff).rom(); - map(0x600000, 0x603fff).ram(); + map(0x600000, 0x603fff).ram().share("nvram"); map(0x876000, 0x876001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read map(0x876002, 0x876003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); @@ -2525,17 +2755,6 @@ void igs017_state::mgdh_map(address_map &map) map(0xa10001, 0xa10001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); } -u8 igs017_state::mgdh_keys_r() -{ - u8 ret = 0xff; - if (!BIT(m_input_select, 2)) ret &= m_io_key[0]->read(); // f8 (keyboard mode / joystick mode) - if (!BIT(m_input_select, 3)) ret &= m_io_key[1]->read(); // f4 (keyboard mode) - if (!BIT(m_input_select, 4)) ret &= m_io_key[2]->read(); // ec "" - if (!BIT(m_input_select, 5)) ret &= m_io_key[3]->read(); // dc "" - if (!BIT(m_input_select, 6)) ret &= m_io_key[4]->read(); // bc "" - return ret; -} - void igs017_state::mgdh_keys_hopper_w(u8 data) { m_input_select = data; @@ -2556,7 +2775,7 @@ void igs017_state::mgdh_counter_w(u8 data) void igs017_state::mgdha_mux_map(address_map &map) { - map(0x00, 0x00).r(FUNC(igs017_state::mgdh_keys_r)).w(FUNC(igs017_state::mgdh_counter_w)); + map(0x00, 0x00).portr("MATRIX").w(FUNC(igs017_state::mgdh_counter_w)); map(0x01, 0x01).portr("BUTTONS").w(FUNC(igs017_state::mgdh_keys_hopper_w)); map(0x02, 0x02).lr8(NAME([this](){ return bitswap<8>(m_io_dsw[1]->read(), 0,1,2,3,4,5,6,7); })); map(0x03, 0x03).portr("COINS").w(NAME((&igs017_state::oki_sound_bank_w<6, 0x3f>))); // bit 7? always on @@ -2569,6 +2788,32 @@ void igs017_state::mgdh_mux_map(address_map &map) // igs_string_mux_map(map); // 0x05 r, 0x20 - 0x27 w, 0x40 r (actually unused except for the game id check?) } +// sdmg2p + +void igs017_state::sdmg2p_map(address_map &map) +{ + map(0x000000, 0x07ffff).rom(); + + map(0x100000, 0x103fff).ram().share("nvram"); + + map(0x38d000, 0x38d001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read + map(0x38d002, 0x38d003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); + + map(0xb00000, 0xb0ffff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)).umask16(0x00ff); + + map(0xb10001, 0xb10001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); +} + +void igs017_state::sdmg2p_mux_map(address_map &map) // TODO: hopper motor w +{ + map.unmap_value_high(); + map(0x00, 0x00).r(NAME((&igs017_state::keys_ipt_r<u8, 2, 2>))); + map(0x01, 0x01).portr("JOY"); + map(0x02, 0x02).portr("BUTTONS").w(FUNC(igs017_state::mgdh_keys_hopper_w)); + map(0x03, 0x03).portr("COINS").w(FUNC(igs017_state::mgdh_counter_w)); + + igs_string_mux_map(map); +} // tjsb @@ -2644,7 +2889,7 @@ void igs017_state::lhzb2_map(address_map &map) map(0x100000, 0x103fff).ram().share("igs022:sharedprotram"); // Shared with protection device - map(0x500000, 0x503fff).ram(); + map(0x500000, 0x503fff).ram().share("nvram"); map(0x910000, 0x910001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read map(0x910002, 0x910003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); @@ -2777,7 +3022,7 @@ void igs017_state::lhzb2a_map(address_map &map) map(0x003207, 0x003207).w(m_igs_incdec, FUNC(igs_incdec_device::inc_w)); map(0x00320b, 0x00320b).r(m_igs_incdec, FUNC(igs_incdec_device::result_r)); - map(0x500000, 0x503fff).ram(); + map(0x500000, 0x503fff).ram().share("nvram"); // map(0x910000, 0x910003) accesses appear to be from leftover code where the final checks were disabled map(0xb00000, 0xb0ffff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)).umask16(0x00ff); @@ -2803,7 +3048,7 @@ void igs017_state::lhzb2a_mux_map(address_map &map) void igs017_state::slqz2_map(address_map &map) { map(0x000000, 0x07ffff).rom(); - map(0x100000, 0x103fff).ram(); + map(0x100000, 0x103fff).ram().share("nvram"); map(0x300000, 0x303fff).ram().share("igs022:sharedprotram"); // Shared with protection device @@ -2845,6 +3090,31 @@ void igs017_state::slqz2_mux_map(address_map &map) } +// jking302us + +void igs017_state::jking302us_map(address_map &map) +{ + map(0x000000, 0x07ffff).rom(); + map(0x100000, 0x103fff).ram().share("nvram"); // TODO: verify once it works + + map(0x638000, 0x638001).nopr().w(m_igs_mux, FUNC(igs_mux_device::address_w)).umask16(0x00ff); // clr.w dummy read + map(0x638002, 0x638003).rw(m_igs_mux, FUNC(igs_mux_device::data_r), FUNC(igs_mux_device::data_w)).umask16(0x00ff); + + map(0xb00000, 0xb0ffff).rw(m_igs017_igs031, FUNC(igs017_igs031_device::read), FUNC(igs017_igs031_device::write)).umask16(0x00ff); + + // map(0x912001, 0x912001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // TODO + + // map(0xfff000, 0xf00003).rw(); // TODO +} + +void igs017_state::jking302us_mux_map(address_map &map) +{ + // TODO + + igs_string_mux_map(map); // 0x05 r, 0x20 - 0x27 w, 0x40 r +} + + /*************************************************************************** Input Ports ***************************************************************************/ @@ -3105,654 +3375,494 @@ static INPUT_PORTS_START( genius6 ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // (2P B in test mode) INPUT_PORTS_END -static INPUT_PORTS_START( lhzb2 ) +#define CREDIT_SETTINGS_COMMON \ + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") /* 投幣比率 */ \ + PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) \ + PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) \ + PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) \ + PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) \ + PORT_DIPNAME( 0x0c, 0x0c, "Key-In Rate" ) PORT_DIPLOCATION("SW1:3,4") /* 開分比率 */ \ + PORT_DIPSETTING( 0x0c, "10" ) \ + PORT_DIPSETTING( 0x08, "20" ) \ + PORT_DIPSETTING( 0x04, "50" ) \ + PORT_DIPSETTING( 0x00, "100" ) \ + PORT_DIPNAME( 0x20, 0x20, "Credit Mode" ) PORT_DIPLOCATION("SW1:6") /* 進分方式 */ \ + PORT_DIPSETTING( 0x20, "Coin Acceptor" ) /* 投幣 */ \ + PORT_DIPSETTING( 0x00, "Key-In" ) /* 開分 */ \ + PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW1:7") /* 退分方式 */ \ + PORT_DIPSETTING( 0x40, "Return Coins" ) /* 退幣 */ \ + PORT_DIPSETTING( 0x00, "Key-Out" ) /* 洗分 */ + +static INPUT_PORTS_START( lhzb2_common ) + PORT_INCLUDE(igs_mahjong_matrix) + PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" ) PORT_DIPLOCATION("SW1:5") + CREDIT_SETTINGS_COMMON + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 进分上限 PORT_DIPSETTING( 0x10, "1000" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x20, 0x20, "Money Type" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x20, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x40, 0x40, "Pay Out Type" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x40, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") // 示范音乐 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆机 PORT_DIPSETTING( 0x03, "500" ) PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x01, "1500" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 PORT_DIPSETTING( 0x0c, "1 (1)" ) PORT_DIPSETTING( 0x08, "1 (2)" ) PORT_DIPSETTING( 0x04, "1 (3)" ) PORT_DIPSETTING( 0x00, "1 (4)" ) - PORT_DIPNAME( 0x10, 0x10, "Bonus Round" ) PORT_DIPLOCATION("SW2:5") - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Number Type" ) PORT_DIPLOCATION("SW2:6") - PORT_DIPSETTING( 0x20, "Number" ) - PORT_DIPSETTING( 0x00, "Dice" ) - PORT_DIPNAME( 0x40, 0x40, "Symbols" ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // pigs, apples - PORT_DIPNAME( 0x80, 0x80, "Hide Gambling" ) PORT_DIPLOCATION("SW2:8") // press "Hide Gambling" to hide credits and bets - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - - PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // test mode (keep pressed during boot too) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // press with the above for sound test - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) // coin error otherwise - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍游戏 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Double Up Game Name" ) PORT_DIPLOCATION("SW2:6") // 比倍续玩 (changes names for double up game and Double Up/Big/Small buttons) + PORT_DIPSETTING( 0x20, "Continue Play" ) // 续玩 (续玩/左/右) + PORT_DIPSETTING( 0x00, "Double Up" ) // 比倍 (比倍/大/小) + PORT_DIPNAME( 0x40, 0x40, "Number Type" ) PORT_DIPLOCATION("SW2:7") // 数字型态 + PORT_DIPSETTING( 0x40, "Numbers" ) // 数字 + PORT_DIPSETTING( 0x00, "Blocks" ) // 方块 (pigs for credit, apples for bet, mahjong tong tiles for numbers) + PORT_DIPNAME( 0x80, 0x80, "Show Credits" ) PORT_DIPLOCATION("SW2:8") // 数字有无 (hides credits/bets/wins, game plays normally) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 +INPUT_PORTS_END - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) +static INPUT_PORTS_START( lhzb2 ) + PORT_INCLUDE( lhzb2_common ) - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("COINS") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // 测试 (hold on start for input test) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 査帐 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投币 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投币 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退币 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退币 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) +INPUT_PORTS_END - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) +static INPUT_PORTS_START( lhzb2a ) + PORT_INCLUDE( lhzb2_common ) - PORT_START("KEY4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("COINS") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // 测试 (hold on start for input test) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 査帐 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投币 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投币 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退币 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退币 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END -static INPUT_PORTS_START( lhzb2a ) - PORT_INCLUDE( lhzb2 ) +static INPUT_PORTS_START( lhzb ) + PORT_INCLUDE(lhzb2) - PORT_MODIFY("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // press with the above for sound test - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 + PORT_DIPSETTING( 0x0c, "1" ) + PORT_DIPSETTING( 0x08, "2" ) + PORT_DIPSETTING( 0x04, "3" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) INPUT_PORTS_END static INPUT_PORTS_START( mgcs ) // DSWs are read through a protection device (IGS029). See code at $1cf16 PORT_START("DSW1") // $3009e2 - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" ) PORT_DIPLOCATION("SW1:5") + CREDIT_SETTINGS_COMMON + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限 PORT_DIPSETTING( 0x10, "500" ) PORT_DIPSETTING( 0x00, "1000" ) - PORT_DIPNAME( 0x20, 0x20, "Money Type" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x20, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x40, 0x40, "Pay Out Type" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x40, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x80, 0x80, "Double Up Limit" ) PORT_DIPLOCATION("SW1:8") + PORT_DIPNAME( 0x80, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW1:8") // 比倍爆機 PORT_DIPSETTING( 0x80, "1000" ) PORT_DIPSETTING( 0x00, "2000" ) PORT_START("DSW2") // $3009e3 - PORT_DIPNAME( 0x03, 0x03, "Minimum Bet" ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPNAME( 0x03, 0x03, "Minimum Bet" ) PORT_DIPLOCATION("SW2:1,2") // 最小押注 PORT_DIPSETTING( 0x03, "1" ) PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x01, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x04, 0x04, "Double Up" ) PORT_DIPLOCATION("SW2:3") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Continue To Play" ) PORT_DIPLOCATION("SW2:4") - PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW2:5") - PORT_DIPSETTING( 0x10, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x20, 0x20, "Number Type" ) PORT_DIPLOCATION("SW2:6") - PORT_DIPSETTING( 0x20, "Number" ) - PORT_DIPSETTING( 0x00, "Tile" ) - PORT_DIPNAME( 0x40, 0x40, "Hide Gambling" ) PORT_DIPLOCATION("SW2:7") // press "Hide Gambling" to hide credits and bets - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, "Double Up Game" ) PORT_DIPLOCATION("SW2:3") // 續玩遊戲 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x08, 0x08, "Double Up Game Name" ) PORT_DIPLOCATION("SW2:4") // 比倍續玩 (changes names for double up game and Double Up/Big/Small buttons) + PORT_DIPSETTING( 0x08, "Double Up" ) // 比倍 (比倍/大/小) + PORT_DIPSETTING( 0x00, "Continue Play" ) // 續玩 (续玩/左/右) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW2:5") // 操作方式 + PORT_DIPSETTING( 0x10, "Mahjong" ) // 按鍵 + PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) // 搖桿 + PORT_DIPNAME( 0x20, 0x20, "Number Type" ) PORT_DIPLOCATION("SW2:6") // 數字形態 + PORT_DIPSETTING( 0x20, "Numbers" ) // 數字 + PORT_DIPSETTING( 0x00, "Blocks" ) // 方塊 (apples for bet, mahjong tong tiles for numbers) + PORT_DIPNAME( 0x40, 0x40, "Hide Credits" ) PORT_DIPLOCATION("SW2:7") // 隐分功能 (hides credits/bets/wins, game plays normally) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // 有 PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) - // Joystick mode: the top 2 bits of COINS (i8255 port A) and JOY (i8255 port B) are read and combined with the bottom 4 bits read from port C (see code at $1c83a) + // Joystick mode: the top 2 bits of COINS (port A) and JOY (port B) are read and combined with the bottom 4 bits read from port C (see code at $1c83a) PORT_START("JOY") - // Joystick mode: - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) // take tile or throw (as N in mahjong keyboard) - // i8255 port C input is 4 bits - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) + PORT_BIT( 0xcf, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x10) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 下 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 左 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 右 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 摸捨 + // Port C input is 4 bits + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 開始 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 上 PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // test mode (keep pressed during boot too) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // press with the above for sound test - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除) - // Keyboard mode: - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x10,EQUALS,0x10) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x10,EQUALS,0x10) - // Joystick mode: - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x10,EQUALS,0x00) // bet - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x10,EQUALS,0x00) // function - - PORT_START("KEY0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // 測試 (hold on start for input test) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投幣 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退幣 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) + PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x10) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 押注 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2", 0x10, EQUALS, 0x00) // 功能 + + IGS_MAHJONG_MATRIX_CONDITIONAL("DSW2", 0x10, 0x10) INPUT_PORTS_END -static INPUT_PORTS_START( sdmg2 ) +static INPUT_PORTS_START( sdmg2_common ) PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" ) PORT_DIPLOCATION("SW1:5") + CREDIT_SETTINGS_COMMON + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限 PORT_DIPSETTING( 0x10, "2000" ) - PORT_DIPSETTING( 0x00, "29999" ) - PORT_DIPNAME( 0x20, 0x20, "Money Type" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x20, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x40, 0x40, "Pay Out Type" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x40, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, "Unlimited" ) // 無限制 (seems to be limited to 19,999 trying to exceed this gives "RECORD ERROR 10") + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Minimum Bet" ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆機 PORT_DIPSETTING( 0x03, "500" ) PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x01, "1500" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 PORT_DIPSETTING( 0x0c, "1" ) PORT_DIPSETTING( 0x08, "2" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x40, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x80, 0x80, "Number Type" ) PORT_DIPLOCATION("SW2:8") - PORT_DIPSETTING( 0x80, "Number" ) - PORT_DIPSETTING( 0x00, "Tile" ) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 續玩遊戲 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Double Up Game Name" ) PORT_DIPLOCATION("SW2:6") // 比倍續玩 (changes names for double up game and Double Up/Big/Small buttons) + PORT_DIPSETTING( 0x20, "Continue Play" ) // 續玩 (续玩/左/右) + PORT_DIPSETTING( 0x00, "Double Up" ) // 比倍 (比倍/大/小) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW2:7") // 操作方式 + PORT_DIPSETTING( 0x40, "Mahjong" ) // 按鍵 + PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) // 搖桿 + PORT_DIPNAME( 0x80, 0x80, "Number Type" ) PORT_DIPLOCATION("SW2:8") // 數字形態 + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 + PORT_DIPSETTING( 0x00, "Blocks" ) // 方塊 (apples for bet, mahjong tong tiles for numbers) + + IGS_MAHJONG_MATRIX_CONDITIONAL("DSW2", 0x40, 0x40) +INPUT_PORTS_END - PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除), does not work in game? - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - // Keyboard mode: - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_CONDITION("DSW2",0x40,EQUALS,0x40) // shown in test mode ('O' appears, or it might be a 0) - // Joystick mode: - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x40,EQUALS,0x00) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) +static INPUT_PORTS_START( sdmg2 ) + PORT_INCLUDE(sdmg2_common) - PORT_START("JOY") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // related to joystick BUTTON3 - - PORT_START("KEY0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("COINS") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // 測試 (hold on start for input test) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投幣 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退幣 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退幣 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) // shown in test mode ('O' appears, or it might be a 0) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 功能 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("MATRIX") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) PORT_CUSTOM_MEMBER(FUNC(igs017_state::keys_ipt_r<>)) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 開始 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 上 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 下 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 左 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 右 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 摸捨 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 押注 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // related to joystick BUTTON3 +INPUT_PORTS_END - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) +static INPUT_PORTS_START( sdmg2p ) + PORT_INCLUDE(sdmg2_common) - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("DSW1") + PORT_DIPNAME( 0x80, 0x80, "Hide Credits" ) PORT_DIPLOCATION("SW1:8") // 隐分功能 (hides credits/bets/wins, game plays normally) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // 有 + + PORT_MODIFY("DSW2") + PORT_DIPNAME( 0x01, 0x01, "Game Title" ) PORT_DIPLOCATION("SW2:1") // 機種名稱 + PORT_DIPSETTING( 0x01, "Maque Wangchao" ) // 麻雀王朝 (Máquè wángcháo) + PORT_DIPSETTING( 0x00, "Chaoji Da Manguan 2 - Jiaqiang Ban" ) // 超二加強 (abbreviated to Chāo èr jiāqiáng) + PORT_DIPNAME( 0x02, 0x02, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:2") // 比倍爆機 + PORT_DIPSETTING( 0x02, "500" ) + PORT_DIPSETTING( 0x00, "1000" ) + + PORT_START("DSW3") + PORT_DIPUNKNOWN_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW3:1" ) + PORT_DIPUNKNOWN_DIPLOC( 0x02, IP_ACTIVE_LOW, "SW3:2" ) + PORT_DIPUNKNOWN_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3" ) + PORT_DIPUNKNOWN_DIPLOC( 0x08, IP_ACTIVE_LOW, "SW3:4" ) + PORT_DIPUNKNOWN_DIPLOC( 0x10, IP_ACTIVE_LOW, "SW3:5" ) + PORT_DIPUNKNOWN_DIPLOC( 0x20, IP_ACTIVE_LOW, "SW3:6" ) + PORT_DIPUNKNOWN_DIPLOC( 0x40, IP_ACTIVE_LOW, "SW3:7" ) + PORT_DIPUNKNOWN_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW3:8" ) + + PORT_START("COINS") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 功能 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退幣 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退幣 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投幣 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳 + PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // 測試 (hold on start for input test) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("KEY4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) + PORT_START("JOY") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 開始 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 上 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 下 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 左 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 右 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 摸捨 + + PORT_START("BUTTONS") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x40) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) // 押注 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x40, EQUALS, 0x00) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 INPUT_PORTS_END static INPUT_PORTS_START( mgdh ) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x06, 0x06, "Credits Per Note" ) PORT_DIPLOCATION("SW1:2,3") + PORT_DIPUNKNOWN_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW1:1" ) + PORT_DIPNAME( 0x06, 0x06, "Key-In Rate" ) PORT_DIPLOCATION("SW1:2,3") // 開分比率 PORT_DIPSETTING( 0x06, "5" ) PORT_DIPSETTING( 0x04, "10" ) PORT_DIPSETTING( 0x02, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x08, 0x08, "Max Note Credits" ) PORT_DIPLOCATION("SW1:4") + PORT_DIPNAME( 0x08, 0x08, "Credit Limit" ) PORT_DIPLOCATION("SW1:4") // 進分上限 PORT_DIPSETTING( 0x08, "100" ) PORT_DIPSETTING( 0x00, "500" ) - PORT_DIPNAME( 0x10, 0x10, "Money Type" ) PORT_DIPLOCATION("SW1:5") - PORT_DIPSETTING( 0x10, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x20, 0x20, "Pay Out Type" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x20, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0xc0, 0xc0, "Minimum Bet" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPNAME( 0x10, 0x10, "Credit Mode" ) PORT_DIPLOCATION("SW1:5") // 進分方式 + PORT_DIPSETTING( 0x10, "Coin Acceptor" ) // 投幣 + PORT_DIPSETTING( 0x00, "Key-In" ) // 開分 + PORT_DIPNAME( 0x20, 0x20, "Payout Mode" ) PORT_DIPLOCATION("SW1:6") // 退分方式 + PORT_DIPSETTING( 0x20, "Return Coins" ) // 退幣 + PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分 + PORT_DIPNAME( 0xc0, 0xc0, "Minimum Bet" ) PORT_DIPLOCATION("SW1:7,8") // 最小押注 PORT_DIPSETTING( 0xc0, "1" ) PORT_DIPSETTING( 0x80, "2" ) PORT_DIPSETTING( 0x40, "3" ) PORT_DIPSETTING( 0x00, "5" ) PORT_START("DSW2") // bitswapped - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW2:2") - PORT_DIPSETTING( 0x02, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x04, 0x04, "Continue To Play" ) PORT_DIPLOCATION("SW2:3") - PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:4,5") + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x01, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW2:2") // 操作方式 + PORT_DIPSETTING( 0x02, "Mahjong" ) // 按鍵 + PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) // 搖桿 + PORT_DIPNAME( 0x04, 0x04, "Double Up Game" ) PORT_DIPLOCATION("SW2:3") // 續玩遊戲 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2: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( 0xe0, 0xe0, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6,7,8") - 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, "Coin Out Rate" ) PORT_DIPLOCATION("SW2:6,7,8") // 退幣比率 + 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_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // test mode (keep pressed during boot too) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // press with the above for sound test - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) // coin error otherwise - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除), does not work in game? - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY0") - // Keyboard mode: - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x02) - // Joystick mode: - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2",0x02,EQUALS,0x00) - - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // 測試 (hold on start for input test) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_CONDITION("DSW1", 0x10, EQUALS, 0x10) // 投幣 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x10, EQUALS, 0x00) // 投幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 退幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 退幣 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_START("KEY4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_START("MATRIX") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) PORT_CUSTOM_MEMBER(NAME((&igs017_state::keys_ipt_r<ioport_value, 2>))) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 開始 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 上 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 下 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 左 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 右 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 摸捨 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) PORT_START("BUTTONS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 功能 PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x02) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2", 0x02, EQUALS, 0x00) // 押注 + + IGS_MAHJONG_MATRIX_CONDITIONAL("DSW2", 0x02, 0x02) INPUT_PORTS_END static INPUT_PORTS_START( slqz2 ) PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" ) PORT_DIPLOCATION("SW1:5") + CREDIT_SETTINGS_COMMON + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 进分上限 PORT_DIPSETTING( 0x10, "1000" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x20, 0x20, "Money Type" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x20, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x40, 0x40, "Pay Out Type" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x40, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") // 示范音乐 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Double Up Limit" ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆机 PORT_DIPSETTING( 0x03, "500" ) PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x01, "1500" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") - PORT_DIPSETTING( 0x0c, "1" ) - PORT_DIPSETTING( 0x08, "2" ) - PORT_DIPSETTING( 0x04, "3" ) - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x10, 0x10, "Bonus Round" ) PORT_DIPLOCATION("SW2:5") - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Number Type" ) PORT_DIPLOCATION("SW2:6") - PORT_DIPSETTING( 0x20, "Number" ) - PORT_DIPSETTING( 0x00, "Dice" ) - PORT_DIPNAME( 0x40, 0x40, "Symbols" ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // pigs, apples - PORT_DIPNAME( 0x80, 0x80, "Hide Gambling" ) PORT_DIPLOCATION("SW2:8") // press "Hide Gambling" to hide credits and bets - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 + PORT_DIPSETTING( 0x0c, "1 (1)" ) + PORT_DIPSETTING( 0x08, "1 (2)" ) + PORT_DIPSETTING( 0x04, "1 (3)" ) + PORT_DIPSETTING( 0x00, "1 (4)" ) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍游戏 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Double Up Game Name" ) PORT_DIPLOCATION("SW2:6") // 比倍续玩 + PORT_DIPSETTING( 0x20, "Continue Play" ) // 续玩 + PORT_DIPSETTING( 0x00, "Double Up" ) // 比倍 + PORT_DIPNAME( 0x40, 0x40, "Number Type" ) PORT_DIPLOCATION("SW2:7") // 数字型态 + PORT_DIPSETTING( 0x40, "Numbers" ) // 数字 + PORT_DIPSETTING( 0x00, "Blocks" ) // 方块 (pigs for credit, apples for bet, mahjong tong tiles for numbers) + PORT_DIPNAME( 0x80, 0x80, "Show Credits" ) PORT_DIPLOCATION("SW2:8") // 数字有无 (hides credits/bets/wins, game plays normally) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // test mode (keep pressed during boot too) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // press with the above for sound test - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) // coin error otherwise - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // needs to be 0 for "clear" input below to work - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // 测试 (hold on start for input test) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 査帐 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投币 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投币 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退币 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退币 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // 押注 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) // 功能 PORT_START("PLAYER1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Don Den") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Help / Big") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) // 开始 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) // 上 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) // 下 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // 左 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) // 右 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // 摸/舍 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("PLAYER2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END static INPUT_PORTS_START( tjsb ) PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" ) PORT_DIPLOCATION("SW1:5") + CREDIT_SETTINGS_COMMON + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限 PORT_DIPSETTING( 0x10, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x20, 0x20, "Money Type" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x20, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x40, 0x40, "Pay Out Type" ) PORT_DIPLOCATION("SW1:7") // 2/4 - PORT_DIPSETTING( 0x40, "Coins" ) - PORT_DIPSETTING( 0x00, "Notes" ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Minimum Bet" ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆機 PORT_DIPSETTING( 0x03, "1000" ) PORT_DIPSETTING( 0x02, "2000" ) PORT_DIPSETTING( 0x01, "3000" ) PORT_DIPSETTING( 0x00, "4000" ) - PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 PORT_DIPSETTING( 0x0c, "1" ) PORT_DIPSETTING( 0x08, "3" ) PORT_DIPSETTING( 0x04, "5" ) PORT_DIPSETTING( 0x00, "10" ) - PORT_DIPNAME( 0x10, 0x10, "Bonus Round" ) PORT_DIPLOCATION("SW2:5") // show bonus round in demo mode -> protection check - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Number Type" ) PORT_DIPLOCATION("SW2:6") - PORT_DIPSETTING( 0x20, "Number" ) - PORT_DIPSETTING( 0x00, "Dice" ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍遊戲 + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Number Type" ) PORT_DIPLOCATION("SW2:6") // 數字型態 (always uses pigs for credit and coins for bet) + PORT_DIPSETTING( 0x20, "Numbers" ) // 數字 + PORT_DIPSETTING( 0x00, "Blocks" ) // 方塊 (dots for numbers) + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW2:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:8") PORT_START("DSW3") // the protection check is skipped if (DSW3 ^ 0xff) & 0x9a == 0x0a - PORT_DIPNAME( 0xff, 0xf5, "Bonus Round Protection Check" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8") + PORT_DIPNAME( 0xff, 0xf5, "Double Up Game Protection Check" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7,8") PORT_DIPSETTING( 0xf5, DEF_STR( Off ) ) PORT_DIPSETTING( 0xff, DEF_STR( On ) ) PORT_START("PLAYER1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Don Den") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // choose - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // bet - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) // 開始 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) // 上 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) // 下 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // 左 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) // 右 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // 摸/舍 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // 押注 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("PLAYER2") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3765,24 +3875,26 @@ static INPUT_PORTS_START( tjsb ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // keep pressed while booting - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 查帳 + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // 測試 (hold on start for input test) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) // 投幣 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) // 投幣 PORT_START("BUTTONS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除), does not work in game? - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) // 功能 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden - seems to be no setting to hide in DIP switches or bookkeeping menu) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) // 退幣 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) // 退幣 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END static INPUT_PORTS_START( spkrform ) @@ -3874,7 +3986,7 @@ static INPUT_PORTS_START( spkrform ) PORT_START("BUTTONS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) // coin 1 (impulse prevents coin error in gambling mode) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(5) // coin 2 "" - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // hopper switch PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // payout PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Return To Gambling (From Formosa). Then Bet, Hold 1..5") // To switch back to poker from Formosa, start the sequence pressing this key (memory $f4a3 holds the sequence number) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // book @@ -3884,34 +3996,34 @@ INPUT_PORTS_END static INPUT_PORTS_START( tarzan ) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x0e, 0x0e, "Coin Value" ) PORT_DIPLOCATION("SW1:2,3,4") - PORT_DIPSETTING( 0x0e, "1" ) - PORT_DIPSETTING( 0x0c, "2" ) - PORT_DIPSETTING( 0x0a, "4" ) - PORT_DIPSETTING( 0x08, "5" ) - PORT_DIPSETTING( 0x06, "10" ) - PORT_DIPSETTING( 0x04, "20" ) - PORT_DIPSETTING( 0x02, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x30, 0x30, "Key Value" ) PORT_DIPLOCATION("SW1:5,6") + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:1") // 示范音乐 + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x0e, 0x0e, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW1:2,3,4") // 投币比率 + PORT_DIPSETTING( 0x0e, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x0c, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x0a, DEF_STR(1C_4C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_5C) ) + PORT_DIPSETTING( 0x06, "1 Coin/10 Credits" ) + PORT_DIPSETTING( 0x04, "1 Coin/20 Credits" ) + PORT_DIPSETTING( 0x02, "1 Coin/50 Credits" ) + PORT_DIPSETTING( 0x00, "1 Coin/100 Credits" ) + PORT_DIPNAME( 0x30, 0x30, "Key-In Rate" ) PORT_DIPLOCATION("SW1:5,6") // 开分比率 PORT_DIPSETTING( 0x30, "100" ) PORT_DIPSETTING( 0x20, "200" ) PORT_DIPSETTING( 0x10, "500" ) PORT_DIPSETTING( 0x00, "1000" ) - PORT_DIPNAME( 0xc0, 0xc0, "Point Value" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Key-out Rate" ) PORT_DIPLOCATION("SW1:7,8") // 洗分比率 PORT_DIPSETTING( 0xc0, "1" ) PORT_DIPSETTING( 0x80, "10" ) PORT_DIPSETTING( 0x40, "100" ) PORT_DIPSETTING( 0x00, "100 (2)" ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x01, "Coin Type" ) PORT_DIPLOCATION("SW2:1") - PORT_DIPSETTING( 0x01, "Coin" ) - PORT_DIPSETTING( 0x00, "Key" ) - PORT_DIPNAME( 0x0e, 0x0e, "Minimum Bet" ) PORT_DIPLOCATION("SW2:2,3,4") + PORT_DIPNAME( 0x01, 0x01, "Credit Mode" ) PORT_DIPLOCATION("SW2:1") // 进分方式 (sets coin input function) + PORT_DIPSETTING( 0x01, "Coin Acceptor" ) // 投币 (uses coin rate) + PORT_DIPSETTING( 0x00, "Key-In" ) // 开分 (uses key-in rate) + PORT_DIPNAME( 0x0e, 0x0e, "Minimum Bet" ) PORT_DIPLOCATION("SW2:2,3,4") // 最小押注 PORT_DIPSETTING( 0x0e, "5" ) PORT_DIPSETTING( 0x0c, "25" ) PORT_DIPSETTING( 0x0a, "50" ) @@ -3920,113 +4032,67 @@ static INPUT_PORTS_START( tarzan ) PORT_DIPSETTING( 0x04, "125" ) PORT_DIPSETTING( 0x02, "125 (2)" ) PORT_DIPSETTING( 0x00, "125 (3)" ) - PORT_DIPNAME( 0x30, 0x30, "Bonus Bet" ) PORT_DIPLOCATION("SW2:5,6") + PORT_DIPNAME( 0x30, 0x30, "Bonus Bet" ) PORT_DIPLOCATION("SW2:5,6") // 赠奖押注 PORT_DIPSETTING( 0x30, "75" ) PORT_DIPSETTING( 0x20, "125" ) PORT_DIPSETTING( 0x10, "200" ) PORT_DIPSETTING( 0x00, "250" ) - PORT_DIPNAME( 0xc0, 0xc0, "Continue To Play" ) PORT_DIPLOCATION("SW2:7,8") - PORT_DIPSETTING( 0xc0, "50k" ) - PORT_DIPSETTING( 0x80, "100k" ) - PORT_DIPSETTING( 0x40, "150k" ) - PORT_DIPSETTING( 0x00, "200k" ) + PORT_DIPNAME( 0xc0, 0xc0, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:7,8") // 续玩爆机 + PORT_DIPSETTING( 0xc0, "50,000" ) + PORT_DIPSETTING( 0x80, "100,000" ) + PORT_DIPSETTING( 0x40, "150,000" ) + PORT_DIPSETTING( 0x00, "200,000" ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW3:1") - PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x00, "Back Color" ) PORT_DIPLOCATION("SW3:2") - PORT_DIPSETTING( 0x02, "Black" ) - PORT_DIPSETTING( 0x00, "Color" ) - PORT_DIPNAME( 0x04, 0x04, "Hide Gambling" ) PORT_DIPLOCATION("SW3:3") // Press "Hide Gambling" to hide credits and bets - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Number Type" ) PORT_DIPLOCATION("SW3:4") - PORT_DIPSETTING( 0x08, "Number" ) - PORT_DIPSETTING( 0x00, "Mahjong Tile" ) - PORT_DIPNAME( 0x10, 0x10, "Continue To Play" ) PORT_DIPLOCATION("SW3:5") - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Payout" ) PORT_DIPLOCATION("SW3:6") - PORT_DIPSETTING( 0x20, "Hopper" ) - PORT_DIPSETTING( 0x00, "Points" ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW3:1") // 操作界面 + PORT_DIPSETTING( 0x01, "Mahjong" ) // 麻雀键盘 + PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) // 摇杆 + PORT_DIPNAME( 0x02, 0x02, "Background Color" ) PORT_DIPLOCATION("SW3:2") // 底色模式 + PORT_DIPSETTING( 0x02, "Black and White" ) // 黑白 + PORT_DIPSETTING( 0x00, "Color" ) // 彩色 + PORT_DIPNAME( 0x04, 0x04, "Hide Credits" ) PORT_DIPLOCATION("SW3:3") // 隐分功能 (hides credits/bets/wins, game plays normally) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, "Number Type" ) PORT_DIPLOCATION("SW3:4") // 数字型态 + PORT_DIPSETTING( 0x08, "Numbers" ) // 数字 + PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (mahjong tong tiles) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW3:5") // 续玩有无 + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) // 无 + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Payout Mode" ) PORT_DIPLOCATION("SW3:6") // 退分方式 + PORT_DIPSETTING( 0x20, "Return Coins" ) // 退币 (uses hopper to pay out credits) + PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分 (just clears credits) PORT_DIPUNUSED_DIPLOC(0x40, 0x40, "SW3:7") PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "SW3:8") PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch - PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // Service - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Book - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) // Coin/Key in (coin error in coin mode) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // Coin/Key out - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Hide Gambling") // shown in test mode as "clear" (清除) - // Keyboard mode: - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3",0x01,EQUALS,0x01) - // Joystick mode: - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) PORT_NAME("%p Button 2 / Bet / Same Double Up" ) // Button B (test mode) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW3",0x01,EQUALS,0x00) PORT_NAME("%p Button 3 / Small / Half Double Up") // Button C (test mode) - - PORT_START("JOY") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Take") // Exit (test mode) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) // Up (test mode) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) // Down (test mode) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) // Left (test mode) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) // Right (test mode) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("%p Button 1 / Help / Big / Double Up") // Button A (test mode) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY0") - // Keyboard mode: - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_NAME("%p Mahjong A / Help / Double Up") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_NAME("%p Mahjong M / Small") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START ) PORT_NAME("%p Mahjong Start / Take") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) // B (test mode) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_J ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // Bet - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_NAME("%p Mahjong C / Half Double Up") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_G ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_NAME("%p Mahjong K / Big") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_L ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY4") // never read and not shown in test mode - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // 哈巴 + PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW ) // 测试 (hold on start for input test) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 査帐 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(5) PORT_CONDITION("DSW2", 0x01, EQUALS, 0x01) // 投币 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW2", 0x01, EQUALS, 0x00) // 投币 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW3", 0x20, EQUALS, 0x20) // 洗分 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x20, EQUALS, 0x00) // 洗分 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Show Credits") // 清除 (hold to show credits/bets/wins when hidden) + PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x01) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Button B / Bet / Double Up") // B + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Button C / Small / Double Up (half)") // C + + PORT_START("MATRIX") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x01) PORT_CUSTOM_MEMBER(NAME((&igs017_state::keys_ipt_r<ioport_value, 3>))) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Start / Stop All / Take Score") // 开始 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Up / Stop 1") // 上 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Down / Stop 2") // 下 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Left / Stop 3") // 左 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SLOT_STOP4 ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Right / Stop 4") // 右 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) PORT_NAME("Button A / Big / Double Up (double) / Show Odds") // A + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x01, EQUALS, 0x00) + + IGS_MAHJONG_MATRIX_CONDITIONAL("DSW3", 0x01, 0x01) + + PORT_MODIFY("KEY4") // never read and not shown in test mode + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( starzan ) @@ -4079,7 +4145,7 @@ static INPUT_PORTS_START( starzan ) PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "SW3:8") PORT_START("PLAYER1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // hopper switch PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test @@ -4109,6 +4175,36 @@ static INPUT_PORTS_START( starzan ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test INPUT_PORTS_END +static INPUT_PORTS_START( tarzan202fa ) + PORT_INCLUDE(starzan) + + PORT_MODIFY("DSW1") + PORT_DIPUNUSED_DIPLOC(0x40, 0x40, "SW1:7") // not used from here on according to test mode, PCB does have 3 8-dip banks + PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "SW1:8") + + PORT_MODIFY("DSW2") + PORT_DIPUNUSED_DIPLOC(0x01, 0x01, "SW2:1") +INPUT_PORTS_END + +static INPUT_PORTS_START( tarzan103m ) + PORT_INCLUDE(tarzan202fa) + + PORT_MODIFY("DSW1") + PORT_DIPUNUSED_DIPLOC(0x10, 0x10, "SW1:5") // not used from here on according to test mode, PCB does have 3 8-dip banks + PORT_DIPUNUSED_DIPLOC(0x20, 0x20, "SW1:6") + + PORT_MODIFY("PLAYER1") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Button A / Big / Double Up (double) / Show Odds") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Button C / Small / Double Up (half)") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_NAME("Left / Stop 3") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Button B / Bet / Double Up") + + PORT_MODIFY("PLAYER2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME("Down / Stop 2") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SLOT_STOP4 ) PORT_NAME("Right / Stop 4") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME("Up / Stop 1") +INPUT_PORTS_END + // Test mode is in Italian (probably machine translated given how literal it is) static INPUT_PORTS_START( happyskl ) PORT_START("DSW1") @@ -4177,7 +4273,7 @@ static INPUT_PORTS_START( happyskl ) PORT_DIPUNUSED_DIPLOC(0x80, 0x80, "SW3:8") PORT_START("PLAYER1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", hopper_device, line_r) // hopper switch + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) // hopper switch PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // no effects in key test @@ -4284,7 +4380,6 @@ void igs017_state::base_machine_oki(machine_config &config, const XTAL &xtal_oki m_screen->set_palette("igs017_igs031:palette"); IGS017_IGS031(config, m_igs017_igs031, 0); - m_igs017_igs031->set_i8255_tag("ppi8255"); // sound SPEAKER(config, "mono").front_center(); @@ -4314,12 +4409,14 @@ void igs017_state::iqblocka(machine_config &config) m_maincpu->set_addrmap(AS_IO, &igs017_state::iqblocka_io); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::iqblocka_interrupt), "screen", 0, 1); + // NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::iqblocka_mux_map); - m_ppi->in_pa_callback().set_ioport("DSW1"); - m_ppi->in_pb_callback().set_ioport("DSW2"); - m_ppi->in_pc_callback().set_ioport("DSW3"); + m_igs017_igs031->in_pa_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pc_callback().set_ioport("DSW3"); // protection IGS_BITSWAP(config, m_igs_bitswap, 0); @@ -4371,13 +4468,15 @@ void igs017_state::tarzan(machine_config &config) m_maincpu->set_addrmap(AS_OPCODES, &igs017_state::decrypted_opcodes_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::iqblocka_interrupt), "screen", 0, 1); - // i/o + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + // I/O m_igs_mux->set_addrmap(0, &igs017_state::tarzan_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set(FUNC(igs017_state::tarzan_keys_joy_r)); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set_ioport("MATRIX"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4404,14 +4503,16 @@ void igs017_state::starzan(machine_config &config) m_maincpu->set_addrmap(AS_OPCODES, &igs017_state::decrypted_opcodes_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::iqblocka_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::starzan_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set_ioport("PLAYER1"); - m_ppi->in_pc_callback().set(FUNC(igs017_state::dsw_r)); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set_ioport("PLAYER1"); + m_igs017_igs031->in_pc_callback().set(FUNC(igs017_state::dsw_r)); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4433,19 +4534,21 @@ void igs017_state::happyskl(machine_config &config) base_machine_oki(config, 16_MHz_XTAL / 16); HD64180RP(config, m_maincpu, 16_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::iqblocka_map); + m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::happyskl_map); m_maincpu->set_addrmap(AS_IO, &igs017_state::happyskl_io); m_maincpu->set_addrmap(AS_OPCODES, &igs017_state::decrypted_opcodes_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::iqblocka_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::happyskl_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set_ioport("PLAYER1"); - m_ppi->in_pc_callback().set(FUNC(igs017_state::dsw_r)); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set_ioport("PLAYER1"); + m_igs017_igs031->in_pc_callback().set(FUNC(igs017_state::dsw_r)); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // video m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::tarzan_palette_bitswap)); @@ -4463,14 +4566,16 @@ void igs017_state::cpoker2(machine_config &config) m_maincpu->set_addrmap(AS_IO, &igs017_state::cpoker2_io); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::iqblocka_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::cpoker2_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set_ioport("PLAYER1"); - m_ppi->in_pc_callback().set(FUNC(igs017_state::dsw_r)); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set_ioport("PLAYER1"); + m_igs017_igs031->in_pc_callback().set(FUNC(igs017_state::dsw_r)); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_INCDEC(config, m_igs_incdec, 0); @@ -4496,11 +4601,11 @@ void igs017_state::tjsb(machine_config &config) // i/o m_igs_mux->set_addrmap(0, &igs017_state::tjsb_mux_map); - m_ppi->in_pa_callback().set_ioport("DSW1"); - m_ppi->in_pb_callback().set_ioport("DSW2"); - m_ppi->in_pc_callback().set_ioport("DSW3"); + m_igs017_igs031->in_pa_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pc_callback().set_ioport("DSW3"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4524,14 +4629,16 @@ void igs017_state::spkrform(machine_config &config) m_maincpu->set_addrmap(AS_IO, &igs017_state::spkrform_io); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::iqblocka_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::spkrform_mux_map); - m_ppi->in_pa_callback().set_ioport("DSW1"); - m_ppi->in_pb_callback().set_ioport("DSW2"); - m_ppi->in_pc_callback().set_ioport("DSW3"); + m_igs017_igs031->in_pa_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pc_callback().set_ioport("DSW3"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4564,14 +4671,16 @@ void igs017_state::mgcs(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::mgcs_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgcs_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::mgcs_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set(FUNC(igs017_state::mgcs_keys_joy_r)); - m_ppi->in_pc_callback().set_ioport("JOY"); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set(FUNC(igs017_state::mgcs_keys_joy_r)); + m_igs017_igs031->in_pc_callback().set_ioport("JOY"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4580,6 +4689,22 @@ void igs017_state::mgcs(machine_config &config) m_igs017_igs031->set_palette_scramble_cb(FUNC(igs017_state::mgcs_palette_bitswap)); } +void igs017_state::mgcsa(machine_config &config) +{ + mgcs(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::mgcsa_map); +} + +void igs017_state::mgcsb(machine_config &config) +{ + mgcs(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::mgcsb_map); + + m_igs_mux->set_addrmap(0, &igs017_state::mgcsb_mux_map); +} + // lhzb2 @@ -4591,14 +4716,16 @@ void igs017_state::lhzb2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::lhzb2_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgcs_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::lhzb2_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set_ioport("DSW1"); - m_ppi->in_pc_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pc_callback().set_ioport("DSW2"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4626,6 +4753,8 @@ void igs017_state::lhzb2a(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::lhzb2a_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgcs_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + MCFG_MACHINE_RESET_OVERRIDE(igs017_state, lhzb2a) // i/o @@ -4633,7 +4762,7 @@ void igs017_state::lhzb2a(machine_config &config) // ppi8255 not used for i/o (just video enable)? - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4663,14 +4792,16 @@ void igs017_state::slqz2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::slqz2_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgcs_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::slqz2_mux_map); - m_ppi->in_pa_callback().set_ioport("COINS"); - m_ppi->in_pb_callback().set_ioport("DSW1"); - m_ppi->in_pc_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pa_callback().set_ioport("COINS"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pc_callback().set_ioport("DSW2"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_STRING(config, m_igs_string, 0); @@ -4692,14 +4823,16 @@ void igs017_state::sdmg2(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::sdmg2_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgcs_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::sdmg2_mux_map); - m_ppi->in_pa_callback().set_ioport("DSW1"); - m_ppi->in_pb_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pa_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW2"); // DSW3 is read but unused (it's not populated on the PCB) - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); // protection IGS_INCDEC(config, m_igs_incdec, 0); @@ -4727,12 +4860,14 @@ void igs017_state::mgdha(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::mgdh_map); TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgdh_interrupt), "screen", 0, 1); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // i/o m_igs_mux->set_addrmap(0, &igs017_state::mgdha_mux_map); - m_ppi->in_pa_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pa_callback().set_ioport("DSW1"); - HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + HOPPER(config, m_hopper, attotime::from_msec(50)); } void igs017_state::mgdh(machine_config &config) @@ -4745,6 +4880,46 @@ void igs017_state::mgdh(machine_config &config) // IGS_STRING(config, m_igs_string, 0); } +void igs017_state::sdmg2p(machine_config &config) +{ + base_machine_oki(config, 22_MHz_XTAL / 22); + + M68000(config, m_maincpu, 22_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::sdmg2p_map); + TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgcs_interrupt), "screen", 0, 1); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + // i/o + m_igs_mux->set_addrmap(0, &igs017_state::sdmg2p_mux_map); + + m_igs017_igs031->in_pa_callback().set_ioport("DSW1"); + m_igs017_igs031->in_pb_callback().set_ioport("DSW2"); + m_igs017_igs031->in_pc_callback().set_ioport("DSW3"); // there are 3 DIP banks on PCB but only two are shown in test mode + + HOPPER(config, m_hopper, attotime::from_msec(50)); + + IGS_STRING(config, m_igs_string, 0); +} + +void igs017_state::jking302us(machine_config &config) +{ + base_machine_oki(config, 22_MHz_XTAL / 22); + + M68000(config, m_maincpu, 22_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &igs017_state::jking302us_map); + TIMER(config, "scantimer").configure_scanline(FUNC(igs017_state::mgdh_interrupt), "screen", 0, 1); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + // i/o + m_igs_mux->set_addrmap(0, &igs017_state::jking302us_mux_map); + + HOPPER(config, m_hopper, attotime::from_msec(50)); + + IGS_STRING(config, m_igs_string, 0); +} + /*************************************************************************** ROMs Loading @@ -5004,8 +5179,8 @@ ROM_END /*************************************************************************** -Man Guan Caishen (V103CS) -满贯财神 (Mǎn Guàn Cáishén) +Manguan Caishen (V103CS) +满贯财神 (Mǎnguàn Cáishén) IGS, 1998 PCB Layout @@ -5063,10 +5238,82 @@ ROM_START( mgcs ) ROM_LOAD( "mgcs_string.key", 0x00, 0xec, CRC(6cdadd19) SHA1(c2b4ced5d45d0af1ddeeabd0e352fd5383995d32) ) ROM_END +/********************************************************************************* + +Man Guan Cai Shen, IGS 1998 + +PCB Layout +---------- + +IGS PCB NO- 0208 +|-----------------------------------------| +| JAMMA VOL TDA1020 | +|1 F521(x25) 7805 | +|8 S1502.U12 M6295 | +|W 22MHz M1503.U22| +|A LM2933 | +|Y | +| | +|IGS029 | +| 8MHz IGS031 | +| M1501.U21| +| | +| 27C4096.U24| +| 61256 | +|1 IGS025 68000 6264 | +|0 PAL | +|W PAL | +|A SW1 PAL | +|Y SW2 SW3 T518B | +|-----------------------------------------| +Notes: + 68000 - Clock 11.000MHz [22/2] + M6295 - Clock 1.000MHz [22/22] + SW1/2 - 8-Position DIP Switch + SW3 - Reset / NVRAM Clear + 6264 - 8kBx8-bit SRAM + 61256 - 32kBx8-bit SRAM + +*********************************************************************************/ + +ROM_START( mgcsa ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "27c4096.u24", 0x00000, 0x80000, CRC(c41b7530) SHA1(1f9f821658c50b84b2e8cce97ffea8349fdae54f) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "m1501.u21", 0x000000, 0x400000, CRC(96fce058) SHA1(6b87f47d646bad9b3061bdc8a9af65467fdbbc9f) ) // FIXED BITS (xxxxxxx0xxxxxxxx) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "m1503.u22", 0x00000, 0x80000, CRC(a37f9613) SHA1(812f060ca98a34540c48a180c359c3d0f1c0b5bb) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "s1502.u12", 0x00000, 0x80000, CRC(a8a6ba58) SHA1(59276a8ab4a31812600816c2a43b74bd71394419) ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "mgcs_string.key", 0x00, 0xec, BAD_DUMP CRC(6cdadd19) SHA1(c2b4ced5d45d0af1ddeeabd0e352fd5383995d32) ) // TODO: seems the same as the parent, but double-check +ROM_END + +// IGS PCB N0-0266. No IGS029, but a IGS026 +ROM_START( mgcsb ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "rom.u23", 0x00000, 0x80000, CRC(efc2b198) SHA1(bb004d1a7d6a623540423e1a45f93a24d9f22c88) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "m1501.u21", 0x000000, 0x400000, CRC(96fce058) SHA1(6b87f47d646bad9b3061bdc8a9af65467fdbbc9f) ) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "m1503-text v100c.u12", 0x00000, 0x80000, CRC(9925423e) SHA1(c0df6f9a0886810d1f137093f5bff1b326c4a522) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "s1502.u16", 0x00000, 0x80000, CRC(a8a6ba58) SHA1(59276a8ab4a31812600816c2a43b74bd71394419) ) + + ROM_REGION( 0xec, "igs_string", ROMREGION_ERASE00 ) +ROM_END + /*************************************************************************** -Chaoji Da Man Guan II (China, V754C) -超級大滿貫(Chāojí dà mǎn guàn) +Chaoji Da Manguan II (China, V754C) +超級大滿貫 (Chāojí Dàmǎnguàn) IGS, 1997 PCB Layout @@ -5107,9 +5354,24 @@ Notes: ***************************************************************************/ -ROM_START( sdmg2 ) +ROM_START( sdmg2754ca ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "p0900.u25", 0x00000, 0x80000, CRC(43366f51) SHA1(48dd965dceff7de15b43c2140226a8b17a792dbc) ) + + ROM_REGION( 0x280000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "m0901.u5", 0x000000, 0x200000, CRC(9699db24) SHA1(50fc2f173c20b48d10595f01f1e9545f1b13a61b) ) // FIXED BITS (xxxxxxxx0xxxxxxx) + ROM_LOAD( "m0902.u4", 0x200000, 0x080000, CRC(3298b13b) SHA1(13b21ddeed368b7f4fea1408c8fc511244342faf) ) // FIXED BITS (xxxxxxxx0xxxxxxx) + + ROM_REGION( 0x20000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "text.u6", 0x000000, 0x020000, CRC(cb34cbc0) SHA1(ceedbdda085fd1acc9a575502bdf7cf998f54f05) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "s0903.u15", 0x00000, 0x80000, CRC(ae5a441c) SHA1(923774ef73ab0f70e0db1738a4292dcbd70d2384) ) +ROM_END + +ROM_START( sdmg2754cb ) // supposedly earlier / easier, but reports same version as sdmg2754ca ROM_REGION( 0x80000, "maincpu", 0 ) - ROM_LOAD16_WORD_SWAP( "p0900.u25", 0x00000, 0x80000,CRC(43366f51) SHA1(48dd965dceff7de15b43c2140226a8b17a792dbc) ) + ROM_LOAD16_WORD_SWAP( "p0900.u25", 0x00000, 0x80000, CRC(1afc95d8) SHA1(924e198437359beec2abe6ee42a985f63d70b7e3) ) // SLDH ROM_REGION( 0x280000, "igs017_igs031:sprites", 0 ) ROM_LOAD( "m0901.u5", 0x000000, 0x200000, CRC(9699db24) SHA1(50fc2f173c20b48d10595f01f1e9545f1b13a61b) ) // FIXED BITS (xxxxxxxx0xxxxxxx) @@ -5122,6 +5384,84 @@ ROM_START( sdmg2 ) ROM_LOAD( "s0903.u15", 0x00000, 0x80000, CRC(ae5a441c) SHA1(923774ef73ab0f70e0db1738a4292dcbd70d2384) ) ROM_END +ROM_START( sdmg2 ) // C5220P001 PCB + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "rom.u16", 0x00000, 0x80000, CRC(362800e8) SHA1(00d93002272b1f3171ca84e67822eb31f760191f) ) + + ROM_REGION( 0x280000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "m0205.u6", 0x000000, 0x200000, BAD_DUMP CRC(9699db24) SHA1(50fc2f173c20b48d10595f01f1e9545f1b13a61b) ) // ROM didn't read correctly, taken from other sets + ROM_LOAD( "rom.u5", 0x200000, 0x080000, CRC(3298b13b) SHA1(13b21ddeed368b7f4fea1408c8fc511244342faf) ) // FIXED BITS (xxxxxxxx0xxxxxxx) + + ROM_REGION( 0x20000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "text.u7", 0x000000, 0x020000, CRC(cb34cbc0) SHA1(ceedbdda085fd1acc9a575502bdf7cf998f54f05) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "s0206.u3", 0x00000, 0x80000, CRC(ae5a441c) SHA1(923774ef73ab0f70e0db1738a4292dcbd70d2384) ) +ROM_END + +/*************************************************************************** + +Maque Wangchao / Chaoji Da Manguan 2 - Jiaqiang Ban +麻雀王朝 / 超級大滿貫 2 -加強版 (Mahjong Dynasty / Super Grand Slam 2 - Enhanced Edition) + +IGS 2000 +Hardware info By Guru +--------------------- + +IGS PCB NO-0271 +|--------------------------------------| +|PC817x19 JAMMA | +| |-----| MA.DY_TEXT.U18| +| | IGS | | +| | 025 | | +| |-----| 22MHz | +| |-------| | +| | IGS031| IGS_M0906.U20| +|PC817x6 | | | +| 22V10 | | MA.DY_V100C.U21| +| SW1 |-------| | +| SW2 61256|------| | +| SW3 |68000 | 22V10 BATT| +| | | 6264 | +| 16V8 |------| | +|LM7805 K668 | +| SW4 | +|TDA1020 VOL MA.DY_SP.U14 | +|--------------------------------------| +Notes: + 68000 - Clock 11.0MHz [22/2] + K668 - ==OKI M6295. Clock 1.0MHz [22/22]. Pin 7 HIGH + 61256 - 32kB x8-bit SRAM + 6262 - 8kB x8-bit SRAM (battery-backed) + SW1-3 - 8-position DIP Switch + SW4 - High Score Reset / Back-up Battery RAM Re-initialize / PCB Reset + PC817 - Sharp PC817 Optocoupler + 16V8 - Atmel ATF16V8B PLD + 22V10 - Atmel ATF22V10B PLD + TDA1020 - Audio Power Amp + U18/U21 - 27C4002 EPROM + U14 - 27C040 EPROM + U20 - MX23C3210 mask ROM + +***************************************************************************/ + +ROM_START( sdmg2p ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "ma.dy_v100c.u21", 0x00000, 0x80000,CRC(c071270e) SHA1(8b55a80da30f4233c862bb5d8a79a76af634a296) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "igs_m0906.u20", 0x000000, 0x400000, CRC(01ea0a60) SHA1(66f083084f6d9e8dc4d1d50f3c5bcf2b79025fc0) ) // FIXED BITS (xxxxxxxx0xxxxxxx) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "ma.dy_text.u18", 0x000000, 0x080000, CRC(e46a3a52) SHA1(7b3f113170904dc474712a6a76162a8ee5dbd318) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "ma.dy_sp.u14", 0x00000, 0x80000, CRC(b31c6349) SHA1(9e8e5b029e1eff47581f99ecf2da3f17bee01f32) ) // 1ST AND 2ND HALF IDENTICAL + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "sdmg2p_string.key", 0x00, 0xec, NO_DUMP ) +ROM_END + /*************************************************************************** Long Hu Zhengba 2 (set 1) @@ -5205,6 +5545,54 @@ ROM_START( lhzb2a ) ROM_LOAD( "lhzb2_string.key", 0x00, 0xec, CRC(c964dc35) SHA1(81036e0dfa9abad123701ae8939d0d5b6f91b015) ) ROM_END +/* +PCB NO-0182-2 +IGS025 sticker is D2 +Custom - IGS022, IGS017 +Osc - 8MHz near IGS022, 22MHz near IGS017 +2 banks of 8 DIP switches +Oki M6295 +*/ +ROM_START( lhzb ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "rom.u25", 0x00000, 0x80000, CRC(46f5df48) SHA1(da35b0cfaef34179a8e2a019c472ff14d831c753) ) + + ROM_REGION( 0x10000, "igs022", 0 ) + ROM_LOAD( "rom.u12",0x0000, 0x10000, CRC(794d0276) SHA1(ac903d2faa3fb315438dc8da22c5337611a8790d) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD16_WORD_SWAP( "m1101.u13", 0x000000, 0x400000, CRC(0114e9d1) SHA1(5b16170d3cd8b8e1662c949b7234fbdd2ca927f7) ) // FIXED BITS (0xxxxxxxxxxxxxxx) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD16_WORD_SWAP( "rom.u15", 0x00000, 0x80000, CRC(5d28287b) SHA1(441f7f301f9d5f1d817f907ec4cedf274a6801d4) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "rom.u22", 0x00000, 0x80000, CRC(51ffe245) SHA1(849011b186096add657ab20d49d260ec23363ef3) ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "lhzb2_string.key", 0x00, 0xec, CRC(c964dc35) SHA1(81036e0dfa9abad123701ae8939d0d5b6f91b015) ) +ROM_END + +ROM_START( lhzba ) // PCB NO-0182-2, very minor code differences if compared to lhzb. + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "rom.u25", 0x00000, 0x80000, CRC(2fd43fea) SHA1(6215655ae49c75cece33a359a359b0e7980a2c1c) ) + + ROM_REGION( 0x10000, "igs022", 0 ) + ROM_LOAD( "rom.u12",0x0000, 0x10000, CRC(794d0276) SHA1(ac903d2faa3fb315438dc8da22c5337611a8790d) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD16_WORD_SWAP( "m1101.u13", 0x000000, 0x400000, CRC(0114e9d1) SHA1(5b16170d3cd8b8e1662c949b7234fbdd2ca927f7) ) // FIXED BITS (0xxxxxxxxxxxxxxx) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD16_WORD_SWAP( "rom.u15", 0x00000, 0x80000, CRC(5d28287b) SHA1(441f7f301f9d5f1d817f907ec4cedf274a6801d4) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "rom.u22", 0x00000, 0x80000, CRC(51ffe245) SHA1(849011b186096add657ab20d49d260ec23363ef3) ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "lhzb2_string.key", 0x00, 0xec, CRC(c964dc35) SHA1(81036e0dfa9abad123701ae8939d0d5b6f91b015) ) +ROM_END + /*************************************************************************** Shuang Long Qiang Zhu 2 VS (China, VS203J) @@ -5268,10 +5656,71 @@ ROM_START( slqz2 ) ROM_LOAD( "slqz2_string.key", 0x00, 0xec, CRC(5ca22f9d) SHA1(a795415016fdcb6329623786dc992ac7b0877ddf) ) ROM_END +/********************************************************************************* + +An older version of Shuang Long Qiang Zhu 2 VS + +PCB Layout +---------- + +IGS PCB NO-0182-1 +|-----------------------------------------| +| 6264 SW3| +|1 6264 27C4096.U25 | +|8 IGS025 | +|W (LABEL N2) 6264 | +|A | +|Y 6264 | +| | +| 68000 | +| IGS022 26C512.U12 | +| 32.768kHz | +| M1101.U13 PAL | +| 8MHz PAL | +|1 PAL | +|0 27C4096.U15 PAL | +|W IGS017 | +|A VOL 22MHz 61256 | +|Y 7805 | +|UPC1242 K668 S1102.U22 SW1 SW2 | +|-----------------------------------------| +Notes: + 68000 - Clock 11.000MHz [22/2] + K668 - Oki M6295 clone. Clock 1.000MHz [22/22] + SW1/2 - 8-Position DIP Switch + SW3 - Reset / NVRAM Clear + 61256 - 32kBx8-bit SRAM + 6264 - 8kBx8-bit SRAM + IGS022 - IGS custom. 32.768kHz crystal is tied to this IC so it has a real time clock integrated into it. + +*********************************************************************************/ + + +ROM_START( slqz2a ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "27c4096.u25", 0x00000, 0x80000, NO_DUMP )// dead ROM + + ROM_REGION( 0x10000, "igs022", 0 ) + ROM_LOAD( "26c512.u12",0x0000, 0x10000, CRC(794d0276) SHA1(ac903d2faa3fb315438dc8da22c5337611a8790d) ) // INTERNATIONAL GAMES SYSTEM CO.,LTD + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD16_WORD_SWAP( "m1101.u13", 0x000000, 0x400000, CRC(0114e9d1) SHA1(5b16170d3cd8b8e1662c949b7234fbdd2ca927f7) ) // FIXED BITS (0xxxxxxxxxxxxxxx) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "27c4096.u15", 0x00000, 0x80000, CRC(4d3776b4) SHA1(fa9b311b1a6ad56e136b66d090bc62ed5003b2f2) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "s1102.u20", 0x00000, 0x80000, CRC(51ffe245) SHA1(849011b186096add657ab20d49d260ec23363ef3) ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "slqz2a_string.key", 0x00, 0xec, BAD_DUMP CRC(5ca22f9d) SHA1(a795415016fdcb6329623786dc992ac7b0877ddf) ) // TODO, if / when program ROM is dumped +ROM_END + + /*************************************************************************** -Man Guan Daheng (V123T1) -滿貫大亨 (Mǎn Guàn Dàhēng) +Manguan Daheng (V123T1) +滿貫大亨 (Mǎnguàn Dàhēng) (c) 1997 IGS PCB Layout @@ -5325,8 +5774,8 @@ ROM_END /*************************************************************************** -Man Guan Daheng (V125T1) -滿貫大亨 (Mǎn Guàn Dàhēng) +Manguan Daheng (V125T1) +滿貫大亨 (Mǎnguàn Dàhēng) (c) 1997 IGS No hardware info, no sprites rom for this set. @@ -5351,7 +5800,8 @@ ROM_END /*************************************************************************** -Taishan (Tarzan) Chuang Tian Guan (V109C) +Tarzan Chuang Tian Guan (V109C) +泰山闯天关 (Tàishān Chuǎng Tiān Guān) IGS 1999 PCB Layout @@ -5414,6 +5864,28 @@ ROM_START( tarzanc ) ROM_LOAD( "tarzan_string.key", 0x00, 0xec, CRC(595fe40c) SHA1(0b46983400d237d8bde97a72eaa99b718a03387e) ) ROM_END +// IGS PCB NO-0248 +ROM_START( tarzanb ) // V110 TARZAN C + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD( "t.z._v110.u19", 0x00000, 0x40000, CRC(16026d12) SHA1(df08641b4bc1437648f0a8cd5f7a8a4786c07041) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", ROMREGION_ERASE00 ) + ROM_LOAD( "igs_a2103_cg_v100f.u15", 0x000000, 0x200000, CRC(afe56ed5) SHA1(656cee6a59f2930eec9acd11b84b416cc7354e01) ) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "t.z._text_u5.u5", 0x00000, 0x80000, CRC(1724e039) SHA1(d628499b61f98f7c9034d70b82ee25e002190ece) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "igs_s2102_sp_v102.u14", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) ) + + ROM_REGION( 0x2dd * 2, "plds", ROMREGION_ERASE ) + ROM_LOAD( "eg.u20", 0x000, 0x2dd, NO_DUMP ) + ROM_LOAD( "eg.u21", 0x2dd, 0x2dd, NO_DUMP ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "tarzanb_string.key", 0x00, 0xec, CRC(595fe40c) SHA1(0b46983400d237d8bde97a72eaa99b718a03387e) ) +ROM_END + // sets below are guesswork, assembled from partial dumps... // IGS NO-0248-1? Mislabeled? @@ -5461,6 +5933,7 @@ ROM_START( tarzana ) ROM_LOAD( "tarzan_string.key", 0x00, 0xec, CRC(595fe40c) SHA1(0b46983400d237d8bde97a72eaa99b718a03387e) ) ROM_END + /*************************************************************************** Super Tarzan (Italy, V100I) @@ -5532,6 +6005,100 @@ ROM_START( starzan ) ROM_LOAD( "starzan_string.key", 0x00, 0xec, CRC(b33f5050) SHA1(900d3c48944dbdd95d9e48d74c355e82e00ac012) ) ROM_END +ROM_START( tarzan202fa ) // IGS PCB NO-0230-1 (IGS025 stickered X7) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD( "tarzan_v102f.u9", 0x00000, 0x40000, CRC(b099baaa) SHA1(02f021852bf70dcb3ced66974a609acd45162ddc) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "igs_a2104_cg_v110.u3", 0x000000, 0x400000, CRC(dcbff16f) SHA1(2bf77ef4448c26124c8d8d18bb7ffe4105cfa940) ) // FIXED BITS (xxxxxxx0xxxxxxxx) + // empty u2 socket + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "igs_t2105_cg_v110.u11", 0x00000, 0x80000, CRC(1d4be260) SHA1(6374c61735144b3ff54d5e490f26adac4a10b14d) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "igs_s2102_sp_v102.u8", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) ) + + ROM_REGION( 0x2dd * 2, "plds", ROMREGION_ERASE ) + ROM_LOAD( "palce22v10h_tar97_u10-1.u10", 0x000, 0x2dd, NO_DUMP ) // read protected + ROM_LOAD( "palce22v10h_tar97_u20.u20", 0x2dd, 0x2dd, NO_DUMP ) // "" + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "tarzan202fa_string.key", 0x00, 0xec, CRC(b33f5050) SHA1(900d3c48944dbdd95d9e48d74c355e82e00ac012) ) +ROM_END + +// IGS PCB NO-0230-1 (IGS025 stickered Z8 and Tarzan 2) +// has Jungle King Plus string but shows Jungle King title screen +ROM_START( jking200pr ) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD( "u9", 0x00000, 0x40000, CRC(8c40c920) SHA1(7d2c8b7b9e1eca4bf3f895e79c45e86937dc7cb4) ) // 1ST AND 2ND HALF IDENTICAL, no original label + ROM_IGNORE( 0x40000 ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "igs_a2104_cg_v110.u3", 0x000000, 0x400000, CRC(dcbff16f) SHA1(2bf77ef4448c26124c8d8d18bb7ffe4105cfa940) ) // FIXED BITS (xxxxxxx0xxxxxxxx) + // empty u2 socket + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "igs_t2105_cg_v110.u11", 0x00000, 0x80000, CRC(1d4be260) SHA1(6374c61735144b3ff54d5e490f26adac4a10b14d) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "igs_s2102_sp_v102.u8", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) ) + + ROM_REGION( 0x2dd * 2, "plds", ROMREGION_ERASE ) + ROM_LOAD( "palce22v10h_tar97_u10-1.u10", 0x000, 0x2dd, NO_DUMP ) // read protected + ROM_LOAD( "palce22v10h_tar97_u20.u20", 0x2dd, 0x2dd, NO_DUMP ) // "" + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "jking200pr_string.key", 0x00, 0xec, CRC(b33f5050) SHA1(900d3c48944dbdd95d9e48d74c355e82e00ac012) ) +ROM_END + +// default settings password is all start button +ROM_START( jking103a ) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD( "jungleking_v103a.u9", 0x00000, 0x40000, CRC(acd23f7e) SHA1(84d487c240d6773c81c04ee12a4aafa7e34affc7) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "igs_a2104_cg_v110.u3", 0x00000, 0x400000, CRC(dcbff16f) SHA1(2bf77ef4448c26124c8d8d18bb7ffe4105cfa940) ) // FIXED BITS (xxxxxxx0xxxxxxxx) + // empty u2 + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "igs_t2105_cg_v110.u11", 0x00000, 0x80000, CRC(1d4be260) SHA1(6374c61735144b3ff54d5e490f26adac4a10b14d) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "igs_s2102_sp_v102.u8", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) ) + + ROM_REGION( 0x2dd * 2, "plds", ROMREGION_ERASE ) + ROM_LOAD( "eg.u20", 0x000, 0x2dd, NO_DUMP ) + ROM_LOAD( "eg.u21", 0x2dd, 0x2dd, NO_DUMP ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "jking103a_string.key", 0x00, 0xec, BAD_DUMP CRC(8d288f5e) SHA1(19c184600d80838ef04be8ab29c93d91cf3161c9) ) // TODO: check this +ROM_END + +// IGS PCB NO-0230-1 (IGS025 without original sticker) +ROM_START( tarzan103m ) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD( "tms27c040.u9", 0x00000, 0x40000, CRC(19e3811d) SHA1(ff6b26b7cba84f030649da92eb27892b7c8eb7df) ) // 1ST AND 2ND HALF IDENTICAL, no original label + ROM_IGNORE( 0x40000 ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "igs_a2104_cg_v110.u3", 0x00000, 0x400000, CRC(dcbff16f) SHA1(2bf77ef4448c26124c8d8d18bb7ffe4105cfa940) ) // FIXED BITS (xxxxxxx0xxxxxxxx) + // empty u2 + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "igs_t2105_cg_v110.u11", 0x00000, 0x80000, CRC(1d4be260) SHA1(6374c61735144b3ff54d5e490f26adac4a10b14d) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "igs_s2102_sp_v102.u8", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) ) + + ROM_REGION( 0x2dd * 2, "plds", ROMREGION_ERASE ) + ROM_LOAD( "eg.u20", 0x000, 0x2dd, NO_DUMP ) + ROM_LOAD( "eg.u21", 0x2dd, 0x2dd, NO_DUMP ) + + ROM_REGION( 0xec, "igs_string", 0 ) + ROM_LOAD( "tarzan103m_string.key", 0x00, 0xec, CRC(b33f5050) SHA1(900d3c48944dbdd95d9e48d74c355e82e00ac012) ) +ROM_END + /*************************************************************************** @@ -5567,18 +6134,17 @@ ROM_START( happyskl ) ROM_END -// PCB was heavily corroded and not working +// dump confirmed from two PCBs ROM_START( cpoker2 ) ROM_REGION( 0x40000, "maincpu", 0 ) - ROM_LOAD( "u9.bin", 0x00000, 0x40000, CRC(8d79eb4d) SHA1(9cad09013f83335ec78c3ff78715bc5d9a989eb7) ) + ROM_LOAD( "champion_2_v100a.u9", 0x00000, 0x40000, CRC(8d79eb4d) SHA1(9cad09013f83335ec78c3ff78715bc5d9a989eb7) ) ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) - // the following ROM wasn't readable on this PCB, but it's the same as the one in happyskl. Assuming same contents for now - ROM_LOAD( "igs_a2701_cg_v100.u3", 0x00000, 0x400000, BAD_DUMP CRC(f3756a51) SHA1(8dd4677584f309cec4b068be9f9370a7a172a031) ) // FIXED BITS (xxxxxxx0xxxxxxxx) - 1xxxxxxxxxxxxxxxxxxxxx = 0x00 + ROM_LOAD( "igs_a2701_cg_v100.u3", 0x00000, 0x400000, CRC(f3756a51) SHA1(8dd4677584f309cec4b068be9f9370a7a172a031) ) // U2 (overlay) not populated ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) - ROM_LOAD( "u11.bin", 0x00000, 0x80000, CRC(34475c83) SHA1(376ff68d89c25471483b074dcf7542f42f954e67) ) // 1xxxxxxxxxxxxxxxxxx = 0x00 + ROM_LOAD( "champion_2_text.u11", 0x00000, 0x80000, CRC(34475c83) SHA1(376ff68d89c25471483b074dcf7542f42f954e67) ) // 1xxxxxxxxxxxxxxxxxx = 0x00 ROM_REGION( 0x80000, "oki", 0 ) ROM_LOAD( "igs_s2702_sp_v100.u8", 0x00000, 0x80000, CRC(0ec9b1b5) SHA1(b8c7e068ddf6777a184339e6796be33e442a3df4) ) // same as happyskl @@ -5629,25 +6195,63 @@ ROM_START( spkrform ) ROM_LOAD( "spkrform_string.key", 0x00, 0xec, CRC(17a9021a) SHA1(41943e08f9c9be49fc3705e6f2702d504ec6d078) ) ROM_END +// MADE IN TAIWAN IGS PCB NO-0214-7 (difficult to read due to corrosion, small chance it isn't 100% correct) +// MC68HC000FN10 with 22 MHz XTAL, IGS031, IGS025 (stickered V9 and JK V302US), IGS029 with 8 MHz XTAL, K668, 2x 8_DIP bank, 11.0592 MHz XTAL +ROM_START( jking302us ) + ROM_REGION( 0x80000, "maincpu", 0 ) + ROM_LOAD16_WORD_SWAP( "jungleking.u28", 0x00000, 0x80000, CRC(d926252e) SHA1(03a3e52cba5e5986b74f57a8798a55b53d73bfd3) ) + + ROM_REGION( 0x200000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "jungleking_cg_.u22", 0x000000, 0x200000, CRC(4a92fc0e) SHA1(25bdd0b240a1cc80ac737893c417cfe9561623cd) ) // FIXED BITS (xxxxxxx0xxxxxxxx) + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "jungeking_text.u26", 0x00000, 0x80000, CRC(45d22af4) SHA1(1dca31c5049a07b234b0266590e4869685bb6e76) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "igs_s2102_sp_v102.u14", 0x00000, 0x80000, CRC(90dda82d) SHA1(67fbc1e8d76b85e124136e2f1df09c8b6c5a8f97) ) // same as the earlier sets with Z180 CPU + + ROM_REGION( 0x600, "plds", ROMREGION_ERASE00 ) // actually chip types unknown + ROM_LOAD( "dr_u6.u6", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "dr_u7.u7", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "dr_u18.u18", 0x000, 0x117, NO_DUMP ) + + ROM_REGION( 0xec, "igs_string", ROMREGION_ERASE00 ) + //ROM_LOAD( "jking302us_string.key", 0x00, 0xec, NO_DUMP ) +ROM_END + } // anonymous namespace -GAME ( 1996, iqblocka, iqblock, iqblocka, iqblocka, igs017_state, init_iqblocka, ROT0, "IGS", "Shuzi Leyuan (China, V127M, gambling)", 0 ) // 數字樂園 -GAME ( 1997, iqblockf, iqblock, iqblockf, iqblockf, igs017_state, init_iqblocka, ROT0, "IGS", "IQ Block (V113FR, gambling)", 0 ) -GAME ( 1997, mgdh, 0, mgdh, mgdh, igs017_state, init_mgdh, ROT0, "IGS", "Man Guan Daheng (Taiwan, V125T1)", MACHINE_IMPERFECT_COLORS | MACHINE_UNEMULATED_PROTECTION) // 滿貫大亨, wrong colors in betting screen, game id check (patched out) -GAME ( 1997, mgdha, mgdh, mgdha, mgdh, igs017_state, init_mgdha, ROT0, "IGS", "Man Guan Daheng (Taiwan, V123T1)", 0 ) // 滿貫大亨 -GAME ( 1997, sdmg2, 0, sdmg2, sdmg2, igs017_state, init_sdmg2, ROT0, "IGS", "Chaoji Da Man Guan II (China, V754C)", 0 ) // 超級大滿貫II -GAME ( 1997, tjsb, 0, tjsb, tjsb, igs017_state, init_tjsb, ROT0, "IGS", "Tian Jiang Shen Bing (China, V137C)", MACHINE_UNEMULATED_PROTECTION ) // 天將神兵, fails the bonus round protection check (if enabled via DSW), see e.g. demo mode -GAME ( 1998, genius6, 0, genius6, genius6, igs017_state, init_iqblocka, ROT0, "IGS", "Genius 6 (V110F)", 0 ) // shows chinese text in puzzle game -GAME ( 1997, genius6a, genius6, genius6, genius6, igs017_state, init_iqblocka, ROT0, "IGS", "Genius 6 (V133F)", 0 ) // clone because it has older copyright year -GAME ( 1997, genius6b, genius6, genius6, genius6, igs017_state, init_iqblocka, ROT0, "IGS", "Genius 6 (V132F)", 0 ) // " -GAME ( 1998, mgcs, 0, mgcs, mgcs, igs017_state, init_mgcs, ROT0, "IGS", "Man Guan Caishen (China, V103CS)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // 满贯财神, finish IGS029 protection -GAME ( 1998, lhzb2, 0, lhzb2, lhzb2, igs017_state, init_lhzb2, ROT0, "IGS", "Long Hu Zhengba 2 (China, set 1)", MACHINE_UNEMULATED_PROTECTION ) // 龙虎争霸2, finish IGS022 protection -GAME ( 1998, lhzb2a, lhzb2, lhzb2a, lhzb2a, igs017_state, init_lhzb2a, ROT0, "IGS", "Long Hu Zhengba 2 (China, VS221M)", 0 ) // 龙虎争霸2 -GAME ( 1998, slqz2, 0, slqz2, slqz2, igs017_state, init_slqz2, ROT0, "IGS", "Shuang Long Qiang Zhu 2 VS (China, VS203J)", MACHINE_UNEMULATED_PROTECTION ) // 双龙抢珠, finish IGS022 protection -GAME ( 1999, tarzanc, 0, tarzan, tarzan, igs017_state, init_tarzanc, ROT0, "IGS", "Tarzan Chuang Tian Guan (China, V109C, set 1)", 0 ) -GAME ( 1999, tarzan, tarzanc, tarzan, tarzan, igs017_state, init_tarzan, ROT0, "IGS", "Tarzan Chuang Tian Guan (China, V109C, set 2)", MACHINE_NOT_WORKING ) // missing sprites and sound rom, imperfect tiles decryption -GAME ( 1999, tarzana, tarzanc, tarzan, tarzan, igs017_state, init_tarzana, ROT0, "IGS", "Tarzan (V107)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // missing IGS029 protection, missing sprites and sound rom -GAMEL( 2000?, starzan, 0, starzan, starzan, igs017_state, init_starzan, ROT0, "IGS (G.F. Gioca license)", "Super Tarzan (Italy, V100I)", 0, layout_igsslot ) -GAMEL( 2000?, happyskl, 0, happyskl, happyskl, igs017_state, init_happyskl, ROT0, "IGS", "Happy Skill (Italy, V611IT)", 0, layout_igspoker ) -GAMEL( 2000?, cpoker2, 0, cpoker2, cpoker2, igs017_state, init_cpoker2, ROT0, "IGS", "Champion Poker 2 (V100A)", 0, layout_igspoker ) -GAME ( 2000?, spkrform, spk306us, spkrform, spkrform, igs017_state, init_spkrform, ROT0, "IGS", "Super Poker (V100xD03) / Formosa", MACHINE_UNEMULATED_PROTECTION ) // poker game enabling forced with a patch. Parent spk306us in driver spoker.cpp +GAME ( 1996, iqblocka, iqblock, iqblocka, iqblocka, igs017_state, init_iqblocka, ROT0, "IGS", "Shuzi Leyuan (China, V127M, gambling)", 0 ) // 數字樂園 +GAME ( 1997, iqblockf, iqblock, iqblockf, iqblockf, igs017_state, init_iqblocka, ROT0, "IGS", "IQ Block (V113FR, gambling)", 0 ) +GAME ( 1997, mgdh, 0, mgdh, mgdh, igs017_state, init_mgdh, ROT0, "IGS", "Manguan Daheng (Taiwan, V125T1)", MACHINE_IMPERFECT_COLORS | MACHINE_UNEMULATED_PROTECTION) // 滿貫大亨, wrong colors in betting screen, game id check (patched out) +GAME ( 1997, mgdha, mgdh, mgdha, mgdh, igs017_state, init_mgdha, ROT0, "IGS", "Manguan Daheng (Taiwan, V123T1)", 0 ) // 滿貫大亨 +GAME ( 1997, sdmg2, 0, sdmg2, sdmg2, igs017_state, init_sdmg2, ROT0, "IGS", "Chaoji Da Manguan II (China, V765C)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // 超級大滿貫II +GAME ( 1997, sdmg2754ca, sdmg2, sdmg2, sdmg2, igs017_state, init_sdmg2754ca, ROT0, "IGS", "Chaoji Da Manguan II (China, V754C, set 1)", 0 ) // 超級大滿貫II +GAME ( 1997, sdmg2754cb, sdmg2, sdmg2, sdmg2, igs017_state, init_sdmg2754cb, ROT0, "IGS", "Chaoji Da Manguan II (China, V754C, set 2)", 0 ) // 超級大滿貫II +GAME ( 1997, tjsb, 0, tjsb, tjsb, igs017_state, init_tjsb, ROT0, "IGS", "Tian Jiang Shen Bing (China, V137C)", MACHINE_UNEMULATED_PROTECTION ) // 天將神兵, fails the bonus round protection check (if enabled via DSW), see e.g. demo mode +GAME ( 1998, genius6, 0, genius6, genius6, igs017_state, init_iqblocka, ROT0, "IGS", "Genius 6 (V110F)", 0 ) // shows Chinese text in puzzle game +GAME ( 1997, genius6a, genius6, genius6, genius6, igs017_state, init_iqblocka, ROT0, "IGS", "Genius 6 (V133F)", 0 ) // clone because it has older copyright year +GAME ( 1997, genius6b, genius6, genius6, genius6, igs017_state, init_iqblocka, ROT0, "IGS", "Genius 6 (V132F)", 0 ) // " +GAME ( 1998, mgcs, 0, mgcs, mgcs, igs017_state, init_mgcs, ROT0, "IGS", "Manguan Caishen (China, V103CS)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // 满贯财神, finish IGS029 protection +GAME ( 1998, mgcsa, mgcs, mgcsa, mgcs, igs017_state, init_mgcsa, ROT0, "IGS", "Manguan Caishen (China, V106CS)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // 满贯财神, finish IGS029 protection +GAME ( 1998, mgcsb, mgcs, mgcsb, mgcs, igs017_state, init_mgcsb, ROT0, "IGS", "Manguan Caishen (China, V110C)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) +GAME ( 1998, lhzb, 0, lhzb2, lhzb, igs017_state, init_lhzb2, ROT0, "IGS", "Long Hu Zhengba (China, VS105M, set 1)", MACHINE_UNEMULATED_PROTECTION ) // 龙虎争霸, finish IGS022 protection +GAME ( 1998, lhzba, lhzb, lhzb2, lhzb, igs017_state, init_lhzb2, ROT0, "IGS", "Long Hu Zhengba (China, VS105M, set 2)", MACHINE_UNEMULATED_PROTECTION ) // 龙虎争霸, finish IGS022 protection +GAME ( 1998, lhzb2, 0, lhzb2, lhzb2, igs017_state, init_lhzb2, ROT0, "IGS", "Long Hu Zhengba 2 (China, set 1)", MACHINE_UNEMULATED_PROTECTION ) // 龙虎争霸2, finish IGS022 protection +GAME ( 1998, lhzb2a, lhzb2, lhzb2a, lhzb2a, igs017_state, init_lhzb2a, ROT0, "IGS", "Long Hu Zhengba 2 (China, VS221M)", 0 ) // 龙虎争霸2 +GAME ( 1998, slqz2, 0, slqz2, slqz2, igs017_state, init_slqz2, ROT0, "IGS", "Shuang Long Qiang Zhu 2 VS (China, VS203J)", MACHINE_UNEMULATED_PROTECTION ) // 双龙抢珠, finish IGS022 protection +GAME ( 1998, slqz2a, slqz2, slqz2, slqz2, igs017_state, init_slqz2, ROT0, "IGS", "Shuang Long Qiang Zhu 2 VS (China, set 2)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // 双龙抢珠, misses program ROM dump, finish IGS022 protection +GAME ( 1999, tarzanc, 0, tarzan, tarzan, igs017_state, init_tarzanc, ROT0, "IGS", "Tarzan Chuang Tian Guan (China, V109C, set 1)", 0 ) // 泰山闯天关 +GAME ( 1999, tarzan, tarzanc, tarzan, tarzan, igs017_state, init_tarzan, ROT0, "IGS", "Tarzan Chuang Tian Guan (China, V109C, set 2)", MACHINE_NOT_WORKING ) // missing sprites and sound rom, imperfect tiles decryption +GAME ( 1999, tarzana, tarzanc, tarzan, tarzan, igs017_state, init_tarzana, ROT0, "IGS", "Tarzan (V107)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // missing IGS029 protection, missing sprites and sound rom +GAME ( 1999, tarzanb, tarzanc, tarzan, tarzan, igs017_state, init_tarzanc, ROT0, "IGS", "Tarzan Chuang Tian Guan (China, V110)", 0 ) +GAME ( 2000, sdmg2p, 0, sdmg2p, sdmg2p, igs017_state, init_sdmg2p, ROT0, "IGS", "Maque Wangchao / Chaoji Da Manguan 2 - Jiaqiang Ban (China, V100C)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // 麻雀王朝 / 超級大滿貫 2 -加強版 protection kicks in after starting game, hopper isn't hooked up correctly +GAMEL( 2000?, starzan, 0, starzan, starzan, igs017_state, init_starzan, ROT0, "IGS (G.F. Gioca license)", "Super Tarzan (Italy, V100I)", 0, layout_igsslot ) +GAMEL( 2000?, jking103a, starzan, starzan, starzan, igs017_state, init_jking103a, ROT0, "IGS", "Jungle King (V103A)", 0, layout_igsslot ) +GAMEL( 1999, jking200pr, starzan, starzan, tarzan202fa, igs017_state, init_jking200pr, ROT0, "IGS", "Jungle King (V200PR)", 0, layout_igsslot ) +GAME ( 1999?, tarzan103m, tarzanc, starzan, tarzan103m, igs017_state, init_starzan, ROT0, "IGS", "Tarzan (V103M)", 0 ) +GAMEL( 1999?, tarzan202fa, tarzanc, starzan, tarzan202fa, igs017_state, init_jking103a, ROT0, "IGS", "Tarzan (V202FA)", 0, layout_igsslot ) +GAMEL( 2000?, happyskl, 0, happyskl, happyskl, igs017_state, init_happyskl, ROT0, "IGS", "Happy Skill (Italy, V611IT)", 0, layout_igspoker ) +GAMEL( 2000?, cpoker2, 0, cpoker2, cpoker2, igs017_state, init_cpoker2, ROT0, "IGS", "Champion Poker 2 (V100A)", 0, layout_igspoker ) +GAME ( 2000?, spkrform, spk306us, spkrform, spkrform, igs017_state, init_spkrform, ROT0, "IGS", "Super Poker (V100xD03) / Formosa", MACHINE_UNEMULATED_PROTECTION ) // poker game enabling forced with a patch. Parent spk306us in driver spoker.cpp +GAME ( 2000?, jking302us, 0, jking302us, starzan, igs017_state, init_jking302us, ROT0, "IGS", "Jungle King (V302US)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // missing IGS025 and IGS029 protection |