aboutsummaryrefslogtreecommitdiff
path: root/level_descriptors.txt
diff options
context:
space:
mode:
Diffstat (limited to 'level_descriptors.txt')
-rw-r--r--level_descriptors.txt127
1 files changed, 127 insertions, 0 deletions
diff --git a/level_descriptors.txt b/level_descriptors.txt
new file mode 100644
index 0000000..4cbed12
--- /dev/null
+++ b/level_descriptors.txt
@@ -0,0 +1,127 @@
+TODO: structure-ize the descriptors in the .info file, so dasm
+will politely generate labels for all the subroutines and map data.
+
+At $A000 in the ROM, there's a block of 64 bytes per level (12 blocks,
+768 bytes total). Each block describes a level of the game, so I'm calling
+them level descriptors. Pretty much everything about a level *except* its
+name is stored here. The names are stored separately in a table at $BB00.
+
+Level descriptors get copied to $07C0 as part of level entry. Possibly
+the copy gets modified as the level plays.
+
+Swapping the descriptors for the first two levels results in Electrocution
+being the first level, except the game says it's called Nothing To
+It. It plays normally, with electric floors, and displays L=1 in the
+status window. The next level is Nothing To It (but the game calls it
+Electrocution), which also plays normally and displays L=2.
+
+Anything that refers to a level below as levelXX is using zero-based
+numbering (level00 = first level, aka Nothing To It).
+
+Level descriptor structure:
+
+Offset 0, size 2:
+Level number displayed in the status window, 2 digits, screen codes.
+Levels <10 have $10 (the 0 character) as the first byte, but the code
+that draws the status window replaces it with a $00 (space). Possibly
+the decision to use e.g. 'L= 1' rather than 'L=01' was made late in
+the development process?
+
+Offset 2, size 2:
+A subroutine that gets called during the level (or $00 $00 for 'none').
+Not sure exactly when it gets called though.
+
+Offset 4, size 2:
+Another subroutine or $00 $00 for none..
+
+Offset 6, size 2:
+Another subroutine or $00 $00 for none..
+
+Offset 8, size 2:
+Another subroutine or $00 $00 for none..
+
+Offset 10, size 1:
+Number of bombs to pick up on this level.
+
+Offset 12, size 1:
+Jumpman's starting X position.
+
+Offset 13, size 1:
+Jumpman's starting Y position.
+
+Offset 14, size 2:
+No idea, but it's always $00 $06 (looks like a pointer to page 6).
+
+Offset 16, size 1:
+Always $64. Amount of points per bomb pickup. Interesting that this
+is potentially different per level, even though nothing was done with it.
+
+Offset 17, size 2:
+Amount of time bonus, e.g. $e8 $03 for Nothing To It (1000), $d0 $07 for
+Electrocution (2000).
+
+Offset 19, size 1:
+No idea. Always zero.
+
+Offset 20, size 2: don't know yet. **TODO** looks like a ROM address after all
+
+Offset 22, size 2:
+Address of the map for this level. When I figure out how the map
+format works, I'll document it in a file that will likely be called
+level_maps.txt.
+
+Offset 24, size 2:
+ROM address, more map data? (same areas of ROM)
+
+Offset 26, size 2:
+ROM address, more map data? (same areas of ROM)
+
+Offset 28, size 2:
+$00,$00 on most levels, else a ROM data table address.
+
+Offset 30, size 2:
+Always $00 $00.
+
+Offset 32, size 2:
+$06E6 for most levels, otherwise it's a subroutine in ROM.
+
+Offset 34, size 2:
+$06E6 for a few levels, otherwise it's a subroutine in ROM.
+
+Offset 36, size 2 (?):
+$40,$97 on every level.
+
+Offset 38, size 2:
+$06E6 for all levels except level07, where it's $AF58 (which is
+a subroutine in ROM).
+
+Offset 40, size 6:
+All $00 on all levels.
+
+Offset 46, size 2 (?):
+Unknown. Not a ROM address.
+
+Offset 48, size 2 (?):
+Unknown. Not a ROM address.
+
+Offset 50, size 1:
+$0C on most levels except:
+$18 on level01
+$4C on level03
+$04 on level05
+
+Offsets 51-54: unknown.
+
+Offset 55, size 1 (?):
+$00 on every level.
+
+Offset 56, size 2:
+$00,$00 on every level.
+
+Offset 58, size 2 (?):
+Unknown. Not a ROM address.
+
+Offset 60, size 4:
+$00,$00,$00,$00 on every level except level05 (Walls) where it's
+$FF,$FF,$FF,$FF.
+