summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2017-06-07 18:54:17 +0200
committer Ivan Vangelista <mesgnet@yahoo.it>2017-06-07 18:54:17 +0200
commit7b2e155728f7725a0c62d9abb2b31be5a00eea91 (patch)
tree361552fef826b5b2a28f5f369c85c6f12a6c22ea
parentc2dfe876cec8323c06c23a0f983e068ad3d32aba (diff)
new working clone
--------------------------- Operation Thunderbolt (Japan, SC) [ShouTime, The Dumping Union]
-rw-r--r--src/mame/drivers/othunder.cpp82
-rw-r--r--src/mame/includes/othunder.h65
-rw-r--r--src/mame/mame.lst1
-rw-r--r--src/mame/video/othunder.cpp8
4 files changed, 99 insertions, 57 deletions
diff --git a/src/mame/drivers/othunder.cpp b/src/mame/drivers/othunder.cpp
index ee6c08facd2..40c47f16e00 100644
--- a/src/mame/drivers/othunder.cpp
+++ b/src/mame/drivers/othunder.cpp
@@ -114,7 +114,7 @@ Notes:
Operation Thunderbolt operates on hardware very similar to the Taito Z
system, in particular the game Spacegun. The lightgun hardware in these
-two (as well as the eerom and calibration process) looks identical.
+two (as well as the eeprom and calibration process) looks identical.
The game has 4 separate layers of graphics - one 64x64 tiled scrolling
background plane of 8x8 tiles, a similar foreground plane, a sprite plane,
@@ -280,7 +280,7 @@ TODO:
made by 16x8 tiles loses precision due to limitations of drawgfxzoom().
- Schematics show a OBPRI output to control sprite priority. This doesn't seem
- to be used however, and isn't hooked up. See othunder_TC0220IOC_w().
+ to be used however, and isn't hooked up. See tc0220ioc_w().
***************************************************************************/
@@ -302,7 +302,7 @@ TODO:
INTERRUPTS
***********************************************************/
-void othunder_state::update_irq( )
+void othunder_state::update_irq()
{
m_maincpu->set_input_line(6, m_ad_irq ? ASSERT_LINE : CLEAR_LINE);
m_maincpu->set_input_line(5, m_vblank_irq ? ASSERT_LINE : CLEAR_LINE);
@@ -352,7 +352,7 @@ The eeprom unlock command is different, and the write/clock/reset
bits are different.
******************************************************************/
-WRITE16_MEMBER(othunder_state::othunder_tc0220ioc_w)
+WRITE16_MEMBER(othunder_state::tc0220ioc_w)
{
if (ACCESSING_BITS_0_7)
{
@@ -392,7 +392,7 @@ WRITE16_MEMBER(othunder_state::othunder_tc0220ioc_w)
GAME INPUTS
**********************************************************/
-READ16_MEMBER(othunder_state::othunder_tc0220ioc_r)
+READ16_MEMBER(othunder_state::tc0220ioc_r)
{
switch (offset)
{
@@ -410,13 +410,13 @@ READ16_MEMBER(othunder_state::othunder_tc0220ioc_r)
#define P2Y_PORT_TAG "P2Y"
#define ROTARY_PORT_TAG "ROTARY"
-READ16_MEMBER(othunder_state::othunder_lightgun_r)
+READ16_MEMBER(othunder_state::lightgun_r)
{
static const char *const portname[4] = { P1X_PORT_TAG, P1Y_PORT_TAG, P2X_PORT_TAG, P2Y_PORT_TAG };
return ioport(portname[offset])->read();
}
-WRITE16_MEMBER(othunder_state::othunder_lightgun_w)
+WRITE16_MEMBER(othunder_state::lightgun_w)
{
/* A write starts the A/D conversion. An interrupt will be triggered when
the conversion is complete.
@@ -436,7 +436,7 @@ WRITE8_MEMBER(othunder_state::sound_bankswitch_w)
membank("z80bank")->set_entry(data & 3);
}
-WRITE16_MEMBER(othunder_state::othunder_sound_w)
+WRITE16_MEMBER(othunder_state::sound_w)
{
if (offset == 0)
m_tc0140syt->master_port_w(space, 0, data & 0xff);
@@ -444,7 +444,7 @@ WRITE16_MEMBER(othunder_state::othunder_sound_w)
m_tc0140syt->master_comm_w(space, 0, data & 0xff);
}
-READ16_MEMBER(othunder_state::othunder_sound_r)
+READ16_MEMBER(othunder_state::sound_r)
{
if (offset == 1)
return ((m_tc0140syt->master_comm_r(space, 0) & 0xff));
@@ -452,7 +452,7 @@ READ16_MEMBER(othunder_state::othunder_sound_r)
return 0;
}
-WRITE8_MEMBER(othunder_state::othunder_TC0310FAM_w)
+WRITE8_MEMBER(othunder_state::tc0310fam_w)
{
/* there are two TC0310FAM, one for CH1 and one for CH2 from the YM2610. The
PSG output is routed to both chips. */
@@ -488,15 +488,15 @@ WRITE8_MEMBER(othunder_state::othunder_TC0310FAM_w)
static ADDRESS_MAP_START( othunder_map, AS_PROGRAM, 16, othunder_state )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x080000, 0x08ffff) AM_RAM
- AM_RANGE(0x090000, 0x09000f) AM_READWRITE(othunder_tc0220ioc_r, othunder_tc0220ioc_w)
+ AM_RANGE(0x090000, 0x09000f) AM_READWRITE(tc0220ioc_r, tc0220ioc_w)
// AM_RANGE(0x090006, 0x090007) AM_WRITE(eeprom_w)
// AM_RANGE(0x09000c, 0x09000d) AM_WRITENOP /* ?? (keeps writing 0x77) */
AM_RANGE(0x100000, 0x100007) AM_DEVREADWRITE("tc0110pcr", tc0110pcr_device, word_r, step1_rbswap_word_w) /* palette */
AM_RANGE(0x200000, 0x20ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, word_r, word_w) /* tilemaps */
AM_RANGE(0x220000, 0x22000f) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, ctrl_word_r, ctrl_word_w)
- AM_RANGE(0x300000, 0x300003) AM_READWRITE(othunder_sound_r, othunder_sound_w)
+ AM_RANGE(0x300000, 0x300003) AM_READWRITE(sound_r, sound_w)
AM_RANGE(0x400000, 0x4005ff) AM_RAM AM_SHARE("spriteram")
- AM_RANGE(0x500000, 0x500007) AM_READWRITE(othunder_lightgun_r, othunder_lightgun_w)
+ AM_RANGE(0x500000, 0x500007) AM_READWRITE(lightgun_r, lightgun_w)
AM_RANGE(0x600000, 0x600003) AM_WRITE(irq_ack_w)
ADDRESS_MAP_END
@@ -510,7 +510,7 @@ static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8, othunder_state )
AM_RANGE(0xe000, 0xe003) AM_DEVREADWRITE("ymsnd", ym2610_device, read, write)
AM_RANGE(0xe200, 0xe200) AM_READNOP AM_DEVWRITE("tc0140syt", tc0140syt_device, slave_port_w)
AM_RANGE(0xe201, 0xe201) AM_DEVREADWRITE("tc0140syt", tc0140syt_device, slave_comm_r, slave_comm_w)
- AM_RANGE(0xe400, 0xe403) AM_WRITE(othunder_TC0310FAM_w) /* pan */
+ AM_RANGE(0xe400, 0xe403) AM_WRITE(tc0310fam_w) /* pan */
AM_RANGE(0xe600, 0xe600) AM_WRITENOP /* ? */
AM_RANGE(0xea00, 0xea00) AM_READ_PORT(ROTARY_PORT_TAG) /* rotary input */
AM_RANGE(0xee00, 0xee00) AM_WRITENOP /* ? */
@@ -618,6 +618,9 @@ static INPUT_PORTS_START( othundu )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Continue_Price ) ) /* see notes */
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x40, "Same as Start" )
+ PORT_DIPNAME( 0x80, 0x80, DEF_STR( Language ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( English ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( Japanese ) )
INPUT_PORTS_END
@@ -681,7 +684,7 @@ static MACHINE_CONFIG_START( othunder )
// MCFG_CPU_ADD("maincpu", M68000, 24000000/2 ) /* 12 MHz */
MCFG_CPU_ADD("maincpu", M68000, 13000000 ) /* fixes garbage graphics on startup */
MCFG_CPU_PROGRAM_MAP(othunder_map)
- MCFG_CPU_VBLANK_INT_DRIVER("screen", othunder_state, vblank_interrupt)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", othunder_state, vblank_interrupt)
MCFG_CPU_ADD("audiocpu", Z80,16000000/4 ) /* 4 MHz */
MCFG_CPU_PROGRAM_MAP(z80_sound_map)
@@ -702,7 +705,7 @@ static MACHINE_CONFIG_START( othunder )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
MCFG_SCREEN_SIZE(40*8, 32*8)
MCFG_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 2*8, 32*8-1)
- MCFG_SCREEN_UPDATE_DRIVER(othunder_state, screen_update_othunder)
+ MCFG_SCREEN_UPDATE_DRIVER(othunder_state, screen_update)
MCFG_SCREEN_PALETTE("palette")
MCFG_GFXDECODE_ADD("gfxdecode", "palette", othunder)
@@ -944,10 +947,47 @@ ROM_START( othunderj )
ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
ROM_END
+ROM_START( othunderjsc ) // SC stands for Shopping Center. It was put in a smaller, single player cabinet aimed at children
+ ROM_REGION( 0x80000, "maincpu", 0 ) /* 512K for 68000 code */
+ ROM_LOAD16_BYTE( "b67-24.ic63", 0x00000, 0x20000, CRC(18670e0b) SHA1(d848623046905471e3f859db6f179e1e4b3e4d51) ) // 27C1001
+ ROM_LOAD16_BYTE( "b67-25.ic64", 0x00001, 0x20000, CRC(3d422991) SHA1(22d18fdd9c4511774e0a4b246a293d27f7498735) ) // 27C1001
+ ROM_LOAD16_BYTE( "b67-14.ic61", 0x40000, 0x20000, CRC(7f3dd724) SHA1(2f2eeae0ee31e20082237b9a947c6848771eb73c) )
+ ROM_LOAD16_BYTE( "b67-15.ic62", 0x40001, 0x20000, CRC(e84f62d0) SHA1(3b4a55a14dee7d592467fde9a75bde64deabd27d) )
+
+ ROM_REGION( 0x10000, "audiocpu", 0 ) /* sound cpu */
+ ROM_LOAD( "b67-13.ic40", 0x00000, 0x10000, CRC(2936b4b1) SHA1(39b41643464dd89e456ab6eb15a0ff0aef30afde) )
+
+ ROM_REGION( 0x80000, "gfx1", 0 )
+ ROM_LOAD( "b67-06.ic66", 0x00000, 0x80000, CRC(b9a38d64) SHA1(7ae8165b444d9da6ccdbc4a769535bcbb6738aaa) ) /* SCN */
+ ROM_REGION( 0x200000, "gfx2", 0 )
+ ROM_LOAD32_BYTE( "b67-01.ic1", 0x00000, 0x80000, CRC(81ad9acb) SHA1(d9ad3f6332c6ca6b9872da57526a8158a3cf5b2f) ) /* OBJ: each rom has 1 bitplane, forming 16x8 tiles */
+ ROM_LOAD32_BYTE( "b67-02.ic2", 0x00001, 0x80000, CRC(c20cd2fb) SHA1(b015e1fe167e19826aa451b45cd143d66a6db83c) )
+ ROM_LOAD32_BYTE( "b67-03.ic3", 0x00002, 0x80000, CRC(bc9019ed) SHA1(7eddc83d71be97ce6637e6b35c226d58e6c39c3f) )
+ ROM_LOAD32_BYTE( "b67-04.ic4", 0x00003, 0x80000, CRC(2af4c8af) SHA1(b2ae7aad0c59ffc368811f4bd5546dbb6860f9a9) )
+
+ ROM_REGION16_LE( 0x80000, "user1", 0 )
+ ROM_LOAD16_WORD( "b67-05.ic43", 0x00000, 0x80000, CRC(9593e42b) SHA1(54b5538c302a1734ff4b752ab87a8c45d5c6b23d) ) /* index used to create 64x64 sprites on the fly */
+
+ ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
+ ROM_LOAD( "b67-08.ic67", 0x00000, 0x80000, CRC(458f41fb) SHA1(acca7c95acd1ae7a1cc51fb7fe644ad6d00ff5ac) )
+
+ ROM_REGION( 0x80000, "ymsnd.deltat", 0 ) /* Delta-T samples */
+ ROM_LOAD( "b67-07.ic44", 0x00000, 0x80000, CRC(4f834357) SHA1(f34705ce64870a8b24ec2639505079cc031fb719) )
+
+ ROM_REGION( 0x0800, "plds", 0 )
+ ROM_LOAD( "plhs18p8b-b67-09.ic15", 0x0000, 0x0149, CRC(62035487) SHA1(5d9538ea9eabff324d274772b1e1fc9a9aec9100) )
+ ROM_LOAD( "pal16l8a-b67-11.ic36", 0x0200, 0x0104, CRC(3177fb06) SHA1(c128277fe03342d9ec8da3c6e08a404a3f010547) )
+ ROM_LOAD( "pal20l8b-b67-12.ic37", 0x0400, 0x0144, CRC(a47c2798) SHA1(8c963efd416b3f6586cb12afb9417dc95c2bc574) )
+ ROM_LOAD( "pal20l8b-b67-10.ic33", 0x0600, 0x0144, CRC(4ced09c7) SHA1(519e6152cc5e4cb3ec24c4dc09101dddf22988aa) )
+
+ ROM_REGION16_BE( 0x80, "eeprom", 0 )
+ ROM_LOAD16_WORD( "93c46_eeprom-othunder.ic86", 0x0000, 0x0080, CRC(3729b844) SHA1(f6bb41d293d1e47214f8b2d147991404f3278ebf) )
+ROM_END
-GAME( 1988, othunder, 0, othunder, othunder, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation Japan", "Operation Thunderbolt (World, rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, othundero, othunder, othunder, othunder, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation Japan", "Operation Thunderbolt (World)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, othunderu, othunder, othunder, othundu, othunder_state, 0, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US, rev 1)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, othunderuo, othunder, othunder, othundu, othunder_state, 0, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US)", MACHINE_SUPPORTS_SAVE )
-GAME( 1988, othunderj, othunder, othunder, othundrj, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation", "Operation Thunderbolt (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, othunder, 0, othunder, othunder, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation Japan", "Operation Thunderbolt (World, rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, othundero, othunder, othunder, othunder, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation Japan", "Operation Thunderbolt (World)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, othunderu, othunder, othunder, othundu, othunder_state, 0, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US, rev 1)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, othunderuo, othunder, othunder, othundu, othunder_state, 0, ORIENTATION_FLIP_X, "Taito America Corporation", "Operation Thunderbolt (US)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, othunderj, othunder, othunder, othundrj, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation", "Operation Thunderbolt (Japan)", MACHINE_SUPPORTS_SAVE )
+GAME( 1988, othunderjsc, othunder, othunder, othundrj, othunder_state, 0, ORIENTATION_FLIP_X, "Taito Corporation", "Operation Thunderbolt (Japan, SC)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/othunder.h b/src/mame/includes/othunder.h
index ca08f6606c3..16254afdb11 100644
--- a/src/mame/includes/othunder.h
+++ b/src/mame/includes/othunder.h
@@ -14,17 +14,6 @@
#include "video/tc0110pcr.h"
-struct othunder_tempsprite
-{
- int gfx;
- int code,color;
- int flipx,flipy;
- int x,y;
- int zoomx,zoomy;
- int primask;
-};
-
-
class othunder_state : public driver_device
{
public:
@@ -52,11 +41,43 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette") { }
+ DECLARE_WRITE16_MEMBER(irq_ack_w);
+ DECLARE_WRITE16_MEMBER(tc0220ioc_w);
+ DECLARE_READ16_MEMBER(tc0220ioc_r);
+ DECLARE_READ16_MEMBER(lightgun_r);
+ DECLARE_WRITE16_MEMBER(lightgun_w);
+ DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
+ DECLARE_WRITE16_MEMBER(sound_w);
+ DECLARE_READ16_MEMBER(sound_r);
+ DECLARE_WRITE8_MEMBER(tc0310fam_w);
+ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+ INTERRUPT_GEN_MEMBER(vblank_interrupt);
+
+protected:
+ virtual void machine_start() override;
+ virtual void machine_reset() override;
+ virtual void video_start() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+
+private:
+ void update_irq();
+ void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int y_offs);
+
/* memory pointers */
required_shared_ptr<uint16_t> m_spriteram;
/* video-related */
- std::unique_ptr<othunder_tempsprite[]> m_spritelist;
+ struct tempsprite
+ {
+ int gfx;
+ int code,color;
+ int flipx,flipy;
+ int x,y;
+ int zoomx,zoomy;
+ int primask;
+ };
+
+ std::unique_ptr<tempsprite[]> m_spritelist;
/* misc */
int m_vblank_irq;
@@ -80,24 +101,4 @@ public:
required_device<filter_volume_device> m_2610_2r;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
-
- DECLARE_WRITE16_MEMBER(irq_ack_w);
- DECLARE_WRITE16_MEMBER(othunder_tc0220ioc_w);
- DECLARE_READ16_MEMBER(othunder_tc0220ioc_r);
- DECLARE_READ16_MEMBER(othunder_lightgun_r);
- DECLARE_WRITE16_MEMBER(othunder_lightgun_w);
- DECLARE_WRITE8_MEMBER(sound_bankswitch_w);
- DECLARE_WRITE16_MEMBER(othunder_sound_w);
- DECLARE_READ16_MEMBER(othunder_sound_r);
- DECLARE_WRITE8_MEMBER(othunder_TC0310FAM_w);
- virtual void machine_start() override;
- virtual void machine_reset() override;
- virtual void video_start() override;
- uint32_t screen_update_othunder(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(vblank_interrupt);
- void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int y_offs );
- void update_irq();
-
-protected:
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
};
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 5cefa6f1481..f47f531a836 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -29725,6 +29725,7 @@ othello // (c) 1984 Success.
@source:othunder.cpp
othunder // B67 (c) 1988 Taito Corporation Japan (World, rev 1)
othunderj // B67 (c) 1988 Taito Corporation (Japan)
+othunderjsc // B67 (c) 1988 Taito Corporation (Japan)
othundero // B67 (c) 1988 Taito Corporation Japan (World)
othunderu // B67 (c) 1988 Taito America Corporation (US, rev 1)
othunderuo // B67 (c) 1988 Taito America Corporation (US)
diff --git a/src/mame/video/othunder.cpp b/src/mame/video/othunder.cpp
index 0717e7388ad..240ee985b05 100644
--- a/src/mame/video/othunder.cpp
+++ b/src/mame/video/othunder.cpp
@@ -10,7 +10,7 @@ void othunder_state::video_start()
/* Up to $800/8 big sprites, requires 0x100 * sizeof(*spritelist)
Multiply this by 32 to give room for the number of small sprites,
which are what actually get put in the structure. */
- m_spritelist = std::make_unique<othunder_tempsprite[]>(0x2000);
+ m_spritelist = std::make_unique<tempsprite[]>(0x2000);
}
@@ -64,7 +64,7 @@ spriteram is being tested, take no notice of that.]
********************************************************/
-void othunder_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int y_offs )
+void othunder_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int y_offs)
{
uint16_t *spritemap = (uint16_t *)memregion("user1")->base();
uint16_t tile_mask = (m_gfxdecode->gfx(0)->elements()) - 1;
@@ -78,7 +78,7 @@ void othunder_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap,
/* pdrawgfx() needs us to draw sprites front to back, so we have to build a list
while processing sprite ram and then draw them all at the end */
- struct othunder_tempsprite *sprite_ptr = m_spritelist.get();
+ struct tempsprite *sprite_ptr = m_spritelist.get();
for (offs = (m_spriteram.bytes() / 2) - 4; offs >= 0; offs -= 4)
{
@@ -200,7 +200,7 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
SCREEN REFRESH
**************************************************************/
-uint32_t othunder_state::screen_update_othunder(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t othunder_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int layer[3];