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

Mask Rom Bank To Required Bits #305

Closed
wants to merge 1 commit into from

Conversation

nishantc1527
Copy link

@nishantc1527 nishantc1527 commented Jan 27, 2024

image
Taken from here

Added this missing functionality to the mbc1 mapper. I am not sure of any games that would require this / break without this. Tests still pass.

@Baekalfen
Copy link
Owner

Hi, thank you for your PR! Have you identified any issue with not having this? Because I think it might be covered by the get method and % self.external_rom_count.

But I can see that we never check 0x148, but that might be good to do in general.

@nishantc1527
Copy link
Author

I did not notice the external_rom_count part, sorry. However, I noticed that this value is gotten from the length of the file. Could this be something else to fix? Because there are cases when the rom file is padded at the end for whatever reason leading to inaccuracies, and reading directly from 0x0148 will prevent inaccuracies.

@Baekalfen
Copy link
Owner

I did not notice the external_rom_count part, sorry. However, I noticed that this value is gotten from the length of the file. Could this be something else to fix? Because there are cases when the rom file is padded at the end for whatever reason leading to inaccuracies, and reading directly from 0x0148 will prevent inaccuracies.

No worries :) Would you like to do a quick survey, and check the games you have? It's allowed to be padded with zeros, but I have no idea how often the files don't match the bank count in 0x148.

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