@@ -16,8 +16,8 @@ Main components for the IGS PCB-0405-02-FZ are:
16
16
TODO:
17
17
- IGS 033 appears to encapsulate the behavior of the video/interface chip found in igspoker.cpp
18
18
so could be turned into a device, possibly shared
19
- - complete inputs / outputs / hopper
20
- - huahuas5 needs correct Oki banking
19
+ - verify possibly incomplete inputs
20
+ - lamps / layout
21
21
*/
22
22
23
23
#include " emu.h"
@@ -60,13 +60,14 @@ class igs_m027_033vid_state : public driver_device
60
60
driver_device (mconfig, type, tag),
61
61
m_external_rom (*this , " user1" ),
62
62
m_nvram (*this , " nvram" ),
63
+ m_bg_videoram (*this , " bg_videoram" ),
64
+ m_bg_attr_videoram (*this , " bg_attr_videoram" ),
63
65
m_maincpu (*this , " maincpu" ),
66
+ m_hopper (*this , " hopper" ),
64
67
m_screen (*this , " screen" ),
65
68
m_palette (*this , " palette" ),
66
69
m_gfxdecode (*this , " gfxdecode" ),
67
- m_oki (*this , " oki" ),
68
- m_bg_videoram (*this , " bg_videoram" ),
69
- m_bg_attr_videoram (*this , " bg_attr_videoram" )
70
+ m_oki (*this , " oki" )
70
71
{ }
71
72
72
73
void m027_033vid (machine_config &config) ATTR_COLD;
@@ -82,14 +83,15 @@ class igs_m027_033vid_state : public driver_device
82
83
private:
83
84
required_region_ptr<u32 > m_external_rom;
84
85
required_shared_ptr<u32 > m_nvram;
86
+ required_shared_ptr<u32 > m_bg_videoram;
87
+ required_shared_ptr<u32 > m_bg_attr_videoram;
85
88
86
89
required_device<igs027a_cpu_device> m_maincpu;
90
+ required_device<hopper_device> m_hopper;
87
91
required_device<screen_device> m_screen;
88
92
required_device<palette_device> m_palette;
89
93
required_device<gfxdecode_device> m_gfxdecode;
90
94
required_device<okim6295_device> m_oki;
91
- required_shared_ptr<u32 > m_bg_videoram;
92
- required_shared_ptr<u32 > m_bg_attr_videoram;
93
95
94
96
u32 m_xor_table[0x100 ];
95
97
tilemap_t *m_bg_tilemap = nullptr ;
@@ -173,7 +175,7 @@ void igs_m027_033vid_state::bg_attr_videoram_w(offs_t offset, u32 data, u32 mem_
173
175
174
176
void igs_m027_033vid_state::out_port_w (u8 data)
175
177
{
176
- if (data & 0xea )
178
+ if (data & 0xe8 )
177
179
logerror (" %s IGS027A out port w: %02X\n " , machine ().describe_context (), data);
178
180
179
181
m_video_enable = BIT (data, 0 );
@@ -202,6 +204,7 @@ void igs_m027_033vid_state::m027_map(address_map &map) // TODO: some unknown wri
202
204
map (0x3800'3000 , 0x3800'30ff ).ram ().w (m_palette, FUNC (palette_device::write32_ext)).share (" palette_ext" );
203
205
204
206
map (0x3800'4000 , 0x3800'4003 ).portr (" DSW" );
207
+ map (0x3800'5003 , 0x3800'5003 ).lw8 (NAME ([this ] (uint8_t data) { m_hopper->motor_w (BIT (data, 0 )); }));
205
208
map (0x3800'5010 , 0x3800'5013 ).umask32 (0x0000'00ff ).rw (" oki" , FUNC (okim6295_device::read), FUNC (okim6295_device::write));
206
209
map (0x3800'5030 , 0x3800'5033 ).rw (" ppi" , FUNC (i8255_device::read), FUNC (i8255_device::write));
207
210
@@ -232,7 +235,7 @@ INPUT_PORTS_START( qiji6 ) // TODO: complete
232
235
PORT_BIT ( 0x10 , IP_ACTIVE_LOW, IPT_GAMBLE_HIGH )
233
236
PORT_BIT ( 0x20 , IP_ACTIVE_LOW, IPT_GAMBLE_LOW )
234
237
PORT_BIT ( 0x40 , IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
235
- PORT_BIT ( 0x80 , IP_ACTIVE_LOW, IPT_UNKNOWN )
238
+ PORT_BIT ( 0x80 , IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( " hopper " , FUNC(hopper_device::line_r) )
236
239
237
240
PORT_START (" IN1" )
238
241
PORT_BIT ( 0x01 , IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -389,6 +392,8 @@ void igs_m027_033vid_state::m027_033vid(machine_config &config)
389
392
ppi.out_pb_callback ().set ([this ] (u8 data) { LOGPORTS (" %s: PPI port B write %02x\n " , machine ().describe_context (), data); });
390
393
ppi.out_pc_callback ().set ([this ] (u8 data) { LOGPORTS (" %s: PPI port C write %02x\n " , machine ().describe_context (), data); });
391
394
395
+ HOPPER (config, m_hopper, attotime::from_msec (50 ));
396
+
392
397
SCREEN (config, m_screen, SCREEN_TYPE_RASTER);
393
398
m_screen->set_refresh_hz (60 );
394
399
m_screen->set_vblank_time (ATTOSECONDS_IN_USEC (1000 ));
@@ -482,6 +487,6 @@ void igs_m027_033vid_state::init_huahuas5()
482
487
***************************************************************************/
483
488
484
489
// internal ROM date is 2002, external software revision could be later
485
- GAME ( 2002 , qiji6, 0 , m027_033vid, qiji6, igs_m027_033vid_state, init_qiji6, ROT0, " IGS" , " Qiji 6 (V118CN)" , MACHINE_NOT_WORKING ) // lacks hopper support
490
+ GAME ( 2002 , qiji6, 0 , m027_033vid, qiji6, igs_m027_033vid_state, init_qiji6, ROT0, " IGS" , " Qiji 6 (V118CN)" , MACHINE_SUPPORTS_SAVE )
486
491
// internal ROM date is 2004, external software revision could be later
487
- GAME( 2004 , huahuas5, 0 , huahuas5, huahuas5, igs_m027_033vid_state, init_huahuas5, ROT0, " IGS" , " Huahua Shijie 5 / Feixing Shijie (V107CN)" , MACHINE_NOT_WORKING ) // lacks hopper support
492
+ GAME( 2004 , huahuas5, 0 , huahuas5, huahuas5, igs_m027_033vid_state, init_huahuas5, ROT0, " IGS" , " Huahua Shijie 5 / Feixing Shijie (V107CN)" , MACHINE_SUPPORTS_SAVE )
0 commit comments