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

Register ordering, byte-based sizes, OAM additions, general cleanup #4

Merged
merged 12 commits into from
Aug 28, 2020

Conversation

BlitterObjectBob
Copy link
Contributor

I'm not a fan of the 'o'-named register EQUs (for offset), but couldn't think of anything else.

@avivace avivace requested review from ISSOtm and Sanqui April 21, 2019 08:17
Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Positive:

  • I really like the ordering of the registers, especially as they're naturally grouped (are there exceptions? I'm not aware of any)
  • I also like the new constants. That said, CPU_CGB could be renamed to something more explicit? BOOTUP_CGB, maybe?

Negative:

  • The oXX change is useless imo, because it's strictly equivalent to LOW(rXX).

Neutral:

  • _HW. Also I'd rather have called it _IO

Unrelated:

  • What about adding byte constants for ROM and SRAM sizes? Everyone uses bytes nowadays.

- Add more memory map convenience equ's
- Add rSMBK which makes more sense (to me) than rSVBK
- Revert the 'o' equ's
- Rename the bootup CPU values
- Changed to kilobyte-based size equ's
@BlitterObjectBob BlitterObjectBob changed the title Added offsets for the registers, register ordering, cleanup Register ordering, byte-based sizes, general cleanup Jul 4, 2020
@BlitterObjectBob
Copy link
Contributor Author

BlitterObjectBob commented Jul 4, 2020

I have a local change (not committed yet) related to the bootup values:

;***************************************************************************
;*
;* CPU values on bootup (a=type, b=qualifier)
;*
;***************************************************************************

BOOTUP_A_DMG    EQU $01 ; Dot Matrix Game
BOOTUP_A_CGB    EQU $11 ; Color GameBoy
BOOTUP_A_MGB    EQU $FF ; Mini GameBoy (Pocket GameBoy)

; if a=BOOTUP_A_CGB, bit 0 in b can be checked to determine if real CGB or
; other system running in GBC mode
BOOTUP_B_CGB    EQU %00000000
BOOTUP_B_OTHER  EQU %00000001   ; GBA, GBA SP, Game Boy Player, or New GBA SP

Thoughts on including this in the PR? Thoughts in general?

@BlitterObjectBob BlitterObjectBob changed the title Register ordering, byte-based sizes, general cleanup Register ordering, byte-based sizes, OAM additions, general cleanup Jul 4, 2020
@BlitterObjectBob
Copy link
Contributor Author

I've included them (plus OAM changes) in the PR for commenting there.

@BlitterObjectBob
Copy link
Contributor Author

Bump :)

hardware.inc Show resolved Hide resolved
hardware.inc Outdated Show resolved Hide resolved
hardware.inc Outdated Show resolved Hide resolved
hardware.inc Show resolved Hide resolved
hardware.inc Show resolved Hide resolved
hardware.inc Outdated Show resolved Hide resolved
hardware.inc Show resolved Hide resolved
hardware.inc Show resolved Hide resolved
hardware.inc Outdated Show resolved Hide resolved
hardware.inc Outdated Show resolved Hide resolved
hardware.inc Show resolved Hide resolved
@mid-kid
Copy link

mid-kid commented Aug 16, 2020

Suggestion: BOOTUP_B_OTHER -> BOOTUP_B_AGB, because you can summarize all of the GBA platforms with that.

hardware.inc Outdated
@@ -739,7 +739,7 @@ BOOTUP_A_MGB EQU $FF ; Mini GameBoy (Pocket GameBoy)
; if a=BOOTUP_A_CGB, bit 0 in b can be checked to determine if real CGB or
; other system running in GBC mode
BOOTUP_B_CGB EQU %00000000
BOOTUP_B_OTHER EQU %00000001 ; GBA, GBA SP, Game Boy Player, or New GBA SP
BOOTUP_B_AGB EQU %00000001 ; AGB, AGB SP, Game Boy Player, or New AGB SP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either "GBA SP" or "AGS", but pick one :p

@avivace
Copy link
Sponsor Member

avivace commented Aug 28, 2020

Wow, this went a long way. I like the changes.

Thank you for sticking with this, @BlitterObjectBob and @ISSOtm !

@avivace avivace merged commit 7532146 into gbdev:master Aug 28, 2020
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