| This manual currently covers the following topics: 
 zzromtool isn't magic. It expects folders to follow a certain specification, and if they don't, it may crash. When you dump a rom, the following files and folders are created. As you make changes, keep these things in mind about each. overlay confThe conf.txt within an actor folder looks like this: Initialization    Type    0x01    Room    0x00    Flags   0x00000000    Object  402Allocation        0x00000000VRAM              0x80B959D0Everything indented below  Initializationgets written into actor.zovl during import, when the program finds the magic string scubadiver within the actor. The reason for this is to make it easier to share assets between projects, and also make it possible for the program to have a means of detecting where the initialization data is stored within the actor. Otherwise, you'd have to point to the initialization data directly, and every time you rebuild the actor (assuming it's custom), the initialization data may move, and thus there would be an extra step after each rebuild: manually adjusting the pointer within conf.txt. This is to avoid such madness. tl;dr: In your custom actor's source, use the stringscubadiverin the appropriate section of the initialization data.As of 0.01 revision 2, an additional search method is available: In an actor's initialization data, the first two bytes, which normally represent the actor's number, should be replaced with the bytes 0xDEAD. Ten bytes later are two unused padding bytes, which we replace with 0xBEEF. See seagull.c for an example of this applied in C. You may also omit the Initialization section of conf.txt.  * During import, 0xDEAD is replaced with the number of the folder the actor is in, and 0xBEEF is replaced with 0x0000. Allocationis for allocation type, described on the wiki.Reserveis a hackish setup for how many bytes follow the overlays in VRAM. Some overlays reserve a few bytes beyond the end of themselves. For relaying information between multiple instances, I would assume. ex: the Lizalfos tag-teamDisabled as of revision 3 (it turned out to be unnecessary clutter.) VRAMis basically the relative start address that was used when compiling the actor. If you change this value for an actor, you'll have to rebuild it from source. If you're writing a custom actor, this will most likely be0x80800000and you'll never worry about it beyond that.The same rules apply for particle overlays, but the magic string is  tunainstead ofscubadiver, and the only parts of conf.txt areReserveandVRAM. They work the same way as described above.Custom actor and particle overlay examples will be posted below as they are made. scene confThe     unk-a: 0   unk-b: 0  shader: 4    save: 85restrict: 16
 
 
 
 Numbers are all decimal, not hexadecimal. Thanks to the one-and-only CloudMax, we have an additional  codefile, which we'll dub ascode1. The max on this is 1 MB (0x100000 bytes). All custom assembly should go in this file. Customshaderfunctions will automatically be appended tocode1during the build process, so try to keep it a few KB short of 1 MB. It is recommended to keep this file small and only expand as needed.code1starts at80700000in ram, so a function or data stored at the offset0x50(to make an example) would be accessed through the ram address80700050.code1is located in thesystemfolder.As of revision 3, you can edit the  CODE1VRAM=0x80700000in the ZZRP file to any other ram address that suits your needs.Find and open  entrance-cutscenes.txt. Its contents are formatted as such:Route   Age    Flag   Offset389     2      0xA0   02013AA0The first line in the file describes which columns do what. Each subsequent line specifies how and when each entrance cutscene should be played. 
 
 Inside the  miscfolder, Link's animation data resides in the form of two files:link_animetionandlink_animetion_table[sic]. Due to the nature of how Link's animation table is referenced by the game, the program does not yet offer a solution for adding animations, only replacing. On the plus side, a custom animation can still have either more or less frames than the one you're replacing.When the Blender plug-in for generating custom Link animation data is ready, a link to a tutorial will be posted here. This directory contains miscellaneous files that don't really belong anywhere else. The contents of this folder are not compressed during the compression routine, much like the original game. A folder named  compexists withinmisc, for storing files meant to be compressed. This is intentional by design, as some files in the game are not meant to be compressed. Please do not move existing files frommisctocompunless you know what you are doing.The order in which these files are placed in the rom is based on the contents of  repoint.tsv, except that the contents ofcompare loaded in after the contents ofmisc.misccan contain more folders thancomp. By default, the program will createskyboxand anothercompfolder withinskybox. Thecompdirectory in this case gets compressed as well. As a general rule, any file reference containing/comp/gets compressed. This applies even to new folders you create and the folders within them. Please reference skybox directory for more information on the naming schemes used for skyboxes.The files in these directories should NOT have extensions. Files not referenced within  repoint.tsvwill be skipped.Examples include:  test.zobj, link_animetion_table.zdata, notes.txtSome files in the game don't belong in any kind of table and are otherwise unreferenced. Couple this with the fact that they are often referenced across multiple files via hard-coded pointers and you have a recipe for trouble when moving files around in the rom.  repoint.tsvexists as a crude remedy. You can edit it in a plain text editor such as Notepad++, but you may have an easier time working in a tool that can parse TSV, such as LibreOffice Calc.repoint.tsvshould only be used to describe files stored inmiscfor now.Files described outside of  miscwill be imported twice: once when parsingrepoint.tsv, and again when dealing with the file's primary reference.Every row follows this format: File     High     Low     Point To     DmpSz     NotesThe meaning of each column: File     file to modifyHigh     offset of the opcode containing the upper half of the pointerLow      offset of the opcode containing the lower half of the pointer         if FFFFFF, High is considered to be the whole pointerPoint To file of which the pointer will be written         if .end is appended, the pointer points to the end of the fileDmpSz    the size of the file when it was dumped              you won't be editing this and it's used internally onlyNotes    store notes in this column         this is the only column that is optionalFilenames may not contain spaces. Please keep less than 4096 entries in this document. The initial dump creates a  repoint.tsvbased on assumptions about a rom that hasn't undergone major modifications. You can get away with never modifying this file, but if you do any complex wizardry, you may find yourself changing its contents to better fit your needs.Finally, here's an excerpt from it to drive the point home: system/ovl_file_choose.zovl    00DCF0    00DD08    misc/title_staticsystem/ovl_file_choose.zovl    00DCF4    00DD04    misc/title_static.endThe pointer split between the opcodes  0xDCF0and0xDD08in the fileovl_file_choose.zovlin the directorysystemwill be updated to reflect the new start offset of the filetitle_staticin the directorymisc.Then, the same is done for the end offset of  title_static.As of revision 0, you could can do  misc/title_static.sizefor the size of the file.This file contains information on how scenes are linked together. Because the terms exit and entrance tend to confuse, we've gone with route here to confuse people even more. Here's a direct copy and paste from the file: #Index  Scene  Spawn  Music  Title  FadeIn  FadeOut     0      0      0   STOP     ON       2        2     1      0      0   STOP     ON       2        2     2      0      0   STOP     ON       2        2     3      0      0   STOP     ON       2        2Let's get this out of the way first: all numbers are decimal. Also, you can add comments by writing the  #character. Anything after it on to the end of the line will be ignored when parsing.Index: The "exit" number used on collision in maps to warp Link somewhere Scene: The scene that this will warp Link to when he walks on it. It corresponds directly with the numbering of the scenes in the scene folder in a dumped rom. Spawn: The spawn point within the scene specified for Link to spawn at. Music: Will either be  STOPorGO.STOPmakes the music that's playing stop while warping so the next song can fade in.GOis for if the music is to remain playing. A good example ofGOis when you enter the Sacred Forest Meadow from the Lost Woods. The music keeps playing.Title:  ONorOFF; determines if the title card displays or not when entering the scene specified.FadeIn: The effect used when fading into the next scene when entering it. FadeOut: The effect used when fading out when warping to the next scene. Finally, a note on how these values are used and why there seem to be three additional copies for each route. Let's say you set the collision to warp Link through route 0. The game does the following: Is it currently night? Yes Add 1 Is Link an adult? Yes Add 2 Route 0 takes you to the Deku Tree. If it's night, route 1 is used. If Link is an adult and it's day, route 2. If Link is an adult and it's night, route 3. This is why every route has so many variants: to account for these different situations. So if you edit or add any routes, it's a common pitfall to not also edit the "copies". They will always be in groups of four, unless you write an assembly hack that does otherwise. Ignore this section for now. You can use dedicated texture tools to edit the raw data in the misc/skybox directory. repoint.tsv, which contains information on how to dump sky boxes. The encoded binaries for the sky boxes go inmisc/skybox/compand their palettes go inmisc/skybox. This must remain consistent due to assumptions that are made during the build process. These are converted to PNG in the mainskyboxdirectory in the project's root directory for easier editing.misc/skybox/compandmisc/skyboxdirectories. Let's make an example of a custommajora.pngskybox. It gets indexed and its palette gets saved asmajora_palinmisc/skybox. Then, the skybox itself gets saved asmajorainmisc/skybox/comp. The whole thing is forced to use one 256-color palette.majora#0.png,majora#1.png, etc. This pattern is detected andmajora_palandmajorafiles are generated accordingly.skyboxdirectory generated when dumping a rom. Compare the contents ofmisc/skyboxandmisc/skybox/comp, and it should explain itself a little better.The audio files are stored in  miscand namedaudiobank,audioseq, andaudiotable. To use custom music, you will need to rip the modified equivalents from your edited rom and overwrite the ones in the folder.Say you found a tutorial that tells you something like this. Go to 0xB9D1A8 in the rom and write the bytes FF 99 EE to make the Kokiri Tunic pinkYou can't follow these instructions, as there is no rom. You're editing the contents of the filesystem directly. If you plan on following any instructions like this, you'll have to apply them before the initial dump. You can't apply these changes after a rebuild, because the build process rearranges nearly every file. Alternatively, you can just edit the files directly. These instructions would translate to: Go to 0x1091A8 in the file "code" and write the bytes FF 99 EE to make the Kokiri Tunic pinkOnce you rebuild the rom, you have a pink Kokiri Tunic. How was this done? Well, if you look at the offset  0xB9D1A8, you'll notice it's between the offsets0xA94000and0xBCEF30, which is the block that the file namedcodeis stored in.Now that we know what file the byte(s) are in, we need an offset relative to the start of that file. Open your calculator, switch to  Programmer/Scientific/whatever Mode, and then switch the notation toHex.Now we use this formula to get the offset relative to the start of the file. rom offset - file start = relative offsetThat would be 0xB9D1A8 - 0xA94000 = 0x1091A8I'm sure these instructions are grating for anyone who already knows this stuff, but we have to teach the next generation somehow, don't we? 8) Walter and Max are fighting over how to merge commits on  system/ovl_player_actor.zovl. With the addition of thepatchdirectory, they don't have to. Walter compiles his mod into a CloudPatch namedsystem#ovl_player_actor.zovl(walter).txt, and Max labels his likewise. The two patches are dropped into thepatchdirectory, and the filesystem/ovl_player_actor.zovlgets both patches applied during the build process. The original file remains unmodified so a clean file is patched each time, and the two proceed to argue over the purity of pseudo instructions.Let's break down this path name system#ovl_player_actor.zovl(walter).txtEverything in parenthesis is regarded as a comment and discarded. The comment is here so we know whose is whose. Then every  #character gets replaced with a/character. Finally,.txtis dropped. The.txtis how the program detects it's a CloudPatch, and more patching features may be added in time.system/ovl_player_actor.zovlNow here's an example of a simple patch to change the tunic color. We create a  patchdirectory in the root project folder, and place a.txtwithin that we name as such:system#code.txtAs for the contents, we do: 0x1091A8,FF99EE0x1091A8is the offset of the Kokiri Tunic color within the filesystem/code.FF99EEare the bytes we're writing. Alternatively, you could do something like this to combine multiple edits at multiple offsets into one patch file:0x1091A8,FF0x1091A9,990x1091AA,EEThis is a lot of trouble to change the tunic color, and you will most likely not even use this feature unless you're doing weird assembly stuff with big files and have multiple people placing their own code chunks at different offsets within the file. As of revision 3, zzromtool will throw errors if there happens to be a patch that it can't find the matching file for. This is a shoddy method of storing additional information in a scene file, like entrance cutscenes, which are not referenced anywhere else within a scene file and are therefore not reliably detectable. If you would like entrance cutscenes to be automatically detected in custom maps created in your software, you'll need a TEXT-DATA implementation. It's very simple. At the end of the scene file, and at an offset that is 16-byte-aligned (offset ends in 0x0, not 0x8), there will be the bytes: 23 40 21 54 45 58 54 2D 44 41 54 41 21 40 23 30or, as text #@!TEXT-DATA!@#0where the trailing  '0'character is for version tracking. It will likely never change, but it's there just in case.Immediately after this 16-byte identifier is text data, all the way to the end of the file. supported "commands" entrance_cutscene(x)x is a hexadecimal offset to cutscene data within the sceneram segment 02 is requiredexample If you want to specify the offsets  0xF9E0and0xFF00as entrance cutscenes, for example, that data would be formatted within the TEXT-DATA section as such:entrance_cutscene(0x0200F9E0)entrance_cutscene(0x0200FF00)Finally, the TEXT-DATA section and everything after it are excluded when scenes are imported into the rom, so don't worry about any space going to waste. | 
