mirror of
https://github.com/libretro/mame2003-plus-libretro.git
synced 2026-11-07 12:28:04 -10:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dff0ba6365 | ||
|
|
1035485897 | ||
|
|
a0e0e75905 | ||
|
|
a45b70e19e | ||
|
|
0dd483f4c0 | ||
|
|
7f35678403 |
No files matched your search
+236
-4
@@ -75,6 +75,8 @@ TODO:
|
||||
|
||||
VIDEO_UPDATE( inufuku );
|
||||
VIDEO_START( inufuku );
|
||||
void dunk_buffer_sprites(void);
|
||||
int inufuku_is_dunk;
|
||||
|
||||
data16_t *inufuku_bg_videoram;
|
||||
data16_t *inufuku_bg_rasterram;
|
||||
@@ -104,17 +106,19 @@ static WRITE16_HANDLER( inufuku_soundcommand_w )
|
||||
if (ACCESSING_LSB) {
|
||||
|
||||
/* hack... sound doesn't work otherwise */
|
||||
if (data == 0x08) return;
|
||||
if (!inufuku_is_dunk && data == 0x08) return;
|
||||
|
||||
pending_command = 1;
|
||||
soundlatch_w(0, data & 0xff);
|
||||
cpu_set_irq_line(1, IRQ_LINE_NMI, PULSE_LINE);
|
||||
cpu_set_irq_line(1, IRQ_LINE_NMI, inufuku_is_dunk ? ASSERT_LINE : PULSE_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE_HANDLER( pending_command_clear_w )
|
||||
{
|
||||
pending_command = 0;
|
||||
if (inufuku_is_dunk)
|
||||
cpu_set_irq_line(1, IRQ_LINE_NMI, CLEAR_LINE);
|
||||
}
|
||||
|
||||
static WRITE_HANDLER( inufuku_soundrombank_w )
|
||||
@@ -133,15 +137,27 @@ static WRITE_HANDLER( inufuku_soundrombank_w )
|
||||
|
||||
static MACHINE_INIT( inufuku )
|
||||
{
|
||||
;
|
||||
if (inufuku_is_dunk)
|
||||
{
|
||||
pending_command = 0;
|
||||
inufuku_soundrombank_w(0, 0);
|
||||
cpu_set_irq_line(1, IRQ_LINE_NMI, CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
static DRIVER_INIT( inufuku )
|
||||
{
|
||||
inufuku_is_dunk = 0;
|
||||
pending_command = 1;
|
||||
inufuku_soundrombank_w(0, 0);
|
||||
}
|
||||
|
||||
static DRIVER_INIT( dunk )
|
||||
{
|
||||
inufuku_is_dunk = 1;
|
||||
pending_command = 0;
|
||||
inufuku_soundrombank_w(0, 0);
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -223,6 +239,50 @@ static MEMORY_WRITE16_START( inufuku_writemem )
|
||||
{ 0xfd0000, 0xfdffff, MWA16_RAM }, /* work ram*/
|
||||
MEMORY_END
|
||||
|
||||
static MEMORY_READ16_START( dunk_readmem )
|
||||
{ 0x000000, 0x0fffff, MRA16_ROM }, /* main rom*/
|
||||
|
||||
{ 0x180000, 0x180001, input_port_0_word_r },
|
||||
{ 0x180002, 0x180003, input_port_1_word_r },
|
||||
{ 0x180004, 0x180005, input_port_2_word_r },
|
||||
{ 0x180006, 0x180007, input_port_3_word_r },
|
||||
{ 0x180008, 0x180009, inufuku_eeprom_r }, /* eeprom + input_port_4_word_r*/
|
||||
{ 0x18000a, 0x18000b, input_port_5_word_r },
|
||||
|
||||
{ 0x300000, 0x301fff, MRA16_RAM }, /* palette ram*/
|
||||
{ 0x400000, 0x401fff, inufuku_bg_videoram_r }, /* bg ram*/
|
||||
{ 0x402000, 0x403fff, inufuku_text_videoram_r },/* text ram*/
|
||||
{ 0x404000, 0x40ffff, MRA16_RAM },
|
||||
{ 0x580000, 0x581fff, MRA16_RAM }, /* sprite table + sprite attribute*/
|
||||
{ 0x600000, 0x61ffff, MRA16_RAM }, /* cell table*/
|
||||
|
||||
{ 0x800000, 0xbfffff, MRA16_ROM }, /* data rom*/
|
||||
{ 0xfd0000, 0xfdffff, MRA16_RAM }, /* work ram*/
|
||||
MEMORY_END
|
||||
|
||||
static MEMORY_WRITE16_START( dunk_writemem )
|
||||
{ 0x000000, 0x0fffff, MWA16_ROM }, /* main rom*/
|
||||
|
||||
{ 0x100000, 0x100007, MWA16_NOP }, /* ?*/
|
||||
{ 0x200000, 0x200001, inufuku_eeprom_w }, /* eeprom*/
|
||||
{ 0x280000, 0x280001, inufuku_soundcommand_w }, /* sound command*/
|
||||
|
||||
{ 0x300000, 0x301fff, paletteram16_xGGGGGBBBBBRRRRR_word_w, &paletteram16 }, /* palette ram*/
|
||||
{ 0x380000, 0x3801ff, MWA16_RAM, &inufuku_bg_rasterram }, /* bg raster ram*/
|
||||
{ 0x400000, 0x401fff, inufuku_bg_videoram_w, &inufuku_bg_videoram }, /* bg ram*/
|
||||
{ 0x402000, 0x403fff, inufuku_text_videoram_w, &inufuku_text_videoram }, /* text ram*/
|
||||
{ 0x404000, 0x40ffff, MWA16_RAM },
|
||||
{ 0x580000, 0x581fff, MWA16_RAM, &inufuku_spriteram1, &inufuku_spriteram1_size }, /* sprite table + sprite attribute*/
|
||||
{ 0x600000, 0x61ffff, MWA16_RAM, &inufuku_spriteram2 }, /* cell table*/
|
||||
|
||||
{ 0x780000, 0x780013, inufuku_palettereg_w }, /* bg & text palettebank register*/
|
||||
{ 0x7a0000, 0x7a0023, inufuku_scrollreg_w }, /* bg & text scroll register*/
|
||||
{ 0x7e0000, 0x7e0001, MWA16_NOP }, /* ?*/
|
||||
|
||||
{ 0x800000, 0xbfffff, MWA16_ROM }, /* data rom*/
|
||||
{ 0xfd0000, 0xfdffff, MWA16_RAM }, /* work ram*/
|
||||
MEMORY_END
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -329,6 +389,70 @@ INPUT_PORTS_START( inufuku )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER3 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
INPUT_PORTS_START( dunk )
|
||||
PORT_START /* 0*/
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER1 )
|
||||
|
||||
PORT_START /* 1*/
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER2 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER2 )
|
||||
|
||||
PORT_START /* 2*/
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_SERVICE_NO_TOGGLE( 0x10, IP_ACTIVE_LOW )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START /* 3*/
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER4 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER4 )
|
||||
|
||||
PORT_START /* 4*/
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN3 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN4 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START3 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START4 )
|
||||
PORT_DIPNAME( 0x10, 0x10, "3P/4P" )
|
||||
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* pending sound command*/
|
||||
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START /* 5*/
|
||||
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 | IPF_PLAYER3 )
|
||||
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 | IPF_PLAYER3 )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -360,6 +484,19 @@ static struct GfxLayout spritelayout =
|
||||
128*8
|
||||
};
|
||||
|
||||
static struct GfxLayout dunk_spritelayout =
|
||||
{
|
||||
16, 16,
|
||||
RGN_FRAC(1, 1),
|
||||
4,
|
||||
{ 0, 1, 2, 3 },
|
||||
{ 1*4, 0*4, 3*4, 2*4, 5*4, 4*4, 7*4, 6*4,
|
||||
9*4, 8*4, 11*4, 10*4, 13*4, 12*4, 15*4, 14*4 },
|
||||
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,
|
||||
8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
|
||||
128*8
|
||||
};
|
||||
|
||||
static struct GfxDecodeInfo inufuku_gfxdecodeinfo[] =
|
||||
{
|
||||
{ REGION_GFX1, 0, &tilelayout, 0, 256*16 }, /* bg*/
|
||||
@@ -368,6 +505,14 @@ static struct GfxDecodeInfo inufuku_gfxdecodeinfo[] =
|
||||
{ -1 } /* end of array */
|
||||
};
|
||||
|
||||
static struct GfxDecodeInfo dunk_gfxdecodeinfo[] =
|
||||
{
|
||||
{ REGION_GFX1, 0, &tilelayout, 0, 256*16 }, // bg
|
||||
{ REGION_GFX2, 0, &tilelayout, 0, 256*16 }, // text
|
||||
{ REGION_GFX3, 0, &dunk_spritelayout, 0, 256*16 }, // sprite
|
||||
{ -1 } /* end of array */
|
||||
};
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -435,6 +580,62 @@ static MACHINE_DRIVER_START( inufuku )
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
static INTERRUPT_GEN( dunk_interrupt )
|
||||
{
|
||||
/* Latch the completed list before the IRQ lets the main CPU rewrite it. */
|
||||
dunk_buffer_sprites();
|
||||
irq1_line_hold();
|
||||
}
|
||||
|
||||
static struct YM2610interface dunk_ym2610_interface =
|
||||
{
|
||||
1,
|
||||
32000000/4, /* 8.00 MHz */
|
||||
{ 50 },
|
||||
{ 0 },
|
||||
{ 0 },
|
||||
{ 0 },
|
||||
{ 0 },
|
||||
{ irqhandler },
|
||||
{ REGION_SOUND2 },
|
||||
{ REGION_SOUND1 },
|
||||
{ YM3012_VOL(25, MIXER_PAN_CENTER, 25, MIXER_PAN_CENTER) }
|
||||
};
|
||||
|
||||
|
||||
static MACHINE_DRIVER_START( dunk )
|
||||
|
||||
/* basic machine hardware */
|
||||
MDRV_CPU_ADD(M68000, 32000000/2) /* 16.00 MHz */
|
||||
MDRV_CPU_MEMORY(dunk_readmem, dunk_writemem)
|
||||
MDRV_CPU_VBLANK_INT(dunk_interrupt, 1)
|
||||
|
||||
MDRV_CPU_ADD(Z80, 32000000/4) /* 8.00 MHz */
|
||||
MDRV_CPU_FLAGS(CPU_AUDIO_CPU)
|
||||
MDRV_CPU_MEMORY(inufuku_readmem_sound, inufuku_writemem_sound)
|
||||
MDRV_CPU_PORTS(inufuku_readport_sound, inufuku_writeport_sound)
|
||||
/* IRQs are triggered by the YM2610 */
|
||||
MDRV_FRAMES_PER_SECOND(60)
|
||||
MDRV_VBLANK_DURATION(2300)
|
||||
|
||||
MDRV_MACHINE_INIT(inufuku)
|
||||
MDRV_NVRAM_HANDLER(93C46)
|
||||
|
||||
/* video hardware */
|
||||
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
|
||||
MDRV_SCREEN_SIZE(2048, 256)
|
||||
MDRV_VISIBLE_AREA(0, 319, 0, 223)
|
||||
MDRV_GFXDECODE(dunk_gfxdecodeinfo)
|
||||
MDRV_PALETTE_LENGTH(4096)
|
||||
|
||||
MDRV_VIDEO_START(inufuku)
|
||||
MDRV_VIDEO_UPDATE(inufuku)
|
||||
|
||||
/* sound hardware */
|
||||
MDRV_SOUND_ADD(YM2610, dunk_ym2610_interface)
|
||||
MACHINE_DRIVER_END
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
ROM definitions
|
||||
@@ -466,6 +667,36 @@ ROM_START( inufuku )
|
||||
ROM_LOAD( "lhmn5ku6.u53", 0x0000000, 0x400000, CRC(b320c5c9) SHA1(7c99da2d85597a3c008ed61a3aa5f47ad36186ec) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( 3on3dunk )
|
||||
ROM_REGION( 0x0c00000, REGION_CPU1, 0 )
|
||||
ROM_LOAD16_WORD_SWAP( "prog0_2_4_usa.u147", 0x0000000, 0x080000, CRC(957924ab) SHA1(6fe8ca711d11239310d58188e9d6d28cd27bc5af) )
|
||||
ROM_LOAD16_WORD_SWAP( "prog1_2_4_usa.u146", 0x0080000, 0x080000, CRC(2479e236) SHA1(729e6c85d34d6925c8d6557b138e2bed43e1de6a) )
|
||||
ROM_LOAD16_WORD_SWAP( "lh535l5y.u148", 0x0800000, 0x400000, CRC(aa33e02a) SHA1(86381ecf18fba9065cbc02112751c435bbf8b8b4) )
|
||||
|
||||
ROM_REGION( 0x0030000, REGION_CPU2, 0 )
|
||||
ROM_LOAD( "sound_prog_97_1_13.u107", 0x0000000, 0x020000, CRC(d9d42805) SHA1(ab5cb7c141d9c9ed5121ba4dbc1d0fa187bd9f68) )
|
||||
ROM_RELOAD( 0x010000, 0x020000 )
|
||||
|
||||
ROM_REGION( 0x0400000, REGION_GFX1, ROMREGION_DISPOSE )
|
||||
ROM_LOAD16_WORD_SWAP( "lh525kwy.u40", 0x0000000, 0x400000, CRC(aaa426d1) SHA1(2f9a2981f336caf3188baec9a34f61452dee2203) )
|
||||
|
||||
ROM_REGION( 0x0400000, REGION_GFX2, ROMREGION_DISPOSE )
|
||||
ROM_LOAD16_WORD_SWAP( "lh537nn4.u8", 0x0000000, 0x200000, CRC(2b7be1d8) SHA1(aac274a8f4028db7429478601a1761e61ab4f9a2) )
|
||||
|
||||
ROM_REGION( 0x2000000, REGION_GFX3, ROMREGION_DISPOSE )
|
||||
ROM_LOAD( "lh535kwz.u34", 0x0000000, 0x400000, CRC(7372ce78) SHA1(ed2a861986357fad7ef983750cd906c3d722b862) )
|
||||
ROM_LOAD( "lh535kv0.u36", 0x0400000, 0x400000, CRC(247e5741) SHA1(8d71d964791fb4b86e390bcdf7744f616d6357b1) )
|
||||
ROM_LOAD( "lh535kv2.u38", 0x0800000, 0x400000, CRC(76449b1e) SHA1(b63d50c6f0dc91dc94dbcdda9842598529c1c26e) )
|
||||
ROM_LOAD( "lh537nn5.u20", 0x0c00000, 0x200000, CRC(f457cd3b) SHA1(cc13f5dc44e4675c1074a365b10f34e684817d81) )
|
||||
ROM_LOAD( "lh536pnm.u32", 0x1000000, 0x400000, CRC(bc39e449) SHA1(5aea90b66ee03c70797ddc42dbcb064d83ce8cc7) )
|
||||
|
||||
ROM_REGION( 0x0400000, REGION_SOUND1, 0 )
|
||||
ROM_LOAD( "lh5388r1.u53", 0x0000000, 0x100000, CRC(765d892f) SHA1(9b078c879d0437d1669bf4301fd52a768aa4d293) )
|
||||
|
||||
ROM_REGION( 0x0400000, REGION_SOUND2, 0 )
|
||||
ROM_LOAD( "lh536pkl.u51", 0x0000000, 0x300000, CRC(e4919abf) SHA1(d6af4b9c6ff62f92216c9927027d3b2376416bae) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
|
||||
@@ -473,4 +704,5 @@ ROM_END
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
GAMEX( 1998, inufuku, 0, inufuku, inufuku, inufuku, ROT0, "Video System Co.", "Quiz and Variety Sukusuku Inufuku (Japan)", GAME_NO_COCKTAIL )
|
||||
GAMEX( 1998, inufuku, 0, inufuku, inufuku, inufuku, ROT0, "Video System Co.", "Quiz and Variety Sukusuku Inufuku (Japan)", GAME_NO_COCKTAIL )
|
||||
GAMEX( 1996, 3on3dunk, 0, dunk, dunk, dunk, ROT0, "Video System Co.", "3 On 3 Dunk Madness (US, prototype? 1997/02/04)", GAME_NO_COCKTAIL | GAME_IMPERFECT_GRAPHICS )
|
||||
+11
-7
@@ -3602,12 +3602,21 @@ static DRIVER_INIT ( sonic )
|
||||
install_mem_read16_handler (0, 0xc00040, 0xc00055, sonic_track_r);
|
||||
|
||||
install_mem_write16_handler(0, 0x20E5C4, 0x20E5C5, sonic_level_load_protection);
|
||||
|
||||
opaque_blend = false;
|
||||
}
|
||||
|
||||
static DRIVER_INIT ( sonicp )
|
||||
{
|
||||
install_mem_write16_handler(0, 0xc00040, 0xc00055, sonic_track_reset_w);
|
||||
install_mem_read16_handler (0, 0xc00040, 0xc00055, sonic_track_r);
|
||||
|
||||
opaque_blend = false;
|
||||
}
|
||||
|
||||
static DRIVER_INIT ( harddunk )
|
||||
{
|
||||
opaque_blend = false;
|
||||
}
|
||||
|
||||
static DRIVER_INIT ( radm )
|
||||
@@ -3620,8 +3629,6 @@ static DRIVER_INIT ( radr )
|
||||
{
|
||||
system32_use_default_eeprom = EEPROM_RADR;
|
||||
install_io_analog();
|
||||
|
||||
opaquey_hack = true;
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER( f1en_comms_echo_w )
|
||||
@@ -3691,8 +3698,6 @@ static DRIVER_INIT( darkedge )
|
||||
install_mem_read16_handler (0, 0xa00000, 0xa7ffff, darkedge_protection_r);
|
||||
install_mem_write16_handler(0, 0xa00000, 0xa7ffff, darkedge_protection_w);
|
||||
system32_prot_vblank = darkedge_fd1149_vblank;
|
||||
|
||||
opaquey_hack = true;
|
||||
}
|
||||
|
||||
static DRIVER_INIT( jleague )
|
||||
@@ -3710,7 +3715,6 @@ static DRIVER_INIT( titlef )
|
||||
{
|
||||
install_port_write_handler(1, 0xb0, 0xbf, scross_bank_w);
|
||||
titlef_kludge = true;
|
||||
opaquey_hack = true;
|
||||
}
|
||||
|
||||
static DRIVER_INIT( scross )
|
||||
@@ -3748,8 +3752,8 @@ GAMEX(1995, slipstrh, slipstrm, system32, slipstrm, slipstrm, ROT0, "Capcom"
|
||||
|
||||
/* Multi32 games */
|
||||
GAMEX(1992, orunners, 0, multi32, orunners, 0, ROT0, "Sega", "Outrunners (US)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, harddunk, 0, multi32, harddunk, 0, ROT0, "Sega", "Hard Dunk (World)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, harddunj, harddunk, multi32, harddunk, 0, ROT0, "Sega", "Hard Dunk (Japan)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, harddunk, 0, multi32, harddunk, harddunk, ROT0, "Sega", "Hard Dunk (World)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1994, harddunj, harddunk, multi32, harddunk, harddunk, ROT0, "Sega", "Hard Dunk (Japan)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1992, scross, 0, multi32, scross, scross, ROT0, "Sega", "Stadium Cross (World)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1992, scrossa, scross, multi32, scross, scross, ROT0, "Sega", "Stadium Cross (World, linkable)", GAME_IMPERFECT_GRAPHICS )
|
||||
GAMEX(1992, scrossu, scross, multi32, scross, scross, ROT0, "Sega", "Stadium Cross (US)", GAME_IMPERFECT_GRAPHICS )
|
||||
|
||||
@@ -19,7 +19,7 @@ extern UINT16 *system32_paletteram[2];
|
||||
extern UINT16 system32_displayenable[2];
|
||||
extern UINT16 system32_tilebank_external;
|
||||
|
||||
extern bool opaquey_hack;
|
||||
extern bool opaque_blend;
|
||||
extern bool titlef_kludge;
|
||||
|
||||
extern void system32_set_vblank(int state);
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
|
||||
extern data16_t *inufuku_spriteram1;
|
||||
extern int inufuku_is_dunk;
|
||||
static UINT16 *dunk_sprite_buffer;
|
||||
extern data16_t *inufuku_spriteram2;
|
||||
extern size_t inufuku_spriteram1_size;
|
||||
|
||||
@@ -69,9 +71,64 @@ WRITE16_HANDLER( inufuku_scrollreg_w )
|
||||
|
||||
******************************************************************************/
|
||||
|
||||
static void dunk_draw_sprites(struct mame_bitmap *bitmap, const struct rectangle *cliprect)
|
||||
{
|
||||
int end, offs;
|
||||
UINT16 *ram = dunk_sprite_buffer;
|
||||
for (end = 0; end < 0x200; ++end)
|
||||
if (ram[end] & 0x4000) break;
|
||||
|
||||
/* Priority drawing walks the sorting list backwards and stops at its terminator. */
|
||||
for (offs = end - 1; offs >= 0; --offs)
|
||||
{
|
||||
UINT16 *attr;
|
||||
int ox, oy, width, height, zx, zy, fx, fy, color, mask;
|
||||
int x, y, map;
|
||||
static const int masks[4] = { 0x00, 0xf0, 0xfc, 0xfe };
|
||||
if (ram[offs] & 0x8000) continue;
|
||||
attr = &ram[(ram[offs] & 0x3ff) * 4];
|
||||
ox = attr[1] & 0x1ff;
|
||||
oy = (attr[0] & 0x1ff) + 1;
|
||||
width = (attr[1] >> 9) & 7;
|
||||
height = (attr[0] >> 9) & 7;
|
||||
zx = 32 - (attr[1] >> 12);
|
||||
zy = 32 - (attr[0] >> 12);
|
||||
fx = attr[2] & 0x4000;
|
||||
fy = attr[2] & 0x8000;
|
||||
color = (attr[2] >> 8) & 0x3f;
|
||||
mask = masks[color >> 4];
|
||||
map = attr[3] | ((attr[2] & 1) << 16);
|
||||
for (y = 0; y <= height; ++y)
|
||||
for (x = 0; x <= width; ++x)
|
||||
{
|
||||
int index = (map++ * 2) & 0xffff;
|
||||
int code = ((inufuku_spriteram2[index] & 7) << 16) | inufuku_spriteram2[index + 1];
|
||||
int sx = (ox + (fx ? width - x : x) * zx / 2) & 0x1ff;
|
||||
int sy = (oy + (fy ? height - y : y) * zy / 2) & 0x1ff;
|
||||
int wrapx, wrapy;
|
||||
for (wrapy = 0; wrapy <= 1; ++wrapy)
|
||||
for (wrapx = 0; wrapx <= 1; ++wrapx)
|
||||
pdrawgfxzoom(bitmap, Machine->gfx[2], code, color, fx, fy,
|
||||
sx - wrapx * 512, sy - wrapy * 512, cliprect,
|
||||
TRANSPARENCY_PEN, 15, zx << 11, zy << 11, mask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void dunk_buffer_sprites(void)
|
||||
{
|
||||
/* The display consumes the completed attribute list from the preceding frame. */
|
||||
memcpy(dunk_sprite_buffer, inufuku_spriteram1, 0x2000);
|
||||
}
|
||||
|
||||
static void inufuku_draw_sprites(struct mame_bitmap *bitmap, const struct rectangle *cliprect)
|
||||
{
|
||||
int offs;
|
||||
if (inufuku_is_dunk)
|
||||
{
|
||||
dunk_draw_sprites(bitmap, cliprect);
|
||||
return;
|
||||
}
|
||||
|
||||
for (offs = (inufuku_spriteram1_size / 16) - 1; offs >= 0; offs--) {
|
||||
|
||||
@@ -227,6 +284,8 @@ WRITE16_HANDLER( inufuku_text_videoram_w )
|
||||
|
||||
VIDEO_START( inufuku )
|
||||
{
|
||||
dunk_sprite_buffer = auto_malloc(0x2000);
|
||||
memset(dunk_sprite_buffer, 0, 0x2000);
|
||||
inufuku_bg_tilemap = tilemap_create(get_inufuku_bg_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
|
||||
inufuku_text_tilemap = tilemap_create(get_inufuku_text_tile_info, tilemap_scan_rows, TILEMAP_TRANSPARENT, 8, 8, 64, 64);
|
||||
|
||||
@@ -254,7 +313,7 @@ VIDEO_UPDATE( inufuku )
|
||||
|
||||
if (inufuku_bg_raster) {
|
||||
tilemap_set_scroll_rows(inufuku_bg_tilemap, 512);
|
||||
for (i = 0; i < 256; i++) tilemap_set_scrollx(inufuku_bg_tilemap, (inufuku_bg_scrolly + i) & 0x1ff, inufuku_bg_rasterram[i]);
|
||||
for (i = 0; i < 256; i++) tilemap_set_scrollx(inufuku_bg_tilemap, (inufuku_bg_scrolly + i) & 0x1ff, inufuku_bg_rasterram[i] + (inufuku_is_dunk ? inufuku_bg_scrollx : 0));
|
||||
}
|
||||
else {
|
||||
tilemap_set_scroll_rows(inufuku_bg_tilemap, 1);
|
||||
|
||||
@@ -258,7 +258,7 @@ UINT16 *system32_paletteram[2];
|
||||
UINT16 system32_displayenable[2];
|
||||
UINT16 system32_tilebank_external;
|
||||
|
||||
bool opaquey_hack = false; /* dink */
|
||||
bool opaque_blend = true;
|
||||
bool titlef_kludge = false;
|
||||
|
||||
|
||||
@@ -1156,7 +1156,7 @@ static void update_tilemap_zoom(struct layer_info *layer, const struct rectangle
|
||||
get_tilemaps(bgnum, tilemaps);
|
||||
|
||||
/* configure the layer */
|
||||
opaque = (opaquey_hack) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
|
||||
opaque = (opaque_blend) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
|
||||
|
||||
/* determine flipping */
|
||||
compute_tilemap_flips(bgnum, &flipx, &flipy);
|
||||
@@ -1320,7 +1320,7 @@ static void update_tilemap_rowscroll(struct layer_info *layer, const struct rect
|
||||
get_tilemaps(bgnum, tilemaps);
|
||||
|
||||
/* configure the layer */
|
||||
opaque = (opaquey_hack) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
|
||||
opaque = (opaque_blend) ? BIT(system32_videoram[0x1ff8e/2], (8 + bgnum)) : 0;
|
||||
|
||||
/* determine flipping */
|
||||
compute_tilemap_flips(bgnum, &flipx, &flipy);
|
||||
|
||||
Reference in new issue
Block a user