From 79bb3112c36fac3c2092e65c96226f6809dae002 Mon Sep 17 00:00:00 2001 From: Julian Uy Date: Thu, 27 Aug 2026 18:07:23 -0500 Subject: [PATCH] workaround: disable DVRP workaround for compatible adapters --- iop/dev9/atad/src/ps2atad.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/iop/dev9/atad/src/ps2atad.c b/iop/dev9/atad/src/ps2atad.c index 757aa93b6487..05a49b81aeba 100644 --- a/iop/dev9/atad/src/ps2atad.c +++ b/iop/dev9/atad/src/ps2atad.c @@ -311,11 +311,12 @@ int _start(int argc, char *argv[]) Official adaptors appear to have a 0x0001 set for this register, but not compatibles. While official I/O to this register are 8-bit, some compatibles have a 0x01 for the lower 8-bits, but the upper 8-bits contain some random value. Hence perform a 16-bit read instead. */ - if (SPD_REG16(0x20) != 1) { - ata_gamestar_workaround = 1; + ata_gamestar_workaround = (SPD_REG16(0x20) != 1) ? 1 : 0; + if (ata_gamestar_workaround) { M_PRINTF("Compatible adaptor detected.\n"); - } else { - ata_gamestar_workaround = 0; + /* Reportedly, some compatible adapters output more than SPD_CAPS_SMAP | SPD_CAPS_ATA | SPD_CAPS_UART in the SPD_R_REV_3 register. */ + /* https://github.com/regttycomit/PS2_CXD9731_HDD_ADAPTOR/blob/7a6d058019f932eb701ced3bddca6c7eda498b50/hdl/chip.v#L506 */ + ata_dvrp_workaround = 0; } #endif #endif