OoT-Randomizer icon indicating copy to clipboard operation
OoT-Randomizer copied to clipboard

Homebrew Header/Summercart64/N64FlashcartMenu Support Possibilities

Open flagrama opened this issue 1 year ago • 1 comments

So this has turned out a little bit more complicated than I expected it to, so I'm making an issue to compile the information I have and kind of have to rely on discussion here or one of the active maintainers to decide what the next step might be.

Essentially I want the N64FlashcartMenu to be an option for those with a flash cart as it will eventually work on Everdrive64 and is the default for Summercart64. I want Summercart64 to also be supported as it can be a cheaper solution for some people, and is also open source so those who want to make their own can do so. There are some complications I have run into trying to make sure this doesn't end up being more of a burden than it is worth.

Currently the N64FlashcartMenu displays information about a game when it is selected but before loading and running it: image This is based on reading the Game ID (CZLE) in the game header to display the data. That means it displays information based on the vanilla game which makes the Expansion Pak information display incorrectly for randomizer ROMs as vanilla OoT does not require an Expansion Pak. While this does not alter how the flashcart performs anything it is misleading information that I suspect would lead to many unnecessary questions for support. There is a chance this may end up hidden in the "Extra Info" menu at some point, at which I think it won't be as much as a problem, but hasn't been decided.

A potential way to fix the info displayed in N64FlashcartMenu is to use the Advanced Homebrew ROM Header. basic doc N64FlashcartMenu code that reads it, expanded from docs There are two issues I found that crop up with this, there may be others as well:

  1. Our version info is at ROM location 0x35, the homebrew header starts at 0x34.
  2. This requires changing the Game ID from CZLE to C 0xED LE. This will likely cause issues with ROM detection in VC.

Summercart64 uses N64FlashcartMenu as its default menu. That's the primary issue with wanting it to be supported. One of the above issues needs to be resolved first for me to be comfortable requesting as such.

If anybody wants to discuss some of this with the developers of N64FlashcartMenu or the Summercart64 they can be found on the N64Brew Discord: https://discord.gg/WqFgNWf in the #n64-flashcart-menu channel. I've already had some discussion with them from when I thought this would be easier to do if you want to read up as well.

flagrama avatar Jul 17 '24 22:07 flagrama

Since I was reminded of this, another possibility would be adding an error message, such as the one on the right here:

Image

In the ovl_title/z_title.c state. The image probably isn't necessary and GfxPrint can be set up to display a message instead of the logo if we check osMemSize and it is less than 0x800000. This would mean that even though the menu says an expansion pak isn't required, the user won't be confused by getting a black screen on boot. They'll be clearly told what the issue is, and the game is certainly a more trustworthy source than a menu launching it, so users should not be as confused when that is the case.

If this is acceptable for OoTR to support the SC64 I'd be willing to do the work for this implementation myself.

flagrama avatar Feb 05 '25 18:02 flagrama

2. This requires changing the Game ID from CZLE to C 0xED LE. This will likely cause issues with ROM detection in VC.

Maybe we can make this change but revert it when patching a wad?

fenhl avatar Jul 13 '25 16:07 fenhl

  1. Our version info is at ROM location 0x35, the homebrew header starts at 0x34.

We also have version info starting at 0x19. That copy of the version info includes the branch identifier and supplementary version, so it would be preferred anyway. An old version of Mido's House Multiworld checks this value, for example. For the copy of the version info starting at 0x35, I'm not aware of any infrastructure referencing it. So I think it should be okay to replace it.

fenhl avatar Jul 13 '25 17:07 fenhl

With that in mind, we're okay with adding this feature.

fenhl avatar Jul 13 '25 17:07 fenhl