mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
taito_z: add electronic shutters for contcirc 3d scope
This commit is contained in:
parent
2bedaba0a1
commit
68b66ab091
@ -9,7 +9,7 @@ Mephisto Mega IV
|
||||
|
||||
Hardware notes:
|
||||
- G65SC02P-4 @ 4MHz
|
||||
- 8KB RAMbattery-backed), 32KB ROM
|
||||
- 8KB RAM(battery-backed), 32KB ROM
|
||||
- expansion slot at underside (only used for smondial2)
|
||||
- 2*PCF2112, 2 7seg LCD screens
|
||||
- 8*8 chessboard buttons, 24 tri-color leds, piezo
|
||||
|
@ -3149,8 +3149,21 @@ void taitoz_state::machine_start()
|
||||
|
||||
MACHINE_START_MEMBER(taitoz_state,chasehq)
|
||||
{
|
||||
m_lamps.resolve();
|
||||
machine_start();
|
||||
|
||||
m_lamps.resolve();
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(taitoz_state,contcirc)
|
||||
{
|
||||
machine_start();
|
||||
|
||||
m_shutter_out.resolve();
|
||||
m_shutter_toggle = 0;
|
||||
m_shutter_control = 0;
|
||||
|
||||
save_item(NAME(m_shutter_toggle));
|
||||
save_item(NAME(m_shutter_control));
|
||||
}
|
||||
|
||||
void taitoz_state::machine_reset()
|
||||
@ -3193,9 +3206,11 @@ void taitoz_state::contcirc(machine_config &config)
|
||||
screen_config(config, 24, 248);
|
||||
m_screen->set_screen_update(FUNC(taitoz_state::screen_update_contcirc));
|
||||
m_screen->set_palette(m_tc0110pcr);
|
||||
m_screen->screen_vblank().set(FUNC(taitoz_state::contcirc_vblank));
|
||||
|
||||
GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz);
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(taitoz_state,contcirc)
|
||||
MCFG_VIDEO_START_OVERRIDE(taitoz_state,taitoz)
|
||||
|
||||
TC0100SCN(config, m_tc0100scn, 0);
|
||||
|
@ -2,7 +2,6 @@
|
||||
// copyright-holders:David Graves
|
||||
/*************************************************************************
|
||||
|
||||
|
||||
Taito Z system
|
||||
|
||||
*************************************************************************/
|
||||
@ -51,7 +50,8 @@ public:
|
||||
m_stickx(*this, "STICKX"),
|
||||
m_sticky(*this, "STICKY"),
|
||||
m_io_eepromout(*this, "EEPROMOUT"),
|
||||
m_lamps(*this, "lamp%u", 0U)
|
||||
m_lamps(*this, "lamp%u", 0U),
|
||||
m_shutter_out(*this, "shutter%u", 0U)
|
||||
{ }
|
||||
|
||||
DECLARE_CUSTOM_INPUT_MEMBER(gas_pedal_r);
|
||||
@ -101,6 +101,8 @@ private:
|
||||
s32 m_sci_int6;
|
||||
s32 m_ioc220_port;
|
||||
u8 m_eep_latch;
|
||||
int m_shutter_toggle;
|
||||
u8 m_shutter_control;
|
||||
|
||||
/* devices */
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -125,6 +127,7 @@ private:
|
||||
optional_ioport m_sticky;
|
||||
optional_ioport m_io_eepromout;
|
||||
output_finder<2> m_lamps;
|
||||
output_finder<2> m_shutter_out;
|
||||
|
||||
void cpua_ctrl_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
void chasehq_cpua_ctrl_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
||||
@ -145,8 +148,10 @@ private:
|
||||
u16 sci_spriteframe_r();
|
||||
void sci_spriteframe_w(u16 data);
|
||||
void contcirc_out_w(u8 data);
|
||||
DECLARE_WRITE_LINE_MEMBER(contcirc_vblank);
|
||||
DECLARE_VIDEO_START(taitoz);
|
||||
DECLARE_MACHINE_START(chasehq);
|
||||
DECLARE_MACHINE_START(contcirc);
|
||||
u32 screen_update_contcirc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_chasehq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
u32 screen_update_bshark(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
|
@ -3,6 +3,13 @@
|
||||
license:CC0
|
||||
-->
|
||||
<mamelayout version="2">
|
||||
|
||||
<!-- define elements -->
|
||||
|
||||
<element name="shutter" defstate="0">
|
||||
<rect state="1"><color red="0" green="0" blue="0" /></rect>
|
||||
</element>
|
||||
|
||||
<element name="shifter" defstate="0">
|
||||
<rect>
|
||||
<bounds left="0" right="32" top="0" bottom="64" />
|
||||
@ -51,6 +58,9 @@ license:CC0
|
||||
</disk>
|
||||
</element>
|
||||
|
||||
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Shifter-R">
|
||||
<screen index="0">
|
||||
<bounds x="0" y="0" width="640" height="480" />
|
||||
@ -85,4 +95,33 @@ license:CC0
|
||||
<bounds x="-40" y="414" width="32" height="64" />
|
||||
</element>
|
||||
</view>
|
||||
|
||||
<view name="3D Scope Straight View">
|
||||
<!-- parallel-eyed -->
|
||||
<screen index="0"><bounds left="0" top="0" right="4" bottom="3" /></screen>
|
||||
<element name="shutter1" ref="shutter"><bounds left="0" top="0" right="4" bottom="3" /></element>
|
||||
|
||||
<screen index="0"><bounds left="4.03" top="0" right="8.03" bottom="3" /></screen>
|
||||
<element name="shutter0" ref="shutter"><bounds left="4.03" top="0" right="8.03" bottom="3" /></element>
|
||||
</view>
|
||||
|
||||
<view name="3D Scope Cross View">
|
||||
<!-- cross-eyed -->
|
||||
<screen index="0"><bounds left="0" top="0" right="4" bottom="3" /></screen>
|
||||
<element name="shutter0" ref="shutter"><bounds left="0" top="0" right="4" bottom="3" /></element>
|
||||
|
||||
<screen index="0"><bounds left="4.03" top="0" right="8.03" bottom="3" /></screen>
|
||||
<element name="shutter1" ref="shutter"><bounds left="4.03" top="0" right="8.03" bottom="3" /></element>
|
||||
</view>
|
||||
|
||||
<view name="3D Scope Left">
|
||||
<screen index="0"><bounds left="0" top="0" right="4" bottom="3" /></screen>
|
||||
<element name="shutter1" ref="shutter"><bounds left="0" top="0" right="4" bottom="3" /></element>
|
||||
</view>
|
||||
|
||||
<view name="3D Scope Right">
|
||||
<screen index="0"><bounds left="0" top="0" right="4" bottom="3" /></screen>
|
||||
<element name="shutter0" ref="shutter"><bounds left="0" top="0" right="4" bottom="3" /></element>
|
||||
</view>
|
||||
|
||||
</mamelayout>
|
||||
|
@ -19,7 +19,6 @@ VIDEO_START_MEMBER(taitoz_state,taitoz)
|
||||
SPRITE READ AND WRITE HANDLERS
|
||||
********************************************************/
|
||||
|
||||
|
||||
u16 taitoz_state::sci_spriteframe_r()
|
||||
{
|
||||
return (m_sci_spriteframe << 8);
|
||||
@ -780,14 +779,37 @@ void taitoz_state::contcirc_out_w(u8 data)
|
||||
|
||||
/* bits 1-3 n.c. */
|
||||
|
||||
/* 3d glasses control */
|
||||
/* 3d scope control */
|
||||
/* bit 4 = SCPSW */
|
||||
/* bit 5 = SCP */
|
||||
/* bit 5 = _SCP */
|
||||
if (~m_shutter_control & 2 && data & 0x20)
|
||||
m_shutter_toggle = 0;
|
||||
m_shutter_control = data >> 4 & 3;
|
||||
|
||||
/* bits 6 and 7 select the road palette bank */
|
||||
m_road_palbank = (data & 0xc0) >> 6;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(taitoz_state::contcirc_vblank)
|
||||
{
|
||||
if (state)
|
||||
{
|
||||
// it outputs 3d scope shutters at vblank
|
||||
if (m_shutter_control & 1)
|
||||
{
|
||||
m_shutter_out[0] = m_shutter_toggle;
|
||||
m_shutter_out[1] = m_shutter_toggle ^ 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_shutter_out[0] = 0;
|
||||
m_shutter_out[1] = 0;
|
||||
}
|
||||
|
||||
if (m_shutter_control & 2)
|
||||
m_shutter_toggle ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
u32 taitoz_state::screen_update_contcirc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user