Zelda 1 - Upper-left Dungeon Maps Document Version 1.0 (Use word wrap!) Compiled by GameMakr24 zack76@juno.com Please do not modify this document! The exact contents of this file should remain intact. A fresh copy is available at http://www.cg-games.net/challenges/zeldac/map-item.txt ******************************************************************************************* Contents Part 1 - Byte Locations Part 2 - The Map Matrix Part 3 - Byte Formats Part 4 - Tile Values Part 5 - Compression Part 1 - Byte Locations Here are the ROM locations of the beginning of each map. The locations of these and other ROM addresses can be found in http://www.cg-games.net/challenges/zeldac/zeldarom.txt Level 1 - 1945B 1st Quest Level 2 - 19557 Level 3 - 19653 Level 4 - 1974F Level 5 - 1984B Level 6 - 19947 Level 7 - 19A43 Level 8 - 19B3F Level 9 - 19C3B Level 1 - 181A5 2nd Quest Level 3 - 181DE (note the difference in order) Level 2 - 18215 Level 5 - 18252 Level 4 - 1828B Level 6 - 182CE Level 8 - 1830E Level 7 - 1834D Level 9 - 18390 Part 2 - The Map Matrix Here's a visual representation of ZeldaC's Level 2 map. (I would use a Zelda 1 map, but my best notes center around my new maps.) .'s are used for empty space. 1's are used for rooms. 1 2 3 4 5 6 7 8 6 . . . . . . . . . . . . . 1 . . 8 . . . 1 1 1 1 . . . 1 1 . 1 . . A . . 1 1 . . . . . . 1 1 . 1 . . C . . . 1 1 1 1 . . . . . . 1 . . There are eight rows in which to lay out rooms. There are four rows in which to lay out room graphics. Each graphic (aka tile) you place into a row can contain either two rooms, a room in just the N position, a room in just the S position, or one with no rooms. Example 1: Look at column 6 of row 6. The top half of row 6 has no room, but the bottom half of row 6 does have a room. So, in column 6 of row 6, you would use a tile that displays nothing at the top and a room at the bottom. Example 2: Look at column 4 of row 8. The top half and bottom half of row 8 each contain a room, so you would use a tile that displays two rooms, one above the other. So we have four rows of graphics that present eight rows of rooms. Each of these rows has a name, in accordance to screen position. Row 1 is 6. (the top row) Row 2 is 8. Row 3 is A. Row 4 is C. (the bottom row) Part 3 - Byte Formats Here is the format of the actual bytes needed to create this map. Note that these bytes all run together as a continuous string in the ROM, even though they're displayed this way for clarity. Row 6 | 20 66 01 | 64 Row 8 | 20 83 05 | 64 2F FC 63 FC Row A | 20 A3 04 | FF FF 24 FB Row C | 20 C4 04 | FC FC FF FC Now I'll explain what each byte means in each row. Row 6, the top row. 20 starts a new row of tiles. I've never seen any other value used instead of 20. 66 means place the first tile at row 6, column 6. (although this time, there's just one tile) 01 says how many graphics you will place on this row. 08 would be the maximum number. 64 is the location of the tile you want to use. See the explanation below for possible tile values. Row 8, the 2nd row. 20 starts a new row of tiles. 83 means place the first tile at row 8, column 3. 05 says you will place 5 tiles on this row. 64 2F FC 63 FC are the tiles drawn onscreen, starting at position 83. Row A, the 3rd row. 20 starts a new row of tiles. A3 means place the first tile at row A, column 3. 04 says you will place 4 tiles on this row. FF FF 24 FB are the 4 tiles. Row C, the bottom row. 20 starts a new row of tiles. C4 means place the first tile at row C, column 4. 04 says you will place 4 tiles on this row. FC FC FF FC are the 4 tiles. In the actual ROM, you would type in 20 66 01 64 20 83 05 64 2F FC 63 FC 20 A3 04 FF FF 24 FB 20 C4 04 FC FC FF FC Remember that you don't have to use all four rows. If your map is only 6 rooms high, you can just start on the 2nd row. (You must use the bottom row, since that's where Link will appear when he enters any dungeon.) If the map in my example didn't contain a room in row 6, I would have simply not typed the information for that row, which is 20 66 01 64. I would have started with 20, 83, 05, and so forth. Part 4 - Tile Values Any background tile loaded in memory works; you could use letters and numbers instead of room graphics tiles. In fact, that's what I have done; if you tried to use this data in Zelda 1 without first doing some graphics hacking, you would notice the following: 24 = blackness (lack of any rooms) 2F = - 63 = . 64 = + 67 = one room at top, no room at bottom. (not used in above example) FB = no room at top, one room at bottom. FC = copyright symbol FF = two rooms, one above the other. I used more tiles than just these to make maps, so that I could have "banner" labels across the tops of some rooms. The more original tiles you give up (like a copyright symbol), the more tile graphics you can create and reference. If you don't make more map tiles, the only tiles you should use are 24, 67, FB, and FF. Be careful when creating new maps, as you must use no more bytes than the original dungeon allows. If you use less bytes than needed, you can simply turn each of the extra bytes into FF, or to any value, since the game won't be looking beyond where you've told it to. Part 5 - Compression Most maps, especially in the first quest, can be created just by using the format already described. Larger maps, however, can repeat tiles horizontally or vertically to save space. Horizontal Repetition -- To use the same tile, 5 times in a row, on row C (the bottom row): Row C | 20 C3 45 | FC 20 starts the new row. C3 means place the first tile on row C, column 3. 45 means use the tile 5 times, horizontally. FC is the tile to be repeated. Vertical Repetition -- To ues the same tile, 4 times in a row, in column 7: Col 7 | 20 67 C4 | FF 20 starts the next set of information. 67 means place the first tile on row 6, column 7. C4 means use the tile 4 times, vertically. FF is the tile to be repeated.