Phil_B figured out why dirtdash locks up, send beer

This commit is contained in:
Michaël Banaan Ananas 2011-10-28 20:21:51 +00:00
parent 659b081960
commit 8561cd6ec2
3 changed files with 44 additions and 8 deletions

View File

@ -2588,7 +2588,7 @@ static ADDRESS_MAP_START( namcos22s_am, AS_PROGRAM, 32 )
AM_RANGE(0x89e000, 0x89ffff) AM_READWRITE(namcos22_textram_r, namcos22_textram_w) AM_BASE_MEMBER(namcos22_state, m_textram)
AM_RANGE(0x8a0000, 0x8a000f) AM_READWRITE(namcos22_tilemapattr_r, namcos22_tilemapattr_w) AM_BASE_MEMBER(namcos22_state, m_tilemapattr)
AM_RANGE(0x900000, 0x90ffff) AM_RAM AM_BASE_MEMBER(namcos22_state, m_vics_data)
AM_RANGE(0x940000, 0x94007f) AM_RAM AM_BASE_MEMBER(namcos22_state, m_vics_control)
AM_RANGE(0x940000, 0x94007f) AM_READWRITE(namcos22s_vics_control_r, namcos22s_vics_control_w) AM_BASE_MEMBER(namcos22_state, m_vics_control)
AM_RANGE(0x980000, 0x9affff) AM_RAM AM_BASE_MEMBER(namcos22_state, m_spriteram) /* C374 */
AM_RANGE(0xa04000, 0xa0bfff) AM_READWRITE(namcos22_mcuram_r, namcos22_mcuram_w) AM_BASE_MEMBER(namcos22_state, m_shareram) /* COM RAM */
AM_RANGE(0xc00000, 0xc1ffff) AM_READWRITE(namcos22_dspram_r, namcos22_dspram_w) AM_BASE_MEMBER(namcos22_state, m_polygonram)
@ -5772,7 +5772,7 @@ GAME( 1994, alpinerd, 0, namcos22s, alpiner, alpiner, ROT0, "Namco", "
GAME( 1994, alpinerc, alpinerd, namcos22s, alpiner, alpiner, ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.C)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS )
GAME( 1995, airco22b, 0, namcos22s, airco22, airco22, ROT0, "Namco", "Air Combat 22 (Rev. ACS1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // boots but missing sprite clear DMA?
GAME( 1995, cybrcycc, 0, namcos22s, cybrcycc, cybrcyc, ROT0, "Namco", "Cyber Cycles (Rev. CB2 Ver.C)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 95/04/04
GAME( 1995, dirtdash, 0, namcos22s, dirtdash, dirtdash, ROT0, "Namco", "Dirt Dash (Rev. DT2)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // 95/12/20 20:01:56. locks up, dsp comms/slave dsp? - romdump looks fine
GAME( 1995, dirtdash, 0, namcos22s, dirtdash, dirtdash, ROT0, "Namco", "Dirt Dash (Rev. DT2)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // 95/12/20 20:01:56. many issues: slowdown, missing sprites, text layer transparency, spot ram
GAME( 1995, timecris, 0, namcos22s, timecris, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.B)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/04/02 18:48:00
GAME( 1995, timecrisa,timecris, namcos22s, timecris, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/01/08 18:56:09
GAME( 1996, propcycl, 0, namcos22s, propcycl, propcycl, ROT0, "Namco", "Prop Cycle (Rev. PR2 Ver.A)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/06/18 21:22:13

View File

@ -126,6 +126,9 @@ WRITE32_HANDLER( namcos22_paletteram_w );
READ32_HANDLER( namcos22_textram_r );
WRITE32_HANDLER( namcos22_textram_w );
READ32_HANDLER( namcos22s_vics_control_r );
WRITE32_HANDLER( namcos22s_vics_control_w );
READ32_HANDLER( namcos22_gamma_r );
WRITE32_HANDLER( namcos22_gamma_w );

View File

@ -4,10 +4,11 @@
* todo (ordered by importance):
*
* - emulate slave dsp!
* - emulate spot
* - emulate spot (see testmode and dirtdash)
* - texture u/v mapping is often 1 pixel off, resulting in many glitch lines/gaps between textures
* - tokyowar tanks are not shootable, same for timecris helicopter, there's still a very small hitbox but almost impossible to hit
* (is this related to dsp? or cpu?)
* - no sprites shown in dirtdash
* - eliminate sprite garbage in airco22b: find out how/where vics num_sprites is determined exactly, or is it linktable related?
* - window clipping (acedrvrw, victlapw)
* - using rgbint to set brightness may cause problems if a color channel is 00 (eg. victlapw attract)
@ -1699,16 +1700,16 @@ DrawSprites( running_machine &machine, bitmap_t *bitmap, const rectangle *clipre
/* VICS RAM provides two additional banks (also many unknown regs here) */
/*
0x940000 -x------ sprite chip busy
0x940000 -x------ sprite chip busy?
0x940018 xxxx---- clr.w $940018.l
0x940030 xxxxxxxx 0x0600000 - enable bits?
0x940034 xxxxxxxx 0x3070b0f
0x940040 xxxxxxxx sprite attribute size
0x940048 xxxxxxxx sprite attribute list baseaddr
0x940050 xxxxxxxx sprite color size
0x940058 xxxxxxxx sprite color list baseaddr
0x940040 xxxxxxxx sprite attribute size high bit means busy?
0x940048 xxxxxxxx sprite attribute list baseaddr high bit means busy?
0x940050 xxxxxxxx sprite color size high bit means busy?
0x940058 xxxxxxxx sprite color list baseaddr high bit means busy?
0x940060..0x94007c set#2
*/
@ -1730,6 +1731,38 @@ DrawSprites( running_machine &machine, bitmap_t *bitmap, const rectangle *clipre
}
} /* DrawSprites */
READ32_HANDLER( namcos22s_vics_control_r )
{
namcos22_state *state = space->machine().driver_data<namcos22_state>();
UINT32 ret = state->m_vics_control[offset];
switch (offset*4)
{
// reg 0, status register?
// high byte is read in timecris and lower half is expected to be 0
case 0x00:
ret = 0;
break;
// sprite attr/color size regs: high bit is busy/ready?
// dirtdash reads these and waits for it to become 0
case 0x40: case 0x50: case 0x60: case 0x70:
ret &= 0x7fffffff;
break;
default:
break;
}
return ret;
}
WRITE32_HANDLER( namcos22s_vics_control_w )
{
namcos22_state *state = space->machine().driver_data<namcos22_state>();
COMBINE_DATA(&state->m_vics_control[offset]);
}
static void UpdatePalette(running_machine &machine)
{
namcos22_state *state = machine.driver_data<namcos22_state>();