Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load the complete ROM1 - 4MB #6719

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Load the complete ROM1 - 4MB #6719

merged 1 commit into from
Oct 18, 2022

Conversation

Florin9doi
Copy link
Contributor

@Florin9doi Florin9doi commented Jul 26, 2022

Description of Changes

  • Load the complete ROM1 - 4MB
  • EROM is part of ROM1, its exact location vary and can't be predicted, so it was removed. It should already be included in ROM1.
  • To work is required a BIOS dump in the following format:
    • ROM0 (4 MB) / ROM1 (2/4 MB) / ROM2 (0/512 KB)
  • This format won't work is not recommended:
    • BIN (4 MB) / ROM1 (256/512 KB) / EROM (1.75/3 MB) / ROM2 (0/512 KB)
  • GsCrt modes 0x82 and 0x83 are incorrect. Maybe someone will fix them but until then at least they will no longer crash.

@refractionpcsx2
Copy link
Member

why is loading a 4mb block so important? what breaks if you don't do that? The sizes you said don't work are the sizes of those ROMS as reported by the PS2.

@Florin9doi
Copy link
Contributor Author

Florin9doi commented Jul 26, 2022

The issue is that EROM is stored at different locations across models. On FATs it is stored at 0x40000 (early) or 0x80000 (late) relative to ROM1 base. On SLIMs there are multiple copies stored in ROM1, for PAL, USA, JP, and the proper location is determined dynamically. It's hard to guess the proper address for every bios without additional information.

@refractionpcsx2
Copy link
Member

okay, but we can't decrypt the EROM anyways, so it doesn't really matter too much.

@refractionpcsx2
Copy link
Member

if the only issue is the storage location, then the better idea would to be to map it correctly like we do with NVM files depending on the BIOS revision, then it's not a problem.

@Florin9doi
Copy link
Contributor Author

It may offer time to users to extract their BIOS in the expected format for when the decryption will be possible 😄

@F0bes
Copy link
Member

F0bes commented Jul 26, 2022

I assume this is the result of a conversation I had in a discord server with someone else.
Completely ignoring this point I brought up then too:

okay, but we can't decrypt the EROM anyways, so it doesn't really matter too much.

I'm against this as I don't see the point in this. Even if you really need the erom in it's proper place, let's not break compatibility with the old dumper, and now, the new dumper that was just released. You've failed to provide a good reason to do this.

@uyjulian
Copy link
Contributor

I think it would be better to keep compatibility with the broken, old layout alongside the new layout.

@Florin9doi
Copy link
Contributor Author

Florin9doi commented Jul 26, 2022

The underdumped BIOSes will continue to work exactly the same how they work today. The EROM was only loaded so far, but it was not even mapped to PS2 memory, it was completely unused.

@refractionpcsx2
Copy link
Member

If that's true, why didn't you open with that? Not being mapped at all is a much more valid reason than "This thing we can't use is in the wrong place"

However it looks like it was mapped to EROM to me?

@Florin9doi
Copy link
Contributor Author

@refractionpcsx2
Copy link
Member

Okay I see what you mean.

@refractionpcsx2
Copy link
Member

well, it would be nice if you provided a solution for all existing bios dumps, if an .erom file is detected then map that to the correct space in memory. You can check the BIOS version and adjust the mapped location manually. I don't agree with not supporting existing roms and rom dumpers to force your own ideal on to everyone.

@refractionpcsx2
Copy link
Member

Woudl you like to try F0bes/biosdrain#10 along with your PR? Also if you could make your commit names somewhat match our standard that would be cool (an appropriate prefix, like BIOS: or something..)

EROM is part of ROM1, its exact location vary and can't be predicted
@Florin9doi
Copy link
Contributor Author

Florin9doi commented Oct 17, 2022

Rebased and prefixed. I tested F0bes/biosdrain#10 on a 90k and it extracts a bios compatible with this PR, having the expected results (both alone and combined with #4274). After these changes, the bios files may be checked against redump database - eventually automatically.

@refractionpcsx2
Copy link
Member

Alright, thanks :)

@refractionpcsx2 refractionpcsx2 merged commit 8fbb1e5 into PCSX2:master Oct 18, 2022
@Florin9doi Florin9doi deleted the rom1 branch October 18, 2022 10:20
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.

None yet

4 participants