danielkraak / GC-Loader

151 stars 9 forks source link

Feature Request: Boot From Filesystem #7

Open NWPlayer123 opened 4 years ago

NWPlayer123 commented 4 years ago

it'd be useful for development purposes if the firmware did 1) check boot.iso 2) check sys/main.dol+apploader.img (same layout as e.g. Dolphin) 3) boot IPL

so I can have an extracted game filesystem to perform modifications on without having to boot Swiss

NWPlayer123 commented 4 years ago

not sure how the firmware's architected or how big the flash chip is, could also send a microprogram on boot that captures controller inputs, and then add a config menu if you hold [button combo]

danielkraak commented 4 years ago

What you are asking goes a little above my head to grasp. The flash is 8MB big. In development firmwares, it would boot an ISO written at an offset of 4MB. The idea was that this could for instance store Swiss. We weren't sure if we were allowed to ship Swiss with the GC Loader, so we dropped it. The functionality can still be restored quite easily. It would be nice if people can write Swiss themselves to the flash for instance.

NWPlayer123 commented 4 years ago

What you are asking goes a little above my head to grasp. The flash is 8MB big. In development firmwares, it would boot an ISO written at an offset of 4MB. The idea was that this could for instance store Swiss. We weren't sure if we were allowed to ship Swiss with the GC Loader, so we dropped it. The functionality can still be restored quite easily. It would be nice if people can write Swiss themselves to the flash for instance.

Oh, then you can totally fit it. My suggestion was, since you're literally emulating a DVD drive, you can't get controller inputs, so I was saying to write a mini-program, store it on the flash, and send it on console boot, which lets you capture those button presses, and then if you hold e.g. Z + A on power on, that mini-program can act as the config menu, showing firmware version and being able to change GCLoader-specific configs, and then you can chainload [boot.iso, main.dol, IPL] from there.

Doesn't have to be extremely fancy, something like GCVideo's menu would work.

You could also just include Swiss but that's a problem you'd have to take up with them, I think this minimal approach works better though, just have to make sure you can't accidentally brick your flash.

emukidid commented 4 years ago

so I can have an extracted game filesystem to perform modifications on without having to boot Swiss

@NWPlayer123, it sounds like you're thinking you could have a extracted ISO somewhere on the SD card more than just an alternate internal boot DOL? If so, that would mean that the GCLoader is put into another mode and simulating the file system of a game? Seems like a lot more work than just mounting a ISO file and responding to read requests IMHO.

NWPlayer123 commented 4 years ago

so I can have an extracted game filesystem to perform modifications on without having to boot Swiss

@NWPlayer123, it sounds like you're thinking you could have a extracted ISO somewhere on the SD card more than just an alternate internal boot DOL? If so, that would mean that the GCLoader is put into another mode and simulating the file system of a game? Seems like a lot more work than just mounting a ISO file and responding to read requests IMHO.

I never said it was easy, I said it'd make my life a lot easier than having to build an iso every time I wanted to test on hardware. I guess there is Nintendont but that's Wii-only.

Again, don't know the specifics of the loader but I'd imagine it being like: parse fst.bin (which Dolphin exports and I can generate just as easily if y'all can make it happen), calculate "offsets", and then you can load same as an iso, just with the overhead of finding it on the SD card since it isn't sequential, which is the only snag.

Extrems commented 4 years ago

If we don't need to worry about growing/shrinking files, this should at least be feasible for Swiss by scaling the fragments table way up.