@@ -9,6 +9,9 @@ These games use the IGS027A processor.
99Triple Fever (V105US) (tripfevb) hangs after paying out tickets, with the MCU
1010apparently attempting serial communication with something.
1111
12+ TODO:
13+ * Does crzybugsj actually support a hopper? It shows in the input test, but
14+ both the Payout and Ticket buttons seem to use the ticket dispenser.
1215*/
1316
1417#include " emu.h"
@@ -31,9 +34,6 @@ apparently attempting serial communication with something.
3134#include " crzybugs.lh"
3235#include " tripfev.lh"
3336
34- #define LOG_DEBUG (1U << 1 )
35- // #define VERBOSE (LOG_DEBUG)
36- #include " logmacro.h"
3737
3838namespace {
3939
@@ -49,14 +49,16 @@ class igs_m027xa_state : public driver_device
4949 m_oki (*this , " oki" ),
5050 m_screen (*this , " screen" ),
5151 m_ticket (*this , " ticket" ),
52+ m_hopper (*this , " hopper" ),
5253 m_external_rom (*this , " user1" ),
5354 m_io_test (*this , " TEST%u" , 0U ),
5455 m_io_dsw (*this , " DSW%u" , 1U ),
5556 m_out_lamps (*this , " lamp%u" , 1U )
5657 { }
5758
58- void igs_mahjong_xa (machine_config &config);
59- void igs_mahjong_xa_xor (machine_config &config);
59+ void base (machine_config &config);
60+ void base_xor (machine_config &config);
61+ void hopper_xor (machine_config &config);
6062
6163 void init_crzybugs ();
6264 void init_crzybugsj ();
@@ -77,6 +79,7 @@ class igs_m027xa_state : public driver_device
7779 required_device<okim6295_device> m_oki;
7880 required_device<screen_device> m_screen;
7981 optional_device<ticket_dispenser_device> m_ticket;
82+ optional_device<hopper_device> m_hopper;
8083 required_region_ptr<u32 > m_external_rom;
8184
8285 optional_ioport_array<3 > m_io_test;
@@ -226,13 +229,19 @@ INPUT_PORTS_START( crzybugs )
226229
227230 PORT_MODIFY (" TEST1" )
228231 PORT_BIT ( 0x04 , IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME(" Start / Stop All Reels" )
229- PORT_BIT ( 0x08 , IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME(" Ticket" )
230232 PORT_BIT ( 0x10 , IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER(" ticket" , ticket_dispenser_device, line_r)
231233
232234 PORT_MODIFY (" TEST2" )
233235 PORT_BIT ( 0x08 , IP_ACTIVE_LOW, IPT_SLOT_STOP2 ) PORT_NAME(" Stop Reel 2 / Small" )
234236 PORT_BIT ( 0x10 , IP_ACTIVE_LOW, IPT_SLOT_STOP3 ) PORT_NAME(" Stop Reel 3 / Take Score" )
235237 PORT_BIT ( 0x20 , IP_ACTIVE_LOW, IPT_SLOT_STOP1 ) PORT_NAME(" Stop Reel 1 / Double Up" )
238+ INPUT_PORTS_END
239+
240+ INPUT_PORTS_START ( crzybugs_us )
241+ PORT_INCLUDE (crzybugs)
242+
243+ PORT_MODIFY (" TEST1" )
244+ PORT_BIT ( 0x08 , IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME(" Ticket" )
236245
237246 PORT_MODIFY (" DSW1" )
238247 PORT_DIPNAME ( 0x01 , 0x01 , DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION(" SW1:1" )
@@ -278,6 +287,30 @@ INPUT_PORTS_START( crzybugs )
278287 PORT_DIPSETTING ( 0x00 , DEF_STR(Yes) )
279288INPUT_PORTS_END
280289
290+ INPUT_PORTS_START ( crzybugs_jp )
291+ PORT_INCLUDE (crzybugs)
292+
293+ PORT_MODIFY (" TEST0" )
294+ PORT_BIT ( 0x01 , IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER(" hopper" , hopper_device, line_r)
295+ PORT_BIT ( 0x20 , IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
296+
297+ PORT_MODIFY (" TEST1" )
298+ PORT_BIT ( 0x08 , IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME(" Ticket" )
299+
300+ PORT_MODIFY (" DSW1" )
301+ PORT_DIPNAME ( 0x01 , 0x01 , DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION(" SW1:1" )
302+ PORT_DIPSETTING ( 0x00 , DEF_STR(Off) )
303+ PORT_DIPSETTING ( 0x01 , DEF_STR(On) )
304+ PORT_DIPNAME ( 0x06 , 0x06 , " Symbol" ) PORT_DIPLOCATION(" SW1:2,3" )
305+ PORT_DIPSETTING ( 0x00 , " Both" )
306+ PORT_DIPSETTING ( 0x02 , " Both (duplicate)" )
307+ PORT_DIPSETTING ( 0x04 , " Fruit" )
308+ PORT_DIPSETTING ( 0x06 , " Bug" )
309+ PORT_DIPNAME ( 0x08 , 0x08 , " Hold Pair" ) PORT_DIPLOCATION(" SW1:4" )
310+ PORT_DIPSETTING ( 0x08 , DEF_STR(Off) )
311+ PORT_DIPSETTING ( 0x00 , " Regular" )
312+ INPUT_PORTS_END
313+
281314INPUT_PORTS_START ( tripfev )
282315 PORT_INCLUDE (base)
283316
@@ -436,7 +469,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(igs_m027xa_state::interrupt)
436469}
437470
438471
439- void igs_m027xa_state::igs_mahjong_xa (machine_config &config)
472+ void igs_m027xa_state::base (machine_config &config)
440473{
441474 IGS027A (config, m_maincpu, 22'000'000 ); // Crazy Bugs has a 22MHz crystal, what about the others?
442475 m_maincpu->set_addrmap (AS_PROGRAM, &igs_m027xa_state::main_map);
@@ -479,13 +512,20 @@ void igs_m027xa_state::igs_mahjong_xa(machine_config &config)
479512 OKIM6295 (config, m_oki, 1000000 , okim6295_device::PIN7_HIGH).add_route (ALL_OUTPUTS, " mono" , 0.5 );
480513}
481514
482- void igs_m027xa_state::igs_mahjong_xa_xor (machine_config &config)
515+ void igs_m027xa_state::base_xor (machine_config &config)
483516{
484- igs_mahjong_xa (config);
517+ base (config);
485518
486519 m_maincpu->set_addrmap (AS_PROGRAM, &igs_m027xa_state::main_xor_map);
487520}
488521
522+ void igs_m027xa_state::hopper_xor (machine_config &config)
523+ {
524+ base_xor (config);
525+
526+ HOPPER (config, m_hopper, attotime::from_msec (50 ));
527+ }
528+
489529// prg at u34
490530// text at u15
491531// cg at u32 / u12
@@ -733,7 +773,7 @@ void igs_m027xa_state::pgm_create_dummy_internal_arm_region()
733773 for (int i = 0 ; i < 0x4000 / 2 ; i += 2 )
734774 {
735775 temp16[i] = 0xff1e ;
736- temp16[i +1 ] = 0xe12f ;
776+ temp16[i + 1 ] = 0xe12f ;
737777
738778 }
739779
@@ -788,17 +828,17 @@ void igs_m027xa_state::init_wldfruit()
788828
789829// These use the MX10EXAQC (80c51XA from Philips)
790830// the PCBs are closer to igs_fear.cpp in terms of layout
791- GAME ( 2008 , haunthig, 0 , igs_mahjong_xa , base, igs_m027xa_state, init_hauntedh, ROT0, " IGS" , " Haunted House (IGS, V109US)" , MACHINE_NOT_WORKING ) // IGS FOR V109US 2008 10 14
792- GAME( 2006 , haunthiga, haunthig, igs_mahjong_xa , base, igs_m027xa_state, init_hauntedh, ROT0, " IGS" , " Haunted House (IGS, V101US)" , MACHINE_NOT_WORKING ) // IGS FOR V101US 2006 08 23
831+ GAME ( 2008 , haunthig, 0 , base , base, igs_m027xa_state, init_hauntedh, ROT0, " IGS" , " Haunted House (IGS, V109US)" , MACHINE_NOT_WORKING ) // IGS FOR V109US 2008 10 14
832+ GAME( 2006 , haunthiga, haunthig, base , base, igs_m027xa_state, init_hauntedh, ROT0, " IGS" , " Haunted House (IGS, V101US)" , MACHINE_NOT_WORKING ) // IGS FOR V101US 2006 08 23
793833
794- GAMEL( 2009 , crzybugs, 0 , igs_mahjong_xa_xor, crzybugs , igs_m027xa_state, init_crzybugs, ROT0, " IGS" , " Crazy Bugs (V204US)" , 0 , layout_crzybugs ) // IGS FOR V204US 2009 5 19
795- GAMEL( 2006 , crzybugsa, crzybugs, igs_mahjong_xa_xor, crzybugs , igs_m027xa_state, init_crzybugs, ROT0, " IGS" , " Crazy Bugs (V202US)" , 0 , layout_crzybugs ) // IGS FOR V100US 2006 3 29 but also V202US string
796- GAMEL( 2005 , crzybugsb, crzybugs, igs_mahjong_xa_xor, crzybugs , igs_m027xa_state, init_crzybugs, ROT0, " IGS" , " Crazy Bugs (V200US)" , 0 , layout_crzybugs ) // FOR V100US 2005 7 20 but also V200US string
834+ GAMEL( 2009 , crzybugs, 0 , base_xor, crzybugs_us , igs_m027xa_state, init_crzybugs, ROT0, " IGS" , " Crazy Bugs (V204US)" , 0 , layout_crzybugs ) // IGS FOR V204US 2009 5 19
835+ GAMEL( 2006 , crzybugsa, crzybugs, base_xor, crzybugs_us , igs_m027xa_state, init_crzybugs, ROT0, " IGS" , " Crazy Bugs (V202US)" , 0 , layout_crzybugs ) // IGS FOR V100US 2006 3 29 but also V202US string
836+ GAMEL( 2005 , crzybugsb, crzybugs, base_xor, crzybugs_us , igs_m027xa_state, init_crzybugs, ROT0, " IGS" , " Crazy Bugs (V200US)" , 0 , layout_crzybugs ) // FOR V100US 2005 7 20 but also V200US string
797837
798- GAMEL( 2007 , crzybugsj, crzybugs, igs_mahjong_xa_xor, crzybugs , igs_m027xa_state, init_crzybugsj, ROT0, " IGS" , " Crazy Bugs (V103JP)" , 0 , layout_crzybugs ) // IGS FOR V101JP 2007 06 08 (test mode calls this V102JP, ROM label was V103JP)
838+ GAMEL( 2007 , crzybugsj, crzybugs, hopper_xor, crzybugs_jp , igs_m027xa_state, init_crzybugsj, ROT0, " IGS" , " Crazy Bugs (V103JP)" , 0 , layout_crzybugs ) // IGS FOR V101JP 2007 06 08 (test mode calls this V102JP, ROM label was V103JP)
799839
800- GAMEL( 2006 , tripfev, 0 , igs_mahjong_xa_xor, tripfev, igs_m027xa_state, init_tripfev, ROT0, " IGS" , " Triple Fever (V108US)" , 0 , layout_tripfev )
801- GAMEL( 2006 , tripfeva, tripfev, igs_mahjong_xa_xor, tripfev, igs_m027xa_state, init_tripfev, ROT0, " IGS" , " Triple Fever (V107US)" , 0 , layout_tripfev ) // IGS FOR V107US 2006 09 07
802- GAMEL( 2006 , tripfevb, tripfev, igs_mahjong_xa_xor, tripfev, igs_m027xa_state, init_tripfev, ROT0, " IGS" , " Triple Fever (V105US)" , MACHINE_NOT_WORKING, layout_tripfev )
840+ GAMEL( 2006 , tripfev, 0 , base_xor, tripfev, igs_m027xa_state, init_tripfev, ROT0, " IGS" , " Triple Fever (V108US)" , 0 , layout_tripfev )
841+ GAMEL( 2006 , tripfeva, tripfev, base_xor, tripfev, igs_m027xa_state, init_tripfev, ROT0, " IGS" , " Triple Fever (V107US)" , 0 , layout_tripfev ) // IGS FOR V107US 2006 09 07
842+ GAMEL( 2006 , tripfevb, tripfev, base_xor, tripfev, igs_m027xa_state, init_tripfev, ROT0, " IGS" , " Triple Fever (V105US)" , MACHINE_NOT_WORKING, layout_tripfev )
803843
804- GAME( 200 ?, wldfruit, 0 , igs_mahjong_xa , base, igs_m027xa_state, init_wldfruit, ROT0, " IGS" , " Wild Fruit (V208US)" , MACHINE_NOT_WORKING ) // IGS-----97----V208US
844+ GAME( 200 ?, wldfruit, 0 , base , base, igs_m027xa_state, init_wldfruit, ROT0, " IGS" , " Wild Fruit (V208US)" , MACHINE_NOT_WORKING ) // IGS-----97----V208US
0 commit comments