├── asarmon.exe ├── .gitattributes ├── resources ├── palettes.png ├── music │ ├── song0B.mid │ ├── song0B.pdf │ └── song0B.ly ├── tracker.txt ├── character_encode.txt ├── music.txt ├── memory_usage_ancilla.txt └── sfx.txt ├── .gitignore ├── _build.bat ├── bin ├── alttp.sfc.txt ├── gfx │ └── Makefile └── brr │ └── Makefile ├── Makefile ├── bank_10.asm ├── functions.asm ├── main.asm ├── binextract.py ├── README.md ├── bank_19.asm ├── registers_spc.asm ├── symbols_apu.asm ├── values.asm ├── symbols_sram.asm └── registers.asm /asarmon.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spannerisms/jpdasm/HEAD/asarmon.exe -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /resources/palettes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spannerisms/jpdasm/HEAD/resources/palettes.png -------------------------------------------------------------------------------- /resources/music/song0B.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spannerisms/jpdasm/HEAD/resources/music/song0B.mid -------------------------------------------------------------------------------- /resources/music/song0B.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spannerisms/jpdasm/HEAD/resources/music/song0B.pdf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.sfc 2 | *.lnk 3 | *.jar 4 | *.zip 5 | test/* 6 | bin/gfx/*.3bpp 7 | bin/gfx/*.4bpp 8 | bin/brr/*.brr 9 | resources/music/*.log -------------------------------------------------------------------------------- /_build.bat: -------------------------------------------------------------------------------- 1 | type nul >alttp_reasm.sfc 2 | 3 | asarmon -wnoW1006 -wnoW1030 --fix-checksum=off main.asm alttp_reasm.sfc 4 | 5 | certutil -hashfile alttp_reasm.sfc md5 6 | 7 | @echo Expected: 8 | @echo 03a63945398191337e896e5771f77173 9 | 10 | pause -------------------------------------------------------------------------------- /bin/alttp.sfc.txt: -------------------------------------------------------------------------------- 1 | Required ROM file for asset extraction: alttp.sfc 2 | 3 | ===Details=== 4 | Original filename: Zelda no Densetsu - Kamigami no Triforce (Japan).sfc 5 | Size: 1,048,576 bytes 6 | Header: None 7 | CRC32: 3322EFFC 8 | SHA-256: 794E040B02C7591B59AD8843B51E7C619B88F87CDDC6083A8E7A4027B96A2271 -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET:= alttp_reasm.sfc 2 | FLAGS:= -wnoW1006 --fix-checksum=off 3 | 4 | BINDIRS:= bin/brr \ 5 | bin/gfx 6 | 7 | .PHONY: clean binfiles $(BINDIRS) 8 | 9 | all: $(TARGET) 10 | 11 | clean: 12 | @rm -f $(TARGET) 13 | @for dir in $(BINDIRS); do \ 14 | $(MAKE) -C $$dir clean; \ 15 | done 16 | 17 | binfiles: $(BINDIRS) 18 | 19 | $(BINDIRS): 20 | @$(MAKE) -C $@ 21 | 22 | $(TARGET): binfiles *.asm 23 | @rm -f $(TARGET) 24 | @asarmon $(FLAGS) main.asm $@ -------------------------------------------------------------------------------- /bank_10.asm: -------------------------------------------------------------------------------- 1 | org $108000 2 | 3 | ;=================================================================================================== 4 | 5 | LinkGraphics: 6 | #_108000: incbin "bin/gfx/link.4bpp" 7 | 8 | GFX_73: 9 | #_10F000: incbin "bin/gfx/GFX73.3bpp" 10 | 11 | GFX_74: 12 | #_10F600: incbin "bin/gfx/GFX74.3bpp" 13 | 14 | GFX_75: 15 | #_10FC00: incbin "bin/gfx/GFX75.3bpp" 16 | 17 | ;=================================================================================================== 18 | -------------------------------------------------------------------------------- /functions.asm: -------------------------------------------------------------------------------- 1 | ;=================================================================================================== 2 | ; Asar assembles the move block instructions with the operands flipped from the convention. 3 | ; So, unfortunately, they will need to be macros so that properly written code assembles correctly. 4 | ;=================================================================================================== 5 | macro MVN(src, dest) 6 | MVN , 7 | endmacro 8 | 9 | macro MVP(src, dest) 10 | MVP , 11 | endmacro 12 | -------------------------------------------------------------------------------- /main.asm: -------------------------------------------------------------------------------- 1 | lorom 2 | math pri on 3 | arch 65816 4 | check bankcross off 5 | 6 | incsrc "functions.asm" 7 | incsrc "registers.asm" 8 | incsrc "registers_spc.asm" 9 | 10 | incsrc "bank_00.asm" 11 | incsrc "bank_01.asm" 12 | incsrc "bank_02.asm" 13 | incsrc "bank_03.asm" 14 | incsrc "bank_04.asm" 15 | incsrc "bank_05.asm" 16 | incsrc "bank_06.asm" 17 | incsrc "bank_07.asm" 18 | incsrc "bank_08.asm" 19 | incsrc "bank_09.asm" 20 | incsrc "bank_0A.asm" 21 | incsrc "bank_0B.asm" 22 | incsrc "bank_0C.asm" 23 | incsrc "bank_0D.asm" 24 | incsrc "bank_0E.asm" 25 | incsrc "bank_0F.asm" 26 | incsrc "bank_10.asm" 27 | incsrc "bank_11.asm" 28 | incsrc "bank_12.asm" 29 | incsrc "bank_13.asm" 30 | incsrc "bank_14.asm" 31 | incsrc "bank_15.asm" 32 | incsrc "bank_16.asm" 33 | incsrc "bank_17.asm" 34 | incsrc "bank_18.asm" 35 | incsrc "bank_19.asm" 36 | incsrc "bank_1A.asm" 37 | incsrc "bank_1B.asm" 38 | incsrc "bank_1C.asm" 39 | incsrc "bank_1D.asm" 40 | incsrc "bank_1E.asm" 41 | incsrc "bank_1F.asm" 42 | -------------------------------------------------------------------------------- /bin/gfx/Makefile: -------------------------------------------------------------------------------- 1 | ROMFILE:= ../alttp.sfc 2 | 3 | GFXBINS:= link.4bpp \ 4 | GFX73.3bpp \ 5 | GFX74.3bpp \ 6 | GFX75.3bpp \ 7 | GFX76.3bpp \ 8 | GFX77.3bpp \ 9 | GFX78.3bpp \ 10 | GFX79.3bpp \ 11 | GFX7A.3bpp \ 12 | GFX7B.3bpp \ 13 | GFX7C.3bpp \ 14 | GFX7D.3bpp \ 15 | GFX7E.3bpp 16 | 17 | .PHONY: clean 18 | 19 | all: $(ROMFILE) $(GFXBINS) 20 | 21 | clean: 22 | @rm -f $(GFXBINS) 23 | 24 | # 0x080000-0x086FFF 25 | link.4bpp: $(ROMFILE) 26 | @dd if=$< of=$@ bs=4096 skip=524288 count=28672 iflag=skip_bytes,count_bytes status=none 27 | 28 | # 0x087000-0x0875FF 29 | GFX73.3bpp: $(ROMFILE) 30 | @dd if=$< of=$@ bs=4096 skip=552960 count=1536 iflag=skip_bytes,count_bytes status=none 31 | 32 | # 0x087600-0x087BFF 33 | GFX74.3bpp: $(ROMFILE) 34 | @dd if=$< of=$@ bs=4096 skip=554496 count=1536 iflag=skip_bytes,count_bytes status=none 35 | 36 | # 0x087C00-0x0881FF 37 | GFX75.3bpp: $(ROMFILE) 38 | @dd if=$< of=$@ bs=4096 skip=556032 count=1536 iflag=skip_bytes,count_bytes status=none 39 | 40 | # 0x088200-0x0887FF 41 | GFX76.3bpp: $(ROMFILE) 42 | @dd if=$< of=$@ bs=4096 skip=557568 count=1536 iflag=skip_bytes,count_bytes status=none 43 | 44 | # 0x088800-0x088DFF 45 | GFX77.3bpp: $(ROMFILE) 46 | @dd if=$< of=$@ bs=4096 skip=559104 count=1536 iflag=skip_bytes,count_bytes status=none 47 | 48 | # 0x088E00-0x0893FF 49 | GFX78.3bpp: $(ROMFILE) 50 | @dd if=$< of=$@ bs=4096 skip=560640 count=1536 iflag=skip_bytes,count_bytes status=none 51 | 52 | # 0x089400-0x0899FF 53 | GFX79.3bpp: $(ROMFILE) 54 | @dd if=$< of=$@ bs=4096 skip=562176 count=1536 iflag=skip_bytes,count_bytes status=none 55 | 56 | # 0x089A00-0x089FFF 57 | GFX7A.3bpp: $(ROMFILE) 58 | @dd if=$< of=$@ bs=4096 skip=563712 count=1536 iflag=skip_bytes,count_bytes status=none 59 | 60 | # 0x08A000-0x08A5FF 61 | GFX7B.3bpp: $(ROMFILE) 62 | @dd if=$< of=$@ bs=4096 skip=565248 count=1536 iflag=skip_bytes,count_bytes status=none 63 | 64 | # 0x08A600-0x08ABFF 65 | GFX7C.3bpp: $(ROMFILE) 66 | @dd if=$< of=$@ bs=4096 skip=566784 count=1536 iflag=skip_bytes,count_bytes status=none 67 | 68 | # 0x08AC00-0x08B1FF 69 | GFX7D.3bpp: $(ROMFILE) 70 | @dd if=$< of=$@ bs=4096 skip=568320 count=1536 iflag=skip_bytes,count_bytes status=none 71 | 72 | # 0x08B200-0x08B7FF 73 | GFX7E.3bpp: $(ROMFILE) 74 | @dd if=$< of=$@ bs=4096 skip=569856 count=1536 iflag=skip_bytes,count_bytes status=none -------------------------------------------------------------------------------- /binextract.py: -------------------------------------------------------------------------------- 1 | import hashlib 2 | import logging 3 | import os 4 | 5 | JAP10HASH = '03a63945398191337e896e5771f77173' 6 | 7 | bins_to_extract = { 8 | "bin/gfx/link.4bpp": (0x080000, 0x086FFF), 9 | "bin/gfx/GFX73.3bpp": (0x087000, 0x0875FF), 10 | "bin/gfx/GFX74.3bpp": (0x087600, 0x087BFF), 11 | "bin/gfx/GFX75.3bpp": (0x087C00, 0x0881FF), 12 | "bin/gfx/GFX76.3bpp": (0x088200, 0x0887FF), 13 | "bin/gfx/GFX77.3bpp": (0x088800, 0x088DFF), 14 | "bin/gfx/GFX78.3bpp": (0x088E00, 0x0893FF), 15 | "bin/gfx/GFX79.3bpp": (0x089400, 0x0899FF), 16 | "bin/gfx/GFX7A.3bpp": (0x089A00, 0x089FFF), 17 | "bin/gfx/GFX7B.3bpp": (0x08A000, 0x08A5FF), 18 | "bin/gfx/GFX7C.3bpp": (0x08A600, 0x08ABFF), 19 | "bin/gfx/GFX7D.3bpp": (0x08AC00, 0x08B1FF), 20 | "bin/gfx/GFX7E.3bpp": (0x08B200, 0x08B7FF), 21 | "bin/brr/noise.brr": (0x0C8078, 0x0C80BF), 22 | "bin/brr/rain.brr": (0x0C80C0, 0x0C8869), 23 | "bin/brr/timpani.brr": (0x0C886A, 0x0C940C), 24 | "bin/brr/square.brr": (0x0C940D, 0x0C944B), 25 | "bin/brr/saw.brr": (0x0C944C, 0x0C948A), 26 | "bin/brr/clink.brr": (0x0C948B, 0x0C94ED), 27 | "bin/brr/wobbly.brr": (0x0C94EE, 0x0C9586), 28 | "bin/brr/compoundsaw.brr": (0x0C9587, 0x0C9628), 29 | "bin/brr/tweet.brr": (0x0C9629, 0x0C9BA4), 30 | "bin/brr/strings.brr": (0x0C9BA5, 0x0CA924), 31 | "bin/brr/trombone.brr": (0x0CA925, 0x0CAD4A), 32 | "bin/brr/cymbal.brr": (0x0CAD4B, 0x0CBADC), 33 | "bin/brr/ocarina.brr": (0x0CBADD, 0x0CBC7A), 34 | "bin/brr/chime.brr": (0x0CBC7B, 0x0CBD52), 35 | "bin/brr/harp.brr": (0x0CBD53, 0x0CBF38), 36 | "bin/brr/splash.brr": (0x0CBF39, 0x0CC6F4), 37 | "bin/brr/trumpet.brr": (0x0CC6F5, 0x0CCDFC), 38 | "bin/brr/horn.brr": (0x0CCDFD, 0x0CD504), 39 | "bin/brr/snare.brr": (0x0CD505, 0x0CE233), 40 | "bin/brr/choir.brr": (0x0CE234, 0x0CEF2C), 41 | "bin/brr/flute.brr": (0x0CEF2D, 0x0CF163), 42 | "bin/brr/OOF.brr": (0x0CF164, 0x0CF3A3), 43 | "bin/brr/piano.brr": (0x0CF3A4, 0X0CFB17), 44 | } 45 | 46 | 47 | def extract(): 48 | file = "alttp.sfc" 49 | rom = LocalRom(file) 50 | 51 | for bin_file, addrs in bins_to_extract.items(): 52 | with open(bin_file, 'wb') as outfile: 53 | outfile.write(rom.buffer[addrs[0]:addrs[1]+1]) 54 | 55 | 56 | class LocalRom(object): 57 | 58 | def __init__(self, file, patch=True, name=None, hash=None): 59 | self.name = name 60 | self.hash = hash 61 | self.orig_buffer = None 62 | self.file = file 63 | self.has_smc_header = False 64 | if not os.path.isfile(file): 65 | raise RuntimeError("Could not find valid local base rom for patching at expected path %s." % file) 66 | with open(file, 'rb') as stream: 67 | self.buffer, self.has_smc_header = read_rom(stream) 68 | if patch: 69 | self.patch_base_rom() 70 | self.orig_buffer = self.buffer.copy() 71 | 72 | def patch_base_rom(self): 73 | # verify correct checksum of baserom 74 | basemd5 = hashlib.md5() 75 | basemd5.update(self.buffer) 76 | if JAP10HASH != basemd5.hexdigest(): 77 | logging.getLogger('').warning('Supplied Base Rom does not match known MD5 for JAP(1.0) release. Will try to patch anyway.') 78 | 79 | 80 | def read_rom(stream): 81 | "Reads rom into bytearray and strips off any smc header" 82 | buffer = bytearray(stream.read()) 83 | has_smc_header = False 84 | if len(buffer)%0x400 == 0x200: 85 | buffer = buffer[0x200:] 86 | has_smc_header = True 87 | return buffer, has_smc_header 88 | 89 | 90 | if __name__ == '__main__': 91 | extract() -------------------------------------------------------------------------------- /bin/brr/Makefile: -------------------------------------------------------------------------------- 1 | ROMFILE:= ../alttp.sfc 2 | 3 | BRRBINS:= chime.brr \ 4 | choir.brr \ 5 | clink.brr \ 6 | compoundsaw.brr \ 7 | cymbal.brr \ 8 | flute.brr \ 9 | harp.brr \ 10 | horn.brr \ 11 | noise.brr \ 12 | ocarina.brr \ 13 | oof.brr \ 14 | piano.brr \ 15 | rain.brr \ 16 | saw.brr \ 17 | snare.brr \ 18 | splash.brr \ 19 | square.brr \ 20 | strings.brr \ 21 | timpani.brr \ 22 | trombone.brr \ 23 | trumpet.brr \ 24 | tweet.brr \ 25 | wobbly.brr 26 | 27 | .PHONY: clean 28 | 29 | all: $(ROMFILE) $(BRRBINS) 30 | 31 | clean: 32 | @rm -f $(BRRBINS) 33 | 34 | # 0x0CBC7B-0x0CBD52 35 | chime.brr: $(ROMFILE) 36 | @dd if=$< of=$@ bs=4096 skip=834683 count=216 iflag=skip_bytes,count_bytes status=none 37 | 38 | # 0x0CE234-0x0CEF2C 39 | choir.brr: $(ROMFILE) 40 | @dd if=$< of=$@ bs=4096 skip=844340 count=3321 iflag=skip_bytes,count_bytes status=none 41 | 42 | # 0x0C948B-0x0C94ED 43 | clink.brr: $(ROMFILE) 44 | @dd if=$< of=$@ bs=4096 skip=824459 count=99 iflag=skip_bytes,count_bytes status=none 45 | 46 | # 0x0CAD4B-0x0CBADC 47 | cymbal.brr: $(ROMFILE) 48 | @dd if=$< of=$@ bs=4096 skip=830795 count=3474 iflag=skip_bytes,count_bytes status=none 49 | 50 | # 0x0C94EE-0x0C9586 51 | wobbly.brr: $(ROMFILE) 52 | @dd if=$< of=$@ bs=4096 skip=824558 count=153 iflag=skip_bytes,count_bytes status=none 53 | 54 | # 0x0C9587-0x0C9628 55 | compoundsaw.brr: $(ROMFILE) 56 | @dd if=$< of=$@ bs=4096 skip=824711 count=162 iflag=skip_bytes,count_bytes status=none 57 | 58 | # 0x0CEF2D-0x0CF163 59 | flute.brr: $(ROMFILE) 60 | @dd if=$< of=$@ bs=4096 skip=847661 count=567 iflag=skip_bytes,count_bytes status=none 61 | 62 | # 0x0CF3A4-0X0CFB17 63 | piano.brr: $(ROMFILE) 64 | @dd if=$< of=$@ bs=4096 skip=848804 count=1908 iflag=skip_bytes,count_bytes status=none 65 | 66 | # 0x0CBD53-0x0CBF38 67 | harp.brr: $(ROMFILE) 68 | @dd if=$< of=$@ bs=4096 skip=834899 count=486 iflag=skip_bytes,count_bytes status=none 69 | 70 | # 0x0CCDFD-0x0CD504 71 | horn.brr: $(ROMFILE) 72 | @dd if=$< of=$@ bs=4096 skip=839165 count=1800 iflag=skip_bytes,count_bytes status=none 73 | 74 | # 0x0C8078-0x0C80BF 75 | noise.brr: $(ROMFILE) 76 | @dd if=$< of=$@ bs=4096 skip=819320 count=72 iflag=skip_bytes,count_bytes status=none 77 | 78 | # 0x0CBADD-0x0CBC7A 79 | ocarina.brr: $(ROMFILE) 80 | @dd if=$< of=$@ bs=4096 skip=834269 count=414 iflag=skip_bytes,count_bytes status=none 81 | 82 | # 0x0CF164-0x0CF3A3 83 | oof.brr: $(ROMFILE) 84 | @dd if=$< of=$@ bs=4096 skip=848228 count=576 iflag=skip_bytes,count_bytes status=none 85 | 86 | # 0x0C80C0-0x0C8869 87 | rain.brr: $(ROMFILE) 88 | @dd if=$< of=$@ bs=4096 skip=819392 count=1962 iflag=skip_bytes,count_bytes status=none 89 | 90 | # 0x0C944C-0x0C948A 91 | saw.brr: $(ROMFILE) 92 | @dd if=$< of=$@ bs=4096 skip=824396 count=63 iflag=skip_bytes,count_bytes status=none 93 | 94 | # 0x0CD505-0x0CE233 95 | snare.brr: $(ROMFILE) 96 | @dd if=$< of=$@ bs=4096 skip=840965 count=3375 iflag=skip_bytes,count_bytes status=none 97 | 98 | # 0x0CBF39-0x0CC6F4 99 | splash.brr: $(ROMFILE) 100 | @dd if=$< of=$@ bs=4096 skip=835385 count=1980 iflag=skip_bytes,count_bytes status=none 101 | 102 | # 0x0C940D-0x0C944B 103 | square.brr: $(ROMFILE) 104 | @dd if=$< of=$@ bs=4096 skip=824333 count=63 iflag=skip_bytes,count_bytes status=none 105 | 106 | # 0x0C9BA5-0x0CA924 107 | strings.brr: $(ROMFILE) 108 | @dd if=$< of=$@ bs=4096 skip=826277 count=3456 iflag=skip_bytes,count_bytes status=none 109 | 110 | # 0x0C886A-0x0C940C 111 | timpani.brr: $(ROMFILE) 112 | @dd if=$< of=$@ bs=4096 skip=821354 count=2979 iflag=skip_bytes,count_bytes status=none 113 | 114 | # 0x0CA925-0x0CAD4A 115 | trombone.brr: $(ROMFILE) 116 | @dd if=$< of=$@ bs=4096 skip=829733 count=1062 iflag=skip_bytes,count_bytes status=none 117 | 118 | # 0x0CC6F5-0x0CCDFC 119 | trumpet.brr: $(ROMFILE) 120 | @dd if=$< of=$@ bs=4096 skip=837365 count=1800 iflag=skip_bytes,count_bytes status=none 121 | 122 | # 0x0C9629-0x0C9BA4 123 | tweet.brr: $(ROMFILE) 124 | @dd if=$< of=$@ bs=4096 skip=824873 count=1404 iflag=skip_bytes,count_bytes status=none 125 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A Link to the Past JP1.0 Disassembly 2 | Full disassembly of the Japanese 1.0 version of the game. 3 | 4 | --- 5 | 6 | ## Completeness 7 | This will always be a work in progress, as routines are analyzed further and better understood, but as of its release, this disassembly compiles exactly to the JP1.0 version. To assemble this code, use the included `_build.bat`. A special-made version of Asar with a pooling feature for sublabel management is included in the repository as `asarmon.exe`. 8 | 9 | ## Binaries 10 | Raw binaries are not included in this repository due to voiced concerns of potential copyright issues. For reassembling, you will need to extract that data from your own JP1.0 ROM and create the `bin` directory with those files included. 11 | 12 | Both the Makefile and `binextract.py` Python program can extract the necessary binary files from a JP1.0 ROM file located in the base directory and named `alttp.sfc`. 13 | 14 | An accurate assembly of this repository should have the following checksums: 15 | * Internal (complement): `CDC8` (`3237`) 16 | * CRC32: `3322EFFC` 17 | * MD5: `03A63945398191337E896E5771F77173` 18 | * SHA1: `E7E852F0159CE612E3911164878A9B08B3CB9060` 19 | 20 | --- 21 | 22 | ## Special Thanks 23 | I have massive shoutouts to give for this disassembly, in no particular order: 24 | * IsoFrieze, for creating [Diztinguish](https://github.com/Dotsarecool/DiztinGUIsh/releases). 25 | * MathOnNapkins for his US disassembly, which served as an invaluable reference and sanity check. I took a lot of nomenclature from him, and when I didn't, I still checked my labels against his. The SPC engine is reformatted from his old work, which saved me the trouble of disassembling it. 26 | * An extra, distinct thanks to MathOnNapkins for creating a fork of Asar with proper pool implementation. 27 | * Zarby89, for his vast knowledge of the game's data, and for his direct contributions in parsing data (compressed graphics, overworld data, room objects). 28 | * Myramong for identifying the Japanese kanji. 29 | * Total for figuring out text compression and his direct contributions in parsing text graphics data. 30 | * Lui for explaining Nintendo stripes. Also for being the patient victim of many ramblings about the code. 31 | * Qwertymodo for the makefile. 32 | * Aerinon for the Python extraction script. 33 | 34 | --- 35 | 36 | ## Using this disassembly 37 | This disassembly was created with a number of specific guidelines 38 | 39 | * Top-level labels use a mix of PascalCase and snake_case, where underscores will separate arbitrary hierarchies, such as `Sprite_MoveFunction`. 40 | * Sublabels use pure snake_case. Some sublabels may redundantly include the top-level parent for explicit clarity; e.g. `Sprite_MoveFunction_continue`. 41 | * The beginning of every line will have an address label of the form `#_AAAAAA:`, where `AAAAAA` is the 24-bit address in ROM in hexadecimal. The `#` prevents the label from creating a new hierarchy. The `_` is required as labels may not begin with numbers. 42 | * APU labels will have `#_SSSS:` following the ROM label, where `SSSS` is the 16-bit address once transfered to the SPC in hexadecimal. To prevent name collision, song data will include an `o`, `u`, or `c` after the APU address, for the overworld, underworld, and credits banks, respectively. 43 | * Code or data that appears unreachable is labelled `UNREACHABLE_AAAAAA`. 44 | * Unreachable blocks of the filler byte `$FF` are labelled with `NULL_AAAAAA` and given a comment with `FREE ROM: `. 45 | * Lines contain 1 instruction each. 46 | * For data bank and direct page changes, the full address will be written out. 47 | * In data tables, the number of entries per line is determined by how they should logically be grouped. In all other cases, they are grouped in sets of four or eight. 48 | * The MVN and MVP instructions are written with a macro so that writing them in the standard way assembles correctly. 49 | * A list of standardized names for various entity classes is found in `values.asm`. 50 | * My personal thoughts are noted in some comments with !WORD, where WORD is in all caps. 51 | * The `.ly` files in the `resources/music/` directory can be compiled with [LilyPond](https://lilypond.org/). 52 | -------------------------------------------------------------------------------- /resources/music/song0B.ly: -------------------------------------------------------------------------------- 1 | \version "2.18.2" 2 | \header{ 3 | title = "Fairy Theme" 4 | } 5 | 6 | % $30 = quarter 7 | 8 | \pointAndClickOff 9 | \language "english" 10 | 11 | instrHarp = { 12 | \set Staff.midiInstrument = #"orchestral harp" 13 | } 14 | 15 | segAtrackA = { 16 | \clef treble 17 | \time 4/4 18 | \key g \minor 19 | \numericTimeSignature 20 | 21 | \partial 4 r4 22 | } 23 | 24 | segAtrackB = { 25 | \clef bass 26 | \time 4/4 27 | \key g \minor 28 | \numericTimeSignature 29 | 30 | \partial 4 r4 31 | } 32 | 33 | segBtrackA = { 34 | \instrHarp 35 | \clef treble 36 | % vol 8C 37 | % pan 02 38 | bf''4 39 | af'' 40 | g'' 41 | af'' 42 | af'' 43 | gf'' 44 | f'' 45 | gf'' 46 | gf'' 47 | f'' 48 | e'' 49 | f'' 50 | f'' 51 | ef'' 52 | d'' 53 | ef'' 54 | } 55 | 56 | segBtrackB = { 57 | \instrHarp 58 | \clef treble 59 | % vol $8C 60 | % pan $04 61 | r16 62 | ef''4 63 | ef'' 64 | ef'' 65 | ef'' 66 | df'' 67 | df'' 68 | df'' 69 | df'' 70 | b' 71 | b' 72 | b' 73 | b' 74 | bf' 75 | bf' 76 | bf' 77 | bf'8. 78 | } 79 | 80 | segBtrackC = { 81 | \instrHarp 82 | \clef treble 83 | % vol $8C 84 | % pan $06 85 | r8 86 | b'4 87 | b' 88 | b' 89 | b' 90 | bf' 91 | bf' 92 | bf' 93 | bf' 94 | af' 95 | af' 96 | af' 97 | af' 98 | gf' 99 | gf' 100 | gf' 101 | gf'8 102 | } 103 | 104 | segBtrackD = { 105 | \instrHarp 106 | \clef treble 107 | % vol $8C 108 | % pan $08 109 | r8. 110 | af'4 111 | af' 112 | af' 113 | af' 114 | gf' 115 | gf' 116 | gf' 117 | gf' 118 | f' 119 | f' 120 | f' 121 | f' 122 | ef' 123 | ef' 124 | ef' 125 | ef'16 126 | } 127 | 128 | segBtrackE = { 129 | \instrHarp 130 | \clef bass 131 | % vol $C8 132 | % pan $0A 133 | b,,8. 134 | bf4. 135 | ef8. 136 | df' 137 | ef16 138 | bf,,8. 139 | af4. 140 | bf,,8. 141 | df' 142 | df16 143 | af,,8. 144 | gf4~gf16 145 | af,,8. 146 | f 147 | df8 148 | gf,,8. 149 | f4~f16 150 | gf,,8. 151 | ef 152 | df'8 153 | } 154 | 155 | segBtrackF = { 156 | \instrHarp 157 | \clef bass 158 | % vol $C8 159 | % pan $0E 160 | r16 161 | b,2~b,16 162 | bf8. 163 | bf~bf16 164 | bf,2~bf,16 165 | af8. 166 | af~af16 167 | af,2 168 | af,8. 169 | af 170 | b,16~b,16 171 | gf,2 172 | gf,8. 173 | af 174 | b16 175 | } 176 | 177 | segBtrackG = { 178 | \instrHarp 179 | \clef bass 180 | % vol $C8 181 | % pan $12 182 | r8 183 | ef4.~ef16~ef8 184 | af8. 185 | af8~af8 186 | df4.~df16~df8 187 | gf8. 188 | gf8~gf8 189 | b,8~b,4. 190 | gf8. 191 | f8.~f8 192 | bf,8~bf,4. 193 | f8. 194 | gf 195 | } 196 | 197 | segCtrackA = { 198 | \instrHarp 199 | \clef treble 200 | bf''4 201 | af'' 202 | g'' 203 | af'' 204 | b'' 205 | bf'' 206 | a'' 207 | bf'' 208 | df''' 209 | b'' 210 | bf'' 211 | b'' 212 | bf'' 213 | af'' 214 | gf'' 215 | f'' 216 | } 217 | 218 | segCtrackB = { 219 | \instrHarp 220 | \clef treble 221 | r16 222 | ef''4 223 | ef'' 224 | ef'' 225 | ef'' 226 | e'' 227 | e'' 228 | e'' 229 | e'' 230 | ef'' 231 | ef'' 232 | ef'' 233 | ef'' 234 | b' 235 | b' 236 | b' 237 | b'8. 238 | } 239 | 240 | segCtrackC = { 241 | \instrHarp 242 | \clef treble 243 | r8 244 | b'4 245 | b' 246 | b' 247 | b' 248 | df'' 249 | df'' 250 | df'' 251 | df'' 252 | b' 253 | b' 254 | b' 255 | b' 256 | af' 257 | af' 258 | af' 259 | af'8 260 | } 261 | 262 | segCtrackD = { 263 | \instrHarp 264 | \clef treble 265 | r8. 266 | af'4 267 | af' 268 | af' 269 | af' 270 | g' 271 | g' 272 | g' 273 | g' 274 | af' 275 | af' 276 | af' 277 | af' 278 | f' 279 | f' 280 | f' 281 | f'16 282 | } 283 | 284 | segCtrackE = { 285 | \instrHarp 286 | \clef bass 287 | b,,8. 288 | bf4~bf16 289 | b,,8. 290 | af 291 | af8 292 | bf,,8. 293 | df'4~df'16 294 | ef,8. 295 | bf 296 | df'8 297 | af,,8. 298 | b4~b16 299 | af,,8. 300 | bf 301 | af8 302 | df,8. 303 | b4~b16 304 | df,8. 305 | af 306 | af'8 307 | } 308 | 309 | segCtrackF = { 310 | \instrHarp 311 | \clef bass 312 | r16 313 | b,2 314 | b,8. 315 | ef' 316 | ef16~ef16 317 | bf,2 318 | ef8. 319 | e' 320 | bf16~bf16 321 | af,2 322 | af,8. 323 | df' 324 | ef16~ef16 325 | df2 326 | df8. 327 | f' 328 | f'16 329 | } 330 | 331 | segCtrackG = { 332 | \instrHarp 333 | \clef bass 334 | r8 335 | ef4.~ef8 336 | bf8. 337 | bf~bf8 338 | df4.~df8 339 | df'8. 340 | ef'~ef'8 341 | ef4.~ef8 342 | b8. 343 | b~b8 344 | af4.~af8 345 | b8. 346 | ef' 347 | } 348 | 349 | music = 350 | << 351 | 352 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackA \repeat volta 3 { \segBtrackA \segCtrackA } } 353 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackA \repeat volta 3 { \segBtrackB \segCtrackB } } 354 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackA \repeat volta 3 { \segBtrackC \segCtrackC } } 355 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackA \repeat volta 3 { \segBtrackD \segCtrackD } } 356 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackB \repeat volta 3 { \segBtrackE \segCtrackE } } 357 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackB \repeat volta 3 { \segBtrackF \segCtrackF } } 358 | \new Staff \absolute { \new Voice \with { \remove "Note_heads_engraver" \consists "Completion_heads_engraver" \remove "Rest_engraver" \consists "Completion_rest_engraver" } \segAtrackB \repeat volta 3 { \segBtrackG \segCtrackG } } 359 | >> 360 | 361 | 362 | 363 | 364 | \score { 365 | \music 366 | } 367 | 368 | \score { 369 | \unfoldRepeats { \music } 370 | \midi { 371 | \context { 372 | \Staff 373 | \remove "Staff_performer" 374 | } 375 | \context { 376 | \Voice 377 | \consists "Staff_performer" 378 | } 379 | } 380 | } -------------------------------------------------------------------------------- /bank_19.asm: -------------------------------------------------------------------------------- 1 | org $198000 2 | 3 | ;=================================================================================================== 4 | 5 | SPC_ENGINE = $0800 6 | SFX_DATA = $17C0 7 | SAMPLE_POINTERS = $3C00 8 | INSTRUMENT_DATA = $3D00 9 | INSTRUMENT_DATA_SFX = $3E00 10 | SAMPLE_DATA = $4000 11 | SONG_POINTERS = $D000 12 | SONG_POINTERS_AUX = $2B00 13 | CREDITS_AUX_POINTER = $2900 14 | 15 | ;=================================================================================================== 16 | 17 | SamplePointers: 18 | #_198000: dw $0070, SAMPLE_POINTERS ; Transfer size, transfer address 19 | 20 | base SAMPLE_POINTERS 21 | 22 | #_198004: #_3C00: dw $4000, $4012 ; 0x00 - Noise 23 | #_198008: #_3C04: dw $4048, $4063 ; 0x01 - Rain 24 | #_19800C: #_3C08: dw $47F2, $5395 ; 0x02 - Timpani 25 | #_198010: #_3C0C: dw $5395, $53B0 ; 0x03 - Square wave 26 | #_198014: #_3C10: dw $53D4, $53EF ; 0x04 - Saw wave 27 | #_198018: #_3C14: dw $5413, $542E ; 0x05 - Clink 28 | #_19801C: #_3C18: dw $5476, $54A3 ; 0x06 - Wobbly lead 29 | #_198020: #_3C1C: dw $550F, $5521 ; 0x07 - Compound saw 30 | #_198024: #_3C20: dw $55B1, $5B2D ; 0x08 - Tweet 31 | #_198028: #_3C24: dw $5B2D, $60BB ; 0x09 - Strings A 32 | #_19802C: #_3C28: dw $5B2D, $60BB ; 0x0A - Strings B 33 | #_198030: #_3C2C: dw $68AD, $6C9D ; 0x0B - Trombone 34 | #_198034: #_3C30: dw $6CD3, $7A65 ; 0x0C - Cymbal 35 | #_198038: #_3C34: dw $7A65, $7BFA ; 0x0D - Ocarina 36 | #_19803C: #_3C38: dw $7C03, $7C78 ; 0x0E - Chimes 37 | #_198040: #_3C3C: dw $7CDB, $7EA6 ; 0x0F - Harp 38 | #_198044: #_3C40: dw $7EC1, $867D ; 0x10 - Splash 39 | #_198048: #_3C44: dw $867D, $8D6A ; 0x11 - Trumpet 40 | #_19804C: #_3C48: dw $8D85, $944E ; 0x12 - Horn 41 | #_198050: #_3C4C: dw $948D, $A1BC ; 0x13 - Snare A 42 | #_198054: #_3C50: dw $948D, $A1BC ; 0x14 - Snare B 43 | #_198058: #_3C54: dw $A1BC, $A6E7 ; 0x15 - Choir 44 | #_19805C: #_3C58: dw $AEB5, $B0D1 ; 0x16 - Flute 45 | #_198060: #_3C5C: dw $B0EC, $B32C ; 0x17 - Oof 46 | #_198064: #_3C60: dw $B32C, $BA61 ; 0x18 - Piano 47 | #_198068: #_3C64: dw $FFFF, $FFFF ; 0x19 - null 48 | #_19806C: #_3C68: dw $FFFF, $FFFF ; 0x1A - null 49 | #_198070: #_3C6C: dw $FFFF, $FFFF ; 0x1B - null 50 | 51 | base off 52 | 53 | ;=================================================================================================== 54 | 55 | SampleData: 56 | #_198074: dw $7AA0, SAMPLE_DATA ; Transfer size, transfer address 57 | 58 | base SAMPLE_DATA 59 | 60 | #_198078: #_4000: incbin "bin/brr/noise.brr" 61 | #_1980C0: #_4048: incbin "bin/brr/rain.brr" 62 | #_19886A: #_47F2: incbin "bin/brr/timpani.brr" 63 | #_19940D: #_5395: incbin "bin/brr/square.brr" 64 | #_19944C: #_53D4: incbin "bin/brr/saw.brr" 65 | #_19948B: #_5413: incbin "bin/brr/clink.brr" 66 | #_1994EE: #_5476: incbin "bin/brr/wobbly.brr" 67 | #_199587: #_550F: incbin "bin/brr/compoundsaw.brr" 68 | #_199629: #_55B1: incbin "bin/brr/tweet.brr" 69 | #_199BA5: #_5B2D: incbin "bin/brr/strings.brr" 70 | #_19A925: #_68AD: incbin "bin/brr/trombone.brr" 71 | #_19AD4B: #_6CD3: incbin "bin/brr/cymbal.brr" 72 | #_19BADD: #_7A65: incbin "bin/brr/ocarina.brr" 73 | #_19BC7B: #_7C03: incbin "bin/brr/chime.brr" 74 | #_19BD53: #_7CDB: incbin "bin/brr/harp.brr" 75 | #_19BF39: #_7EC1: incbin "bin/brr/splash.brr" 76 | #_19C6F5: #_867D: incbin "bin/brr/trumpet.brr" 77 | #_19CDFD: #_8D85: incbin "bin/brr/horn.brr" 78 | #_19D505: #_948D: incbin "bin/brr/snare.brr" 79 | #_19E234: #_A1BC: incbin "bin/brr/choir.brr" 80 | #_19EF2D: #_AEB5: incbin "bin/brr/flute.brr" 81 | #_19F164: #_B0EC: incbin "bin/brr/OOF.brr" 82 | #_19F3A4: #_B32C: incbin "bin/brr/piano.brr" 83 | 84 | base off 85 | 86 | ;=================================================================================================== 87 | 88 | InstrumentData: 89 | #_19FB18: dw $00AE, INSTRUMENT_DATA ; Transfer size, transfer address 90 | 91 | base INSTRUMENT_DATA 92 | 93 | ; SRCN, ADSR1, ADSR2, GAIN, MULT (big endian) 94 | #_19FB1C: #_3D00: db $00, $FF, $E0, $B8, $04, $70 ; 0x00 - Noise 95 | #_19FB22: #_3D06: db $01, $FF, $E0, $B8, $07, $90 ; 0x01 - Rain 96 | #_19FB28: #_3D0C: db $02, $FF, $E0, $B8, $09, $C0 ; 0x02 - Timpani 97 | #_19FB2E: #_3D12: db $03, $FF, $E0, $B8, $04, $00 ; 0x03 - Square wave 98 | #_19FB34: #_3D18: db $04, $FF, $E0, $B8, $04, $00 ; 0x04 - Saw wave 99 | #_19FB3A: #_3D1E: db $05, $FF, $E0, $B8, $04, $70 ; 0x05 - Clink 100 | #_19FB40: #_3D24: db $06, $FF, $E0, $B8, $04, $70 ; 0x06 - Wobbly lead 101 | #_19FB46: #_3D2A: db $07, $FF, $E0, $B8, $04, $70 ; 0x07 - Compound saw 102 | #_19FB4C: #_3D30: db $08, $FF, $E0, $B8, $07, $A0 ; 0x08 - Tweet 103 | #_19FB52: #_3D36: db $09, $8F, $E9, $B8, $01, $E0 ; 0x09 - Strings A 104 | #_19FB58: #_3D3C: db $0A, $8A, $E9, $B8, $01, $E0 ; 0x0A - Strings B 105 | #_19FB5E: #_3D42: db $0B, $FF, $E0, $B8, $03, $00 ; 0x0B - Trombone 106 | #_19FB64: #_3D48: db $0C, $FF, $E0, $B8, $03, $A0 ; 0x0C - Cymbal 107 | #_19FB6A: #_3D4E: db $0D, $FF, $E0, $B8, $01, $00 ; 0x0D - Ocarina 108 | #_19FB70: #_3D54: db $0E, $FF, $EF, $B8, $0E, $A0 ; 0x0E - Chimes 109 | #_19FB76: #_3D5A: db $0F, $FF, $EF, $B8, $06, $00 ; 0x0F - Harp 110 | #_19FB7C: #_3D60: db $10, $FF, $E0, $B8, $03, $D0 ; 0x10 - Splash 111 | #_19FB82: #_3D66: db $11, $8F, $E0, $B8, $03, $00 ; 0x11 - Trumpet 112 | #_19FB88: #_3D6C: db $12, $8F, $E0, $B8, $06, $F0 ; 0x12 - Horn 113 | #_19FB8E: #_3D72: db $13, $FD, $E0, $B8, $07, $A0 ; 0x13 - Snare A 114 | #_19FB94: #_3D78: db $14, $FF, $E0, $B8, $07, $A0 ; 0x14 - Snare B 115 | #_19FB9A: #_3D7E: db $15, $FF, $E0, $B8, $03, $D0 ; 0x15 - Choir 116 | #_19FBA0: #_3D84: db $16, $8F, $E0, $B8, $03, $00 ; 0x16 - Flute 117 | #_19FBA6: #_3D8A: db $17, $FF, $E0, $B8, $02, $C0 ; 0x17 - Oof 118 | #_19FBAC: #_3D90: db $18, $FE, $8F, $B8, $06, $F0 ; 0x18 - Piano 119 | 120 | ;--------------------------------------------------------------------------------------------------- 121 | 122 | ; stacc and attack table (dumb that it's here) 123 | NoteStacc: 124 | #_19FBB2: #_3D96: db $32, $65, $7F, $98, $B2, $CB, $E5, $FC 125 | 126 | NoteAttack: 127 | #_19FBB8: #_3D9E: db $19, $32, $4C, $65, $72, $7F, $8C, $98 128 | #_19FBBE: #_3DA6: db $A5, $B2, $BF, $CB, $D8, $E5, $F2, $FC 129 | 130 | base off 131 | 132 | ;=================================================================================================== 133 | 134 | SPCEngine: 135 | #_19FBCA: dw $0F9E, SPC_ENGINE ; Transfer size, transfer address 136 | 137 | incsrc "spc.asm" 138 | 139 | ;=================================================================================================== 140 | -------------------------------------------------------------------------------- /resources/tracker.txt: -------------------------------------------------------------------------------- 1 | ==================================================================================================== 2 | Notes table 3 | ==================================================================================================== 4 | 1 2 3 4 5 6 5 | ---------------------------------------------------------------------------------------------------- 6 | C 80 8C 98 A4 B0 BC 7 | C# 81 8D 99 A5 B1 BD 8 | D 82 8E 9A A6 B2 BE 9 | D# 83 8F 9B A7 B3 BF 10 | E 84 90 9C A8 B4 C0 11 | F 85 91 9D A9 B5 C1 12 | F# 86 92 9E AA B6 C2 13 | G 87 93 9F AB B7 C3 14 | G# 88 94 A0 AC B8 C4 15 | A 89 95 A1 AD B9 C5 16 | A# 8A 96 A2 AE BA C6 17 | B 8B 97 A3 AF BB C7 18 | 19 | ==================================================================================================== 20 | 21 | C8 Tie 22 | C9 Rest 23 | 24 | CA Percussion base + 00 25 | CB Percussion base + 01 26 | CC Percussion base + 02 27 | CD Percussion base + 03 28 | CE Percussion base + 04 29 | CF Percussion base + 05 30 | D0 Percussion base + 06 31 | D1 Percussion base + 07 32 | D2 Percussion base + 08 33 | D3 Percussion base + 09 34 | D4 Percussion base + 0A 35 | D5 Percussion base + 0B 36 | D6 Percussion base + 0C 37 | D7 Percussion base + 0D 38 | D8 Percussion base + 0E 39 | D9 Percussion base + 0F 40 | DA Percussion base + 10 41 | DB Percussion base + 11 42 | DC Percussion base + 12 43 | DD Percussion base + 13 44 | DE Percussion base + 14 45 | DF Percussion base + 15 46 | 47 | ==================================================================================================== 48 | Track commands 49 | ==================================================================================================== 50 | 00 End part or segment 51 | ---------------------------------------------------------------------------------------------------- 52 | E0 xx Instrument change 53 | xx Instrument ID 54 | ---------------------------------------------------------------------------------------------------- 55 | E1 xx Set pan 56 | xx lr.ppppp 57 | p - level [0,14] => 00 right, 0A middle, 14 left 58 | r - phase invert left 59 | r - phase invert right 60 | ---------------------------------------------------------------------------------------------------- 61 | E2 xx yy Panning gradual change 62 | xx Duration 63 | yy Target 64 | ---------------------------------------------------------------------------------------------------- 65 | E3 xx yy zz Vibrato 66 | xx Delay 67 | yy Rate 68 | zz Magnitude 69 | ---------------------------------------------------------------------------------------------------- 70 | E4 Disable vibrato 71 | ---------------------------------------------------------------------------------------------------- 72 | E5 xx Set master volume 73 | xx Volume 74 | ---------------------------------------------------------------------------------------------------- 75 | E6 xx yy Master volume gradual change 76 | xx Duration 77 | yy Target 78 | ---------------------------------------------------------------------------------------------------- 79 | E7 xx Set tempo 80 | xx Tempo => BPM * 15360 / 60000 (for $30 quarter note) 81 | ---------------------------------------------------------------------------------------------------- 82 | E8 xx yy Tempo gradual change 83 | xx Duration 84 | yy Target 85 | ---------------------------------------------------------------------------------------------------- 86 | E9 xx Transpose global 87 | xx Signed absolute new transpose 88 | ---------------------------------------------------------------------------------------------------- 89 | EA xx Transpose channel 90 | xx Signed absolute new transpose 91 | ---------------------------------------------------------------------------------------------------- 92 | EB xx yy zz Volume tremolo 93 | xx Delay 94 | yy Rate 95 | zz Magnitude 96 | ---------------------------------------------------------------------------------------------------- 97 | EC Disable tremolo 98 | ---------------------------------------------------------------------------------------------------- 99 | ED xx Channel volume 100 | xx Volume level 101 | ---------------------------------------------------------------------------------------------------- 102 | EE xx yy Volume gradual change 103 | xx Duration 104 | yy Target 105 | ---------------------------------------------------------------------------------------------------- 106 | EF xx yy zz Call part subroutine 107 | xx yy Pointer $yyxx 108 | zz Number of plays 109 | ---------------------------------------------------------------------------------------------------- 110 | F0 xx Set vibrato gradient timer 111 | xx Duration 112 | ---------------------------------------------------------------------------------------------------- 113 | F1 xx yy zz Glissando to 114 | xx Delay 115 | yy Duration 116 | zz Change 117 | ---------------------------------------------------------------------------------------------------- 118 | F2 xx yy zz Glissando from 119 | xx Delay 120 | yy Duration 121 | zz Change 122 | ---------------------------------------------------------------------------------------------------- 123 | F3 Disable glissando 124 | ---------------------------------------------------------------------------------------------------- 125 | F4 xx Fine tuning 126 | xx Level 127 | ---------------------------------------------------------------------------------------------------- 128 | F5 xx yy zz Configure echo 129 | xx EON 130 | yy Volume left 131 | zz Volume right 132 | ---------------------------------------------------------------------------------------------------- 133 | F6 Disable echo 134 | ---------------------------------------------------------------------------------------------------- 135 | F7 xx yy zz Configure echo filter 136 | xx Delay 137 | yy Feedback 138 | zz Parameters index 139 | ---------------------------------------------------------------------------------------------------- 140 | F8 xx yy zz Echo gradual change 141 | xx Timer 142 | yy Left target 143 | zz Right target 144 | ---------------------------------------------------------------------------------------------------- 145 | F9 xx yy zz Single glissando 146 | xx Delay 147 | yy Duration 148 | zz Target note 149 | ---------------------------------------------------------------------------------------------------- 150 | FA xx Set percussion base note 151 | xx Base sample 152 | ---------------------------------------------------------------------------------------------------- 153 | FF Loop SFX 1 154 | ---------------------------------------------------------------------------------------------------- 155 | ==================================================================================================== 156 | -------------------------------------------------------------------------------- /resources/character_encode.txt: -------------------------------------------------------------------------------- 1 | 00 あ a 2 | 01 い i 3 | 02 う u 4 | 03 え e 5 | 04 お o 6 | 05 や ya 7 | 06 ゆ yu 8 | 07 よ yo 9 | 08 か ka 10 | 09 き ki 11 | 0A く ku 12 | 0B け ke 13 | 0C こ ko 14 | 0D わ wa 15 | 0E を wo 16 | 0F ん n 17 | 10 さ sa 18 | 11 し si 19 | 12 す su 20 | 13 せ se 21 | 14 そ so 22 | 15 が ga 23 | 16 ぎ gi 24 | 17 ぐ gu 25 | 18 た ta 26 | 19 ち ti 27 | 1A つ tu 28 | 1B て te 29 | 1C と to 30 | 1D げ ge 31 | 1E ご go 32 | 1F ざ za 33 | 20 な na 34 | 21 に ni 35 | 22 ぬ nu 36 | 23 ね ne 37 | 24 の no 38 | 25 じ zi 39 | 26 ず zu 40 | 27 ぜ ze 41 | 28 は ha 42 | 29 ひ hi 43 | 2A ふ hu 44 | 2B へ he 45 | 2C ほ ho 46 | 2D ぞ zo 47 | 2E だ da 48 | 2F ぢ di 49 | 30 ま ma 50 | 31 み mi 51 | 32 む mu 52 | 33 め me 53 | 34 も mo 54 | 35 づ du 55 | 36 で de 56 | 37 ど do 57 | 38 ら ra 58 | 39 り ri 59 | 3A る ru 60 | 3B れ re 61 | 3C ろ ro 62 | 3D ば ba 63 | 3E び bi 64 | 3F ぶ bu 65 | 40 べ be 66 | 41 ぼ bo 67 | 42 ぱ pa 68 | 43 ぴ pi 69 | 44 ぷ pu 70 | 45 ぺ pe 71 | 46 ぽ po 72 | 47 ゃ ya 73 | 48 ゅ yu 74 | 49 ょ yo 75 | 4A っ tu 76 | 4B ぁ a 77 | 4C ぃ i 78 | 4D ぅ u 79 | 4E ぇ e 80 | 4F ぉ o 81 | 50 ア a 82 | 51 イ i 83 | 52 ウ u 84 | 53 エ e 85 | 54 オ o 86 | 55 ヤ ya 87 | 56 ユ yu 88 | 57 ヨ yo 89 | 58 カ ka 90 | 59 キ ki 91 | 5A ク ku 92 | 5B ケ ke 93 | 5C コ ko 94 | 5D ワ wa 95 | 5E ヲ wo 96 | 5F ン n 97 | 60 サ sa 98 | 61 シ si 99 | 62 ス su 100 | 63 セ se 101 | 64 ソ so 102 | 65 ガ ga 103 | 66 ギ gi 104 | 67 グ gu 105 | 68 タ ta 106 | 69 チ ti 107 | 6A ツ tu 108 | 6B テ te 109 | 6C ト to 110 | 6D ゲ ge 111 | 6E ゴ go 112 | 6F ザ za 113 | 70 ナ na 114 | 71 ニ ni 115 | 72 ヌ nu 116 | 73 ネ ne 117 | 74 ノ no 118 | 75 ジ zi 119 | 76 ズ zu 120 | 77 ゼ ze 121 | 78 ハ ha 122 | 79 ヒ hi 123 | 7A フ hu 124 | 7B ヘ he 125 | 7C ホ ho 126 | 7D ゾ zo 127 | 7E ダ da 128 | 7F ヂ di 129 | 80 マ ma 130 | 81 ミ mi 131 | 82 ム mu 132 | 83 メ me 133 | 84 モ mo 134 | 85 ヅ du 135 | 86 デ de 136 | 87 ド do 137 | 88 ラ ra 138 | 89 リ ri 139 | 8A ル ru 140 | 8B レ re 141 | 8C ロ ro 142 | 8D バ ba 143 | 8E ビ bi 144 | 8F ブ bu 145 | 90 ベ be 146 | 91 ボ bo 147 | 92 パ pa 148 | 93 ピ pi 149 | 94 プ pu 150 | 95 ペ pe 151 | 96 ポ po 152 | 97 ャ ya 153 | 98 ュ yu 154 | 99 ョ yo 155 | 9A ッ tsu 156 | 9B ァ a 157 | 9C ィ i 158 | 9D ゥ u 159 | 9E ェ r 160 | 9F ォ o 161 | A0 0 162 | A1 1 163 | A2 2 164 | A3 3 165 | A4 4 166 | A5 5 167 | A6 6 168 | A7 7 169 | A8 8 170 | A9 9 171 | AA A 172 | AB B 173 | AC C 174 | AD D 175 | AE E 176 | AF F 177 | B0 G 178 | B1 H 179 | B2 I 180 | B3 J 181 | B4 K 182 | B5 L 183 | B6 M 184 | B7 N 185 | B8 O 186 | B9 P 187 | BA Q 188 | BB R 189 | BC S 190 | BD T 191 | BE U 192 | BF V 193 | C0 W 194 | C1 X 195 | C2 Y 196 | C3 Z 197 | C4 『 198 | C5 』 199 | C6 ? 200 | C7 ! 201 | C8 , 202 | C9 ー 203 | CA 🡸 204 | CB 🡺 205 | CC ⋯ 206 | CD 。 207 | CE 〜 208 | CF a 209 | D0 b 210 | D1 c 211 | D2 😬 Link face left 212 | D3 😬 Link face right 213 | D4 d 214 | D5 e 215 | D6 f 216 | D7 g 217 | D8 ' 218 | D9 ' red 219 | DA - red 220 | DB 。 red 221 | DC • red 222 | DD 𓄿 223 | DE ☥ 224 | DF ≈ 225 | E0 🡅 226 | E1 🡇 227 | E2 🡆 228 | E3 🡄 229 | E4 ▶ 230 | E5 ♥ 1/4 left 231 | E6 ♥ 2/4 left 232 | E7 ♥ empty right 233 | E8 ♥ 3/4 left 234 | E9 ♥ 3/4 right 235 | EA ♥ 4/4 left 236 | EB ♥ 4/4 right 237 | EC h 238 | ED i 239 | EE j 240 | EF k 241 | F0 l 242 | F1 m 243 | F2 n 244 | F3 o 245 | F4 p 246 | F5 q 247 | FF ⎵ space 248 | 249 | FD 00 娘 Daughter/Maiden 250 | FD 01 城 shiro - Castle 251 | FD 02 行 行く - iku - Move/Walk/Act 252 | FD 03 教 教会 - kyoukai - Church 253 | FD 04 会 教会 - kyoukai - Church 254 | FD 05 神 kami - God / 神殿 - temple 255 | FD 06 父 chichi - Father 256 | FD 07 訪 257 | FD 08 頼 258 | FD 09 通 259 | FD 0A 願 wish 260 | FD 0B 平 261 | FD 0C 和 262 | FD 0D 司 263 | FD 0E 書 264 | FD 0F 戻 265 | FD 10 様 父様 - father 266 | FD 11 子 kid 267 | FD 12 湖 lake 268 | FD 13 達 269 | FD 14 彼 270 | FD 15 女 271 | FD 16 言 272 | FD 17 祭 273 | FD 18 早 274 | FD 19 雨 275 | FD 1A 剣 sword 276 | FD 1B 盾 277 | FD 1C 解 278 | FD 1D 抜 279 | FD 1E 者 person (who) 280 | FD 1F 味 281 | FD 20 方 282 | FD 21 無 283 | FD 22 事 incident 284 | FD 23 出 leaving 285 | FD 24 本 286 | FD 25 当 287 | FD 26 私 I 288 | FD 27 他 289 | FD 28 救 290 | FD 29 倒 collapse/fall/destroy 291 | FD 2A 度 292 | FD 2B 国 293 | FD 2C 退 294 | FD 2D 魔 295 | FD 2E 伝 296 | FD 2F 説 297 | FD 30 必 298 | FD 31 要 299 | FD 32 良 300 | FD 33 地 area/region 301 | FD 34 図 map 302 | FD 35 印 303 | FD 36 思 304 | FD 37 気 305 | FD 38 人 adult/person 306 | FD 39 間 307 | FD 3A 兵 308 | FD 3B 病 309 | FD 3C 法 310 | FD 3D 屋 shop 311 | FD 3E 手 312 | FD 3F 住 residence 313 | FD 40 連 314 | FD 41 恵 315 | FD 42 表 316 | FD 43 金 317 | FD 44 王 318 | FD 45 信 319 | FD 46 裏 320 | FD 47 取 321 | FD 48 引 322 | FD 49 入 enter (as in a building) 323 | FD 4A 口 entrance 324 | FD 4B 開 open (as in chest) 325 | FD 4C 見 look 326 | FD 4D 正 327 | FD 4E 幸 328 | FD 4F 運 329 | FD 50 呼 330 | FD 51 物 thing/stuff 331 | FD 52 付 332 | FD 53 紋 333 | FD 54 章 334 | FD 55 所 335 | FD 56 家 336 | FD 57 闇 337 | FD 58 読 338 | FD 59 左 339 | FD 5A 側 340 | FD 5B 札 341 | FD 5C 穴 342 | FD 5D 道 343 | FD 5E 男 344 | FD 5F 大 older 345 | FD 60 声 346 | FD 61 下 347 | FD 62 犯 348 | FD 63 花 349 | FD 64 深 350 | FD 65 森 351 | FD 66 水 352 | FD 67 若 353 | FD 68 美 354 | FD 69 探 355 | FD 6A 今 356 | FD 6B 士 knight 357 | FD 6C 店 358 | FD 6D 好 good/okay/your choice 359 | FD 6E 代 360 | FD 6F 名 361 | FD 70 迷 362 | FD 71 立 363 | FD 72 上 above/top 364 | FD 73 光 365 | FD 74 点 366 | FD 75 目 367 | FD 76 的 368 | FD 77 押 369 | FD 78 前 before 370 | FD 79 夜 night 371 | FD 7A 十 cross 372 | FD 7B 字 373 | FD 7C 北 374 | FD 7D 急 375 | FD 7E 昔 376 | FD 7F 果 377 | FD 80 奥 378 | FD 81 選 379 | FD 82 続 continue 380 | FD 83 結 381 | FD 84 定 382 | FD 85 悪 383 | FD 86 向 384 | FD 87 歩 385 | FD 88 時 opportunity 386 | FD 89 使 387 | FD 8A 古 388 | FD 8B 何 what?/huh?/thing/penis 389 | FD 8C 村 390 | FD 8D 長 391 | FD 8E 配 take this 392 | FD 8F 匹 393 | FD 90 殿 神殿 - temple 394 | FD 91 守 395 | FD 92 精 396 | FD 93 知 knowledge/wisdom 397 | FD 94 山 398 | FD 95 誰 399 | FD 96 足 coin 400 | FD 97 冷 401 | FD 98 黄 402 | FD 99 力 power 403 | FD 9A 宝 treasure 404 | FD 9B 求 405 | FD 9C 先 this way/ahead 406 | FD 9D 消 407 | FD 9E 封 408 | FD 9F 捕 409 | FD A0 勇 410 | FD A1 年 411 | FD A2 姿 412 | FD A3 話 413 | FD A4 色 414 | FD A5 々 [repeat] 415 | FD A6 真 416 | FD A7 紅 417 | FD A8 場 418 | FD A9 炎 419 | FD AA 空 420 | FD AB 面 421 | FD AC 音 422 | FD AD 吹 423 | FD AE 中 424 | FD AF 祈 425 | FD B0 起 426 | FD B1 右 427 | FD B2 念 428 | FD B3 再 429 | FD B4 生 430 | FD B5 庭 431 | FD B6 路 432 | FD B7 部 433 | FD B8 川 river 434 | FD B9 血 435 | FD BA 完 436 | FD BB 矢 437 | FD BC 現 438 | FD BD 在 439 | FD BE 全 440 | FD BF 体 441 | FD C0 文 442 | FD C1 秘 443 | FD C2 密 444 | FD C3 感 445 | FD C4 賢 446 | FD C5 陣 447 | FD C6 残 448 | FD C7 百 449 | FD C8 近 450 | FD C9 朝 451 | FD CA 助 452 | FD CB 術 453 | FD CC 粉 454 | FD CD 火 455 | FD CE 注 456 | FD CF 意 457 | FD D0 走 458 | FD D1 敵 enemy 459 | FD D2 玉 460 | FD D3 復 461 | FD D4 活 462 | FD D5 塔 463 | FD D6 来 464 | FD D7 帰 465 | FD D8 忘 466 | FD D9 東 east/eastern 467 | FD DA 青 468 | FD DB 持 469 | FD DC 込 470 | FD DD 逃 flee/set free 471 | FD DE 銀 472 | FD DF 勝 473 | FD E0 集 474 | FD E1 始 475 | FD E2 攻 476 | FD E3 撃 attack 477 | FD E4 命 478 | FD E5 老 479 | FD E6 心 480 | FD E7 新 481 | FD E8 世 482 | FD E9 界 483 | FD EA 箱 chest 484 | FD EB 木 485 | FD EC 対 486 | FD ED 特 487 | FD EE 賊 488 | FD EF 洞 cave/hole 489 | FD F0 支 490 | FD F1 盗 491 | FD F2 族 492 | FD F3 能 493 | FD F4 力 power (character is a duplicate of kanji 99, but drawn slightly different) 494 | FD F5 多 495 | FD F6 聖 496 | FD F7 両 497 | FD F8 民 498 | FD F9 予 499 | FD FA 小 small 500 | FD FB 強 501 | FD FC 投 502 | FD FD 服 503 | FD FE 月 504 | FD FF 姫 -------------------------------------------------------------------------------- /resources/music.txt: -------------------------------------------------------------------------------- 1 | ==================================================================================================== 2 | 3 | Transfers (+4 for first byte of data) 4 | ---------------------------------------------------------------------------------------------------- 5 | ROM Size ARAM Data 6 | ---------------------------------------------------------------------------------------------------- 7 | $198000 $0070 $3C00 Sample pointers 8 | $198074 $7AA0 $4000 Sample data 9 | $19FB18 $00AE $3D00 Instrument data 10 | $19FBCA $0F9E $0800 Engine 11 | $1A8B6C $1090 $17C0 Sound effects instructions/Data/Pointers 12 | $1A9C00 $00E1 $3E00 Sound effects instruments 13 | $1A9CE5 $020C $2880 Faerie theme 14 | 15 | $1A9EF5 $2DAE $D000 Overworld main songs bank 16 | $1ACCA7 $0688 $2B00 Overworld auxiliary songs 17 | $1AD333 $0000 $0800 End transfer 18 | 19 | $1B8000 $2CBF $D000 Underworld main songs bank 20 | $1BACC3 $050C $2B00 Underworld auxiliary songs 21 | $1BB1D3 $0000 $0800 End transfer 22 | 23 | $1AD380 $1060 $D000 Credits main songs bank 24 | $1AE3E4 $1038 $2900 Credits auxiliary songs 25 | $1AF420 $0000 $0800 End transfer 26 | 27 | ==================================================================================================== 28 | 29 | Free APU RAM 30 | ---------------------------------------------------------------------------------------------------- 31 | Addr Size 32 | ---------------------------------------------------------------------------------------------------- 33 | $040F $03F1 After variables 34 | $2850 $0030 Before fairy theme 35 | $2A8C $0074 After fairy theme 36 | $3188 $0A78 After auxiliary songs (Credits extend to $3938, leaving only $02C8) 37 | $BAA0 $0560 After sample data 38 | 39 | ==================================================================================================== 40 | 41 | Track commands 42 | ---------------------------------------------------------------------------------------------------- 43 | Command Action 44 | ---------------------------------------------------------------------------------------------------- 45 | F0 Mute 46 | F1 Fade out 47 | F2 Half volume 48 | F3 Max volume 49 | FF Initiate transfer 50 | 51 | ==================================================================================================== 52 | 53 | Overworld song bank 54 | 55 | Song ARAM ROM Name 56 | ---------------------------------------------------------------------------------------------------- 57 | SONG 01 $D036 $1A9F2F Triforce opening 58 | SONG 02 $D0FF $1A9FF8 Light World 59 | SONG 03 $D86A $1AA763 Rain 60 | SONG 04 $DCA7 $1AB4D5 Bunny Link 61 | SONG 05 $DEE5 $1AADDE Lost woods 62 | SONG 06 $E36A $1AB263 Legends theme (attract mode) 63 | SONG 07 $E8DC $1AB7D5 Kakariko Village 64 | SONG 08 $EE11 $1ABD0A Mirror warp 65 | SONG 09 $EF6D $1ABE66 Dark World 66 | SONG 0A $F813 $1AC70C Restoring the Master Sword 67 | SONG 0B $2880 $1A9CE9 Faerie theme 68 | SONG 0C $F8F6 $1AC7EF Chase theme 69 | SONG 0D $2B00 $1ACCAB Skull Woods 70 | SONG 0E $2FA6 $1AD151 Game theme 71 | SONG 0F $FAFA $1AC9F3 Intro no Triforce 72 | SONG 10 $0000 ------- nothing 73 | SONG 11 $0000 ------- nothing 74 | SONG 12 $0000 ------- nothing 75 | SONG 13 $0000 ------- nothing 76 | SONG 14 $0000 ------- nothing 77 | SONG 15 $0000 ------- nothing 78 | SONG 16 $0000 ------- nothing 79 | SONG 17 $0000 ------- nothing 80 | SONG 18 $0000 ------- nothing 81 | SONG 19 $0000 ------- nothing 82 | SONG 1A $0000 ------- nothing 83 | SONG 1B $0000 ------- nothing 84 | 85 | ---------------------------------------------------------------------------------------------------- 86 | 87 | Underworld song bank 88 | 89 | Song ARAM ROM Name 90 | ---------------------------------------------------------------------------------------------------- 91 | SONG 01 $0000 ------- nothing 92 | SONG 02 $0000 ------- nothing 93 | SONG 03 $0000 ------- nothing 94 | SONG 04 $0000 ------- nothing 95 | SONG 05 $0000 ------- nothing 96 | SONG 06 $0000 ------- nothing 97 | SONG 07 $0000 ------- nothing 98 | SONG 08 $0000 ------- nothing 99 | SONG 09 $0000 ------- nothing 100 | SONG 0A $0000 ------- nothing 101 | SONG 0B $2880 $1A9CE9 Faerie theme 102 | SONG 0C $0000 ------- nothing 103 | SONG 0D $0000 ------- nothing 104 | SONG 0E $0000 ------- nothing 105 | SONG 0F $0000 ------- nothing 106 | SONG 10 $D046 $1B804A Hyrule Castle 107 | SONG 11 $DBEC $1B8BF0 Light World dungeon 108 | SONG 12 $E13A $1B913E Caves 109 | SONG 13 $E431 $1B9435 Fanfare 110 | SONG 14 $E6F9 $1B96FD Sanctuary 111 | SONG 15 $E91E $1B9922 Boss theme 112 | SONG 16 $EC0B $1B9C0F Dark World dungeon 113 | SONG 17 $F1D1 $1BA1D5 Fortune teller 114 | SONG 18 $E13A $1B913E Caves 115 | SONG 19 $F304 $1BA308 Zelda rescue 116 | SONG 1A $F580 $1BA584 Crystal theme 117 | SONG 1B $F909 $1BA90D Faerie theme w/ arpeggio 118 | SONG 1C $FB6A $1BAB6E Pre-Agahnim theme 119 | SONG 1D $2B00 $1BACC7 Agahnim escape 120 | SONG 1E $2F59 $1BB120 Pre-Ganon theme 121 | SONG 1F $2BB3 $1BAD7A Ganondorf the Thief 122 | SONG 20 $0000 ------- nothing 123 | SONG 21 $2B00 $1BACC7 Agahnim escape duplicate (unused) 124 | SONG 22 $2F59 $1BB120 Pre-Ganon theme duplicate (unused) 125 | SONG 23 $2BB3 $1BAD7A Ganondorf the Thief duplicate (unused) 126 | 127 | ---------------------------------------------------------------------------------------------------- 128 | 129 | Credits song bank 130 | 131 | Song ARAM ROM Name 132 | ---------------------------------------------------------------------------------------------------- 133 | SONG 01 $0000 ------- nothing 134 | SONG 02 $0000 ------- nothing 135 | SONG 03 $0000 ------- nothing 136 | SONG 04 $0000 ------- nothing 137 | SONG 05 $0000 ------- nothing 138 | SONG 06 $0000 ------- nothing 139 | SONG 07 $0000 ------- nothing 140 | SONG 08 $0000 ------- nothing 141 | SONG 09 $0000 ------- nothing 142 | SONG 0A $0000 ------- nothing 143 | SONG 0B $0000 ------- nothing 144 | SONG 0C $0000 ------- nothing 145 | SONG 0D $0000 ------- nothing 146 | SONG 0E $0000 ------- nothing 147 | SONG 0F $0000 ------- nothing 148 | SONG 10 $0000 ------- nothing 149 | SONG 11 $0000 ------- nothing 150 | SONG 12 $0000 ------- nothing 151 | SONG 13 $0000 ------- nothing 152 | SONG 14 $0000 ------- nothing 153 | SONG 15 $0000 ------- nothing 154 | SONG 16 $0000 ------- nothing 155 | SONG 17 $0000 ------- nothing 156 | SONG 18 $0000 ------- nothing 157 | SONG 19 $0000 ------- nothing 158 | SONG 1A $0000 ------- nothing 159 | SONG 1B $0000 ------- nothing 160 | SONG 1C $0000 ------- nothing 161 | SONG 1D $0000 ------- nothing 162 | SONG 1E $0000 ------- nothing 163 | SONG 1F $0000 ------- nothing 164 | SONG 20 $D046 $1AD3CA Triforce room 165 | SONG 21 $2900 $1AE3E8 Grabbing Triforce and Epilogue 166 | SONG 22 $D2FD $1AD681 Credits 167 | SONG 23 $0000 ------- nothing 168 | 169 | ==================================================================================================== 170 | 171 | Instruments: 172 | LTTP has 1:1 correspondence of instrument:sample refrences 173 | ADSR, Gain, and Mult only apply to song instruments 174 | Everything else applies to the sample as a whole 175 | 176 | * = Sample has no loop (loop point is end) 177 | ^ = Pitch multiplier is in big endian 178 | 179 | ---------------------------------------------------------------------------------------------------- 180 | ID Addr Loop (off) ADSR Gain Mult^ Name Usage (M=Song | S=SFX) 181 | ---------------------------------------------------------------------------------------------------- 182 | SRCN 00 $4000 $4012 $0012 $FF $E0 $B8 $0470 Noise - S 183 | SRCN 01 $4048 $4063 $001B $FF $E0 $B8 $0790 Rain M S 184 | SRCN 02 $47F2 $5395 $0BA3 $FF $E0 $B8 $09C0 Timpani M S 185 | SRCN 03 $5395 $53B0 $001B $FF $E0 $B8 $0400 Square wave - S 186 | SRCN 04 $53D4 $53EF $001B $FF $E0 $B8 $0400 Saw wave - S 187 | SRCN 05 $5413 $542E $001B $FF $E0 $B8 $0470 Clink - S 188 | SRCN 06 $5476 $54A3 $002D $FF $E0 $B8 $0470 Wobbly lead M S 189 | SRCN 07 $550F $5521 $0012 $FF $E0 $B8 $0470 Compound Saw - S 190 | SRCN 08 $55B1 $5B2D $057C* $FF $E0 $B8 $07A0 Tweet - S 191 | SRCN 09 $5B2D $60BB $058E $8F $E9 $B8 $01E0 Strings A M - 192 | SRCN 0A $5B2D $60BB $058E $8A $E9 $B8 $01E0 Strings B M S 193 | SRCN 0B $68AD $6C9D $03F0 $FF $E0 $B8 $0300 Trombone M S 194 | SRCN 0C $6CD3 $7A65 $0D92* $FF $E0 $B8 $03A0 Cymbal M S 195 | SRCN 0D $7A65 $7BFA $0195 $FF $E0 $B8 $0100 Ocarina - S 196 | SRCN 0E $7C03 $7C78 $0075 $FF $EF $B8 $0EA0 Chimes M S 197 | SRCN 0F $7CDB $7EA6 $01CB $FF $EF $B8 $0600 Harp M S 198 | SRCN 10 $7EC1 $867D $07BC* $FF $E0 $B8 $03D0 Splash M S 199 | SRCN 11 $867D $8D6A $06ED $8F $E0 $B8 $0300 Trumpet M - 200 | SRCN 12 $8D85 $944E $06C9 $8F $E0 $B8 $06F0 Horn M - 201 | SRCN 13 $948D $A1BC $0D2F* $FD $E0 $B8 $07A0 Snare A M - 202 | SRCN 14 $948D $A1BC $0D2F* $FF $E0 $B8 $07A0 Snare B M S 203 | SRCN 15 $A1BC $A6E7 $052B $FF $E0 $B8 $03D0 Choir M S 204 | SRCN 16 $AEB5 $B0D1 $021C $8F $E0 $B8 $0300 Flute M - 205 | SRCN 17 $B0EC $B32C $0240* $FF $E0 $B8 $02C0 Oof - S 206 | SRCN 18 $B32C $BA61 $0735 $FE $8F $B8 $06F0 Piano M - 207 | -------------------------------------------------------------------------------- /resources/memory_usage_ancilla.txt: -------------------------------------------------------------------------------- 1 | ==================================================================================================== 2 | All ancillae (or nearly all) 3 | ---------------------------------------------------------------------------------------------------- 4 | $0280,X 5 | 6 | 7 | $0C86,X - OAM region offset 8 | $0C90,X - OAM allocation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ==================================================================================================== 25 | Ancilla 01 - SomariaBullet 26 | ---------------------------------------------------------------------------------------------------- 27 | $0C54,X 28 | Bullet type 29 | Handles animation frame and speed 30 | Only types 4 and 5 seem used, for animation 31 | 32 | ==================================================================================================== 33 | Ancilla 02 - Fire rod shot 34 | ---------------------------------------------------------------------------------------------------- 35 | $0C68,X - Init timer, initialized to 3, 7 if collision 36 | $0C54,X - Initialized to 0 37 | $0C5E,X - Initialized to 0 38 | $0280,X - Initialized to 0 39 | $028A,X - Initialized to 0 40 | $0C72,X - Direction 41 | $03CA,X - Initialized with $0476 42 | 43 | ==================================================================================================== 44 | Ancilla 03 - 45 | ---------------------------------------------------------------------------------------------------- 46 | 47 | ==================================================================================================== 48 | Ancilla 04 - 49 | ---------------------------------------------------------------------------------------------------- 50 | 51 | ==================================================================================================== 52 | Ancilla 05 - 53 | ---------------------------------------------------------------------------------------------------- 54 | 55 | ==================================================================================================== 56 | Ancilla 06 - 57 | ---------------------------------------------------------------------------------------------------- 58 | 59 | ==================================================================================================== 60 | Ancilla 07 - 61 | ---------------------------------------------------------------------------------------------------- 62 | 63 | ==================================================================================================== 64 | Ancilla 08 - 65 | ---------------------------------------------------------------------------------------------------- 66 | 67 | ==================================================================================================== 68 | Ancilla 09 - 69 | ---------------------------------------------------------------------------------------------------- 70 | 71 | 72 | ==================================================================================================== 73 | Ancilla 0A - 74 | ---------------------------------------------------------------------------------------------------- 75 | 76 | 77 | ==================================================================================================== 78 | Ancilla 0B - 79 | ---------------------------------------------------------------------------------------------------- 80 | 81 | 82 | ==================================================================================================== 83 | Ancilla 0C - 84 | ---------------------------------------------------------------------------------------------------- 85 | 86 | 87 | ==================================================================================================== 88 | Ancilla 0D - 89 | ---------------------------------------------------------------------------------------------------- 90 | 91 | 92 | ==================================================================================================== 93 | Ancilla 0E - 94 | ---------------------------------------------------------------------------------------------------- 95 | 96 | 97 | ==================================================================================================== 98 | Ancilla 0F - 99 | ---------------------------------------------------------------------------------------------------- 100 | 101 | 102 | ==================================================================================================== 103 | Ancilla 10 - 104 | ---------------------------------------------------------------------------------------------------- 105 | 106 | 107 | ==================================================================================================== 108 | Ancilla 11 - 109 | ---------------------------------------------------------------------------------------------------- 110 | 111 | 112 | ==================================================================================================== 113 | Ancilla 12 - 114 | ---------------------------------------------------------------------------------------------------- 115 | 116 | 117 | ==================================================================================================== 118 | Ancilla 13 - 119 | ---------------------------------------------------------------------------------------------------- 120 | 121 | 122 | ==================================================================================================== 123 | Ancilla 14 - 124 | ---------------------------------------------------------------------------------------------------- 125 | 126 | 127 | ==================================================================================================== 128 | Ancilla 15 - 129 | ---------------------------------------------------------------------------------------------------- 130 | 131 | 132 | ==================================================================================================== 133 | Ancilla 16 - 134 | ---------------------------------------------------------------------------------------------------- 135 | 136 | 137 | ==================================================================================================== 138 | Ancilla 17 - 139 | ---------------------------------------------------------------------------------------------------- 140 | 141 | 142 | ==================================================================================================== 143 | Ancilla 18 - 144 | ---------------------------------------------------------------------------------------------------- 145 | 146 | 147 | ==================================================================================================== 148 | Ancilla 19 - 149 | ---------------------------------------------------------------------------------------------------- 150 | 151 | 152 | ==================================================================================================== 153 | Ancilla 1A - 154 | ---------------------------------------------------------------------------------------------------- 155 | 156 | 157 | ==================================================================================================== 158 | Ancilla 1B - 159 | ---------------------------------------------------------------------------------------------------- 160 | 161 | 162 | ==================================================================================================== 163 | Ancilla 1C - 164 | ---------------------------------------------------------------------------------------------------- 165 | 166 | 167 | ==================================================================================================== 168 | Ancilla 1D - 169 | ---------------------------------------------------------------------------------------------------- 170 | 171 | 172 | ==================================================================================================== 173 | Ancilla 1E - 174 | ---------------------------------------------------------------------------------------------------- 175 | 176 | 177 | ==================================================================================================== 178 | Ancilla 1F Hookshot 179 | ---------------------------------------------------------------------------------------------------- 180 | $03A4,X - Layer swap (0: skip | 1: run layer logic) 181 | $037E - Dragging link (0: no | 1: dragging) 182 | $0C54,X - Growth (0: extending | 1: retracting) 183 | $0C5E,X - Extension (maxes at 0x20) 184 | $0C68,X - Chain SFX 185 | $0C72,X - Direction 186 | 187 | ==================================================================================================== 188 | Ancilla 20 - 189 | ---------------------------------------------------------------------------------------------------- 190 | 191 | 192 | ==================================================================================================== 193 | Ancilla 21 - 194 | ---------------------------------------------------------------------------------------------------- 195 | 196 | 197 | ==================================================================================================== 198 | Ancilla 22 - 199 | ---------------------------------------------------------------------------------------------------- 200 | 201 | 202 | ==================================================================================================== 203 | Ancilla 23 - 204 | ---------------------------------------------------------------------------------------------------- 205 | 206 | 207 | ==================================================================================================== 208 | Ancilla 24 - 209 | ---------------------------------------------------------------------------------------------------- 210 | 211 | 212 | ==================================================================================================== 213 | Ancilla 25 - 214 | ---------------------------------------------------------------------------------------------------- 215 | 216 | 217 | ==================================================================================================== 218 | Ancilla 26 - 219 | ---------------------------------------------------------------------------------------------------- 220 | 221 | 222 | ==================================================================================================== 223 | Ancilla 27 - 224 | ---------------------------------------------------------------------------------------------------- 225 | 226 | 227 | ==================================================================================================== 228 | Ancilla 28 - 229 | ---------------------------------------------------------------------------------------------------- 230 | 231 | 232 | ==================================================================================================== 233 | Ancilla 29 - 234 | ---------------------------------------------------------------------------------------------------- 235 | 236 | 237 | ==================================================================================================== 238 | Ancilla 2A - 239 | ---------------------------------------------------------------------------------------------------- 240 | 241 | 242 | ==================================================================================================== 243 | Ancilla 2B - 244 | ---------------------------------------------------------------------------------------------------- 245 | 246 | 247 | ==================================================================================================== 248 | Ancilla 2C - 249 | ---------------------------------------------------------------------------------------------------- 250 | 251 | 252 | ==================================================================================================== 253 | Ancilla 2D - 254 | ---------------------------------------------------------------------------------------------------- 255 | 256 | 257 | ==================================================================================================== 258 | Ancilla 2E - 259 | ---------------------------------------------------------------------------------------------------- 260 | 261 | 262 | ==================================================================================================== 263 | Ancilla 2F - 264 | ---------------------------------------------------------------------------------------------------- 265 | 266 | 267 | ==================================================================================================== 268 | Ancilla 30 - 269 | ---------------------------------------------------------------------------------------------------- 270 | 271 | 272 | ==================================================================================================== 273 | Ancilla 31 - 274 | ---------------------------------------------------------------------------------------------------- 275 | 276 | 277 | ==================================================================================================== 278 | Ancilla 32 - 279 | ---------------------------------------------------------------------------------------------------- 280 | 281 | 282 | ==================================================================================================== 283 | Ancilla 33 - 284 | ---------------------------------------------------------------------------------------------------- 285 | 286 | 287 | ==================================================================================================== 288 | Ancilla 34 - 289 | ---------------------------------------------------------------------------------------------------- 290 | 291 | 292 | ==================================================================================================== 293 | Ancilla 35 - 294 | ---------------------------------------------------------------------------------------------------- 295 | 296 | 297 | ==================================================================================================== 298 | Ancilla 36 - 299 | ---------------------------------------------------------------------------------------------------- 300 | 301 | 302 | ==================================================================================================== 303 | Ancilla 37 - 304 | ---------------------------------------------------------------------------------------------------- 305 | 306 | 307 | ==================================================================================================== 308 | Ancilla 38 - 309 | ---------------------------------------------------------------------------------------------------- 310 | 311 | 312 | ==================================================================================================== 313 | Ancilla 39 - 314 | ---------------------------------------------------------------------------------------------------- 315 | 316 | 317 | ==================================================================================================== 318 | Ancilla 3A - 319 | ---------------------------------------------------------------------------------------------------- 320 | 321 | 322 | ==================================================================================================== 323 | Ancilla 3B - 324 | ---------------------------------------------------------------------------------------------------- 325 | 326 | 327 | ==================================================================================================== 328 | Ancilla 3C - 329 | ---------------------------------------------------------------------------------------------------- 330 | 331 | 332 | ==================================================================================================== 333 | Ancilla 3D - 334 | ---------------------------------------------------------------------------------------------------- 335 | 336 | 337 | ==================================================================================================== 338 | Ancilla 3E - 339 | ---------------------------------------------------------------------------------------------------- 340 | 341 | 342 | ==================================================================================================== 343 | Ancilla 44 - 344 | ---------------------------------------------------------------------------------------------------- 345 | -------------------------------------------------------------------------------- /resources/sfx.txt: -------------------------------------------------------------------------------- 1 | SFX instruments - Table: ARAM $3E00, ROM $1A:9C04 2 | 3 | ID VOL L,R Pitch SRCN ADSR Gain Mult Name 4 | ---------------------------------------------------------------------------------------------------- 5 | $00 $70, $70 $1000 $00 $F6 $6A $B8 $03 Fwoosh 6 | $01 $70, $70 $1000 $01 $8E $E0 $B8 $02 Swish 7 | $02 $70, $70 $1000 $14 $FE $6A $B8 $02 Bomp 8 | $03 $70, $70 $1000 $03 $FE $F8 $B8 $0D Ting 9 | $04 $70, $70 $1000 $04 $FE $6A $7F $03 Rrrrr 10 | $05 $70, $70 $1000 $02 $FE $6A $7F $03 Clunk 11 | $06 $70, $70 $1000 $05 $FE $6A $70 $03 Ching 12 | $07 $70, $70 $1000 $06 $FE $6A $70 $03 Fwomp 13 | $08 $70, $70 $1000 $08 $FA $6A $70 $03 Squee 14 | $09 $70, $70 $1000 $06 $FE $6A $70 $01 Unused 15 | $0A $70, $70 $1000 $07 $FE $6A $70 $05 Bzzzrt 16 | $0B $70, $70 $1000 $0B $FE $6A $B8 $03 Brrfft 17 | $0C $70, $70 $1000 $0C $FE $E0 $B8 $02 Brrwwww 18 | $0D $70, $70 $1000 $0D $F9 $6E $B8 $03 Twee 19 | $0E $70, $70 $1000 $0E $FE $F5 $B8 $07 Pwing 20 | $0F $70, $70 $1000 $0F $FE $F5 $B8 $06 Pling 21 | $10 $70, $70 $1000 $01 $FE $FC $B8 $03 Chshtsh 22 | $11 $70, $70 $1000 $10 $8E $E0 $B8 $03 Splssh 23 | $12 $70, $70 $1000 $08 $8E $E0 $B8 $02 Weewoo 24 | $13 $70, $70 $1000 $14 $8E $E0 $B8 $02 Brbrbrb 25 | $14 $70, $70 $1000 $0A $88 $E0 $B8 $02 Bwow 26 | $15 $70, $70 $1000 $17 $8E $E0 $B8 $02 Uughf 27 | $16 $70, $70 $1000 $15 $FF $E0 $B8 $04 Aaaaaa 28 | $17 $70, $70 $1000 $03 $DF $11 $B8 $0F Twing 29 | $18 $70, $70 $1000 $01 $88 $E0 $B8 $01 Whooo 30 | 31 | ==================================================================================================== 32 | 33 | SFX instruments by usage 34 | 35 | $00 SFX1.13, SFX1.14 36 | SFX2.07, SFX2.09, SFX2.0D, SFX2.0E, SFX2.2C, SFX2.3A 37 | SFX3.05, SFX3.26 38 | SFXU2533 39 | 40 | $01 SFX1.01, SFX1.02, SFX1.03, SFX1.04 41 | SFX2.01, SFX2.02, SFX2.12, SFX2.1A, SFX2.1E, SFX2.1F 42 | SFX2.21, SFX2.23, SFX2.29, SFX2.32, SFX2.39 43 | SFX3.02, SFX3.1E, SFX3.23, SFX3.31 44 | 45 | $02 SFX2.03, SFX2.04, SFX2.08, SFX2.0B, SFX2.12, SFX2.1F, SFX2.21 46 | SFX3.06, SFX3.0E 47 | SFXU2831 48 | 49 | $03 SFX2.06 50 | SFX3.0A, SFX3.30 51 | 52 | $04 SFX2.3C 53 | SFX3.32 54 | SFXU2831 55 | 56 | $05 SFX2.10, SFX2.11, SFX2.22 57 | SFX3.18, SFX3.3E 58 | SFXU252D 59 | 60 | $06 SFX2.05, SFX2.0A, SFX2.0F, SFX2.3B 61 | SFX3.04, SFX3.14, SFX3.25 62 | 63 | $07 SFX2.14, SFX2.15, SFX2.33 64 | SFX3.01, SFX3.11, SFX3.12, SFX3.19, SFX3.27, SFX3.28, SFX3.29, SFX3.35, SFX3.39 65 | SFXU26A2 66 | 67 | $08 SFX3.17 68 | 69 | $09 nothing 70 | 71 | $0A SFX1.15, SFX1.16 72 | SFX3.1C, SFX3.2A, SFX3.2B, SFX3.2C 73 | 74 | $0B SFX2.27 75 | SFX3.0B, SFX3.0F, SFX3.2E, SFX3.34, SFX3.35, SFX3.36, SFX3.3C, SFX3.3D, SFX3.3F 76 | 77 | $0C SFX2.2A 78 | SFX3.07, SFX3.08, SFX3.09 79 | 80 | $0D SFX1.0B, SFX1.0C, SFX1.17, SFX1.18, SFX1.1B, SFX1.1C 81 | SFX2.13, SFX2.20, SFX2.31, SFX2.3E, SFX2.3F 82 | SFX3.0C, SFX3.13, SFX3.24 83 | SFXU1EE2, SFXU279D, SFXU27F6, SFXU2807, SFXU2818 84 | 85 | $0E SFX1.0D, SFX1.0E, SFX1.0F, SFX1.10, SFX1.1D, SFX1.1E, SFX1.1F, SFX1.20 86 | SFX2.2B, SFX2.37 87 | SFX3.0D, SFX3.10, SFX3.1B, SFX3.2F, SFX3.33, SFX3.3A, SFX3.3B 88 | 89 | $0F SFX2.2D 90 | SFX3.1A, SFX3.1D, SFX3.20, SFX3.2D, SFX3.37 91 | SFXU1D1C 92 | 93 | $10 SFX2.16, SFX2.17, SFX2.18, SFX2.19 94 | 95 | $11 SFX2.1B, SFX2.1C, SFX2.24, SFX2.25, SFX2.28, SFX2.2E, SFX2.34, SFX3.28, SFX2.3D 96 | 97 | $12 SFX3.04 98 | 99 | $13 SFX1.07, SFX1.08 100 | SFX2.0C, SFX2.35, SFX2.36 101 | SFX3.03, SFX3.15, SFX3.16, SFX3.25, SFX3.38 102 | 103 | $14 SFX3.21, SFX3.22 104 | SFXU277E 105 | 106 | $15 SFX2.26, SFX2.30 107 | SFXU1F13 108 | 109 | $16 SFX1.11, SFX1.12 110 | SFX2.1D 111 | SFX3.1F 112 | 113 | $17 SFX2.2C, SFX2.3A 114 | 115 | $18 SFX1.09, SFX1.0A 116 | 117 | ==================================================================================================== 118 | 119 | SFX1 - queued via $012D | Table: ARAM $17C0, ROM $1A:8B70 120 | 121 | ID ARAM ROM Name 122 | ---------------------------------------------------------------------------------------------------- 123 | SFX1.01 $2652 $1A9A02 Rain / Zora area 124 | SFX1.02 $2662 $1A9A12 Rain / Zora area (packaged with $01) 125 | SFX1.03 $2677 $1A9A27 Rain 126 | SFX1.04 $2687 $1A9A37 Rain (packaged with $03) 127 | SFX1.05 $284F $1A9BFF Silence 128 | SFX1.06 $284F $1A9BFF Silence (packaged with $05) 129 | SFX1.07 $2739 $1A9AE9 The Rumbling 130 | SFX1.08 $2736 $1A9AE6 The Rumbling (packaged with $08) 131 | SFX1.09 $1C8E $1A903E Wind 132 | SFX1.0A $1CBC $1A906C Wind (packaged with $09 by APU) 133 | SFX1.0B $1BA3 $1A8F53 Flute song by flute boy 134 | SFX1.0C $1B62 $1A8F12 Flute song by flute boy (packaged with $0B) 135 | SFX1.0D $1B0E $1A8EBE Magic jingle 136 | SFX1.0E $1B1D $1A8ECD Magic jingle (packaged with $0D) 137 | SFX1.0F $1B2C $1A8EDC Crystal / Save and quit 138 | SFX1.10 $1B3E $1A8EEE Crystal / Save and quit (packaged with $0F) 139 | SFX1.11 $1EAC $1A925C Choir melody 140 | SFX1.12 $1EC8 $1A9278 Choir countermelody (packaged with $11) 141 | SFX1.13 $1AD2 $1A8E82 Large boss swoosh 142 | SFX1.14 $1AE1 $1A8E91 Large boss swoosh (packaged with $13) 143 | SFX1.15 $1AF0 $1A8EA0 Triforce door / Pyramid hole opening 144 | SFX1.16 $1AFF $1A8EAF VOMP (packaged with $15) 145 | SFX1.17 $1C24 $1A8FD4 Flute song for weathervane 146 | SFX1.18 $1BE3 $1A8F93 Flute song for weathervane (packaged with $17) 147 | SFX1.19 $0000 ------- Nothing (unused) 148 | SFX1.1A $0000 ------- Nothing (unused; packaged with $19) 149 | SFX1.1B $1BA3 $1A8F53 Flute song by flute boy duplicate (unused) 150 | SFX1.1C $1B62 $1A8F12 Flute song by flute boy duplicate (unused; packaged with $1B) 151 | SFX1.1D $1B0E $1A8EBE Magic jingle duplicate (unused) 152 | SFX1.1E $1B1D $1A8ECD Magic jingle duplicate (unused; packaged with $1D) 153 | SFX1.1F $1B2C $1A8EDC Crystal / Save and quit duplicate (unused) 154 | SFX1.20 $1B3E $1A8EEE Crystal / Save and quit duplicate (unused; packaged with $1F) 155 | 156 | $80..$FF Initiates a fade to half volume for SFX1 157 | 158 | ==================================================================================================== 159 | 160 | SFX2 - queued via $012E | Table: ARAM $1820, ROM $1A:8BD0 161 | 162 | ID ARAM ROM Name 163 | ---------------------------------------------------------------------------------------------------- 164 | 00 $0020 ------- Undefined; when queued value of $40, $C0, $80 165 | SFX2.01 $2614 $1A99C4 Slash 166 | SFX2.02 $2625 $1A99D5 Slash 167 | SFX2.03 $2634 $1A99E4 Slash 168 | SFX2.04 $2643 $1A99F3 Slash 169 | SFX2.05 $25DD $1A998D Clink 170 | SFX2.06 $25D7 $1A9987 Bombable door clink 171 | SFX2.07 $25B7 $1A9967 Fwoosh 172 | SFX2.08 $25E3 $1A9993 Arrow smash 173 | SFX2.09 $25AD $1A995D Boomerang fwish 174 | SFX2.0A $25C7 $1A9977 Hookshot clink 175 | SFX2.0B $2478 $1A9828 Placing bomb 176 | SFX2.0C $269C $1A9A4C Explosion 177 | SFX2.0D $2414 $1A97C4 Powder (paired $0D→$3F) 178 | SFX2.0E $2404 $1A97B4 Fire rod shot 179 | SFX2.0F $24C3 $1A9873 Ice rod shot 180 | SFX2.10 $23FA $1A97AA Hammer use 181 | SFX2.11 $23F0 $1A97A0 Hammering peg 182 | SFX2.12 $23CD $1A977D Digging 183 | SFX2.13 $23A0 $1A9750 Flute (paired $13→$3E) 184 | SFX2.14 $2380 $1A9730 Cape on 185 | SFX2.15 $2390 $1A9740 Cape off / Wallmaster grab 186 | SFX2.16 $232C $1A96DC Staircase 187 | SFX2.17 $2344 $1A96F4 Staircase 188 | SFX2.18 $2356 $1A9706 Staircase 189 | SFX2.19 $236E $1A971E Staircase 190 | SFX2.1A $2316 $1A96C6 Tall grass / Hammer hitting bush 191 | SFX2.1B $2307 $1A96B7 Shallow water 192 | SFX2.1C $2301 $1A96B1 Mire shallow water 193 | SFX2.1D $22BB $1A966B Lifting object 194 | SFX2.1E $2577 $1A9927 Cutting grass 195 | SFX2.1F $22E9 $1A9699 Item breaking 196 | SFX2.20 $22DA $1A968A Item falling in pit 197 | SFX2.21 $22CF $1A967F Bomb hitting ground / General thud 198 | SFX2.22 $2107 $1A94B7 Pushing object / Armos bounce 199 | SFX2.23 $22B1 $1A9661 Boots dust 200 | SFX2.24 $22A5 $1A9655 Splashing (paired $24→$3D) 201 | SFX2.25 $2296 $1A9646 Mire shallow water again? 202 | SFX2.26 $2844 $1A9BF4 Link taking damage 203 | SFX2.27 $2252 $1A9602 Fainting 204 | SFX2.28 $2287 $1A9637 Item splash 205 | SFX2.29 $243F $1A97EF Rupee refill (paired $29→$3B) 206 | SFX2.2A $2033 $1A93E3 Fire splash / Bombos spell 207 | SFX2.2B $1FF2 $1A93A2 Heart beep / Text box 208 | SFX2.2C $1FD9 $1A9389 Sword up (paired $2C→$3A) (also uses instrument $17) 209 | SFX2.2D $20A6 $1A9456 Magic drain 210 | SFX2.2E $1FCA $1A937A GT opening (paired $2E→$39) 211 | SFX2.2F $1F47 $1A92F7 GT opening / Water drain (paired $2F→$38) 212 | SFX2.30 $1EF1 $1A92A1 Cucco 213 | SFX2.31 $20CE $1A947E Fairy 214 | SFX2.32 $1D47 $1A90F7 Bug net 215 | SFX2.33 $1CDC $1A908C Teleport (paired $34→$33) 216 | SFX2.34 $1F6F $1A931F Teleport (paired $34→$33) 217 | SFX2.35 $1C67 $1A9017 Shaking 218 | SFX2.36 $1C64 $1A9014 Mire entrance (extends above; paired $35→$36) 219 | SFX2.37 $1A43 $1A8DF3 Spin charged 220 | SFX2.38 $1F6F $1A931F Water sound (paired $2F→$38) 221 | SFX2.39 $1F9C $1A934C Thunder (paired $2E→$39) 222 | SFX2.3A $1FE7 $1A9397 Sword up (paired $2C→$3A) 223 | SFX2.3B $2462 $1A9812 Rupee refill (paired $29→$3B) 224 | SFX2.3C $1A37 $1A8DE7 Error beep 225 | SFX2.3D $22AB $1A965B Big splash (paired $24→$3D) 226 | SFX2.3E $23B5 $1A9765 Flute (paired $13→$3E) 227 | SFX2.3F $2435 $1A97E5 Powder (paired $0D→$3F) 228 | 229 | ==================================================================================================== 230 | 231 | SFX3 - queued via $012F | Table: ARAM $191C, ROM $1A:8CCC 232 | 233 | ID ARAM ROM Name 234 | ---------------------------------------------------------------------------------------------------- 235 | 00 $003C ------- Undefined; when queued value of $40, $C0, $80 236 | SFX3.01 $1A18 $1A8DC8 Sword beam 237 | SFX3.02 $254E $1A98FE TR opening 238 | SFX3.03 $224A $1A95FA Pyramid hole 239 | SFX3.04 $220E $1A95BE Angry soldier 240 | SFX3.05 $25B7 $1A9967 Lynel shot / Javelin toss 241 | SFX3.06 $21F5 $1A95A5 Swoosh 242 | SFX3.07 $223D $1A95ED Cannon fire 243 | SFX3.08 $21E6 $1A9596 Damage to enemy; $0BEX.4=1 244 | SFX3.09 $21C1 $1A9571 Enemy death 245 | SFX3.0A $21A9 $1A9559 Collecting rupee 246 | SFX3.0B $2198 $1A9548 Collecting heart 247 | SFX3.0C $218E $1A953E Non-blank text character 248 | SFX3.0D $21B5 $1A9565 HUD heart 249 | SFX3.0E $2182 $1A9532 Opening chest 250 | SFX3.0F $24B9 $1A9869 ♪Do do do doooooo♫ (paired $0F→$3C→$3D→$3E→$3F) 251 | SFX3.10 $216D $1A951D Map (paired $10→$3B) 252 | SFX3.11 $214F $1A94FF Opening item menu / Bomb shop guy breathing 253 | SFX3.12 $215E $1A950E Closing item menu / Bomb shop guy breathing 254 | SFX3.13 $213B $1A94EB Throwing object / Stalfos jump 255 | SFX3.14 $246C $1A981C Key door 256 | SFX3.15 $212F $1A94DF Door / Chest (used with SFX2.29) 257 | SFX3.16 $2123 $1A94D3 Armos Knight thud 258 | SFX3.17 $25A6 $1A9956 Rat squeak 259 | SFX3.18 $20DD $1A948D Dragging 260 | SFX3.19 $250A $1A98BA Fireball / Laser shot 261 | SFX3.1A $1E8A $1A923A Chest reveal jingle (paired $1A→$38) 262 | SFX3.1B $20B6 $1A9466 Puzzle jingle (paired $1B→$3A) 263 | SFX3.1C $1A62 $1A8E12 Damage to enemy 264 | SFX3.1D $20A6 $1A9456 Magic meter 265 | SFX3.1E $2091 $1A9441 Wing flapping 266 | SFX3.1F $204B $1A93FB Link falling 267 | SFX3.20 $276C $1A9B1C Menu / Text cursor moved 268 | SFX3.21 $27E2 $1A9B92 Damage to boss 269 | SFX3.22 $26CF $1A9A7F Boss dying / Deleting file 270 | SFX3.23 $2001 $1A93B1 Spin attack swoosh (paired $23→$39) 271 | SFX3.24 $2043 $1A93F3 OW map perspective change 272 | SFX3.25 $1E9D $1A924D Pressure switch (also uses instrument $06) 273 | SFX3.26 $1E7B $1A922B Lightning / Game over / Laser / Ganon bat / Trinexx lunge 274 | SFX3.27 $1E40 $1A91F0 Agahnim charge 275 | SFX3.28 $26F7 $1A9AA7 Agahnim / Ganon teleport 276 | SFX3.29 $1E21 $1A91D1 Agahnim shot 277 | SFX3.2A $1E12 $1A91C2 Somaria / Byrna / Ether spell / Helma fire ball 278 | SFX3.2B $1DF3 $1A91A3 Electrocution 279 | SFX3.2C $1DC0 $1A9170 Bees 280 | SFX3.2D $1DA9 $1A9159 Milestone jingle (paired $2D→$37) 281 | SFX3.2E $1D5D $1A910D Heart container jingle (paired $2E→$35→$34) 282 | SFX3.2F $1D80 $1A9130 Key jingle (paired $2F→$33) 283 | SFX3.30 $1B53 $1A8F03 Magic zap / Plop 284 | SFX3.31 $1ACA $1A8E7A Sprite falling / Moldorm shuffle 285 | SFX3.32 $1A78 $1A8E28 BOING 286 | SFX3.33 $1D93 $1A9143 Key jingle (paired $2F→$33) 287 | SFX3.34 $1D66 $1A9116 Heart container jingle (paired $2E→$35→$34) 288 | SFX3.35 $1D73 $1A9123 Heart container jingle (paired $2E→$35→$34) 289 | SFX3.36 $1AA7 $1A8E57 Magic attack 290 | SFX3.37 $1DB4 $1A9164 Milestone jingle (paired $2D→$37) 291 | SFX3.38 $1E93 $1A9243 Chest reveal jingle (paired $1A→$38) 292 | SFX3.39 $2017 $1A93C7 Swish (paired $23→$39) 293 | SFX3.3A $20C0 $1A9470 Puzzle jingle (paired $1B→$3A) 294 | SFX3.3B $2176 $1A9526 Map (paired $10→$3B) 295 | SFX3.3C $248A $1A983A Item jingle (paired $0F→$3C→$3D→$3E→$3F) 296 | SFX3.3D $2494 $1A9844 Item jingle ($0F→$3C→$3D→$3E→$3F) 297 | SFX3.3E $249E $1A984E Item jingle (paired $0F→$3C→$3D→$3E→$3F) 298 | SFX3.3F $2480 $1A9830 Item jingle (paired $0F→$3C→$3D→$3E→$3F) 299 | 300 | ==================================================================================================== 301 | 302 | Unused SFX 303 | 304 | ARAM ROM Description 305 | ---------------------------------------------------------------------------------------------------- 306 | $1A5B $1A8E0B Noisy fsssh; bleeds into SFX3.1C 307 | $1D1C $1A90CC Radar ping 308 | $1EE2 $1A9292 Slide whistle / Chirp 309 | $1F13 $1A92C3 Cucco clucking 310 | $252D $1A98DD Brighter hammer peg 311 | $2533 $1A98E3 Bat wings flapping 312 | $2657 $1A9A07 Broken static 313 | $267C $1A9A2C Static; Loops 314 | $26A2 $1A9A52 Tuba jingle followed by a roar 315 | $277E $1A9B2E UFO winding up 316 | $279D $1A9B4D Distant whistling 317 | $27C9 $1A9B79 Bwuuuoow 318 | $27F6 $1A9BA6 Cat call 319 | $2807 $1A9BB7 Higher pitched cat call 320 | $2818 $1A9BC8 Reverse cat call 321 | $2829 $1A9BD9 Dial-up 322 | $2831 $1A9BE1 Bumper peg 323 | -------------------------------------------------------------------------------- /registers_spc.asm: -------------------------------------------------------------------------------- 1 | ;=================================================================================================== 2 | ; KEY 3 | ;=================================================================================================== 4 | ; . - unused bit 5 | ; [..] - initial value 6 | ;=================================================================================================== 7 | 8 | ;=================================================================================================== 9 | ;=================================================================================================== 10 | ; SPC700 REGISTERS 11 | ;--------------------------------------------------------------------------------------------------- 12 | ; w - writeable 13 | ; r - readable 14 | ;=================================================================================================== 15 | ;=================================================================================================== 16 | 17 | ; SPC MEMORY CONTROL AND TIMER ENABLE 18 | ; $00F0 w 19 | ; TEST iirr dxwt w [0A = ....d.w.] 20 | ; i - IO/ROM access wait state 21 | ; r - RAM access wait state 22 | ; 00 - 0 cycles (default) 23 | ; 01 - 1 cycle 24 | ; 10 - 4 cycles 25 | ; 11 - 9 cycles 26 | ; d - timer disable (0: disabled | 1: not disabled) 27 | ; w - RAM/DSP write enable (0: read-only | 1: enabled) 28 | ; t - timer enable (0: enabled | 1: not enabled) 29 | ; x - Unknown. Apparently crashes the processor. 30 | TEST = $00F0 31 | 32 | ; SPC IPL BANKING AND COMMUNICATION / TIMER RESET 33 | ; CONTROL r.pq .bca w [B0 = r.pq....] 34 | ; r - controls banking at $FFC0-$FFFF (0: RAM | 1: IPL ROM) 35 | ; p - reset input ports 2 and 3 (0: no change | 1: reset) 36 | ; q - reset input ports 0 and 1 (0: no change | 1: reset) 37 | ; c - timer 2 (0: disable | 1: enable) 38 | ; b - timer 1 (0: disable | 1: enable) 39 | ; a - timer 0 (0: disable | 1: enable) 40 | ; Timers reset on transition from 0 to 1. 41 | CONTROL = $00F1 42 | 43 | ; DSP ADDRESS ACCESS 44 | ; DSPADDR aaaa aaaa rw 45 | ; a - DSP register address access 46 | DSPADDR = $00F2 47 | 48 | ; DSP DATA READ/WRITE 49 | ; DSPDATA xxxx xxxx rw 50 | ; x - DSP register data access 51 | DSPDATA = $00F3 52 | 53 | ; SNES CPU COMMUNICATION PORTS 54 | ; CPUIO0 xxxx xxxx rw [00] 55 | ; CPUIO1 xxxx xxxx rw [00] 56 | ; CPUIO2 xxxx xxxx rw [00] 57 | ; CPUIO3 xxxx xxxx rw [00] 58 | ; x - data 59 | ; Reads are data sent from the CPU on the corresponding APUIOX port 60 | ; Writes are sent to those same corresponding ports on the CPU. 61 | CPUIO0 = $00F4 62 | CPUIO1 = $00F5 63 | CPUIO2 = $00F6 64 | CPUIO3 = $00F7 65 | 66 | ; DISCONNECTED AUXILIARY PORTS 67 | ; AUXIO4 xxxx xxxx rw 68 | ; AUXIO5 xxxx xxxx rw 69 | ; x - data 70 | ; Auxiliary ports not connected anywhere. 71 | AUXIO4 = $00F8 72 | AUXIO5 = $00F9 73 | 74 | ; TIMER DIVISOR VALUE 75 | ; T0 dddd dddd w 76 | ; T1 dddd dddd w 77 | ; T2 dddd dddd w 78 | ; t - timer divisor 79 | ; Divider values for timers 0, 1, 2. 80 | ; Takes the clock source and divides by the given value. 81 | ; A value of 00 is interpreted as a divisor of $100. 82 | ; Timers 0 and 1 are 8kHz; Timer 2 is 64kHz 83 | T0 = $00FA : T0DIV = $00FA 84 | T1 = $00FB : T1DIV = $00FB 85 | T2 = $00FC : T2DIV = $00FC 86 | 87 | ; TIMER UPCOUNTER 88 | ; CN0 .... cccc r 89 | ; CN1 .... cccc r 90 | ; CN2 .... cccc r 91 | ; c - counter value 92 | ; 4 bit upcounters of the corresponding timers. 93 | ; Clears on read. 94 | CN0 = $00FD : T0OUT = $00FD 95 | CN1 = $00FE : T1OUT = $00FE 96 | CN2 = $00FF : T2OUT = $00FF 97 | 98 | ;=================================================================================================== 99 | ;=================================================================================================== 100 | ; DSP REGISTERS 101 | ;=================================================================================================== 102 | ;=================================================================================================== 103 | 104 | ; LEFT AND RIGHT CHANNEL VOLUME 105 | ; VxVOLL llll llll 106 | ; VxVOLR rrrr rrrr 107 | ; l - left volume 108 | ; r - right volume 109 | VxVOLL = $00 110 | V0VOLL = $00 111 | V1VOLL = $10 112 | V2VOLL = $20 113 | V3VOLL = $30 114 | V4VOLL = $40 115 | V5VOLL = $50 116 | V6VOLL = $60 117 | V7VOLL = $70 118 | 119 | VxVOLR = $01 120 | V0VOLR = $01 121 | V1VOLR = $11 122 | V2VOLR = $21 123 | V3VOLR = $31 124 | V4VOLR = $41 125 | V5VOLR = $51 126 | V6VOLR = $61 127 | V7VOLR = $71 128 | 129 | ; CHANNEL PITCH HEIGHT 130 | ; VxPITCHL pppp pppp 131 | ; VxPITCHH ..pp pppp 132 | ; p - pitch multiplier 133 | VxPITCHL = $02 134 | V0PITCHL = $02 135 | V1PITCHL = $12 136 | V2PITCHL = $22 137 | V3PITCHL = $32 138 | V4PITCHL = $42 139 | V5PITCHL = $52 140 | V6PITCHL = $62 141 | V7PITCHL = $72 142 | 143 | VxPITCHH = $03 144 | V0PITCHH = $03 145 | V1PITCHH = $13 146 | V2PITCHH = $23 147 | V3PITCHH = $33 148 | V4PITCHH = $43 149 | V5PITCHH = $53 150 | V6PITCHH = $63 151 | V7PITCHH = $73 152 | 153 | ; CHANNEL SAMPLE SOURCE NUMBER 154 | ; VxSRCN ssss ssss 155 | ; s - sample number 156 | ; Takes effect when the voice is keyed on or the BRR loops. 157 | VxSRCN = $04 158 | V0SRCN = $04 159 | V1SRCN = $14 160 | V2SRCN = $24 161 | V3SRCN = $34 162 | V4SRCN = $44 163 | V5SRCN = $54 164 | V6SRCN = $64 165 | V7SRCN = $74 166 | 167 | ; CHANNEL ADSR ENVELOPE CONTROL 168 | ; VxADSR1 gddd aaaa 169 | ; VxADSR2 lllr rrrr 170 | ; g - gain select (0: use VxGAIN | 1: use VxADSR) 171 | ; a - attack rate, time from 0 to 1 172 | ; 00 - 4100 ms 173 | ; 01 - 2600 ms 174 | ; 02 - 1500 ms 175 | ; 03 - 1000 ms 176 | ; 04 - 640 ms 177 | ; 05 - 380 ms 178 | ; 06 - 260 ms 179 | ; 07 - 160 ms 180 | ; 08 - 96 ms 181 | ; 09 - 64 ms 182 | ; 0A - 40 ms 183 | ; 0B - 24 ms 184 | ; 0C - 16 ms 185 | ; 0D - 10 ms 186 | ; 0E - 9 ms 187 | ; 0F - 0 ms 188 | ; d - decay rate, time from 1 to l (SL) 189 | ; 00 - 1200 ms 190 | ; 01 - 740 ms 191 | ; 02 - 440 ms 192 | ; 03 - 290 ms 193 | ; 04 - 180 ms 194 | ; 05 - 110 ms 195 | ; 06 - 74 ms 196 | ; 07 - 37 ms 197 | ; l - sustain ratio 198 | ; 00 - 1/8 199 | ; 01 - 2/8 200 | ; 02 - 3/8 201 | ; 03 - 4/8 202 | ; 04 - 5/8 203 | ; 05 - 6/8 204 | ; 06 - 7/8 205 | ; 07 - 8/8 206 | ; r - sustain, time from 0 to 1 207 | ; 00 - ∞ 208 | ; 01 - 38000 ms 209 | ; 02 - 28000 ms 210 | ; 03 - 24000 ms 211 | ; 04 - 19000 ms 212 | ; 05 - 14000 ms 213 | ; 06 - 12000 ms 214 | ; 07 - 9400 ms 215 | ; 08 - 7100 ms 216 | ; 09 - 5900 ms 217 | ; 0A - 4700 ms 218 | ; 0B - 3500 ms 219 | ; 0C - 2900 ms 220 | ; 0D - 2400 ms 221 | ; 0E - 1800 ms 222 | ; 0F - 1500 ms 223 | ; 10 - 1200 ms 224 | ; 11 - 880 ms 225 | ; 12 - 740 ms 226 | ; 13 - 590 ms 227 | ; 14 - 440 ms 228 | ; 15 - 370 ms 229 | ; 16 - 290 ms 230 | ; 17 - 220 ms 231 | ; 18 - 180 ms 232 | ; 19 - 150 ms 233 | ; 1A - 110 ms 234 | ; 1B - 92 ms 235 | ; 1C - 74 ms 236 | ; 1D - 55 ms 237 | ; 1E - 37 ms 238 | ; 1F - 18 ms 239 | VxADSR1 = $05 240 | V0ADSR1 = $05 241 | V1ADSR1 = $15 242 | V2ADSR1 = $25 243 | V3ADSR1 = $35 244 | V4ADSR1 = $45 245 | V5ADSR1 = $55 246 | V6ADSR1 = $65 247 | V7ADSR1 = $75 248 | 249 | VxADSR2 = $06 250 | V0ADSR2 = $06 251 | V1ADSR2 = $16 252 | V2ADSR2 = $26 253 | V3ADSR2 = $36 254 | V4ADSR2 = $46 255 | V5ADSR2 = $56 256 | V6ADSR2 = $66 257 | V7ADSR2 = $76 258 | 259 | ; CHANNEL GAIN PARAMETERS 260 | ; VxGAIN dppv vvvv 261 | ; d - direct designation (0: direct | 1: parameterized) 262 | ; p - designation mode when d=1 263 | ; 00 - decrease, linear (fixed subtraction of 1/64) 264 | ; 01 - decrease, exponential (fixed multiplication of 255/256) 265 | ; 10 - increase, linear (fixed addition of 1/64) 266 | ; 11 - increase, bent line (fixed addition of 1/64 for <75; 1/256 for ≥75) 267 | ; v - gain value (direct), or parameters 268 | ; -Lin (00) -Exp (01) +Lin (10) +Bent (11) 269 | ; 00 - ∞ ∞ ∞ ∞ 270 | ; 01 - 4100 ms 38000 ms 4100 ms 7200 ms 271 | ; 02 - 3100 ms 28000 ms 3100 ms 5400 ms 272 | ; 03 - 2600 ms 24000 ms 2600 ms 4600 ms 273 | ; 04 - 2000 ms 19000 ms 2000 ms 3500 ms 274 | ; 05 - 1500 ms 14000 ms 1500 ms 2600 ms 275 | ; 06 - 1300 ms 12000 ms 1300 ms 2300 ms 276 | ; 07 - 1000 ms 9400 ms 1000 ms 1800 ms 277 | ; 08 - 770 ms 7100 ms 770 ms 1300 ms 278 | ; 09 - 640 ms 5900 ms 640 ms 1100 ms 279 | ; 0A - 510 ms 4700 ms 510 ms 900 ms 280 | ; 0B - 380 ms 3500 ms 380 ms 670 ms 281 | ; 0C - 320 ms 2900 ms 320 ms 560 ms 282 | ; 0D - 260 ms 2400 ms 260 ms 450 ms 283 | ; 0E - 190 ms 1800 ms 190 ms 340 ms 284 | ; 0F - 160 ms 1500 ms 160 ms 280 ms 285 | ; 10 - 139 ms 1200 ms 139 ms 220 ms 286 | ; 11 - 96 ms 880 ms 96 ms 170 ms 287 | ; 12 - 80 ms 740 ms 80 ms 140 ms 288 | ; 13 - 64 ms 590 ms 64 ms 110 ms 289 | ; 14 - 48 ms 440 ms 48 ms 84 ms 290 | ; 15 - 40 ms 370 ms 40 ms 70 ms 291 | ; 16 - 32 ms 290 ms 32 ms 56 ms 292 | ; 17 - 24 ms 220 ms 24 ms 42 ms 293 | ; 18 - 20 ms 180 ms 20 ms 35 ms 294 | ; 19 - 16 ms 150 ms 16 ms 28 ms 295 | ; 1A - 12 ms 110 ms 12 ms 21 ms 296 | ; 1B - 10 ms 92 ms 10 ms 18 ms 297 | ; 1C - 8 ms 74 ms 8 ms 14 ms 298 | ; 1D - 6 ms 55 ms 6 ms 11 ms 299 | ; 1E - 4 ms 37 ms 4 ms 7 ms 300 | ; 1F - 2 ms 18 ms 2 ms 3.5 ms 301 | VxGAIN = $07 302 | V0GAIN = $07 303 | V1GAIN = $17 304 | V2GAIN = $27 305 | V3GAIN = $37 306 | V4GAIN = $47 307 | V5GAIN = $57 308 | V6GAIN = $67 309 | V7GAIN = $77 310 | 311 | ; CHANNEL ENVELOPE VOLUME 312 | ; VxENVX .eee eeee 313 | ; e - highest 7 bits of 11 bit envelope volume 314 | ; Technically writeable, but to no real effect. 315 | VxENVX = $08 316 | V0ENVX = $08 317 | V1ENVX = $18 318 | V2ENVX = $28 319 | V3ENVX = $38 320 | V4ENVX = $48 321 | V5ENVX = $58 322 | V6ENVX = $68 323 | V7ENVX = $78 324 | 325 | ; CHANNEL PRE-VOLUME ENVELOPE MULTIPLICATION 326 | ; VxOUTX oooo oooo 327 | ; o - upper byte of the current sample output, after envelope but before VxVOL. 328 | ; Technically writeable, but to no real effect. 329 | VxOUTX = $09 330 | V0OUTX = $09 331 | V1OUTX = $19 332 | V2OUTX = $29 333 | V3OUTX = $39 334 | V4OUTX = $49 335 | V5OUTX = $59 336 | V6OUTX = $69 337 | V7OUTX = $79 338 | 339 | ; ECHO FILTER COEFFICIENTS 340 | ; FIRn cccc cccc 341 | ; c - coefficient 342 | ; 8-tap filter coefficient for echo output. 343 | ; The value $80 should never be used 344 | ; The sum of positive values of FIR0-FIR6 should not overflow past +7F 345 | ; The sum of negative values of FIR0-FIR6 should not overflow past -7F 346 | ; Official examples: 347 | ; FF 08 17 24 24 17 08 FF - low pass on echo (apparently bugged) 348 | ; 7F 00 00 00 00 00 00 00 - same tone color 349 | FIR0 = $0F 350 | FIR1 = $1F 351 | FIR2 = $2F 352 | FIR3 = $3F 353 | FIR4 = $4F 354 | FIR5 = $5F 355 | FIR6 = $6F 356 | FIR7 = $7F 357 | 358 | ;--------------------------------------------------------------------------------------------------- 359 | 360 | ; LEFT AND RIGHT MAIN VOLUME 361 | ; MVOLL llll llll 362 | ; MVOLR rrrr rrrr 363 | ; l - left volume 364 | ; r - right volume 365 | ; Negative values invert the phase of the sample output. 366 | ; The value $80 causes a multiplication overflow. 367 | MVOLL = $0C 368 | MVOLR = $1C 369 | 370 | ; LEFT AND RIGHT ECHO VOLUME 371 | ; EVOLL llll llll 372 | ; EVOLR rrrr rrrr 373 | ; l - left volume 374 | ; r - right volume 375 | EVOLL = $2C 376 | EVOLR = $3C 377 | 378 | ; ECHO FEEDBACK 379 | ; $0D rw 380 | ; Echo feedback level. Signed 8-bit value. 381 | EFB = $0D 382 | 383 | ; CHANNEL KEY ON AND KEY OFF DESIGNATION 384 | ; KON hgfe dcba 385 | ; KOFF hgfe dcba 386 | ; a - Key on/off channel 0 387 | ; b - Key on/off channel 1 388 | ; c - Key on/off channel 2 389 | ; d - Key on/off channel 3 390 | ; e - Key on/off channel 4 391 | ; f - Key on/off channel 5 392 | ; g - Key on/off channel 6 393 | ; h - Key on/off channel 7 394 | ; 62.5μs should be allowed after writing KON before writing KOFF 395 | KON = $4C 396 | KOFF = $5C 397 | 398 | ; CHANNEL PITCH MODULATION DESIGNATION 399 | ; $2D rw 400 | ; PMON hgfe dcb. 401 | ; b - Enable on channel 1 402 | ; c - Enable on channel 2 403 | ; d - Enable on channel 3 404 | ; e - Enable on channel 4 405 | ; f - Enable on channel 5 406 | ; g - Enable on channel 6 407 | ; h - Enable on channel 7 408 | ; Produces a modulated frequency sweep on channel N from channel N-1. 409 | PMON = $2D 410 | 411 | ; CHANNEL NOISE SOURCE USE DESIGNATION 412 | ; NON hgfe dcba 413 | ; a - Noise enable on channel 0 414 | ; b - Noise enable on channel 1 415 | ; c - Noise enable on channel 2 416 | ; d - Noise enable on channel 3 417 | ; e - Noise enable on channel 4 418 | ; f - Noise enable on channel 5 419 | ; g - Noise enable on channel 6 420 | ; h - Noise enable on channel 7 421 | ; Channel output corresponds to the global noise clock instead of the SRCN. 422 | ; SRCN is still used for looping / stopping. 423 | NON = $3D 424 | 425 | ; CHANNEL ECHO DESIGNATION 426 | ; EON hgfe dcba 427 | ; a - Echo enable on channel 0 428 | ; b - Echo enable on channel 1 429 | ; c - Echo enable on channel 2 430 | ; d - Echo enable on channel 3 431 | ; e - Echo enable on channel 4 432 | ; f - Echo enable on channel 5 433 | ; g - Echo enable on channel 6 434 | ; h - Echo enable on channel 7 435 | EON = $4D 436 | 437 | ; RESET, MUTE, ECHO CONTROL, AND NOISE CLOCK 438 | ; FLG rmen nnnn 439 | ; r - reset, pauses key on and mutes every channel 440 | ; m - mute, mutes every channel 441 | ; e - allow writes to echo buffer (0: enabled | 1: disabled) 442 | ; n - noise frequency clock 443 | ; 00 - 0 Hz 444 | ; 01 - 16 Hz 445 | ; 02 - 21 Hz 446 | ; 03 - 25 Hz 447 | ; 04 - 31 Hz 448 | ; 05 - 42 Hz 449 | ; 06 - 50 Hz 450 | ; 07 - 63 Hz 451 | ; 08 - 83 Hz 452 | ; 09 - 100 Hz 453 | ; 0A - 125 Hz 454 | ; 0B - 167 Hz 455 | ; 0C - 200 Hz 456 | ; 0D - 250 Hz 457 | ; 0E - 333 Hz 458 | ; 0F - 400 Hz 459 | ; 10 - 500 Hz 460 | ; 11 - 667 Hz 461 | ; 12 - 800 Hz 462 | ; 13 - 1000 Hz 463 | ; 14 - 1300 Hz 464 | ; 15 - 1600 Hz 465 | ; 16 - 2000 Hz 466 | ; 17 - 2700 Hz 467 | ; 18 - 3200 Hz 468 | ; 19 - 4000 Hz 469 | ; 1A - 5300 Hz 470 | ; 1B - 6400 Hz 471 | ; 1C - 8000 Hz 472 | ; 1D - 10700 Hz 473 | ; 1E - 16000 Hz 474 | ; 1F - 32000 Hz 475 | FLG = $6C 476 | 477 | ; CHANNEL SOURCE BLOCK END FLAG 478 | ; ENDX hgfe dcba 479 | ; a - Source end on channel 0 480 | ; b - Source end on channel 1 481 | ; c - Source end on channel 2 482 | ; d - Source end on channel 3 483 | ; e - Source end on channel 4 484 | ; f - Source end on channel 5 485 | ; g - Source end on channel 6 486 | ; h - Source end on channel 7 487 | ; Flags BRR decode of blocks with source end code. 488 | ; Writing to this register resets all voices. 489 | ENDX = $7C 490 | 491 | ; SAMPLE SOURCE DIRECTORY PAGE 492 | ; DIR hhhh hhhh 493 | ; h - high byte of SRCN directory start $hh00 494 | DIR = $5D 495 | 496 | ; ECHO BUFFER START ADDRESS PAGE 497 | ; ESA hhhh hhhh 498 | ; h - high byte of echo buffer start $hh00 499 | ESA = $6D 500 | 501 | ; ECHO DELAY 502 | ; EDL .... dddd 503 | ; d - delay time; buffer size is $0800 * d 504 | EDL = $7D 505 | 506 | ;=================================================================================================== 507 | -------------------------------------------------------------------------------- /symbols_apu.asm: -------------------------------------------------------------------------------- 1 | ;=================================================================================================== 2 | ; Symbols for the audio processing unit 3 | ;=================================================================================================== 4 | 5 | ; Input values from APU ports 6 | ISONG = $0000 7 | ISFX1 = $0001 8 | ISFX2 = $0002 9 | ISFX3 = $0003 10 | 11 | ; Currently playing song and sfx 12 | ; Sent back to SNES CPU over I/O 13 | CSONG = $0004 14 | CSFX1 = $0005 15 | CSFX2 = $0006 16 | CSFX3 = $0007 17 | 18 | ; Redundancy check for sound handling 19 | RSONG = $0008 20 | RSFX1 = $0009 21 | RSFX2 = $000A 22 | RSFX3 = $000B 23 | 24 | ; Provides a short delay when changing songs 25 | DELAY = $000C 26 | 27 | ; FREE RAM: 0x01 28 | UNUSED_0D = $000D 29 | 30 | ; Always expected to hold the value 0x0000 31 | ; Used to give YA a value of 0x0000 32 | ; Also used to un-key off every channel each loop 33 | ZEROL = $000E 34 | ZEROH = $000F 35 | 36 | ; Scrap space 37 | SCRAP10 = $0010 38 | SCRAP11 = $0011 39 | SCRAP12 = $0012 40 | 41 | ; Flags pitch changes via commands 42 | ; p... .... 43 | ; p - Run change 44 | DOPCH = $0013 45 | 46 | ; More scrap space 47 | SCRAP14 = $0014 48 | SCRAP15 = $0015 49 | SCRAP16 = $0016 50 | SCRAP17 = $0017 51 | 52 | ; Manipulated every loop, but to seemingly no effect 53 | JUNK18 = $0018 54 | JUNK19 = $0019 55 | 56 | ; Flags channels currently in use by sound effects 57 | SFXUSE = $001A 58 | 59 | ; Disables all music 60 | MUTED = $001B 61 | 62 | ; FREE RAM: 0x04 63 | UNUSED_1C = $001C 64 | UNUSED_1D = $001D 65 | UNUSED_1E = $001E 66 | UNUSED_1F = $001F 67 | 68 | ; Indicates pan of current SFX 69 | ; lr.. .... 70 | ; l - pan left 71 | ; r - pan right 72 | ; left takes priority 73 | SFXPAN = $0020 74 | 75 | ; FREE RAM: 0x0B 76 | UNUSED_21 = $0021 77 | UNUSED_22 = $0022 78 | UNUSED_23 = $0023 79 | UNUSED_24 = $0024 80 | UNUSED_25 = $0025 81 | UNUSED_26 = $0026 82 | UNUSED_27 = $0027 83 | UNUSED_28 = $0028 84 | UNUSED_29 = $0029 85 | UNUSED_2A = $002A 86 | UNUSED_2B = $002B 87 | 88 | ; SFX data pointer 89 | SFXPTR = $002C 90 | SFXPTRH = $002D 91 | 92 | ; FREE RAM: 0x02 93 | UNUSED_2E = $002E 94 | UNUSED_2F = $002F 95 | 96 | ; Track pointers for each channel 97 | T0PTR = $0030 98 | T0PTRH = $0031 99 | T1PTR = $0032 100 | T1PTRH = $0033 101 | T2PTR = $0034 102 | T2PTRH = $0035 103 | T3PTR = $0036 104 | T3PTRH = $0037 105 | T4PTR = $0038 106 | T4PTRH = $0039 107 | T5PTR = $003A 108 | T5PTRH = $003B 109 | T6PTR = $003C 110 | T6PTRH = $003D 111 | T7PTR = $003E 112 | T7PTRH = $003F 113 | 114 | ; Pointer to current song's segments 115 | SEGPTR = $0040 116 | SEGPTRH = $0041 117 | 118 | ; Used to build up segment pointers during new songs 119 | SEGLOOP = $0042 120 | 121 | ; Accumulates timer 0 loops to keep steady timing 122 | TACCUM = $0043 123 | 124 | ; Saves channel offset index when the X register is required 125 | CHOFF = $0044 126 | 127 | ; Key on/off queues 128 | KONQ = $0045 129 | KOFQ = $0046 130 | 131 | ; Current channel bit for bitfield writes 132 | CBIT = $0047 133 | 134 | ; More DSP queues 135 | FLGQ = $0048 136 | NONQ = $0049 137 | EONQ = $004A 138 | PMONQ = $004B 139 | 140 | ; Echo register cache and queues 141 | EDLC = $004C 142 | EDLQ = $004D 143 | EFBQ = $004E 144 | 145 | ; FREE RAM: 0x01 146 | UNUSED_4F = $004F 147 | 148 | ; Global transposition 149 | GTRANS = $0050 150 | 151 | ; Accumulator for clock passes 152 | MACCUM = $0051 153 | 154 | ; Song tempo 155 | TEMPOL = $0052 156 | TEMPO = $0053 157 | 158 | ; Tempo sweep duration 159 | TEMPOTM = $0054 160 | 161 | ; Target tempo for sweep 162 | TEMPOTG = $0055 163 | 164 | ; Tempo slide sweep amount 165 | TEMPOVL = $0056 166 | TEMPOVH = $0057 167 | 168 | ; Global volume 169 | GVOLL = $0058 170 | GVOL = $0059 171 | 172 | ; Global volume slide timer 173 | GVOLTM = $005A 174 | 175 | ; Global volume slide target 176 | GVOLTG = $005B 177 | 178 | ; Global volume slide increment per loop 179 | GVOLIL = $005C 180 | GVOLIH = $005D 181 | 182 | ; Flags channels for pitch slide 183 | SLIDE = $005E 184 | 185 | ; Base SRCN for percussion commands 186 | DRUM0 = $005F 187 | 188 | ; Echo volume queues 189 | EVOLLQL = $0060 190 | EVOLLQH = $0061 191 | EVOLRQL = $0062 192 | EVOLRQH = $0063 193 | 194 | ; Echo volume panning steps 195 | EPANLL = $0064 196 | EPANLH = $0065 197 | EPANRL = $0066 198 | EPANRH = $0067 199 | 200 | ; Echo pan timer 201 | EPANTM = $0068 202 | 203 | ; Echo pan target values 204 | EPANLTG = $0069 205 | EPANRTG = $006A 206 | 207 | ; FREE RAM: 0x05 208 | UNSUED_6B = $006B 209 | UNSUED_6C = $006C 210 | UNSUED_6D = $006D 211 | UNSUED_6E = $006E 212 | UNSUED_6F = $006F 213 | 214 | ; Countdown for next note playing and for continuing sustained commands 215 | T0DUR = $0070 216 | T0CMDTM = $0071 217 | T1DUR = $0072 218 | T1CMDTM = $0073 219 | T2DUR = $0074 220 | T2CMDTM = $0075 221 | T3DUR = $0076 222 | T3CMDTM = $0077 223 | T4DUR = $0078 224 | T4CMDTM = $0079 225 | T5DUR = $007A 226 | T5CMDTM = $007B 227 | T6DUR = $007C 228 | T6CMDTM = $007D 229 | T7DUR = $007E 230 | T7CMDTM = $007F 231 | 232 | ; Channel part loop counters 233 | ; High byte unused 234 | T0PARTX = $0080 235 | T0U80 = $0081 236 | T1PARTX = $0082 237 | T1U80 = $0083 238 | T2PARTX = $0084 239 | T2U80 = $0085 240 | T3PARTX = $0086 241 | T3U80 = $0087 242 | T4PARTX = $0088 243 | T4U80 = $0089 244 | T5PARTX = $008A 245 | T5U80 = $008B 246 | T6PARTX = $008C 247 | T6U80 = $008D 248 | T7PARTX = $008E 249 | T7U80 = $008F 250 | 251 | ; Channel volume slide and pan slide timers 252 | T0VOLTM = $0090 253 | T0PANTM = $0091 254 | T1VOLTM = $0092 255 | T1PANTM = $0093 256 | T2VOLTM = $0094 257 | T2PANTM = $0095 258 | T3VOLTM = $0096 259 | T3PANTM = $0097 260 | T4VOLTM = $0098 261 | T4PANTM = $0099 262 | T5VOLTM = $009A 263 | T5PANTM = $009B 264 | T6VOLTM = $009C 265 | T6PANTM = $009D 266 | T7VOLTM = $009E 267 | T7PANTM = $009F 268 | 269 | ; Channel pitch slide timer and delay for operation 270 | T0GLSTM = $00A0 271 | T0GLSWT = $00A1 272 | T1GLSTM = $00A2 273 | T1GLSWT = $00A3 274 | T2GLSTM = $00A4 275 | T2GLSWT = $00A5 276 | T3GLSTM = $00A6 277 | T3GLSWT = $00A7 278 | T4GLSTM = $00A8 279 | T4GLSWT = $00A9 280 | T5GLSTM = $00AA 281 | T5GLSWT = $00AB 282 | T6GLSTM = $00AC 283 | T6GLSWT = $00AD 284 | T7GLSTM = $00AE 285 | T7GLSWT = $00AF 286 | 287 | ; Channel vibrato strength and max intensity 288 | T0VBRS = $00B0 289 | T0VBRI = $00B1 290 | T1VBRS = $00B2 291 | T1VBRI = $00B3 292 | T2VBRS = $00B4 293 | T2VBRI = $00B5 294 | T3VBRS = $00B6 295 | T3VBRI = $00B7 296 | T4VBRS = $00B8 297 | T4VBRI = $00B9 298 | T5VBRS = $00BA 299 | T5VBRI = $00BB 300 | T6VBRS = $00BC 301 | T6VBRI = $00BD 302 | T7VBRS = $00BE 303 | T7VBRI = $00BF 304 | 305 | ; Channel tremolo timer and intensity 306 | T0TRMTM = $00C0 307 | T0TREMI = $00C1 308 | T1TRMTM = $00C2 309 | T1TREMI = $00C3 310 | T2TRMTM = $00C4 311 | T2TREMI = $00C5 312 | T3TRMTM = $00C6 313 | T3TREMI = $00C7 314 | T4TRMTM = $00C8 315 | T4TREMI = $00C9 316 | T5TRMTM = $00CA 317 | T5TREMI = $00CB 318 | T6TRMTM = $00CC 319 | T6TREMI = $00CD 320 | T7TRMTM = $00CE 321 | T7TREMI = $00CF 322 | 323 | ; FREE RAM: 0x20 324 | UNSUED_D0 = $00D0 325 | 326 | ;=================================================================================================== 327 | ; SPC hardware registers at $F0..$FF 328 | ; See «registers_spc.asm» 329 | ;=================================================================================================== 330 | 331 | ; Vibrato counter and unused variable 332 | T0VBRCT = $0100 333 | T0U101 = $0101 334 | T1VBRCT = $0102 335 | T1U101 = $0103 336 | T2VBRCT = $0104 337 | T2U101 = $0105 338 | T3VBRCT = $0106 339 | T3U101 = $0107 340 | T4VBRCT = $0108 341 | T4U101 = $0109 342 | T5VBRCT = $010A 343 | T5U101 = $010B 344 | T6VBRCT = $010C 345 | T6U101 = $010D 346 | T7VBRCT = $010E 347 | T7U101 = $010F 348 | 349 | ;=================================================================================================== 350 | ; SPC700 stack 351 | ; Starts here, for whatever reason 352 | ;=================================================================================================== 353 | APUSTACK = $01CF 354 | IPLSTACK = $01FF 355 | 356 | ;=================================================================================================== 357 | 358 | ; Note duration reset value and release duration 359 | T0DUR0 = $0200 360 | T0STACC = $0201 361 | T1DUR0 = $0202 362 | T1STACC = $0203 363 | T2DUR0 = $0204 364 | T2STACC = $0205 365 | T3DUR0 = $0206 366 | T3STACC = $0207 367 | T4DUR0 = $0208 368 | T4STACC = $0209 369 | T5DUR0 = $020A 370 | T5STACC = $020B 371 | T6DUR0 = $020C 372 | T6STACC = $020D 373 | T7DUR0 = $020E 374 | T7STACC = $020F 375 | 376 | ; Note attack and instrument ID 377 | T0ATCK = $0210 378 | T0INSTR = $0211 379 | T1ATCK = $0212 380 | T1INSTR = $0213 381 | T2ATCK = $0214 382 | T2INSTR = $0215 383 | T3ATCK = $0216 384 | T3INSTR = $0217 385 | T4ATCK = $0218 386 | T4INSTR = $0219 387 | T5ATCK = $021A 388 | T5INSTR = $021B 389 | T6ATCK = $021C 390 | T6INSTR = $021D 391 | T7ATCK = $021E 392 | T7INSTR = $021F 393 | 394 | ; Instrument high-level tuning multiplier 395 | T0MULTL = $0220 396 | T0MULTH = $0221 397 | T1MULTL = $0222 398 | T1MULTH = $0223 399 | T2MULTL = $0224 400 | T2MULTH = $0225 401 | T3MULTL = $0226 402 | T3MULTH = $0227 403 | T4MULTL = $0228 404 | T4MULTH = $0229 405 | T5MULTL = $022A 406 | T5MULTH = $022B 407 | T6MULTL = $022C 408 | T6MULTH = $022D 409 | T7MULTL = $022E 410 | T7MULTH = $022F 411 | 412 | ; Return address for part calling 413 | T0PRETL = $0230 414 | T0PRETH = $0231 415 | T1PRETL = $0232 416 | T1PRETH = $0233 417 | T2PRETL = $0234 418 | T2PRETH = $0235 419 | T3PRETL = $0236 420 | T3PRETH = $0237 421 | T4PRETL = $0238 422 | T4PRETH = $0239 423 | T5PRETL = $023A 424 | T5PRETH = $023B 425 | T6PRETL = $023C 426 | T6PRETH = $023D 427 | T7PRETL = $023E 428 | T7PRETH = $023F 429 | 430 | ; Subroutine address for part calls 431 | T0PADDL = $0240 432 | T0PADDH = $0241 433 | T1PADDL = $0242 434 | T1PADDH = $0243 435 | T2PADDL = $0244 436 | T2PADDH = $0245 437 | T3PADDL = $0246 438 | T3PADDH = $0247 439 | T4PADDL = $0248 440 | T4PADDH = $0249 441 | T5PADDL = $024A 442 | T5PADDH = $024B 443 | T6PADDL = $024C 444 | T6PADDH = $024D 445 | T7PADDL = $024E 446 | T7PADDH = $024F 447 | 448 | ; FREE RAM: 0x30 449 | UNUSED_0250 = $0250 450 | 451 | ;--------------------------------------------------------------------------------------------------- 452 | 453 | ; Channel pitch slide timer and delay, before written to GLSTM and GLSWT 454 | T0SLDTM = $0280 455 | T0SLDWT = $0281 456 | T1SLDTM = $0282 457 | T1SLDWT = $0283 458 | T2SLDTM = $0284 459 | T2SLDWT = $0285 460 | T3SLDTM = $0286 461 | T3SLDWT = $0287 462 | T4SLDTM = $0288 463 | T4SLDWT = $0289 464 | T5SLDTM = $028A 465 | T5SLDWT = $028B 466 | T6SLDTM = $028C 467 | T6SLDWT = $028D 468 | T7SLDTM = $028E 469 | T7SLDWT = $028F 470 | 471 | ; SLDTP - slide type (0: from | 1: to) 472 | ; SLDTG - slide target 473 | T0SLDTP = $0290 474 | T0SLDTG = $0291 475 | T1SLDTP = $0292 476 | T1SLDTG = $0293 477 | T2SLDTP = $0294 478 | T2SLDTG = $0295 479 | T3SLDTP = $0296 480 | T3SLDTG = $0297 481 | T4SLDTP = $0298 482 | T4SLDTG = $0299 483 | T5SLDTP = $029A 484 | T5SLDTG = $029B 485 | T6SLDTP = $029C 486 | T6SLDTG = $029D 487 | T7SLDTP = $029E 488 | T7SLDTG = $029F 489 | 490 | ; Vibrato accumulator and rate 491 | T0VBRC = $02A0 492 | T0VBRV = $02A1 493 | T1VBRC = $02A2 494 | T1VBRV = $02A3 495 | T2VBRC = $02A4 496 | T2VBRV = $02A5 497 | T3VBRC = $02A6 498 | T3VBRV = $02A7 499 | T4VBRC = $02A8 500 | T4VBRV = $02A9 501 | T5VBRC = $02AA 502 | T5VBRV = $02AB 503 | T6VBRC = $02AC 504 | T6VBRV = $02AD 505 | T7VBRC = $02AE 506 | T7VBRV = $02AF 507 | 508 | ; Vibrato delay and gradient wait 509 | T0VBRWT = $02B0 510 | T0VBRGD = $02B1 511 | T1VBRWT = $02B2 512 | T1VBRGD = $02B3 513 | T2VBRWT = $02B4 514 | T2VBRGD = $02B5 515 | T3VBRWT = $02B6 516 | T3VBRGD = $02B7 517 | T4VBRWT = $02B8 518 | T4VBRGD = $02B9 519 | T5VBRWT = $02BA 520 | T5VBRGD = $02BB 521 | T6VBRWT = $02BC 522 | T6VBRGD = $02BD 523 | T7VBRWT = $02BE 524 | T7VBRGD = $02BF 525 | 526 | ; Vibrato step and max intensity 527 | T0VBRST = $02C0 528 | T0VBRMX = $02C1 529 | T1VBRST = $02C2 530 | T1VBRMX = $02C3 531 | T2VBRST = $02C4 532 | T2VBRMX = $02C5 533 | T3VBRST = $02C6 534 | T3VBRMX = $02C7 535 | T4VBRST = $02C8 536 | T4VBRMX = $02C9 537 | T5VBRST = $02CA 538 | T5VBRMX = $02CB 539 | T6VBRST = $02CC 540 | T6VBRMX = $02CD 541 | T7VBRST = $02CE 542 | T7VBRMX = $02CF 543 | 544 | ; Tremolo accumulator and rate 545 | T0TREMC = $02D0 546 | T0TREMV = $02D1 547 | T1TREMC = $02D2 548 | T1TREMV = $02D3 549 | T2TREMC = $02D4 550 | T2TREMV = $02D5 551 | T3TREMC = $02D6 552 | T3TREMV = $02D7 553 | T4TREMC = $02D8 554 | T4TREMV = $02D9 555 | T5TREMC = $02DA 556 | T5TREMV = $02DB 557 | T6TREMC = $02DC 558 | T6TREMV = $02DD 559 | T7TREMC = $02DE 560 | T7TREMV = $02DF 561 | 562 | ; Tremolo delay and unused variable 563 | T0TREMD = $02E0 564 | T0U2E1 = $02E1 565 | T1TREMD = $02E2 566 | T1U2E1 = $02E3 567 | T2TREMD = $02E4 568 | T2U2E1 = $02E5 569 | T3TREMD = $02E6 570 | T3U2E1 = $02E7 571 | T4TREMD = $02E8 572 | T4U2E1 = $02E9 573 | T5TREMD = $02EA 574 | T5U2E1 = $02EB 575 | T6TREMD = $02EC 576 | T6U2E1 = $02ED 577 | T7TREMD = $02EE 578 | T7U2E1 = $02EF 579 | 580 | ; Channel transposition and unused variable 581 | T0TRAN = $02F0 582 | T0U2F1 = $02F1 583 | T1TRAN = $02F2 584 | T1U2F1 = $02F3 585 | T2TRAN = $02F4 586 | T2U2F1 = $02F5 587 | T3TRAN = $02F6 588 | T3U2F1 = $02F7 589 | T4TRAN = $02F8 590 | T4U2F1 = $02F9 591 | T5TRAN = $02FA 592 | T5U2F1 = $02FB 593 | T6TRAN = $02FC 594 | T6U2F1 = $02FD 595 | T7TRAN = $02FE 596 | T7U2F1 = $02FF 597 | 598 | ;--------------------------------------------------------------------------------------------------- 599 | 600 | ; Channel volume 601 | T0VOLL = $0300 602 | T0VOLH = $0301 603 | T1VOLL = $0302 604 | T1VOLH = $0303 605 | T2VOLL = $0304 606 | T2VOLH = $0305 607 | T3VOLL = $0306 608 | T3VOLH = $0307 609 | T4VOLL = $0308 610 | T4VOLH = $0309 611 | T5VOLL = $030A 612 | T5VOLH = $030B 613 | T6VOLL = $030C 614 | T6VOLH = $030D 615 | T7VOLL = $030E 616 | T7VOLH = $030F 617 | 618 | ; Volume sweep amount 619 | T0VOLVL = $0310 620 | T0VOLVH = $0311 621 | T1VOLVL = $0312 622 | T1VOLVH = $0313 623 | T2VOLVL = $0314 624 | T2VOLVH = $0315 625 | T3VOLVL = $0316 626 | T3VOLVH = $0317 627 | T4VOLVL = $0318 628 | T4VOLVH = $0319 629 | T5VOLVL = $031A 630 | T5VOLVH = $031B 631 | T6VOLVL = $031C 632 | T6VOLVH = $031D 633 | T7VOLVL = $031E 634 | T7VOLVH = $031F 635 | 636 | ; Target volume for sweeps and finalized volume of channel 637 | T0VOLTG = $0320 638 | T0VOLF = $0321 639 | T1VOLTG = $0322 640 | T1VOLF = $0323 641 | T2VOLTG = $0324 642 | T2VOLF = $0325 643 | T3VOLTG = $0326 644 | T3VOLF = $0327 645 | T4VOLTG = $0328 646 | T4VOLF = $0329 647 | T5VOLTG = $032A 648 | T5VOLF = $032B 649 | T6VOLTG = $032C 650 | T6VOLF = $032D 651 | T7VOLTG = $032E 652 | T7VOLF = $032F 653 | 654 | ; Panning 655 | ; high byte is TxPANS AND 0x1F 656 | T0PANL = $0330 657 | T0PAN = $0331 658 | T1PANL = $0332 659 | T1PAN = $0333 660 | T2PANL = $0334 661 | T2PAN = $0335 662 | T3PANL = $0336 663 | T3PAN = $0337 664 | T4PANL = $0338 665 | T4PAN = $0339 666 | T5PANL = $033A 667 | T5PAN = $033B 668 | T6PANL = $033C 669 | T6PAN = $033D 670 | T7PANL = $033E 671 | T7PAN = $033F 672 | 673 | ; Pan sweep values 674 | T0PANVL = $0340 675 | T0PANVH = $0341 676 | T1PANVL = $0342 677 | T1PANVH = $0343 678 | T2PANVL = $0344 679 | T2PANVH = $0345 680 | T3PANVL = $0346 681 | T3PANVH = $0347 682 | T4PANVL = $0348 683 | T4PANVH = $0349 684 | T5PANVL = $034A 685 | T5PANVH = $034B 686 | T6PANVL = $034C 687 | T6PANVH = $034D 688 | T7PANVL = $034E 689 | T7PANVH = $034F 690 | 691 | ; Target pan sweep value and raw settings value 692 | T0PANTG = $0350 693 | T0PANS = $0351 694 | T1PANTG = $0352 695 | T1PANS = $0353 696 | T2PANTG = $0354 697 | T2PANS = $0355 698 | T3PANTG = $0356 699 | T3PANS = $0357 700 | T4PANTG = $0358 701 | T4PANS = $0359 702 | T5PANTG = $035A 703 | T5PANS = $035B 704 | T6PANTG = $035C 705 | T6PANS = $035D 706 | T7PANTG = $035E 707 | T7PANS = $035F 708 | 709 | ; Pitch calculation 710 | T0PCLCL = $0360 711 | T0PCLCH = $0361 712 | T1PCLCL = $0362 713 | T1PCLCH = $0363 714 | T2PCLCL = $0364 715 | T2PCLCH = $0365 716 | T3PCLCL = $0366 717 | T3PCLCH = $0367 718 | T4PCLCL = $0368 719 | T4PCLCH = $0369 720 | T5PCLCL = $036A 721 | T5PCLCH = $036B 722 | T6PCLCL = $036C 723 | T6PCLCH = $036D 724 | T7PCLCL = $036E 725 | T7PCLCH = $036F 726 | 727 | ; Multiframe pitch adjustment 728 | T0MPADDL = $0370 729 | T0MPADDH = $0371 730 | T1MPADDL = $0372 731 | T1MPADDH = $0373 732 | T2MPADDL = $0374 733 | T2MPADDH = $0375 734 | T3MPADDL = $0376 735 | T3MPADDH = $0377 736 | T4MPADDL = $0378 737 | T4MPADDH = $0379 738 | T5MPADDL = $037A 739 | T5MPADDH = $037B 740 | T6MPADDL = $037C 741 | T6MPADDH = $037D 742 | T7MPADDL = $037E 743 | T7MPADDH = $037F 744 | 745 | ; Channel note for calculations and tuning 746 | T0NCALC = $0380 747 | T0TUNE = $0381 748 | T1NCALC = $0382 749 | T1TUNE = $0383 750 | T2NCALC = $0384 751 | T2TUNE = $0385 752 | T3NCALC = $0386 753 | T3TUNE = $0387 754 | T4NCALC = $0388 755 | T4TUNE = $0389 756 | T5NCALC = $038A 757 | T5TUNE = $038B 758 | T6NCALC = $038C 759 | T6TUNE = $038D 760 | T7NCALC = $038E 761 | T7TUNE = $038F 762 | 763 | ; Channel pointers for SFX 764 | T0SFXPTL = $0390 765 | T0SFXPTH = $0391 766 | T1SFXPTL = $0392 767 | T1SFXPTH = $0393 768 | T2SFXPTL = $0394 769 | T2SFXPTH = $0395 770 | T3SFXPTL = $0396 771 | T3SFXPTH = $0397 772 | T4SFXPTL = $0398 773 | T4SFXPTH = $0399 774 | T5SFXPTL = $039A 775 | T5SFXPTH = $039B 776 | T6SFXPTL = $039C 777 | T6SFXPTH = $039D 778 | T7SFXPTL = $039E 779 | T7SFXPTH = $039F 780 | 781 | ; SFX ID playing on channel and delay 782 | T0SFXID = $03A0 783 | T0SFXWT = $03A1 784 | T1SFXID = $03A2 785 | T1SFXWT = $03A3 786 | T2SFXID = $03A4 787 | T2SFXWT = $03A5 788 | T3SFXID = $03A6 789 | T3SFXWT = $03A7 790 | T4SFXID = $03A8 791 | T4SFXWT = $03A9 792 | T5SFXID = $03AA 793 | T5SFXWT = $03AB 794 | T6SFXID = $03AC 795 | T6SFXWT = $03AD 796 | T7SFXID = $03AE 797 | T7SFXWT = $03AF 798 | 799 | ; SFX note countdown and duration 800 | T0SFXTM = $03B0 801 | T0SFXDUR = $03B1 802 | T1SFXTM = $03B2 803 | T1SFXDUR = $03B3 804 | T2SFXTM = $03B4 805 | T2SFXDUR = $03B5 806 | T3SFXTM = $03B6 807 | T3SFXDUR = $03B7 808 | T4SFXTM = $03B8 809 | T4SFXDUR = $03B9 810 | T5SFXTM = $03BA 811 | T5SFXDUR = $03BB 812 | T6SFXTM = $03BC 813 | T6SFXDUR = $03BD 814 | T7SFXTM = $03BE 815 | T7SFXDUR = $03BF 816 | 817 | ;--------------------------------------------------------------------------------------------------- 818 | 819 | ; SFX channel pointer in use 820 | SFXOFF = $03C0 821 | 822 | ; SFX channel bit for bitfields 823 | SFXBIT = $03C1 824 | 825 | ; Contains channel<<3 for easier calculation 826 | BITASL3 = $03C2 827 | 828 | ; Music channels flagged for echo enable 829 | EONM = $03C3 830 | 831 | ; Only referenced in an unused function, but it appears to relate to SFXOFF and SFXBIT 832 | SFXOFFRT = $03C4 833 | SFXBITRT = $03C5 834 | 835 | ; FREE RAM: 0x01 836 | UNUSED_03C6 = $03C6 837 | 838 | ; Used as a flip flop for toggling incrementing of EDLC 839 | ECHOFLIP = $03C7 840 | 841 | ; copies SFXOFF and SFXBIT, but never used 842 | SFXOFF2 = $03C8 843 | SFXBIT2 = $03C9 844 | 845 | ; Music fade out timer 846 | SONGFADE = $03CA 847 | 848 | ; Channel bits for SFX2, playing and operating 849 | SFX2BIT = $03CB 850 | SFX2FIND = $03CC 851 | 852 | ; Channel bits for SFX3, playing and operating 853 | SFX3BIT = $03CD 854 | SFX3FIND = $03CE 855 | 856 | ; Channel bits for SFX1 857 | SFX1BIT = $03CF 858 | 859 | ; SFX channel pan values and unused variable 860 | T0SFXPAN = $03D0 861 | T0U3D1 = $03D1 862 | T1SFXPAN = $03D2 863 | T1U3D1 = $03D3 864 | T2SFXPAN = $03D4 865 | T2U3D1 = $03D5 866 | T3SFXPAN = $03D6 867 | T3U3D1 = $03D7 868 | T4SFXPAN = $03D8 869 | T4U3D1 = $03D9 870 | T5SFXPAN = $03DA 871 | T5U3D1 = $03DB 872 | T6SFXPAN = $03DC 873 | T6U3D1 = $03DD 874 | T7SFXPAN = $03DE 875 | T7U3D1 = $03DF 876 | 877 | ; Used to find SFX1 channel 878 | SFX1FIND = $03E0 879 | 880 | ; Caches song volume between half and max volume commsnds 881 | SONGOVOL = $03E1 882 | 883 | ; Holds value from echo table for SFX 884 | SFXECHOV = $03E2 885 | 886 | ; Bitfield for SFX echos 887 | SFXECHOS = $03E3 888 | 889 | ; SFX1 fade timer and volume 890 | SFX1FADE = $03E4 891 | SFX1FDVOL = $03E5 892 | 893 | ; FREE RAM: 0x19 894 | UNUSED_03E6 = $03E6 895 | 896 | ; Appears to mute channels via an unreachable command 897 | T0STOP = $03FF 898 | T0U400 = $0400 899 | T1STOP = $0401 900 | T1U400 = $0402 901 | T2STOP = $0403 902 | T2U400 = $0404 903 | T3STOP = $0405 904 | T3U400 = $0406 905 | T4STOP = $0407 906 | T4U400 = $0408 907 | T5STOP = $0409 908 | T5U400 = $040A 909 | T6STOP = $040B 910 | T6U400 = $040C 911 | T7STOP = $040D 912 | T7U400 = $040E 913 | 914 | ;=================================================================================================== 915 | -------------------------------------------------------------------------------- /values.asm: -------------------------------------------------------------------------------- 1 | ;=================================================================================================== 2 | ; Followers 3 | ;=================================================================================================== 4 | ; 00 - No follower 5 | ; 01 - Zelda 6 | ; 02 - Old man that stops following you 7 | ; 03 - Unused old man 8 | ; 04 - Normal old man 9 | ; 05 - Zelda rescue telepathy 10 | ; 06 - Blind maiden 11 | ; 07 - Frogsmith 12 | ; 08 - Smithy 13 | ; 09 - Locksmith 14 | ; 0A - Kiki 15 | ; 0B - Unused old man 16 | ; 0C - Purple chest 17 | ; 0D - Super bomb 18 | ; 0E - Master Sword telepathy 19 | 20 | ;=================================================================================================== 21 | ; Dungeon IDs 22 | ;=================================================================================================== 23 | ; 00 - Sewers 24 | ; 02 - Hyrule Castle 25 | ; 04 - Eastern Palace 26 | ; 06 - Desert Palace 27 | ; 08 - Agahnim's Tower 28 | ; 0A - Swamp Palace 29 | ; 0C - Palace of Darkness 30 | ; 0E - Misery Mire 31 | ; 10 - Skull Woods 32 | ; 12 - Ice Palace 33 | ; 14 - Tower of Hera 34 | ; 16 - Thieves' Town 35 | ; 18 - Turtle Rock 36 | ; 1A - Ganon's Tower 37 | ; FF - Cave 38 | 39 | ;=================================================================================================== 40 | ; Overworld screens 41 | ;=================================================================================================== 42 | ; 00 - Lost Woods 43 | ; 01 - Lost Woods 44 | ; 02 - Lumberjacks 45 | ; 03 - West Death Mountain 46 | ; 04 - West Death Mountain 47 | ; 05 - East Death Mountain 48 | ; 06 - East Death Mountain 49 | ; 07 - Turtle Rock Portalway 50 | ; 08 - Lost Woods 51 | ; 09 - Lost Woods 52 | ; 0A - Death Mountain Foot 53 | ; 0B - West Death Mountain 54 | ; 0C - West Death Mountain 55 | ; 0D - East Death Mountain 56 | ; 0E - East Death Mountain 57 | ; 0F - Waterfall of Wishing 58 | ; 10 - Lost Woods Alcove 59 | ; 11 - North of Kakariko 60 | ; 12 - Northwest Pond 61 | ; 13 - Sanctuary 62 | ; 14 - Graveyard 63 | ; 15 - Hylia River Bend 64 | ; 16 - Potion Shop 65 | ; 17 - Octorok Pit 66 | ; 18 - Kakariko Village 67 | ; 19 - Kakariko Village 68 | ; 1A - Kakariko Orchard 69 | ; 1B - Hyrule Castle 70 | ; 1C - Hyrule Castle 71 | ; 1D - Hylia River Peninsula 72 | ; 1E - Eastern Ruins 73 | ; 1F - Eastern Ruins 74 | ; 20 - Kakariko Village 75 | ; 21 - Kakariko Village 76 | ; 22 - Smith's House 77 | ; 23 - Hyrule Castle 78 | ; 24 - Hyrule Castle 79 | ; 25 - Boulder Field 80 | ; 26 - Eastern Ruins 81 | ; 27 - Eastern Ruins 82 | ; 28 - Racing Game 83 | ; 29 - South of Kakariko 84 | ; 2A - Haunted Grove 85 | ; 2B - West of Link's House 86 | ; 2C - Link's House 87 | ; 2D - Eastern Bridge 88 | ; 2E - Lake Hylia River Bend 89 | ; 2F - Eastern Portalway 90 | ; 30 - Desert 91 | ; 31 - Desert 92 | ; 32 - Haunted Grove Entrance 93 | ; 33 - Marshlands Portalway 94 | ; 34 - Marshlands Totems 95 | ; 35 - Lake Hylia 96 | ; 36 - Lake Hylia 97 | ; 37 - Lake Hylia River End 98 | ; 38 - Desert 99 | ; 39 - Desert 100 | ; 3A - Desert Pass 101 | ; 3B - Marshlands Dam Entrance 102 | ; 3C - Marshlands Ravine 103 | ; 3D - Lake Hylia 104 | ; 3E - Lake Hylia 105 | ; 3F - Lake Hylia Waterfall 106 | ; 40 - Skull Woods 107 | ; 41 - Skull Woods 108 | ; 42 - Dark Lumberjacks 109 | ; 43 - West Dark Death Mountain 110 | ; 44 - West Dark Death Mountain 111 | ; 45 - East Dark Death Mountain 112 | ; 46 - East Dark Death Mountain 113 | ; 47 - Turtle Rock 114 | ; 48 - Skull Woods 115 | ; 49 - Skull Woods 116 | ; 4A - Bumper Ledge 117 | ; 4B - West Dark Death Mountain 118 | ; 4C - West Dark Death Mountain 119 | ; 4D - East Dark Death Mountain 120 | ; 4E - East Dark Death Mountain 121 | ; 4F - Lake of Bad Omens 122 | ; 50 - Skull Woods Alcove 123 | ; 51 - North of Outcasts 124 | ; 52 - Dark Northwest Pond 125 | ; 53 - Dark Sanctuary 126 | ; 54 - Dark Graveyard 127 | ; 55 - Dark Hylia River Bend 128 | ; 56 - Dark Northeast Shop 129 | ; 57 - Dark Octorok Pit 130 | ; 58 - Village of Outcasts 131 | ; 59 - Village of Outcasts 132 | ; 5A - Outcasts Orchard 133 | ; 5B - Pyramid of Power 134 | ; 5C - Pyramid of Power 135 | ; 5D - Dark Hylia River Peninsula 136 | ; 5E - Palace of Darkness Maze 137 | ; 5F - Palace of Darkness Maze 138 | ; 60 - Village of Outcasts 139 | ; 61 - Village of Outcasts 140 | ; 62 - Stake Puzzle 141 | ; 63 - Pyramid of Power 142 | ; 64 - Pyramid of Power 143 | ; 65 - Boulder Field 144 | ; 66 - Palace of Darkness Maze 145 | ; 67 - Palace of Darkness Maze 146 | ; 68 - Digging Game 147 | ; 69 - South of Outcasts 148 | ; 6A - Stumpy Grove 149 | ; 6B - West of Bomb Shop 150 | ; 6C - Bomb Shop 151 | ; 6D - Hammer Bridge 152 | ; 6E - Dark Lake Hylia River Bend 153 | ; 6F - East Dark World Portalway 154 | ; 70 - Misery Mire 155 | ; 71 - Misery Mire 156 | ; 72 - Stumpy Grove Entrance 157 | ; 73 - Swamplands Portalway 158 | ; 74 - Swamplands Totems 159 | ; 75 - Dark Lake Hylia 160 | ; 76 - Dark Lake Hylia 161 | ; 77 - Dark Lake Hylia River End 162 | ; 78 - Misery Mire 163 | ; 79 - Misery Mire 164 | ; 7A - West of Swamplands 165 | ; 7B - Swamplands Palace Entrance 166 | ; 7C - Swamplands Ravine 167 | ; 7D - Dark Lake Hylia 168 | ; 7E - Dark Lake Hylia 169 | ; 7F - Dark Lake Hylia Waterfall 170 | ; 80 - Master Sword Pedestal/Hobo bridge 171 | ; 81 - Zora's Domain 172 | ; 88 - Triforce room 173 | ; 93 - Triforce room curtains 174 | ; 94 - Hobo bridge shadow overlay 175 | ; 95 - DM overlay 176 | ; 96 - Pyramid background/No overlay 177 | ; 97 - Grove fog overlay 178 | ; 9C - Dark DM overlay 179 | ; 9D - Woods fog overlay 180 | ; 9E - Lost woods clear overlay 181 | ; 9F - Rain 182 | ; B5 - Garbage overlay 183 | ; BC - Garbage overlay that scrolls 184 | ; BE - Garbage overlay that scrolls 185 | 186 | ;=================================================================================================== 187 | ; Sprites 188 | ;=================================================================================================== 189 | ; 00 - RAVEN 190 | ; 01 - VULTURE 191 | ; 02 - STALFOS HEAD 192 | ; 03 - NULL 193 | ; 04 - CORRECT PULL SWITCH 194 | ; 05 - UNUSED CORRECT PULL SWITCH 195 | ; 06 - WRONG PULL SWITCH 196 | ; 07 - UNUSED WRONG PULL SWITCH 197 | ; 08 - OCTOROK 198 | ; 09 - MOLDORM 199 | ; 0A - OCTOROK 4WAY 200 | ; 0B - CUCCO 201 | ; 0C - OCTOROK STONE 202 | ; 0D - BUZZBLOB 203 | ; 0E - SNAPDRAGON 204 | ; 0F - OCTOBALLOON 205 | ; 10 - OCTOBALLOON BABY 206 | ; 11 - HINOX 207 | ; 12 - MOBLIN 208 | ; 13 - MINI HELMASAUR 209 | ; 14 - THIEVES TOWN GRATE 210 | ; 15 - ANTIFAIRY 211 | ; 16 - SAHASRAHLA / AGINAH 212 | ; 17 - BUSH HOARDER 213 | ; 18 - MINI MOLDORM 214 | ; 19 - POE 215 | ; 1A - SMITHY 216 | ; 1B - ARROW 217 | ; 1C - STATUE 218 | ; 1D - FLUTE QUEST 219 | ; 1E - CRYSTAL SWITCH 220 | ; 1F - SICK KID 221 | ; 20 - SLUGGULA 222 | ; 21 - WATER SWITCH 223 | ; 22 - ROPA 224 | ; 23 - RED BARI 225 | ; 24 - BLUE BARI 226 | ; 25 - TALKING TREE 227 | ; 26 - HARDHAT BEETLE 228 | ; 27 - DEADROCK 229 | ; 28 - DARK WORLD HINT NPC 230 | ; 29 - ADULT 231 | ; 2A - SWEEPING LADY 232 | ; 2B - HOBO 233 | ; 2C - LUMBERJACKS 234 | ; 2D - NECKLESS MAN 235 | ; 2E - FLUTE KID 236 | ; 2F - RACE GAME LADY 237 | ; 30 - RACE GAME GUY 238 | ; 31 - FORTUNE TELLER 239 | ; 32 - ARGUE BROS 240 | ; 33 - RUPEE PULL 241 | ; 34 - YOUNG SNITCH 242 | ; 35 - INNKEEPER 243 | ; 36 - WITCH 244 | ; 37 - WATERFALL 245 | ; 38 - EYE STATUE 246 | ; 39 - LOCKSMITH 247 | ; 3A - MAGIC BAT 248 | ; 3B - BONK ITEM 249 | ; 3C - KID IN KAK 250 | ; 3D - OLD SNITCH 251 | ; 3E - ROCK HOARDER 252 | ; 3F - TUTORIAL GUARD 253 | ; 40 - LIGHTNING GATE 254 | ; 41 - BLUE GUARD 255 | ; 42 - GREEN GUARD 256 | ; 43 - RED SPEAR GUARD 257 | ; 44 - BLUESAIN BOLT 258 | ; 45 - USAIN BOLT 259 | ; 46 - BLUE ARCHER 260 | ; 47 - GREEN BUSH GUARD 261 | ; 48 - RED JAVELIN GUARD 262 | ; 49 - RED BUSH GUARD 263 | ; 4A - BOMB GUARD 264 | ; 4B - GREEN KNIFE GUARD 265 | ; 4C - GELDMAN 266 | ; 4D - TOPPO 267 | ; 4E - POPO 268 | ; 4F - POPO 269 | ; 50 - CANNONBALL 270 | ; 51 - ARMOS STATUE 271 | ; 52 - KING ZORA 272 | ; 53 - ARMOS KNIGHT 273 | ; 54 - LANMOLAS 274 | ; 55 - ZORA / FIREBALL 275 | ; 56 - WALKING ZORA 276 | ; 57 - DESERT STATUE 277 | ; 58 - CRAB 278 | ; 59 - LOST WOODS BIRD 279 | ; 5A - LOST WOODS SQUIRREL 280 | ; 5B - SPARK CLOCKWISE 281 | ; 5C - SPARK COUNTERCLOCKWISE 282 | ; 5D - ROLLER VERTICAL DOWN FIRST 283 | ; 5E - ROLLER VERTICAL UP FIRST 284 | ; 5F - ROLLER HORIZONTAL RIGHT FIRST 285 | ; 60 - ROLLER HORIZONTAL LEFT FIRST 286 | ; 61 - BEAMOS 287 | ; 62 - MASTERSWORD 288 | ; 63 - DEBIRANDO PIT 289 | ; 64 - DEBIRANDO 290 | ; 65 - ARCHERY GUY 291 | ; 66 - WALL CANNON VERTICAL LEFT 292 | ; 67 - WALL CANNON VERTICAL RIGHT 293 | ; 68 - WALL CANNON HORIZONTAL TOP 294 | ; 69 - WALL CANNON HORIZONTAL BOTTOM 295 | ; 6A - BALL N CHAIN 296 | ; 6B - CANNONBALL / CANNON TROOPER 297 | ; 6C - MIRROR PORTAL 298 | ; 6D - RAT / CRICKET 299 | ; 6E - ROPE 300 | ; 6F - KEESE 301 | ; 70 - KING HELMASAUR FIREBALL 302 | ; 71 - LEEVER 303 | ; 72 - FAIRY POND TRIGGER 304 | ; 73 - UNCLE / PRIEST / MANTLE 305 | ; 74 - RUNNING BOY 306 | ; 75 - BOTTLE MERCHANT 307 | ; 76 - ZELDA 308 | ; 77 - ANTIFAIRY 309 | ; 78 - SAHASRAHLAS WIFE 310 | ; 79 - BEE 311 | ; 7A - AGAHNIM 312 | ; 7B - AGAHNIMS BALLS 313 | ; 7C - GREEN STALFOS 314 | ; 7D - BIG SPIKE 315 | ; 7E - FIREBAR CLOCKWISE 316 | ; 7F - FIREBAR COUNTERCLOCKWISE 317 | ; 80 - FIRESNAKE 318 | ; 81 - HOVER 319 | ; 82 - ANTIFAIRY CIRCLE 320 | ; 83 - GREEN EYEGORE / GREEN MIMIC 321 | ; 84 - RED EYEGORE / RED MIMIC 322 | ; 85 - YELLOW STALFOS 323 | ; 86 - KODONGO 324 | ; 87 - KODONGO FIRE 325 | ; 88 - MOTHULA 326 | ; 89 - MOTHULA BEAM 327 | ; 8A - SPIKE BLOCK 328 | ; 8B - GIBDO 329 | ; 8C - ARRGHUS 330 | ; 8D - ARRGHI 331 | ; 8E - TERRORPIN 332 | ; 8F - BLOB 333 | ; 90 - WALLMASTER 334 | ; 91 - STALFOS KNIGHT 335 | ; 92 - KING HELMASAUR 336 | ; 93 - BUMPER 337 | ; 94 - PIROGUSU / FLYING TILE 338 | ; 95 - LASER EYE LEFT 339 | ; 96 - LASER EYE RIGHT 340 | ; 97 - LASER EYE TOP 341 | ; 98 - LASER EYE BOTTOM 342 | ; 99 - PENGATOR 343 | ; 9A - KYAMERON 344 | ; 9B - WIZZROBE 345 | ; 9C - ZORO 346 | ; 9D - BABASU 347 | ; 9E - HAUNTED GROVE OSTRICH 348 | ; 9F - HAUNTED GROVE RABBIT 349 | ; A0 - HAUNTED GROVE BIRD 350 | ; A1 - FREEZOR 351 | ; A2 - KHOLDSTARE 352 | ; A3 - KHOLDSTARE SHELL 353 | ; A4 - FALLING ICE 354 | ; A5 - BLUE ZAZAK 355 | ; A6 - RED ZAZAK 356 | ; A7 - STALFOS 357 | ; A8 - GREEN ZIRRO 358 | ; A9 - BLUE ZIRRO 359 | ; AA - PIKIT 360 | ; AB - CRYSTAL MAIDEN 361 | ; AC - APPLE 362 | ; AD - OLD MAN 363 | ; AE - PIPE DOWN 364 | ; AF - PIPE UP 365 | ; B0 - PIPE RIGHT 366 | ; B1 - PIPE LEFT 367 | ; B2 - GOOD BEE 368 | ; B3 - PEDESTAL PLAQUE 369 | ; B4 - PURPLE CHEST 370 | ; B5 - BOMB SHOP GUY 371 | ; B6 - KIKI 372 | ; B7 - BLIND MAIDEN 373 | ; B8 - DIALOGUE TESTER 374 | ; B9 - BULLY / PINK BALL 375 | ; BA - WHIRLPOOL 376 | ; BB - SHOPKEEPER / CHEST GAME GUY / NICE THIEF 377 | ; BC - DRUNKARD 378 | ; BD - VITREOUS 379 | ; BE - VITREOUS SMALL EYE 380 | ; BF - LIGHTNING 381 | ; C0 - CATFISH 382 | ; C1 - CUTSCENE AGAHNIM 383 | ; C2 - BOULDER / SHRAPNEL 384 | ; C3 - GIBO 385 | ; C4 - THIEF 386 | ; C5 - MEDUSA 387 | ; C6 - YOMO MEDUSA 388 | ; C7 - POKEY 389 | ; C8 - BIG FAIRY 390 | ; C9 - TEKTITE / FIREBAT 391 | ; CA - CHAIN CHOMP 392 | ; CB - TRINEXX ROCK HEAD 393 | ; CC - TRINEXX FIRE HEAD 394 | ; CD - TRINEXX ICE HEAD 395 | ; CE - BLIND 396 | ; CF - SWAMOLA 397 | ; D0 - LYNEL 398 | ; D1 - BUNNYBEAM / SMOKE 399 | ; D2 - FLOPPING FISH 400 | ; D3 - STAL 401 | ; D4 - LANDMINE 402 | ; D5 - DIGGING GAME GUY 403 | ; D6 - GANON 404 | ; D7 - GANON 405 | ; D8 - HEART 406 | ; D9 - GREEN RUPEE 407 | ; DA - BLUE RUPEE 408 | ; DB - RED RUPEE 409 | ; DC - BOMB REFILL 1 410 | ; DD - BOMB REFILL 4 411 | ; DE - BOMB REFILL 8 412 | ; DF - SMALL MAGIC DECANTER 413 | ; E0 - LARGE MAGIC DECANTER 414 | ; E1 - ARROW REFILL 5 415 | ; E2 - ARROW REFILL 10 416 | ; E3 - FAIRY 417 | ; E4 - SMALL KEY 418 | ; E5 - BIG KEY 419 | ; E6 - STOLEN SHIELD 420 | ; E7 - MUSHROOM 421 | ; E8 - FAKE MASTER SWORD 422 | ; E9 - MAGIC SHOP ASSISTANT 423 | ; EA - HEART CONTAINER 424 | ; EB - HEART PIECE 425 | ; EC - THROWN ITEM 426 | ; ED - SOMARIA PLATFORM 427 | ; EE - CASTLE MANTLE 428 | ; EF - UNUSED SOMARIA PLATFORM 429 | ; F0 - UNUSED SOMARIA PLATFORM 430 | ; F1 - UNUSED SOMARIA PLATFORM 431 | ; F2 - MEDALLION TABLET 432 | ; F3 - UNDEFINED - Becomes overlord 01 in overworld 433 | ; F4 - UNDEFINED - Flags boulders in overworld 434 | ; F5 - UNDEFINED 435 | ; F6 - UNDEFINED 436 | ; F7 - UNDEFINED 437 | ; F8 - UNDEFINED 438 | ; F9 - UNDEFINED 439 | ; FA - UNDEFINED 440 | ; FB - UNDEFINED 441 | ; FC - UNDEFINED 442 | ; FD - UNDEFINED 443 | ; FE - UNDEFINED 444 | ; FF - UNDEFINED 445 | 446 | ;=================================================================================================== 447 | ; Overlords 448 | ;=================================================================================================== 449 | ; 01 - POSITION TARGET 450 | ; 02 - FULL ROOM CANNONS 451 | ; 03 - VERTICAL CANNON 452 | ; 04 - UNUSED STALFOS SPAWNER 453 | ; 05 - FALLING STALFOS 454 | ; 06 - BAD SWITCH SNAKE 455 | ; 07 - MOVING FLOOR 456 | ; 08 - BLOB SPAWNER 457 | ; 09 - WALLMASTER 458 | ; 0A - FALLING SQUARE 459 | ; 0B - FALLING BRIDGE 460 | ; 0C - FALLING TILES WEST TO EAST 461 | ; 0D - FALLING TILES NORTH TO SOUTH 462 | ; 0E - FALLING TILES EAST TO WEST 463 | ; 0F - FALLING TILES SOUTH TO NORTH 464 | ; 10 - PIROGUSU SPAWNER LEFT 465 | ; 11 - PIROGUSU SPAWNER RIGHT 466 | ; 12 - PIROGUSU SPAWNER TOP 467 | ; 13 - PIROGUSU SPAWNER BOTTOM 468 | ; 14 - TILE ROOM 469 | ; 15 - WIZZROBE SPAWNER 470 | ; 16 - ZORO SPAWNER 471 | ; 17 - POT TRAP 472 | ; 18 - INVISIBLE STALFOS 473 | ; 19 - ARMOS COORDINATOR 474 | ; 1A - BAD SWITCH BOMB 475 | 476 | ;=================================================================================================== 477 | ; Ancillae 478 | ;=================================================================================================== 479 | ; 01 - SOMARIA BULLET 480 | ; 02 - FIRE ROD SHOT 481 | ; 03 - UNUSED 482 | ; 04 - BEAM HIT 483 | ; 05 - BOOMERANG 484 | ; 06 - WALL HIT 485 | ; 07 - BOMB 486 | ; 08 - DOOR DEBRIS 487 | ; 09 - ARROW 488 | ; 0A - LODGED ARROW 489 | ; 0B - ICE ROD SHOT 490 | ; 0C - SWORD BEAM 491 | ; 0D - SPIN ATTACK FULL CHARGE SPARK 492 | ; 0E - BLAST WALL EXPLOSION 493 | ; 0F - BLAST WALL EXPLOSION 494 | ; 10 - BLAST WALL EXPLOSION 495 | ; 11 - ICE ROD WALL HIT 496 | ; 12 - BLAST WALL EXPLOSION 497 | ; 13 - ICE ROD SPARKLE 498 | ; 14 - BAD POINTER 499 | ; 15 - SPLASH 500 | ; 16 - HIT STARS 501 | ; 17 - SHOVEL DIRT 502 | ; 18 - ETHER SPELL 503 | ; 19 - BOMBOS SPELL 504 | ; 1A - POWDER DUST 505 | ; 1B - SWORD WALL HIT 506 | ; 1C - QUAKE SPELL 507 | ; 1D - SCREEN SHAKE 508 | ; 1E - DASH DUST 509 | ; 1F - HOOKSHOT 510 | ; 20 - BLANKET 511 | ; 21 - SNORE 512 | ; 22 - ITEM RECEIPT 513 | ; 23 - LINK POOF 514 | ; 24 - GRAVESTONE 515 | ; 25 - BAD POINTER 516 | ; 26 - SWORD SWING SPARKLE 517 | ; 27 - DUCK 518 | ; 28 - WISH POND ITEM 519 | ; 29 - MILESTONE ITEM RECEIPT 520 | ; 2A - SPIN ATTACK SPARKLE A 521 | ; 2B - SPIN ATTACK SPARKLE B 522 | ; 2C - SOMARIA BLOCK 523 | ; 2D - SOMARIA BLOCK FIZZ 524 | ; 2E - SOMARIA BLOCK FISSION 525 | ; 2F - LAMP FLAME 526 | ; 30 - BYRNA WINDUP SPARK 527 | ; 31 - BYRNA SPARK 528 | ; 32 - BLAST WALL FIREBALL 529 | ; 33 - BLAST WALL EXPLOSION 530 | ; 34 - SKULL WOODS FIRE 531 | ; 35 - MASTER SWORD CUTSCENE 532 | ; 36 - FLUTE 533 | ; 37 - WEATHERVANE EXPLOSION 534 | ; 38 - CUTSCENE DUCK 535 | ; 39 - SOMARIA PLATFORM POOF 536 | ; 3A - BIG BOMB EXPLOSION 537 | ; 3B - SWORD UP SPARKLE 538 | ; 3C - SPIN ATTACK CHARGE SPARKLE 539 | ; 3D - ITEM SPLASH 540 | ; 3E - RISING CRYSTAL 541 | ; 3F - BUSH POOF 542 | ; 40 - DWARF POOF 543 | ; 41 - WATERFALL SPLASH 544 | ; 42 - HAPPINESS POND RUPEES 545 | ; 43 - GANONS TOWER CUTSCENE 546 | 547 | ;=================================================================================================== 548 | ; Garnish 549 | ;=================================================================================================== 550 | ; 01 - FIRE SNAKE TAIL 551 | ; 02 - MOTHULA BEAM TRAIL 552 | ; 03 - FALLING TILE 553 | ; 04 - LASER TRAIL 554 | ; 05 - SPARKLE 555 | ; 06 - ZORO TRAIL 556 | ; 07 - BABASU FLASH 557 | ; 08 - KHOLDSTARE TRAIL 558 | ; 09 - LIGHTNING TRAIL 559 | ; 0A - CANNON SMOKE 560 | ; 0B - WATER TRAIL 561 | ; 0C - TRINEXX ICE BREATH 562 | ; 0D - NULL POINTER 563 | ; 0E - TRINEXX FIRE BREATH 564 | ; 0F - BLIND LASER TRAIL 565 | ; 10 - GANON BAT FLAME 566 | ; 11 - WITHERING BAT FLAME 567 | ; 12 - SPARKLE 568 | ; 13 - PYRAMID DEBRIS 569 | ; 14 - RUNNING KID DASH DUST 570 | ; 15 - ARRGHUS SPLASH 571 | ; 16 - THROWN ITEM DEBRIS 572 | 573 | ;=================================================================================================== 574 | ; Text commands 575 | ;=================================================================================================== 576 | ; F6 - SCROLL 577 | ; F7 - ROW1 578 | ; F8 - ROW2 579 | ; F9 - ROW3 580 | ; FA - PAUSE 581 | ; FB - END 582 | ; FC - SPEED 583 | ; FD - KANJI 584 | ; FE - EXTCMD 585 | 586 | ; FE 67 - NEXTIMAGE 587 | ; FE 68 - CHOOSE_2_LOW 588 | ; FE 69 - CHOOSEITEM 589 | ; FE 6A - PLAYERNAME 590 | ; FE 6B - WINDOWTYPE 591 | ; FE 6C - PRINTBCD 592 | ; FE 6D - WINDOWPOS 593 | ; FE 6E - SCROLLSPEED 594 | ; FE 6F - CHOOSE_B 595 | ; FE 70 - CRASH 596 | ; FE 71 - CHOOSE_3 597 | ; FE 72 - CHOOSE_2_HIGH 598 | ; FE 73 - UNKNOWN 599 | ; FE 74 - UNKNOWN 600 | ; FE 75 - UNKNOWN 601 | ; FE 76 - UNKNOWN 602 | ; FE 77 - SETCOL 603 | ; FE 78 - WAIT 604 | ; FE 79 - SFX 605 | ; FE 7A - TEXTSPEED 606 | ; FE 7B - UNKNOWN 607 | ; FE 7C - UNKNOWN 608 | ; FE 7D - CLEARBUFFER 609 | ; FE 7E - PAUSEFORINPUT 610 | ; FE 7F - END 611 | 612 | ;=================================================================================================== 613 | ; Item receipts 614 | ;=================================================================================================== 615 | ; 00 - FIGHTER SWORD 616 | ; 01 - MASTER SWORD 617 | ; 02 - TEMPERED SWORD 618 | ; 03 - BUTTER SWORD 619 | ; 04 - FIGHTER SHIELD 620 | ; 05 - FIRE SHIELD 621 | ; 06 - MIRROR SHIELD 622 | ; 07 - FIRE ROD 623 | ; 08 - ICE ROD 624 | ; 09 - HAMMER 625 | ; 0A - HOOKSHOT 626 | ; 0B - BOW 627 | ; 0C - BOOMERANG 628 | ; 0D - POWDER 629 | ; 0E - BOTTLE REFILL (BEE) 630 | ; 0F - BOMBOS 631 | ; 10 - ETHER 632 | ; 11 - QUAKE 633 | ; 12 - LAMP 634 | ; 13 - SHOVEL 635 | ; 14 - FLUTE 636 | ; 15 - SOMARIA 637 | ; 16 - BOTTLE 638 | ; 17 - HEART PIECE 639 | ; 18 - BYRNA 640 | ; 19 - CAPE 641 | ; 1A - MIRROR 642 | ; 1B - GLOVE 643 | ; 1C - MITTS 644 | ; 1D - BOOK 645 | ; 1E - FLIPPERS 646 | ; 1F - PEARL 647 | ; 20 - CRYSTAL 648 | ; 21 - NET 649 | ; 22 - BLUE MAIL 650 | ; 23 - RED MAIL 651 | ; 24 - SMALL KEY 652 | ; 25 - COMPASS 653 | ; 26 - HEART CONTAINER FROM 4/4 654 | ; 27 - BOMB 655 | ; 28 - 3 BOMBS 656 | ; 29 - MUSHROOM 657 | ; 2A - RED BOOMERANG 658 | ; 2B - FULL BOTTLE (RED) 659 | ; 2C - FULL BOTTLE (GREEN) 660 | ; 2D - FULL BOTTLE (BLUE) 661 | ; 2E - POTION REFILL (RED) 662 | ; 2F - POTION REFILL (GREEN) 663 | ; 30 - POTION REFILL (BLUE) 664 | ; 31 - 10 BOMBS 665 | ; 32 - BIG KEY 666 | ; 33 - MAP 667 | ; 34 - 1 RUPEE 668 | ; 35 - 5 RUPEES 669 | ; 36 - 20 RUPEES 670 | ; 37 - GREEN PENDANT 671 | ; 38 - BLUE PENDANT 672 | ; 39 - RED PENDANT 673 | ; 3A - TOSSED BOW 674 | ; 3B - SILVERS 675 | ; 3C - FULL BOTTLE (BEE) 676 | ; 3D - FULL BOTTLE (FAIRY) 677 | ; 3E - BOSS HC 678 | ; 3F - SANC HC 679 | ; 40 - 100 RUPEES 680 | ; 41 - 50 RUPEES 681 | ; 42 - HEART 682 | ; 43 - ARROW 683 | ; 44 - 10 ARROWS 684 | ; 45 - SMALL MAGIC 685 | ; 46 - 300 RUPEES 686 | ; 47 - 20 RUPEES GREEN 687 | ; 48 - FULL BOTTLE (GOOD BEE) 688 | ; 49 - TOSSED FIGHTER SWORD 689 | ; 4A - FLUTE (ACTIVATED) 690 | ; 4B - BOOTS 691 | 692 | ;=================================================================================================== 693 | ; Generalized tile interaction types 694 | ;=================================================================================================== 695 | ; 00 - Nothing 696 | ; 01 - Collision 697 | ; 02 - Short collision 698 | ; 03 - Stairs 699 | ; 04 - Ledge 700 | 701 | ;=================================================================================================== 702 | ; Tile types 703 | ;=================================================================================================== 704 | ; 00 - Nothing (standard floor) 705 | ; 01 - Collision 706 | ; 02 - Collision (short) 707 | ; 03 - Collision 708 | ; 04 - Collision (short ledge) 709 | ; 05 - Nothing (unused) 710 | ; 06 - Nothing (unused) 711 | ; 07 - Nothing (unused) 712 | ; 08 - Deep water 713 | ; 09 - Shallow water 714 | ; 0A - Short water ladder 715 | ; 0B - Collision (weird, unused deep water in overworld) 716 | ; 0C - Overlay mask 717 | ; 0D - Spike floor 718 | ; 0E - GT ice 719 | ; 0F - Ice palace ice 720 | ; 10 - Slope ◤ 721 | ; 11 - Slope ◥ 722 | ; 12 - Slope ◣ 723 | ; 13 - Slope ◢ 724 | ; 14 - Nothing (unused) 725 | ; 15 - Nothing (unused) 726 | ; 16 - Nothing (unused) 727 | ; 17 - Nothing (unused) 728 | ; 18 - Slope ◤ 729 | ; 19 - Slope ◥ 730 | ; 1A - Slope ◣ 731 | ; 1B - Slope ◢ 732 | ; 1C - Layer 2 overlay 733 | ; 1D - North single-layer auto stairs 734 | ; 1E - North layer-swap auto stairs 735 | ; 1F - North layer-swap auto stairs 736 | ; 20 - Pit 737 | ; 21 - Nothing (unused) 738 | ; 22 - Manual stairs 739 | ; 23 - Pot switch 740 | ; 24 - Pressure switch 741 | ; 25 - Nothing (unused but referenced by somaria blocks) 742 | ; 26 - Collision (near stairs?) 743 | ; 27 - General hookable object 744 | ; 28 - North ledge 745 | ; 29 - South ledge 746 | ; 2A - East ledge 747 | ; 2B - West ledge 748 | ; 2C - ◤ ledge 749 | ; 2D - ◣ ledge 750 | ; 2E - ◥ ledge 751 | ; 2F - ◢ ledge 752 | ; 30 - Straight inter-room stairs south/up 0 753 | ; 31 - Straight inter-room stairs south/up 1 754 | ; 32 - Straight inter-room stairs south/up 2 755 | ; 33 - Straight inter-room stairs south/up 3 756 | ; 34 - Straight inter-room stairs north/down 0 757 | ; 35 - Straight inter-room stairs north/down 1 758 | ; 36 - Straight inter-room stairs north/down 2 759 | ; 37 - Straight inter-room stairs north/down 3 760 | ; 38 - Straight inter-room stairs north/down edge 761 | ; 39 - Straight inter-room stairs south/up edge 762 | ; 3A - Star tile (inactive on load) 763 | ; 3B - Star tile (active on load) 764 | ; 3C - Nothing (unused) 765 | ; 3D - South single-layer auto stairs 766 | ; 3E - South layer-swap auto stairs 767 | ; 3F - South layer-swap auto stairs 768 | ; 40 - Thick grass 769 | ; 41 - Nothing (unused) 770 | ; 42 - Gravestone / Tower of Hera ledge shadows 771 | ; 43 - Skull Woods entrance / Hera columns 772 | ; 44 - Spike 773 | ; 45 - Nothing (unused) 774 | ; 46 - Desert Tablet 775 | ; 47 - Nothing (unused) 776 | ; 48 - Diggable ground 777 | ; 49 - Nothing (unused) 778 | ; 4A - Diggable ground 779 | ; 4B - Warp tile 780 | ; 4C - Nothing / Unused square corner on overworld 781 | ; 4D - Nothing / Unused square corner on overworld 782 | ; 4E - Square corners in EP overworld 783 | ; 4F - Square corners in EP overworld 784 | ; 50 - Green bush 785 | ; 51 - Dark bush 786 | ; 52 - Gray rock 787 | ; 53 - Black rock 788 | ; 54 - Hint tile / Sign 789 | ; 55 - Big gray rock 790 | ; 56 - Big black rock 791 | ; 57 - Bonk rocks 792 | ; 58 - Chest 0 793 | ; 59 - Chest 1 794 | ; 5A - Chest 2 795 | ; 5B - Chest 3 796 | ; 5C - Chest 4 797 | ; 5D - Chest 5 798 | ; 5E - Spiral stairs 799 | ; 5F - Spiral stairs 800 | ; 60 - Rupee tile 801 | ; 61 - Nothing (unused) 802 | ; 62 - Bombable floor 803 | ; 63 - Minigame chest 804 | ; 64 - Nothing (unused) 805 | ; 65 - Nothing (unused) 806 | ; 66 - Crystal peg down 807 | ; 67 - Crystal peg up 808 | ; 68 - Upwards conveyor 809 | ; 69 - Downwards conveyor 810 | ; 6A - Leftwards conveyor 811 | ; 6B - Rightwards conveyor 812 | ; 6C - North vines 813 | ; 6D - South vines 814 | ; 6E - West vines 815 | ; 6F - East vines 816 | ; 70 - Pot/Hammer peg/Push block 00 817 | ; 71 - Pot/Hammer peg/Push block 01 818 | ; 72 - Pot/Hammer peg/Push block 02 819 | ; 73 - Pot/Hammer peg/Push block 03 820 | ; 74 - Pot/Hammer peg/Push block 04 821 | ; 75 - Pot/Hammer peg/Push block 05 822 | ; 76 - Pot/Hammer peg/Push block 06 823 | ; 77 - Pot/Hammer peg/Push block 07 824 | ; 78 - Pot/Hammer peg/Push block 08 825 | ; 79 - Pot/Hammer peg/Push block 09 826 | ; 7A - Pot/Hammer peg/Push block 0A 827 | ; 7B - Pot/Hammer peg/Push block 0B 828 | ; 7C - Pot/Hammer peg/Push block 0C 829 | ; 7D - Pot/Hammer peg/Push block 0D 830 | ; 7E - Pot/Hammer peg/Push block 0E 831 | ; 7F - Pot/Hammer peg/Push block 0F 832 | ; 80 - North/South door 833 | ; 81 - East/West door 834 | ; 82 - North/South shutter door 835 | ; 83 - East/West shutter door 836 | ; 84 - North/South layer 2 door 837 | ; 85 - East/West layer 2 door 838 | ; 86 - North/South layer 2 shutter door 839 | ; 87 - East/West layer 2 shutter door 840 | ; 88 - Some type of door (?) 841 | ; 89 - East/West transport door 842 | ; 8A - Some type of door (?) 843 | ; 8B - Some type of door (?) 844 | ; 8C - Some type of door (?) 845 | ; 8D - Some type of door (?) 846 | ; 8E - Entrance door 847 | ; 8F - Entrance door 848 | ; 90 - Layer toggle shutter door (?) 849 | ; 91 - Layer toggle shutter door (?) 850 | ; 92 - Layer toggle shutter door (?) 851 | ; 93 - Layer toggle shutter door (?) 852 | ; 94 - Layer toggle shutter door (?) 853 | ; 95 - Layer toggle shutter door (?) 854 | ; 96 - Layer toggle shutter door (?) 855 | ; 97 - Layer toggle shutter door (?) 856 | ; 98 - Layer+Dungeon toggle shutter door (?) 857 | ; 99 - Layer+Dungeon toggle shutter door (?) 858 | ; 9A - Layer+Dungeon toggle shutter door (?) 859 | ; 9B - Layer+Dungeon toggle shutter door (?) 860 | ; 9C - Layer+Dungeon toggle shutter door (?) 861 | ; 9D - Layer+Dungeon toggle shutter door (?) 862 | ; 9E - Layer+Dungeon toggle shutter door (?) 863 | ; 9F - Layer+Dungeon toggle shutter door (?) 864 | ; A0 - North/South Dungeon swap door 865 | ; A1 - Dungeon toggle door (?) 866 | ; A2 - Dungeon toggle door (?) 867 | ; A3 - Dungeon toggle door (?) 868 | ; A4 - Dungeon toggle door (?) 869 | ; A5 - Dungeon toggle door (?) 870 | ; A6 - Nothing (unused) 871 | ; A7 - Nothing (unused) 872 | ; A8 - Layer+Dungeon toggle shutter door (?) 873 | ; A9 - Layer+Dungeon toggle shutter door (?) 874 | ; AA - Layer+Dungeon toggle shutter door (?) 875 | ; AB - Layer+Dungeon toggle shutter door (?) 876 | ; AC - Layer+Dungeon toggle shutter door (?) 877 | ; AD - Layer+Dungeon toggle shutter door (?) 878 | ; AE - Layer+Dungeon toggle shutter door (?) 879 | ; AF - Layer+Dungeon toggle shutter door (?) 880 | ; B0 - Somaria ─ 881 | ; B1 - Somaria │ 882 | ; B2 - Somaria ┌ 883 | ; B3 - Somaria └ 884 | ; B4 - Somaria ┐ 885 | ; B5 - Somaria ┘ 886 | ; B6 - Somaria ⍰ 1 way 887 | ; B7 - Somaria ┬ 888 | ; B8 - Somaria ┴ 889 | ; B9 - Somaria ├ 890 | ; BA - Somaria ┤ 891 | ; BB - Somaria ┼ 892 | ; BC - Somaria ⍰ 2 way 893 | ; BD - Somaria ┼ crossover 894 | ; BE - Pipe entrance 895 | ; BF - Nothing (unused) 896 | ; C0 - Torch 00 897 | ; C1 - Torch 01 898 | ; C2 - Torch 02 899 | ; C3 - Torch 03 900 | ; C4 - Torch 04 901 | ; C5 - Torch 05 902 | ; C6 - Torch 06 903 | ; C7 - Torch 07 904 | ; C8 - Torch 08 905 | ; C9 - Torch 09 906 | ; CA - Torch 0A 907 | ; CB - Torch 0B 908 | ; CC - Torch 0C 909 | ; CD - Torch 0D 910 | ; CE - Torch 0E 911 | ; CF - Torch 0F 912 | ; D0 - Nothing (unused) 913 | ; D1 - Nothing (unused) 914 | ; D2 - Nothing (unused) 915 | ; D3 - Nothing (unused) 916 | ; D4 - Nothing (unused) 917 | ; D5 - Nothing (unused) 918 | ; D6 - Nothing (unused) 919 | ; D7 - Nothing (unused) 920 | ; D8 - Nothing (unused) 921 | ; D9 - Nothing (unused) 922 | ; DA - Nothing (unused) 923 | ; DB - Nothing (unused) 924 | ; DC - Nothing (unused) 925 | ; DD - Nothing (unused) 926 | ; DE - Nothing (unused) 927 | ; DF - Nothing (unused) 928 | ; E0 - Nothing (unused) 929 | ; E1 - Nothing (unused) 930 | ; E2 - Nothing (unused) 931 | ; E3 - Nothing (unused) 932 | ; E4 - Nothing (unused) 933 | ; E5 - Nothing (unused) 934 | ; E6 - Nothing (unused) 935 | ; E7 - Nothing (unused) 936 | ; E8 - Nothing (unused) 937 | ; E9 - Nothing (unused) 938 | ; EA - Nothing (unused) 939 | ; EB - Nothing (unused) 940 | ; EC - Nothing (unused) 941 | ; ED - Nothing (unused) 942 | ; EE - Nothing (unused) 943 | ; EF - Nothing (unused) 944 | ; F0 - Door 0 bottom 945 | ; F1 - Door 1 bottom 946 | ; F2 - Door 2 bottom 947 | ; F3 - Door 3 bottom 948 | ; F4 - Door X bottom? (unused) 949 | ; F5 - Door X bottom? (unused) 950 | ; F6 - Door X bottom? (unused) 951 | ; F7 - Door X bottom? (unused) 952 | ; F8 - Door 0 top 953 | ; F9 - Door 1 top 954 | ; FA - Door 2 top 955 | ; FB - Door 3 top 956 | ; FC - Door X top? (unused) 957 | ; FD - Door X top? (unused) 958 | ; FE - Door X top? (unused) 959 | ; FF - Door X top? (unused) 960 | 961 | ;=================================================================================================== 962 | -------------------------------------------------------------------------------- /symbols_sram.asm: -------------------------------------------------------------------------------- 1 | ;=================================================================================================== 2 | ; Save data is located in 2 separate locations in SRAM: 3 | ; File 1: $70:0000 Mirror: $70:0F00 4 | ; File 2: $70:0500 Mirror: $70:1400 5 | ; File 3: $70:0A00 Mirror: $70:1900 6 | ; The main location is what gets brought down to WRAM at $7E:F000. 7 | ; The mirrors are used if an invalid checksum is found on the main copy. 8 | ; If both are invalid, the file is deleted. 9 | ; 10 | ; Use of unused SRAM is not recommended for general purpose memory 11 | ; As it will be kept across game sessions 12 | ;=================================================================================================== 13 | ; The following ASCII art is included because MathOnNapkins likes it: 14 | ;--------------------------------------------------------------------------------------------------- 15 | ; 16 | ; /\/\/\/ ||\\\\ || |||\\ /\ |||||||||||| /\ 17 | ; /| || || // \\ //\\ || || || //\\ 18 | ; /| ||\\ || // || // \\ || || || ///\\\ 19 | ; /| ||// || // || //||||\\ || || || /\ /\ 20 | ; /| || || // // // \\ || || || //\\ //\\ 21 | ; /\/\/\/ ||//// ||//// |||// // \\ |||||||||||| ///\\\///\\\ 22 | ; 23 | ; <^^> <^^> **** **** **** **** **** **** 24 | ; <<<##^^^^##>>> *** **** *** *** **** *** *** **** *** 25 | ; <<############>> ** ** ** ** ** ** 26 | ; <<############>> ** ** ** ** ** ** 27 | ; <<##########>> ** ** ** ** ** ** 28 | ; <<########>> ** ** ** ** ** ** 29 | ; <<######>> ** ** ** ** ** ** 30 | ; <<##>> ** ** ** ** ** ** 31 | ; <<>> **** **** **** 32 | ; <> ** ** ** 33 | ; 34 | ;=================================================================================================== 35 | FILE1MAIN = $700000 36 | FILE2MAIN = $700500 37 | FILE3MAIN = $700A00 38 | FILE1COPY = $700F00 39 | FILE2COPY = $701400 40 | FILE3COPY = $701900 41 | 42 | ; 0x01FE free bytes of SRAM 43 | FREESRAM = $701E00 44 | 45 | ; Used to find the correct save file offset to use when transferring between SRAM and WRAM. 46 | SRAMOFF = $701FFE 47 | 48 | ;=================================================================================================== 49 | ; Documention is for WRAM, as SRAM is not directly accessed except when 50 | ; verifying the file 51 | ; loading/saving 52 | ; Do note that the offset into any particular block of save is data is 53 | ; just equal to the bottom 3 nibbles of the WRAM address. 54 | ; e.g. $7E:F340 is an offset of +$0340 into the block 55 | ;=================================================================================================== 56 | ; Room flag data 57 | ; dddd bkut sehc qqqq 58 | ; d - door opened 59 | ; b - boss kill / heart container 60 | ; k - key / heart piece / crystal (unused for crystals, but prevents them from dropping) 61 | ; u - chest 5 / 2nd key / heart piece 62 | ; t - chest 4 / rupee floor / swamp drains / bombable floor / mire wall 63 | ; s - chest 3 / pod or desert wall 64 | ; e - chest 2 65 | ; h - chest 1 66 | ; c - chest 0 67 | ; q - quadrant visits 68 | ; nw, ne, sw, se 69 | RMFLG000 = $7EF000 70 | RMFLG001 = $7EF002 71 | RMFLG002 = $7EF004 72 | RMFLG003 = $7EF006 73 | RMFLG004 = $7EF008 74 | RMFLG005 = $7EF00A 75 | RMFLG006 = $7EF00C 76 | RMFLG007 = $7EF00E 77 | RMFLG008 = $7EF010 78 | RMFLG009 = $7EF012 79 | RMFLG00A = $7EF014 80 | RMFLG00B = $7EF016 81 | RMFLG00C = $7EF018 82 | RMFLG00D = $7EF01A 83 | RMFLG00E = $7EF01C 84 | RMFLG00F = $7EF01E 85 | RMFLG010 = $7EF020 86 | RMFLG011 = $7EF022 87 | RMFLG012 = $7EF024 88 | RMFLG013 = $7EF026 89 | RMFLG014 = $7EF028 90 | RMFLG015 = $7EF02A 91 | RMFLG016 = $7EF02C 92 | RMFLG017 = $7EF02E 93 | RMFLG018 = $7EF030 94 | RMFLG019 = $7EF032 95 | RMFLG01A = $7EF034 96 | RMFLG01B = $7EF036 97 | RMFLG01C = $7EF038 98 | RMFLG01D = $7EF03A 99 | RMFLG01E = $7EF03C 100 | RMFLG01F = $7EF03E 101 | RMFLG020 = $7EF040 102 | RMFLG021 = $7EF042 103 | RMFLG022 = $7EF044 104 | RMFLG023 = $7EF046 105 | RMFLG024 = $7EF048 106 | RMFLG025 = $7EF04A 107 | RMFLG026 = $7EF04C 108 | RMFLG027 = $7EF04E 109 | RMFLG028 = $7EF050 110 | RMFLG029 = $7EF052 111 | RMFLG02A = $7EF054 112 | RMFLG02B = $7EF056 113 | RMFLG02C = $7EF058 114 | RMFLG02D = $7EF05A 115 | RMFLG02E = $7EF05C 116 | RMFLG02F = $7EF05E 117 | RMFLG030 = $7EF060 118 | RMFLG031 = $7EF062 119 | RMFLG032 = $7EF064 120 | RMFLG033 = $7EF066 121 | RMFLG034 = $7EF068 122 | RMFLG035 = $7EF06A 123 | RMFLG036 = $7EF06C 124 | RMFLG037 = $7EF06E 125 | RMFLG038 = $7EF070 126 | RMFLG039 = $7EF072 127 | RMFLG03A = $7EF074 128 | RMFLG03B = $7EF076 129 | RMFLG03C = $7EF078 130 | RMFLG03D = $7EF07A 131 | RMFLG03E = $7EF07C 132 | RMFLG03F = $7EF07E 133 | RMFLG040 = $7EF080 134 | RMFLG041 = $7EF082 135 | RMFLG042 = $7EF084 136 | RMFLG043 = $7EF086 137 | RMFLG044 = $7EF088 138 | RMFLG045 = $7EF08A 139 | RMFLG046 = $7EF08C 140 | RMFLG047 = $7EF08E 141 | RMFLG048 = $7EF090 142 | RMFLG049 = $7EF092 143 | RMFLG04A = $7EF094 144 | RMFLG04B = $7EF096 145 | RMFLG04C = $7EF098 146 | RMFLG04D = $7EF09A 147 | RMFLG04E = $7EF09C 148 | RMFLG04F = $7EF09E 149 | RMFLG050 = $7EF0A0 150 | RMFLG051 = $7EF0A2 151 | RMFLG052 = $7EF0A4 152 | RMFLG053 = $7EF0A6 153 | RMFLG054 = $7EF0A8 154 | RMFLG055 = $7EF0AA 155 | RMFLG056 = $7EF0AC 156 | RMFLG057 = $7EF0AE 157 | RMFLG058 = $7EF0B0 158 | RMFLG059 = $7EF0B2 159 | RMFLG05A = $7EF0B4 160 | RMFLG05B = $7EF0B6 161 | RMFLG05C = $7EF0B8 162 | RMFLG05D = $7EF0BA 163 | RMFLG05E = $7EF0BC 164 | RMFLG05F = $7EF0BE 165 | RMFLG060 = $7EF0C0 166 | RMFLG061 = $7EF0C2 167 | RMFLG062 = $7EF0C4 168 | RMFLG063 = $7EF0C6 169 | RMFLG064 = $7EF0C8 170 | RMFLG065 = $7EF0CA 171 | RMFLG066 = $7EF0CC 172 | RMFLG067 = $7EF0CE 173 | RMFLG068 = $7EF0D0 174 | RMFLG069 = $7EF0D2 175 | RMFLG06A = $7EF0D4 176 | RMFLG06B = $7EF0D6 177 | RMFLG06C = $7EF0D8 178 | RMFLG06D = $7EF0DA 179 | RMFLG06E = $7EF0DC 180 | RMFLG06F = $7EF0DE 181 | RMFLG070 = $7EF0E0 182 | RMFLG071 = $7EF0E2 183 | RMFLG072 = $7EF0E4 184 | RMFLG073 = $7EF0E6 185 | RMFLG074 = $7EF0E8 186 | RMFLG075 = $7EF0EA 187 | RMFLG076 = $7EF0EC 188 | RMFLG077 = $7EF0EE 189 | RMFLG078 = $7EF0F0 190 | RMFLG079 = $7EF0F2 191 | RMFLG07A = $7EF0F4 192 | RMFLG07B = $7EF0F6 193 | RMFLG07C = $7EF0F8 194 | RMFLG07D = $7EF0FA 195 | RMFLG07E = $7EF0FC 196 | RMFLG07F = $7EF0FE 197 | RMFLG080 = $7EF100 198 | RMFLG081 = $7EF102 199 | RMFLG082 = $7EF104 200 | RMFLG083 = $7EF106 201 | RMFLG084 = $7EF108 202 | RMFLG085 = $7EF10A 203 | RMFLG086 = $7EF10C 204 | RMFLG087 = $7EF10E 205 | RMFLG088 = $7EF110 206 | RMFLG089 = $7EF112 207 | RMFLG08A = $7EF114 208 | RMFLG08B = $7EF116 209 | RMFLG08C = $7EF118 210 | RMFLG08D = $7EF11A 211 | RMFLG08E = $7EF11C 212 | RMFLG08F = $7EF11E 213 | RMFLG090 = $7EF120 214 | RMFLG091 = $7EF122 215 | RMFLG092 = $7EF124 216 | RMFLG093 = $7EF126 217 | RMFLG094 = $7EF128 218 | RMFLG095 = $7EF12A 219 | RMFLG096 = $7EF12C 220 | RMFLG097 = $7EF12E 221 | RMFLG098 = $7EF130 222 | RMFLG099 = $7EF132 223 | RMFLG09A = $7EF134 224 | RMFLG09B = $7EF136 225 | RMFLG09C = $7EF138 226 | RMFLG09D = $7EF13A 227 | RMFLG09E = $7EF13C 228 | RMFLG09F = $7EF13E 229 | RMFLG0A0 = $7EF140 230 | RMFLG0A1 = $7EF142 231 | RMFLG0A2 = $7EF144 232 | RMFLG0A3 = $7EF146 233 | RMFLG0A4 = $7EF148 234 | RMFLG0A5 = $7EF14A 235 | RMFLG0A6 = $7EF14C 236 | RMFLG0A7 = $7EF14E 237 | RMFLG0A8 = $7EF150 238 | RMFLG0A9 = $7EF152 239 | RMFLG0AA = $7EF154 240 | RMFLG0AB = $7EF156 241 | RMFLG0AC = $7EF158 242 | RMFLG0AD = $7EF15A 243 | RMFLG0AE = $7EF15C 244 | RMFLG0AF = $7EF15E 245 | RMFLG0B0 = $7EF160 246 | RMFLG0B1 = $7EF162 247 | RMFLG0B2 = $7EF164 248 | RMFLG0B3 = $7EF166 249 | RMFLG0B4 = $7EF168 250 | RMFLG0B5 = $7EF16A 251 | RMFLG0B6 = $7EF16C 252 | RMFLG0B7 = $7EF16E 253 | RMFLG0B8 = $7EF170 254 | RMFLG0B9 = $7EF172 255 | RMFLG0BA = $7EF174 256 | RMFLG0BB = $7EF176 257 | RMFLG0BC = $7EF178 258 | RMFLG0BD = $7EF17A 259 | RMFLG0BE = $7EF17C 260 | RMFLG0BF = $7EF17E 261 | RMFLG0C0 = $7EF180 262 | RMFLG0C1 = $7EF182 263 | RMFLG0C2 = $7EF184 264 | RMFLG0C3 = $7EF186 265 | RMFLG0C4 = $7EF188 266 | RMFLG0C5 = $7EF18A 267 | RMFLG0C6 = $7EF18C 268 | RMFLG0C7 = $7EF18E 269 | RMFLG0C8 = $7EF190 270 | RMFLG0C9 = $7EF192 271 | RMFLG0CA = $7EF194 272 | RMFLG0CB = $7EF196 273 | RMFLG0CC = $7EF198 274 | RMFLG0CD = $7EF19A 275 | RMFLG0CE = $7EF19C 276 | RMFLG0CF = $7EF19E 277 | RMFLG0D0 = $7EF1A0 278 | RMFLG0D1 = $7EF1A2 279 | RMFLG0D2 = $7EF1A4 280 | RMFLG0D3 = $7EF1A6 281 | RMFLG0D4 = $7EF1A8 282 | RMFLG0D5 = $7EF1AA 283 | RMFLG0D6 = $7EF1AC 284 | RMFLG0D7 = $7EF1AE 285 | RMFLG0D8 = $7EF1B0 286 | RMFLG0D9 = $7EF1B2 287 | RMFLG0DA = $7EF1B4 288 | RMFLG0DB = $7EF1B6 289 | RMFLG0DC = $7EF1B8 290 | RMFLG0DD = $7EF1BA 291 | RMFLG0DE = $7EF1BC 292 | RMFLG0DF = $7EF1BE 293 | RMFLG0E0 = $7EF1C0 294 | RMFLG0E1 = $7EF1C2 295 | RMFLG0E2 = $7EF1C4 296 | RMFLG0E3 = $7EF1C6 297 | RMFLG0E4 = $7EF1C8 298 | RMFLG0E5 = $7EF1CA 299 | RMFLG0E6 = $7EF1CC 300 | RMFLG0E7 = $7EF1CE 301 | RMFLG0E8 = $7EF1D0 302 | RMFLG0E9 = $7EF1D2 303 | RMFLG0EA = $7EF1D4 304 | RMFLG0EB = $7EF1D6 305 | RMFLG0EC = $7EF1D8 306 | RMFLG0ED = $7EF1DA 307 | RMFLG0EE = $7EF1DC 308 | RMFLG0EF = $7EF1DE 309 | RMFLG0F0 = $7EF1E0 310 | RMFLG0F1 = $7EF1E2 311 | RMFLG0F2 = $7EF1E4 312 | RMFLG0F3 = $7EF1E6 313 | RMFLG0F4 = $7EF1E8 314 | RMFLG0F5 = $7EF1EA 315 | RMFLG0F6 = $7EF1EC 316 | RMFLG0F7 = $7EF1EE 317 | RMFLG0F8 = $7EF1F0 318 | RMFLG0F9 = $7EF1F2 319 | RMFLG0FA = $7EF1F4 320 | RMFLG0FB = $7EF1F6 321 | RMFLG0FC = $7EF1F8 322 | RMFLG0FD = $7EF1FA 323 | RMFLG0FE = $7EF1FC 324 | RMFLG0FF = $7EF1FE 325 | RMFLG100 = $7EF200 326 | RMFLG101 = $7EF202 327 | RMFLG102 = $7EF204 328 | RMFLG103 = $7EF206 329 | RMFLG104 = $7EF208 330 | RMFLG105 = $7EF20A 331 | RMFLG106 = $7EF20C 332 | RMFLG107 = $7EF20E 333 | RMFLG108 = $7EF210 334 | RMFLG109 = $7EF212 335 | RMFLG10A = $7EF214 336 | RMFLG10B = $7EF216 337 | RMFLG10C = $7EF218 338 | RMFLG10D = $7EF21A 339 | RMFLG10E = $7EF21C 340 | RMFLG10F = $7EF21E 341 | RMFLG110 = $7EF220 342 | RMFLG111 = $7EF222 343 | RMFLG112 = $7EF224 344 | RMFLG113 = $7EF226 345 | RMFLG114 = $7EF228 346 | RMFLG115 = $7EF22A 347 | RMFLG116 = $7EF22C 348 | RMFLG117 = $7EF22E 349 | RMFLG118 = $7EF230 350 | RMFLG119 = $7EF232 351 | RMFLG11A = $7EF234 352 | RMFLG11B = $7EF236 353 | RMFLG11C = $7EF238 354 | RMFLG11D = $7EF23A 355 | RMFLG11E = $7EF23C 356 | RMFLG11F = $7EF23E 357 | RMFLG120 = $7EF240 358 | RMFLG121 = $7EF242 359 | RMFLG122 = $7EF244 360 | RMFLG123 = $7EF246 361 | RMFLG124 = $7EF248 362 | RMFLG125 = $7EF24A 363 | RMFLG126 = $7EF24C 364 | RMFLG127 = $7EF24E 365 | RMFLG128 = $7EF250 366 | RMFLG129 = $7EF252 367 | RMFLG12A = $7EF254 368 | RMFLG12B = $7EF256 369 | RMFLG12C = $7EF258 370 | RMFLG12D = $7EF25A 371 | RMFLG12E = $7EF25C 372 | RMFLG12F = $7EF25E 373 | RMFLG130 = $7EF260 374 | RMFLG131 = $7EF262 375 | RMFLG132 = $7EF264 376 | RMFLG133 = $7EF266 377 | RMFLG134 = $7EF268 378 | RMFLG135 = $7EF26A 379 | RMFLG136 = $7EF26C 380 | RMFLG137 = $7EF26E 381 | RMFLG138 = $7EF270 382 | RMFLG139 = $7EF272 383 | RMFLG13A = $7EF274 384 | RMFLG13B = $7EF276 385 | RMFLG13C = $7EF278 386 | RMFLG13D = $7EF27A 387 | RMFLG13E = $7EF27C 388 | RMFLG13F = $7EF27E 389 | 390 | ;=================================================================================================== 391 | ; Overworld data 392 | ; .io. ..b. 393 | ; i - item collected / lightning barrier destroyed 394 | ; o - overlay active 395 | ; b - bomb wall opened 396 | ;=================================================================================================== 397 | OWFLG00 = $7EF280 398 | OWFLG01 = $7EF281 399 | OWFLG02 = $7EF282 400 | OWFLG03 = $7EF283 401 | OWFLG04 = $7EF284 402 | OWFLG05 = $7EF285 403 | OWFLG06 = $7EF286 404 | OWFLG07 = $7EF287 405 | OWFLG08 = $7EF288 406 | OWFLG09 = $7EF289 407 | OWFLG0A = $7EF28A 408 | OWFLG0B = $7EF28B 409 | OWFLG0C = $7EF28C 410 | OWFLG0D = $7EF28D 411 | OWFLG0E = $7EF28E 412 | OWFLG0F = $7EF28F 413 | OWFLG10 = $7EF290 414 | OWFLG11 = $7EF291 415 | OWFLG12 = $7EF292 416 | OWFLG13 = $7EF293 417 | OWFLG14 = $7EF294 418 | OWFLG15 = $7EF295 419 | OWFLG16 = $7EF296 420 | OWFLG17 = $7EF297 421 | OWFLG18 = $7EF298 422 | OWFLG19 = $7EF299 423 | OWFLG1A = $7EF29A 424 | OWFLG1B = $7EF29B 425 | OWFLG1C = $7EF29C 426 | OWFLG1D = $7EF29D 427 | OWFLG1E = $7EF29E 428 | OWFLG1F = $7EF29F 429 | OWFLG20 = $7EF2A0 430 | OWFLG21 = $7EF2A1 431 | OWFLG22 = $7EF2A2 432 | OWFLG23 = $7EF2A3 433 | OWFLG24 = $7EF2A4 434 | OWFLG25 = $7EF2A5 435 | OWFLG26 = $7EF2A6 436 | OWFLG27 = $7EF2A7 437 | OWFLG28 = $7EF2A8 438 | OWFLG29 = $7EF2A9 439 | OWFLG2A = $7EF2AA 440 | OWFLG2B = $7EF2AB 441 | OWFLG2C = $7EF2AC 442 | OWFLG2D = $7EF2AD 443 | OWFLG2E = $7EF2AE 444 | OWFLG2F = $7EF2AF 445 | OWFLG30 = $7EF2B0 446 | OWFLG31 = $7EF2B1 447 | OWFLG32 = $7EF2B2 448 | OWFLG33 = $7EF2B3 449 | OWFLG34 = $7EF2B4 450 | OWFLG35 = $7EF2B5 451 | OWFLG36 = $7EF2B6 452 | OWFLG37 = $7EF2B7 453 | OWFLG38 = $7EF2B8 454 | OWFLG39 = $7EF2B9 455 | OWFLG3A = $7EF2BA 456 | OWFLG3B = $7EF2BB 457 | OWFLG3C = $7EF2BC 458 | OWFLG3D = $7EF2BD 459 | OWFLG3E = $7EF2BE 460 | OWFLG3F = $7EF2BF 461 | OWFLG40 = $7EF2C0 462 | OWFLG41 = $7EF2C1 463 | OWFLG42 = $7EF2C2 464 | OWFLG43 = $7EF2C3 465 | OWFLG44 = $7EF2C4 466 | OWFLG45 = $7EF2C5 467 | OWFLG46 = $7EF2C6 468 | OWFLG47 = $7EF2C7 469 | OWFLG48 = $7EF2C8 470 | OWFLG49 = $7EF2C9 471 | OWFLG4A = $7EF2CA 472 | OWFLG4B = $7EF2CB 473 | OWFLG4C = $7EF2CC 474 | OWFLG4D = $7EF2CD 475 | OWFLG4E = $7EF2CE 476 | OWFLG4F = $7EF2CF 477 | OWFLG50 = $7EF2D0 478 | OWFLG51 = $7EF2D1 479 | OWFLG52 = $7EF2D2 480 | OWFLG53 = $7EF2D3 481 | OWFLG54 = $7EF2D4 482 | OWFLG55 = $7EF2D5 483 | OWFLG56 = $7EF2D6 484 | OWFLG57 = $7EF2D7 485 | OWFLG58 = $7EF2D8 486 | OWFLG59 = $7EF2D9 487 | OWFLG5A = $7EF2DA 488 | OWFLG5B = $7EF2DB 489 | OWFLG5C = $7EF2DC 490 | OWFLG5D = $7EF2DD 491 | OWFLG5E = $7EF2DE 492 | OWFLG5F = $7EF2DF 493 | OWFLG60 = $7EF2E0 494 | OWFLG61 = $7EF2E1 495 | OWFLG62 = $7EF2E2 496 | OWFLG63 = $7EF2E3 497 | OWFLG64 = $7EF2E4 498 | OWFLG65 = $7EF2E5 499 | OWFLG66 = $7EF2E6 500 | OWFLG67 = $7EF2E7 501 | OWFLG68 = $7EF2E8 502 | OWFLG69 = $7EF2E9 503 | OWFLG6A = $7EF2EA 504 | OWFLG6B = $7EF2EB 505 | OWFLG6C = $7EF2EC 506 | OWFLG6D = $7EF2ED 507 | OWFLG6E = $7EF2EE 508 | OWFLG6F = $7EF2EF 509 | OWFLG70 = $7EF2F0 510 | OWFLG71 = $7EF2F1 511 | OWFLG72 = $7EF2F2 512 | OWFLG73 = $7EF2F3 513 | OWFLG74 = $7EF2F4 514 | OWFLG75 = $7EF2F5 515 | OWFLG76 = $7EF2F6 516 | OWFLG77 = $7EF2F7 517 | OWFLG78 = $7EF2F8 518 | OWFLG79 = $7EF2F9 519 | OWFLG7A = $7EF2FA 520 | OWFLG7B = $7EF2FB 521 | OWFLG7C = $7EF2FC 522 | OWFLG7D = $7EF2FD 523 | OWFLG7E = $7EF2FE 524 | OWFLG7F = $7EF2FF 525 | 526 | ; Most of these special screens aren't actually reachable 527 | OWFLG80 = $7EF300 528 | OWFLG81 = $7EF301 529 | 530 | ; Completely unused 531 | ; but written to when splashing in special overworld 532 | ; because of some shared code 533 | OWFLG82 = $7EF302 534 | OWFLG83 = $7EF303 535 | OWFLG84 = $7EF304 536 | OWFLG85 = $7EF305 537 | OWFLG86 = $7EF306 538 | OWFLG87 = $7EF307 539 | OWFLG88 = $7EF308 540 | OWFLG89 = $7EF309 541 | OWFLG8A = $7EF30A 542 | OWFLG8B = $7EF30B 543 | OWFLG8C = $7EF30C 544 | OWFLG8D = $7EF30D 545 | OWFLG8E = $7EF30E 546 | OWFLG8F = $7EF30F 547 | OWFLG90 = $7EF310 548 | OWFLG91 = $7EF311 549 | OWFLG92 = $7EF312 550 | OWFLG93 = $7EF313 551 | OWFLG94 = $7EF314 552 | OWFLG95 = $7EF315 553 | OWFLG96 = $7EF316 554 | OWFLG97 = $7EF317 555 | OWFLG98 = $7EF318 556 | OWFLG99 = $7EF319 557 | OWFLG9A = $7EF31A 558 | OWFLG9B = $7EF31B 559 | OWFLG9C = $7EF31C 560 | OWFLG9D = $7EF31D 561 | OWFLG9E = $7EF31E 562 | OWFLG9F = $7EF31F 563 | 564 | ;=================================================================================================== 565 | ; Items 566 | ;=================================================================================================== 567 | ; 0x00 - Nothing 568 | ; 0x01 - Bow 569 | ; 0x02 - Bow and arrows 570 | ; 0x03 - Silver bow 571 | ; 0x04 - Silver bow and arrows 572 | ; Picking the arrow and nonarrow versions is done by the HUD draw routines 573 | BOW = $7EF340 574 | 575 | ; 0x00 - Nothing 576 | ; 0x01 - Blue boomerang 577 | ; 0x02 - Red boomerang 578 | BOOMER = $7EF341 579 | 580 | ; 0x00 - Nothing 581 | ; 0x01 - Hookshot 582 | HOOKSHOT = $7EF342 583 | 584 | ; Number of bombs 585 | BOMBS = $7EF343 586 | 587 | ; 0x00 - Nothing 588 | ; 0x01 - Mushroom 589 | ; 0x02 - Powder 590 | SHROOM = $7EF344 591 | 592 | ; 0x00 - Nothing 593 | ; 0x01 - Fire rod 594 | FIREROD = $7EF345 595 | 596 | ; 0x00 - Nothing 597 | ; 0x01 - Ice rod 598 | ICEROD = $7EF346 599 | 600 | ; 0x00 - Nothing 601 | ; 0x01 - Bombos medallion 602 | BOMBOS = $7EF347 603 | 604 | ; 0x00 - Nothing 605 | ; 0x01 - Ether medallion 606 | ETHER = $7EF348 607 | 608 | ; 0x00 - Nothing 609 | ; 0x01 - Quake medallion 610 | QUAKE = $7EF349 611 | 612 | ; 0x00 - Nothing 613 | ; 0x01 - Lamp 614 | LAMP = $7EF34A 615 | 616 | ; 0x00 - Nothing 617 | ; 0x01 - Magic hammer 618 | HAMMER = $7EF34B 619 | 620 | ; 0x00 - Nothing 621 | ; 0x01 - Shovel 622 | ; 0x02 - Inactive flute 623 | ; 0x03 - Active flute 624 | FLUTE = $7EF34C 625 | 626 | ; 0x00 - Nothing 627 | ; 0x01 - Bug catching net 628 | BUGNET = $7EF34D 629 | 630 | ; 0x00 - Nothing 631 | ; 0x01 - Book of Mudora 632 | BOOK = $7EF34E 633 | 634 | ; 0x00 - Nothing 635 | ; Other values indicate the index of the currently selected bottle 636 | BOTSEL = $7EF34F 637 | 638 | ; 0x00 - Nothing 639 | ; 0x01 - Cane of Somaria 640 | SOMARIA = $7EF350 641 | 642 | ; 0x00 - Nothing 643 | ; 0x01 - Cane of Byrna 644 | BYRNA = $7EF351 645 | 646 | ; 0x00 - Nothing 647 | ; 0x01 - Magic cape 648 | CAPE = $7EF352 649 | 650 | ; 0x00 - Nothing 651 | ; 0x01 - Letter (works like mirror) 652 | ; 0x02 - Mirror 653 | ; 0x03 - Triforce (scrapped) 654 | MIRROR = $7EF353 655 | 656 | ; 0x00 - Lift 1 (nothing) 657 | ; 0x01 - Lift 2 (power glove) 658 | ; 0x02 - Lift 3 (titan's mitt) 659 | GLOVES = $7EF354 660 | 661 | ; 0x00 - Nothing 662 | ; 0x01 - Pegasus boots 663 | ; bit 2 of $7E:F379 also needs to be set to actually dash 664 | BOOTS = $7EF355 665 | 666 | ; 0x00 - Nothing 667 | ; 0x01 - Zora's flippers 668 | FLIPPERS = $7EF356 669 | 670 | ; 0x00 - Nothing 671 | ; 0x01 - Moon pearl 672 | PEARL = $7EF357 673 | 674 | ; Appears to be for nothing 675 | UNUSED_7EF358 = $7EF358 676 | 677 | ; 0x00 - Nothing 678 | ; 0x01 - Fighter sword 679 | ; 0x02 - Master sword 680 | ; 0x03 - Tempered sword 681 | ; 0x04 - Golden sword 682 | ; 0xFF - Set when sword is handed in to smithy 683 | SWORD = $7EF359 684 | 685 | ; 0x00 - Nothing 686 | ; 0x01 - Fighter shield 687 | ; 0x02 - Fire shield 688 | ; 0x03 - Mirror shield 689 | SHIELD = $7EF35A 690 | 691 | ; 0x00 - Green jerkin 692 | ; 0x01 - Blue mail 693 | ; 0x02 - Red mail 694 | ARMOR = $7EF35B 695 | 696 | ; 0x00 - Nothing 697 | ; 0x01 - Mushroom (unused) 698 | ; 0x02 - Empty bottle 699 | ; 0x03 - Red potion 700 | ; 0x04 - Green potion 701 | ; 0x05 - Blue potion 702 | ; 0x06 - Fairy 703 | ; 0x07 - Bee 704 | ; 0x08 - Good bee 705 | BOTTLE1 = $7EF35C 706 | BOTTLE2 = $7EF35D 707 | BOTTLE3 = $7EF35E 708 | BOTTLE4 = $7EF35F 709 | 710 | ; Number of rupees you have 711 | ; RUPEEDISP will be incremented or decremented until it reaches this value 712 | RUPEES = $7EF360 713 | 714 | ; Rupee count displayed on the HUD 715 | RUPEEDISP = $7EF362 716 | 717 | ; Bitfields for ownership of various dungeon items 718 | ; SET 2 SET 1 719 | ; xced aspm wihb tg.. 720 | ; c - Hyrule Castle 721 | ; x - Sewers 722 | ; a - Agahnim's Tower 723 | ; 724 | ; e - Eastern Palace 725 | ; d - Desert Palace 726 | ; h - Tower of Hera 727 | ; 728 | ; p - Palace of Darkness 729 | ; s - Swamp Palace 730 | ; w - Skull Woods 731 | ; b - Thieves' Town 732 | ; i - Ice Palace 733 | ; m - Misery Mire 734 | ; t - Turtle Rock 735 | ; g - Ganon's Tower 736 | COMPASS1 = $7EF364 737 | COMPASS2 = $7EF365 738 | 739 | BIGKEY1 = $7EF366 740 | BIGKEY2 = $7EF367 741 | 742 | DNGMAP1 = $7EF368 743 | DNGMAP2 = $7EF369 744 | 745 | ; Number of rupees donated to fairies 746 | WISHRUP = $7EF36A 747 | 748 | ; Number of heart pieces towards next container 749 | ; Intended to be a value from 0-3 750 | HEARTPC = $7EF36B 751 | 752 | ; Maximum health; 1 heart container = 0x08 HP 753 | MAXHP = $7EF36C 754 | 755 | ; Current health 756 | ; You die at 0x00 757 | ; You also die at ≥0xA8 758 | CURHP = $7EF36D 759 | 760 | ; Magic power, capped at 128 761 | MAGPOW = $7EF36E 762 | 763 | ; Current number of keys for whatever dungeon is loaded 764 | KEYS = $7EF36F 765 | 766 | ; Number of capacity upgrades received 767 | BOMBCAP = $7EF370 768 | ARROWCAP = $7EF371 769 | 770 | ; Refills health 771 | ; Expects multiples of 8 772 | HEALME = $7EF372 773 | 774 | ; Refills magic 775 | ZAPME = $7EF373 776 | 777 | ; ... ..gbr 778 | ; r - Wisdom (red) 779 | ; b - Power (blue) 780 | ; g - Courage (green) 781 | PENDANTS = $7EF374 782 | 783 | ; Refills bombs 784 | BOMBME = $7EF375 785 | 786 | ; Refills arrows 787 | SHOOTME = $7EF376 788 | 789 | ; Arrow count 790 | ARROWS = $7EF377 791 | 792 | ; Unused 793 | UNUSED_7EF378 = $7EF378 794 | 795 | ; Displays ability flags 796 | ; lrtu pbsh 797 | ; h - Pray (unused and mostly cut off by HUD borders) 798 | ; s - Swim 799 | ; b - Run 800 | ; u - unused but set by default 801 | ; p - Pull 802 | ; t - Talk 803 | ; r - Read 804 | ; l - Lift 805 | ; This only controls the display of "LIFT.1" 806 | ; If this bit is unset but LIFT is set then the proper lift text is displayed 807 | ABILITY = $7EF379 808 | 809 | ; .wbs tipm 810 | ; p - Palace of Darkness 811 | ; s - Swamp Palace 812 | ; w - Skull Woods 813 | ; b - Thieves' Town 814 | ; i - Ice Palace 815 | ; m - Misery Mire 816 | ; t - Turtle Rock 817 | CRYSTALS = $7EF37A 818 | 819 | ; 0x00 - Normal magic 820 | ; 0x01 - Half magic 821 | ; 0x02 - Quarter magic 822 | ; Quarter magic has no special HUD graphic, unlike half magic 823 | ; Also, not everything is necessarily quarter magic 824 | MAGCON = $7EF37B 825 | 826 | ; Keys earned per dungeon 827 | ; Sewers and Castle are kept in sync 828 | KEYSSEWER = $7EF37C 829 | KEYSHYRULE = $7EF37D 830 | KEYSEAST = $7EF37E 831 | KEYSDESERT = $7EF37F 832 | KEYSAGA = $7EF380 833 | KEYSSWAMP = $7EF381 834 | KEYSPOD = $7EF382 835 | KEYSMIRE = $7EF383 836 | KEYSWOODS = $7EF384 837 | KEYSICE = $7EF385 838 | KEYSHERA = $7EF386 839 | KEYSTHIEF = $7EF387 840 | KEYSTROCK = $7EF388 841 | KEYSGANON = $7EF389 842 | 843 | ; Unused block of SRAM 844 | UNUSED_7EF38A = $7EF38A 845 | 846 | ; Game state 847 | ; 0x00 - Very start; progress cannot be saved in this state 848 | ; 0x01 - Uncle reached 849 | ; 0x02 - Zelda rescued 850 | ; 0x03 - Agahnim defeated 851 | GAMESTATE = $7EF3C5 852 | 853 | ; Bitfield of less important progression 854 | ; .fbh .zsu 855 | ; u - Uncle visited in secret passage; controls spawn (0: spawn | 1: gone) 856 | ; s - Priest visited in sanc after Zelda is kidnapped again 857 | ; z - Zelda brought to sanc 858 | ; h - Uncle has left Link's house; controls spawn (0: spawn | 1: gone) 859 | ; b - Book of Mudora obtained/mentioned; controls Aginah dialog 860 | ; f - Flipped by fortune tellers to decide which fortune set to give 861 | PROGLITE = $7EF3C6 862 | 863 | ; Map icon to guide noob players 864 | ; 0x00 - Red X on castle | Save zelda 865 | ; 0x01 - Red X on Kakariko | Talk to villagers about elders 866 | ; 0x02 - Red X on Eastern | Talk to Sahasrahla 867 | ; 0x03 - Pendants and MS | Obtain the master sword 868 | ; 0x04 - Master sword on LW | Grab the master sword 869 | ; 0x05 - Skull on castle | Kill Agahnim 870 | ; 0x06 - Crystal on POD | Get the first crystal 871 | ; 0x07 - Crystals | Get all 7 crystals 872 | ; 0x08 - Skull on GT | Climb Ganon's Tower 873 | MAPICON = $7EF3C7 874 | 875 | ; 0x00 - Link's house 876 | ; 0x01 - Sanctuary 877 | ; 0x02 - Prison 878 | ; 0x03 - Uncle 879 | ; 0x04 - Throne 880 | ; 0x05 - Old man cave 881 | ; 0x06 - Old man home 882 | SPAWNPT = $7EF3C8 883 | 884 | ; Another bitfield for progress 885 | ; t.dp s.bh 886 | ; t - smiths are currently tempering sword 887 | ; d - swordsmith rescued 888 | ; p - purple chest has been opened 889 | ; s - stumpy has been stumped 890 | ; b - bottle purchased from vendor 891 | ; h - bottle received from hobo 892 | PROGLITE2 = $7EF3C9 893 | 894 | ; .d.. .... 895 | ; d - World (0: Light World | 1: Dark World) 896 | ; high byte is mostly unused, but expected to be 00, as pots read it in 16-bit 897 | SAVEWORLD = $7EF3CA 898 | SAVEWORLDU = $7EF3CB 899 | 900 | ; Current follower ID 901 | FOLLOWER = $7EF3CC 902 | 903 | ; Cache of follower properties 904 | FOLLOWCYL = $7EF3CD 905 | FOLLOWCYH = $7EF3CE 906 | FOLLOWCXL = $7EF3CF 907 | FOLLOWCXH = $7EF3D0 908 | 909 | ; Copies INDOORS 910 | FOLLOWERINOUT = $7EF3D1 911 | 912 | ; Copies LAYER 913 | FOLLOWERCLAYER = $7EF3D2 914 | 915 | ; Indicates the follower is currently following 916 | ; 0x00 - Following 917 | ; 0x80 - Not following 918 | FOLLOWERING = $7EF3D3 919 | 920 | ; Unused 921 | UNUSED_7EF3D4 = $7EF3D4 922 | UNUSED_7EF3D5 = $7EF3D5 923 | UNUSED_7EF3D6 = $7EF3D6 924 | UNUSED_7EF3D7 = $7EF3D7 925 | UNUSED_7EF3D8 = $7EF3D8 926 | 927 | ; Player name 928 | NAME1L = $7EF3D9 929 | NAME1H = $7EF3DA 930 | NAME2L = $7EF3DB 931 | NAME2H = $7EF3DC 932 | NAME3L = $7EF3DD 933 | NAME3H = $7EF3DE 934 | NAME4L = $7EF3DF 935 | NAME4H = $7EF3E0 936 | 937 | ; Save file checksum; expected to be $55AA 938 | SCHKSML = $7EF3E1 939 | SCHKSMH = $7EF3E2 940 | 941 | ; Games played in each dungeon 942 | GPSEWER = $7EF3E3 943 | GPHYRULE = $7EF3E5 944 | GPEAST = $7EF3E7 945 | GPDESERT = $7EF3E9 946 | GPAGA = $7EF3EB 947 | GPSWAMP = $7EF3ED 948 | GPPOD = $7EF3EF 949 | GPMIRE = $7EF3F1 950 | GPWOODS = $7EF3F3 951 | GPICE = $7EF3F5 952 | GPHERA = $7EF3F7 953 | GPTHIEF = $7EF3F9 954 | GPTROCK = $7EF3FB 955 | GPGANON = $7EF3FD 956 | 957 | ; Games played for current segment 958 | GPNOW = $7EF3FF 959 | 960 | ; Total games played 961 | ; No display on file select if 0xFFFF 962 | GAMESPLAYED = $7EF401 963 | 964 | ; Big unused block 965 | UNUSED_7EF403 = $7EF403 966 | 967 | ; Inverse checksum for save file 968 | SAVEICKSML = $7EF4FE 969 | SAVEICKSMH = $7EF4FF 970 | 971 | ;=================================================================================================== -------------------------------------------------------------------------------- /registers.asm: -------------------------------------------------------------------------------- 1 | ;=================================================================================================== 2 | ; KEY 3 | ;=================================================================================================== 4 | ; w - writeable 5 | ; r - readable 6 | ; 1 - single access 7 | ; 2 - double access 8 | ; for double write registers, the first write (low byte) is listed first 9 | ; . - unused bit (open bus) 10 | ;=================================================================================================== 11 | 12 | ;=================================================================================================== 13 | ;=================================================================================================== 14 | ; PPU REGISTERS 15 | ;--------------------------------------------------------------------------------------------------- 16 | ; f - accessible during fblank 17 | ; v - accessible during vblank 18 | ; h - accessible during hblank 19 | ; a - accessible anytime 20 | ;=================================================================================================== 21 | ;=================================================================================================== 22 | 23 | ; SCREEN SETTINGS 24 | ; INIDISP f... bbbb w1 fvha 25 | ; f - force blank (0: disabled | 1: enabled) 26 | ; b - screen brightness (0..F) 27 | INIDISP = $002100 28 | 29 | ; OAM CHARACTER ADDRESSES AND OBJECT SIZE 30 | ; OBSEL sssn nbbb w1 fv 31 | ; s - object sizes 32 | ; sss small large 33 | ; 000 8x8 16x16 34 | ; 001 8x8 32x32 35 | ; 010 8x8 64x64 36 | ; 011 16x16 32x32 37 | ; 100 16x16 64x64 38 | ; 101 32x32 64x64 39 | ; 110 16x32 32x64 40 | ; 111 16x32 32x32 41 | ; n - space between object namespaces, $1000 word steps 42 | ; b - obj tile address - $2000 word steps 43 | OBSEL = $002101 44 | 45 | ; OAM ADDRESS ACCESS 46 | ; OAMADDL aaaa aaaa w1 fv 47 | ; OAMADDH p... ...a w1 fv 48 | ; a - OAM address 49 | ; p - object priority cycle (0: OBJ0 highest priority | 1: priority cycles) 50 | OAMADDL = $002102 : OAMADDR = $002102 51 | OAMADDH = $002103 52 | 53 | ; OAM DATA WRITE 54 | ; OAMDATA oooo oooo w1 fv 55 | ; o - OAM data 56 | OAMDATA = $002104 57 | 58 | ; BACKGROUND MODE AND CHARACTER SIZE 59 | ; BGMODE dcba pmmm w1 fvh 60 | ; a - BG1 tile size (0: 8x8 | 1: 16x16) 61 | ; b - BG2 tile size (0: 8x8 | 1: 16x16) 62 | ; c - BG3 tile size (0: 8x8 | 1: 16x16) 63 | ; d - BG4 tile size (0: 8x8 | 1: 16x16) 64 | ; p - Mode 1 BG3 priority (0: normal | 1: highest) 65 | ; m - BG mode 66 | ; BG1 BG2 BG3 BG4 Features 67 | ; 0 - 2bpp 2bpp 2bpp 2bpp None 68 | ; 1 - 4bpp 4bpp 2bpp ---- None 69 | ; 2 - 4bpp 4bpp offs ---- Offset per tile 70 | ; 3 - 8bpp 4bpp ---- ---- None 71 | ; 4 - 8bpp 2bpp offs ---- Offset per tile 72 | ; 5 - 4bpp 2bpp ---- ---- Hires 73 | ; 6 - 4bpp ---- offs ---- Hires / Offset per tile 74 | ; 7 - 8bpp EXT ---- ---- Affine transformation 75 | BGMODE = $002105 76 | 77 | ; MOSAIC SIZE AND DESIGNATION 78 | ; MOSAIC ssss dcba w1 fvh 79 | ; a - mosaic to BG1 (0: disabled | 1: enabled) 80 | ; b - mosaic to BG2 (0: disabled | 1: enabled) 81 | ; c - mosaic to BG3 (0: disabled | 1: enabled) 82 | ; d - mosaic to BG4 (0: disabled | 1: enabled) 83 | ; s - pixelation size 84 | MOSAIC = $002106 85 | 86 | ; BACKGROUND TILEMAP ADDRESS AND TILEMAP SIZE 87 | ; BG1SC aaaa aavh w1 fv 88 | ; BG2SC aaaa aavh w1 fv 89 | ; BG3SC aaaa aavh w1 fv 90 | ; BG4SC aaaa aavh w1 fv 91 | ; a - tilemap address in $400 word steps 92 | ; v - tilemap height (0: 32 tiles | 1: 64 tiles) 93 | ; h - tilemap width (0: 32 tiles | 1: 64 tiles) 94 | BG1SC = $002107 95 | BG2SC = $002108 96 | BG3SC = $002109 97 | BG4SC = $00210A 98 | 99 | ; BACKGROUND CHARACTER ADDRESS 100 | ; BG12NBA bbbb aaaa w1 fv 101 | ; BG34NBA dddd cccc w1 fv 102 | ; a - base address for BG1 tiles in $1000 word steps 103 | ; b - base address for BG2 tiles in $1000 word steps 104 | ; c - base address for BG3 tiles in $1000 word steps 105 | ; d - base address for BG4 tiles in $1000 word steps 106 | ; 0 0000 $0000 107 | ; 1 0001 $2000 108 | ; 2 0010 $4000 109 | ; etc... 110 | BG12NBA = $00210B 111 | BG34NBA = $00210C 112 | 113 | ; BACKGROUND HORIZONTAL AND VERTICAL SCROLL 114 | ; BG1HOFS oooo oooo ...m mmoo w2 fvh 115 | ; BG1VOFS oooo oooo ...m mmoo w2 fvh 116 | ; BG2HOFS oooo oooo ...m mmoo w2 fvh 117 | ; BG2VOFS oooo oooo ...m mmoo w2 fvh 118 | ; BG3HOFS oooo oooo ...m mmoo w2 fvh 119 | ; BG3VOFS oooo oooo ...m mmoo w2 fvh 120 | ; BG4HOFS oooo oooo ...m mmoo w2 fvh 121 | ; BG4VOFS oooo oooo ...m mmoo w2 fvh 122 | ; o - offset (modes 0-6) 123 | ; mo - offset (mode 7) 124 | BG1HOFS = $00210D : M7HOFS = $00210D 125 | BG1VOFS = $00210E : M7VOFS = $00210E 126 | BG2HOFS = $00210F 127 | BG2VOFS = $002110 128 | BG3HOFS = $002111 129 | BG3VOFS = $002112 130 | BG4HOFS = $002113 131 | BG4VOFS = $002114 132 | 133 | ; VRAM ADDRESS INCREMENT AND REMAPPING 134 | ; VMAIN v... mmii w1 fv 135 | ; v - increment address after writes to (0: $2118 | 1: $2119) 136 | ; m - remap addressing 137 | ; 00 - none 138 | ; 01 - aaaaaaaabbbccccc => aaaaaaaacccccbbb 139 | ; 10 - aaaaaaabbbcccccc => aaaaaaaccccccbbb 140 | ; 11 - aaaaaabbbccccccc => aaaaaacccccccbbb 141 | ; i - address increment 142 | ; 00 - increment by 1 143 | ; 01 - increment by 32 144 | ; 10 - increment by 128 145 | ; 11 - increment by 128 146 | VMAIN = $002115 147 | 148 | ; VRAM ADDRESS ACCESS 149 | ; VMADDL llll llll w1 fv 150 | ; VMADDH hhhh hhhh w1 fv 151 | ; l - VRAM address low byte 152 | ; h - VRAM address high byte 153 | VMADDL = $002116 : VMADDR = $002116 154 | VMADDH = $002117 155 | 156 | ; VRAM WRITE DATA 157 | ; VMDATAL llll llll w1 fv 158 | ; VMDATAH hhhh hhhh w1 fv 159 | ; l - VRAM data low byte 160 | ; h - VRAM data high byte 161 | VMDATAL = $002118 : VMDATA = $002118 162 | VMDATAH = $002119 163 | 164 | ; MODE 7 SETTINGS 165 | ; M7SEL we.. ..vh w1 fv 166 | ; w - tilemap wrapping (0: wrap | 1: no wrap) 167 | ; e - empty space filler w/ no wrap (0: transparent | 1: tile 0) 168 | ; v - mirror tilemap vertically 169 | ; h - mirror tilemap horizontally 170 | M7SEL = $00211A 171 | 172 | ; MODE 7 TRANSFORMATION PARAMETERS 173 | ; M7A vvvv vvvv vvvv vvvv w2 fvh 174 | ; M7B vvvv vvvv vvvv vvvv w2 fvh 175 | ; M7C vvvv vvvv vvvv vvvv w2 fvh 176 | ; M7D vvvv vvvv vvvv vvvv w2 fvh 177 | ; v - mode 7 parameter value 178 | ; 179 | ; SIGNED MULTIPLICATION ARGUMENTS 180 | ; M7A llll llll hhhh hhhh w2 fvha 181 | ; M7B mmmm mmmm w1 fvha 182 | ; l - low byte of 16-bit multiplicand 183 | ; h - high byte of 16-bit multiplicand 184 | ; m - 8-bit multiplicand 185 | ; SEE MULTIPLICATION RESULT 186 | ; Can be used at any time for signed multiplication in modes 0-6 with 0 delay. 187 | M7A = $00211B : PPUMULT16 = $00211B 188 | M7B = $00211C : PPUMULT8 = $00211C 189 | M7C = $00211D 190 | M7D = $00211E 191 | 192 | ; MODE 7 CENTER OF TRANSFORMATION COORDINATES 193 | ; M7X cccc cccc ...c cccc w2 fvh 194 | ; M7Y cccc cccc ...c cccc w2 fvh 195 | ; c - axis center 196 | M7X = $00211F 197 | M7Y = $002120 198 | 199 | ; CGRAM ADDRESS ACCESS 200 | ; CGADD aaaa aaaa w1 fvh 201 | ; a - CGRAM address 202 | ; Writes will reset the parity of both CGDATA and CGREAD. 203 | CGADD = $002121 204 | 205 | ; CGRAM WRITE DATA 206 | ; CGDATA gggr rrrr .bbb bbgg w2 fvh 207 | ; r - red component of color 208 | ; g - green component of color 209 | ; b - blue component of color 210 | CGDATA = $002122 211 | 212 | ; WINDOW MASK SETTINGS 213 | ; W12SEL poji feba w1 fvh 214 | ; W34SEL poji feba w1 fvh 215 | ; WOBJSEL poji feba w1 fvh 216 | ; a - window 1 logic on BG1/BG3/OBJ (0: normal | 1: invert) 217 | ; b - window 1 enable on BG1/BG3/OBJ (0: disabled | 1: enabled) 218 | ; e - window 2 logic on BG1/BG3/OBJ (0: normal | 1: invert) 219 | ; f - window 2 enable on BG1/BG3/OBJ (0: disabled | 1: enabled) 220 | ; i - window 1 logic on BG2/BG4/COL (0: normal | 1: invert) 221 | ; j - window 1 enable on BG2/BG4/COL (0: disabled | 1: enabled) 222 | ; o - window 2 logic on BG2/BG4/COL (0: normal | 1: invert) 223 | ; p - window 2 enable on BG2/BG4/COL (0: disabled | 1: enabled) 224 | W12SEL = $002123 225 | W34SEL = $002124 226 | WOBJSEL = $002125 227 | 228 | ; WINDOW POSITION DESIGNATION 229 | ; WH0 llll llll w1 fvh 230 | ; WH1 rrrr rrrr w1 fvh 231 | ; WH2 wwww wwww w1 fvh 232 | ; WH3 eeee eeee w1 fvh 233 | ; l - window 1 left edge 234 | ; r - window 1 right edge 235 | ; w - window 2 left edge 236 | ; e - window 2 right edge 237 | WH0 = $002126 : W1L = $002126 238 | WH1 = $002127 : W1R = $002127 239 | WH2 = $002128 : W2L = $002128 240 | WH3 = $002129 : W2R = $002129 241 | 242 | ; WINDOW MASK LOGIC 243 | ; WBGLOG ddcc bbaa w1 fvh 244 | ; WOBJLOG .... ccoo w1 fvh 245 | ; a - window mask logic for BG1 246 | ; b - window mask logic for BG2 247 | ; c - window mask logic for BG3 248 | ; d - window mask logic for BG4 249 | ; o - window mask logic for OBJ 250 | ; c - window mask logic for COL 251 | ; 00 - W1 OR W2 252 | ; 01 - W1 AND W2 253 | ; 10 - W1 XOR W2 254 | ; 11 - W1 XNOR W2 255 | ; Window mask logic does not apply unless both windows are enabled. 256 | WBGLOG = $00212A 257 | WOBJLOG = $00212B 258 | 259 | ; MAIN AND SUB SCREEN DESIGNATION 260 | ; TM ...o dcba w1 fvh 261 | ; TS ...o dcba w1 fvh 262 | ; a - BG1 (0: disabled | 1: enabled) 263 | ; b - BG2 (0: disabled | 1: enabled) 264 | ; c - BG3 (0: disabled | 1: enabled) 265 | ; d - BG4 (0: disabled | 1: enabled) 266 | ; o - OBJ (0: disabled | 1: enabled) 267 | TM = $00212C 268 | TS = $00212D 269 | 270 | ; MAIN AND SUB SCREEN WINDOW MASK DESIGNATION 271 | ; TMW ...o dcba w1 fvh 272 | ; TSW ...o dcba w1 fvh 273 | ; a - BG1 window mask (0: disabled | 1: enabled) 274 | ; b - BG2 window mask (0: disabled | 1: enabled) 275 | ; c - BG3 window mask (0: disabled | 1: enabled) 276 | ; d - BG4 window mask (0: disabled | 1: enabled) 277 | ; o - OBJ window mask (0: disabled | 1: enabled) 278 | TMW = $00212E 279 | TSW = $00212F 280 | 281 | ; COLOR MATH SETTINGS 282 | ; CGWSEL bbmm ..sd w1 fvh 283 | ; b - main screen black (same logic as m) 284 | ; m - disable color math 285 | ; 00 - never 286 | ; 01 - outside COL window 287 | ; 10 - inside COL window 288 | ; 11 - always 289 | ; s - color source (0: fixed color | 1: sub screen) 290 | ; d - direct color mode (0: enabled | 1: disabled) 291 | CGWSEL = $002130 292 | 293 | ; COLOR MATH DESIGNATION AND OPERATION 294 | ; CGADSUB shzo dcba w1 fvh 295 | ; s - color operation (0: addition | 1: subtraction) 296 | ; h - half color math (0: nothing | 1: final result halved) 297 | ; a - color math on BG1 (0: disabled | 1: enabled) 298 | ; b - color math on BG2 (0: disabled | 1: enabled) 299 | ; c - color math on BG3 (0: disabled | 1: enabled) 300 | ; d - color math on BG4 (0: disabled | 1: enabled) 301 | ; o - color math on OBJ (0: disabled | 1: enabled) 302 | ; z - color math on CGRAM0 (0: disabled | 1: enabled) 303 | CGADSUB = $002131 304 | 305 | ; COLOR MATH FIXED COLOR DATA 306 | ; COLDATA bgrc cccc w1 fvh 307 | ; b - set blue (0: ignore | 1: change) 308 | ; g - set green (0: ignore | 1: change) 309 | ; r - set red (0: ignore | 1: change) 310 | ; c - fixed color component value 311 | COLDATA = $002132 312 | 313 | ; SCREEN INTERLACE AND SYNC SETTINGS 314 | ; SETINI se.. pvoi w1 fvh 315 | ; s - external sync (0: normal | 1: super impose) 316 | ; e - mode 7 EXTBG (0: disabled | 1: enabled) 317 | ; p - pseudo h512 (0: disabled | 1: enabled - shifts sub screen half dot left) 318 | ; v - enable overscan (0: 224 lines | 1: 239 lines) 319 | ; o - object interlace (0: disabled | 1: enabled) 320 | ; i - screen interlace (0: disabled | 1: enabled - interlace to source) 321 | SETINI = $002133 322 | 323 | ; MULTIPLICATION RESULT 324 | ; MPYL llll llll r1 fvh 325 | ; MPYM mmmm mmmm r1 fvh 326 | ; MPYH hhhh hhhh r1 fvh 327 | ; l - low byte of product 328 | ; m - middle byte of product 329 | ; h - high byte of product 330 | ; SEE SIGNED MULTIPLICATION ARGUMENTS 331 | MPYL = $002134 332 | MPYM = $002135 333 | MPYH = $002136 334 | 335 | ; SOFTWARE LATCH FOR h/V COUNTER 336 | ; SLVH .... .... r1 fvha 337 | ; Contains no data; just a latch to update OPHCT and OPVCT 338 | SLVH = $002137 339 | 340 | ; OAM READ DATA 341 | ; OAMRAD oooo oooo r1 fv 342 | ; o - OAM data 343 | OAMREAD = $002138 344 | 345 | ; VRAM READ DATA 346 | ; VMREADL llll llll r1 fv 347 | ; VMREADH hhhh hhhh r1 fv 348 | ; l - low byte of VRAM data read 349 | ; h - high byte of VRAM data read 350 | VMREADL = $002139 351 | VMREADH = $00213A 352 | 353 | ; CGRAM READ DATA 354 | ; CGREAD gggr rrrr .bbb bbgg r2 fv 355 | ; r - red component of color 356 | ; g - green component of color 357 | ; b - blue component of color 358 | CGREAD = $00213B 359 | 360 | ; HORIZONTAL COUNTER FROM LAST LATCH 361 | ; OPHCT hhhh hhhh .... ...h r2 fvha 362 | ; h - horizontal dot position 363 | ; Expectaed value is from 0 to 339. 364 | OPHCT = $00213C 365 | 366 | ; VERTICAL COUNTER FROM LAST LATCH 367 | ; OPVCT vvvv vvvv .... ...v r2 fvha 368 | ; v - vertical scanline position 369 | ; Expectaed value is from 0 to 261. 370 | OPVCT = $00213D 371 | 372 | ; PPU STATUS AND PPU1 VERSION NUMBER 373 | ; STAT77 trm. vvvv r1 fvha 374 | ; t - OBJ time overflow (0: okay | 1: too many pixels on scanline - 8*34=292) 375 | ; r - OBJ range overflow (0: okay | 1: too many objects on scanline - 32) 376 | ; m - mode (0: master | 1: slave) 377 | ; v - PPU1 5C77 version 378 | STAT77 = $00213E 379 | 380 | ; PPU STATUS AND PPU2 VERSION NUMBER 381 | ; STAT78 il.p vvvv r1 fvha 382 | ; i - current interlace field (0: odd | 1: even) 383 | ; l - external latch (0: no data | 1: new data) 384 | ; p - region (0: NTSC 60Hz | 1: PAL 50Hz) 385 | ; v - PPU2 5C78 version 386 | ; Reading resets the access for OPHCT and OPVCT 387 | STAT78 = $00213F 388 | 389 | ; AUDIO PROCESSING UNIT COMMUNICATION PORTS 390 | ; APUIO0 aaaa aaaa rw1 fvha 391 | ; APUIO1 aaaa aaaa rw1 fvha 392 | ; APUIO2 aaaa aaaa rw1 fvha 393 | ; APUIO3 aaaa aaaa rw1 fvha 394 | ; a - data to/from APU 395 | ; Avoid writing data to $2140 in 16-bit mode 396 | APUIO0 = $002140 : APUIO = $002140 397 | APUIO1 = $002141 398 | APUIO2 = $002142 399 | APUIO3 = $002143 400 | 401 | ; APUIO is mirrored up to $217F 402 | 403 | ; WRAM DATA READ/WRITE 404 | ; WMDATA xxxx xxxx rw1 fvha 405 | ; x - WRAM data 406 | WMDATA = $002180 407 | 408 | ; WRAM ADDRESS ACCESS 409 | ; WMADDL llll llll rw1 fvha 410 | ; WMADDH hhhh hhhh rw1 fvha 411 | ; WMADDB .... ...b rw1 fvha 412 | ; l - low byte of WRAM address 413 | ; h - high byte of WRAM address 414 | ; b - bank of WRAM address (0: bank7E | 1: bank7F) 415 | WMADDL = $002181 : WMADDR = $002181 416 | WMADDH = $002182 417 | WMADDB = $002183 418 | 419 | ;=================================================================================================== 420 | ;=================================================================================================== 421 | ; JOYPAD REGISTERS 422 | ;=================================================================================================== 423 | ;=================================================================================================== 424 | 425 | ; JOYPAD STROBE AND COMMUNICATION PORT 426 | ; JOYPADA .... ..ca r1 427 | ; .... ...s w1 428 | ; JOYPADB .... ..db r1 429 | ; a - port 1 data 1 (read) 430 | ; c - port 1 data 2 (read) 431 | ; d - port 2 data 1 (read) 432 | ; b - port 2 data 2 (read) 433 | ; s - strobe joypads (write) 434 | JOYPADA = $004016 : JOYPAD = $004016 435 | JOYPADB = $004017 436 | 437 | ;=================================================================================================== 438 | ;=================================================================================================== 439 | ; CPU REGISTERS 440 | ;=================================================================================================== 441 | ;=================================================================================================== 442 | 443 | ; INTERRUPT AND AUTO JOYPAD READ ENABLE 444 | ; NMITIMEN n.vh ...j w1 445 | ; n - NMI enable (0: disabled | 1: enabled) 446 | ; vh - IRQ trigger time 447 | ; 00 - none 448 | ; 01 - on HTIME 449 | ; 10 - on VTIME 450 | ; 11 - when both VTIME and HTIME 451 | ; j - auto joypad read (0: disabled | 1: enabled) 452 | NMITIMEN = $004200 453 | 454 | ; PROGRAMMABLE I/O PORT (WRITE) 455 | ; WRIO ab.. .... w1 456 | ; a - controller port 2 pin 6 (0: no PPU latching | 1: PPU can be latched) 457 | ; b - controller port 1 pin 6 458 | WRIO = $004201 459 | 460 | ; MULTIPLIER AND MULTIPLICAND 461 | ; WRMPYA aaaa aaaa w1 462 | ; WRMPYB bbbb bbbb w1 463 | ; a - unsigned 8-bit multiplicand A 464 | ; b - unsigned 8-bit multiplicand B 465 | ; Multiplication will finish after 8 CPU cycles. 466 | ; WRMPYA will retain its value after multiplication after writes to WRMPYB. 467 | WRMPYA = $004202 468 | WRMPYB = $004203 469 | 470 | ; DIVISOR AND DIVIDEND 471 | ; WRDIVL llll llll w1 472 | ; WRDIVH hhhh hhhh w1 473 | ; WRDIVB bbbb bbbb w1 474 | ; l - low byte of unsigned 16-bit dividend 475 | ; h - high byte of unsigned 16-bit dividend 476 | ; d - unsigned 8-bit divisor 477 | ; Division will finish after 16 CPU cycles after writes to WRDIVB. 478 | WRDIVL = $004204 479 | WRDIVH = $004205 480 | WRDIVB = $004206 481 | 482 | ; H-COUNT TIMER SETTINGS 483 | ; HTIMEL hhhh hhhh w1 484 | ; HTIMEH .... ...h w1 485 | ; h - IRQ horizontal trigger 486 | HTIMEL = $004207 : HTIME = $004207 487 | HTIMEH = $004208 488 | 489 | ; V-COUNT TIMER SETTINGS 490 | ; VTIMEL vvvv vvvv w1 491 | ; VTIMEH .... ...v w1 492 | ; v - IRQ vertical trigger 493 | VTIMEL = $004209 : VTIME = $004209 494 | VTIMEH = $00420A 495 | 496 | ; DIRECT MEMORY ACCESS CHANNEL DESIGNATION 497 | ; MDMAEN hgfe dcba w1 498 | ; a - DMA channel 0 (0: disabled | 1: enabled) 499 | ; b - DMA channel 1 (0: disabled | 1: enabled) 500 | ; c - DMA channel 2 (0: disabled | 1: enabled) 501 | ; d - DMA channel 3 (0: disabled | 1: enabled) 502 | ; e - DMA channel 4 (0: disabled | 1: enabled) 503 | ; f - DMA channel 5 (0: disabled | 1: enabled) 504 | ; g - DMA channel 6 (0: disabled | 1: enabled) 505 | ; h - DMA channel 7 (0: disabled | 1: enabled) 506 | MDMAEN = $00420B 507 | 508 | ; H-BLANK DIRECT MEMORY ACCESS CHANNEL DESIGNATION 509 | ; HDMAEN hgfe dcba w1 510 | ; a - HDMA channel 0 (0: disabled | 1: enabled) 511 | ; b - HDMA channel 1 (0: disabled | 1: enabled) 512 | ; c - HDMA channel 2 (0: disabled | 1: enabled) 513 | ; d - HDMA channel 3 (0: disabled | 1: enabled) 514 | ; e - HDMA channel 4 (0: disabled | 1: enabled) 515 | ; f - HDMA channel 5 (0: disabled | 1: enabled) 516 | ; g - HDMA channel 6 (0: disabled | 1: enabled) 517 | ; h - HDMA channel 7 (0: disabled | 1: enabled) 518 | HDMAEN = $00420C 519 | 520 | ; ACCESS CYCLE DESIGNATION 521 | ; MEMSEL .... ...f w1 522 | ; f - Fast ROM (0: disabled | 1: enabled) 523 | ; Works with SA1, but pauses the SA1. 524 | MEMSEL = $00420D 525 | 526 | ; V-BLANK NMI FLAG AND SNES CPU VERSION NUMBER 527 | ; RDNMI n... vvvv r1 528 | ; n - vblank NMI trigger (0: not in vblank | 1: in vblank) 529 | ; clears on read 530 | ; read this during NMI for safety 531 | ; messing with NMI enable may cause unwanted triggers 532 | ; v - Ricoh5A22 version 533 | RDNMI = $004210 534 | 535 | ; H/V TIMER IRQ FLAG 536 | ; TIMEUP i... .... r1 537 | ; i - IRQ trigger (0: no request | 1: IRQ requested) 538 | ; clears on read 539 | ; read this during IRQ or else 540 | ; IRQ will trigger immediately when the current one ends 541 | TIMEUP = $004211 542 | 543 | ; H/V BLANK FLAG AND AUTO JOYPAD READ STATUS 544 | ; HVBJOY vh.. ...j r1 545 | ; v - vertical blanking period (0: not vblank | 1: vblank) 546 | ; h - horizontal blanking period (0: not hblank | 1: hblank) 547 | ; j - auto joypad read flag (0: fine | 1: busy) 548 | ; Blanking flags are set irrespective of forced blank and interrupts. 549 | HVBJOY = $004212 550 | 551 | ; PROGRAMMABLE I/O PORT (READ) 552 | ; RDIO ab.. .... r1 553 | ; a - pin 6 of controller port 2 554 | ; b - pin 6 of controller port 1 555 | RDIO = $004213 556 | 557 | ; QUOTIENT OF DIVISION 558 | ; RDDIVL llll llll r1 559 | ; RDDIVH hhhh hhhh r1 560 | ; l - low byte of quotient 561 | ; h - high byte of quotient 562 | RDDIVL = $004214 : RDDIV = $004214 563 | RDDIVH = $004215 564 | 565 | ; PRODUCT OF MULTIPLICATION AND REMAINDER OF DIVISION 566 | ; RDMPYL llll llll r1 567 | ; RDMPYH hhhh hhhh r1 568 | ; l - low byte of result 569 | ; h - high byte of result 570 | ; for multiplication, this contains the product 571 | ; for division, this contains the remainder 572 | RDMPYL = $004216 : RDMPY = $004216 573 | RDMPYH = $004217 574 | 575 | ; CONTROLLER DATA 576 | ; JOY1L AXLR vvvv r1 577 | ; JOY1H BYsS udlr r1 578 | ; JOY2L AXLR vvvv r1 579 | ; JOY2H BYsS udlr r1 580 | ; JOY3L AXLR vvvv r1 581 | ; JOY3H BYsS udlr r1 582 | ; JOY4L AXLR vvvv r1 583 | ; JOY4H BYsS udlr r1 584 | ; A - A face button (0: relaxed | 1: pressed) 585 | ; B - B face button (0: relaxed | 1: pressed) 586 | ; X - X face button (0: relaxed | 1: pressed) 587 | ; Y - Y face button (0: relaxed | 1: pressed) 588 | ; u - UP dpad button (0: relaxed | 1: pressed) 589 | ; d - DOWN dpad button (0: relaxed | 1: pressed) 590 | ; l - LEFT dpad button (0: relaxed | 1: pressed) 591 | ; r - RIGHT dpad button (0: relaxed | 1: pressed) 592 | ; S - START button (0: relaxed | 1: pressed) 593 | ; s - SELECT button (0: relaxed | 1: pressed) 594 | ; L - LEFT SHOULDER button (0: relaxed | 1: pressed) 595 | ; R - RIGHT SHOULDER button (0: relaxed | 1: pressed) 596 | ; v - controller signature 597 | ; only v bits are put in these registers 598 | ; extra data can be read for further controller information 599 | ; vvvv zzzzzzzz 600 | ; 0000 00000000 - No controller connected 601 | ; 0000 11111111 - Standard joypad 602 | ; 0001 ........ - SNES mouse 603 | ; 0011 ........ - SFC modem 604 | ; 0100 ........ - NTT data controller (has cool numpad) 605 | ; 1101 ........ - Voice-kun 606 | ; 1110 xxxxxxxx - Third-party device 607 | ; 1111 ........ - Super Scope 608 | JOY1L = $004218 : JOY1DATA1L = $004218 609 | JOY1H = $004219 : JOY1DATA1H = $004219 610 | JOY2L = $00421A : JOY2DATA1L = $00421A 611 | JOY2H = $00421B : JOY2DATA1H = $00421B 612 | JOY3L = $00421C : JOY1DATA2L = $00421C 613 | JOY3H = $00421D : JOY1DATA2H = $00421D 614 | JOY4L = $00421E : JOY2DATA2L = $00421E 615 | JOY4H = $00421F : JOY2DATA2H = $00421F 616 | 617 | ;=================================================================================================== 618 | ;=================================================================================================== 619 | ; DMA REGISTERS 620 | ;=================================================================================================== 621 | ;=================================================================================================== 622 | 623 | ; DMA TRANSFER PARAMETERS 624 | ; DMAPX dh.i fmmm rw1 625 | ; d - transfer direction (0: A bus to B bus | 1: B bus to A bus) 626 | ; h - HDMA addressing (0: direct table | 1: indirect table) 627 | ; i - A bus address advance (0: increment | 1: decrement) 628 | ; f - fixed transfer 629 | ; m - transfer mode 630 | ; 000 - 1 register, write once r+0 631 | ; 001 - 2 register, write once r+0, r+1 632 | ; 010 - 1 register, write twice r+0, r+0 633 | ; 011 - 2 registers, write twice r+0, r+0, r+1, r+1 634 | ; 100 - 4 registers, write once r+0, r+1, r+2, r+3 635 | ; 101 - 2 registers, write twice, alt r+0, r+1, r+0, r+1 636 | ; 110 - 1 register, write twice r+0, r+0 637 | ; 111 - 2 registers, write twice r+0, r+0, r+1, r+1 638 | ; For write twice modes, the address is still incremented, assuming a non-fixed transfer. 639 | ; For fixed transfers, the same address is always used even for write twice modes. 640 | ; HDMA transfers cannot used fixed transfers or decrement A bus. 641 | DMAP0 = $004300 : DMA0MODE = $004300 : DMAPX = $004300 : DMAXMODE = $004300 642 | DMAP1 = $004310 : DMA1MODE = $004310 643 | DMAP2 = $004320 : DMA2MODE = $004320 644 | DMAP3 = $004330 : DMA3MODE = $004330 645 | DMAP4 = $004340 : DMA4MODE = $004340 646 | DMAP5 = $004350 : DMA5MODE = $004350 647 | DMAP6 = $004360 : DMA6MODE = $004360 648 | DMAP7 = $004370 : DMA7MODE = $004370 649 | 650 | ; DMA B-BUS ADDRESS ACCESS 651 | ; BBADX aaaa aaaa rw1 652 | ; a - low byte of PPU port $21aa for B bus address 653 | BBAD0 = $004301 : DMA0PORT = $004301 : BBADX = $004301 : DMAXPORT = $004301 654 | BBAD1 = $004311 : DMA1PORT = $004311 655 | BBAD2 = $004321 : DMA2PORT = $004321 656 | BBAD3 = $004331 : DMA3PORT = $004331 657 | BBAD4 = $004341 : DMA4PORT = $004341 658 | BBAD5 = $004351 : DMA5PORT = $004351 659 | BBAD6 = $004361 : DMA6PORT = $004361 660 | BBAD7 = $004371 : DMA7PORT = $004371 661 | 662 | ; DMA A-BUS TABLE ADDRESS 663 | ; A1TXL llll llll rw1 664 | ; A1TXH hhhh hhhh rw1 665 | ; A1TXB bbbb bbbb rw1 666 | ; l - low byte of A bus address 667 | ; h - high byte of A bus address 668 | ; b - bank byte of A bus address 669 | A1TXL = $004302 : DMAXADDRL = $004302 : DMAXADDR = $004302 : A1TX = $004302 670 | A1T0L = $004302 : DMA0ADDRL = $004302 : DMA0ADDR = $004302 671 | A1T1L = $004312 : DMA1ADDRL = $004312 : DMA1ADDR = $004312 672 | A1T2L = $004322 : DMA2ADDRL = $004322 : DMA2ADDR = $004322 673 | A1T3L = $004332 : DMA3ADDRL = $004332 : DMA3ADDR = $004332 674 | A1T4L = $004342 : DMA4ADDRL = $004342 : DMA4ADDR = $004342 675 | A1T5L = $004352 : DMA5ADDRL = $004352 : DMA5ADDR = $004352 676 | A1T6L = $004362 : DMA6ADDRL = $004362 : DMA6ADDR = $004362 677 | A1T7L = $004372 : DMA7ADDRL = $004372 : DMA7ADDR = $004372 678 | 679 | A1TXH = $004303 : DMAXADDRH = $004303 680 | A1T0H = $004303 : DMA0ADDRH = $004303 681 | A1T1H = $004313 : DMA1ADDRH = $004313 682 | A1T2H = $004323 : DMA2ADDRH = $004323 683 | A1T3H = $004333 : DMA3ADDRH = $004333 684 | A1T4H = $004343 : DMA4ADDRH = $004343 685 | A1T5H = $004353 : DMA5ADDRH = $004353 686 | A1T6H = $004363 : DMA6ADDRH = $004363 687 | A1T7H = $004373 : DMA7ADDRH = $004373 688 | 689 | A1BX = $004304 : DMAXADDRB = $004304 690 | A1B0 = $004304 : DMA0ADDRB = $004304 691 | A1B1 = $004314 : DMA1ADDRB = $004314 692 | A1B2 = $004324 : DMA2ADDRB = $004324 693 | A1B3 = $004334 : DMA3ADDRB = $004334 694 | A1B4 = $004344 : DMA4ADDRB = $004344 695 | A1B5 = $004354 : DMA5ADDRB = $004354 696 | A1B6 = $004364 : DMA6ADDRB = $004364 697 | A1B7 = $004374 : DMA7ADDRB = $004374 698 | 699 | ; DMA SIZE, HDMA WORKING TABLE ADDRESS, AND HDMA INDIRECT TABLE BANK 700 | ; DASXL llll llll rw1 701 | ; DASXH hhhh hhhh rw1 702 | ; DASBX bbbb bbbb rw1 703 | ; 704 | ; DMA: 705 | ; l - low byte of transfer size 706 | ; h - high byte of transfer size 707 | ; $0000 will actually transfer $10000 bytes 708 | ; 709 | ; HDMA: 710 | ; l - low byte of table 711 | ; h - high byte of table 712 | ; b - bank byte of table 713 | ; Not used during direct HDMA 714 | DASXL = $004305 : DMAXSIZEL = $004305 : DMAXSIZE = $004305 : DASX = $004305 715 | DAS0L = $004305 : DMA0SIZEL = $004305 : DMA0SIZE = $004305 : DAS0 = $004305 716 | DAS1L = $004315 : DMA1SIZEL = $004315 : DMA1SIZE = $004315 : DAS1 = $004315 717 | DAS2L = $004325 : DMA2SIZEL = $004325 : DMA2SIZE = $004325 : DAS2 = $004325 718 | DAS3L = $004335 : DMA3SIZEL = $004335 : DMA3SIZE = $004335 : DAS3 = $004335 719 | DAS4L = $004345 : DMA4SIZEL = $004345 : DMA4SIZE = $004345 : DAS4 = $004345 720 | DAS5L = $004355 : DMA5SIZEL = $004355 : DMA5SIZE = $004355 : DAS5 = $004355 721 | DAS6L = $004365 : DMA6SIZEL = $004365 : DMA6SIZE = $004365 : DAS6 = $004365 722 | DAS7L = $004375 : DMA7SIZEL = $004375 : DMA7SIZE = $004375 : DAS7 = $004375 723 | 724 | DASXH = $004306 : DMAXSIZEH = $004306 725 | DAS0H = $004306 : DMA0SIZEH = $004306 726 | DAS1H = $004316 : DMA1SIZEH = $004316 727 | DAS2H = $004326 : DMA2SIZEH = $004326 728 | DAS3H = $004336 : DMA3SIZEH = $004336 729 | DAS4H = $004346 : DMA4SIZEH = $004346 730 | DAS5H = $004356 : DMA5SIZEH = $004356 731 | DAS6H = $004366 : DMA6SIZEH = $004366 732 | DAS7H = $004376 : DMA7SIZEH = $004376 733 | 734 | DASBX = $004307 : HDMAXITBLL = $004305 : HDMAXITBLH = $004306 : HDMAXITBLB = $004307 735 | DASB0 = $004307 : HDMA0ITBLL = $004305 : HDMA0ITBLH = $004306 : HDMA0ITBLB = $004307 736 | DASB1 = $004317 : HDMA1ITBLL = $004315 : HDMA1ITBLH = $004316 : HDMA1ITBLB = $004317 737 | DASB2 = $004327 : HDMA2ITBLL = $004325 : HDMA2ITBLH = $004326 : HDMA2ITBLB = $004327 738 | DASB3 = $004337 : HDMA3ITBLL = $004335 : HDMA3ITBLH = $004336 : HDMA3ITBLB = $004337 739 | DASB4 = $004347 : HDMA4ITBLL = $004345 : HDMA4ITBLH = $004346 : HDMA4ITBLB = $004347 740 | DASB5 = $004357 : HDMA5ITBLL = $004355 : HDMA5ITBLH = $004356 : HDMA5ITBLB = $004357 741 | DASB6 = $004367 : HDMA6ITBLL = $004365 : HDMA6ITBLH = $004366 : HDMA6ITBLB = $004367 742 | DASB7 = $004377 : HDMA7ITBLL = $004375 : HDMA7ITBLH = $004376 : HDMA7ITBLB = $004377 743 | 744 | ; HDMA TABLE ADDRESS 745 | ; A2AXL llll hhhh rw1 746 | ; A2AXH hhhh llll rw1 747 | ; l - low byte of table address 748 | ; h - high byte of table address 749 | ; Updated automatically by HDMA. 750 | A2AXL = $004308 : HDMAXTBL = $004308 : HDMAXTBLL = $004308 : A2AX = $004308 751 | A2A0L = $004308 : HDMA0TBL = $004308 : HDMA0TBLL = $004308 752 | A2A1L = $004318 : HDMA1TBL = $004318 : HDMA1TBLL = $004318 753 | A2A2L = $004328 : HDMA2TBL = $004328 : HDMA2TBLL = $004328 754 | A2A3L = $004338 : HDMA3TBL = $004338 : HDMA3TBLL = $004338 755 | A2A4L = $004348 : HDMA4TBL = $004348 : HDMA4TBLL = $004348 756 | A2A5L = $004358 : HDMA5TBL = $004358 : HDMA5TBLL = $004358 757 | A2A6L = $004368 : HDMA6TBL = $004368 : HDMA6TBLL = $004368 758 | A2A7L = $004378 : HDMA7TBL = $004378 : HDMA7TBLL = $004378 759 | 760 | A2AXH = $004309 : HDMAXTBLH = $004309 761 | A2A0H = $004309 : HDMA0TBLH = $004309 762 | A2A1H = $004319 : HDMA1TBLH = $004319 763 | A2A2H = $004329 : HDMA2TBLH = $004329 764 | A2A3H = $004339 : HDMA3TBLH = $004339 765 | A2A4H = $004349 : HDMA4TBLH = $004349 766 | A2A5H = $004359 : HDMA5TBLH = $004359 767 | A2A6H = $004369 : HDMA6TBLH = $004369 768 | A2A7H = $004379 : HDMA7TBLH = $004379 769 | 770 | ; HDMA LINE TRANSFER WORKSPACE 771 | ; NLTRX csss ssss rw1 772 | ; c - continue flag (0: 1 line for s scanlines | 1: s lines, 1 per scanline) 773 | ; s - scanline count 774 | ; Updated automatically during HDMA. 775 | NLTR0 = $00430A : NLTRX = $00430A 776 | NLTR1 = $00431A 777 | NLTR2 = $00432A 778 | NLTR3 = $00433A 779 | NLTR4 = $00434A 780 | NLTR5 = $00435A 781 | NLTR6 = $00436A 782 | NLTR7 = $00437A 783 | 784 | ;=================================================================================================== 785 | --------------------------------------------------------------------------------