______ _ _____ _____ | ___ \ | | | _ | _ | | |_/ / __ _ _ __ | | __ \ V /| |/' | | ___ \/ _` | '_ \| |/ / / _ \| /| | | |_/ / (_| | | | | < | |_| \ |_/ / \____/ \__,_|_| |_|_|\_\ \_____/\___/ Data - 000000/007FFF - Common routines |$80|8000-8001 [data] Skip NTSC/PAL and SRAM mapping check| |$80|8002-8003 [data] Demo recorder| |$80|8004-8005 [data] Debug mode| |$80|8006-8007 [data] Debug scrolling| |$80|8008-8009 [data] Something for the audio man| |$80|800A-8027 Load new music (parameter after call)| |$80|8028-8058 Load new music (parameter in $00)| |$80|8059-80FF Process music data| |$80|8100-8110 Increment Y (once or twice), bank overflow check| |$80|8111-8145 Random number generator| |$80|8146-818D ???| |$80|818E-81A5 Change nth bit to address offset and mask| |$80|81A6-81BF Set boss bits in A for current area ($7E:D828,X)| |$80|81C0-81DB Clear boss bits in A for current area ($7E:D828,X)| |$80|81DC-81F9 Checks if the boss bits for the current area matches any bits in A. SEC if there's a match| |$80|81FA-8211 Marks an event as happened. Event bit # must be stored in A| |$80|8212-8232 Marks an event as not happened. Event bit # must be stored in A| |$80|8233-824E Checks if an event has happened. Event bit # must be stored in A. CLC if 0, SEC if 1| |$80|824F-8260 Write 'supermetroid' to SRAM ($70:1FE0..1FEB)| |$80|8261-82AC Check for non-corrupt SRAM| |$80|82AD-82B8 [data] 'madadameyohn' garbage written if there's corrupt SRAM| |$80|82B9-82C4 [data] 'supermetroid' written to SRAM| |$80|82C5-82D5 Wait until the end of a VBlank| |$80|82D6-8337 Multiplies A and Y together (16-bit * 16-bit). Result in $05F1-$05F4| |$80|8338-834A Wait for IRQ| |$80|834B-835C Enable NMI with $84 options| |$80|835D-836E Disable NMI with $84 options| |$80|836F-8381 Set force blank| |$80|8382-8394 Clear force blank| |$80|8395-83BC DMA, slot 1, 200h bytes from $7E:C000 through $2122 (CGRAM Data Write)| |$80|83BD-83CF 8-bit write Y bytes of A to $00:X| |$80|83D0-83E2 16-bit write Y bytes of A to $00:X| |$80|83E3-83F5 8-bit write Y bytes of A to $7E:X| |$80|83F6-8408 16-bit write Y bytes of A to $7E:X| |$80|8409-841B 16-bit write Y bytes of A to $7F:X| |$80|841C-8461 Boot| |$80|8462-8081 Soft reset| |$80|8482-8572 Game initialisation| |$80|8573-8576 Infinite loop; pointed to by misc. error handling| |$80|8577-858B Wait A many IRQs| |$80|858C-85B5 Load mirror of current area's map explored| |$80|85C6-85F5 Mirror current area's map explored| |$80|85F6-875C NTSC/PAL and SRAM mapping check| |$80|875D-8791 Initialise $4200..420D| |$80|8792-88B3 Initialise $2100..2133| |$80|88B4-88D0 Clear high RAM| |$80|88D1-88EA Write a load of 1C2Fh| |$80|88EB-88FD Write 800h bytes of A to $7E:3000| |$80|88FE-8910 Write 800h bytes of A to $7E:4000| |$80|8911-8923 Write 800h bytes of A to $7E:6000| |$80|8924-894C Handle fading out| |$80|894D-896D Handle fading in| |$80|896E-8B19 Clear unused OAM (sprites to Y=F0h), clear OAM data offset| |$80|8B1A-8B4E Clear all OAM high-x bits and sizes| |$80|8B4F-8BB9 Unpack mode 7 DMAs| |$80|8BBA-8BD2 Handle mode 7 DMAs| |$80|8BD3-8C82 Handle mode 7 DMAs continued| |$80|8C83-8CD7 Process $D0,X VRAM writes| |$80|8CD8-8DAB Execute horizontal scrolling DMAs| |$80|8DAC-8EA1 Execute vertical scrolling DMAs| |$80|8EA2-8EF3 Handle $0340,X VRAM reads| |$80|8EF4-8F0B Check for command timer| |$80|8F0C-8FA2 ???| |$80|8FA3-8FC0 ???| |$80|8FC1-8FF6 Changes music song/instruments or music track to A, with an 8-frame delay. Makes sure 0639 does not lap 063B| |$80|8FF7-9020 Changes music song/instruments or music track to A, with a Y-frame delay (minimum of 8). Does not stop 0639 from lapping 063B| |$80|9021-902A Sound library 1, $0653 = 0Fh| |$80|902B-9034 Sound library 1, $0653 = 09h| |$80|9035-903E Sound library 1, $0653 = 03h| |$80|903F-9048 Sound library 1, $0653 = 01h| |$80|9049-9050 Sound library 1, $0653 = 06h| |$80|9051-90A2 Sound library 1| |$80|90A3-90AC Sound library 2, $0653 = 0Fh| |$80|90AD-90B6 Sound library 2, $0653 = 09h| |$80|90B7-90C0 Sound library 2, $0653 = 03h| |$80|90C1-90CA Sound library 2, $0653 = 01h| |$80|90CB-90D2 Sound library 2, $0653 = 06h| |$80|90D3-9124 Sound library 2| |$80|9125-912E Sound library 3, $0653 = 0Fh| |$80|912F-9138 Sound library 3, $0653 = 09h| |$80|9139-9142 Sound library 3, $0653 = 03h| |$80|9143-914C Sound library 3, $0653 = 01h| |$80|914D-9154 Sound library 3, $0653 = 06h| |$80|9155-91A6 Sound library 3| |$80|91A7-91A8 NOP : RTS| |$80|91A9-91ED Set up a (H)DMA transfer| |$80|91EE-9339 Update hardware registers| |$80|933A-9375 Update OAM & CGRAM| |$80|9376-9415 Samus' graphics -> VRAM| |$80|9416-9458 Handle misc. animations (spikes, FX1)| |$80|9459-9582 Read controller input. Also a debug branch| |$80|9583-9615 NMI| |$80|9616-9631 [data] Interrupt commands| |$80|9632-966D DMA transfer to VRAM| |$80|966E-967F Interrupt command 00h. Next interrupt command = [$A7]| |$80|9680-968A Interrupt command 02h. Disable horizontal and vertical timer interrupts| |$80|968B-96A8 Interrupt command 04h. Main gameplay, status bar drawing| |$80|96A9-96D2 Interrupt command 06h. Main gameplay, status bar drawn| |$80|96D3-96F0 Interrupt command 08h. Start of room transition, status bar drawing| |$80|96F1-9719 Interrupt command 0Ah. Start of room transition, status bar drawn| |$80|971A-9732 Interrupt command 0Ch. Draygon's room, status bar drawing| |$80|9733-9757 Interrupt command 0Eh. Draygon's room, status bar drawn| |$80|9758-9770 Interrupt command 10h. Vertical room transition, status bar drawing| |$80|9771-97A8 Interrupt command 12h. Vertical room transition, screen drawing| |$80|97A9-97C0 Interrupt command 14h. Vertical room transition, screen drawn| |$80|97C1-97D9 Interrupt command 16h. Horizontal room transition, status bar drawing| |$80|97DA-9809 Interrupt command 18h. Horizontal room transition, screen drawing| |$80|980A-9829 Interrupt command 1Ah. Horizontal room transition, screen drawn| |$80|982A-9840 Enable horizontal and vertical timer interrupts| |$80|9841-985E Enable horizontal and vertical timer interrupts now| |$80|985F-9869 Disable horizontal and vertical timer interrupts| |$80|986A-988A IRQ| |$80|988B-98CA [data] HUD tilemap - top row, never changed| |$80|98CB-998A [data] HUD tilemap - item selector background| |$80|998B-9996 [data] HUD tilemap - auto reserve| |$80|9997-99A2 [data] HUD tilemap - empty auto reserve| |$80|99A3-99AE [data] HUD tilemap - missiles| |$80|99AF-99B6 [data] HUD tilemap - super missiles| |$80|99B7-99BE [data] HUD tilemap - power bombs| |$80|99BF-99C6 [data] HUD tilemap - grapple| |$80|99C7-99CE [data] HUD tilemap - x-ray| |$80|99CF-9A0D Add missiles to HUD WRAM tilemap| |$80|9A0E-9A1D Add super missiles to HUD WRAM tilemap| |$80|9A1E-9A2D Add power bombs to HUD WRAM tilemap| |$80|9A2E-9A3D Add grapple to HUD WRAM tilemap| |$80|9A3E-9A4B Add x-ray to HUD WRAM tilemap| |$80|9A4C-9A78 Add to HUD WRAM tilemap| |$80|9A79-9B43 HUD routine when game is loading| |$80|9B44-9CCD HUD routine when game is paused/running| |$80|9CCE-9CE9 [data] Energy tank icon WRAM tilemap offsets| |$80|9CEA-9D6D Toggle HUD item highlight| |$80|9D6E-9D77 [data] Item WRAM tilemap offsets| |$80|9D78-9D97 Draw three HUD digits| |$80|9D98-9DBE Draw two HUD digits| |$80|9DBF-9DD2 [data] HUD digits tilemap values - Health| |$80|9DD3-9DE6 [data] HUD digits tilemap values - Artillery| |$80|9DE7-9DFA Process timer| |$80|9DFB-9E08 [data] Pointers to timer code| |$80|9E09-9E1B Ceres start timer| |$80|9E1C-9E2E Mother Brain start timer| |$80|9E2F-9E40 Delay timer running/movement| |$80|9E41-9E57 Run timer, delay movement| |$80|9E58-9E8B Move timer, still running| |$80|9E8C-9E92 Set timer to A_high minutes and A_low seconds| |$80|9E93-9EA8 Clear timer RAM| |$80|9EA9-9EEB Finally stop timer movement, still running| |$80|9EEC-9F6B [data] Timer centisecond decrements| |$80|9F6C-9F94 Draw timer| |$80|9F95-9FB0 Draw timer section| |$80|9FB3-9DF3 Draw timer spritemap| |$80|9FD4-9FE7 [data] Timer digits spritemap pointers| |$80|9FE8-A05F [data] Timer digits spritemaps| |$80|A060-A07A [data] Timer TIME spritemap| |$80|A07B-A12A ???| |$80|A12B-A148| |$80|A149-A175| |$80|A176-A1E2| |$80|A1E3-A210 Add VRAM $4800..57FF = 0338h| |$80|A211-A23E Add VRAM $5880..677F = 184Eh| |$80|A23F-A29B VRAM $4800..4FFF = 3838h| |$80|A29C-A2F8 VRAM $5880..5FFF = 184Eh| |$80|A2F9-A339 Calculate layer 2 X position| |$80|A33A-A37A Calculate layer 2 Y position| |$80|A37B-A39F Calculate BG positions| |$80|A3A0-A3AA Updates only BG1 when scrolling, I think| |$80|A3AB-A4BA Updates BG1 and BG2 graphics when scrolling| |$80|A4BB-A527 Calculate blocks scrolled| |$80|A528-A640 Handle autoscrolling when not moving horizontally and part of the screen is has no scroll| |$80|A641-A6BA Handle scrolling when moving and triggered scrolling right| |$80|A6BB-A730 Handle scrolling when moving and triggered scrolling left| |$80|A731-A892 Handle autoscrolling when not moving vertically and part of the screen is has no scroll| |$80|A893-A935 Handle scrolling when moving and triggered scrolling down| |$80|A936-A9AB Handle scrolling when moving and triggered scrolling up| |$80|A9AC-A9D5 Debug scroll position save/loading| |$80|A9D6-ABDA Update background data block| |$80|A9DB-AB6F Update level data block| |$80|AB70-AB74 Update a block in Layer 2 / BG2| |$80|AB75-AD1C Update a block in Layer 1 / BG1| |$80|AD1D-AD2F Run to 'Fix' doors moving up; redraws top row of blocks| |$80|AD30-AD49 Follow door transition| |$80|AD4A-AD73 Door transition - right| |$80|AD74-AD9D Door transition - left| |$80|AD9E-ADC7 Door transition - down| |$80|ADC8-AE07 Door transition - up| |$80|AE08-AE0F [data] Pointers to door transition code| |$80|AE10-AE28 Save number of blocks scrolled| |$80|AE29-AE4D Update BG scroll offsets| |$80|AE4E-AE75 Follow door transition| |$80|AE76-AE7D [data] Pointers to door transition code| |$80|AE7E-AEC1 Door transition - right| |$80|AEC2-AF01 Door transition - left| |$80|AF02-AF88 Door transition - down| |$80|AF89-B031 Door transition - up| |$80|B032-B0C1 Unused. Mode 7 initialisation?| |$80|B0C2-B0FE Configure mode 7 rotation matrix| |$80|B0FF-B118 Decompression to [PC+3]| |$80|B119-B265 Decompression| |$80|B266-B270 Source bank overflow correction| |$80|B271-B436 Decompression to VRAM| |$80|B437-BC36 [data] Tilemap for failed NTSC/PAL check| |$80|BC37-C436 [data] Tilemap for failed SRAM mapping check| |$80|C437-C4B4 Load new save/elevator| |$80|C4B5-C4C4 [data] Pointers to each area's saves/elevators| |$80|C4C5-C5CE [data] Crateria saves/elevators| |$80|C5CF-C6C8 [data] Brinstar saves/elevators| |$80|C6D9-C81A [data] Norfair saves/elevators| |$80|C81B-C916 [data] Wrecked Ship saves/elevators| |$80|C917-CA2E [data] Maridia saves/elevators| |$80|CA2F-CB2A [data] Tourian saves/elevators| |$80|CB2B-CC18 [data] Ceres saves/elevators| |$80|CC19-CD06 [data] Debug saves/elevators| |$80|CD07-CD45 Set elevators as used| |$80|CD46-CD51 [data] Pointers to each area's elevator bits| |$80|CD52-CD65 [data] Crateria elevator bits| |$80|CD66-CD75 [data] Brinstar elevator bits| |$80|CD76-CD81 [data] Norfair elevator bits| |$80|CD82-CD85 [data] Maridia elevator bits| |$80|CD86-CD89 [data] Tourian elevator bits| |$80|CD8A-CD8D [data] Wrecked Ship elevator bits| |$80|CD8E-FFBF Free space| |$80|FFC0-FFFF [data] Game header|