Previous 199869 Revisions Next

r21543 Saturday 2nd March, 2013 at 22:34:21 UTC by hap
workaround for airco22b sprites
[src/mame/drivers]namcos22.c
[src/mame/video]namcos22.c

trunk/src/mame/drivers/namcos22.c
r21542r21543
52575257   COMBINE_DATA(&m_su_82);
52585258}
52595259
5260// for MCU BIOS v1.30
5260// for MCU BIOS v1.20/v1.30
52615261READ16_MEMBER(namcos22_state::mcu130_speedup_r)
52625262{
52635263   if ((space.device().safe_pc() == 0xc12a) && (!(m_su_82 & 0xff00)))
r21542r21543
52895289static void install_130_speedup(running_machine &machine)
52905290{
52915291   namcos22_state *state = machine.driver_data<namcos22_state>();
5292   // install speedup cheat for 1.30 MCU BIOS
5292   // install speedup cheat for 1.20/1.30 MCU BIOS
52935293   if (MCU_SPEEDUP)
52945294      state->m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
52955295}
r21542r21543
53635363   namcos22_init(machine(), NAMCOS22_AIR_COMBAT22);
53645364
53655365   // S22-BIOS ver1.20 namco all rights reserved 94/12/21
5366   install_130_speedup(machine());
53665367}
53675368
53685369DRIVER_INIT_MEMBER(namcos22_state,propcycl)
r21542r21543
55115512/* Super System22 games */
55125513GAME( 1994, alpinerd, 0,         namcos22s, alpiner,   namcos22_state, alpiner,  ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.D)"          , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS )
55135514GAME( 1994, alpinerc, alpinerd,  namcos22s, alpiner,   namcos22_state, alpiner,  ROT0, "Namco", "Alpine Racer (Rev. AR2 Ver.C)"          , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS )
5514GAME( 1995, airco22b, 0,         namcos22s, airco22,   namcos22_state, 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?
5515GAME( 1995, airco22b, 0,         namcos22s, airco22,   namcos22_state, airco22,  ROT0, "Namco", "Air Combat 22 (Rev. ACS1 Ver.B, Japan)" , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // various problems
55155516GAME( 1995, cybrcycc, 0,         namcos22s, cybrcycc,  namcos22_state, cybrcyc,  ROT0, "Namco", "Cyber Cycles (Rev. CB2 Ver.C)"          , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 95/04/04
55165517GAME( 1995, dirtdash, 0,         namcos22s, dirtdash,  namcos22_state, dirtdash, ROT0, "Namco", "Dirt Dash (Rev. DT2)"                   , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 95/12/20 20:01:56
55175518GAME( 1995, timecris, 0,         timecris,  timecris,  namcos22_state, timecris, ROT0, "Namco", "Time Crisis (Rev. TS2 Ver.B)"           , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) // 96/04/02 18:48:00
trunk/src/mame/video/namcos22.c
r21542r21543
77 * - texture u/v mapping is often 1 pixel off, resulting in many glitch lines/gaps between textures
88 * - tokyowar tanks are not shootable, same for timecris helicopter, there's still a very small hitbox but almost impossible to hit
99 *       (is this related to dsp? or cpu?)
10 * - find out how/where vics num_sprites is determined exactly, it causes major sprite problems in airco22b
11 *       dirtdash would have this issue too, if not for the current workaround
10 * - find out how/where vics num_sprites is determined exactly, currently a workaround is needed for airco22b and dirtdash
1211 * - improve ss22 fogging:
1312 *       + scene changes too rapidly sometimes, eg. dirtdash snow level finish (see attract), or aquajet going down the waterfall
1413 *       + 100% fog if you start dirtdash at the hill level
r21542r21543
16221621   }
16231622   if (machine.input().code_pressed(KEYCODE_S))
16241623      popmessage("%s",msg1);
1625   else popmessage("[S] shows spite/vics regs");
1624   else popmessage("[S] shows sprite/vics regs");
16261625#endif
16271626   /*
16281627       0x980000:   00060000 00010000 02ff0000 000007ff
r21542r21543
16471646   */
16481647
16491648   /* 'enable' bits function:
1650       bit 0:      affects spritecount by 1? (alpinr2b)
1649       bit 0:      sprites on?
16511650       bit 1:      ??? (always set, except in alpinr2b. it's not x-resolution)
16521651       bit 2:      y-resolution? (always set, except in cybrcycc)
16531652       all bits set means off (aquajet) */
1654   int enable = spriteram32[0]>>16&7;
1653   int enable = spriteram32[0]>>16&5;
16551654
16561655   int y_lowres = (enable & 4) ? 0 : 1;
16571656
r21542r21543
16591658   int deltay = (spriteram32[3]>>16) + (0x2a >> y_lowres);
16601659
16611660   int base = spriteram32[0] & 0xffff; // alpinesa/alpinr2b
1662   int num_sprites = (spriteram32[1]>>16) - base;
1663   num_sprites += (~enable & 1);
1661   int num_sprites = ((spriteram32[1]>>16) - base) + 1;
16641662
1665   if( num_sprites > 0 && num_sprites < 0x400 && enable != 7 )
1663   if( num_sprites > 0 && num_sprites < 0x400 && enable != 5 )
16661664   {
16671665      pSource = &spriteram32[0x04000/4 + base*4];
16681666      pPal    = &spriteram32[0x20000/4 + base*2];
r21542r21543
16901688   num_sprites = state->m_vics_control[0x40/4] >> 4 & 0x1ff; // no +1
16911689
16921690   // dirtdash sprite list starts at xxx4, number of sprites is stored in xxx0, it doesn't use set#2
1693   if (state->m_gametype == NAMCOS22_DIRT_DASH) num_sprites = (state->m_vics_data[(state->m_vics_control[0x48/4]&0x4000)/4] & 0xff) + 1;
1691   if (state->m_gametype == NAMCOS22_DIRT_DASH)
1692      num_sprites = (state->m_vics_data[(state->m_vics_control[0x48/4]&0x4000)/4] & 0xff) + 1;
16941693
16951694   if( num_sprites > 0 )
16961695   {
r21542r21543
17001699   }
17011700
17021701   num_sprites = state->m_vics_control[0x60/4] >> 4 & 0x1ff; // no +1
1702
1703   // airco22b number of sprites for set#2 is stored in set#1 - it does not use set 1, or main set for sprites
1704   if (state->m_gametype == NAMCOS22_AIR_COMBAT22)
1705   {
1706      enable = state->m_vics_data[(state->m_vics_control[0x48/4]&0xffff)/4]>>16&5;
1707      if (enable != 5)
1708         num_sprites = (state->m_vics_data[(state->m_vics_control[0x48/4]&0xffff)/4+1]>>16)+1;
1709      else
1710         num_sprites = 0;
1711   }
1712
17031713   if( num_sprites > 0 )
17041714   {
17051715      pSource = &state->m_vics_data[(state->m_vics_control[0x68/4]&0xffff)/4];

Previous 199869 Revisions Next


© 1997-2024 The MAME Team