User Tools

Site Tools


return_of_samus:technical_information:level_data_banks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
return_of_samus:technical_information:level_data_banks [2016/07/18 12:51] – [Level Data Banks] Adding decimal equivalents zero_onereturn_of_samus:technical_information:level_data_banks [2022/04/28 05:22] (current) – [Screen Transitions Indexes] rt-55j
Line 6: Line 6:
 ===== Bank Header ===== ===== Bank Header =====
 ==== Level Data Pointers ==== ==== Level Data Pointers ====
-The first 0x200 bytes of the bank header deal with creating the actual layout of the room, you can think of Metroid II as having 7 huge 16x16 rooms, with smaller rooms that have been fitted into it Tetris style.+The first 0x200 (dec: 512) bytes of the bank header deal with creating the actual layout of the room, you can think of Metroid II as having 7 huge 16x16 rooms, with smaller rooms that have been fitted into it Tetris style.
  
 There are 256 2 byte pointers (little-endian (i.e. reversed)) which point to the Level Data Chunks inside the same bank, if we look at [[..:data_locations:bank9 | Bank 9]] we can see the first 8 pointers are: There are 256 2 byte pointers (little-endian (i.e. reversed)) which point to the Level Data Chunks inside the same bank, if we look at [[..:data_locations:bank9 | Bank 9]] we can see the first 8 pointers are:
Line 50: Line 50:
 In theory, this means you could probably make a 16x16 room in Metroid II, I have not tested this yet, as that's a fair bit of editing but I will when I got more time, it looks like adding in more rooms is as simple as creating more of these level banks. In theory, this means you could probably make a 16x16 room in Metroid II, I have not tested this yet, as that's a fair bit of editing but I will when I got more time, it looks like adding in more rooms is as simple as creating more of these level banks.
 ==== Scroll Pointers ==== ==== Scroll Pointers ====
-The next 0x100 bytes are scroll types, each byte corresponds with a screen and dictates how the scrolling works on that screen.+The next 0x100 (dec: 256) bytes are scroll types, each byte corresponds with a screen and dictates how the scrolling works on that screen.
  
 In binary, each byte is formatted like this: In binary, each byte is formatted like this:
Line 89: Line 89:
  
 ==== Screen Transitions Indexes ==== ==== Screen Transitions Indexes ====
-The next 0x200 bytes form another 16x16 array of little-endian two-byte values. They serve two functions:+The next 0x200 (dec: 512) bytes form another 16x16 array of little-endian two-byte values. They serve two functions:
  
-  - One of the bits of the value (bin:wwwwxxxxyyyy-zzz) determines the priority of Samus' sprite relative to the background for the screen. Yes, really. They put it here of all places. It has no bearing on the screen transition.+  - The twelfth bit of the value (set/detected with the bitmask 0x0800) determines the priority of Samus' sprite relative to the background for the screen (yes, really)When reading the index of the screen transition, this bit is masked out and ignored.
   - The value itself specifies the screen transition number that the screen uses. The data that governs what each screen transition does is located in bank 5.   - The value itself specifies the screen transition number that the screen uses. The data that governs what each screen transition does is located in bank 5.
  
Line 97: Line 97:
  
 ===== Level Data Chunks ===== ===== Level Data Chunks =====
-I know how this worksbut I gotta write it down first.+the next 0x5900 (dec: 15104) bytes are the 59 level data chunks. each chunk is 16x16 bytes. each byte is one tileand they are orginized 100% linearly. take the final chunk for example (which is, ironically, the first screen you ever see): 
 +<code> 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +3c|0c|0d|0e|0f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +15|16|17|12|18|19|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +20|21|22|23|24|25|26|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +2d|2e|2f|30|31|32|33|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +37|05|06|07|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f|7f 
 +7f|7f|7f|7f|7f|7f|7f|76|7f|71|70|74|73|76|70|7f 
 +39|39|39|39|39|39|39|39|39|39|39|39|39|39|39|39 
 +</code> 
 +all you really need to know to understand what I mean is that 7f is air tiles, and 39 is ground tilesif you DO want to have a breakdown of tiles hex values, see [[return_of_samus:technical_information:tile_breakdown | Tile Breakdown]]
return_of_samus/technical_information/level_data_banks.1468846278.txt.gz · Last modified: 2016/07/18 12:51 by zero_one