From: notaz Date: Fri, 1 Dec 2023 23:05:10 +0000 (+0200) Subject: an alt hack for Judge Dredd X-Git-Tag: r24~29 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26665bc5cb481a2087beb78793b3bef1be7c1597;p=pcsx_rearmed.git an alt hack for Judge Dredd --- diff --git a/libpcsxcore/database.c b/libpcsxcore/database.c index 6cce0737..b35658ba 100644 --- a/libpcsxcore/database.c +++ b/libpcsxcore/database.c @@ -51,6 +51,12 @@ static const char * const gpu_centering_hack_db[] = "SLPM86009", }; +static const char * const dualshock_timing1024_hack_db[] = +{ + /* Judge Dredd - could also be poor cdrom+mdec+dma timing */ + "SLUS00630", "SLES00755", +}; + static const char * const dualshock_init_analog_hack_db[] = { /* Formula 1 Championship Edition */ @@ -73,6 +79,7 @@ hack_db[] = HACK_ENTRY(gpu_slow_list_walking, gpu_slow_llist_db), HACK_ENTRY(gpu_busy, gpu_busy_hack_db), HACK_ENTRY(gpu_centering, gpu_centering_hack_db), + HACK_ENTRY(gpu_timing1024, dualshock_timing1024_hack_db), HACK_ENTRY(dualshock_init_analog, dualshock_init_analog_hack_db), }; @@ -97,8 +104,6 @@ cycle_multiplier_overrides[] = #endif /* Discworld Noir - audio skips if CPU runs too fast */ { 222, { "SLES01549", "SLES02063", "SLES02064" } }, - /* Judge Dredd - could also be poor MDEC timing */ - { 128, { "SLUS00630", "SLES00755" } }, /* Digimon World */ { 153, { "SLUS01032", "SLES02914" } }, /* Syphon Filter - reportedly hangs under unknown conditions */ diff --git a/libpcsxcore/psxcommon.h b/libpcsxcore/psxcommon.h index 01b2a9aa..dce4f41e 100644 --- a/libpcsxcore/psxcommon.h +++ b/libpcsxcore/psxcommon.h @@ -153,6 +153,7 @@ typedef struct { boolean gpu_busy; boolean gpu_centering; boolean dualshock_init_analog; + boolean gpu_timing1024; } hacks; } PcsxConfig; diff --git a/libpcsxcore/psxdma.c b/libpcsxcore/psxdma.c index e3655b5e..a7c438e3 100644 --- a/libpcsxcore/psxdma.c +++ b/libpcsxcore/psxdma.c @@ -191,7 +191,7 @@ void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU madr_next = 0xffffff; do_walking = Config.GpuListWalking; - if (do_walking < 0) + if (do_walking < 0 || Config.hacks.gpu_timing1024) do_walking = Config.hacks.gpu_slow_list_walking; madr_next_p = do_walking ? &madr_next : NULL; @@ -201,10 +201,10 @@ void psxDma2(u32 madr, u32 bcr, u32 chcr) { // GPU HW_DMA2_MADR = SWAPu32(madr_next); - // Tekken 3 = use 1.0 only (not 1.5x) + // a hack for Judge Dredd which is annoyingly sensitive to timing + if (Config.hacks.gpu_timing1024) + size = 1024; - // Einhander = parse linked list in pieces (todo) - // Rebel Assault 2 = parse linked list in pieces (todo) psxRegs.gpuIdleAfter = psxRegs.cycle + size + 16; set_event(PSXINT_GPUDMA, size); return;