fixed alttiming

This commit is contained in:
ekeeke31 2007-08-11 18:03:15 +00:00
parent 7b14c57033
commit ffbb7b6cb1
5 changed files with 19 additions and 34 deletions

View File

@ -17,8 +17,9 @@ used in a few games (now use game database) as backup RAM. This should fix SRAM
- corrected pixel sprite limit emulation
- corrected sprite collision detection
- added 9bits (RGB333) pixelcolor extrapolation to support fullcolor range (0-65535) when using 16bits rendering (RGB 565)
- completely rewrote interrupt (VINT/HINT) handling: Sesame's Street Counting Cafe now works without any hacks
- corrected H-Counters value again: Road Rash games (I,II,III) don't need any timing hacks anymore
- completely rewrote interrupt (VINT/HINT) handling: Sesame's Street Counting Cafe now works without any hacks,
no other timing sensitive game seems to be broken
- corrected Hcounter table: Road Rash games (I,II,III) don't need any timing hacks anymore
- corrected VDP latency so it does not interfere with DMA timings anymore

View File

@ -154,22 +154,15 @@ IMPORTANT: When putting roms either on DVD or SDCARD, it is recommended to use s
VDP Latency is used to be more accurate in term of VRAM write timing,
it is required by some games (Chaos Engine...) to be displayed properly
(OFF by default, automatically set when specific roms are detected)
(ON by default)
DMA Timing is used to be more accurate in term of DMA copy to V-RAM timing,
it is required by some games (Legend of Galahad...) to be displayed properly
(ON by default)
ALT. timing let you modify the line rendering timing. This is used in some games
(Road Rash series, Legend of Galahad) which have single line display glitch
(OFF by default, automatically set when specific roms are detected)
NOTE: These options are now automatically set when loading a game which need special timing fixes.
These fixes are also now automatically desactivated when the current game doesn't need them.
For your information, games that actually need special timings to run properly are:
.Legend of Galahad & Road Rash series (single line not rendered properly)
.Sesame Street Counting Cafe (don't boot)
.Chaos Engine/Soldiers of Fortune (graphic glitches when scrolling)
ALT. timing let you modify the line rendering timing. This is needed by some games
(Lotus 2 RECS) to prevent display glitches
(OFF by default, automatically set when specific rom is detected)
CPU Mode let you force the CPU speed for the game:
* AUTO: orignal CPU speed is automatically detected

View File

@ -83,25 +83,13 @@ void genesis_set_region ()
* set specific timings for some games
*/
extern uint8 alttiming;
extern uint8 irqtiming;
extern uint8 sys_type[2];
void patch_game()
void detect_game()
{
if ((strstr(rominfo.product,"T-50406") != NULL) || /* Legend of Galahad */
(strstr(rominfo.product,"MK-1079") != NULL) || /* Sonic the Hedgehog 3 (JUE) */
(strstr(rominfo.product,"MK-1563") != NULL) || /* Sonic & Knuckes + Sonic the Hedgehog 3 (JUE) */
(strstr(rominfo.product,"T-50116") != NULL) || /* Road Rash */
(strstr(rominfo.product,"T-50496") != NULL) || /* Road Rash 2 (UE) */
(strstr(rominfo.product,"T-106143") != NULL) || /* Road Rash 2 (J) */
(strstr(rominfo.product,"T-50966") != NULL) /* Road Rash 3 (UE) */
) alttiming = 1;
if (strstr(rominfo.product,"T-50746") != NULL) alttiming = 1;
else alttiming = 0;
/* Sesame's Street Counting Cafe */
if (strstr(rominfo.product,"T-50896") != NULL) irqtiming = 1;
else irqtiming = 0;
/* Menacer 6-in-1 Pack */
if (strstr(rominfo.product,"MK-1658") != NULL)
{
@ -189,7 +177,7 @@ void reloadrom ()
SRAM_Init (); /* SRAM Infos from ROM header */
getrominfo (cart_rom); /* Other Infos from ROM Header */
genesis_set_region (); /* Region Detection */
patch_game(); /* game special patches */
detect_game(); /* game special patches */
system_init ();
audio_init(48000);

View File

@ -249,13 +249,11 @@ int system_frame (int do_skip)
{
h_counter = reg[10];
hint_pending = 1;
if (alttiming) m68k_run(aim_m68k - 456); /* fix Legend of Galahad */
}
}
/* Render a line of the display if needed */
if (do_skip == 0)
/* hack for Lotus 2 Recs */
if (alttiming && !do_skip)
{
if (v_counter < frame_end) render_line(v_counter);
if (v_counter < (frame_end-1)) parse_satb(0x81 + v_counter);
@ -266,6 +264,12 @@ int system_frame (int do_skip)
m68k_run(aim_m68k - 404);
status &= 0xFFFB; // HBlank = 0
if (!alttiming && !do_skip)
{
if (v_counter < frame_end) render_line(v_counter);
if (v_counter < (frame_end-1)) parse_satb(0x81 + v_counter);
}
if (v_counter == frame_end)
{
/* V Retrace */

View File

@ -87,8 +87,7 @@ uint8 vdp_rate = 60; /* CPU speed (60Hz by default)*/
void (*color_update) (int index, uint16 data);
uint8 dmatiming = 1;
uint8 vdptiming = 0;
uint8 irqtiming = 0;
uint8 vdptiming = 1;
/*--------------------------------------------------------------------------*/
/* Init, reset, shutdown functions */