summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ryan Holtz <ryan.holtz@arrowheadgs.com>2020-10-23 00:58:19 +0200
committer Ryan Holtz <ryan.holtz@arrowheadgs.com>2020-10-23 00:59:02 +0200
commitc2fa1ccf18af09650042513a06bcb22e478b10ed (patch)
treec02ddda2ccf05caf500f7eb1b8f10b7b4fd79296
parentb320f99413e1ede8d04a53fb32b625e4ee51de8c (diff)
New working machines
-------------------- Must Shoot TV (prototype) [Ryan Holtz, Brian Troha, Aaron Giles, Al Kossow, Gaming Alexandria, ClawGrip, anonymous] * itech32.cpp: Added additional safety to prevent out-of-bounds GROM access, at the cost of some cycles.
-rw-r--r--src/mame/drivers/itech32.cpp117
-rw-r--r--src/mame/includes/itech32.h35
-rw-r--r--src/mame/mame.lst1
-rw-r--r--src/mame/video/itech32.cpp28
4 files changed, 170 insertions, 11 deletions
diff --git a/src/mame/drivers/itech32.cpp b/src/mame/drivers/itech32.cpp
index a3f8c8e3899..b4b4e682e6a 100644
--- a/src/mame/drivers/itech32.cpp
+++ b/src/mame/drivers/itech32.cpp
@@ -21,9 +21,10 @@
* Golden Tee 3D Golf (12 sets)
* Golden Tee Golf '97 (7 sets)
* Golden Tee Golf '98 (6 sets)
- * Golden Tee Golf '99 (4 Sets)
- * Golden Tee Golf 2K (5 Sets)
- * Golden Tee Classic (3 Sets)
+ * Golden Tee Golf '99 (4 sets)
+ * Golden Tee Golf 2K (5 sets)
+ * Golden Tee Classic (3 sets)
+ * Must Shoot TV (prototype) (1 set)
Known issues:
* volume controls do not work in the Golden Tee games
@@ -381,6 +382,13 @@ Notes:
*
*************************************/
+void shoottv_state::update_interrupts(int vint, int xint, int qint)
+{
+ /* VINT is ignored on shoottv hardware. */
+ itech32_state::update_interrupts(-1, xint, qint);
+}
+
+
void itech32_state::update_interrupts(int vint, int xint, int qint)
{
/* update the states */
@@ -618,7 +626,7 @@ u16 drivedge_state::gas_r()
/*************************************
*
- * Protection is hangled through a PIC 16C54 MCU
+ * Protection is handled through a PIC 16C54 MCU
*
*************************************/
@@ -648,7 +656,6 @@ u32 itech32_state::gtclass_prot_result_r()
}
-
/*************************************
*
* Sound banking
@@ -1013,6 +1020,29 @@ void itech32_state::itech020_map(address_map &map)
map(0x800000, 0xbfffff).rom().region("user1", 0).share("main_rom");
}
+void shoottv_state::shoottv_map(address_map &map)
+{
+ itech32_state::itech020_map(map);
+ map(0x080000, 0x080003).lr32(NAME([this]() { return m_buttons[0]->read() << 16; } ));
+ map(0x100000, 0x100003).lr32(NAME([this]() { return m_buttons[1]->read() << 16; } ));
+ map(0x180000, 0x180003).lr32(NAME([this]() { return m_buttons[2]->read() << 16; } ));
+ map(0x183000, 0x183003).lr32(NAME([this]() { m_maincpu->set_input_line(6, CLEAR_LINE); return 0; } ));
+ map(0x183800, 0x188003).lr32(NAME([this]() { m_maincpu->set_input_line(5, CLEAR_LINE); return 0; } ));
+ map(0x190000, 0x190003).lr32(NAME([this]() { return (m_gun_x[0]->read() & 0xff) << 16; } ));
+ map(0x190800, 0x190803).lr32(NAME([this]() { return (m_gun_x[0]->read() & 0xff00) << 8; } ));
+ map(0x191000, 0x191003).lr32(NAME([this]() { return (m_gun_y[0]->read() & 0xff) << 16; } ));
+ map(0x191800, 0x191803).lr32(NAME([]() { return 0; } ));
+ map(0x192000, 0x192003).lr32(NAME([this]() { return (m_gun_x[1]->read() & 0xff) << 16; } ));
+ map(0x192800, 0x192803).lr32(NAME([this]() { return (m_gun_x[1]->read() & 0xff00) << 8; } ));
+ map(0x193000, 0x193003).lr32(NAME([this]() { return (m_gun_y[1]->read() & 0xff) << 16; } ));
+ map(0x193800, 0x193803).lr32(NAME([]() { return 0; } ));
+ map(0x200000, 0x200003).lr32(NAME([]() { return 0xffffffff; } ));
+ map(0x280000, 0x280003).lr32(NAME([this]() { return m_dips->read() << 16; } ));
+ map(0x300003, 0x300003).w(FUNC(shoottv_state::color_w<0>));
+ map(0x380003, 0x380003).w(FUNC(shoottv_state::color_w<1>));
+ map(0x610000, 0x61ffff).ram().share("nvram_b");
+ map(0x680000, 0x680003).lr32(NAME([]() { return 0x00002000; } )); // Fake the security PIC response
+}
/*************************************
@@ -1155,6 +1185,38 @@ static INPUT_PORTS_START( itech32_base_16bit )
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
+static INPUT_PORTS_START( shoottv )
+ PORT_INCLUDE( itech32_base_16bit )
+ PORT_MODIFY("P1") /* 080000 */
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START1 )
+ PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_MODIFY("P2") /* 100000 */
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN2 )
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_START2 )
+ PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_MODIFY("P3") /* 180000 */
+ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
+ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("GUNX1")
+ PORT_BIT( 0x1ff, 0xc0, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_MINMAX(0x1c, 0x19b) PORT_PLAYER(1)
+
+ PORT_START("GUNY1")
+ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xff) PORT_PLAYER(1)
+
+ PORT_START("GUNX2")
+ PORT_BIT( 0x1ff, 0xc0, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_MINMAX(0x1c, 0x19b) PORT_PLAYER(2)
+
+ PORT_START("GUNY2")
+ PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xff) PORT_PLAYER(2)
+
+ PORT_MODIFY("DIPS")
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNUSED )
+INPUT_PORTS_END
static INPUT_PORTS_START( bloodstm )
PORT_INCLUDE( itech32_base_16bit )
@@ -1752,6 +1814,14 @@ void drivedge_state::drivedge(machine_config &config)
m_ensoniq->add_route(3, "left_back", 0.1);
}
+void shoottv_state::shoottv(machine_config &config)
+{
+ itech32_state::sftm(config);
+ m_maincpu->set_addrmap(AS_PROGRAM, &shoottv_state::shoottv_map);
+
+ NVRAM(config, "nvram_b");
+}
+
void itech32_state::sftm(machine_config &config)
{
M68EC020(config, m_maincpu, CPU020_CLOCK);
@@ -4523,6 +4593,33 @@ ROM_START( gtclasscs ) /* Version 1.00S for the 3 tier type PCB with short ROM
ROM_END
+ROM_START( shoottv )
+ ROM_REGION32_BE( CODE_SIZE, "user1", 0 )
+ ROM_LOAD32_BYTE( "gun_0.bin", 0x00000, 0xc5f9, CRC(1086b219) SHA1(a9e9545911e427e819d4c98885cbfe871ce7e83a) ) // from GUN/roms
+ ROM_LOAD32_BYTE( "gun_1.bin", 0x00001, 0xc5f9, CRC(a0f0e5ea) SHA1(39560d76759d17c34c353dbe202ec22af234238d) )
+ ROM_LOAD32_BYTE( "gun_2.bin", 0x00002, 0xc5f9, CRC(1b84cf05) SHA1(8f4b816ab2808258399072545f5dda0316e554ea) )
+ ROM_LOAD32_BYTE( "gun_3.bin", 0x00003, 0xc5f9, CRC(43ed58aa) SHA1(9d641b76956376e983e4d0ead3095932c4fb33c6) )
+
+ ROM_REGION( 0x28000, "soundcpu", 0 )
+ ROM_LOAD( "gun.bim", 0x10000, 0x18000, CRC(7439569a) SHA1(f02ec03307a2fb8a00d2ab1c7e1a62c0c74a98e9) ) // from GUN/matt back/gun
+ ROM_CONTINUE( 0x08000, 0x08000 )
+
+ ROM_REGION( 0x880000, "gfx1", 0 )
+ ROM_LOAD32_BYTE( "grom00_0.bin", 0x000000, 0x80000, CRC(9a06d497) SHA1(c92826d2b7f356518e68282eef7c6f42779782f2) ) // from GUN/roms
+ ROM_LOAD32_BYTE( "grom00_1.bin", 0x000001, 0x80000, CRC(018ff629) SHA1(34f9d79832daeeeefd0085bf41ee8ec31bdb6815) )
+ ROM_LOAD32_BYTE( "grom00_2.bin", 0x000002, 0x80000, CRC(f47ea010) SHA1(f83b2457d23095208bd6c200e1d358026ae5ad3a) )
+ ROM_LOAD32_BYTE( "grom00_3.bin", 0x000003, 0x80000, CRC(3c12be47) SHA1(a28c4eeb042025db36fa558b170891a296bb8a75) )
+ ROM_LOAD32_BYTE( "grom01_0.bin", 0x200000, 0x4fdd5, CRC(ebf70a20) SHA1(90b3748206ba32b676f01a104c57c0c9f03053fd) )
+ ROM_LOAD32_BYTE( "grom01_1.bin", 0x200001, 0x4fdd5, CRC(a78fedd1) SHA1(f6b61e509e289dad00024148b82e7c176f8f8ec4) )
+ ROM_LOAD32_BYTE( "grom01_2.bin", 0x200002, 0x4fdd5, CRC(3578d74d) SHA1(fe771f4ddef37822328832d0ed3df74a41e8607d) )
+ ROM_LOAD32_BYTE( "grom01_3.bin", 0x200003, 0x4fdd5, CRC(394be494) SHA1(901628df61c2870169555834f73c77e8553024d0) )
+
+ ROM_REGION16_BE( 0x400000, "ensoniq.0", ROMREGION_ERASE00 )
+ ROM_LOAD16_BYTE( "guns0.bin", 0x000000, 0x7fb51, CRC(35e9ba70) SHA1(602fce09fbb40e37430e5f89d296fceda9ced1d4) ) // from GUN/matt back/gun/SMPL
+ ROM_LOAD16_BYTE( "guns1.bin", 0x200000, 0x3dccd, CRC(ec1c3ab3) SHA1(c8961b92dd5d14ab1640c3feb64fe1ac6c3d2ed6) )
+ROM_END
+
+
/*************************************
*
@@ -4708,6 +4805,14 @@ void itech32_state::init_gt3d()
}
+void shoottv_state::driver_init()
+{
+ init_program_rom();
+ m_vram_height = 1024;
+ m_planes = 2;
+}
+
+
void itech32_state::init_aama()
{
/*
@@ -4937,3 +5042,5 @@ GAME( 2002, gtsupreme, gt2k, tourny, gt98s, itech32_state, init_aamat, R
GAME( 2001, gtclassc, 0, sftm, aama, itech32_state, init_aama, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00)" , MACHINE_SUPPORTS_SAVE ) /* PIC 16C54 labeled as ITGFCL */
GAME( 2001, gtclasscp, gtclassc, sftm, aama, itech32_state, init_gtclasscp, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00) (alt protection)" , MACHINE_SUPPORTS_SAVE ) /* PIC 16C54 labeled as ITGFCL */
GAME( 2001, gtclasscs, gtclassc, sftm, s_ver, itech32_state, init_s_ver, ROT0, "Incredible Technologies", "Golden Tee Classic (v1.00S)" , MACHINE_SUPPORTS_SAVE ) /* PIC 16C54 labeled as ITGFCL-M */
+
+GAME( 199?, shoottv, 0, shoottv, shoottv, shoottv_state, empty_init, ROT0, "Incredible Technologies", "Must Shoot TV (prototype)" , MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h
index 964a0197edb..d782ede033e 100644
--- a/src/mame/includes/itech32.h
+++ b/src/mame/includes/itech32.h
@@ -194,7 +194,7 @@ protected:
void draw_rle(u16 *base, u16 color);
virtual void shiftreg_clear(u16 *base, u16 *zbase);
void handle_video_command();
- void update_interrupts(int vint, int xint, int qint);
+ virtual void update_interrupts(int vint, int xint, int qint);
void bloodstm_map(address_map &map);
void itech020_map(address_map &map);
void sound_020_map(address_map &map);
@@ -265,4 +265,37 @@ protected:
u8 m_tms_spinning[2];
};
+class shoottv_state : public itech32_state
+{
+public:
+ shoottv_state(const machine_config &mconfig, device_type type, const char *tag) :
+ itech32_state(mconfig, type, tag),
+ m_buttons(*this, "P%u", 1U),
+ m_dips(*this, "DIPS"),
+ m_gun_x(*this, "GUNX%u", 1U),
+ m_gun_y(*this, "GUNY%u", 1U),
+ m_nvram_b(*this, "nvram_b", 0),
+ m_gun_timer(nullptr)
+ { }
+
+ void shoottv(machine_config &config);
+
+private:
+ void driver_init() override;
+ void video_start() override;
+
+ void update_interrupts(int vint, int xint, int qint) override;
+
+ void shoottv_map(address_map &map);
+
+ TIMER_CALLBACK_MEMBER(gun_interrupt);
+
+ required_ioport_array<3> m_buttons;
+ required_ioport m_dips;
+ required_ioport_array<2> m_gun_x;
+ required_ioport_array<2> m_gun_y;
+ optional_shared_ptr<u16> m_nvram_b;
+ emu_timer *m_gun_timer;
+};
+
#endif // MAME_INCLUDES_ITECH32_H
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 837c353b747..db8d28bc258 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -16994,6 +16994,7 @@ wcbowl16 // (c) 1995 Incredible Technologies
wcbowl161 // (c) 1995 Incredible Technologies
wcbowl165 // (c) 1995 Incredible Technologies
wcbowldx // (c) 1999 Incredible Technologies
+shoottv // (c) 199? Incredible Technologies
@source:itech8.cpp
arlingtn // (c) 1991 Strata/Incredible Technologies
diff --git a/src/mame/video/itech32.cpp b/src/mame/video/itech32.cpp
index 12110d7b368..ddf92bc72a7 100644
--- a/src/mame/video/itech32.cpp
+++ b/src/mame/video/itech32.cpp
@@ -208,6 +208,13 @@ void itech32_state::video_start()
save_pointer(NAME(m_videoram), VRAM_WIDTH * (m_vram_height + 16) * 2);
}
+void shoottv_state::video_start()
+{
+ itech32_state::video_start();
+ m_gun_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(shoottv_state::gun_interrupt),this));
+ m_gun_timer->adjust(m_screen->time_until_pos(0));
+}
+
/*************************************
@@ -375,6 +382,15 @@ TIMER_CALLBACK_MEMBER(itech32_state::scanline_interrupt)
}
+TIMER_CALLBACK_MEMBER(shoottv_state::gun_interrupt)
+{
+ s32 vpos = m_screen->vpos();
+ if ((vpos & 0x1f) == 0)
+ m_maincpu->set_input_line(5, ASSERT_LINE);
+ if ((vpos & 0x1f) == 16)
+ m_maincpu->set_input_line(6, ASSERT_LINE);
+ m_gun_timer->adjust(m_screen->time_until_pos((vpos + 1) % m_screen->height()));
+}
/*************************************
*
@@ -384,7 +400,9 @@ TIMER_CALLBACK_MEMBER(itech32_state::scanline_interrupt)
void itech32_state::draw_raw(u16 *base, u16 color)
{
- u8 *src = &m_grom[(m_grom_bank | ((VIDEO_TRANSFER_ADDRHI & 0xff) << 16) | VIDEO_TRANSFER_ADDRLO) % m_grom.length()];
+ u8* src = &m_grom[0];// m_grom[(m_grom_bank | ((VIDEO_TRANSFER_ADDRHI & 0xff) << 16) | VIDEO_TRANSFER_ADDRLO) % m_grom.length()];
+ const u32 grom_length = m_grom.length();
+ const u32 grom_base = m_grom_bank | ((VIDEO_TRANSFER_ADDRHI & 0xff) << 16) | VIDEO_TRANSFER_ADDRLO;
int transparent_pen = (VIDEO_TRANSFER_FLAGS & XFERFLAG_TRANSPARENT) ? 0xff : -1;
int width = VIDEO_TRANSFER_WIDTH << 8;
int height = ADJUSTED_HEIGHT(VIDEO_TRANSFER_HEIGHT) << 8;
@@ -413,7 +431,7 @@ void itech32_state::draw_raw(u16 *base, u16 color)
/* loop over Y in src pixels */
for (y = 0; y < height; y += ysrcstep, sy += ydststep)
{
- u8 *rowsrc = &src[(y >> 8) * (width >> 8)];
+ const u32 row_base = (y >> 8) * (width >> 8);
/* simpler case: VIDEO_YSTEP_PER_X is zero */
if (VIDEO_YSTEP_PER_X == 0)
@@ -436,7 +454,7 @@ void itech32_state::draw_raw(u16 *base, u16 color)
/* render middle pixels */
for ( ; x < width && sx < m_scaled_clip_rect.max_x; x += xsrcstep, sx += xdststep)
{
- int pixel = rowsrc[x >> 8];
+ int pixel = src[(grom_base + row_base + (x >> 8)) % grom_length];
if (pixel != transparent_pen)
base[(dstoffs + (sx >> 8)) & m_vram_mask] = pixel | color;
}
@@ -452,7 +470,7 @@ void itech32_state::draw_raw(u16 *base, u16 color)
/* render middle pixels */
for ( ; x < width && sx >= m_scaled_clip_rect.min_x; x += xsrcstep, sx += xdststep)
{
- int pixel = rowsrc[x >> 8];
+ int pixel = src[(grom_base + row_base + (x >> 8)) % grom_length];
if (pixel != transparent_pen)
base[(dstoffs + (sx >> 8)) & m_vram_mask] = pixel | color;
}
@@ -471,7 +489,7 @@ void itech32_state::draw_raw(u16 *base, u16 color)
for (x = 0; x < width && sx < m_scaled_clip_rect.max_x; x += xsrcstep, sx += xdststep, ty += ystep)
if (m_scaled_clip_rect.contains(sx, ty))
{
- int pixel = rowsrc[x >> 8];
+ int pixel = src[(grom_base + row_base + (x >> 8)) % grom_length];
if (pixel != transparent_pen)
base[compute_safe_address(sx >> 8, ty >> 8)] = pixel | color;
}