From 8d44c54f681db5100e1acb8cd0871186c90af0aa Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 25 Oct 2017 17:18:47 +0200 Subject: [PATCH] tceptor: readded 3d scope view, now properly (nw) --- src/mame/drivers/tceptor.cpp | 18 +++++++-------- src/mame/includes/tceptor.h | 2 +- src/mame/layout/tceptor2.lay | 44 ++++++++++++++++++++++++++++++++++++ src/mame/video/tceptor.cpp | 7 +++++- 4 files changed, 59 insertions(+), 12 deletions(-) create mode 100644 src/mame/layout/tceptor2.lay diff --git a/src/mame/drivers/tceptor.cpp b/src/mame/drivers/tceptor.cpp index e04ac7de1b7..0b03349fc0a 100644 --- a/src/mame/drivers/tceptor.cpp +++ b/src/mame/drivers/tceptor.cpp @@ -22,6 +22,8 @@ #include "rendlay.h" #include "speaker.h" +#include "tceptor2.lh" + /*******************************************************************/ @@ -141,11 +143,6 @@ READ8_MEMBER(tceptor_state::input1_r) return fix_input1(ioport("BUTTONS")->read(), ioport("SERVICE")->read()); } -READ8_MEMBER(tceptor_state::readFF) -{ - return 0xff; -} - /*******************************************************************/ static ADDRESS_MAP_START( m6809_map, AS_PROGRAM, 8, tceptor_state ) @@ -154,7 +151,7 @@ static ADDRESS_MAP_START( m6809_map, AS_PROGRAM, 8, tceptor_state ) AM_RANGE(0x1c00, 0x1fff) AM_RAM_WRITE(tceptor_tile_attr_w) AM_SHARE("tile_attr") AM_RANGE(0x2000, 0x3fff) AM_RAM_WRITE(tceptor_bg_ram_w) AM_SHARE("bg_ram") // background (VIEW RAM) AM_RANGE(0x4000, 0x43ff) AM_DEVREADWRITE("namco", namco_cus30_device, namcos1_cus30_r, namcos1_cus30_w) - AM_RANGE(0x4800, 0x4800) AM_WRITENOP // 3D scope left/right? + AM_RANGE(0x4800, 0x4800) AM_WRITE(tceptor2_shutter_w) AM_RANGE(0x4f00, 0x4f00) AM_READNOP // unknown AM_RANGE(0x4f01, 0x4f01) AM_READ_PORT("PEDAL") // analog input (accel) AM_RANGE(0x4f02, 0x4f02) AM_READ_PORT("STICKX") // analog input (left/right) @@ -222,8 +219,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mcu_io_map, AS_IO, 8, tceptor_state ) - AM_RANGE(M6801_PORT1, M6801_PORT1) AM_READ(readFF) AM_WRITENOP - AM_RANGE(M6801_PORT2, M6801_PORT2) AM_READ(readFF) AM_WRITENOP + ADDRESS_MAP_UNMAP_HIGH + AM_RANGE(M6801_PORT1, M6801_PORT1) AM_WRITENOP + AM_RANGE(M6801_PORT2, M6801_PORT2) AM_WRITENOP ADDRESS_MAP_END @@ -290,7 +288,7 @@ static INPUT_PORTS_START( tceptor2 ) PORT_INCLUDE( tceptor ) PORT_MODIFY("DSW2") - PORT_DIPNAME( 0x04, 0x00, "Mode" ) // NOTE: factory default is actually 3D + PORT_DIPNAME( 0x04, 0x04, "Mode" ) PORT_DIPSETTING( 0x00, "2D" ) PORT_DIPSETTING( 0x04, "3D" ) PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -520,4 +518,4 @@ ROM_END // ( YEAR NAME PARENT MACHINE INPUT STATE INIT MONITOR COMPANY FULLNAME FLAGS ) GAME ( 1986, tceptor, 0, tceptor, tceptor, tceptor_state, 0, ROT0, "Namco", "Thunder Ceptor", 0) -GAME ( 1986, tceptor2, tceptor, tceptor, tceptor2, tceptor_state, 0, ROT0, "Namco", "3-D Thunder Ceptor II", 0) +GAMEL( 1986, tceptor2, tceptor, tceptor, tceptor2, tceptor_state, 0, ROT0, "Namco", "3-D Thunder Ceptor II", 0, layout_tceptor2) diff --git a/src/mame/includes/tceptor.h b/src/mame/includes/tceptor.h index 8518a4f09a1..9ea6ccb945e 100644 --- a/src/mame/includes/tceptor.h +++ b/src/mame/includes/tceptor.h @@ -57,11 +57,11 @@ public: DECLARE_READ8_MEMBER(dsw1_r); DECLARE_READ8_MEMBER(input0_r); DECLARE_READ8_MEMBER(input1_r); - DECLARE_READ8_MEMBER(readFF); DECLARE_WRITE8_MEMBER(tceptor_tile_ram_w); DECLARE_WRITE8_MEMBER(tceptor_tile_attr_w); DECLARE_WRITE8_MEMBER(tceptor_bg_ram_w); DECLARE_WRITE8_MEMBER(tceptor_bg_scroll_w); + DECLARE_WRITE8_MEMBER(tceptor2_shutter_w); void tile_mark_dirty(int offset); required_device m_c45_road; diff --git a/src/mame/layout/tceptor2.lay b/src/mame/layout/tceptor2.lay new file mode 100644 index 00000000000..c1dbad97422 --- /dev/null +++ b/src/mame/layout/tceptor2.lay @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/video/tceptor.cpp b/src/mame/video/tceptor.cpp index 77713a138f8..3e344fbd576 100644 --- a/src/mame/video/tceptor.cpp +++ b/src/mame/video/tceptor.cpp @@ -529,7 +529,6 @@ uint32_t tceptor_state::screen_update_tceptor(screen_device &screen, bitmap_ind1 return 0; } - WRITE_LINE_MEMBER(tceptor_state::screen_vblank_tceptor) { // rising edge @@ -538,3 +537,9 @@ WRITE_LINE_MEMBER(tceptor_state::screen_vblank_tceptor) memcpy(m_sprite_ram_buffered.get(), m_sprite_ram, 0x200); } } + +WRITE8_MEMBER(tceptor_state::tceptor2_shutter_w) +{ + // 3D scope shutter control + output().set_value("shutter", data & 1); +}