diff options
author | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2011-10-06 15:11:27 +0000 |
---|---|---|
committer | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2011-10-06 15:11:27 +0000 |
commit | e5572465263c58f7e33d7a769437867bf433167d (patch) | |
tree | cecc118d1e1622376e2b9fdcd0cc52bff3a58790 | |
parent | 66bb01c3e9041497dfefe374c998b34b55353aa5 (diff) |
properly emulate sprite deltay
-rw-r--r-- | src/mame/video/namcos22.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c index 0cb8b0514f6..351e89d1b07 100644 --- a/src/mame/video/namcos22.c +++ b/src/mame/video/namcos22.c @@ -1454,44 +1454,39 @@ DrawSprites( running_machine &machine, bitmap_t *bitmap, const rectangle *clipre y_lowres = 1; } - // xy offs, prelim! + // x offs, prelim! int deltax=spriteram32[5]>>16; // usually 0x280 - int deltay=spriteram32[6]>>16; // usually 0x32a - - if (deltax == 0 || deltay == 0) + if (deltax == 0) switch (state->m_gametype) { case NAMCOS22_AQUA_JET: - // approx (not enough testdata) - aligns with titlescreen + // approx (not enough testdata) deltax = 0x07f; - deltay = 0x0fe; // spriteram32[3]>>16(0x0d6) + default(0x02a) is 0x100, close to 0x0fe break; case NAMCOS22_ALPINE_SURFER: // approx (not enough testdata) deltax = 0x02e; - deltay = 0x42a; // spriteram32[3]>>16 is 0x400 break; case NAMCOS22_CYBER_CYCLES: // approx (not enough testdata) deltax = 0x280; - deltay = 0x415; // spriteram32[3]>>16 is 0x400, 0x02a / 2 = 0x015 break; case NAMCOS22_TOKYO_WARS: // approx (not enough testdata) deltax = 190; - deltay = 0x110; // spriteram32[3]>>16(0x0e6) is 0x10 more than aquajet break; default: // accurate in testmode deltax = 0x02e; - deltay = 0x02a; break; } + int deltay = (spriteram32[3]>>16) + (0x02a >> y_lowres); // ok! + int base = spriteram32[0] & 0xffff; // alpinesa/alpinr2b int num_sprites = (spriteram32[1]>>16) - base; |