Skip to content

Conversation

@arobins
Copy link

@arobins arobins commented Dec 14, 2025

Switching to ata_bd allows for usage of files on exFAT partitions on the internal HDD. This covers both the PS2BBL configuration file, and any referenced programs to be launched.

This functionality is enabled when built with: HDD=1 HDD_BD=1

Toward #68

Switching to ata_bd allows for usage of files on exFAT partitions on the internal HDD. This covers both the PS2BBL configuration file, and any referenced programs to be launched.

This functionality is enabled when built with: HDD=1 HDD_BD=1
@israpps
Copy link
Owner

israpps commented Dec 15, 2025

I see one issue with this PR

You're mixing mx4sio and BD HDD

When you're done let me know and I can tweak that

Btw, I would love a real hardware recording of it working, last time I tried adding this, the atad bd driver crashed so badly that exception handler threw nothing and even made PCSX2 crash

@arobins
Copy link
Author

arobins commented Dec 16, 2025

You're mixing mx4sio and BD HDD

Full disclosure: I'm super new to PS2 homebrew, so I could be very wrong on what I've interpreted.

BDM lumps all of the mass devices into a single category, with path prefixes like massX:. I don't see an obvious way to make it expose a different path for devices based on driver (ata/sd).

I think this mixing also applies to USB devices. Just to see what would happen, I built PS2BBL with HDD=1 HDD_BD=1 MX4SIO=1 KELFTYPE=HDD and installed it to the internal HDD. The first mass device ends up at both mass: and mass0:, and the rest are available at the massX: paths. I'm not sure if ordering is based purely on the IRX loading order, or if it's discovering devices later and would give a consistent ordering. On my hardware, it was consistently USB>HDD>MX4SIO with all three present and HDD>MX4SIO without the USB stick inserted.

This does cause a bit of a conflict if PS2BBL were built with support for all three. My strategy of mapping massX to the first non-USB device doesn't allow for usage of both HDD_BD and MX4SIO devices at the same time. Likely supporting this would need a new prefix (massY:? mass-ata:?) in the config file that gets mapped to the first HDD, leaving massX: to continue to map to the first MX4SIO device. Or maybe nobody cares about using both at the same time and I'm overthinking things.

Unless you meant you want to have completely separate code paths for building with HDD_BD and MX4SIO, in which case I can definitely copy the things I tweaked to support both.

When you're done let me know and I can tweak that

Tweak away! I wanted to try out MX4SIO+HDD support first to see what would happen if both were present, and I've done that.

Btw, I would love a real hardware recording of it working, last time I tried adding this, the atad bd driver crashed so badly that exception handler threw nothing and even made PCSX2 crash

I don't have any screen capture hardware. Phone video good enough?

@arobins arobins marked this pull request as ready for review December 16, 2025 05:15
@israpps
Copy link
Owner

israpps commented Dec 16, 2025

I don't have any screen capture hardware. Phone video good enough?

Ok!

As for the massX:

My original intention was that massX: would make PS2BBL locate an MX4SIO device

So, we would make a different alias for EXFAT HDD, like massH: or something like that

massH: now resolves to the first device backed by the ata driver, and massX: continues to resolve to the first device backed by the sdc driver.
int x = LookForBDMDevice("ata");
if (x >= 0) {
path[4] = '0' + x;
PART[0] = '\0';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is needed but I need to build a smaller test program to confirm what I think I'm seeing without it. getcwd appears to return something unexpected (ex. hdd0:__sysconf/mass0:athena instead of mass0:/athena) but I'm not certain that it's not something weird going on in Athena.

If having the partition argument present is doing this for ATA_BD devices, I suspect that MX4SIO and USB would both have a similar problem. I'll file a bug if I can reproduce on them.

@arobins
Copy link
Author

arobins commented Dec 17, 2025

So, we would make a different alias for EXFAT HDD, like massH: or something like that

Done. Tested resolving of massH: with a HDD=1 HDD_BD=1 build in PCSX2, didn't have time to try any combinations on real hardware. Plus I think I want to take a few minutes to build a more minimal target program.

@arobins
Copy link
Author

arobins commented Dec 20, 2025

As requested, videos of PS2BBL launching into trivial programs stored on USB, MX4SIO, HDD APA, and HDD exFAT are in the folder below. I'll keep them up for a week.

https://drive.google.com/drive/folders/1Y3UKirifCWgkFbiNrE0eYVNBBqjSB3Hl?usp=sharing

@israpps
Copy link
Owner

israpps commented Dec 20, 2025

very cool. not sure what I did back then for ATA_BD to crash so badly lol

ready to merge? or is there something else to do here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants