diff --git a/README.md b/README.md index bb62a71..561cb52 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![](https://raw.githubusercontent.com/grubbyplaya/Sonic-2-CE/master/s2banner.png) -A currently unfinished port of the Sega Master System version of Sonic 2 to the TI-84+ CE. +A mostly complete port of the Sega Master System version of Sonic 2 to the TI-84+ CE. -So far, the game assembles into 32 appvars totaling 443 kilobytes in size. Every level works, but there are some image artifacts in some stages. +The game is 443 kilobytes in size. Make sure that every appvar and the launcher is loaded into archive memory, as the game will crash if any appvar is stored in RAM. # Controls @@ -20,7 +20,7 @@ Delete - Reset Game - [x] Get the codebase to assemble using SPASM - [x] Reimplement SMS mappers using appvars - [x] Replace original 6bpp palettes with 16bpp approximations - - [x] Emulate the SMS VDP, rendering, caches, and all (~99% done) + - [x] Emulate the SMS VDP, rendering, caches, and all - [x] Fix remaining runtime errors - [ ] (MID PRIORITY) Get the game running at full speed - [ ] (VERY LOW PRIORITY) expand the rendering area to fill the 84+ CE's screen \ No newline at end of file diff --git a/src/art/sonic/art_ucmp_sonic.bin b/src/art/sonic/art_ucmp_sonic.bin index 350e088..ad8d529 100644 Binary files a/src/art/sonic/art_ucmp_sonic.bin and b/src/art/sonic/art_ucmp_sonic.bin differ diff --git a/src/art/sonic/art_ucmp_sonic_mirrored.bin b/src/art/sonic/art_ucmp_sonic_mirrored.bin index 7fa5735..5da8ed7 100644 Binary files a/src/art/sonic/art_ucmp_sonic_mirrored.bin and b/src/art/sonic/art_ucmp_sonic_mirrored.bin differ diff --git a/src/bin/Sonic2.8xv b/src/bin/Sonic2.8xv index 90a7dc6..d4c9140 100644 Binary files a/src/bin/Sonic2.8xv and b/src/bin/Sonic2.8xv differ diff --git a/src/bin/bank04.8xv b/src/bin/bank04.8xv index bb96b41..c7bc924 100644 Binary files a/src/bin/bank04.8xv and b/src/bin/bank04.8xv differ diff --git a/src/bin/bank16.8xv b/src/bin/bank16.8xv index 47e4651..562aeef 100644 Binary files a/src/bin/bank16.8xv and b/src/bin/bank16.8xv differ diff --git a/src/bin/bank30.8xv b/src/bin/bank30.8xv index d1f857e..4d3ce7b 100644 Binary files a/src/bin/bank30.8xv and b/src/bin/bank30.8xv differ diff --git a/src/bin/bank31.8xv b/src/bin/bank31.8xv index a0d289e..914f1be 100644 Binary files a/src/bin/bank31.8xv and b/src/bin/bank31.8xv differ diff --git a/src/bin/sonic2.8xp b/src/bin/sonic2.8xp index 5c99050..498b472 100644 Binary files a/src/bin/sonic2.8xp and b/src/bin/sonic2.8xp differ diff --git a/src/includes/defines.asm b/src/includes/defines.asm index 26738a1..c255cc7 100644 --- a/src/includes/defines.asm +++ b/src/includes/defines.asm @@ -6,11 +6,11 @@ ; --------------------------------------------------------- -; Timing Definitions (based on 60hz display) +; Timing Definitions (based on 30hz display) ; --------------------------------------------------------- -#define Time_1Second 60 -#define Time_2Seconds 120 -#define Time_3Seconds 180 +#define Time_1Second 30 +#define Time_2Seconds 60 +#define Time_3Seconds 90 ; --------------------------------------------------------- ; Global Triggers Bitfield diff --git a/src/includes/player_states.asm b/src/includes/player_states.asm index c7d73d5..341cd69 100644 --- a/src/includes/player_states.asm +++ b/src/includes/player_states.asm @@ -1,5 +1,5 @@ #define PlayerState_Standing $01 -#define PlayerState_Idle $02 ;idle animation +#define PlayerState_Idle $02 ;idle animation #define PlayerState_LookUp $03 #define PlayerState_Crouch $04 #define PlayerState_Walking $05 @@ -25,7 +25,7 @@ #define PlayerState_JumpFromRamp $1B ;e.g. in UGZ-3 before boss & when exiting SEZ/ALZ tube #define PlayerState_DiagonalSpring $1C ;set after collision with diagonal spring #define PlayerState_FallFromLoop $1D ;set if a player falls from loop (not moving fast enough). -#define PlayerState_Hurt $1E +#define PlayerState_Hurt $1E #define PlayerState_LostLife $1F #define PlayerState_EndOfLevel $20 ;Set at end of level. CPU controlled movement off of screen. #define PlayerState_InPipe $21 ;Set in ALZ/SEZ on entering a pipe. diff --git a/src/includes/ti_equates.asm b/src/includes/ti_equates.asm index 12c6a4d..2cc5ee7 100644 --- a/src/includes/ti_equates.asm +++ b/src/includes/ti_equates.asm @@ -18,6 +18,7 @@ #define SegaTileCache pixelShadow #define VRAM $D40000 #define VRAMEnd VRAM+((320*240)*2) +#define mpLcdTiming1 $E30004 #define mpLcdCtrl $E30018 #define mpLcdImsc $E3001C #define mpLcdRis $E30020 diff --git a/src/layout/ghz/layout_ghz3.bin b/src/layout/ghz/layout_ghz3.bin index 88df73e..9060f96 100644 Binary files a/src/layout/ghz/layout_ghz3.bin and b/src/layout/ghz/layout_ghz3.bin differ diff --git a/src/level_select.asm b/src/level_select.asm index 05abcc2..0170df8 100644 --- a/src/level_select.asm +++ b/src/level_select.asm @@ -327,7 +327,9 @@ LevelSelect_Values: .db $06, $02 ;Crystal Egg Zone - Act 3 LevelSelect_MainLoop: ;0E46 - call Engine_WaitForInterrupt + ei + halt + di call _CheckInput call _DrawCursor ld a, (Engine_InputFlags) diff --git a/src/object_logic/bank30_logic.asm b/src/object_logic/bank30_logic.asm index b68a9b7..72ff08d 100644 --- a/src/object_logic/bank30_logic.asm +++ b/src/object_logic/bank30_logic.asm @@ -1417,7 +1417,7 @@ LABEL_B30_9826: inc hl ld (ix+$1e), l ld (ix+$1f), h - ld de, $01e0 + ld de, $00F0 xor a sbc hl, de ld a, h diff --git a/src/s2.lab b/src/s2.lab index 408303d..fbda0be 100644 --- a/src/s2.lab +++ b/src/s2.lab @@ -1,57 +1,57 @@ -_CHECKINPUT = $0CA3 -_DATA_05AA = $0594 -_DATA_7761 = $6FC6 -_DRAWCURSOR = $0CF4 +_CHECKINPUT = $0CA9 +_DATA_05AA = $0597 +_DATA_7761 = $6F4A +_DRAWCURSOR = $0CFA _ERROR_MSG = $0067 -_GETCOMPRESSIONTYPE = $15AF -_LABEL_1AA6_22 = $14D8 -_LOAD_INTRO_LEVEL = $0D0F -_LOAD_TITLE_LEVEL = $0DE5 -_MOVECURSORDOWN = $0CE4 -_MOVECURSORUP = $0CD5 -_PLAYER_ANIM_BALANCEFRAMECOUNTERS = $338D -_PLAYER_ANIM_BALANCEFRAMES = $3379 -_PLAYER_CHANGEFRAMEDISPLAYTIME_WALKFRAMECOUNTERS = $332F -_PORT1_INPUT = $148E -_RESETCURSORVELOCITY = $0CD0 +_GETCOMPRESSIONTYPE = $15B5 +_LABEL_1AA6_22 = $14DE +_LOAD_INTRO_LEVEL = $0D15 +_LOAD_TITLE_LEVEL = $0DEB +_MOVECURSORDOWN = $0CEA +_MOVECURSORUP = $0CDB +_PLAYER_ANIM_BALANCEFRAMECOUNTERS = $3311 +_PLAYER_ANIM_BALANCEFRAMES = $32FD +_PLAYER_CHANGEFRAMEDISPLAYTIME_WALKFRAMECOUNTERS = $32B3 +_PORT1_INPUT = $1494 +_RESETCURSORVELOCITY = $0CD6 _START = $0000 -_TILEMAPPINGS = $0D09 -_UNKNOWN_6 = $13F7 -_VDP_INITREGISTERS_REGVALUES = $1039 +_TILEMAPPINGS = $0D0F +_UNKNOWN_6 = $13FD +_VDP_INITREGISTERS_REGVALUES = $103F ACT1 = $0000 ACT2 = $0001 ACT3 = $0002 -ALT_PALETTE_GMZ_CONVEYOR = $79A0 +ALT_PALETTE_GMZ_CONVEYOR = $7924 APPVAROBJ = $0015 ARC_UNARC = $21448 BACKGROUNDXSCROLL = $D172 BACKGROUNDYSCROLL = $D173 -BANK04 = $7B7E -BANK05 = $7B86 -BANK06 = $7B8E -BANK07 = $7B96 -BANK08 = $7B9E -BANK09 = $7BA6 -BANK10 = $7BAE -BANK11 = $7BB6 -BANK12 = $7BBE -BANK13 = $7BC6 -BANK14 = $7BCE -BANK15 = $7BD6 -BANK16 = $7BDE -BANK17 = $7BE6 -BANK18 = $7BEE -BANK19 = $7BF6 -BANK20 = $7BFE -BANK21 = $7C06 -BANK22 = $7C0E -BANK23 = $7C16 -BANK24 = $7C1E -BANK25 = $7C26 -BANK26 = $7C2E -BANK27 = $7C36 +BANK04 = $7B02 +BANK05 = $7B0A +BANK06 = $7B12 +BANK07 = $7B1A +BANK08 = $7B22 +BANK09 = $7B2A +BANK10 = $7B32 +BANK11 = $7B3A +BANK12 = $7B42 +BANK13 = $7B4A +BANK14 = $7B52 +BANK15 = $7B5A +BANK16 = $7B62 +BANK17 = $7B6A +BANK18 = $7B72 +BANK19 = $7B7A +BANK20 = $7B82 +BANK21 = $7B8A +BANK22 = $7B92 +BANK23 = $7B9A +BANK24 = $7BA2 +BANK25 = $7BAA +BANK26 = $7BB2 +BANK27 = $7BBA BANK28 = $D071F6 -BANK29 = $7C46 +BANK29 = $7BCA BANK30 = $D0B1F6 BANK31 = $D0F1F6 BANKSLOT2 = $8000 @@ -70,17 +70,17 @@ BTN_RIGHT = $0008 BTN_RIGHT_BIT = $0003 BTN_UP = $0001 BTN_UP_BIT = $0000 -CALCULATEPLAYERDIRECTION = $2B9F +CALCULATEPLAYERDIRECTION = $2B23 CAMERA_METATILECOLBUFFER = $D178 CAMERA_METATILEPTR = $D278 CAMERA_X = $D174 CAMERA_Y = $D176 CAMERAOFFSETX = $D288 CAMERAOFFSETY = $D289 -CHANGEGAMEMODE = $1E58 -CHAOSEMERALDDATA = $7228 -CHECKFORBANK = $7A2B -CHECKFORBANK_TOGGLEINTERRUPT = $7A71 +CHANGEGAMEMODE = $1E5E +CHAOSEMERALDDATA = $71AC +CHECKFORBANK = $79AF +CHECKFORBANK_TOGGLEINTERRUPT = $79F5 CHKFINDSYM = $2050C CLLSN_ADJUSTEDX = $D356 CLLSN_ADJUSTEDY = $D358 @@ -90,332 +90,332 @@ CLLSN_HEADERPTR3 = $D36F CLLSN_LEVELMAPBLOCKPTR = $D354 CLLSN_METATILEINDEX = $D353 CLLSN_METATILESURFACETYPE = $D35E -CLLSN_METATILETRIGGERFUNCPTRS = $659E +CLLSN_METATILETRIGGERFUNCPTRS = $6522 CLLSN_METATILEX = $D35A CLLSN_METATILEY = $D35C -CLLSN_PROJECTVERTICAL = $690E -CLLSN_PROJECTVERTICAL_EPILOGUE = $6958 -CLLSN_PROJECTVERTICAL_NOALTER = $695A +CLLSN_PROJECTVERTICAL = $6892 +CLLSN_PROJECTVERTICAL_EPILOGUE = $68DC +CLLSN_PROJECTVERTICAL_NOALTER = $68DE CLLSN_RINGBLOCK = $D352 CLRLCDFULL = $20808 CMDPIXELSHADOW = $D07396 -COLLISION_MONITOR = $41A1 -COLLISION_MONITOR_CONTINUE = $41ED -COLLISION_MONITOR_INVINCIBILITY = $4213 -COLLISION_MONITOR_LIFE = $41E1 -COLLISION_MONITOR_RINGS = $41C3 -COLLISION_MONITOR_SNEAKERS = $41FA +COLLISION_MONITOR = $4125 +COLLISION_MONITOR_CONTINUE = $4171 +COLLISION_MONITOR_INVINCIBILITY = $4197 +COLLISION_MONITOR_LIFE = $4165 +COLLISION_MONITOR_RINGS = $4147 +COLLISION_MONITOR_SNEAKERS = $417E CONTINUECOUNTER = $D2BD CONTINUESCREEN_COUNT = $D2C4 -CONTINUESCREEN_DRAWSCREEN = $2200 -CONTINUESCREEN_LOADNUMBERMAPPINGS = $223D -CONTINUESCREEN_LOADNUMBERTILES = $7008 -CONTINUESCREEN_LOADTILES = $6FF5 -CONTINUESCREEN_MAINLOOP = $071E +CONTINUESCREEN_DRAWSCREEN = $2206 +CONTINUESCREEN_LOADNUMBERMAPPINGS = $2243 +CONTINUESCREEN_LOADNUMBERTILES = $6F8C +CONTINUESCREEN_LOADTILES = $6F79 +CONTINUESCREEN_MAINLOOP = $0721 CONTINUESCREEN_TIMER = $D2C3 CONTROLBYTE = $D2D2 -CONVERTPIXELROW = $D27F71 -CONVERTTILETO8BPP = $D27F51 +CONVERTPIXELROW = $D27F15 +CONVERTTILETO8BPP = $D27EF5 CPHLDE = $2013C CRAM = $E30200 CURRENTACT = $D296 CURRENTLEVEL = $D295 CURRENTMETATILEADDR = $D23D CURSORPOS = $D2C2 -DATA_1E6D = $18B8 -DATA_1E76 = $18C1 -DATA_1E79 = $18C4 -DATA_1E7C = $18C7 -DATA_1E7F = $18CA -DATA_1E82 = $18CD -DATA_1E85 = $18D0 -DATA_1E88 = $18D3 -DATA_1E8B = $18D6 -DATA_1E8E = $18D9 -DATA_1E91 = $18DC -DATA_1E94 = $18DF -DATA_1E97 = $18E2 -DATA_1E9A = $18E5 -DATA_1E9D = $18E8 -DATA_1EA0 = $18EB -DATA_1EA3 = $18EE -DATA_1EA6 = $18F1 -DATA_1EA9 = $18F4 -DATA_1EAC = $18F7 -DATA_1EAF = $18FA -DATA_1EB2 = $18FD -DATA_1EB5 = $1900 -DATA_1EB8 = $1903 -DATA_1EBB = $1906 -DATA_1EBE = $1909 -DATA_1EC1 = $190C -DATA_1EC4 = $190F -DATA_1EC7 = $1912 -DATA_1ECA = $1915 -DATA_1ECD = $1918 -DATA_1ED0 = $191B -DATA_1ED3 = $191E -DATA_1ED6 = $1921 -DATA_1ED9 = $1924 -DATA_1EDC = $1927 -DATA_1EDF = $192A -DATA_1EE2 = $192D -DATA_1EE5 = $1930 -DATA_1EE8 = $1933 -DATA_1EEB = $1936 -DATA_1F70 = $19BB -DATA_1FE4 = $1A2F -DATA_231A = $1D5C -DATA_2320 = $1D62 -DATA_23F8 = $1E3A -DATA_2402 = $1E44 -DATA_240C = $1E4E -DATA_28FE = $230D -DATA_2904 = $2313 -DATA_2974 = $2383 -DATA_299C = $23AB -DATA_29C4 = $23D3 -DATA_2A34 = $2443 -DATA_2AA4 = $24B3 -DATA_2B14 = $2523 -DATA_2B84 = $2593 -DATA_2BF4 = $2603 -DATA_2C64 = $2673 -DATA_2D0C = $271B -DATA_2D6C = $277B -DATA_2D98 = $27A7 -DATA_2DAC = $27BB -DATA_2DC0 = $27CF -DATA_2DD4 = $27E3 -DATA_2E04 = $2813 -DATA_2E90 = $289F -DATA_2F1C = $292B +DATA_1E6D = $18BE +DATA_1E76 = $18C7 +DATA_1E79 = $18CA +DATA_1E7C = $18CD +DATA_1E7F = $18D0 +DATA_1E82 = $18D3 +DATA_1E85 = $18D6 +DATA_1E88 = $18D9 +DATA_1E8B = $18DC +DATA_1E8E = $18DF +DATA_1E91 = $18E2 +DATA_1E94 = $18E5 +DATA_1E97 = $18E8 +DATA_1E9A = $18EB +DATA_1E9D = $18EE +DATA_1EA0 = $18F1 +DATA_1EA3 = $18F4 +DATA_1EA6 = $18F7 +DATA_1EA9 = $18FA +DATA_1EAC = $18FD +DATA_1EAF = $1900 +DATA_1EB2 = $1903 +DATA_1EB5 = $1906 +DATA_1EB8 = $1909 +DATA_1EBB = $190C +DATA_1EBE = $190F +DATA_1EC1 = $1912 +DATA_1EC4 = $1915 +DATA_1EC7 = $1918 +DATA_1ECA = $191B +DATA_1ECD = $191E +DATA_1ED0 = $1921 +DATA_1ED3 = $1924 +DATA_1ED6 = $1927 +DATA_1ED9 = $192A +DATA_1EDC = $192D +DATA_1EDF = $1930 +DATA_1EE2 = $1933 +DATA_1EE5 = $1936 +DATA_1EE8 = $1939 +DATA_1EEB = $193C +DATA_1F70 = $19C1 +DATA_1FE4 = $1A35 +DATA_231A = $1D62 +DATA_2320 = $1D68 +DATA_23F8 = $1E40 +DATA_2402 = $1E4A +DATA_240C = $1E54 +DATA_28FE = $2291 +DATA_2904 = $2297 +DATA_2974 = $2307 +DATA_299C = $232F +DATA_29C4 = $2357 +DATA_2A34 = $23C7 +DATA_2AA4 = $2437 +DATA_2B14 = $24A7 +DATA_2B84 = $2517 +DATA_2BF4 = $2587 +DATA_2C64 = $25F7 +DATA_2D0C = $269F +DATA_2D6C = $26FF +DATA_2D98 = $272B +DATA_2DAC = $273F +DATA_2DC0 = $2753 +DATA_2DD4 = $2767 +DATA_2E04 = $2797 +DATA_2E90 = $2823 +DATA_2F1C = $28AF DATA_330 = $0326 -DATA_4016 = $3A03 -DATA_43D3 = $3DC0 -DATA_543F = $4DA8 -DATA_5445 = $4DAE -DATA_544B = $4DB4 -DATA_54F9 = $4E62 -DATA_5501 = $4E6A -DATA_5509 = $4E72 -DATA_5511 = $4E7A -DATA_5519 = $4E82 -DATA_5521 = $4E8A -DATA_5529 = $4E92 -DATA_62BD = $5C20 -DATA_6404 = $5D5B -DATA_65A = $05BD -DATA_6975 = $62AC -DATA_6B27 = $6456 -DATA_6BB2 = $64E1 -DATA_6D41 = $6663 -DATA_6D41_END = $666B -DATA_ACCELERATIONVALUES_LEFT = $3783 -DATA_ACCELERATIONVALUES_LEFT_UNDERWATER = $3903 -DATA_ACCELERATIONVALUES_RIGHT = $3703 -DATA_ACCELERATIONVALUES_RIGHT_UNDERWATER = $3883 +DATA_4016 = $3987 +DATA_43D3 = $3D44 +DATA_543F = $4D2C +DATA_5445 = $4D32 +DATA_544B = $4D38 +DATA_54F9 = $4DE6 +DATA_5501 = $4DEE +DATA_5509 = $4DF6 +DATA_5511 = $4DFE +DATA_5519 = $4E06 +DATA_5521 = $4E0E +DATA_5529 = $4E16 +DATA_62BD = $5BA4 +DATA_6404 = $5CDF +DATA_65A = $05C0 +DATA_6975 = $6230 +DATA_6B27 = $63DA +DATA_6BB2 = $6465 +DATA_6D41 = $65E7 +DATA_6D41_END = $65EF +DATA_ACCELERATIONVALUES_LEFT = $3707 +DATA_ACCELERATIONVALUES_LEFT_UNDERWATER = $3887 +DATA_ACCELERATIONVALUES_RIGHT = $3687 +DATA_ACCELERATIONVALUES_RIGHT_UNDERWATER = $3807 DATA_B30_9841 = $E000 DATA_B30_9A41 = $E200 -DATA_B30_AF41 = $7985 -DATA_B30_AF4A = $798E -DATA_B30_AF51 = $7995 -DATA_B30_AF53 = $7997 -DATA_B30_AF5C = $79A0 -DATA_B30_AF61 = $79A5 -DATA_B30_AF65 = $79A9 -DATA_B30_AF7D = $79C1 -DATA_B30_AF83 = $79C7 -DATA_B30_AF9F = $79E3 -DATA_B30_AFCF = $7A13 -DATA_B30_AFD5 = $7A19 -DATA_B30_AFDB = $7A1F -DATA_DECELERATIONVALUES = $3803 -DATA_OFFSCREENBUFFEROFFSETS = $5367 -DATA_RINGCOLLISION_METATILES = $6CDF -DATA_SONICLOOPANIMATIONS = $3426 -DATA_SONICLOOPFALLFRAMES = $33E2 +DATA_B30_AF41 = $7909 +DATA_B30_AF4A = $7912 +DATA_B30_AF51 = $7919 +DATA_B30_AF53 = $791B +DATA_B30_AF5C = $7924 +DATA_B30_AF61 = $7929 +DATA_B30_AF65 = $792D +DATA_B30_AF7D = $7945 +DATA_B30_AF83 = $794B +DATA_B30_AF9F = $7967 +DATA_B30_AFCF = $7997 +DATA_B30_AFD5 = $799D +DATA_B30_AFDB = $79A3 +DATA_DECELERATIONVALUES = $3787 +DATA_OFFSCREENBUFFEROFFSETS = $52EB +DATA_RINGCOLLISION_METATILES = $6C63 +DATA_SONICLOOPANIMATIONS = $33AA +DATA_SONICLOOPFALLFRAMES = $3366 DEMOBANK = $D2D8 DEMONUMBER = $D2D7 -DEMOSEQUENCE_CHANGELEVEL = $1F14 -DEMOSEQUENCE_LOADLEVEL = $1F7F -DEMOSEQUENCE_PLAYDEMO = $1EA6 -DONOTHINGSTUB = $5E07 -DRAW8BPPTILEEND = $D27FA0 -DRAWCACHEDPIXEL = $D27F92 -DRAWCACHEDTILE = $D27D73 -DRAWCACHEDTILE_FLIPPEDX = $D27DD6 -DRAWPIXEL = $D27F91 -DRAWSAT = $D27ED2 +DEMOSEQUENCE_CHANGELEVEL = $1F1A +DEMOSEQUENCE_LOADLEVEL = $1F85 +DEMOSEQUENCE_PLAYDEMO = $1EAC +DONOTHINGSTUB = $5D8B +DRAW8BPPTILEEND = $D27F44 +DRAWCACHEDPIXEL = $D27F36 +DRAWCACHEDTILE = $D27D03 +DRAWCACHEDTILE_FLIPPEDX = $D27D66 +DRAWPIXEL = $D27F35 +DRAWSAT = $D27E62 DRAWSATTRIG = $D4C1 -DRAWSCREEN = $7C56 -DRAWSCREENMAP = $D27CEB -DRAWSCREENMAP_TILES = $D27D1B +DRAWSCREEN = $7BDA +DRAWSCREENMAP = $D27C7B +DRAWSCREENMAP_TILES = $D27CAB DRAWTILEMAPTRIG = $D4C0 EMERALDFLAGS = $D2C5 -ENGINE_ADJUSTPLAYERAFTERCOLLISION = $5D48 -ENGINE_ALLOCATEOBJECTHIGHPRIORITY = $5AA8 -ENGINE_ALLOCATEOBJECTLOWPRIORITY = $5AC9 -ENGINE_ANIMATERINGART = $780D -ENGINE_CALCULATEBGSCROLL = $43EC -ENGINE_CALCULATECAMERABOUNDS = $580E -ENGINE_CAMERAADJUST = $57D0 -ENGINE_CAPLIFECOUNTERVALUE = $1FDA -ENGINE_CHECKCOLLISION = $6179 -ENGINE_CHECKCOLLISION_BOTTOM = $61EC -ENGINE_CHECKCOLLISION_LEFT = $61D1 -ENGINE_CHECKCOLLISION_RETURN = $6266 -ENGINE_CHECKCOLLISION_TOP = $620A -ENGINE_CHECKCOLLISION_UPDATEOBJECTFLAGS = $621E -ENGINE_CHECKCOLLISIONANDADJUSTPLAYER = $5CB2 -ENGINE_CHECKGLOBALTRIGGERS = $05F2 -ENGINE_CHECKHASEMERALD = $07AC -ENGINE_CLEARAUXLEVELHEADER = $75A3 -ENGINE_CLEARLEVELATTRIBUTES = $4E9A -ENGINE_CLEARPALETTERAM = $7083 -ENGINE_CLEARPLAYERTILES = $0F09 -ENGINE_CLEARUNDERWATER = $4317 -ENGINE_CLEARVRAM = $7054 -ENGINE_CLEARWORKINGVRAM = $1C25 -ENGINE_COLLISION_ADJUSTVERTICALPOS = $69AF +ENGINE_ADJUSTPLAYERAFTERCOLLISION = $5CCC +ENGINE_ALLOCATEOBJECTHIGHPRIORITY = $5A2C +ENGINE_ALLOCATEOBJECTLOWPRIORITY = $5A4D +ENGINE_ANIMATERINGART = $7791 +ENGINE_CALCULATEBGSCROLL = $4370 +ENGINE_CALCULATECAMERABOUNDS = $5792 +ENGINE_CAMERAADJUST = $5754 +ENGINE_CAPLIFECOUNTERVALUE = $1FE0 +ENGINE_CHECKCOLLISION = $60FD +ENGINE_CHECKCOLLISION_BOTTOM = $6170 +ENGINE_CHECKCOLLISION_LEFT = $6155 +ENGINE_CHECKCOLLISION_RETURN = $61EA +ENGINE_CHECKCOLLISION_TOP = $618E +ENGINE_CHECKCOLLISION_UPDATEOBJECTFLAGS = $61A2 +ENGINE_CHECKCOLLISIONANDADJUSTPLAYER = $5C36 +ENGINE_CHECKGLOBALTRIGGERS = $05F5 +ENGINE_CHECKHASEMERALD = $07AF +ENGINE_CLEARAUXLEVELHEADER = $7527 +ENGINE_CLEARLEVELATTRIBUTES = $4E1E +ENGINE_CLEARPALETTERAM = $7007 +ENGINE_CLEARPLAYERTILES = $0F0F +ENGINE_CLEARUNDERWATER = $429B +ENGINE_CLEARVRAM = $6FD8 +ENGINE_CLEARWORKINGVRAM = $1C2B +ENGINE_COLLISION_ADJUSTVERTICALPOS = $6933 ENGINE_COLLISIONDATAPTR = $D2D4 -ENGINE_COPYMAPPINGSCOLUMNTOVRAM = $5278 -ENGINE_COPYMAPPINGSROWTOVRAM = $5342 -ENGINE_COPYMAPPINGSTOVRAM_COLUMN = $5220 -ENGINE_COPYMAPPINGSTOVRAM_ROW = $52E7 -ENGINE_COPYPALETTES = $0F77 -ENGINE_CREATEBLOCKFRAGMENTOBJECTS = $6B2D +ENGINE_COPYMAPPINGSCOLUMNTOVRAM = $51FC +ENGINE_COPYMAPPINGSROWTOVRAM = $52C6 +ENGINE_COPYMAPPINGSTOVRAM_COLUMN = $51A4 +ENGINE_COPYMAPPINGSTOVRAM_ROW = $526B +ENGINE_COPYPALETTES = $0F7D +ENGINE_CREATEBLOCKFRAGMENTOBJECTS = $6AB1 ENGINE_DATA_BYTEFLIPLUT = $0100 -ENGINE_DATA_STATUSICONDEFAULTS = $1C64 -ENGINE_DEALLOCATEOBJECT = $5BAC -ENGINE_DEMO_MOVEPLAYER = $14BE +ENGINE_DATA_STATUSICONDEFAULTS = $1C6A +ENGINE_DEALLOCATEOBJECT = $5B30 +ENGINE_DEMO_MOVEPLAYER = $14C4 ENGINE_DEMOSEQ_BANK = $D2D8 -ENGINE_DISPLAYEXPLOSIONOBJECT = $5BEF -ENGINE_DIVIDE_16_BY_U8 = $166C +ENGINE_DISPLAYEXPLOSIONOBJECT = $5B73 +ENGINE_DIVIDE_16_BY_U8 = $1672 ENGINE_DYNPALETTE_0 = $D4A6 ENGINE_DYNPALETTE_1 = $D4AE ENGINE_ERRORTRAP = $006C -ENGINE_GETCOLLISIONDATA_CLEANUP = $6E4F -ENGINE_GETCOLLISIONDATA_HANDLEOVERFLOW = $6E53 -ENGINE_GETCOLLISIONDATAFORBLOCK = $6D59 -ENGINE_GETCOLLISIONVALUEFORBLOCK = $6DEA -ENGINE_GETOBJECTDESCRIPTORPOINTER = $5E1C -ENGINE_GETOBJECTINDEXFROMPOINTER = $5E0D -ENGINE_GETOBJECTSCREENPOS = $345A -ENGINE_HANDLEPLC = $7098 -ENGINE_HANDLEPLC_CHAOSEMERALD = $7204 -ENGINE_HANDLEPLC_CLEANUP = $7181 -ENGINE_HANDLEPLC_COPYMIRRORED = $7103 -ENGINE_HANDLEPLC_MONITORART = $7238 -ENGINE_HANDLEPLC_NOBANK = $713E -ENGINE_HANDLEPLC_PARSEDESCRIPTOR = $715C +ENGINE_GETCOLLISIONDATA_CLEANUP = $6DD3 +ENGINE_GETCOLLISIONDATA_HANDLEOVERFLOW = $6DD7 +ENGINE_GETCOLLISIONDATAFORBLOCK = $6CDD +ENGINE_GETCOLLISIONVALUEFORBLOCK = $6D6E +ENGINE_GETOBJECTDESCRIPTORPOINTER = $5DA0 +ENGINE_GETOBJECTINDEXFROMPOINTER = $5D91 +ENGINE_GETOBJECTSCREENPOS = $33DE +ENGINE_HANDLEPLC = $701C +ENGINE_HANDLEPLC_CHAOSEMERALD = $7188 +ENGINE_HANDLEPLC_CLEANUP = $7105 +ENGINE_HANDLEPLC_COPYMIRRORED = $7087 +ENGINE_HANDLEPLC_MONITORART = $71BC +ENGINE_HANDLEPLC_NOBANK = $70C2 +ENGINE_HANDLEPLC_PARSEDESCRIPTOR = $70E0 ENGINE_HANDLEVBLANK = $0474 ENGINE_HANDLEVBLANK_EPILOGUE = $0537 ENGINE_HANDLEVBLANK_PALETTESONLY = $0577 -ENGINE_INITCOUNTERS = $1CA0 +ENGINE_INITCOUNTERS = $1CA6 ENGINE_INITIALISE = $0437 -ENGINE_INITSTATUSICONS = $1C33 +ENGINE_INITSTATUSICONS = $1C39 ENGINE_INPUTFLAGS = $D137 ENGINE_INPUTFLAGSLAST = $D147 ENGINE_INTERRUPT = $0038 ENGINE_INTERRUPTSERVICED = $D135 -ENGINE_LIMITSCREENPOS_RIGHT = $36D1 -ENGINE_LOADAUXLEVELHEADER = $1CD3 -ENGINE_LOADCARDMAPPINGS = $138D -ENGINE_LOADLEVEL = $1BF3 -ENGINE_LOADLEVEL_DRAWSCREEN = $4CBC -ENGINE_LOADLEVEL_SETINITIALPOSITIONS = $4D29 -ENGINE_LOADLEVELHEADER = $4EA8 -ENGINE_LOADLEVELLAYOUT = $4C72 -ENGINE_LOADLEVELLAYOUT_COPYBYTE = $4CB3 -ENGINE_LOADLEVELPALETTE = $6F12 -ENGINE_LOADLEVELTILES = $6EAB -ENGINE_LOADMAPPINGS = $1395 -ENGINE_LOADMAPPINGS32_COLUMN = $51C3 -ENGINE_LOADMAPPINGS32_ROW = $52A1 -ENGINE_LOADPLAYERTILES = $0EBF -ENGINE_LOADPLAYERTILES_COPYTILES = $0F00 -ENGINE_LOCKCAMERA = $4348 -ENGINE_MAPPINGS_GETBLOCKXY = $4409 +ENGINE_LIMITSCREENPOS_RIGHT = $3655 +ENGINE_LOADAUXLEVELHEADER = $1CD9 +ENGINE_LOADCARDMAPPINGS = $1393 +ENGINE_LOADLEVEL = $1BF9 +ENGINE_LOADLEVEL_DRAWSCREEN = $4C40 +ENGINE_LOADLEVEL_SETINITIALPOSITIONS = $4CAD +ENGINE_LOADLEVELHEADER = $4E2C +ENGINE_LOADLEVELLAYOUT = $4BF6 +ENGINE_LOADLEVELLAYOUT_COPYBYTE = $4C37 +ENGINE_LOADLEVELPALETTE = $6E96 +ENGINE_LOADLEVELTILES = $6E2F +ENGINE_LOADMAPPINGS = $139B +ENGINE_LOADMAPPINGS32_COLUMN = $5147 +ENGINE_LOADMAPPINGS32_ROW = $5225 +ENGINE_LOADPLAYERTILES = $0EC5 +ENGINE_LOADPLAYERTILES_COPYTILES = $0F06 +ENGINE_LOCKCAMERA = $42CC +ENGINE_MAPPINGS_GETBLOCKXY = $438D ENGINE_MONITORCLLSNTYPE = $D39D -ENGINE_MOVEOBJECTTOPLAYER = $5BCA -ENGINE_MULTIPLY_8_BY_8U = $1660 +ENGINE_MOVEOBJECTTOPLAYER = $5B4E +ENGINE_MULTIPLY_8_BY_8U = $1666 ENGINE_NMI = $0066 ENGINE_OBJCHARCODEPTR = $D110 ENGINE_OBJECTSLOTS = $D500 -ENGINE_PAUSEHANDLER = $05D5 +ENGINE_PAUSEHANDLER = $05D8 ENGINE_POWERUPTIMER = $D4A0 -ENGINE_RELEASECAMERA = $4342 -ENGINE_REMOVEBREAKABLEBLOCK = $5F68 +ENGINE_RELEASECAMERA = $42C6 +ENGINE_REMOVEBREAKABLEBLOCK = $5EEC ENGINE_RESET = $0426 -ENGINE_RESETINTERRUPTFLAG = $0F64 +ENGINE_RESETINTERRUPTFLAG = $0F6A ENGINE_RINGANIMFRAME = $D351 ENGINE_RINGART_DEST = $D397 ENGINE_RINGART_SRC = $D395 -ENGINE_SETCAMERAANDLOCK = $4354 -ENGINE_SETMAXIMUMCAMERAX = $4382 -ENGINE_SETMINIMUMCAMERAX = $4372 -ENGINE_SETOBJECTVERTICALSPEED = $5C61 -ENGINE_SETSTATUSICONPOSITIONS = $1C88 -ENGINE_SETUNDERWATER = $431C -ENGINE_SWAPFRAME2 = $0F45 -ENGINE_TIMER_INCREMENT = $1AEC -ENGINE_TIMER_SETSPRITES = $1B1B -ENGINE_TOGGLESPRITEVISIBLE = $1331 -ENGINE_UPDATEALLOBJECTS = $5872 -ENGINE_UPDATECAMERAPOS = $4322 -ENGINE_UPDATECAMERAXPOS = $4392 -ENGINE_UPDATECAMERAXPOS_LIMIT = $43B6 -ENGINE_UPDATECAMERAYPOS = $43BD -ENGINE_UPDATECAMERAYPOS_LIMIT = $43E5 -ENGINE_UPDATECYCLINGPALETTES = $755A -ENGINE_UPDATELEVELSTATE = $0906 -ENGINE_UPDATEMAPPINGBLOCK = $1430 -ENGINE_UPDATEOBJECT = $59AF -ENGINE_UPDATEOBJECT_ANIMATION = $5A10 -ENGINE_UPDATEOBJECT_GETLOGICPTR = $59CB -ENGINE_UPDATEOBJECT_PROCESSLOGIC = $59EB -ENGINE_UPDATEOBJECT_STATE = $59C5 -ENGINE_UPDATEOBJECTHPOS = $12A4 -ENGINE_UPDATEOBJECTPOSITION = $6138 -ENGINE_UPDATEOBJECTVPOS = $1250 -ENGINE_UPDATEPLAYEROBJECT = $59A4 -ENGINE_UPDATEPLAYEROBJECTSTATE = $29B7 -ENGINE_UPDATERINGCOUNTERSPRITES = $2004 -ENGINE_UPDATESHZ2WIND = $628D -ENGINE_UPDATESPRITEATTRIBS = $11ED +ENGINE_SETCAMERAANDLOCK = $42D8 +ENGINE_SETMAXIMUMCAMERAX = $4306 +ENGINE_SETMINIMUMCAMERAX = $42F6 +ENGINE_SETOBJECTVERTICALSPEED = $5BE5 +ENGINE_SETSTATUSICONPOSITIONS = $1C8E +ENGINE_SETUNDERWATER = $42A0 +ENGINE_SWAPFRAME2 = $0F4B +ENGINE_TIMER_INCREMENT = $1AF2 +ENGINE_TIMER_SETSPRITES = $1B21 +ENGINE_TOGGLESPRITEVISIBLE = $1337 +ENGINE_UPDATEALLOBJECTS = $57F6 +ENGINE_UPDATECAMERAPOS = $42A6 +ENGINE_UPDATECAMERAXPOS = $4316 +ENGINE_UPDATECAMERAXPOS_LIMIT = $433A +ENGINE_UPDATECAMERAYPOS = $4341 +ENGINE_UPDATECAMERAYPOS_LIMIT = $4369 +ENGINE_UPDATECYCLINGPALETTES = $74DE +ENGINE_UPDATELEVELSTATE = $090C +ENGINE_UPDATEMAPPINGBLOCK = $1436 +ENGINE_UPDATEOBJECT = $5933 +ENGINE_UPDATEOBJECT_ANIMATION = $5994 +ENGINE_UPDATEOBJECT_GETLOGICPTR = $594F +ENGINE_UPDATEOBJECT_PROCESSLOGIC = $596F +ENGINE_UPDATEOBJECT_STATE = $5949 +ENGINE_UPDATEOBJECTHPOS = $12AA +ENGINE_UPDATEOBJECTPOSITION = $60BC +ENGINE_UPDATEOBJECTVPOS = $1256 +ENGINE_UPDATEPLAYEROBJECT = $5928 +ENGINE_UPDATEPLAYEROBJECTSTATE = $293B +ENGINE_UPDATERINGCOUNTERSPRITES = $200A +ENGINE_UPDATESHZ2WIND = $6211 +ENGINE_UPDATESPRITEATTRIBS = $11F3 ENGINE_UPDATESPRITEATTRIBS_ADJ_POS = $D393 ENGINE_UPDATESPRITEATTRIBS_HPOS_PTR = $D36B -ENGINE_UPDATESPRITEATTRIBS_NOCLEAR = $1345 +ENGINE_UPDATESPRITEATTRIBS_NOCLEAR = $134B ENGINE_UPDATESPRITEATTRIBS_VPOS_PTR = $D369 -ENGINE_UPDATESPRITEATTRIBSART = $0F1D -ENGINE_UPDATEUNDERWATERFLAG = $4309 -ENGINE_WAITFORINTERRUPT = $057D -ENGINE_WATERLEVEL_DONOTHING = $425B -ENGINE_WATERLEVEL_INCAIRTIMER = $423D -ENGINE_WATERLEVEL_SPAWNBUBBLE = $425C -ENGINE_WATERLEVEL_SPAWNCOUNTOBJ = $4254 -EXITGAME = $7AD5 -EXITGAMEEND = $D27B05 +ENGINE_UPDATESPRITEATTRIBSART = $0F23 +ENGINE_UPDATEUNDERWATERFLAG = $428D +ENGINE_WAITFORINTERRUPT = $0580 +ENGINE_WATERLEVEL_DONOTHING = $41DF +ENGINE_WATERLEVEL_INCAIRTIMER = $41C1 +ENGINE_WATERLEVEL_SPAWNBUBBLE = $41E0 +ENGINE_WATERLEVEL_SPAWNCOUNTOBJ = $41D8 +EXITGAME = $7A59 +EXITGAMEEND = $D27A89 FGPALETTECONTROL = $D4E8 FGPALETTEINDEX = $D4E9 FLAGPOINTER = $D345 FRAME1PAGE = $D12A FRAME2PAGE = $D12B FRAMECOUNTER = $D12F -GAMEOVERSCREEN_DRAWSCREEN = $21C8 -GAMEOVERSCREEN_LOADTILES = $6FE2 -GAMESTATE_CHECKCONTINUE = $06DD -GAMESTATE_DOCONTINUE = $06C2 -GAMESTATE_ENDSEQUENCE = $061C -GAMESTATE_GAMEOVER = $0685 -GAMESTATE_KILLPLAYER = $085C -GAMESTATE_NEXTACT = $0759 -GAMESTATE_NEXTZONE = $07CF -GAMESTATE_TITLECARD = $08AC -GETTILECOORDINATES = $D27E54 -GETTILEFLAGS = $D27E6E -GETTILEPOINTER = $D27E2A +GAMEOVERSCREEN_DRAWSCREEN = $21CE +GAMEOVERSCREEN_LOADTILES = $6F66 +GAMESTATE_CHECKCONTINUE = $06E0 +GAMESTATE_DOCONTINUE = $06C5 +GAMESTATE_ENDSEQUENCE = $061F +GAMESTATE_GAMEOVER = $0688 +GAMESTATE_KILLPLAYER = $085F +GAMESTATE_NEXTACT = $075C +GAMESTATE_NEXTZONE = $07D2 +GAMESTATE_TITLECARD = $08AF +GETTILECOORDINATES = $D27DE4 +GETTILEFLAGS = $D27DFE +GETTILEPOINTER = $D27DBA GLOBALTRIGGERS = $D293 GT_0 = $0001 GT_1 = $0002 @@ -436,7 +436,7 @@ GT_TITLECARD_BIT = $0002 HASEMERALDTRG = $D2C6 HOLDTIME = $D46A IDLETIMER = $D3B4 -INCREMENTRINGCOUNTER = $1FF1 +INCREMENTRINGCOUNTER = $1FF7 KBD0 = $0001 KBD1 = $0002 KBD2 = $0002 @@ -542,318 +542,317 @@ KBITVARS = $0006 KBITWINDOW = $0003 KBITY = $0004 KBITZOOM = $0002 -LABEL_107C = $0EB7 -LABEL_1084 = $0EBF -LABEL_129C = $0F45 -LABEL_12C8 = $0F69 -LABEL_13D2 = $111C -LABEL_19D7 = $13FE -LABEL_1A13 = $143A -LABEL_1BF7 = $167A -LABEL_1CC4 = $1703 -LABEL_1CCA = $1709 -LABEL_1CD0 = $170F -LABEL_1D05 = $1744 -LABEL_1D34 = $1773 -LABEL_1D4F = $178E -LABEL_1D60 = $179F -LABEL_1D6F = $17AE -LABEL_1D7F = $17BE -LABEL_1DAF = $17EC +LABEL_107C = $0EBD +LABEL_1084 = $0EC5 +LABEL_129C = $0F4B +LABEL_12C8 = $0F6F +LABEL_13D2 = $1122 +LABEL_19D7 = $1404 +LABEL_1A13 = $1440 +LABEL_1BF7 = $1680 +LABEL_1CC4 = $1709 +LABEL_1CCA = $170F +LABEL_1CD0 = $1715 +LABEL_1D05 = $174A +LABEL_1D34 = $1779 +LABEL_1D4F = $1794 +LABEL_1D60 = $17A5 +LABEL_1D6F = $17B4 +LABEL_1D7F = $17C4 +LABEL_1DAF = $17F2 LABEL_200 = $0200 -LABEL_20FB = $1B44 -LABEL_2416 = $1E58 -LABEL_242F_49 = $1E6D -LABEL_2439_50 = $1E76 -LABEL_243C = $1E79 -LABEL_2459_51 = $1E91 -LABEL_247B = $1EB2 -LABEL_24BE_48 = $1EF5 -LABEL_2530 = $1F65 -LABEL_2576 = $1FAB -LABEL_259C = $1FCC -LABEL_25C3 = $1FF1 -LABEL_2606 = $202F -LABEL_264E = $2066 -LABEL_2849 = $2259 -LABEL_28C4 = $22D3 -LABEL_28D7 = $22E6 -LABEL_2FCB = $29DA -LABEL_3011 = $2A11 -LABEL_3032 = $2A35 -LABEL_3054 = $2A57 -LABEL_305F = $2A65 -LABEL_3072 = $2A8A -LABEL_307F = $2A97 -LABEL_3092 = $2AA5 -LABEL_30A5 = $2AB3 -LABEL_30C7 = $2AE5 -LABEL_30D8 = $2AF6 -LABEL_30FD = $2B16 -LABEL_3138 = $2B32 -LABEL_3176 = $2B6B -LABEL_318F = $2B84 -LABEL_31BF = $2BB4 -LABEL_31F8 = $2BED -LABEL_3222 = $2C17 -LABEL_3245 = $2C3A -LABEL_3267 = $2C5C -LABEL_3385 = $2DA2 -LABEL_33A8 = $2DC5 -LABEL_33B7 = $2DD4 -LABEL_33EA = $2E06 -LABEL_3467 = $2E83 -LABEL_3484 = $2E9B -LABEL_348F = $2EA6 -LABEL_34A4 = $2EBB -LABEL_34A9 = $2EC0 -LABEL_34DA = $2EF1 -LABEL_34E1 = $2EF8 -LABEL_359B = $2FB5 -LABEL_3638 = $3052 -LABEL_365C = $3076 -LABEL_3676 = $3090 -LABEL_3681 = $309B -LABEL_36B2 = $30CC -LABEL_36E1 = $30F9 -LABEL_3702 = $311A -LABEL_3703 = $311B -LABEL_3725 = $313B -LABEL_375F = $3175 -LABEL_376E = $3184 -LABEL_3796 = $31AB -LABEL_384E = $325D -LABEL_3A62 = $3481 -LABEL_3ACA = $34EF -LABEL_4024 = $3A11 -LABEL_4037 = $3A24 -LABEL_4044 = $3A31 -LABEL_404F = $3A3C -LABEL_4064 = $3A51 -LABEL_4079 = $3A66 -LABEL_408E = $3A7B -LABEL_40B2 = $3A9D -LABEL_40D6 = $3AC0 -LABEL_40E0 = $3ACA -LABEL_40F0 = $3ADA -LABEL_4109 = $3AF3 -LABEL_4135 = $3B21 -LABEL_4137 = $3B23 -LABEL_415A = $3B45 -LABEL_415F = $3B4A -LABEL_4199 = $3B84 -LABEL_41A6 = $3B91 -LABEL_41DD = $3BC8 -LABEL_41EA = $3BD5 -LABEL_4204 = $3BEF -LABEL_4226 = $3C11 -LABEL_424A = $3C36 -LABEL_42B7 = $3CA2 -LABEL_42E8 = $3CD2 -LABEL_4310 = $3CFC -LABEL_4352 = $3D3E -LABEL_437A = $3D69 -LABEL_438A = $3D79 -LABEL_43AF = $3D9D -LABEL_43BF = $3DAC -LABEL_43C5 = $3DB2 -LABEL_43F3 = $3DE0 -LABEL_43F9 = $3DE6 -LABEL_4408 = $3DF0 -LABEL_440E = $3DF0 -LABEL_4414 = $3DF6 -LABEL_441A = $3DF0 -LABEL_4420 = $3DFC -LABEL_4440 = $3E1B -LABEL_4446 = $3E21 -LABEL_4459 = $3E1B -LABEL_445F = $3E34 -LABEL_4476 = $3E4B -LABEL_447C = $3E51 -LABEL_4482 = $3E57 -LABEL_44A2 = $3E76 -LABEL_44A8 = $3E7C -LABEL_44BB = $3EA0 -LABEL_44C1 = $3E8F -LABEL_44D8 = $3E89 -LABEL_44DE = $3EA6 -LABEL_44E4 = $3EAC -LABEL_4504 = $3EA6 -LABEL_450A = $3ECB -LABEL_451D = $3EA6 -LABEL_4523 = $3EDE -LABEL_453A = $3EC5 -LABEL_4540 = $3EF5 -LABEL_4546 = $3EFB -LABEL_4566 = $3F3E -LABEL_456C = $3F1A -LABEL_457F = $3F3E -LABEL_4585 = $3F2D -LABEL_459C = $3F44 -LABEL_45A2 = $3F4A -LABEL_45A8 = $3F50 -LABEL_45BA = $3F62 -LABEL_45C6 = $3F6E -LABEL_45D8 = $3F80 -LABEL_45E4 = $3F8C -LABEL_45F6 = $3F9E -LABEL_4602 = $3FAA -LABEL_4614 = $3FBC -LABEL_4620 = $3FC8 -LABEL_4623 = $3FCB -LABEL_4629 = $3FD1 -LABEL_462F = $3FD7 -LABEL_4637 = $3FDF -LABEL_4640 = $3FE8 -LABEL_464B = $3FF3 -LABEL_464D = $3FF5 -LABEL_465D = $4005 -LABEL_466D = $4015 -LABEL_467D = $4025 -LABEL_468D = $4035 -LABEL_469D = $4045 -LABEL_46BB = $4063 -LABEL_46C0 = $4068 -LABEL_46EA = $4092 +LABEL_20FB = $1B4A +LABEL_2416 = $1E5E +LABEL_242F_49 = $1E73 +LABEL_2439_50 = $1E7C +LABEL_243C = $1E7F +LABEL_2459_51 = $1E97 +LABEL_247B = $1EB8 +LABEL_24BE_48 = $1EFB +LABEL_2530 = $1F6B +LABEL_2576 = $1FB1 +LABEL_259C = $1FD2 +LABEL_25C3 = $1FF7 +LABEL_2606 = $2035 +LABEL_264E = $206C +LABEL_2849 = $225F +LABEL_2FCB = $295E +LABEL_3011 = $2995 +LABEL_3032 = $29B9 +LABEL_3054 = $29DB +LABEL_305F = $29E9 +LABEL_3072 = $2A0E +LABEL_307F = $2A1B +LABEL_3092 = $2A29 +LABEL_30A5 = $2A37 +LABEL_30C7 = $2A69 +LABEL_30D8 = $2A7A +LABEL_30FD = $2A9A +LABEL_3138 = $2AB6 +LABEL_3176 = $2AEF +LABEL_318F = $2B08 +LABEL_31BF = $2B38 +LABEL_31F8 = $2B71 +LABEL_3222 = $2B9B +LABEL_3245 = $2BBE +LABEL_3267 = $2BE0 +LABEL_3385 = $2D26 +LABEL_33A8 = $2D49 +LABEL_33B7 = $2D58 +LABEL_33EA = $2D8A +LABEL_3467 = $2E07 +LABEL_3484 = $2E1F +LABEL_348F = $2E2A +LABEL_34A4 = $2E3F +LABEL_34A9 = $2E44 +LABEL_34DA = $2E75 +LABEL_34E1 = $2E7C +LABEL_359B = $2F39 +LABEL_3638 = $2FD6 +LABEL_365C = $2FFA +LABEL_3676 = $3014 +LABEL_3681 = $301F +LABEL_36B2 = $3050 +LABEL_36E1 = $307D +LABEL_3702 = $309E +LABEL_3703 = $309F +LABEL_3725 = $30BF +LABEL_375F = $30F9 +LABEL_376E = $3108 +LABEL_3796 = $312F +LABEL_384E = $31E1 +LABEL_3A62 = $3405 +LABEL_3ACA = $3473 +LABEL_4024 = $3995 +LABEL_4037 = $39A8 +LABEL_4044 = $39B5 +LABEL_404F = $39C0 +LABEL_4064 = $39D5 +LABEL_4079 = $39EA +LABEL_408E = $39FF +LABEL_40B2 = $3A21 +LABEL_40D6 = $3A44 +LABEL_40E0 = $3A4E +LABEL_40F0 = $3A5E +LABEL_4109 = $3A77 +LABEL_4135 = $3AA5 +LABEL_4137 = $3AA7 +LABEL_415A = $3AC9 +LABEL_415F = $3ACE +LABEL_4199 = $3B08 +LABEL_41A6 = $3B15 +LABEL_41DD = $3B4C +LABEL_41EA = $3B59 +LABEL_4204 = $3B73 +LABEL_4226 = $3B95 +LABEL_424A = $3BBA +LABEL_42B7 = $3C26 +LABEL_42E8 = $3C56 +LABEL_4310 = $3C80 +LABEL_4352 = $3CC2 +LABEL_437A = $3CED +LABEL_438A = $3CFD +LABEL_43AF = $3D21 +LABEL_43BF = $3D30 +LABEL_43C5 = $3D36 +LABEL_43F3 = $3D64 +LABEL_43F9 = $3D6A +LABEL_4408 = $3D74 +LABEL_440E = $3D74 +LABEL_4414 = $3D7A +LABEL_441A = $3D74 +LABEL_4420 = $3D80 +LABEL_4440 = $3D9F +LABEL_4446 = $3DA5 +LABEL_4459 = $3D9F +LABEL_445F = $3DB8 +LABEL_4476 = $3DCF +LABEL_447C = $3DD5 +LABEL_4482 = $3DDB +LABEL_44A2 = $3DFA +LABEL_44A8 = $3E00 +LABEL_44BB = $3E24 +LABEL_44C1 = $3E13 +LABEL_44D8 = $3E0D +LABEL_44DE = $3E2A +LABEL_44E4 = $3E30 +LABEL_4504 = $3E2A +LABEL_450A = $3E4F +LABEL_451D = $3E2A +LABEL_4523 = $3E62 +LABEL_453A = $3E49 +LABEL_4540 = $3E79 +LABEL_4546 = $3E7F +LABEL_4566 = $3EC2 +LABEL_456C = $3E9E +LABEL_457F = $3EC2 +LABEL_4585 = $3EB1 +LABEL_459C = $3EC8 +LABEL_45A2 = $3ECE +LABEL_45A8 = $3ED4 +LABEL_45BA = $3EE6 +LABEL_45C6 = $3EF2 +LABEL_45D8 = $3F04 +LABEL_45E4 = $3F10 +LABEL_45F6 = $3F22 +LABEL_4602 = $3F2E +LABEL_4614 = $3F40 +LABEL_4620 = $3F4C +LABEL_4623 = $3F4F +LABEL_4629 = $3F55 +LABEL_462F = $3F5B +LABEL_4637 = $3F63 +LABEL_4640 = $3F6C +LABEL_464B = $3F77 +LABEL_464D = $3F79 +LABEL_465D = $3F89 +LABEL_466D = $3F99 +LABEL_467D = $3FA9 +LABEL_468D = $3FB9 +LABEL_469D = $3FC9 +LABEL_46BB = $3FE7 +LABEL_46C0 = $3FEC +LABEL_46EA = $4016 LABEL_472 = $0443 -LABEL_4727 = $40CF -LABEL_475F = $4107 -LABEL_4764 = $410C -LABEL_47C9 = $4171 -LABEL_483B = $41ED -LABEL_4845 = $41F7 -LABEL_4884 = $422C -LABEL_4887 = $422F -LABEL_48C4 = $4268 -LABEL_48D4 = $4278 -LABEL_48D5 = $4279 -LABEL_48F0 = $4294 -LABEL_4917 = $42BB -LABEL_4926 = $42C8 -LABEL_4935 = $42D5 -LABEL_4944 = $42E2 -LABEL_4951 = $42EF -LABEL_4960 = $42FC -LABEL_498A = $4322 -LABEL_49CF = $4367 -LABEL_59E_218 = $0588 -LABEL_5D93 = $571F -LABEL_5E24 = $57B1 -LABEL_5E42 = $57D0 -LABEL_5E62 = $57F0 -LABEL_5EA1 = $582F -LABEL_5EE4 = $5872 -LABEL_5EFD = $588B -LABEL_5F29 = $58B5 -LABEL_5F3D = $58C8 -LABEL_5F73 = $58DB -LABEL_60E9 = $5A4D -LABEL_611D = $5A81 -LABEL_6127 = $5A8B -LABEL_6131 = $5A95 -LABEL_6139 = $5A9D -LABEL_615C = $5AC0 -LABEL_617C = $5AE0 -LABEL_61C2 = $5B26 -LABEL_61FA = $5B5E -LABEL_620F = $5B6D -LABEL_6212 = $5B76 -LABEL_623F = $5BA3 -LABEL_62A7 = $5C0A -LABEL_62FD = $5C60 -LABEL_6311 = $5C74 -LABEL_6313 = $5C76 -LABEL_631A = $5C7D -LABEL_6344 = $5CA7 -LABEL_634C = $5CAF -LABEL_6355 = $5CB8 -LABEL_635B = $5CBE -LABEL_636B = $5CCE -LABEL_63A9 = $5D07 -LABEL_63C0 = $5D1D -LABEL_63E5 = $5D3C -LABEL_6424 = $5D7B -LABEL_6425 = $5D7C -LABEL_643C = $5D93 -LABEL_6454 = $5DAB -LABEL_6483 = $5DDA -LABEL_64B1 = $5E08 -LABEL_64D4 = $5E2B -LABEL_6544 = $5E9B -LABEL_656B = $5EC2 -LABEL_6576 = $5ECD -LABEL_66FB = $604B -LABEL_670F = $605F -LABEL_677C = $60CC -LABEL_6791 = $60E1 -LABEL_67B1 = $6101 -LABEL_6938 = $626F -LABEL_6956 = $628D -LABEL_697D = $62B4 -LABEL_698F = $62C6 -LABEL_69F5 = $632C -LABEL_6A25 = $6359 -LABEL_6A7E = $63B2 -LABEL_6ACD = $63FD -LABEL_6B17 = $6446 -LABEL_6B47 = $6476 -LABEL_6B61 = $6490 -LABEL_6B85 = $64B4 -LABEL_6B95 = $64C4 -LABEL_6B96 = $64C5 -LABEL_6B9B = $64CA -LABEL_6BA7 = $64D6 -LABEL_6BF2 = $6521 -LABEL_6C01 = $6530 -LABEL_6C21 = $654F -LABEL_6C2D = $655B -LABEL_6C3C = $656A -LABEL_6C9C = $65CA -LABEL_6C9D = $65CA -LABEL_6CA0 = $65CA -LABEL_6CA1 = $65CA -LABEL_6CA2 = $65CB -LABEL_6CAD = $65D6 -LABEL_6CE2 = $6606 -LABEL_6CF7 = $661B -LABEL_6D0D = $6631 -LABEL_6D49 = $666B -LABEL_6D52 = $6674 -LABEL_6D81 = $669D -LABEL_6DAA = $66C5 -LABEL_6DCC = $66E9 -LABEL_6DD5 = $66F0 -LABEL_6DED = $6708 -LABEL_6E10 = $6726 -LABEL_6E30 = $6741 -LABEL_6E56 = $6767 -LABEL_6E8B = $679C -LABEL_6EB1 = $67C2 -LABEL_6F3 = $0649 -LABEL_6F82 = $6881 -LABEL_6FCE = $68CC -LABEL_708D = $6976 -LABEL_7172 = $6A59 -LABEL_7314 = $6BF7 -LABEL_7378 = $6C55 -LABEL_75C5 = $6E6A -LABEL_7614 = $6E81 -LABEL_761E = $6E8B -LABEL_7881 = $70E7 -LABEL_7F46 = $77A5 -LABEL_7F74 = $77D3 -LABEL_7F7E = $77DD -LABEL_81D = $0756 -LABEL_8A4 = $07D8 -LABEL_91B = $084D -LABEL_9C4 = $08EB -LABEL_A13 = $0934 -LABEL_A27 = $0943 -LABEL_A2C = $0948 -LABEL_F41 = $0D82 -LABEL_FB9 = $0DF9 +LABEL_4727 = $4053 +LABEL_475F = $408B +LABEL_4764 = $4090 +LABEL_47C9 = $40F5 +LABEL_483B = $4171 +LABEL_4845 = $417B +LABEL_4884 = $41B0 +LABEL_4887 = $41B3 +LABEL_48C4 = $41EC +LABEL_48D4 = $41FC +LABEL_48D5 = $41FD +LABEL_48F0 = $4218 +LABEL_4917 = $423F +LABEL_4926 = $424C +LABEL_4935 = $4259 +LABEL_4944 = $4266 +LABEL_4951 = $4273 +LABEL_4960 = $4280 +LABEL_498A = $42A6 +LABEL_49CF = $42EB +LABEL_59E_218 = $058B +LABEL_5D93 = $56A3 +LABEL_5E24 = $5735 +LABEL_5E42 = $5754 +LABEL_5E62 = $5774 +LABEL_5EA1 = $57B3 +LABEL_5EE4 = $57F6 +LABEL_5EFD = $580F +LABEL_5F29 = $5839 +LABEL_5F3D = $584C +LABEL_5F73 = $585F +LABEL_60E9 = $59D1 +LABEL_611D = $5A05 +LABEL_6127 = $5A0F +LABEL_6131 = $5A19 +LABEL_6139 = $5A21 +LABEL_615C = $5A44 +LABEL_617C = $5A64 +LABEL_61C2 = $5AAA +LABEL_61FA = $5AE2 +LABEL_620F = $5AF1 +LABEL_6212 = $5AFA +LABEL_623F = $5B27 +LABEL_62A7 = $5B8E +LABEL_62FD = $5BE4 +LABEL_6311 = $5BF8 +LABEL_6313 = $5BFA +LABEL_631A = $5C01 +LABEL_6344 = $5C2B +LABEL_634C = $5C33 +LABEL_6355 = $5C3C +LABEL_635B = $5C42 +LABEL_636B = $5C52 +LABEL_63A9 = $5C8B +LABEL_63C0 = $5CA1 +LABEL_63E5 = $5CC0 +LABEL_6424 = $5CFF +LABEL_6425 = $5D00 +LABEL_643C = $5D17 +LABEL_6454 = $5D2F +LABEL_6483 = $5D5E +LABEL_64B1 = $5D8C +LABEL_64D4 = $5DAF +LABEL_6544 = $5E1F +LABEL_656B = $5E46 +LABEL_6576 = $5E51 +LABEL_66FB = $5FCF +LABEL_670F = $5FE3 +LABEL_677C = $6050 +LABEL_6791 = $6065 +LABEL_67B1 = $6085 +LABEL_6938 = $61F3 +LABEL_6956 = $6211 +LABEL_697D = $6238 +LABEL_698F = $624A +LABEL_69F5 = $62B0 +LABEL_6A25 = $62DD +LABEL_6A7E = $6336 +LABEL_6ACD = $6381 +LABEL_6B17 = $63CA +LABEL_6B47 = $63FA +LABEL_6B61 = $6414 +LABEL_6B85 = $6438 +LABEL_6B95 = $6448 +LABEL_6B96 = $6449 +LABEL_6B9B = $644E +LABEL_6BA7 = $645A +LABEL_6BF2 = $64A5 +LABEL_6C01 = $64B4 +LABEL_6C21 = $64D3 +LABEL_6C2D = $64DF +LABEL_6C3C = $64EE +LABEL_6C9C = $654E +LABEL_6C9D = $654E +LABEL_6CA0 = $654E +LABEL_6CA1 = $654E +LABEL_6CA2 = $654F +LABEL_6CAD = $655A +LABEL_6CE2 = $658A +LABEL_6CF7 = $659F +LABEL_6D0D = $65B5 +LABEL_6D49 = $65EF +LABEL_6D52 = $65F8 +LABEL_6D81 = $6621 +LABEL_6DAA = $6649 +LABEL_6DCC = $666D +LABEL_6DD5 = $6674 +LABEL_6DED = $668C +LABEL_6E10 = $66AA +LABEL_6E30 = $66C5 +LABEL_6E56 = $66EB +LABEL_6E8B = $6720 +LABEL_6EB1 = $6746 +LABEL_6F3 = $064C +LABEL_6F82 = $6805 +LABEL_6FCE = $6850 +LABEL_708D = $68FA +LABEL_7172 = $69DD +LABEL_7314 = $6B7B +LABEL_7378 = $6BD9 +LABEL_75C5 = $6DEE +LABEL_7614 = $6E05 +LABEL_761E = $6E0F +LABEL_7881 = $706B +LABEL_7F46 = $7729 +LABEL_7F74 = $7757 +LABEL_7F7E = $7761 +LABEL_81D = $0759 +LABEL_8A4 = $07DB +LABEL_91B = $0850 +LABEL_9C4 = $08F1 +LABEL_A13 = $093A +LABEL_A27 = $0949 +LABEL_A2C = $094E +LABEL_F41 = $0D88 +LABEL_FB9 = $0DFF LASTBANKNUMBER = $001F LASTLEVEL = $0007 +LASTTILEMAPTRIG = $D4C2 LCDBPP8 = $0027 LCDHEIGHT = $00F0 LCDNORMALMODE = $092D @@ -881,7 +880,7 @@ LEVELATTRIBUTES.VIEWPORTFLAGS = $D15E LEVELATTRIBUTES.WIDTH = $D16C LEVELATTRIBUTES.WIDTHNEG = $D16A LEVELDATASTART = $C001 -LEVELDEMOHEADERS = $1F45 +LEVELDEMOHEADERS = $1F4B LEVELDESCRIPTOR.DATAOFFSET = $0010 LEVELDESCRIPTOR.IX01 = $0001 LEVELDESCRIPTOR.LAYOUTBANK = $0005 @@ -894,153 +893,153 @@ LEVELDESCRIPTOR.STRIDETABLE = $000A LEVELDESCRIPTOR.VIEWPORTFLAGS = $0000 LEVELDESCRIPTOR.WIDTH = $000E LEVELDESCRIPTOR.WIDTHNEG = $000C -LEVELHEADER_5803 = $516B -LEVELHEADER_5819 = $5181 -LEVELHEADER_ALZ1 = $5021 -LEVELHEADER_ALZ2 = $5037 -LEVELHEADER_ALZ3 = $504D -LEVELHEADER_CEZ1 = $5129 -LEVELHEADER_CEZ2 = $513F -LEVELHEADER_CEZ3 = $5155 -LEVELHEADER_GHZ1 = $4F9D -LEVELHEADER_GHZ2 = $4FB3 -LEVELHEADER_GHZ3 = $4FC9 -LEVELHEADER_GMZ1 = $50A5 -LEVELHEADER_GMZ2 = $50BB -LEVELHEADER_GMZ3 = $50D1 -LEVELHEADER_INTRO = $5197 -LEVELHEADER_SEZ1 = $50E7 -LEVELHEADER_SEZ2 = $50FD -LEVELHEADER_SEZ3 = $5113 -LEVELHEADER_SHZ1 = $4FDF -LEVELHEADER_SHZ2 = $4FF5 -LEVELHEADER_SHZ3 = $500B -LEVELHEADER_TITLE = $51AD -LEVELHEADER_UGZ1 = $5063 -LEVELHEADER_UGZ2 = $5079 -LEVELHEADER_UGZ3 = $508F -LEVELHEADERS = $4F4D -LEVELHEADERS_ALZ = $4F6D -LEVELHEADERS_CEZ = $4F85 -LEVELHEADERS_GHZ = $4F73 -LEVELHEADERS_GMZ = $4F79 -LEVELHEADERS_INTRO_TITLE = $4F97 -LEVELHEADERS_SEZ = $4F7F -LEVELHEADERS_SHZ = $4F67 -LEVELHEADERS_UGZ = $4F61 -LEVELHEADERS_UNK1 = $4F8B -LEVELHEADERS_UNK2 = $4F91 +LEVELHEADER_5803 = $50EF +LEVELHEADER_5819 = $5105 +LEVELHEADER_ALZ1 = $4FA5 +LEVELHEADER_ALZ2 = $4FBB +LEVELHEADER_ALZ3 = $4FD1 +LEVELHEADER_CEZ1 = $50AD +LEVELHEADER_CEZ2 = $50C3 +LEVELHEADER_CEZ3 = $50D9 +LEVELHEADER_GHZ1 = $4F21 +LEVELHEADER_GHZ2 = $4F37 +LEVELHEADER_GHZ3 = $4F4D +LEVELHEADER_GMZ1 = $5029 +LEVELHEADER_GMZ2 = $503F +LEVELHEADER_GMZ3 = $5055 +LEVELHEADER_INTRO = $511B +LEVELHEADER_SEZ1 = $506B +LEVELHEADER_SEZ2 = $5081 +LEVELHEADER_SEZ3 = $5097 +LEVELHEADER_SHZ1 = $4F63 +LEVELHEADER_SHZ2 = $4F79 +LEVELHEADER_SHZ3 = $4F8F +LEVELHEADER_TITLE = $5131 +LEVELHEADER_UGZ1 = $4FE7 +LEVELHEADER_UGZ2 = $4FFD +LEVELHEADER_UGZ3 = $5013 +LEVELHEADERS = $4ED1 +LEVELHEADERS_ALZ = $4EF1 +LEVELHEADERS_CEZ = $4F09 +LEVELHEADERS_GHZ = $4EF7 +LEVELHEADERS_GMZ = $4EFD +LEVELHEADERS_INTRO_TITLE = $4F1B +LEVELHEADERS_SEZ = $4F03 +LEVELHEADERS_SHZ = $4EEB +LEVELHEADERS_UGZ = $4EE5 +LEVELHEADERS_UNK1 = $4F0F +LEVELHEADERS_UNK2 = $4F15 LEVELLAYOUT = $C001 -LEVELLAYOUT_DATA_INITPOS = $4D6A -LEVELLAYOUT_DATA_INITPOS_ALZ = $4D8A -LEVELLAYOUT_DATA_INITPOS_ALZ1 = $4DEA -LEVELLAYOUT_DATA_INITPOS_ALZ2 = $4DF2 -LEVELLAYOUT_DATA_INITPOS_ALZ3 = $4DFA -LEVELLAYOUT_DATA_INITPOS_CEZ = $4DA2 -LEVELLAYOUT_DATA_INITPOS_CEZ1 = $4E4A -LEVELLAYOUT_DATA_INITPOS_CEZ2 = $4E52 -LEVELLAYOUT_DATA_INITPOS_CEZ3 = $4E5A -LEVELLAYOUT_DATA_INITPOS_GHZ = $4D90 -LEVELLAYOUT_DATA_INITPOS_GHZ1 = $4E02 -LEVELLAYOUT_DATA_INITPOS_GHZ2 = $4E0A -LEVELLAYOUT_DATA_INITPOS_GHZ3 = $4E12 -LEVELLAYOUT_DATA_INITPOS_GMZ = $4D96 -LEVELLAYOUT_DATA_INITPOS_GMZ1 = $4E1A -LEVELLAYOUT_DATA_INITPOS_GMZ2 = $4E22 -LEVELLAYOUT_DATA_INITPOS_GMZ3 = $4E2A -LEVELLAYOUT_DATA_INITPOS_SEZ = $4D9C -LEVELLAYOUT_DATA_INITPOS_SEZ1 = $4E32 -LEVELLAYOUT_DATA_INITPOS_SEZ2 = $4E3A -LEVELLAYOUT_DATA_INITPOS_SEZ3 = $4E42 -LEVELLAYOUT_DATA_INITPOS_SHZ = $4D84 -LEVELLAYOUT_DATA_INITPOS_SHZ1 = $4DD2 -LEVELLAYOUT_DATA_INITPOS_SHZ2 = $4DDA -LEVELLAYOUT_DATA_INITPOS_SHZ3 = $4DE2 -LEVELLAYOUT_DATA_INITPOS_UGZ = $4D7E -LEVELLAYOUT_DATA_INITPOS_UGZ1 = $4DBA -LEVELLAYOUT_DATA_INITPOS_UGZ2 = $4DC2 -LEVELLAYOUT_DATA_INITPOS_UGZ3 = $4DCA -LEVELPALETTEVALUES = $751E -LEVELSELECT_DRAWENTRY1 = $0982 -LEVELSELECT_DRAWENTRY10 = $0AA5 -LEVELSELECT_DRAWENTRY11 = $0AD2 -LEVELSELECT_DRAWENTRY12 = $0AEC -LEVELSELECT_DRAWENTRY13 = $0B06 -LEVELSELECT_DRAWENTRY14 = $0B33 -LEVELSELECT_DRAWENTRY15 = $0B4D -LEVELSELECT_DRAWENTRY16 = $0B67 -LEVELSELECT_DRAWENTRY17 = $0B94 -LEVELSELECT_DRAWENTRY18 = $0BAE -LEVELSELECT_DRAWENTRY19 = $0BC8 -LEVELSELECT_DRAWENTRY2 = $09AF -LEVELSELECT_DRAWENTRY20 = $0BF5 -LEVELSELECT_DRAWENTRY21 = $0C0F -LEVELSELECT_DRAWENTRY22 = $0C29 -LEVELSELECT_DRAWENTRY3 = $09C9 -LEVELSELECT_DRAWENTRY4 = $09E3 -LEVELSELECT_DRAWENTRY5 = $0A10 -LEVELSELECT_DRAWENTRY6 = $0A2A -LEVELSELECT_DRAWENTRY7 = $0A44 -LEVELSELECT_DRAWENTRY8 = $0A71 -LEVELSELECT_DRAWENTRY9 = $0A8B -LEVELSELECT_ENTRY1 = $0997 -LEVELSELECT_ENTRY10 = $0ABA -LEVELSELECT_ENTRY11 = $0AE7 -LEVELSELECT_ENTRY12 = $0B01 -LEVELSELECT_ENTRY13 = $0B1B -LEVELSELECT_ENTRY14 = $0B48 -LEVELSELECT_ENTRY15 = $0B62 -LEVELSELECT_ENTRY16 = $0B7C -LEVELSELECT_ENTRY17 = $0BA9 -LEVELSELECT_ENTRY18 = $0BC3 -LEVELSELECT_ENTRY19 = $0BDD -LEVELSELECT_ENTRY2 = $09C4 -LEVELSELECT_ENTRY20 = $0C0A -LEVELSELECT_ENTRY21 = $0C24 -LEVELSELECT_ENTRY3 = $09DE -LEVELSELECT_ENTRY4 = $09F8 -LEVELSELECT_ENTRY5 = $0A25 -LEVELSELECT_ENTRY6 = $0A3F -LEVELSELECT_ENTRY7 = $0A59 -LEVELSELECT_ENTRY8 = $0A86 -LEVELSELECT_ENTRY9 = $0AA0 -LEVELSELECT_LOADFONT = $6F3C -LEVELSELECT_MAINLOOP = $0C84 -LEVELSELECT_TITLE = $096A -LEVELSELECT_VALUES = $0C5A +LEVELLAYOUT_DATA_INITPOS = $4CEE +LEVELLAYOUT_DATA_INITPOS_ALZ = $4D0E +LEVELLAYOUT_DATA_INITPOS_ALZ1 = $4D6E +LEVELLAYOUT_DATA_INITPOS_ALZ2 = $4D76 +LEVELLAYOUT_DATA_INITPOS_ALZ3 = $4D7E +LEVELLAYOUT_DATA_INITPOS_CEZ = $4D26 +LEVELLAYOUT_DATA_INITPOS_CEZ1 = $4DCE +LEVELLAYOUT_DATA_INITPOS_CEZ2 = $4DD6 +LEVELLAYOUT_DATA_INITPOS_CEZ3 = $4DDE +LEVELLAYOUT_DATA_INITPOS_GHZ = $4D14 +LEVELLAYOUT_DATA_INITPOS_GHZ1 = $4D86 +LEVELLAYOUT_DATA_INITPOS_GHZ2 = $4D8E +LEVELLAYOUT_DATA_INITPOS_GHZ3 = $4D96 +LEVELLAYOUT_DATA_INITPOS_GMZ = $4D1A +LEVELLAYOUT_DATA_INITPOS_GMZ1 = $4D9E +LEVELLAYOUT_DATA_INITPOS_GMZ2 = $4DA6 +LEVELLAYOUT_DATA_INITPOS_GMZ3 = $4DAE +LEVELLAYOUT_DATA_INITPOS_SEZ = $4D20 +LEVELLAYOUT_DATA_INITPOS_SEZ1 = $4DB6 +LEVELLAYOUT_DATA_INITPOS_SEZ2 = $4DBE +LEVELLAYOUT_DATA_INITPOS_SEZ3 = $4DC6 +LEVELLAYOUT_DATA_INITPOS_SHZ = $4D08 +LEVELLAYOUT_DATA_INITPOS_SHZ1 = $4D56 +LEVELLAYOUT_DATA_INITPOS_SHZ2 = $4D5E +LEVELLAYOUT_DATA_INITPOS_SHZ3 = $4D66 +LEVELLAYOUT_DATA_INITPOS_UGZ = $4D02 +LEVELLAYOUT_DATA_INITPOS_UGZ1 = $4D3E +LEVELLAYOUT_DATA_INITPOS_UGZ2 = $4D46 +LEVELLAYOUT_DATA_INITPOS_UGZ3 = $4D4E +LEVELPALETTEVALUES = $74A2 +LEVELSELECT_DRAWENTRY1 = $0988 +LEVELSELECT_DRAWENTRY10 = $0AAB +LEVELSELECT_DRAWENTRY11 = $0AD8 +LEVELSELECT_DRAWENTRY12 = $0AF2 +LEVELSELECT_DRAWENTRY13 = $0B0C +LEVELSELECT_DRAWENTRY14 = $0B39 +LEVELSELECT_DRAWENTRY15 = $0B53 +LEVELSELECT_DRAWENTRY16 = $0B6D +LEVELSELECT_DRAWENTRY17 = $0B9A +LEVELSELECT_DRAWENTRY18 = $0BB4 +LEVELSELECT_DRAWENTRY19 = $0BCE +LEVELSELECT_DRAWENTRY2 = $09B5 +LEVELSELECT_DRAWENTRY20 = $0BFB +LEVELSELECT_DRAWENTRY21 = $0C15 +LEVELSELECT_DRAWENTRY22 = $0C2F +LEVELSELECT_DRAWENTRY3 = $09CF +LEVELSELECT_DRAWENTRY4 = $09E9 +LEVELSELECT_DRAWENTRY5 = $0A16 +LEVELSELECT_DRAWENTRY6 = $0A30 +LEVELSELECT_DRAWENTRY7 = $0A4A +LEVELSELECT_DRAWENTRY8 = $0A77 +LEVELSELECT_DRAWENTRY9 = $0A91 +LEVELSELECT_ENTRY1 = $099D +LEVELSELECT_ENTRY10 = $0AC0 +LEVELSELECT_ENTRY11 = $0AED +LEVELSELECT_ENTRY12 = $0B07 +LEVELSELECT_ENTRY13 = $0B21 +LEVELSELECT_ENTRY14 = $0B4E +LEVELSELECT_ENTRY15 = $0B68 +LEVELSELECT_ENTRY16 = $0B82 +LEVELSELECT_ENTRY17 = $0BAF +LEVELSELECT_ENTRY18 = $0BC9 +LEVELSELECT_ENTRY19 = $0BE3 +LEVELSELECT_ENTRY2 = $09CA +LEVELSELECT_ENTRY20 = $0C10 +LEVELSELECT_ENTRY21 = $0C2A +LEVELSELECT_ENTRY3 = $09E4 +LEVELSELECT_ENTRY4 = $09FE +LEVELSELECT_ENTRY5 = $0A2B +LEVELSELECT_ENTRY6 = $0A45 +LEVELSELECT_ENTRY7 = $0A5F +LEVELSELECT_ENTRY8 = $0A8C +LEVELSELECT_ENTRY9 = $0AA6 +LEVELSELECT_LOADFONT = $6EC0 +LEVELSELECT_MAINLOOP = $0C8A +LEVELSELECT_TITLE = $0970 +LEVELSELECT_VALUES = $0C60 LEVELSELECTCHECK = $0468 -LEVELSELECTMENU = $0948 +LEVELSELECTMENU = $094E LEVELSELECTTRG = $D12C -LEVELTILESETS = $726C +LEVELTILESETS = $71F0 LEVELTIMER = $D2B9 LEVELTIMERTRIGGER = $D2B8 LIFECOUNTER = $D298 LIVESONENTRY = $D297 -LOADBANKFROMRAM = $7AC7 -LOADCOMPRESSEDTILE = $154D -LOADSAVE = $7B05 -LOADTILES = $14D8 -LOADUNCOMPRESSEDTILE = $153E -LOGIC_CHANGEDIRECTIONTOWARDSOBJECT = $5EED -LOGIC_CHANGEDIRECTIONTOWARDSPLAYER = $5EE9 -LOGIC_CHECKDESTROYOBJECT = $5BDF -LOGIC_CMD_CALL = $6004 -LOGIC_CMD_DEALLOCATE = $6001 -LOGIC_CMD_DONOTHING = $601A -LOGIC_CMD_PLAYSOUND = $6115 -LOGIC_CMD_PROCESSLOGIC = $5FFB -LOGIC_CMD_RESTARTSEQUENCE = $5FFE -LOGIC_CMD_SETSPEED = $601B -LOGIC_COMMANDVTABLE = $5FDB -LOGIC_MOVEHORIZONTALTOWARDSOBJECT = $5F09 -LOGIC_MOVEHORIZONTALTOWARDSPLAYERAT0400 = $5F03 -LOGIC_MOVEVERTICALTOWARDSOBJECT = $5F3F -LOGIC_POINTERS = $58E6 -LOGIC_PROCESSCOMMAND = $5FC5 -LOGIC_SETOBJECTFACINGLEFT = $612A -LOGIC_SETOBJECTFACINGRIGHT = $6125 -LOGIC_TOGGLEOBJECTDIRECTION = $612F -LOGIC_UPDATEOBJECTDIRECTIONFLAG = $5ED2 +LOADBANKFROMRAM = $7A4B +LOADCOMPRESSEDTILE = $1553 +LOADSAVE = $7A89 +LOADTILES = $14DE +LOADUNCOMPRESSEDTILE = $1544 +LOGIC_CHANGEDIRECTIONTOWARDSOBJECT = $5E71 +LOGIC_CHANGEDIRECTIONTOWARDSPLAYER = $5E6D +LOGIC_CHECKDESTROYOBJECT = $5B63 +LOGIC_CMD_CALL = $5F88 +LOGIC_CMD_DEALLOCATE = $5F85 +LOGIC_CMD_DONOTHING = $5F9E +LOGIC_CMD_PLAYSOUND = $6099 +LOGIC_CMD_PROCESSLOGIC = $5F7F +LOGIC_CMD_RESTARTSEQUENCE = $5F82 +LOGIC_CMD_SETSPEED = $5F9F +LOGIC_COMMANDVTABLE = $5F5F +LOGIC_MOVEHORIZONTALTOWARDSOBJECT = $5E8D +LOGIC_MOVEHORIZONTALTOWARDSPLAYERAT0400 = $5E87 +LOGIC_MOVEVERTICALTOWARDSOBJECT = $5EC3 +LOGIC_POINTERS = $586A +LOGIC_PROCESSCOMMAND = $5F49 +LOGIC_SETOBJECTFACINGLEFT = $60AE +LOGIC_SETOBJECTFACINGRIGHT = $60A9 +LOGIC_TOGGLEOBJECTDIRECTION = $60B3 +LOGIC_UPDATEOBJECTDIRECTIONFLAG = $5E56 LVP_CAMERA_LOCKED = $0007 LVP_CAMERA_UPDATE_RQD = $0006 LVP_COL_UPDATE_PENDING = $0005 @@ -1049,38 +1048,39 @@ LVP_SCROLL_DOWN = $0001 LVP_SCROLL_LEFT = $0002 LVP_SCROLL_RIGHT = $0003 LVP_SCROLL_UP = $0000 -MINECART_LOOKINGAHEAD = $414D -MINECART_LOOKINGDOWN = $4165 -MINECART_LOOKINGUP = $4159 -MINECART_SETSPRITE = $412D -MINECART_UPDATEANIMATION = $412C -MONITOR_ART_POINTERS = $725A +MINECART_LOOKINGAHEAD = $40D1 +MINECART_LOOKINGDOWN = $40E9 +MINECART_LOOKINGUP = $40DD +MINECART_SETSPRITE = $40B1 +MINECART_UPDATEANIMATION = $40B0 +MONITOR_ART_POINTERS = $71DE MONITORTYPE_NONE0 = $0000 MONITORTYPE_NONE1 = $0001 MONITORTYPE_RINGS = $0002 MOV9TOOP1 = $20320 -MOVETONEXTLINE = $D27F68 +MOVETONEXTLINE = $D27F0C MPLCDCTRL = $E30018 MPLCDICR = $E30028 MPLCDIMSC = $E3001C MPLCDPALETTE = $E30200 MPLCDRIS = $E30020 -MULTTABLE_104 = $45B2 -MULTTABLE_120 = $4552 -MULTTABLE_128 = $44F2 -MULTTABLE_16 = $4C32 -MULTTABLE_168 = $44B2 -MULTTABLE_24 = $4AD2 -MULTTABLE_256 = $4452 -MULTTABLE_32 = $49B2 -MULTTABLE_40 = $48D2 -MULTTABLE_56 = $4832 -MULTTABLE_64 = $4792 -MULTTABLE_72 = $4712 -MULTTABLE_80 = $4692 -MULTTABLE_96 = $4612 +MPLCDTIMING1 = $E30004 +MULTTABLE_104 = $4536 +MULTTABLE_120 = $44D6 +MULTTABLE_128 = $4476 +MULTTABLE_16 = $4BB6 +MULTTABLE_168 = $4436 +MULTTABLE_24 = $4A56 +MULTTABLE_256 = $43D6 +MULTTABLE_32 = $4936 +MULTTABLE_40 = $4856 +MULTTABLE_56 = $47B6 +MULTTABLE_64 = $4716 +MULTTABLE_72 = $4696 +MULTTABLE_80 = $4616 +MULTTABLE_96 = $4596 NEXTCONTROLBYTE = $D2D9 -NULLBANK = $7C3E +NULLBANK = $7BC2 OBJ_COL_BOTTOM = $0001 OBJ_COL_LEFT = $0003 OBJ_COL_RIGHT = $0002 @@ -1195,14 +1195,14 @@ OBJECT_UGZ_PINCERS = $004D OBJECT_UGZ_ROBOTNIK = $004B OBJECT_UGZFIREBALL = $000E OBJECT_WATERSPLASH = $000B -PALETTE_CALCULATEOFFSET = $7978 -PALETTE_FADETOBLACK = $7921 -PALETTE_FADETOCOLOUR = $78BD -PALETTE_RESET = $78AD -PALETTE_UPDATE = $7868 -PALETTE_UPDATECOLOURS = $789D +PALETTE_CALCULATEOFFSET = $78FC +PALETTE_FADETOBLACK = $78A5 +PALETTE_FADETOCOLOUR = $7841 +PALETTE_RESET = $7831 +PALETTE_UPDATE = $77EC +PALETTE_UPDATECOLOURS = $7821 PALETTE_UPDATETRIG = $D4EA -PALETTEFADEOUT = $0F69 +PALETTEFADEOUT = $0F6F PALETTEFADETIME = $D2C8 PALETTERESETTRG = $D131 PALETTES = $F680 @@ -1263,103 +1263,103 @@ PLAYER.X = $D511 PLAYER.Y = $D514 PLAYER_AIRTIMERHI = $D469 PLAYER_AIRTIMERLO = $D468 -PLAYER_ALZ_WATERBOUNCE = $6D1F -PLAYER_ANIM_CALCBALANCEFRAME = $333F -PLAYER_ANIM_CALCBALANCEFRAME_USEINPUTFLAGS = $339D -PLAYER_CALCACCEL = $3604 -PLAYER_CALCACCEL_GETVALUE = $3653 -PLAYER_CALCACCEL_NOBTNPRESS = $36B0 -PLAYER_CALCACCEL_UNDERWATER = $3687 -PLAYER_CALCGRAVITY = $3591 -PLAYER_CALCGRAVITY_UNDERWATER = $35BF -PLAYER_CALCULATEBALANCE = $32C9 -PLAYER_CALCULATEBALANCE_LEFT = $32F4 -PLAYER_CALCULATEBALANCE_NONE = $3306 -PLAYER_CALCULATEBALANCE_RIGHT = $32FD -PLAYER_CALCULATELOOPFALLFRAME = $33B9 -PLAYER_CALCULATELOOPFRAME = $3406 -PLAYER_CHANGEFRAMEDISPLAYTIME = $330B -PLAYER_CHECKFINISHSKID = $2CE1 -PLAYER_CHECKHORIZONTALLEVELCOLLISION = $69EA -PLAYER_CHECKHORIZONTALLEVELCOLLISION_LEFT = $6A59 -PLAYER_CHECKSKID = $2D3E -PLAYER_CHECKTOPLEVELCOLLISION = $6B9D -PLAYER_CLEARCOLLIDINGOBJECT = $32C4 -PLAYER_COLLIDEBREAKABLEBLOCK_UPDATEMAPPINGS = $6AFA -PLAYER_COLLIDEHORIZONTALWITHPIPEBLOCK = $6A17 -PLAYER_COLLIDELEFTBREAKABLEBLOCK = $6AD5 -PLAYER_COLLIDELEFTSOLIDBLOCK = $6A7B -PLAYER_COLLIDELEFTWITHSPIKEBLOCK = $6B6F -PLAYER_COLLIDERIGHTBREAKABLEBLOCK = $6AAF -PLAYER_COLLIDERIGHTWITHSOLIDBLOCK = $6A20 -PLAYER_COLLIDERIGHTWITHSPIKEBLOCK = $6B4C -PLAYER_COLLIDESPIKEBLOCK_PLAYERHURT = $6B8F -PLAYER_COLLIDETOPSOLIDBLOCK = $6BC9 -PLAYER_COLLIDETOPVERTICALSPRING = $6BFE -PLAYER_COLLIDETOPWITHSPIKEBLOCK = $6C07 -PLAYER_COLLIDEVERTICALWITHPIPEBLOCK = $6C4C -PLAYER_COLLIDEWITHRINGBLOCK = $6C77 +PLAYER_ALZ_WATERBOUNCE = $6CA3 +PLAYER_ANIM_CALCBALANCEFRAME = $32C3 +PLAYER_ANIM_CALCBALANCEFRAME_USEINPUTFLAGS = $3321 +PLAYER_CALCACCEL = $3588 +PLAYER_CALCACCEL_GETVALUE = $35D7 +PLAYER_CALCACCEL_NOBTNPRESS = $3634 +PLAYER_CALCACCEL_UNDERWATER = $360B +PLAYER_CALCGRAVITY = $3515 +PLAYER_CALCGRAVITY_UNDERWATER = $3543 +PLAYER_CALCULATEBALANCE = $324D +PLAYER_CALCULATEBALANCE_LEFT = $3278 +PLAYER_CALCULATEBALANCE_NONE = $328A +PLAYER_CALCULATEBALANCE_RIGHT = $3281 +PLAYER_CALCULATELOOPFALLFRAME = $333D +PLAYER_CALCULATELOOPFRAME = $338A +PLAYER_CHANGEFRAMEDISPLAYTIME = $328F +PLAYER_CHECKFINISHSKID = $2C65 +PLAYER_CHECKHORIZONTALLEVELCOLLISION = $696E +PLAYER_CHECKHORIZONTALLEVELCOLLISION_LEFT = $69DD +PLAYER_CHECKSKID = $2CC2 +PLAYER_CHECKTOPLEVELCOLLISION = $6B21 +PLAYER_CLEARCOLLIDINGOBJECT = $3248 +PLAYER_COLLIDEBREAKABLEBLOCK_UPDATEMAPPINGS = $6A7E +PLAYER_COLLIDEHORIZONTALWITHPIPEBLOCK = $699B +PLAYER_COLLIDELEFTBREAKABLEBLOCK = $6A59 +PLAYER_COLLIDELEFTSOLIDBLOCK = $69FF +PLAYER_COLLIDELEFTWITHSPIKEBLOCK = $6AF3 +PLAYER_COLLIDERIGHTBREAKABLEBLOCK = $6A33 +PLAYER_COLLIDERIGHTWITHSOLIDBLOCK = $69A4 +PLAYER_COLLIDERIGHTWITHSPIKEBLOCK = $6AD0 +PLAYER_COLLIDESPIKEBLOCK_PLAYERHURT = $6B13 +PLAYER_COLLIDETOPSOLIDBLOCK = $6B4D +PLAYER_COLLIDETOPVERTICALSPRING = $6B82 +PLAYER_COLLIDETOPWITHSPIKEBLOCK = $6B8B +PLAYER_COLLIDEVERTICALWITHPIPEBLOCK = $6BD0 +PLAYER_COLLIDEWITHRINGBLOCK = $6BFB PLAYER_DELTAVX = $D36F -PLAYER_ENTERPIPE = $67C8 -PLAYER_ENTERPIPE_BOTTOM = $67E7 -PLAYER_ENTERPIPE_LEFT = $6836 -PLAYER_ENTERPIPE_RETURN = $6880 -PLAYER_ENTERPIPE_RIGHT = $685D -PLAYER_ENTERPIPE_TOP = $680F +PLAYER_ENTERPIPE = $674C +PLAYER_ENTERPIPE_BOTTOM = $676B +PLAYER_ENTERPIPE_LEFT = $67BA +PLAYER_ENTERPIPE_RETURN = $6804 +PLAYER_ENTERPIPE_RIGHT = $67E1 +PLAYER_ENTERPIPE_TOP = $6793 PLAYER_FLASHCOUNTER = $D3A9 -PLAYER_FLASHOBJECT = $3297 -PLAYER_HANDLEBALANCE = $2BED -PLAYER_HANDLECROUCHED = $2C5C -PLAYER_HANDLEDIAGONALSPRING = $2E5A -PLAYER_HANDLEENDOFLEVEL = $2F14 -PLAYER_HANDLEENDOFLEVEL_EXITLEFT = $2F7E -PLAYER_HANDLEENDOFLEVEL_EXITRIGHT = $2F5C -PLAYER_HANDLEENDOFLEVEL_INCLEVEL = $2F42 -PLAYER_HANDLEFALLING = $2E72 -PLAYER_HANDLEIDLE = $2C17 -PLAYER_HANDLEJUMPING = $2E06 -PLAYER_HANDLELOOKUP = $2C3A -PLAYER_HANDLEROLLING = $2DC5 -PLAYER_HANDLERUNNING = $2D5A -PLAYER_HANDLESKIDLEFT = $2DA2 -PLAYER_HANDLESKIDRIGHT = $2D7F -PLAYER_HANDLESPINDASH = $2C78 -PLAYER_HANDLESTANDING = $2BB4 -PLAYER_HANDLEVERTICALSPRING = $2E40 -PLAYER_HANDLEWALK = $2C9C +PLAYER_FLASHOBJECT = $321B +PLAYER_HANDLEBALANCE = $2B71 +PLAYER_HANDLECROUCHED = $2BE0 +PLAYER_HANDLEDIAGONALSPRING = $2DDE +PLAYER_HANDLEENDOFLEVEL = $2E98 +PLAYER_HANDLEENDOFLEVEL_EXITLEFT = $2F02 +PLAYER_HANDLEENDOFLEVEL_EXITRIGHT = $2EE0 +PLAYER_HANDLEENDOFLEVEL_INCLEVEL = $2EC6 +PLAYER_HANDLEFALLING = $2DF6 +PLAYER_HANDLEIDLE = $2B9B +PLAYER_HANDLEJUMPING = $2D8A +PLAYER_HANDLELOOKUP = $2BBE +PLAYER_HANDLEROLLING = $2D49 +PLAYER_HANDLERUNNING = $2CDE +PLAYER_HANDLESKIDLEFT = $2D26 +PLAYER_HANDLESKIDRIGHT = $2D03 +PLAYER_HANDLESPINDASH = $2BFC +PLAYER_HANDLESTANDING = $2B38 +PLAYER_HANDLEVERTICALSPRING = $2DC4 +PLAYER_HANDLEWALK = $2C20 PLAYER_HURTTRIGGER = $D3A8 PLAYER_KILLTRIGGER = $D49F PLAYER_MAXVELX = $D36D PLAYER_METATILEDELTAVX = $D371 -PLAYER_MINECART_HANDLE = $410C -PLAYER_NOP = $3174 -PLAYER_PLAYHURTANIMATION = $31FA -PLAYER_RAMPLAUNCH = $6708 -PLAYER_ROLLINGCHECKSKID = $2D01 -PLAYER_SETSTATE_CROUCH = $2A65 -PLAYER_SETSTATE_DEAD = $3234 -PLAYER_SETSTATE_DIAGONALSPRING = $2B16 -PLAYER_SETSTATE_FALLING = $2B4C -PLAYER_SETSTATE_HORIZONTALSPRING = $2B32 -PLAYER_SETSTATE_HURT = $31C5 -PLAYER_SETSTATE_JUMPFROMRAMP = $2AE5 -PLAYER_SETSTATE_JUMPING = $34B6 -PLAYER_SETSTATE_LOOKUP = $2A57 -PLAYER_SETSTATE_MOVEBACK = $3089 -PLAYER_SETSTATE_ROLL = $2AB3 -PLAYER_SETSTATE_ROLL_SPINDASHRELEASE = $2ACF -PLAYER_SETSTATE_RUNNING = $2A8A -PLAYER_SETSTATE_SKIDLEFT = $2AA5 -PLAYER_SETSTATE_SKIDRIGHT = $2A97 -PLAYER_SETSTATE_SPINDASH = $2A7B -PLAYER_SETSTATE_STANDING = $2A11 -PLAYER_SETSTATE_VERTICALSPRING = $2AF6 -PLAYER_SETSTATE_WALKING = $2A35 +PLAYER_MINECART_HANDLE = $4090 +PLAYER_NOP = $30F8 +PLAYER_PLAYHURTANIMATION = $317E +PLAYER_RAMPLAUNCH = $668C +PLAYER_ROLLINGCHECKSKID = $2C85 +PLAYER_SETSTATE_CROUCH = $29E9 +PLAYER_SETSTATE_DEAD = $31B8 +PLAYER_SETSTATE_DIAGONALSPRING = $2A9A +PLAYER_SETSTATE_FALLING = $2AD0 +PLAYER_SETSTATE_HORIZONTALSPRING = $2AB6 +PLAYER_SETSTATE_HURT = $3149 +PLAYER_SETSTATE_JUMPFROMRAMP = $2A69 +PLAYER_SETSTATE_JUMPING = $343A +PLAYER_SETSTATE_LOOKUP = $29DB +PLAYER_SETSTATE_MOVEBACK = $300D +PLAYER_SETSTATE_ROLL = $2A37 +PLAYER_SETSTATE_ROLL_SPINDASHRELEASE = $2A53 +PLAYER_SETSTATE_RUNNING = $2A0E +PLAYER_SETSTATE_SKIDLEFT = $2A29 +PLAYER_SETSTATE_SKIDRIGHT = $2A1B +PLAYER_SETSTATE_SPINDASH = $29FF +PLAYER_SETSTATE_STANDING = $2995 +PLAYER_SETSTATE_VERTICALSPRING = $2A7A +PLAYER_SETSTATE_WALKING = $29B9 PLAYER_UNDERWATERFLAG = $D467 -PLAYER_UPDATEPLAYER.VELY = $3573 -PLAYER_UPDATEPOSITIONX = $3506 -PLAYER_UPDATEPOSITIONX_SETZERO = $3569 -PLAYER_UPDATEVPOS = $35E0 +PLAYER_UPDATEPLAYER.VELY = $34F7 +PLAYER_UPDATEPOSITIONX = $348A +PLAYER_UPDATEPOSITIONX_SETZERO = $34ED +PLAYER_UPDATEVPOS = $3564 PLAYEROBJ = $D500 PLAYERSTATE_16 = $0010 PLAYERSTATE_ALZ_BUBBLE = $0024 @@ -1400,18 +1400,18 @@ PLAYERSTATE_WALKING = $0005 PLC_BANKNUMBER = $D3AC PLC_BYTECOUNT = $D3AD PLC_DESCRIPTOR = $D3B2 -PLC_ENDOFLEVELPATTERNS = $7195 -PLC_EOL_ALZ_BOSS = $71D4 -PLC_EOL_GHZ_BOSS = $71E1 -PLC_EOL_GMZ_BOSS = $71C0 -PLC_EOL_PRISONCAPSULE = $71AB -PLC_EOL_PRISONCAPSULEANIMALS = $71B2 -PLC_EOL_SEZ_BOSS = $71EF -PLC_EOL_SHZ_BOSS = $71CD -PLC_EOL_SIGNPOST = $71B9 -PLC_EOL_UGZ_BOSS = $71E8 -PLC_EOL_UNKNOWN_2 = $71FC -PLC_EOL_UNKNOWN_3 = $71FD +PLC_ENDOFLEVELPATTERNS = $7119 +PLC_EOL_ALZ_BOSS = $7158 +PLC_EOL_GHZ_BOSS = $7165 +PLC_EOL_GMZ_BOSS = $7144 +PLC_EOL_PRISONCAPSULE = $712F +PLC_EOL_PRISONCAPSULEANIMALS = $7136 +PLC_EOL_SEZ_BOSS = $7173 +PLC_EOL_SHZ_BOSS = $7151 +PLC_EOL_SIGNPOST = $713D +PLC_EOL_UGZ_BOSS = $716C +PLC_EOL_UNKNOWN_2 = $7180 +PLC_EOL_UNKNOWN_3 = $7181 PLC_SOURCEADDR = $D3AE PLC_VRAMADDR = $D3B0 PLOTSSCREEN = $D09466 @@ -1423,102 +1423,98 @@ PORTS_VDP_CONTROL = $00BF PORTS_VDP_DATA = $00BE PORTS_VDP_HCOUNTER = $007F PORTS_VDP_VCOUNTER = $007E -PUTBANKINSLOT2 = $7AB6 +PUTBANKINSLOT2 = $7A3A RAMSTART = $D00000 -READINPUT = $145C +READINPUT = $1462 RENDEREDSCREENMAP = $D52C00 -RENDERSCREENMAP = $D27C7B -RENDERSCREENMAP_NULLSCROLL = $D27CCA -RESTOREREGISTERS = $7A99 -RINGARTPOINTERS = $1D1E -RINGARTPOINTERS_ALZ = $1D3E -RINGARTPOINTERS_ALZ1 = $1DA4 -RINGARTPOINTERS_ALZ2 = $1DAE -RINGARTPOINTERS_ALZ3 = $1DB8 -RINGARTPOINTERS_CEZ = $1D56 -RINGARTPOINTERS_CEZ1 = $1E1C -RINGARTPOINTERS_CEZ2 = $1E26 -RINGARTPOINTERS_CEZ3 = $1E30 -RINGARTPOINTERS_GHZ = $1D44 -RINGARTPOINTERS_GHZ1 = $1D68 -RINGARTPOINTERS_GHZ2 = $1D72 -RINGARTPOINTERS_GHZ3 = $1D7C -RINGARTPOINTERS_GMZ = $1D4A -RINGARTPOINTERS_GMZ1 = $1DE0 -RINGARTPOINTERS_GMZ2 = $1DEA -RINGARTPOINTERS_GMZ3 = $1DF4 -RINGARTPOINTERS_SEZ = $1D50 -RINGARTPOINTERS_SEZ1 = $1DFE -RINGARTPOINTERS_SEZ2 = $1E08 -RINGARTPOINTERS_SEZ3 = $1E12 -RINGARTPOINTERS_SHZ = $1D38 -RINGARTPOINTERS_SHZ1 = $1D86 -RINGARTPOINTERS_SHZ2 = $1D90 -RINGARTPOINTERS_SHZ3 = $1D9A -RINGARTPOINTERS_UGZ = $1D32 -RINGARTPOINTERS_UGZ1 = $1DC2 -RINGARTPOINTERS_UGZ2 = $1DCC -RINGARTPOINTERS_UGZ3 = $1DD6 +RENDERSCREEN = $D27C05 +RENDERSCREENMAP = $D27C0B +RENDERSCREENMAP_NULLSCROLL = $D27C5A +RESTOREREGISTERS = $7A1D +RINGARTPOINTERS = $1D24 +RINGARTPOINTERS_ALZ = $1D44 +RINGARTPOINTERS_ALZ1 = $1DAA +RINGARTPOINTERS_ALZ2 = $1DB4 +RINGARTPOINTERS_ALZ3 = $1DBE +RINGARTPOINTERS_CEZ = $1D5C +RINGARTPOINTERS_CEZ1 = $1E22 +RINGARTPOINTERS_CEZ2 = $1E2C +RINGARTPOINTERS_CEZ3 = $1E36 +RINGARTPOINTERS_GHZ = $1D4A +RINGARTPOINTERS_GHZ1 = $1D6E +RINGARTPOINTERS_GHZ2 = $1D78 +RINGARTPOINTERS_GHZ3 = $1D82 +RINGARTPOINTERS_GMZ = $1D50 +RINGARTPOINTERS_GMZ1 = $1DE6 +RINGARTPOINTERS_GMZ2 = $1DF0 +RINGARTPOINTERS_GMZ3 = $1DFA +RINGARTPOINTERS_SEZ = $1D56 +RINGARTPOINTERS_SEZ1 = $1E04 +RINGARTPOINTERS_SEZ2 = $1E0E +RINGARTPOINTERS_SEZ3 = $1E18 +RINGARTPOINTERS_SHZ = $1D3E +RINGARTPOINTERS_SHZ1 = $1D8C +RINGARTPOINTERS_SHZ2 = $1D96 +RINGARTPOINTERS_SHZ3 = $1DA0 +RINGARTPOINTERS_UGZ = $1D38 +RINGARTPOINTERS_UGZ1 = $1DC8 +RINGARTPOINTERS_UGZ2 = $1DD2 +RINGARTPOINTERS_UGZ3 = $1DDC RINGCOUNTER = $D299 -ROM_HEADER = $7858 +ROM_HEADER = $77DC ROMSTART = $D20000 SAT = $D64B00 -SAVEFILE = $7C4E -SAVEGAME = $7B48 +SAVEFILE = $7BD2 +SAVEGAME = $7ACC SAVESP = $DE02 SAVESSCREEN = $D0EA1F SCORE = $D29C -SCORE_ADDBADNIKVALUE = $16F7 -SCORE_ADDBOSSVALUE = $16FD -SCORE_ADDVALUE = $1AC4 -SCORE_BADNIKVALUE = $18BB -SCORE_BOSSVALUE = $18BE -SCORE_CALCULATEACTTIMESCORE = $1939 -SCORE_CALCULATEACTTIMESCORE_SEC = $1959 -SCORE_CONVERTBCDTOASCI = $1882 -SCORECARD_LOADMAPPINGS = $701B -SCORECARD_MAPPINGS_BLANK = $187A -SCORECARD_MAPPINGS_NUMBERS = $1852 -SCORECARD_UPDATESCORE = $1695 +SCORE_ADDBADNIKVALUE = $16FD +SCORE_ADDBOSSVALUE = $1703 +SCORE_ADDVALUE = $1ACA +SCORE_BADNIKVALUE = $18C1 +SCORE_BOSSVALUE = $18C4 +SCORE_CALCULATEACTTIMESCORE = $193F +SCORE_CALCULATEACTTIMESCORE_SEC = $195F +SCORE_CONVERTBCDTOASCI = $1888 +SCORECARD_LOADMAPPINGS = $6F9F +SCORECARD_MAPPINGS_BLANK = $1880 +SCORECARD_MAPPINGS_NUMBERS = $1858 +SCORECARD_UPDATESCORE = $169B SCREENMAP = $D64400 -SCROLLADJUSTVALUES = $0594 -SCROLLINGTEXT_DATA_CHARCODES = $22C3 -SCROLLINGTEXT_LOADSATVALUES = $228F -SCROLLINGTEXT_UPDATESPRITE = $22E6 -SCROLLINGTEXT_UPDATESPRITES = $226D -SCROLLINGTEXT_UPDATEWORKINGSAT = $22D3 -SCROLLINGTRIG = $D4C2 +SCROLLADJUSTVALUES = $0597 +SCROLLINGTEXT_UPDATESPRITES = $2273 SEGASP = $DE05 SEGATILECACHE = $D031F6 SEGATILEFLAGS = $D64C00 SEGAVRAM = $D60C00 -SETCACHEDTILE_DRAWINGGAP = $D27E06 -SETCACHEDTILE_DRAWINGGAPY = $D27DB4 -SETCACHEDTILE_DRAWINGX = $D27E0B -SETCACHEDTILE_DRAWINGY = $D27DB8 -SETSCANLINESKIP = $D27F59 -SETSPRITECOORDS = $D27F24 -SETSPRITEPTR = $D27F38 -SETTILECACHEFLAGS = $1637 -SMS_PALETTE = $0FAC +SETCACHEDTILE_DRAWINGGAP = $D27D96 +SETCACHEDTILE_DRAWINGGAPY = $D27D44 +SETCACHEDTILE_DRAWINGX = $D27D9B +SETCACHEDTILE_DRAWINGY = $D27D48 +SETSCANLINESKIP = $D27EFD +SETSPRITECOORDS = $D27EC8 +SETSPRITEPTR = $D27EDC +SETTILECACHEFLAGS = $163D +SMS_PALETTE = $0FB2 SOURCEPOINTER = $D348 SPECOBJ_HIDETIMERRINGS = $0006 SPRITEDEF.BANKNUM = $0000 SPRITEDEF.LINECOUNT = $0003 SPRITEDEF.SOURCEADDRESS = $0001 -STOREREGISTERS = $7A7D +STOREREGISTERS = $7A01 TEMPSP = $D0053F TILECOUNT = $D342 -TILESET_ALZ = $73C2 -TILESET_CEZ = $74A2 -TILESET_CEZ3 = $74DF -TILESET_GHZ = $73FF -TILESET_GMZ = $742D -TILESET_INTRO = $7509 -TILESET_SEZ = $746A -TILESET_SHZ = $7380 -TILESET_UGZ = $733E -TILESET_UNK1 = $74EF +TILESET_ALZ = $7346 +TILESET_CEZ = $7426 +TILESET_CEZ3 = $7463 +TILESET_GHZ = $7383 +TILESET_GMZ = $73B1 +TILESET_INTRO = $748D +TILESET_SEZ = $73EE +TILESET_SHZ = $7304 +TILESET_UGZ = $72C2 +TILESET_UNK1 = $7473 TILESETENTRY.BANKNUM = $0000 TILESETENTRY.SOURCEADDRESS = $0003 TILESETENTRY.VRAMADDRESS = $0001 @@ -1526,49 +1522,49 @@ TILESETHEADER.BANKNUM = $0000 TILESETHEADER.ENTRIES = $0005 TILESETHEADER.SOURCEADDRESS = $0003 TILESETHEADER.VRAMADDRESS = $0001 -TIME_1SECOND = $003C -TIME_2SECONDS = $0078 -TIME_3SECONDS = $00B4 -TITLECARD_LOADACTLOGOMAPPINGS = $209F -TITLECARD_LOADANDDRAW = $202F -TITLECARD_LOADTEXT = $2066 -TITLECARD_LOADTILES = $6F51 -TITLECARD_LOADZONETEXT = $20C9 -TITLECARD_MAPPINGS = $22FF -TITLECARD_PICTUREPOINTERS = $6FC6 -TITLECARD_SCROLLACTLOGO = $2137 -TITLECARD_SCROLLTEXTFROMLEFT = $20F6 -TITLESCREEN_CHANGEPRESSSTARTTEXT = $0E9C +TIME_1SECOND = $001E +TIME_2SECONDS = $003C +TIME_3SECONDS = $005A +TITLECARD_LOADACTLOGOMAPPINGS = $20A5 +TITLECARD_LOADANDDRAW = $2035 +TITLECARD_LOADTEXT = $206C +TITLECARD_LOADTILES = $6ED5 +TITLECARD_LOADZONETEXT = $20CF +TITLECARD_MAPPINGS = $2283 +TITLECARD_PICTUREPOINTERS = $6F4A +TITLECARD_SCROLLACTLOGO = $213D +TITLECARD_SCROLLTEXTFROMLEFT = $20FC +TITLESCREEN_CHANGEPRESSSTARTTEXT = $0EA2 UNK_01 = $D001 UNK_02 = $D12D UNK_03 = $D130 UNK_04 = $D132 UNK_05 = $D176 UNK_06 = $D203 -UPDATECYCLINGPALETTE_CONVEYOR = $767C -UPDATECYCLINGPALETTE_DONOTHING = $75A2 -UPDATECYCLINGPALETTE_DONOTHING2 = $75B1 -UPDATECYCLINGPALETTE_JUMPVECTORS = $7582 -UPDATECYCLINGPALETTE_LAVA = $7618 -UPDATECYCLINGPALETTE_LIGHTNING = $7737 -UPDATECYCLINGPALETTE_LIGHTNING2 = $7767 -UPDATECYCLINGPALETTE_ORB = $7708 -UPDATECYCLINGPALETTE_RAIN = $75B2 -UPDATECYCLINGPALETTE_SCROLLINGTEXT = $7784 -UPDATECYCLINGPALETTE_SHZ_LIGHTNING = $75E4 -UPDATECYCLINGPALETTE_UNKNOWN2 = $76AE -UPDATECYCLINGPALETTE_WALLLIGHTING = $76DD -UPDATECYCLINGPALETTE_WATER = $764A -UPDATECYCLINGPALETTEBANK = $7572 +UPDATECYCLINGPALETTE_CONVEYOR = $7600 +UPDATECYCLINGPALETTE_DONOTHING = $7526 +UPDATECYCLINGPALETTE_DONOTHING2 = $7535 +UPDATECYCLINGPALETTE_JUMPVECTORS = $7506 +UPDATECYCLINGPALETTE_LAVA = $759C +UPDATECYCLINGPALETTE_LIGHTNING = $76BB +UPDATECYCLINGPALETTE_LIGHTNING2 = $76EB +UPDATECYCLINGPALETTE_ORB = $768C +UPDATECYCLINGPALETTE_RAIN = $7536 +UPDATECYCLINGPALETTE_SCROLLINGTEXT = $7708 +UPDATECYCLINGPALETTE_SHZ_LIGHTNING = $7568 +UPDATECYCLINGPALETTE_UNKNOWN2 = $7632 +UPDATECYCLINGPALETTE_WALLLIGHTING = $7661 +UPDATECYCLINGPALETTE_WATER = $75CE +UPDATECYCLINGPALETTEBANK = $74F6 UPDATEPALETTESONLY = $D4A3 VDP_224LINESELECTBIT = $0010 VDP_240LINESELECTBIT = $0008 -VDP_CLEARSAT = $11D3 -VDP_CLEARSCREEN = $11A4 -VDP_CLEARSCREENMAP = $118E -VDP_COPY = $10C4 +VDP_CLEARSAT = $11D9 +VDP_CLEARSCREEN = $11AA +VDP_CLEARSCREENMAP = $1194 +VDP_COPY = $10CA VDP_DEFAULTTILEATTRIBS = $D2C7 -VDP_DISABLEFRAMEINTERRUPT = $10F4 +VDP_DISABLEFRAMEINTERRUPT = $10FA VDP_DISPLAYVISIBLEBIT = $0040 VDP_DISPMODE_M1 = $0001 VDP_DISPMODE_M2 = $0002 @@ -1576,35 +1572,35 @@ VDP_DISPMODE_M3 = $0004 VDP_DISPMODE_M4 = $0008 VDP_DISPMODE_SMS_224 = $000B VDP_DISPMODE_SMS_240 = $000E -VDP_DRAWTEXT = $10FC -VDP_ENABLEFRAMEINTERRUPT = $10EC +VDP_DRAWTEXT = $1102 +VDP_ENABLEFRAMEINTERRUPT = $10F2 VDP_EXTRAHEIGHTBIT = $0002 VDP_FRAMEINTERRUPTSBIT = $0020 VDP_HSCROLL = $D877 VDP_HSCROLLBIT = $0040 -VDP_INITREGISTERS = $102C +VDP_INITREGISTERS = $1032 VDP_LARGESPRITESBIT = $0002 VDP_LINEINTERRUPTSBIT = $0010 VDP_MASKCOLUMN0BIT = $0020 VDP_MODE4BIT = $0004 -VDP_READBYTE = $1084 -VDP_READSTATUS = $105B -VDP_RESETPALETTE_DISABLELINEINTERRUPT = $059C +VDP_READBYTE = $108A +VDP_READSTATUS = $1061 +VDP_RESETPALETTE_DISABLELINEINTERRUPT = $059F VDP_SATADDRESS = $D64B00 VDP_SATUPDATETRIG = $D134 VDP_SCREENMAP = $D64400 -VDP_SENDREAD = $106C -VDP_SETADDRESS = $105F -VDP_SETMODE2REG_DISPLAYOFF = $10E4 -VDP_SETMODE2REG_DISPLAYON = $10DC -VDP_SETREGISTER = $1044 +VDP_SENDREAD = $1072 +VDP_SETADDRESS = $1065 +VDP_SETMODE2REG_DISPLAYOFF = $10EA +VDP_SETMODE2REG_DISPLAYON = $10E2 +VDP_SETREGISTER = $104A VDP_SPRITEDOUBLINGBIT = $0001 VDP_SPRITESHIFTBIT = $0008 VDP_SYNCENABLEBIT = $0001 VDP_TILECOLBUFFER = $D17F VDP_TILEROWBUFFER = $D1BB -VDP_UPDATESAT = $115B -VDP_UPDATESAT_ATTRIBUTES = $116C +VDP_UPDATESAT = $1161 +VDP_UPDATESAT_ATTRIBUTES = $1172 VDP_VIEWPORTX = $D179 VDP_VIEWPORTY = $D17C VDP_VSCROLL = $D878 @@ -1612,11 +1608,11 @@ VDP_VSCROLLBIT = $0080 VDP_WORKINGSAT = $DB00 VDP_WORKINGSAT_HPOS = $DB40 VDP_WORKINGSAT_VPOS = $DB00 -VDP_WRAPCOLUMNADDRESS = $13E0 -VDP_WRAPROWADDRESS = $13F0 -VDP_WRITE = $10A5 -VDP_WRITEANDSKIP = $1092 -VDP_WRITEBYTE = $1077 +VDP_WRAPCOLUMNADDRESS = $13E6 +VDP_WRAPROWADDRESS = $13F6 +VDP_WRITE = $10AB +VDP_WRITEANDSKIP = $1098 +VDP_WRITEBYTE = $107D VDPREGISTER0 = $D11E VDPREGISTER1 = $D11F VDPREGISTER2 = $D120 @@ -1690,7 +1686,7 @@ VRAM = $D40000 VRAMEND = $D65800 VRAMPOINTER = $DE00 WORKINGCRAM = $D4C6 -WRITEBLANKTILE = $15DA -WRITEMIRROREDTILETOVRAM = $1615 -WRITETILETOVRAM = $15E5 -XORDECODE = $157E +WRITEBLANKTILE = $15E0 +WRITEMIRROREDTILETOVRAM = $161B +WRITETILETOVRAM = $15EB +XORDECODE = $1584 diff --git a/src/s2_engine.asm b/src/s2_engine.asm index b345d3f..fe9563f 100644 --- a/src/s2_engine.asm +++ b/src/s2_engine.asm @@ -146,7 +146,7 @@ Engine_ErrorTrap: ;$0073 call VDP_DrawText ; hang for 180 frames - ld b, 180 + ld b, 90 _: ei halt djnz -_ @@ -307,9 +307,6 @@ Engine_HandleVBlank: ; $04A5 push ix push iy ; ------------------------------------- - call DrawScreen ;draw the last interrupt's frame - ld a, (Frame2Page) - ld ($FFFF), a ; if this trigger is set we should update VDP colour RAM ; and nothing else ld a, (UpdatePalettesOnly) @@ -319,6 +316,10 @@ Engine_HandleVBlank: ; $04A5 ld a, ($D136) or a jp nz, Engine_HandleVBlank_Epilogue + + call DrawScreen ;draw the last interrupt's frame + ld a, (Frame2Page) + ld ($FFFF), a call VDP_SetMode2Reg_DisplayOff ;update VDP mode control register 2 ld bc, $0000 @@ -453,6 +454,7 @@ _: ld.lil hl, $E30028 ret Engine_HandleVBlank_PalettesOnly: ; $058D + call Palette_Update call Engine_CopyPalettes jp Engine_HandleVBlank_Epilogue @@ -878,7 +880,7 @@ LABEL_8A4: call Engine_ClearAuxLevelHeader call PaletteFadeOut - ld b, $1E + ld b, 15 _: ei halt djnz -_ @@ -986,12 +988,13 @@ _: ld hl, GlobalTriggers GameState_Titlecard: ; $097F call Engine_ClearVRAM + call Engine_ClearWorkingVRAM call TitleCard_LoadAndDraw call ScrollingText_UpdateSprites ; fade out over 42 frames call PaletteFadeOut - ld b, $2A + ld b, 21 _: ei halt djnz -_ @@ -1161,8 +1164,8 @@ LABEL_F41: ld a, $1E ld ($D780), a - ld bc, $030C + ld bc, $0186 _: call LABEL_107C push bc call Engine_WaitForInterrupt @@ -1177,7 +1180,7 @@ _: call LABEL_107C ld (Player.StateNext), a call Engine_LockCamera - ld bc, $0078 + ld bc, $007E _: call LABEL_107C push bc call Engine_WaitForInterrupt @@ -1277,7 +1280,7 @@ LABEL_FB9: ld (FrameCounter), a ;reset the frame counter ; wait for .5 sec - ld bc, 30 + ld bc, 15 _: push bc call Engine_WaitForInterrupt call Engine_UpdateLevelState @@ -1288,7 +1291,7 @@ _: push bc or c jr nz, -_ - ld bc, $04B0 + ld bc, $0258 _: call LABEL_107C push bc call Engine_WaitForInterrupt @@ -3378,7 +3381,7 @@ LABEL_243C: xor a ld ($D700), a call PaletteFadeOut - ld b, $2A + ld b, 21 _: ei halt djnz -_ @@ -3392,7 +3395,7 @@ _: ei LABEL_2459_51: call _Load_Title_Level call PaletteFadeOut ;fade the palette - ld b, $2A + ld b, 21 _: ei halt djnz -_ @@ -3449,7 +3452,7 @@ LABEL_24BE_48: ld ($D294), a call LevelSelectMenu ;run the level select call PaletteFadeOut - ld b, $2A + ld b, 21 _: ei halt djnz -_ @@ -3561,7 +3564,7 @@ DemoSequence_LoadLevel: ;254A call TitleCard_LoadAndDraw call ScrollingText_UpdateSprites call PaletteFadeOut - ld b, $2A ;pause to load the level + ld b, 21 ;pause to load the level _: ei halt djnz -_ @@ -3981,96 +3984,18 @@ LABEL_2849: ;TODO: unused? ret ScrollingText_UpdateSprites: ;285D - call ScrollingText_LoadSATValues -_: ld a, $FF ;flag for a SAT update - ld (VDP_SATUpdateTrig), a - call ScrollingText_UpdateWorkingSAT - call UpdateCyclingPalette_ScrollingText + ld hl, $003C +_: push hl + call LABEL_107C ei halt - ld a, (Engine_InputFlagsLast) ;check for button press - and BTN_1 | BTN_2 - ret nz - ld hl, ($D3BA) ;timer? + pop hl dec hl - ld ($D3BA), hl ld a, h - or l ;is timer 0? + or l jr nz, -_ ret -ScrollingText_LoadSATValues: ;2880 - ld hl, $0078 - ld ($D3BA), hl - ld hl, $DB00 ;working copy of SAT VPos attributes - ld b, $08 ;set vpos to $18 for 8 sprites - ld a, $18 -_: ld (hl), a - inc hl - djnz -_ - ld b, $08 ;set vpos to $30 for 8 sprites - ld a, $30 -_: ld (hl), a - inc hl - djnz -_ - ld hl, $DB40 ;working copy of SAT Hpos/char codes - ld de, ScrollingText_Data_CharCodes - ld b, $10 ;update 16 sprites -_: ld a, (de) ;copy char code to working copy of SAT - ld (hl), a - inc hl - ld a, $82 ;set HPOS = $82 - dec b - bit 2, b - jr nz, +_ - ld a, $80 ;set HPOS = $80 -_: inc b - ld (hl), a - inc hl ;next sprite - inc de ;next char code - djnz --_ - ret - -ScrollingText_Data_CharCodes: ;$28B4 -.db $D0, $20, $40, $D8, $40, $30, $20, $D8 -.db $A0, $A8, $80, $70, $90, $A0, $60, $70 - - -ScrollingText_UpdateWorkingSAT: -LABEL_28C4: - ld hl, $DB40 ;HPOS/char - ld de, $DB00 ;VPOS - ld b, $10 ;update 16 sprite entries -_: ld a, (hl) ;do we have a sprite here? - or a - call nz, ScrollingText_UpdateSprite - inc hl ;move to next HPOS/char - inc hl - inc de ;move to next VPOS - djnz -_ - ret - -ScrollingText_UpdateSprite: -LABEL_28D7: - inc hl ;get the HPOS attribute - ld a, (hl) - dec hl - dec (hl) - cp $82 ;sprite char $82? - jr nz, +_ - dec (hl) ;move the sprite left. -_: ld a, (de) ;get the VPOS - ld c, $10 - cp $18 ;vpos == $18? - jr z, +_ - ld c, $50 -_: ld a, (hl) - cp c - ret nc - ld a, $D0 ;SAT terminator marker byte - ld (hl), a - ret - TitleCard_Mappings: ;28F0 #include "titlecard_mappings.asm" diff --git a/src/screen_drawing_routines.asm b/src/screen_drawing_routines.asm index 6cc3668..7be78d9 100644 --- a/src/screen_drawing_routines.asm +++ b/src/screen_drawing_routines.asm @@ -4,25 +4,31 @@ .ASSUME ADL=0 DrawScreen: .ORG DrawScreen+romStart - + ;start drawing the tilemap ld a, (DrawTilemapTrig) bit 0, a call.lil nz, DrawScreenMap ld a, (DrawTilemapTrig) bit 1, a call.lil nz, RenderScreenMap + ;start drawing the SAT ld a, (DrawSATTrig) or a call.lil nz, DrawSAT - ;right now, let's only draw the sprites, - ;since tilemap drawing would take a lot more cycles. + + ld a, (DrawTilemapTrig) + ld (LastTilemapTrig), a xor a ld (DrawSATTrig), a ld (DrawTilemapTrig), a ret .ASSUME ADL=1 +RenderScreen: + call.lil RenderScreenMap + ret + RenderScreenMap: ld hl, RenderedScreenMap ld de, VRAM+$1E20 ;first letter in letterbox @@ -357,6 +363,12 @@ _: push hl ret DrawSAT: ;draws all the sprites, from least to most significant + ld hl, DrawTilemapTrig + ld.sis a, (LastTilemapTrig) + or.sis (hl) + bit 0, a + call z, RenderScreen + ld a, 1 ld ($D2DE06), a ld iy, SAT ;y position @@ -370,18 +382,24 @@ _: ld h, (iy) ld a, 208 cp h ;is the sprite's Y position 208? ret.sis z ;stop rendering SAT if so - ld a, 192 - cp h ;is the sprite off-screen? + + ;is the sprite off-screen? + ld a, 175 + cp h jr c, +_ ;skip this sprite ld a, (ix) or a - jr z, +_ + jr z, +_ ;check if the same applies to Y coords + cp $F8 + jr nc, +_ + + ;draw the top half of the sprite call SetSpriteCoords ;set sprite coordinates ex de, hl ;HL now points to the tile's top-left corner ld l, (ix+1) call SetSpritePTR - ;calc bottom half of 8x16 sprite + ;draw the bottom half of the sprite ld a, (iy) add a, 8 ld h, a diff --git a/src/sonic2.asm b/src/sonic2.asm index 9462fa5..9975b69 100644 --- a/src/sonic2.asm +++ b/src/sonic2.asm @@ -32,6 +32,12 @@ _START: call SegaLogo + ;set LCD to 30hz refresh rate + ld hl, mpLcdTiming1 + ld (hl), $7E + inc hl + inc (hl) + ;clear VRAM ld hl, VRAM ld de, VRAM+1 diff --git a/src/vdp.asm b/src/vdp.asm index 1ea26a8..36045b7 100644 --- a/src/vdp.asm +++ b/src/vdp.asm @@ -3,7 +3,7 @@ #define VDP_SATAddress SegaVRAM+$3F00 #define DrawTilemapTrig $D4C0 #define DrawSATTrig $D4C1 -#define ScrollingTrig $D4C2 +#define LastTilemapTrig $D4C2 ; ============================================================================= ; VDP_InitRegisters() ; -----------------------------------------------------------------------------