summaryrefslogtreecommitdiff
path: root/hram.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-08-30 19:48:49 -0700
committeryenatch <yenatch@gmail.com>2014-08-30 19:48:49 -0700
commit8f49e37b82a90bbef8c7133c4adea8f82abf00e7 (patch)
tree1987ddd65262266ce69b4759caa3b5df493cbb88 /hram.asm
parent365ae68d80683deab0e2e721b8ff79dda4047513 (diff)
Use hram constants for remaining joypad variables.
Diffstat (limited to 'hram.asm')
-rw-r--r--hram.asm41
1 files changed, 22 insertions, 19 deletions
diff --git a/hram.asm b/hram.asm
index b88c248b..4599e950 100644
--- a/hram.asm
+++ b/hram.asm
@@ -1,8 +1,8 @@
-H_SPRITEWIDTH EQU $FF8B ; in bytes
+H_SPRITEWIDTH EQU $FF8B ; in tiles
H_SPRITEINTERLACECOUNTER EQU $FF8B
-H_SPRITEHEIGHT EQU $FF8C ; in bytes
-H_SPRITEOFFSET EQU $FF8D
+H_SPRITEHEIGHT EQU $FF8C ; in tiles
+H_SPRITEOFFSET EQU $FF8D
hSoftReset EQU $FF8A
; Initialized to 16.
@@ -14,28 +14,31 @@ hSoftReset EQU $FF8A
H_DOWNARROWBLINKCNT1 EQU $FF8B
H_DOWNARROWBLINKCNT2 EQU $FF8C
-; Note: the following multiplication and division addresses are used for multiple purposes
-; and so they overlap with each other
+; Multiplcation and division variables are meant
+; to overlap for back-to-back usage. Big endian.
-H_MULTIPLICAND EQU $FF96 ; 3 bytes, big endian order
+H_MULTIPLICAND EQU $FF96 ; 3 bytes
H_MULTIPLIER EQU $FF99 ; 1 byte
-H_PRODUCT EQU $FF95 ; 4 bytes, big endian order
+H_PRODUCT EQU $FF95 ; 4 bytes
-H_DIVIDEND EQU $FF95 ; 4 bytes, big endian order
+H_DIVIDEND EQU $FF95 ; 4 bytes
H_DIVISOR EQU $FF99 ; 1 byte
-H_QUOTIENT EQU $FF95 ; 4 bytes, big endian order
+H_QUOTIENT EQU $FF95 ; 4 bytes
H_REMAINDER EQU $FF99 ; 1 byte
-; used to convert numbers to decimal
-H_PASTLEADINGZEROES EQU $FF95 ; flag to indicate that a nonzero digit has been printed
-H_NUMTOPRINT EQU $FF96 ; 3 bytes, big endian order
-H_POWEROFTEN EQU $FF99 ; 3 bytes, big endian order
-H_SAVEDNUMTOPRINT EQU $FF9C ; 3 bytes, big endian order (to back out of a subtraction)
-
-hJoyHeldLast EQU $FFB1
-hJoyReleased EQU $FFB2
-hJoyPressed EQU $FFB3
-hJoyHeld EQU $FFB4
+; PrintNumber (big endian).
+H_PASTLEADINGZEROES EQU $FF95 ; last char printed
+H_NUMTOPRINT EQU $FF96 ; 3 bytes
+H_POWEROFTEN EQU $FF99 ; 3 bytes
+H_SAVEDNUMTOPRINT EQU $FF9C ; 3 bytes
+
+hJoyHeldLast EQU $FFB1
+hJoyReleased EQU $FFB2
+hJoyPressed EQU $FFB3
+hJoyHeld EQU $FFB4
+hJoy5 EQU $FFB5
+hJoy6 EQU $FFB6
+hJoy7 EQU $FFB7
H_LOADEDROMBANK EQU $FFB8