mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
Checking in Bryan McPhail's MAMETesters Challenge fixes
Fixes: funkyjet055yel liberate074u1gre tokiu056gre
This commit is contained in:
parent
0738d02527
commit
c2d269ced6
@ -467,6 +467,6 @@ static DRIVER_INIT( funkyjet )
|
|||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
GAME( 1992, funkyjet, 0, funkyjet, funkyjet, funkyjet, ROT0, "[Data East] (Mitchell license)", "Funky Jet (World)", 0 )
|
GAME( 1992, funkyjet, 0, funkyjet, funkyjet, funkyjet, ROT0, "[Data East] (Mitchell license)", "Funky Jet (World)", GAME_SUPPORTS_SAVE )
|
||||||
GAME( 1992, funkyjej, funkyjet, funkyjet, funkyjej, funkyjet, ROT0, "Data East Corporation", "Funky Jet (Japan)", 0 )
|
GAME( 1992, funkyjej, funkyjet, funkyjet, funkyjej, funkyjet, ROT0, "Data East Corporation", "Funky Jet (Japan)", GAME_SUPPORTS_SAVE )
|
||||||
GAME( 1995, sotsugyo, 0, funkyjet, sotsugyo, funkyjet, ROT0, "Mitchell (Atlus license)", "Sotsugyo Shousho", 0 )
|
GAME( 1995, sotsugyo, 0, funkyjet, sotsugyo, funkyjet, ROT0, "Mitchell (Atlus license)", "Sotsugyo Shousho", GAME_SUPPORTS_SAVE )
|
||||||
|
@ -8,6 +8,22 @@ driver by Jarek Parchanski
|
|||||||
Coin inputs are handled by the sound CPU, so they don't work with sound
|
Coin inputs are handled by the sound CPU, so they don't work with sound
|
||||||
disabled. Use the service switch instead.
|
disabled. Use the service switch instead.
|
||||||
|
|
||||||
|
--
|
||||||
|
Mametesters bug tokiu056gre - "tokiu: "0000000" is always displayed as the top hiscore during gameplay,
|
||||||
|
regardless of what it actually is. This does not happen in the other Toki sets."
|
||||||
|
|
||||||
|
Notes by bmcphail@vcmame.net, 1/1/2008
|
||||||
|
|
||||||
|
Toki stores high score at $60008 in main ram (init code at $ADA, compared with player score at $1A1BA)
|
||||||
|
Tokiu stores high score at $60010 instead (init code at $B16, equivalent compare code at $1a204), $60008
|
||||||
|
is used for different purposes in many parts of the code.
|
||||||
|
|
||||||
|
Both games feature a common routine ($1cba2 in toki, $1cbfa in tokiu) that prints the high score to screen,
|
||||||
|
the problem is that the version in Tokiu has not been adjusted for the different high score location and
|
||||||
|
it reads from the $68008 location instead of $680010. From analysing the code I'm certain this is a bug
|
||||||
|
in the original USA version code and not an emulation bug.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
@ -701,15 +701,25 @@ READ16_HANDLER( deco16_146_funkyjet_prot_r )
|
|||||||
return deco16_prot_ram[0x104>>1];
|
return deco16_prot_ram[0x104>>1];
|
||||||
case 0x3a8 >> 1: /* See 93e4/9376 */
|
case 0x3a8 >> 1: /* See 93e4/9376 */
|
||||||
return deco16_prot_ram[0x500>>1];
|
return deco16_prot_ram[0x500>>1];
|
||||||
case 0x3e8 >> 1:
|
|
||||||
|
// The top byte of 0x50c is used as a bitmask of completed levels,
|
||||||
|
// checked at end of each (0x0100 = level 1 completed,
|
||||||
|
// 0x3000 = levels 5 & 6 completed, 0x3f00 = levels 1-6 completed, etc)
|
||||||
|
case 0x56c >> 1:
|
||||||
return deco16_prot_ram[0x50c>>1];
|
return deco16_prot_ram[0x50c>>1];
|
||||||
|
|
||||||
|
// The game compares $ffc0 to check for all 6 basic levels
|
||||||
|
// being completed. (which is 0x3f00 inverted and shifted)
|
||||||
|
// If wrong value is returned here the level select screen is
|
||||||
|
// incorrectly shown and leads to a crash as that screen
|
||||||
|
// cannot cope with all levels being already completed.
|
||||||
|
case 0x3e8 >> 1:
|
||||||
|
return (deco16_prot_ram[0x50c>>1] >> 8) ^ 0xffff;
|
||||||
|
|
||||||
case 0x4e4 >> 1:
|
case 0x4e4 >> 1:
|
||||||
return deco16_prot_ram[0x702>>1];
|
return deco16_prot_ram[0x702>>1];
|
||||||
case 0x562 >> 1:
|
case 0x562 >> 1:
|
||||||
return deco16_prot_ram[0x18e>>1];
|
return deco16_prot_ram[0x18e>>1];
|
||||||
case 0x56c >> 1:
|
|
||||||
return deco16_prot_ram[0x50c>>1];
|
|
||||||
|
|
||||||
case 0x688 >> 1:
|
case 0x688 >> 1:
|
||||||
return deco16_prot_ram[0x300>>1];
|
return deco16_prot_ram[0x300>>1];
|
||||||
@ -737,7 +747,8 @@ READ16_HANDLER( deco16_146_funkyjet_prot_r )
|
|||||||
return (readinputport(3) + (readinputport(4) << 8));
|
return (readinputport(3) + (readinputport(4) << 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activecpu_get_pc()!=0xc0ea) logerror("CPU #0 PC %06x: warning - read unmapped control address %06x\n",activecpu_get_pc(),offset<<1);
|
if (activecpu_get_pc()!=0xc0ea)
|
||||||
|
logerror("CPU #0 PC %06x: warning - read unmapped control address %06x (ctrl %04x)\n",activecpu_get_pc(),offset<<1, readinputport(0));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -190,45 +190,60 @@ static void liberate_draw_sprites(running_machine *machine, mame_bitmap *bitmap,
|
|||||||
{
|
{
|
||||||
int multi,fx,fy,sx,sy,sy2,code,color;
|
int multi,fx,fy,sx,sy,sy2,code,color;
|
||||||
|
|
||||||
code = spriteram[offs+1] + ( ( spriteram[offs+0] & 0x60 ) << 3 );
|
/*
|
||||||
sx = (240 - spriteram[offs+3]);
|
Byte 0: 0x01 - ?
|
||||||
//if (sx < -7) sx += 256;
|
0x02 - Y flip
|
||||||
|
0x04 - X flip
|
||||||
|
0x08 - Colour?
|
||||||
|
0x10 - Multi sprite set
|
||||||
|
0x60 - Tile (high bits)
|
||||||
|
0x80 - ?
|
||||||
|
Byte 1: 0xff - Tile (low bits)
|
||||||
|
Byte 2: 0xff - Y position
|
||||||
|
Byte 3: 0xff - X position
|
||||||
|
*/
|
||||||
|
|
||||||
sy = 240-spriteram[offs+2];
|
code = spriteram[offs+1] + ((spriteram[offs+0] & 0x60) << 3);
|
||||||
color = 0;//(spriteram[offs+1] & 0x03);// + ((spriteram[offs+1] & 0x08) >> 1);
|
sx = 240 - spriteram[offs+3];
|
||||||
|
sy = 240 - spriteram[offs+2];
|
||||||
// if (pri==0 && color!=0) continue;
|
color = ((spriteram[offs+1] & 0x08) >> 3); // ?
|
||||||
// if (pri==1 && color==0) continue;
|
|
||||||
|
|
||||||
fx = spriteram[offs+0] & 0x04;
|
fx = spriteram[offs+0] & 0x04;
|
||||||
fy = spriteram[offs+0] & 0x08; // or 0x02 ?
|
fy = spriteram[offs+0] & 0x02;
|
||||||
multi = spriteram[offs+0] & 0x10;
|
multi = spriteram[offs+0] & 0x10;
|
||||||
|
|
||||||
|
if (multi && fy==0) sy-=16;
|
||||||
if (multi) sy-=16;
|
|
||||||
|
|
||||||
if (flip_screen) {
|
if (flip_screen) {
|
||||||
sy=240-sy;
|
sy=240-sy;
|
||||||
sx=240-sx;
|
sx=240-sx;
|
||||||
|
if (fy)
|
||||||
|
sy2=sy+16;
|
||||||
|
else
|
||||||
|
sy2=sy-16;
|
||||||
if (fx) fx=0; else fx=1;
|
if (fx) fx=0; else fx=1;
|
||||||
if (fy) fy=0; else fy=1;
|
if (fy) fy=0; else fy=1;
|
||||||
sy2=sy-16;
|
|
||||||
}
|
}
|
||||||
else sy2=sy+16;
|
else {
|
||||||
|
if (fy)
|
||||||
|
sy2=sy-16;
|
||||||
|
else
|
||||||
|
sy2=sy+16;
|
||||||
|
}
|
||||||
|
|
||||||
drawgfx(bitmap,machine->gfx[1],
|
drawgfx(bitmap,machine->gfx[1],
|
||||||
code,
|
code,
|
||||||
color,
|
color,
|
||||||
fx,fy,
|
fx,fy,
|
||||||
sx,sy,
|
sx,sy,
|
||||||
cliprect,TRANSPARENCY_PEN,0);
|
cliprect,TRANSPARENCY_PEN,0);
|
||||||
if (multi)
|
if (multi)
|
||||||
drawgfx(bitmap,machine->gfx[1],
|
drawgfx(bitmap,machine->gfx[1],
|
||||||
code+1,
|
code+1,
|
||||||
color,
|
color,
|
||||||
fx,fy,
|
fx,fy,
|
||||||
sx,sy2,
|
sx,sy2,
|
||||||
cliprect,TRANSPARENCY_PEN,0);
|
cliprect,TRANSPARENCY_PEN,0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user