*EDITOR: level editor Memory Map
Addresses outside *EDITOR: level editor's own code that it uses at run time — zero-page
workspace, RAM buffers, and memory-mapped I/O. For the code
itself (&1910–&2E9D), see the
disassembly listing.
Access:
R read, W write,
B indexing base — the address is named as
base,X/,Y, so the byte actually touched is
base + index and the literal byte at this address is
never itself accessed.
Zero page
| Address | Name | Access | Description |
|---|---|---|---|
&0070 |
plot_x |
R/W | Sprite position for plot_sprite: screen byte column. Also a pointer's low byte. |
&0071 |
plot_y |
R/W | Sprite position for plot_sprite: pixel row. Also a pointer's high byte. |
&0072 |
scratch |
R/W | Scratch: a pointer's low byte, a key number, a count or a length. |
&0073 |
scratch_hi |
R/W | Scratch: a pointer's high byte or a second key number. |
&0074 |
screen_ptr |
R/W | plot_sprite's screen address, low byte; also a running sum. |
&0075 |
screen_ptr_hi |
R/W | plot_sprite's screen address, high byte. |
&0076 |
row_start_ptr |
R/W | plot_sprite: start of the sprite row, low byte. |
&0077 |
row_start_ptr_hi |
R/W | plot_sprite: start of the sprite row, high byte. |
&0078 |
sprite_data_ptr |
R/W | plot_sprite: next sprite data byte, low byte. |
&0079 |
sprite_data_ptr_hi |
R/W | plot_sprite: next sprite data byte, high byte. |
&007A |
sprite_number |
R/W | The sprite plot_sprite plots. |
&0080 |
cursor_x |
R/W | The cursor's cell, x (0-31). |
&0081 |
cursor_y |
R/W | The cursor's cell, y (0-47). |
&0082 |
current_item |
R/W | The item SPACE places (0-&0F): 0 a wall, 1 the exit, 3 a trapdoor, &0D/&0E doors, &0F a key, the rest objects. |
&0083 |
last_slot |
R/W | The highest item slot, &4F: 80 slots. |
&0084 |
bit_mask |
R/W | A map bit's mask; also scratch, such as a slot number. |
&0085 |
map_ptr |
R/W | Address of a map byte, low byte. |
&0086 |
map_ptr_hi |
R/W | Address of a map byte, high byte. |
&0087 |
key_left |
R/W | INKEY number of the cursor-left key: ',' (&99). |
&0088 |
key_right |
R/W | INKEY number of the cursor-right key: '.' (&98). |
&0089 |
key_up |
R/W | INKEY number of the cursor-up key: 'A' (&BE). |
&008A |
key_down |
R/W | INKEY number of the cursor-down key: 'Z' (&9E). |
&008B |
object_count |
R/W | Objects placed (at most 29). |
&008C |
trapdoor_count |
R/W | Trapdoors placed (8 are needed to save). |
&008D |
exit_placed |
R/W | Non-zero once the exit is placed (needed to save). |
&008E |
door_count |
R/W | Doors placed (at most 20). |
OS workspace
| Address | Name | Access | Description |
|---|---|---|---|
&0287 |
os_break_intercept |
MOS BREAK intercept: a JMP here is called twice during a reset, with C clear and then set. |
|
&0288 |
os_break_intercept_lo |
||
&0289 |
os_break_intercept_hi |
Editor workspace
| Address | Name | Access | Description |
|---|---|---|---|
&0C00 |
slot_x |
B | Each item slot's x (80 slots). |
&0C60 |
slot_y |
B | Each item slot's y. |
&0CB0 |
slot_item |
B | Each item slot's editor sprite (0: free). |
&0DD0 |
line_x |
The cell a link line is drawn from or to, x; also where delete_item keeps the cursor. |
|
&0DD1 |
line_y |
The cell a link line is drawn from or to, y. |
|
&0DD2 |
line_gx |
That cell's graphics x, low byte (high byte at &0DD3). |
|
&0DD3 |
line_gx_hi |
That cell's graphics x, high byte. |
|
&0DD4 |
line_gy |
That cell's graphics y, low byte (high byte at &0DD5). |
|
&0DD5 |
line_gy_hi |
That cell's graphics y, high byte. |
|
&0DD6 |
pending_door_item |
The sprite of the door waiting for its key, or &FF if none. |
|
&0DD7 |
pending_door_slot |
The slot of the door waiting for its key. |
|
&0DD8 |
link_index |
The door-key link being made: an index into link_door and link_key. |
|
&2EA0 |
link_door |
B | Each of 20 door-key links' door slot, or &FF if unused. |
&2EC0 |
link_key |
B | Each door-key link's key slot. |
&2F00 |
wall_map |
B | The wall map being edited (the level's &C9 bytes, laid out as in the game). |
&2FF0 |
unpack_slot |
unpack_level's next free slot, counting down. |
|
&2FF1 |
unpack_link |
unpack_level's next free link, counting down. |
|
&6E80 |
wall_blocks |
Stones, loaded here by choose_wall_block: the 24 wall blocks (&30 bytes each) that a level can use. |
|
&7E00 |
object_free_map |
B | The object-free map being edited (&C9 bytes): a clear bit marks a cell where an object may lie. |
&7FF0 |
blank_sprite |
Zeros, plotted as the blank sprite &10. |
MOS 1.20 internals
| Address | Name | Access | Description |
|---|---|---|---|
&C375 |
mos_row_offsets |
B | MOS 1.20's table of the screen's character row offsets, high byte then low byte. |
&C376 |
mos_row_offsets_lo |
B | |
&D9CD |
mos120_reset_entry |
MOS 1.20's reset entry, the target of the 6502 reset vector. |
