Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correcting Object RAM layout
The $200 bytes of RAM previously denoted as Object RAM does not seem to ever be used. There are times where it looks like everything from Object_RAM to Object_RAM_End should be used, but only Object_RAM to LevelOnly_Object_RAM_End actually is. Because of this, I think it's clear that Object_RAM_End is in the wrong place, and that $200 bytes of RAM is completely unrelated.
  • Loading branch information
Clownacy committed Nov 7, 2015
1 parent 4158c65 commit 2213778
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions s2.asm
Expand Up @@ -4264,7 +4264,7 @@ Level:
; loc_3F48:
Level_ClrRam:
clearRAM Sprite_Table_Input,(Sprite_Table_Input_End-Sprite_Table_Input)
clearRAM Object_RAM,(LevelOnly_Object_RAM_End-Object_RAM) ; clear object RAM
clearRAM Object_RAM,(Object_RAM_End-Object_RAM) ; clear object RAM
clearRAM MiscLevelVariables,(MiscLevelVariables_End-MiscLevelVariables)
clearRAM Misc_Variables,(Misc_Variables_End-Misc_Variables)
clearRAM Oscillating_Data,(Oscillating_variables_End-Oscillating_variables)
Expand Down Expand Up @@ -27222,7 +27222,7 @@ RunObjects:
cmpi.b #GameModeID_Level,(Game_Mode).w ; regular level mode?
bne.s RunObject ; if not in a level, branch to RunObject
+
move.w #(LevelOnly_Object_RAM_End-Object_RAM)/object_size-1,d7 ; run the first $90 objects in levels
move.w #(Object_RAM_End-Object_RAM)/object_size-1,d7 ; run the first $90 objects in levels
tst.w (Two_player_mode).w
bne.s RunObject ; if in 2 player competition mode, branch to RunObject

Expand Down
3 changes: 2 additions & 1 deletion s2.constants.asm
Expand Up @@ -1046,8 +1046,9 @@ Tails_InvincibilityStars:
ds.b object_size
ds.b object_size
LevelOnly_Object_RAM_End:
ds.b 8*object_size

Object_RAM_End:
ds.b $200 ; unused

Primary_Collision: ds.b $300
Secondary_Collision: ds.b $300
Expand Down

0 comments on commit 2213778

Please sign in to comment.