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

Support TPP1 mapper #846

Closed
ISSOtm opened this issue Apr 19, 2021 · 6 comments · Fixed by #868
Closed

Support TPP1 mapper #846

ISSOtm opened this issue Apr 19, 2021 · 6 comments · Fixed by #868
Labels
enhancement Typically new features; lesser priority than bugs rgbfix This affects RGBFIX
Milestone

Comments

@ISSOtm
Copy link
Member

ISSOtm commented Apr 19, 2021

SameBoy 0.14.3 and BGB 1.5.9 added support for the TPP1 mapper. It may be useful to add support for it in RGBDS, which should amount of changes in RGBFIX.
(RGBASM and RGBLINK already support 31-bit bank IDs, way over TPP1's 16-bit; TPP1 keeps the same ROM layout as the MBCs, making this independent of #524; and any constants for the MR* regs would be handled in a hardware.inc fork or "add-on")

The changes to be made to RGBFIX:

  • Support -m TPP1_1.0 (or similar syntax, to indicate the spec's version); possibly with +BATTERY, +RUMBLE etc. flags to specify what to write to $0153
  • No changes need to be made to ROM padding or ROM size patching
  • $0147, $0149 and $014A must be set to the control values
  • The mapper version must be written to $0150 and $0151
  • The SRAM size calculation is identical, but must be written to $0152 instead
@ISSOtm ISSOtm added enhancement Typically new features; lesser priority than bugs rgbfix This affects RGBFIX labels Apr 19, 2021
@ISSOtm
Copy link
Member Author

ISSOtm commented Apr 19, 2021

Additionally, @aaaaaa123456789's spec mentions that the test ROM needs to be compiled with TPP's fork of RGBDS. What features are required?

@Rangi42 Rangi42 added this to the v0.5.1 milestone Apr 25, 2021
@aaaaaa123456789
Copy link
Member

Additionally, @aaaaaa123456789's spec mentions that the test ROM needs to be compiled with TPP's fork of RGBDS. What features are required?

The only special feature that thing supports is setting the control values and the custom fields in the header, and some minor changes to RGBASM and RGBLINK to increase the bank limit.

@ISSOtm
Copy link
Member Author

ISSOtm commented Apr 27, 2021

Don't they support 32-bit bank IDs?

@aaaaaa123456789
Copy link
Member

No, the max valid bank for TPP1 is $FFFF for ROM and $FF for SRAM.

@ISSOtm
Copy link
Member Author

ISSOtm commented Apr 27, 2021

I'm talking about RGBASM and RGBLINK, which use uint32_t for banks.

@aaaaaa123456789
Copy link
Member

I don't know how RGBDS does bank types now, but that version used the same value for bank type and bank number (using different ranges to tell the bank types apart), so it had to support $10000 (ROM) + 2 (VRAM) + $100 (SRAM) + 8 (WRAM) + 1 (OAM) + 1 (HRAM) = $1010c banks, requiring more than 16 bits.

@ISSOtm ISSOtm mentioned this issue May 1, 2021
3 tasks
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 1, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 1, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 1, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 1, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 2, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 2, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 2, 2021
ISSOtm added a commit to ISSOtm/rgbds that referenced this issue May 2, 2021
ISSOtm added a commit that referenced this issue May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgbfix This affects RGBFIX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants