mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
(from Bryan McPhail) adds Chase Bombers to undrfire.c, not working properly.
This commit is contained in:
parent
52f6db9e2b
commit
d332b5c542
@ -1,10 +1,11 @@
|
||||
/***************************************************************************
|
||||
|
||||
Underfire (c) 1993 Taito
|
||||
Chase Bombers (c) 1994 Taito
|
||||
|
||||
Driver by Bryan McPhail & David Graves.
|
||||
|
||||
Board Info:
|
||||
Board Info (Underfire):
|
||||
|
||||
TC0470LIN : ?
|
||||
TC0480SCP : known tilemap chip
|
||||
@ -115,6 +116,74 @@ calculations when it needs to, so to provide an artificial target we
|
||||
need to reproduce the $18141a calculations.
|
||||
|
||||
|
||||
Info (Chase Bombers)
|
||||
|
||||
Chase Bombers
|
||||
Taito, 1994
|
||||
|
||||
Runs on hardware similar to Ground Effects
|
||||
|
||||
|
||||
PCB Layout
|
||||
----------
|
||||
|
||||
MAIN PCB-D
|
||||
K1100809A
|
||||
J1100342A
|
||||
|----------------------------------------------------------------------------------------------|
|
||||
| C5 C6 SMC_COM20020 LANOUT|
|
||||
| 68EC020 61256 68EC000 61256 68EC000 61256 MB8421 |
|
||||
| 61256 61256 61256 LANIN |
|
||||
| 61256 61256 PAL |
|
||||
| 61256 PAL 61256 PAL |
|
||||
| PAL PAL MB8421 |
|
||||
| 40MHz |
|
||||
| MC68681 |
|
||||
| TC511664-80 MB3771 |
|
||||
| P1|
|
||||
| MACH120 MACH120 |
|
||||
| ENSONIC 30.4761MHz 16MHz ADC0809 |
|
||||
| ESP-R6 |
|
||||
| ENSONIC |
|
||||
| ENSONIC 5701 DSW1(8) TC0510NIO |
|
||||
| OTIS-R2 Z|
|
||||
| 93C46 |
|
||||
| C3 C4 |
|
||||
| |
|
||||
| 61256 |-|
|
||||
| 61256 |
|
||||
| |-|
|
||||
| TC0480SCP TC0620SCC TC0360PRI |
|
||||
| |
|
||||
| TC0650FDA |
|
||||
| 2018 61256 |
|
||||
| 61256 |
|
||||
| 2018 2088 61256 61256 G|
|
||||
| 61256 TC0580PIV |
|
||||
| 2018 2088 |
|
||||
| |
|
||||
| 2018 TL074 TL074 TDA1543 |
|
||||
| TC0570SPC TC0470LIN 514256 514256 |
|
||||
| 2018 514256 514256 TA8221 TD62064 |-|
|
||||
| 514256 514256 TD62064 |
|
||||
| 2018 MB87078 TD62064 |-|
|
||||
| C1 C2 |
|
||||
|----------------------------------------------------------------------------------------------|
|
||||
Notes:
|
||||
ROM board plugs into C* connectors
|
||||
No clocks for now, PCB has light corrosion and will need extensive cleaning before it can be powered up.
|
||||
|
||||
ROM Board
|
||||
---------
|
||||
|
||||
PCB Numbers - ROM.PCB
|
||||
K9100508A
|
||||
J9100367A
|
||||
|
||||
Board contains only 29 ROMs and not much else.
|
||||
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
@ -129,6 +198,7 @@ need to reproduce the $18141a calculations.
|
||||
|
||||
VIDEO_START( undrfire );
|
||||
VIDEO_UPDATE( undrfire );
|
||||
VIDEO_UPDATE( cbombers );
|
||||
|
||||
static UINT16 coin_word;
|
||||
static UINT16 port_sel = 0;
|
||||
@ -136,7 +206,7 @@ extern UINT16 undrfire_rotate_ctrl[8];
|
||||
static int frame_counter=0;
|
||||
|
||||
static UINT32 *undrfire_ram; /* will be read in video for gun target calcs */
|
||||
|
||||
static UINT32 *shared_ram;
|
||||
|
||||
/***********************************************************
|
||||
COLOR RAM
|
||||
@ -272,6 +342,29 @@ static WRITE32_HANDLER( undrfire_input_w )
|
||||
}
|
||||
|
||||
|
||||
static READ16_HANDLER( shared_ram_r )
|
||||
{
|
||||
if ((offset&1)==0) return (shared_ram[offset/2]&0xffff0000)>>16;
|
||||
return (shared_ram[offset/2]&0x0000ffff);
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( shared_ram_w )
|
||||
{
|
||||
if ((offset&1)==0) {
|
||||
if (ACCESSING_BYTE_1)
|
||||
shared_ram[offset/2]=(shared_ram[offset/2]&0x00ffffff)|((data&0xff00)<<16);
|
||||
if (ACCESSING_BYTE_0)
|
||||
shared_ram[offset/2]=(shared_ram[offset/2]&0xff00ffff)|((data&0x00ff)<<16);
|
||||
} else {
|
||||
if (ACCESSING_BYTE_1)
|
||||
shared_ram[offset/2]=(shared_ram[offset/2]&0xffff00ff)|((data&0xff00)<< 0);
|
||||
if (ACCESSING_BYTE_0)
|
||||
shared_ram[offset/2]=(shared_ram[offset/2]&0xffffff00)|((data&0x00ff)<< 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Some unknown hardware byte mapped at $600002-5 */
|
||||
|
||||
static READ32_HANDLER( unknown_hardware_r )
|
||||
@ -367,6 +460,10 @@ static WRITE32_HANDLER( motor_control_w )
|
||||
*/
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( cbombers_cpua_ctrl_w )
|
||||
{
|
||||
cpunum_set_input_line(machine, 2, INPUT_LINE_RESET, (data &0x1000) ? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
MEMORY STRUCTURES
|
||||
@ -410,6 +507,70 @@ static ADDRESS_MAP_START( undrfire_writemem, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( cbombers_readmem, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x000000, 0x1fffff) AM_READ(SMH_ROM)
|
||||
AM_RANGE(0x200000, 0x21ffff) AM_READ(SMH_RAM) /* main CPUA ram */
|
||||
AM_RANGE(0x300000, 0x303fff) AM_READ(SMH_RAM) /* Sprite ram */
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_READ(TC0480SCP_long_r)
|
||||
AM_RANGE(0x830000, 0x83002f) AM_READ(TC0480SCP_ctrl_long_r)
|
||||
// AM_RANGE(0x340000, 0x340003) AM_READ(superchs_stick_r) /* stick coord read */
|
||||
|
||||
AM_RANGE(0x500000, 0x500007) AM_READ(undrfire_input_r)
|
||||
AM_RANGE(0xc00000, 0xc00007) AM_READ(undrfire_input_r)
|
||||
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_READ(SMH_RAM) /* Sound shared ram */
|
||||
|
||||
AM_RANGE(0x900000, 0x90ffff) AM_READ(SMH_RAM)
|
||||
AM_RANGE(0xa00000, 0xa0ffff) AM_READ(SMH_RAM) /* Palette ram */
|
||||
AM_RANGE(0xe00000, 0xe0ffff) AM_READ(SMH_RAM) /* Shared ram */
|
||||
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cbombers_writemem, ADDRESS_SPACE_PROGRAM, 32 )
|
||||
AM_RANGE(0x000000, 0x1fffff) AM_WRITE(SMH_ROM)
|
||||
AM_RANGE(0x200000, 0x21ffff) AM_WRITE(SMH_RAM)// AM_BASE(&superchs_ram)
|
||||
AM_RANGE(0x300000, 0x303fff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram32) AM_SIZE(&spriteram_size)
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_WRITE(TC0480SCP_long_w)
|
||||
AM_RANGE(0x830000, 0x83002f) AM_WRITE(TC0480SCP_ctrl_long_w)
|
||||
|
||||
AM_RANGE(0x900000, 0x90ffff) AM_WRITE(TC0100SCN_long_w) /* piv tilemaps */
|
||||
AM_RANGE(0x920000, 0x92000f) AM_WRITE(TC0100SCN_ctrl_long_w)
|
||||
|
||||
AM_RANGE(0x400000, 0x400003) AM_WRITE(cbombers_cpua_ctrl_w)
|
||||
AM_RANGE(0x2c0000, 0x2c07ff) AM_WRITE(SMH_RAM) AM_BASE(&f3_shared_ram)
|
||||
// AM_RANGE(0x340000, 0x340003) AM_WRITE(superchs_stick_w) /* stick int request */
|
||||
|
||||
// AM_RANGE(0x500000, 0x500003) AM_WRITE(MWA32_NOP)
|
||||
AM_RANGE(0x500000, 0x500007) AM_WRITE(undrfire_input_w) /* eerom etc. */
|
||||
|
||||
// AM_RANGE(0x600000, 0x600007) AM_WRITE(unknown_int_req_w) /* int request for unknown hardware */
|
||||
|
||||
AM_RANGE(0x700000, 0x7007ff) AM_WRITE(SMH_RAM) AM_BASE(&f3_shared_ram)
|
||||
|
||||
AM_RANGE(0x900000, 0x90ffff) AM_WRITE(SMH_RAM)
|
||||
AM_RANGE(0xa00000, 0xa0ffff) AM_WRITE(color_ram_w) AM_BASE(&paletteram32)
|
||||
AM_RANGE(0xe00000, 0xe0ffff) AM_WRITE(SMH_RAM) AM_BASE(&shared_ram)
|
||||
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cbombers_cpub_readmem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_READ(SMH_ROM)
|
||||
AM_RANGE(0x400000, 0x40ffff) AM_READ(SMH_RAM) /* local ram */
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_READ(shared_ram_r)
|
||||
// AM_RANGE(0xa00000, 0xa001ff) AM_READ(SMH_RAM)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( cbombers_cpub_writemem, ADDRESS_SPACE_PROGRAM, 16 )
|
||||
AM_RANGE(0x000000, 0x03ffff) AM_WRITE(SMH_ROM)
|
||||
AM_RANGE(0x400000, 0x40ffff) AM_WRITE(SMH_RAM)
|
||||
// AM_RANGE(0x600000, 0x60ffff) AM_WRITE(TC0480SCP_word_w) /* Only written upon errors */
|
||||
AM_RANGE(0x800000, 0x80ffff) AM_WRITE(shared_ram_w)
|
||||
// AM_RANGE(0xa00000, 0xa001ff) AM_WRITE(SMH_RAM) /* Extra road control?? */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
|
||||
/***********************************************************
|
||||
INPUT PORTS (dips in eprom)
|
||||
***********************************************************/
|
||||
@ -483,6 +644,74 @@ INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
static INPUT_PORTS_START( cbombers )
|
||||
PORT_START_TAG("IN0")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) /* ? where is freeze input */
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // Nitro
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) // Shift
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // Accel
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // Brake
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START_TAG("IN1")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Frame counter */
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* reserved for EEROM */
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START_TAG("IN2")
|
||||
PORT_SERVICE_NO_TOGGLE(0x01, IP_ACTIVE_LOW)
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
/* Gun inputs (real range is 0-0xffff: we use standard 0-255 and shift later) */
|
||||
|
||||
PORT_START_TAG("IN3") /* IN 3, P1X */
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(25) PORT_REVERSE PORT_PLAYER(1)
|
||||
|
||||
PORT_START_TAG("IN4") /* IN 4, P1Y */
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(25) PORT_PLAYER(1)
|
||||
|
||||
PORT_START_TAG("IN5") /* IN 5, P2X */
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(25) PORT_REVERSE PORT_PLAYER(2)
|
||||
|
||||
PORT_START_TAG("IN6") /* IN 6, P2Y */
|
||||
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(25) PORT_PLAYER(2)
|
||||
|
||||
PORT_START_TAG("FAKE")
|
||||
PORT_BIT( 0x01, 0x00, IPT_DIPSWITCH_NAME ) PORT_NAME("Show gun target") PORT_CODE(KEYCODE_F1) PORT_TOGGLE
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
||||
PORT_DIPSETTING( 0x01, DEF_STR( Yes ) )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
/**********************************************************
|
||||
GFX DECODING
|
||||
**********************************************************/
|
||||
@ -527,6 +756,11 @@ static GFXDECODE_START( undrfire )
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0x0, pivlayout, 0, 512 )
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( cbombers )
|
||||
GFXDECODE_ENTRY( REGION_GFX2, 0x0, tile16x16_layout, 0, 512 )
|
||||
GFXDECODE_ENTRY( REGION_GFX1, 0x0, charlayout, 0x1000, 512 )
|
||||
GFXDECODE_ENTRY( REGION_GFX3, 0x0, pivlayout, 0, 512 )
|
||||
GFXDECODE_END
|
||||
|
||||
/***********************************************************
|
||||
MACHINE DRIVERS
|
||||
@ -577,6 +811,43 @@ static MACHINE_DRIVER_START( undrfire )
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( cbombers )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD(M68EC020, 16000000) /* 16 MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(cbombers_readmem, cbombers_writemem)
|
||||
MDRV_CPU_VBLANK_INT("main", irq4_line_hold)
|
||||
|
||||
TAITO_F3_SOUND_SYSTEM_CPU(16000000)
|
||||
|
||||
MDRV_CPU_ADD(M68000, 16000000) /* 16 MHz */
|
||||
MDRV_CPU_PROGRAM_MAP(cbombers_cpub_readmem, cbombers_cpub_writemem)
|
||||
MDRV_CPU_VBLANK_INT("main", irq4_line_hold)
|
||||
|
||||
MDRV_INTERLEAVE(8) /* CPU slices - Need to interleave Cpu's 1 & 3 */
|
||||
|
||||
MDRV_MACHINE_RESET(undrfire)
|
||||
MDRV_NVRAM_HANDLER(undrfire)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_SCREEN_ADD("main", RASTER)
|
||||
MDRV_SCREEN_REFRESH_RATE(60)
|
||||
MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
|
||||
MDRV_SCREEN_SIZE(40*8, 32*8)
|
||||
MDRV_SCREEN_VISIBLE_AREA(0, 40*8-1, 3*8, 32*8-1)
|
||||
|
||||
|
||||
MDRV_GFXDECODE(cbombers)
|
||||
MDRV_PALETTE_LENGTH(16384)
|
||||
|
||||
MDRV_VIDEO_START(undrfire)
|
||||
MDRV_VIDEO_UPDATE(cbombers)
|
||||
|
||||
/* sound hardware */
|
||||
TAITO_F3_SOUND_SYSTEM_ES5505(13343000)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DRIVERS
|
||||
@ -691,6 +962,58 @@ ROM_START( undrfirj )
|
||||
ROM_LOAD16_BYTE( "d67-02", 0xc00000, 0x200000, CRC(fceb715e) SHA1(9326513acb0696669d4f2345649ab37c8c6ed171) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( cbombers )
|
||||
ROM_REGION( 0x200000, REGION_CPU1, 0 ) /* 2048K for 68020 code (CPU A) */
|
||||
ROM_LOAD32_BYTE( "d83_39.ic17", 0x00000, 0x80000, CRC(b9f48284) SHA1(acc5d412e8900dda483a89a1ac1febd6d5735f3c) )
|
||||
ROM_LOAD32_BYTE( "d83_41.ic4", 0x00001, 0x80000, CRC(a2f4c8be) SHA1(0f8f3b5ecff34d8c35af1ab11bb5528b52e30109) )
|
||||
ROM_LOAD32_BYTE( "d83_40.ic3", 0x00002, 0x80000, CRC(b05f59ea) SHA1(e46a31737f44be2a3d478b8010fe0d6383290e03) )
|
||||
ROM_LOAD32_BYTE( "d83_38.ic16", 0x00003, 0x80000, CRC(0a10616c) SHA1(c9cfc8c870f8a989f004d2db4f6fb76e5b7b7f9b) )
|
||||
|
||||
ROM_REGION( 0x140000, REGION_CPU2, 0 ) /* Sound cpu */
|
||||
ROM_LOAD16_BYTE( "d83_26.ic37", 0x100000, 0x20000, CRC(4f49b484) SHA1(96daa3cb7fa4aae3aedc91ec27d85945311dfcc9) )
|
||||
ROM_LOAD16_BYTE( "d83_27.ic38", 0x100001, 0x20000, CRC(2aa1a237) SHA1(b809f75bbbbb4eb5d0df725aaa31aae8a6fba552) )
|
||||
|
||||
ROM_REGION( 0x40000, REGION_CPU3, 0 ) /* 256K for 68000 code (CPU B) */
|
||||
ROM_LOAD16_BYTE( "d83_28.ic26", 0x00001, 0x20000, CRC(06328ef7) SHA1(90a14649e56221e47b87958896f6eae4556265c2) )
|
||||
ROM_LOAD16_BYTE( "d83_29.ic27", 0x00000, 0x20000, CRC(771b4080) SHA1(a47c3a6abc07a6a61b694d32baa0ad4c25045841) )
|
||||
|
||||
ROM_REGION( 0x400000, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD16_BYTE( "d83_04.ic8", 0x000000, 0x200000, CRC(79f36cce) SHA1(2c8dc4cd5c4aa335c1e45888f5947acf94fa628a) )
|
||||
ROM_LOAD16_BYTE( "d83_05.ic7", 0x000001, 0x200000, CRC(7787e495) SHA1(1758de5fdd1d12727368d08d7d4752c3756fc23e) )
|
||||
|
||||
ROM_REGION( 0x1800000, REGION_GFX2, ROMREGION_DISPOSE )
|
||||
ROM_LOAD32_BYTE( "d83_06.ic28", 0x000003, 0x200000, CRC(4b71944e) SHA1(e8ed190280c7378fb4edcb192cef0d4d62582ad5) )
|
||||
ROM_LOAD32_BYTE( "d83_07.ic30", 0x000002, 0x200000, CRC(29861b61) SHA1(76562b0243c1bc38623c0ef9d20de7572a979e37) )
|
||||
ROM_LOAD32_BYTE( "d83_08.ic32", 0x000001, 0x200000, CRC(a0e81e01) SHA1(96ad8cfc849caaf85350cfc7cf23ad23635a3813) )
|
||||
ROM_LOAD32_BYTE( "d83_09.ic45", 0x000000, 0x200000, CRC(7e4dec50) SHA1(4d8c1be739d425d8ded07774094b775f35a915bf) )
|
||||
ROM_LOAD32_BYTE( "d83_11.ic41", 0x800003, 0x100000, CRC(a790e490) SHA1(9c57405ef2ef3368eb0958a3e43601110c1cc90d) )
|
||||
ROM_LOAD32_BYTE( "d83_12.ic29", 0x800002, 0x100000, CRC(2f237b0d) SHA1(2ecb947671d263a77510bfebda03f883b55b8df4) )
|
||||
ROM_LOAD32_BYTE( "d83_13.ic31", 0x800001, 0x100000, CRC(c2cceeb6) SHA1(3ec932655326caed13a40394bbf8e8baf836de2a) )
|
||||
ROM_LOAD32_BYTE( "d83_14.ic44", 0x800000, 0x100000, CRC(8b6f4f12) SHA1(6a28004d287f00627622376aa3d6704f2684a6f3) )
|
||||
ROM_LOAD32_BYTE( "d83_10.ic43", 0xc00000, 0x200000, CRC(36c440a0) SHA1(31685d3cdf4e39e1365df7e6a588c28f95d7e0a8) )
|
||||
ROM_LOAD32_BYTE( "d83_15.ic42", 0x1400000, 0x100000, CRC(1b71175e) SHA1(60ad38ce97fd7995ff2f29d6b1a3b873dc2f0eb3) )
|
||||
|
||||
ROM_REGION( 0x400000, REGION_GFX3, ROMREGION_DISPOSE )
|
||||
ROM_LOAD16_BYTE( "d83_16.ic19", 0x000000, 0x100000, CRC(d364cf1e) SHA1(ee43f50edf50ec840acfb98b1314140ee9693839) )
|
||||
ROM_LOAD16_BYTE( "d83_17.ic5", 0x000001, 0x100000, CRC(0ffe737c) SHA1(5923a4edf9d0c8339f793840c2bdc691e2c651e6) )
|
||||
ROM_LOAD ( "d83_18.ic6", 0x300000, 0x100000, CRC(87979155) SHA1(0ffafa970f9f9c98f8938104b97e63d2b5757804) )
|
||||
ROM_FILL ( 0x200000, 0x100000, 0 )
|
||||
|
||||
ROM_REGION16_LE( 0x80000, REGION_USER1, 0 )
|
||||
ROM_LOAD16_BYTE( "d83_31.ic10", 0x000001, 0x40000, CRC(85c37961) SHA1(15ea5c4904d910575e984e146c8941dff913d45f) )
|
||||
ROM_LOAD16_BYTE( "d83_32.ic11", 0x000000, 0x40000, CRC(b0db2559) SHA1(2bfae2dbe164b42e95d0a93fab82b7040c3fbc56) )
|
||||
|
||||
ROM_REGION( 0x40000, REGION_USER2, 0 )
|
||||
ROM_LOAD( "d83_30.ic9", 0x00000, 0x40000, CRC(eb86dc67) SHA1(31c7b6f30ff912fafed4b87ce8bf603ee17d1664) )
|
||||
|
||||
ROM_REGION16_BE( 0x1000000, REGION_SOUND1 , ROMREGION_ERASE00 )
|
||||
ROM_LOAD16_BYTE( "d83_01.ic40", 0xc00000, 0x200000, CRC(912799f4) SHA1(22f69e61519d2cddcfc4e4c9601e78a9d5265d5b) )
|
||||
ROM_LOAD16_BYTE( "d83_02.ic39", 0x000000, 0x200000, CRC(2abca020) SHA1(3491a95651ca89b7fe6d040b8576fa7646bfe84b) )
|
||||
ROM_RELOAD ( 0x400000, 0x200000 )
|
||||
ROM_LOAD16_BYTE( "d83_03.ic18", 0x800000, 0x200000, CRC(1b2d9ec3) SHA1(ead6b5542ad3987ef0f9ea01ce7f960abc9119b3) )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
static READ32_HANDLER( main_cycle_r )
|
||||
{
|
||||
@ -737,6 +1060,38 @@ static DRIVER_INIT( undrfire )
|
||||
}
|
||||
|
||||
|
||||
static DRIVER_INIT( cbombers )
|
||||
{
|
||||
UINT32 offset,i;
|
||||
UINT8 *gfx = memory_region(REGION_GFX3);
|
||||
int size=memory_region_length(REGION_GFX3);
|
||||
int data;
|
||||
|
||||
|
||||
/* make piv tile GFX format suitable for gfxdecode */
|
||||
offset = size/2;
|
||||
for (i = size/2+size/4; i<size; i++)
|
||||
{
|
||||
int d1,d2,d3,d4;
|
||||
|
||||
/* Expand 2bits into 4bits format */
|
||||
data = gfx[i];
|
||||
d1 = (data>>0) & 3;
|
||||
d2 = (data>>2) & 3;
|
||||
d3 = (data>>4) & 3;
|
||||
d4 = (data>>6) & 3;
|
||||
|
||||
gfx[offset] = (d1<<2) | (d2<<6);
|
||||
offset++;
|
||||
|
||||
gfx[offset] = (d3<<2) | (d4<<6);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
GAME( 1993, undrfire, 0, undrfire, undrfire, undrfire, ROT0, "Taito Corporation Japan", "Under Fire (World)", 0 )
|
||||
GAME( 1993, undrfiru, undrfire, undrfire, undrfire, undrfire, ROT0, "Taito America Corporation", "Under Fire (US)", 0 )
|
||||
GAME( 1993, undrfirj, undrfire, undrfire, undrfire, undrfire, ROT0, "Taito Corporation", "Under Fire (Japan)", 0 )
|
||||
GAME( 1994, cbombers, 0, cbombers, cbombers, cbombers, ROT0, "Taito Corporation", "Chase Bombers", GAME_NOT_WORKING )
|
||||
|
@ -1855,6 +1855,7 @@ const game_driver * const drivers[] =
|
||||
DRIVER( undrfire ) /* D67 (c) 1993 Taito Coporation Japan (World) */
|
||||
DRIVER( undrfiru ) /* D67 (c) 1993 Taito America Corporation (US) */
|
||||
DRIVER( undrfirj ) /* D67 (c) 1993 Taito Coporation (Japan) */
|
||||
DRIVER( cbombers )
|
||||
|
||||
/* Taito F2 games */
|
||||
DRIVER( finalb ) /* B82 (c) 1988 Taito Corporation Japan (World) */
|
||||
|
@ -223,6 +223,152 @@ logerror("Sprite number %04x had %02x invalid chunks\n",tilenum,bad_chunks);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void draw_sprites_cbombers(running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect,const int *primasks,int x_offs,int y_offs)
|
||||
{
|
||||
UINT16 *spritemap = (UINT16 *)memory_region(REGION_USER1);
|
||||
UINT8 *spritemapHibit = (UINT8 *)memory_region(REGION_USER2);
|
||||
|
||||
int offs, data, tilenum, color, flipx, flipy;
|
||||
int x, y, priority, dblsize, curx, cury;
|
||||
int sprites_flipscreen = 0;
|
||||
int zoomx, zoomy, zx, zy;
|
||||
int sprite_chunk,map_offset,code,j,k,px,py;
|
||||
int dimension,total_chunks;
|
||||
|
||||
/* 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 tempsprite *sprite_ptr = spritelist;
|
||||
|
||||
for (offs = (spriteram_size/4-4);offs >= 0;offs -= 4)
|
||||
{
|
||||
data = spriteram32[offs+0];
|
||||
flipx = (data & 0x00800000) >> 23;
|
||||
zoomx = (data & 0x007f0000) >> 16;
|
||||
tilenum = (data & 0x00007fff);
|
||||
|
||||
data = spriteram32[offs+2];
|
||||
priority = (data & 0x000c0000) >> 18;
|
||||
color = (data & 0x0003fc00) >> 10;
|
||||
x = (data & 0x000003ff);
|
||||
|
||||
data = spriteram32[offs+3];
|
||||
dblsize = (data & 0x00040000) >> 18;
|
||||
flipy = (data & 0x00020000) >> 17;
|
||||
zoomy = (data & 0x0001fc00) >> 10;
|
||||
y = (data & 0x000003ff);
|
||||
|
||||
color |= (/*0x100 +*/ (priority << 6)); /* priority bits select color bank */
|
||||
|
||||
color /= 2; /* as sprites are 5bpp */
|
||||
flipy = !flipy;
|
||||
// y = (-y &0x3ff);
|
||||
|
||||
if (!tilenum) continue;
|
||||
|
||||
// flipy = !flipy;
|
||||
zoomx += 1;
|
||||
zoomy += 1;
|
||||
|
||||
y += y_offs;
|
||||
|
||||
/* treat coords as signed */
|
||||
if (x>0x340) x -= 0x400;
|
||||
if (y>0x340) y -= 0x400;
|
||||
|
||||
x -= x_offs;
|
||||
|
||||
dimension = ((dblsize*2) + 2); // 2 or 4
|
||||
total_chunks = ((dblsize*3) + 1) << 2; // 4 or 16
|
||||
map_offset = tilenum << 2;
|
||||
|
||||
{
|
||||
for (sprite_chunk=0;sprite_chunk<total_chunks;sprite_chunk++)
|
||||
{
|
||||
j = sprite_chunk / dimension; /* rows */
|
||||
k = sprite_chunk % dimension; /* chunks per row */
|
||||
|
||||
px = k;
|
||||
py = j;
|
||||
/* pick tiles back to front for x and y flips */
|
||||
if (flipx) px = dimension-1-k;
|
||||
if (flipy) py = dimension-1-j;
|
||||
|
||||
code = spritemap[map_offset + px + (py<<(dblsize+1))];
|
||||
|
||||
if (spritemapHibit)
|
||||
{
|
||||
code|=spritemapHibit[map_offset + px + (py<<(dblsize+1))] << 16;
|
||||
|
||||
//if (spritemapHibit[map_offset + px + (py<<(dblsize+1))])
|
||||
//color=mame_rand(machine);
|
||||
}
|
||||
|
||||
curx = x + ((k*zoomx)/dimension);
|
||||
cury = y + ((j*zoomy)/dimension);
|
||||
|
||||
zx= x + (((k+1)*zoomx)/dimension) - curx;
|
||||
zy= y + (((j+1)*zoomy)/dimension) - cury;
|
||||
|
||||
if (sprites_flipscreen)
|
||||
{
|
||||
/* -zx/y is there to fix zoomed sprite coords in screenflip.
|
||||
drawgfxzoom does not know to draw from flip-side of sprites when
|
||||
screen is flipped; so we must correct the coords ourselves. */
|
||||
|
||||
curx = 320 - curx - zx;
|
||||
cury = 256 - cury - zy;
|
||||
flipx = !flipx;
|
||||
flipy = !flipy;
|
||||
}
|
||||
|
||||
sprite_ptr->gfx = 0;
|
||||
sprite_ptr->code = code;
|
||||
sprite_ptr->color = color;
|
||||
sprite_ptr->flipx = !flipx;
|
||||
sprite_ptr->flipy = flipy;
|
||||
sprite_ptr->x = curx;
|
||||
sprite_ptr->y = cury;
|
||||
sprite_ptr->zoomx = zx << 12;
|
||||
sprite_ptr->zoomy = zy << 12;
|
||||
|
||||
if (primasks)
|
||||
{
|
||||
sprite_ptr->primask = primasks[priority];
|
||||
|
||||
sprite_ptr++;
|
||||
}
|
||||
else
|
||||
{
|
||||
drawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx],
|
||||
sprite_ptr->code,
|
||||
sprite_ptr->color,
|
||||
sprite_ptr->flipx,sprite_ptr->flipy,
|
||||
sprite_ptr->x,sprite_ptr->y,
|
||||
cliprect,TRANSPARENCY_PEN,0,
|
||||
sprite_ptr->zoomx,sprite_ptr->zoomy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* this happens only if primsks != NULL */
|
||||
while (sprite_ptr != spritelist)
|
||||
{
|
||||
sprite_ptr--;
|
||||
|
||||
pdrawgfxzoom(bitmap,machine->gfx[sprite_ptr->gfx],
|
||||
sprite_ptr->code,
|
||||
sprite_ptr->color,
|
||||
sprite_ptr->flipx,sprite_ptr->flipy,
|
||||
sprite_ptr->x,sprite_ptr->y,
|
||||
cliprect,TRANSPARENCY_PEN,0,
|
||||
sprite_ptr->zoomx,sprite_ptr->zoomy,
|
||||
sprite_ptr->primask);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**************************************************************
|
||||
SCREEN REFRESH
|
||||
**************************************************************/
|
||||
@ -369,3 +515,147 @@ VIDEO_UPDATE( undrfire )
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
VIDEO_UPDATE( cbombers )
|
||||
{
|
||||
UINT8 layer[5];
|
||||
UINT8 pivlayer[3];
|
||||
UINT16 priority;
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
static UINT8 dislayer[6]; /* Layer toggles to help get layers correct */
|
||||
#endif
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (input_code_pressed_once (KEYCODE_X))
|
||||
{
|
||||
dislayer[5] ^= 1;
|
||||
popmessage("piv text: %01x",dislayer[5]);
|
||||
}
|
||||
if (input_code_pressed_once (KEYCODE_C))
|
||||
{
|
||||
dislayer[0] ^= 1;
|
||||
popmessage("bg0: %01x",dislayer[0]);
|
||||
}
|
||||
|
||||
if (input_code_pressed_once (KEYCODE_V))
|
||||
{
|
||||
dislayer[1] ^= 1;
|
||||
popmessage("bg1: %01x",dislayer[1]);
|
||||
}
|
||||
|
||||
if (input_code_pressed_once (KEYCODE_B))
|
||||
{
|
||||
dislayer[2] ^= 1;
|
||||
popmessage("bg2: %01x",dislayer[2]);
|
||||
}
|
||||
|
||||
if (input_code_pressed_once (KEYCODE_N))
|
||||
{
|
||||
dislayer[3] ^= 1;
|
||||
popmessage("bg3: %01x",dislayer[3]);
|
||||
}
|
||||
|
||||
if (input_code_pressed_once (KEYCODE_M))
|
||||
{
|
||||
dislayer[4] ^= 1;
|
||||
popmessage("sprites: %01x",dislayer[4]);
|
||||
}
|
||||
#endif
|
||||
|
||||
TC0100SCN_tilemap_update(screen->machine);
|
||||
TC0480SCP_tilemap_update(screen->machine);
|
||||
|
||||
priority = TC0480SCP_get_bg_priority();
|
||||
|
||||
layer[0] = (priority &0xf000) >> 12; /* tells us which bg layer is bottom */
|
||||
layer[1] = (priority &0x0f00) >> 8;
|
||||
layer[2] = (priority &0x00f0) >> 4;
|
||||
layer[3] = (priority &0x000f) >> 0; /* tells us which is top */
|
||||
layer[4] = 4; /* text layer always over bg layers */
|
||||
|
||||
pivlayer[0] = TC0100SCN_bottomlayer(0);
|
||||
pivlayer[1] = pivlayer[0]^1;
|
||||
pivlayer[2] = 2;
|
||||
|
||||
fillbitmap(priority_bitmap,0,cliprect);
|
||||
fillbitmap(bitmap,0,cliprect); /* wrong color? */
|
||||
|
||||
|
||||
/* The "PIV" chip seems to be a renamed TC0100SCN. It has a
|
||||
bottom layer usually full of bright garish colors that
|
||||
vaguely mimic the structure of the layers on top. Seems
|
||||
pointless - it's always hidden by other layers. Does it
|
||||
serve some blending pupose ? */
|
||||
|
||||
TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,pivlayer[0],TILEMAP_DRAW_OPAQUE,0);
|
||||
TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,pivlayer[1],0,0);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[layer[0]]==0)
|
||||
#endif
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[0],0,1);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[layer[1]]==0)
|
||||
#endif
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[1],0,2);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[layer[2]]==0)
|
||||
#endif
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[2],0,4);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[layer[3]]==0)
|
||||
#endif
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[3],0,8);
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[4]==0)
|
||||
#endif
|
||||
/* Sprites have variable priority (we kludge this on road levels) */
|
||||
{
|
||||
if ((TC0480SCP_pri_reg &0x3) == 3) /* on road levels kludge sprites up 1 priority */
|
||||
{
|
||||
static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0};
|
||||
draw_sprites_cbombers(screen->machine, bitmap,cliprect,primasks,80,-208);
|
||||
}
|
||||
else
|
||||
{
|
||||
static const int primasks[4] = {0xfffc, 0xfff0, 0xff00, 0x0};
|
||||
draw_sprites_cbombers(screen->machine, bitmap,cliprect,primasks,80,-208);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (dislayer[5]==0)
|
||||
#endif
|
||||
TC0100SCN_tilemap_draw(screen->machine,bitmap,cliprect,0,pivlayer[2],0,0); /* piv text layer */
|
||||
|
||||
TC0480SCP_tilemap_draw(bitmap,cliprect,layer[4],0,0); /* TC0480SCP text layer */
|
||||
|
||||
/* See if we should draw artificial gun targets */
|
||||
/* (not yet implemented...) */
|
||||
|
||||
if (input_port_7_word_r(screen->machine,0,0) & 0x1) /* Fake DSW */
|
||||
{
|
||||
popmessage("Gunsights on");
|
||||
}
|
||||
|
||||
/* Enable this to see rotation (?) control words */
|
||||
#if 0
|
||||
{
|
||||
char buf[80];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i += 1)
|
||||
{
|
||||
sprintf (buf, "%02x: %04x", i, undrfire_rotate_ctrl[i]);
|
||||
ui_draw_text (buf, 0, i*8);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user