fixed HBLANK/HINT timings

This commit is contained in:
ekeeke31 2008-09-18 15:08:47 +00:00
parent ea7f8eab4c
commit b87381a068
6 changed files with 10 additions and 4 deletions

View File

@ -10,9 +10,12 @@ CURRENT:
- YM2612(MAME): fixed registers 0x20-0x26 Reset state, fix intro music in B.O.B - YM2612(MAME): fixed registers 0x20-0x26 Reset state, fix intro music in B.O.B
- adjusted HCounter values, fix Sonic 3D bonus stage - adjusted HCounter values, fix Sonic 3D bonus stage
[NGC/Wii] [NGC/Wii]
- improved menu scrolling using Wiimote D-PAD - simplified HQ YM2612 option (use FAST setting for MAME by default)
- improved fast scrolling in menus when using Wiimote D-PAD
- fixed config file incompatibility between GC and Wii versions - fixed config file incompatibility between GC and Wii versions
- reenabled texture filtering in H40 original mode when overscan is emulated: fix screen scroll tearing
26/08/2008: 26/08/2008:

View File

@ -71,7 +71,7 @@ static const u16 pad_keys[8] =
#define PAD_LEFT 2 #define PAD_LEFT 2
#define PAD_RIGHT 3 #define PAD_RIGHT 3
#define MAX_HELD_CNT 8 #define MAX_HELD_CNT 9
static u32 held_cnt = 0; static u32 held_cnt = 0;
static u32 wpad_dirmap[3][4] = static u32 wpad_dirmap[3][4] =

View File

@ -566,7 +566,7 @@ void ogc_video__update()
GX_InitTexObj (&texobj, texturemem, vwidth, vheight, GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE); GX_InitTexObj (&texobj, texturemem, vwidth, vheight, GX_TF_RGB565, GX_CLAMP, GX_CLAMP, GX_FALSE);
/* original H40 mode: force filtering OFF */ /* original H40 mode: force filtering OFF */
if (!config.render && (reg[12]&1)) if (!config.overscan && !config.render && (reg[12]&1))
{ {
GX_InitTexObjLOD(&texobj,GX_NEAR,GX_NEAR_MIP_NEAR,2.5,9.0,0.0,GX_FALSE,GX_FALSE,GX_ANISO_1); GX_InitTexObjLOD(&texobj,GX_NEAR,GX_NEAR_MIP_NEAR,2.5,9.0,0.0,GX_FALSE,GX_FALSE,GX_ANISO_1);
} }

View File

@ -38,6 +38,7 @@ uint32 z80cycles_per_line;
uint32 aim_m68k; uint32 aim_m68k;
uint32 count_m68k; uint32 count_m68k;
uint32 line_m68k; uint32 line_m68k;
uint32 hint_m68k;
uint32 aim_z80; uint32 aim_z80;
uint32 count_z80; uint32 count_z80;
uint32 line_z80; uint32 line_z80;
@ -214,6 +215,7 @@ int system_frame (int do_skip)
input_update(); input_update();
/* Update CPU cycle counters */ /* Update CPU cycle counters */
hint_m68k = count_m68k;
line_m68k = aim_m68k; line_m68k = aim_m68k;
line_z80 = aim_z80; line_z80 = aim_z80;
aim_z80 += z80cycles_per_line; aim_z80 += z80cycles_per_line;

View File

@ -82,6 +82,7 @@ extern uint32 z80cycles_per_line;
extern uint32 aim_m68k; extern uint32 aim_m68k;
extern uint32 count_m68k; extern uint32 count_m68k;
extern uint32 line_m68k; extern uint32 line_m68k;
extern uint32 hint_m68k;
extern uint32 aim_z80; extern uint32 aim_z80;
extern uint32 count_z80; extern uint32 count_z80;
extern uint32 line_z80; extern uint32 line_z80;

View File

@ -725,7 +725,7 @@ void vdp_reg_w(unsigned int r, unsigned int d)
/* DISPLAY switched ON/OFF during HBLANK */ /* DISPLAY switched ON/OFF during HBLANK */
if ((v_counter < bitmap.viewport.h) && ((d&0x40) != (reg[1]&0x40))) if ((v_counter < bitmap.viewport.h) && ((d&0x40) != (reg[1]&0x40)))
{ {
if (count_m68k <= (line_m68k + 128)) if (count_m68k <= (hint_m68k + 84))
{ {
/* Redraw the current line : /* Redraw the current line :
- Legend of Galahad, Lemmings 2, Nigel Mansell's World Championship Racing (set display OFF) - Legend of Galahad, Lemmings 2, Nigel Mansell's World Championship Racing (set display OFF)