Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions iop/dev9/atad/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ ifeq ($(ATA_GAMESTAR_WORKAROUND),1)
IOP_CFLAGS += -DATA_GAMESTAR_WORKAROUND=1
endif

ifeq ($(ATA_DISABLE_DVRP_WORKAROUND),1)
IOP_CFLAGS += -DATA_DISABLE_DVRP_WORKAROUND=1
endif

ifeq ($(ATA_ENABLE_BDM),1)
IOP_CFLAGS += -DATA_ENABLE_BDM=1
IOP_INCS += -I$(PS2SDKSRC)/iop/fs/bdm/include
Expand Down
10 changes: 9 additions & 1 deletion iop/dev9/atad/src/ps2atad.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,17 @@ int _start(int argc, char *argv[])
The problem is obviously in the DVRP's firmware, but we currently have no way to fix these bugs because the DVRP is even more heavily secured that the IOP.
In the eyes of Sony, there isn't a problem because none of their retail PlayStation 2 software ever supported 48-bit LBA.

The workaround here is to return the 28-bit LBA as the total size and only use 48-bit LBA commands when required. */
The workaround here is to return the 28-bit LBA as the total size and only use 48-bit LBA commands when required.

Some third-party/clone network adaptors assert SPD_CAPS_DVR even though they are not DVRP-based and
handle 48-bit LBA addressing correctly. On such targets the workaround wrongly truncates the reported
capacity to 28-bit LBA (128GiB), so builds for those adaptors can opt out with ATA_DISABLE_DVRP_WORKAROUND. */
#ifdef ATA_DISABLE_DVRP_WORKAROUND
ata_dvrp_workaround = 0;
#else
ata_dvrp_workaround = (SPD_REG16(SPD_R_REV_3) & SPD_CAPS_DVR) ? 1 : 0;
#endif
#endif

#ifdef ATA_USE_AIFDEV9
if (!aifIsDetected()) {
Expand Down