aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jumpmanjr.dasm261
-rw-r--r--jumpmanjr.info54
-rw-r--r--leveldesc.info28
-rw-r--r--main.info26
-rw-r--r--mklevelinfo.pl4
5 files changed, 220 insertions, 153 deletions
diff --git a/jumpmanjr.dasm b/jumpmanjr.dasm
index 7cbfefe..691448d 100644
--- a/jumpmanjr.dasm
+++ b/jumpmanjr.dasm
@@ -1,5 +1,5 @@
; da65 V2.15 - Git 104f898
-; Created: 2016-09-03 04:58:20
+; Created: 2016-09-03 16:04:40
; Input file: jumpmanjr.rom
; Page: 1
@@ -23,6 +23,9 @@ dm_y_with_offset:= $00C7 ; graphics object Y offset, plus
dm_delta_x := $00C9 ; see draw_map and level_maps.txt
dm_delta_y := $00CA ; see draw_map and level_maps.txt
zp_temp1 := $00CB ; used for (zp,y) addressing, also for checking console keys in vblank_imm_isr
+num_in := $00D0 ; print_number input. 3-byte number (LSB first as usual) to be printed
+num_out := $00D3 ; area of (screen) memory where print_number stores its output
+num_color := $00D5 ; print_number adds this to numeric screencode output. normally 0, set to $80 on the end-of-game screen.
FR1 := $00E0
VDSLST := $0200
VKEYBD := $0208
@@ -63,6 +66,7 @@ sfx_slot_duration:= $0646
sfx_slot_freq := $0647
sfx_slot_curpos := $064E ; address we've got to so far, playing this sfx
sfx_tempo_tmp := $0661 ; ??
+num_tmp := $0665 ; temp used by print_number
player_x_pos := $067E ; stored in HPOSP0
player_y_pos := $0683 ; $C6 is the bottom of the level (where you end up when you die)
bullet_x_pos := $069B ; 4 bytes, meaning we can never have >4 bullets on screen at once (makes sense, GTIA only has 4 missiles)
@@ -103,6 +107,7 @@ number_of_players:= $06F4 ; 0 for single-player game, othe
level := $06F6
speed_value := $06F9 ; decoded speed (1-8)
current_player := $06FE ; *think* this ranges 1-4, not 0-3
+score_minus_one := $06FF
score := $0700
lives := $070A
bullet_flags := $0756 ; 4 bytes, 0 = bullet slot not in use, non-0 = bullet active
@@ -129,7 +134,7 @@ work_level_bomblist:= $079A ; addr of list of bombs, indexed
work_level_map_changes:= $079C ; address of list of addresses of map data, used for changing the map when certain bombs are picked up
work_level_indirect_subs:= $079E ; pointer to list of indirect subs, always $0000 in this game
work_level_sub_bomb:= $07A0 ; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
-work_level_sub_start:= $07A2 ; called at start of level, $06E6 for some levels, or else a ROM subroutine
+work_level_init := $07A2 ; called at start of level, $06E6 for some levels, or else a ROM subroutine
work_level_sub6 := $07A4 ; always $9740 aka game_main_loop
work_level_sub_eol:= $07A6 ; called at end of level (all bombs picked up). $06E6 for all but level08
work_level_offs_40:= $07A8 ; all zeroes
@@ -162,7 +167,7 @@ cur_level_bomblist:= $07DA ; addr of list of bombs, indexed
cur_level_map_changes:= $07DC ; address of list of addresses of map data, used for changing the map when certain bombs are picked up
cur_level_indirect_subs:= $07DE ; pointer to list of indirect subs, always $0000 in this game
cur_level_sub_bomb:= $07E0 ; called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine
-cur_level_sub_start:= $07E2 ; called at start of level, $06E6 for some levels, or else a ROM subroutine
+cur_level_init := $07E2 ; called at start of level, $06E6 for some levels, or else a ROM subroutine
cur_level_sub6 := $07E4 ; always $9740 aka game_main_loop
cur_level_sub_eol:= $07E6 ; called at end of level (all bombs picked up). $06E6 for all but level08
cur_level_offs_40:= $07E8 ; all zeroes
@@ -240,9 +245,9 @@ cue_sfx_jv:
jmp cue_sfx ; 8006 4C 55 82 LU.
; ----------------------------------------------------------------------------
-; gets called after the level is drawn & the intro music stops, and also during the level (?)
-xxx_level_something_jv:
- jmp xxx_level_something ; 8009 4C 00 86 L..
+; convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out
+print_number_jv:
+ jmp print_number ; 8009 4C 00 86 L..
; ----------------------------------------------------------------------------
; also adds extra life every 7500 points
@@ -250,7 +255,9 @@ update_score_display_jv:
jmp update_score_display ; 800C 4C BC 8C L..
; ----------------------------------------------------------------------------
-L800F: jmp L867E ; 800F 4C 7E 86 L~.
+; print remaining bonus time
+print_bonus_jv:
+ jmp print_bonus ; 800F 4C 7E 86 L~.
; ----------------------------------------------------------------------------
; bottom 2 GR.1 lines on the game board
@@ -292,7 +299,9 @@ next_player_jv:
jmp next_player ; 8027 4C AA 9A L..
; ----------------------------------------------------------------------------
-L802A: jmp LBA00 ; 802A 4C 00 BA L..
+; calls draw_map, plays level intro music, shows level name
+draw_level_jv:
+ jmp draw_level ; 802A 4C 00 BA L..
; ----------------------------------------------------------------------------
level_finished_jv:
@@ -314,10 +323,14 @@ special_init_jv:
jmp special_init ; 8036 4C 23 8B L#.
; ----------------------------------------------------------------------------
- jmp L8B2D ; 8039 4C 2D 8B L-.
+; special_init that doesn't clear memory. unused vector?
+special_init_2_jv:
+ jmp special_init_2 ; 8039 4C 2D 8B L-.
; ----------------------------------------------------------------------------
-L803C: jmp L8AE0 ; 803C 4C E0 8A L..
+; show blank screen with empty display list
+setup_blank_dlist_jv:
+ jmp setup_blank_dlist ; 803C 4C E0 8A L..
; ----------------------------------------------------------------------------
; 3 unused jump vectors, all pointed to the same RTS
@@ -836,7 +849,7 @@ L8370: lda ($CD),y ; 8370 B1 CD
init_hardware:
ldx #$18 ; 837C A2 18 ..
init_page6_loop:
- lda page6_initial_vectors_minus_one+10,x; 837E BD DD 85 ...
+ lda page6_initial_vectors_minus_one,x; 837E BD DD 85 ...
sta page6_vectors_minus_one,x ; 8381 9D FF 05 ...
dex ; 8384 CA .
bne init_page6_loop ; 8385 D0 F7 ..
@@ -884,7 +897,7 @@ set_char_base:
lda #$00 ; 83DE A9 00 ..
sta VKEYBD ; 83E0 8D 08 02 ...
sta SAVMSC ; 83E3 85 58 .X
- sta $D5 ; 83E5 85 D5 ..
+ sta num_color ; 83E5 85 D5 ..
lda #$30 ; 83E7 A9 30 .0
; tell OS that screen memory starts at $3000
set_savmsc:
@@ -1145,12 +1158,11 @@ data_table_85b6:
movement_direction_table:
.word $0000,$0000,$0000,$0000 ; 85BE 00 00 00 00 00 00 00 00 ........
.word $0000,$0101,$FF01,$0001 ; 85C6 00 00 01 01 01 FF 01 00 ........
- .word $0000,$01FF ; 85CE 00 00 FF 01 ....
- .byte $FF ; 85D2 FF .
+ .word $0000,$01FF,$FFFF,$00FF ; 85CE 00 00 FF 01 FF FF FF 00 ........
+ .word $0000,$0100,$FF00 ; 85D6 00 00 00 01 00 FF ......
+ .byte $00 ; 85DC 00 .
; 1-indexed
page6_initial_vectors_minus_one:
- .word $FFFF,$0000,$0000,$0001 ; 85D3 FF FF 00 00 00 00 01 00 ........
- .word $00FF ; 85DB FF 00 ..
.byte $00 ; 85DD 00 .
; copied into page 6 by init_hardware
page6_initial_vectors:
@@ -1172,88 +1184,94 @@ zero_filler_85f6:
.byte $00,$00,$00,$00,$00,$00,$00,$00 ; 85F6 00 00 00 00 00 00 00 00 ........
.byte $00,$00 ; 85FE 00 00 ..
; ----------------------------------------------------------------------------
-; gets called after the level is drawn & the intro music stops, and also during the level (?)
-xxx_level_something:
+; convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out
+print_number:
ldx #$00 ; 8600 A2 00 ..
ldy #$00 ; 8602 A0 00 ..
- stx $0665 ; 8604 8E 65 06 .e.
-L8607: lda #$10 ; 8607 A9 10 ..
+ stx num_tmp ; 8604 8E 65 06 .e.
+; starts at 0, gets added to
+next_digit:
+ lda #$10 ; 8607 A9 10 ..
clc ; 8609 18 .
- adc $D5 ; 860A 65 D5 e.
- sta ($D3),y ; 860C 91 D3 ..
+ adc num_color ; 860A 65 D5 e.
+ sta (num_out),y ; 860C 91 D3 ..
L860E: sec ; 860E 38 8
- lda $D0 ; 860F A5 D0 ..
- sbc L8702,x ; 8611 FD 02 87 ...
- sta $D0 ; 8614 85 D0 ..
- lda $D1 ; 8616 A5 D1 ..
- sbc L8703,x ; 8618 FD 03 87 ...
- sta $D1 ; 861B 85 D1 ..
- lda $D2 ; 861D A5 D2 ..
- sbc L8704,x ; 861F FD 04 87 ...
- sta $D2 ; 8622 85 D2 ..
+ lda num_in ; 860F A5 D0 ..
+ sbc pnum_subtractors,x ; 8611 FD 02 87 ...
+ sta num_in ; 8614 85 D0 ..
+ lda num_in+1 ; 8616 A5 D1 ..
+ sbc pnum_subtractors+1,x ; 8618 FD 03 87 ...
+ sta num_in+1 ; 861B 85 D1 ..
+ lda num_in+2 ; 861D A5 D2 ..
+ sbc pnum_subtractors+2,x ; 861F FD 04 87 ...
+ sta num_in+2 ; 8622 85 D2 ..
bcc L8633 ; 8624 90 0D ..
- lda ($D3),y ; 8626 B1 D3 ..
+ lda (num_out),y ; 8626 B1 D3 ..
clc ; 8628 18 .
adc #$01 ; 8629 69 01 i.
- sta ($D3),y ; 862B 91 D3 ..
- sta $0665 ; 862D 8D 65 06 .e.
+ sta (num_out),y ; 862B 91 D3 ..
+ sta num_tmp ; 862D 8D 65 06 .e.
jmp L860E ; 8630 4C 0E 86 L..
; ----------------------------------------------------------------------------
L8633: clc ; 8633 18 .
- lda L8702,x ; 8634 BD 02 87 ...
- adc $D0 ; 8637 65 D0 e.
- sta $D0 ; 8639 85 D0 ..
- lda L8703,x ; 863B BD 03 87 ...
- adc $D1 ; 863E 65 D1 e.
- sta $D1 ; 8640 85 D1 ..
- lda L8704,x ; 8642 BD 04 87 ...
- adc $D2 ; 8645 65 D2 e.
- sta $D2 ; 8647 85 D2 ..
- lda $0665 ; 8649 AD 65 06 .e.
+ lda pnum_subtractors,x ; 8634 BD 02 87 ...
+ adc num_in ; 8637 65 D0 e.
+ sta num_in ; 8639 85 D0 ..
+ lda pnum_subtractors+1,x ; 863B BD 03 87 ...
+ adc num_in+1 ; 863E 65 D1 e.
+ sta num_in+1 ; 8640 85 D1 ..
+ lda pnum_subtractors+2,x ; 8642 BD 04 87 ...
+ adc num_in+2 ; 8645 65 D2 e.
+ sta num_in+2 ; 8647 85 D2 ..
+ lda num_tmp ; 8649 AD 65 06 .e.
bne L865C ; 864C D0 0E ..
- lda ($D3),y ; 864E B1 D3 ..
+ lda (num_out),y ; 864E B1 D3 ..
and #$0F ; 8650 29 0F ).
bne L865C ; 8652 D0 08 ..
cpy #$05 ; 8654 C0 05 ..
- beq L8667 ; 8656 F0 0F ..
+ beq pnum_done ; 8656 F0 0F ..
lda #$00 ; 8658 A9 00 ..
- sta ($D3),y ; 865A 91 D3 ..
+ sta (num_out),y ; 865A 91 D3 ..
L865C: cpx #$0F ; 865C E0 0F ..
- beq L8667 ; 865E F0 07 ..
+ beq pnum_done ; 865E F0 07 ..
inx ; 8660 E8 .
inx ; 8661 E8 .
inx ; 8662 E8 .
iny ; 8663 C8 .
- jmp L8607 ; 8664 4C 07 86 L..
+ jmp next_digit ; 8664 4C 07 86 L..
; ----------------------------------------------------------------------------
-L8667: rts ; 8667 60 `
+pnum_done:
+ rts ; 8667 60 `
; ----------------------------------------------------------------------------
-L8668: lda #$F5 ; 8668 A9 F5 ..
- sta $D3 ; 866A 85 D3 ..
+print_score:
+ lda #$F5 ; 8668 A9 F5 ..
+ sta num_out ; 866A 85 D3 ..
lda #$3D ; 866C A9 3D .=
- sta $D4 ; 866E 85 D4 ..
+ sta num_out+1 ; 866E 85 D4 ..
ldx #$03 ; 8670 A2 03 ..
-L8672: lda $06FF,x ; 8672 BD FF 06 ...
+ps_loop:lda score_minus_one,x ; 8672 BD FF 06 ...
sta $CF,x ; 8675 95 CF ..
dex ; 8677 CA .
- bne L8672 ; 8678 D0 F8 ..
- jsr xxx_level_something ; 867A 20 00 86 ..
+ bne ps_loop ; 8678 D0 F8 ..
+ jsr print_number ; 867A 20 00 86 ..
rts ; 867D 60 `
; ----------------------------------------------------------------------------
-L867E: lda #$09 ; 867E A9 09 ..
- sta $D3 ; 8680 85 D3 ..
+; print remaining bonus time; work_level_points_per_bomb should read work_level_time_bonus-1
+print_bonus:
+ lda #$09 ; 867E A9 09 ..
+ sta num_out ; 8680 85 D3 ..
lda #$3E ; 8682 A9 3E .>
- sta $D4 ; 8684 85 D4 ..
+ sta num_out+1 ; 8684 85 D4 ..
ldx #$03 ; 8686 A2 03 ..
-L8688: lda work_level_points_per_bomb,x ; 8688 BD 90 07 ...
+pb_loop:lda work_level_points_per_bomb,x ; 8688 BD 90 07 ...
sta $CF,x ; 868B 95 CF ..
dex ; 868D CA .
- bne L8688 ; 868E D0 F8 ..
- jsr xxx_level_something ; 8690 20 00 86 ..
+ bne pb_loop ; 868E D0 F8 ..
+ jsr print_number ; 8690 20 00 86 ..
rts ; 8693 60 `
; ----------------------------------------------------------------------------
@@ -1290,8 +1308,8 @@ L86BF: cpy #$07 ; 86BF C0 07
bne L86BF ; 86CC D0 F1 ..
L86CE: lda #$CB ; 86CE A9 CB ..
sta $3DFC,y ; 86D0 99 FC 3D ..=
-L86D3: jsr L8668 ; 86D3 20 68 86 h.
- jsr L867E ; 86D6 20 7E 86 ~.
+L86D3: jsr print_score ; 86D3 20 68 86 h.
+ jsr print_bonus ; 86D6 20 7E 86 ~.
L86D9: rts ; 86D9 60 `
; ----------------------------------------------------------------------------
@@ -1301,10 +1319,11 @@ data_table_86da:
.byte $20,$20,$20,$20,$20,$20,$20,$20 ; 86EA 20 20 20 20 20 20 20 20
.byte $20,$20,$20,$20,$C2,$CF,$CE,$D5 ; 86F2 20 20 20 20 C2 CF CE D5 ....
.byte $D3,$20,$20,$20,$20,$20,$20,$20 ; 86FA D3 20 20 20 20 20 20 20 .
-L8702: .byte $A0 ; 8702 A0 .
-L8703: .byte $86 ; 8703 86 .
-L8704: .byte $01,$10,$27,$00,$E8,$03,$00,$64 ; 8704 01 10 27 00 E8 03 00 64 ..'....d
- .byte $00,$00,$0A,$00,$00,$01,$00,$00 ; 870C 00 00 0A 00 00 01 00 00 ........
+; 3 bytes per table entry
+pnum_subtractors:
+ .byte $A0,$86,$01,$10,$27,$00,$E8,$03 ; 8702 A0 86 01 10 27 00 E8 03 ....'...
+ .byte $00,$64,$00,$00,$0A,$00,$00,$01 ; 870A 00 64 00 00 0A 00 00 01 .d......
+ .byte $00,$00 ; 8712 00 00 ..
; ----------------------------------------------------------------------------
; clear the gameboard screen memory (called before drawing a level, natch)
clear_screen_mem:
@@ -1816,7 +1835,9 @@ init_loop:
blank_dlist_8add:
.byte $41,$DD,$8A ; 8ADD 41 DD 8A A..
; ----------------------------------------------------------------------------
-L8AE0: lda #$EB ; 8AE0 A9 EB ..
+; show blank screen with empty display list
+setup_blank_dlist:
+ lda #$EB ; 8AE0 A9 EB ..
sta dlist_shadow_lo ; 8AE2 8D AC 06 ...
lda #$8A ; 8AE5 A9 8A ..
sta dlist_shadow_hi ; 8AE7 8D AD 06 ...
@@ -1846,10 +1867,14 @@ zero_filler_8b00:
special_init:
ldx #$20 ; 8B23 A2 20 .
lda #$00 ; 8B25 A9 00 ..
-L8B27: sta bullet_y_delta+1,x ; 8B27 9D 5F 07 ._.
+; clear memory from $0760 to $077f
+si_clear:
+ sta bullet_y_delta+1,x ; 8B27 9D 5F 07 ._.
dex ; 8B2A CA .
- bne L8B27 ; 8B2B D0 FA ..
-L8B2D: lda work_level_unkn_table0 ; 8B2D AD 94 07 ...
+ bne si_clear ; 8B2B D0 FA ..
+; special_init that doesn't clear memory. does anything use this entry point?
+special_init_2:
+ lda work_level_unkn_table0 ; 8B2D AD 94 07 ...
sta $AC ; 8B30 85 AC ..
lda work_level_unkn_table0+1 ; 8B32 AD 95 07 ...
sta $AD ; 8B35 85 AD ..
@@ -1914,7 +1939,7 @@ L8B91: lda scores_msg,x ; 8B91 BD 7B 8C
ldx #$03 ; 8BA0 A2 03 ..
lda lives ; 8BA2 AD 0A 07 ...
sta $0713,y ; 8BA5 99 13 07 ...
-L8BA8: lda $06FF,x ; 8BA8 BD FF 06 ...
+L8BA8: lda score_minus_one,x ; 8BA8 BD FF 06 ...
sta $070B,y ; 8BAB 99 0B 07 ...
dey ; 8BAE 88 .
dex ; 8BAF CA .
@@ -1962,19 +1987,19 @@ not_alive:
sta $AF ; 8BED 85 AF ..
no_cross:
lda L8C84,x ; 8BEF BD 84 8C ...
- sta $D3 ; 8BF2 85 D3 ..
+ sta num_out ; 8BF2 85 D3 ..
lda #$30 ; 8BF4 A9 30 .0
- sta $D4 ; 8BF6 85 D4 ..
+ sta num_out+1 ; 8BF6 85 D4 ..
ldx #$03 ; 8BF8 A2 03 ..
L8BFA: lda $070B,y ; 8BFA B9 0B 07 ...
sta $CF,x ; 8BFD 95 CF ..
dey ; 8BFF 88 .
dex ; 8C00 CA .
bne L8BFA ; 8C01 D0 F7 ..
- jsr xxx_level_something_jv ; 8C03 20 09 80 ..
+ jsr print_number_jv ; 8C03 20 09 80 ..
lda $AF ; 8C06 A5 AF ..
iny ; 8C08 C8 .
- sta ($D3),y ; 8C09 91 D3 ..
+ sta (num_out),y ; 8C09 91 D3 ..
ldy $AD ; 8C0B A4 AD ..
dec $AE ; 8C0D C6 AE ..
bne show_reyalp_msg ; 8C0F D0 AF ..
@@ -2072,7 +2097,7 @@ zero_filler_8cb4:
; also adds extra life every 7500 points
update_score_display:
ldx #$03 ; 8CBC A2 03 ..
-L8CBE: lda $06FF,x ; 8CBE BD FF 06 ...
+L8CBE: lda score_minus_one,x ; 8CBE BD FF 06 ...
cmp score+2,x ; 8CC1 DD 02 07 ...
bcc L8CFA ; 8CC4 90 34 .4
beq L8CCB ; 8CC6 F0 03 ..
@@ -2246,7 +2271,7 @@ check_bonus_0:
bcs bonus_lt_256 ; 8DE2 B0 03 ..
dec work_level_time_bonus+1 ; 8DE4 CE 92 07 ...
bonus_lt_256:
- jsr L800F ; 8DE7 20 0F 80 ..
+ jsr print_bonus_jv ; 8DE7 20 0F 80 ..
lda #$FA ; 8DEA A9 FA ..
sta sfx_slot_tempo ; 8DEC 8D 3E 06 .>.
lda #$8D ; 8DEF A9 8D ..
@@ -2265,8 +2290,8 @@ level_finished:
sta player_speed ; 8E02 8D 24 06 .$.
sta $067F ; 8E05 8D 7F 06 ...
lda #$80 ; 8E08 A9 80 ..
- sta $D5 ; 8E0A 85 D5 ..
- jsr L800F ; 8E0C 20 0F 80 ..
+ sta num_color ; 8E0A 85 D5 ..
+ jsr print_bonus_jv ; 8E0C 20 0F 80 ..
; score += time_bonus;
add_time_bonus:
clc ; 8E0F 18 .
@@ -2280,7 +2305,7 @@ add_time_bonus:
inc score+2 ; 8E24 EE 02 07 ...
lt_64k: lda #$00 ; 8E27 A9 00 ..
sta AUDF1 ; 8E29 8D 00 D2 ...
- sta $D5 ; 8E2C 85 D5 ..
+ sta num_color ; 8E2C 85 D5 ..
sta AUDC1 ; 8E2E 8D 01 D2 ...
sta jiffy_timer_1 ; 8E31 8D 1A 06 ...
sta playing_level ; 8E34 8D 27 06 .'.
@@ -3037,7 +3062,7 @@ wait_opt_key_sfx:
get_player_speeds:
lda $B8 ; 94DE A5 B8 ..
sta $B9 ; 94E0 85 B9 ..
- sta $06FF ; 94E2 8D FF 06 ...
+ sta score_minus_one ; 94E2 8D FF 06 ...
sta number_of_players ; 94E5 8D F4 06 ...
lda #$00 ; 94E8 A9 00 ..
sta $B8 ; 94EA 85 B8 ..
@@ -3107,8 +3132,8 @@ display_speed:
inc $B8 ; 954A E6 B8 ..
dec $BA ; 954C C6 BA ..
bne init_speed ; 954E D0 DA ..
- inc $06FF ; 9550 EE FF 06 ...
- lda $06FF ; 9553 AD FF 06 ...
+ inc score_minus_one ; 9550 EE FF 06 ...
+ lda score_minus_one ; 9553 AD FF 06 ...
sta current_player ; 9556 8D FE 06 ...
inc current_player ; 9559 EE FE 06 ...
jmp afterlife ; 955C 4C 00 96 L..
@@ -3245,9 +3270,9 @@ copy_level_desc_2:
bne copy_level_desc_2 ; 9680 D0 F5 ..
; call start subroutine for current level
init_level:
- lda work_level_sub_start ; 9682 AD A2 07 ...
+ lda work_level_init ; 9682 AD A2 07 ...
sta $06E1 ; 9685 8D E1 06 ...
- lda work_level_sub_start+1 ; 9688 AD A3 07 ...
+ lda work_level_init+1 ; 9688 AD A3 07 ...
sta $06E2 ; 968B 8D E2 06 ...
jsr L06E0 ; 968E 20 E0 06 ..
; set color regs from level descriptor (COLOR4 always $00, black)
@@ -3294,7 +3319,7 @@ sl_loop:lda ($D7),y ; 96D8 B1 D7
iny ; 96DD C8 .
cpy #$40 ; 96DE C0 40 .@
bne sl_loop ; 96E0 D0 F6 ..
- jsr L802A ; 96E2 20 2A 80 *.
+ jsr draw_level_jv ; 96E2 20 2A 80 *.
rts ; 96E5 60 `
; ----------------------------------------------------------------------------
@@ -3837,7 +3862,7 @@ next_player:
; wraparound to 1 if > total players
next_player_num:
inc current_player ; 9AB8 EE FE 06 ...
- lda $06FF ; 9ABB AD FF 06 ...
+ lda score_minus_one ; 9ABB AD FF 06 ...
cmp current_player ; 9ABE CD FE 06 ...
bcs look_for_alive ; 9AC1 B0 08 ..
lda #$01 ; 9AC3 A9 01 ..
@@ -3863,7 +3888,7 @@ is_player_dead:
; ----------------------------------------------------------------------------
; if player hasn't been eliminated, but is out of lives, eliminate him
check_lives:
- stx $06FF ; 9AE5 8E FF 06 ...
+ stx score_minus_one ; 9AE5 8E FF 06 ...
jsr mul_player_11 ; 9AE8 20 7C 9A |.
jsr load_struct_player ; 9AEB 20 9B 9A ..
lda lives ; 9AEE AD 0A 07 ...
@@ -4291,7 +4316,7 @@ level01_indirect_subs:
level01_sub_bomb:
.addr L06E6 ; A020 E6 06 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level01_sub_start:
+level01_init:
.addr L06E6 ; A022 E6 06 ..
; always $9740 aka game_main_loop
level01_sub6:
@@ -4398,7 +4423,7 @@ level02_indirect_subs:
level02_sub_bomb:
.addr electrocution_bomb_pickup ; A060 98 A4 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level02_sub_start:
+level02_init:
.addr special_init_jv ; A062 36 80 6.
; always $9740 aka game_main_loop
level02_sub6:
@@ -4505,7 +4530,7 @@ level03_indirect_subs:
level03_sub_bomb:
.addr L06E6 ; A0A0 E6 06 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level03_sub_start:
+level03_init:
.addr dumbwaiter_setup ; A0A2 8C A6 ..
; always $9740 aka game_main_loop
level03_sub6:
@@ -4612,7 +4637,7 @@ level04_indirect_subs:
level04_sub_bomb:
.addr L06E6 ; A0E0 E6 06 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level04_sub_start:
+level04_init:
.addr special_init_jv ; A0E2 36 80 6.
; always $9740 aka game_main_loop
level04_sub6:
@@ -4719,7 +4744,7 @@ level05_indirect_subs:
level05_sub_bomb:
.addr L06E6 ; A120 E6 06 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level05_sub_start:
+level05_init:
.addr L06E6 ; A122 E6 06 ..
; always $9740 aka game_main_loop
level05_sub6:
@@ -4826,7 +4851,7 @@ level06_indirect_subs:
level06_sub_bomb:
.addr walls_bomb_sub ; A160 73 AA s.
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level06_sub_start:
+level06_init:
.addr walls_init ; A162 C6 A9 ..
; always $9740 aka game_main_loop
level06_sub6:
@@ -4933,7 +4958,7 @@ level07_indirect_subs:
level07_sub_bomb:
.addr L06E6 ; A1A0 E6 06 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level07_sub_start:
+level07_init:
.addr special_init_jv ; A1A2 36 80 6.
; always $9740 aka game_main_loop
level07_sub6:
@@ -5040,7 +5065,7 @@ level08_indirect_subs:
level08_sub_bomb:
.addr spellbound_bomb_sub ; A1E0 23 AF #.
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level08_sub_start:
+level08_init:
.addr spellbound_init ; A1E2 9B AE ..
; always $9740 aka game_main_loop
level08_sub6:
@@ -5147,7 +5172,7 @@ level09_indirect_subs:
level09_sub_bomb:
.addr blackout_bomb_sub ; A220 21 B1 !.
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level09_sub_start:
+level09_init:
.addr blackout_init ; A222 C4 B0 ..
; always $9740 aka game_main_loop
level09_sub6:
@@ -5254,7 +5279,7 @@ level10_indirect_subs:
level10_sub_bomb:
.addr herethere_bomb_sub ; A260 FD B2 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level10_sub_start:
+level10_init:
.addr special_init_jv ; A262 36 80 6.
; always $9740 aka game_main_loop
level10_sub6:
@@ -5361,7 +5386,7 @@ level11_indirect_subs:
level11_sub_bomb:
.addr hatch_bomb_sub ; A2A0 4C B4 L.
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level11_sub_start:
+level11_init:
.addr special_init_jv ; A2A2 36 80 6.
; always $9740 aka game_main_loop
level11_sub6:
@@ -5468,7 +5493,7 @@ level12_indirect_subs:
level12_sub_bomb:
.addr L06E6 ; A2E0 E6 06 ..
; called at start of level, $06E6 for some levels, or else a ROM subroutine
-level12_sub_start:
+level12_init:
.addr special_init_jv ; A2E2 36 80 6.
; always $9740 aka game_main_loop
level12_sub6:
@@ -7162,7 +7187,7 @@ score_mod_1m:
sbc #$0F ; B7E9 E9 0F ..
sta score+2 ; B7EB 8D 02 07 ...
score_below_1m:
- jmp L8668 ; B7EE 4C 68 86 Lh.
+ jmp print_score ; B7EE 4C 68 86 Lh.
; ----------------------------------------------------------------------------
zero_filler_b7f1:
@@ -7181,21 +7206,21 @@ end_of_level_bonus:
sta $A6 ; B812 85 A6 ..
inc $A6 ; B814 E6 A6 ..
lda $A4 ; B816 A5 A4 ..
- sta $D0 ; B818 85 D0 ..
+ sta num_in ; B818 85 D0 ..
lda $A5 ; B81A A5 A5 ..
- sta $D1 ; B81C 85 D1 ..
+ sta num_in+1 ; B81C 85 D1 ..
lda #$00 ; B81E A9 00 ..
sta work_level_time_bonus ; B820 8D 91 07 ...
- sta $D2 ; B823 85 D2 ..
+ sta num_in+2 ; B823 85 D2 ..
sta work_level_time_bonus+1 ; B825 8D 92 07 ...
lda #$E9 ; B828 A9 E9 ..
- sta $D3 ; B82A 85 D3 ..
+ sta num_out ; B82A 85 D3 ..
lda #$3D ; B82C A9 3D .=
- sta $D4 ; B82E 85 D4 ..
- jsr xxx_level_something_jv ; B830 20 09 80 ..
+ sta num_out+1 ; B82E 85 D4 ..
+ jsr print_number_jv ; B830 20 09 80 ..
lda #$78 ; B833 A9 78 .x
sta $3DE9 ; B835 8D E9 3D ..=
- jsr L800F ; B838 20 0F 80 ..
+ jsr print_bonus_jv ; B838 20 0F 80 ..
add_life_bonus:
clc ; B83B 18 .
lda score ; B83C AD 00 07 ...
@@ -7214,7 +7239,7 @@ LB851: clc ; B851 18
adc $A5 ; B85D 65 A5 e.
sta work_level_time_bonus+1 ; B85F 8D 92 07 ...
jsr update_score_display_jv ; B862 20 0C 80 ..
- jsr L800F ; B865 20 0F 80 ..
+ jsr print_bonus_jv ; B865 20 0F 80 ..
; play once per life
play_life_bonus_sfx:
lda #$96 ; B868 A9 96 ..
@@ -7355,7 +7380,9 @@ LB9EC: ldy #$2F ; B9EC A0 2F
rts ; B9FF 60 `
; ----------------------------------------------------------------------------
-LBA00: lda #$40 ; BA00 A9 40 .@
+; calls draw_map, plays level intro music, shows level name
+draw_level:
+ lda #$40 ; BA00 A9 40 .@
sta NMIEN ; BA02 8D 0E D4 ...
lda #$00 ; BA05 A9 00 ..
sta COLOR3 ; BA07 8D C7 02 ...
@@ -7495,7 +7522,7 @@ level_name_hscrol_table:
; ----------------------------------------------------------------------------
; the WELL DONE screen, when you beat all the levels. after this, the game plays random levels.
well_done_screen:
- jsr L803C ; BC00 20 3C 80 <.
+ jsr setup_blank_dlist_jv ; BC00 20 3C 80 <.
jsr enable_joystick_jv ; BC03 20 1B 80 ..
jsr clear_screen_mem_jv ; BC06 20 1E 80 ..
lda #$00 ; BC09 A9 00 ..
@@ -7569,15 +7596,15 @@ LBCA3: lda total_score_msg_minus_one,x ; BCA3 BD D1 BD
dex ; BCA9 CA .
bne LBCA3 ; BCAA D0 F7 ..
lda #$3D ; BCAC A9 3D .=
- sta $D4 ; BCAE 85 D4 ..
+ sta num_out+1 ; BCAE 85 D4 ..
lda #$F5 ; BCB0 A9 F5 ..
- sta $D3 ; BCB2 85 D3 ..
+ sta num_out ; BCB2 85 D3 ..
ldx #$03 ; BCB4 A2 03 ..
-LBCB6: lda $06FF,x ; BCB6 BD FF 06 ...
+LBCB6: lda score_minus_one,x ; BCB6 BD FF 06 ...
sta $CF,x ; BCB9 95 CF ..
dex ; BCBB CA .
bne LBCB6 ; BCBC D0 F8 ..
- jsr xxx_level_something_jv ; BCBE 20 09 80 ..
+ jsr print_number_jv ; BCBE 20 09 80 ..
LBCC1: lda $0663 ; BCC1 AD 63 06 .c.
bne LBCC1 ; BCC4 D0 FB ..
lda level ; BCC6 AD F6 06 ...
diff --git a/jumpmanjr.info b/jumpmanjr.info
index 4de38f2..0589e61 100644
--- a/jumpmanjr.info
+++ b/jumpmanjr.info
@@ -117,12 +117,19 @@ label { name "check_collisions_3"; addr $9832; size 1; comment "movement/jumping
label { name "special_init"; addr $8B23; comment "various levels use this as their init, or use an init that calls this"; };
label { name "special_init_jv"; addr $8036; comment "various levels use this as their init, or use an init that calls this"; };
+label { name "si_clear"; addr $8B27; comment "clear memory from $0760 to $077f"; };
+label { name "special_init_2"; addr $8B2D; comment "special_init that doesn't clear memory. does anything use this entry point?"; };
+label { name "special_init_2_jv"; addr $8039; comment "special_init that doesn't clear memory. unused vector?"; };
label { name "next_player"; addr $9AAA; comment "used in multiplayer games, also called in single player (?)"; };
label { name "next_player_jv"; addr $8027; comment "used in multiplayer games, also called in single player (?)"; };
label { name "mul_player_11"; addr $9A7C; comment "multiply current player number by 11, return result in Y"; };
label { name "add_11"; addr $9A82; };
label { name "return_y"; addr $9A8A; };
label { name "save_struct_player"; addr $9A8C; };
+label { name "setup_blank_dlist"; addr $8AE0; comment "show blank screen with empty display list"; };
+label { name "setup_blank_dlist_jv"; addr $803C; comment "show blank screen with empty display list"; };
+label { name "draw_level"; addr $BA00; comment "calls draw_map, plays level intro music, shows level name"; };
+label { name "draw_level_jv"; addr $802A; comment "calls draw_map, plays level intro music, shows level name"; };
label { name "mid_jump"; addr $99A8; size 1; comment "check & see if we're done jumping"; };
label { name "continue_jump"; addr $99BD; size 1; comment "we're in mid-jump and didn't hit anything, keep going"; };
@@ -311,6 +318,7 @@ range { name "falling_table_1"; start $8a39; end $8a7f; type bytetable; };
label { name "falling_table_2"; addr $8A42; };
label { name "play_sfx_death"; addr $8936; };
range { name "data_table_86da"; start $86da; end $8713; type bytetable; };
+label { name "pnum_subtractors"; addr $8702; size 18; comment "3 bytes per table entry"; };
range { name "level_name_hscrol_table"; start $BBF0; end $BBff; type bytetable; comment "used for centering level name on gameboard"; };
range { name "zero_filler_b8bf"; start $b8bf; end $b96a; type bytetable; };
range { name "zero_filler_b7f1"; start $B7F1; end $B7FF; type bytetable; };
@@ -465,8 +473,8 @@ range { name "sfx_letter_bonus"; start $AFCB; end $afff; type bytetable; comment
label { name "cue_letter_sfx"; addr $AFB9; comment "play sfx_letter_bonus"; };
label { name "stub"; addr $8405; comment "just an RTS"; };
range { name "data_table_85b6"; start $85b6; end $85bd; type bytetable; comment "used in vblank_imm_isr, not sure for what yet"; };
-label { name "page6_initial_vectors_minus_one"; addr $85d3; comment "1-indexed"; };
label { name "page6_vectors_minus_one"; addr $05ff; comment "1-indexed"; };
+label { name "page6_initial_vectors_minus_one"; addr $85dd; comment "1-indexed"; };
range { name "page6_initial_vectors"; start $85de; end $85f5; type addrtable; comment "copied into page 6 by init_hardware"; };
label { name "page6_vectors"; addr $0600; size 24; comment "initialized with page6_initial_vectors"; };
label { name "zigzag_sub0"; addr $AD68; comment "move bullets in ways that defy the laws of physics and common sense"; };
@@ -590,6 +598,7 @@ label { name "init_page6_loop"; addr $837e; };
# these are so far only for player 1
label { name "number_of_players"; addr $06f4; size 1; comment "0 for single-player game, otherwise range 1-3 (2 to 4 players)"; };
+label { name "score_minus_one"; addr $06ff; size 1; };
label { name "score"; addr $0700; size 3; };
label { name "level"; addr $06f6; size 1; };
label { name "lives"; addr $070a; size 1; };
@@ -709,8 +718,19 @@ label { name "update_status_window"; addr $8694; comment "bottom 2 GR.1 lines on
label { name "update_status_window_jv"; addr $8012; comment "bottom 2 GR.1 lines on the game board"; };
label { name "setup_gameboard_dlist"; addr $9B00; comment "for some reason there are 2 copies of the display list, at $0800 and $0881"; };
label { name "setup_gameboard_dlist_jv"; addr $8015; comment "for some reason there are 2 copies of the display list, at $0800 and $0881"; };
-label { name "xxx_level_something"; addr $8600; comment "gets called after the level is drawn & the intro music stops, and also during the level (?)"; };
-label { name "xxx_level_something_jv"; addr $8009; comment "gets called after the level is drawn & the intro music stops, and also during the level (?)"; };
+label { name "print_number"; addr $8600; comment "convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out"; };
+label { name "print_number_jv"; addr $8009; comment "convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out"; };
+label { name "num_tmp"; addr $0665; size 1; comment "temp used by print_number"; };
+label { name "num_in"; addr $D0; size 3; comment "print_number input. 3-byte number (LSB first as usual) to be printed"; };
+label { name "num_out"; addr $D3; size 2; comment "area of (screen) memory where print_number stores its output"; };
+label { name "num_color"; addr $D5; size 1; comment "print_number adds this to numeric screencode output. normally 0, set to $80 on the end-of-game screen."; };
+label { name "print_bonus"; addr $867E; comment "print remaining bonus time; work_level_points_per_bomb should read work_level_time_bonus-1"; };
+label { name "print_bonus_jv"; addr $800F; comment "print remaining bonus time"; };
+label { name "pnum_done"; addr $8667; };
+label { name "next_digit"; addr $8607; comment "starts at 0, gets added to"; };
+label { name "print_score"; addr $8668; };
+label { name "ps_loop"; addr $8672; };
+label { name "pb_loop"; addr $8688; };
label { name "draw_map"; addr $8049; comment "the entry point for parsing the level map and drawing graphics from it. see level_maps.txt. caller must set $C0/$C1 to the address of the map data. modders beware: bogus map data can & will cause infinite loops."; };
label { name "draw_map_jv"; addr $8000; comment "the entry point for parsing the level map and drawing graphics from it. see level_maps.txt."; };
label { name "dm_get_opcode"; addr $804B; comment "$C0/$C1 points to $A300 (level01_desc) on the first call"; };
@@ -765,7 +785,7 @@ label { name "work_level_bomblist"; addr $079a; size 2; comment "addr of list of
label { name "work_level_map_changes"; addr $079c; size 2; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
label { name "work_level_indirect_subs"; addr $079e; size 2; comment "pointer to list of indirect subs, always $0000 in this game"; };
label { name "work_level_sub_bomb"; addr $07a0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "work_level_sub_start"; addr $07a2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+label { name "work_level_init"; addr $07a2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "work_level_sub6"; addr $07a4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "work_level_sub_eol"; addr $07a6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
label { name "work_level_offs_40"; addr $07a8; size 6; comment "all zeroes"; };
@@ -799,7 +819,7 @@ label { name "cur_level_bomblist"; addr $07da; size 2; comment "addr of list of
label { name "cur_level_map_changes"; addr $07dc; size 2; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
label { name "cur_level_indirect_subs"; addr $07de; size 2; comment "pointer to list of indirect subs, always $0000 in this game"; };
label { name "cur_level_sub_bomb"; addr $07e0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "cur_level_sub_start"; addr $07e2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+label { name "cur_level_init"; addr $07e2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "cur_level_sub6"; addr $07e4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "cur_level_sub_eol"; addr $07e6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
label { name "cur_level_offs_40"; addr $07e8; size 6; comment "all zeroes"; };
@@ -833,7 +853,7 @@ range { name "level01_bomblist"; start $a01a; end $a01b; type addrtable; comment
range { name "level01_map_changes"; start $a01c; end $a01d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level01_indirect_subs"; start $a01e; end $a01f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level01_sub_bomb"; start $a020; end $a021; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level01_sub_start"; start $a022; end $a023; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level01_init"; start $a022; end $a023; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level01_sub6"; start $a024; end $a025; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level01_sub_eol"; start $a026; end $a027; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level01_offs_40"; start $a028; end $a02d; type bytetable; comment "all zeroes"; };
@@ -867,7 +887,7 @@ range { name "level02_bomblist"; start $a05a; end $a05b; type addrtable; comment
range { name "level02_map_changes"; start $a05c; end $a05d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level02_indirect_subs"; start $a05e; end $a05f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level02_sub_bomb"; start $a060; end $a061; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level02_sub_start"; start $a062; end $a063; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level02_init"; start $a062; end $a063; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level02_sub6"; start $a064; end $a065; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level02_sub_eol"; start $a066; end $a067; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level02_offs_40"; start $a068; end $a06d; type bytetable; comment "all zeroes"; };
@@ -901,7 +921,7 @@ range { name "level03_bomblist"; start $a09a; end $a09b; type addrtable; comment
range { name "level03_map_changes"; start $a09c; end $a09d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level03_indirect_subs"; start $a09e; end $a09f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level03_sub_bomb"; start $a0a0; end $a0a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level03_sub_start"; start $a0a2; end $a0a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level03_init"; start $a0a2; end $a0a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level03_sub6"; start $a0a4; end $a0a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level03_sub_eol"; start $a0a6; end $a0a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level03_offs_40"; start $a0a8; end $a0ad; type bytetable; comment "all zeroes"; };
@@ -935,7 +955,7 @@ range { name "level04_bomblist"; start $a0da; end $a0db; type addrtable; comment
range { name "level04_map_changes"; start $a0dc; end $a0dd; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level04_indirect_subs"; start $a0de; end $a0df; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level04_sub_bomb"; start $a0e0; end $a0e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level04_sub_start"; start $a0e2; end $a0e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level04_init"; start $a0e2; end $a0e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level04_sub6"; start $a0e4; end $a0e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level04_sub_eol"; start $a0e6; end $a0e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level04_offs_40"; start $a0e8; end $a0ed; type bytetable; comment "all zeroes"; };
@@ -969,7 +989,7 @@ range { name "level05_bomblist"; start $a11a; end $a11b; type addrtable; comment
range { name "level05_map_changes"; start $a11c; end $a11d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level05_indirect_subs"; start $a11e; end $a11f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level05_sub_bomb"; start $a120; end $a121; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level05_sub_start"; start $a122; end $a123; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level05_init"; start $a122; end $a123; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level05_sub6"; start $a124; end $a125; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level05_sub_eol"; start $a126; end $a127; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level05_offs_40"; start $a128; end $a12d; type bytetable; comment "all zeroes"; };
@@ -1003,7 +1023,7 @@ range { name "level06_bomblist"; start $a15a; end $a15b; type addrtable; comment
range { name "level06_map_changes"; start $a15c; end $a15d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level06_indirect_subs"; start $a15e; end $a15f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level06_sub_bomb"; start $a160; end $a161; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level06_sub_start"; start $a162; end $a163; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level06_init"; start $a162; end $a163; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level06_sub6"; start $a164; end $a165; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level06_sub_eol"; start $a166; end $a167; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level06_offs_40"; start $a168; end $a16d; type bytetable; comment "all zeroes"; };
@@ -1037,7 +1057,7 @@ range { name "level07_bomblist"; start $a19a; end $a19b; type addrtable; comment
range { name "level07_map_changes"; start $a19c; end $a19d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level07_indirect_subs"; start $a19e; end $a19f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level07_sub_bomb"; start $a1a0; end $a1a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level07_sub_start"; start $a1a2; end $a1a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level07_init"; start $a1a2; end $a1a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level07_sub6"; start $a1a4; end $a1a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level07_sub_eol"; start $a1a6; end $a1a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level07_offs_40"; start $a1a8; end $a1ad; type bytetable; comment "all zeroes"; };
@@ -1071,7 +1091,7 @@ range { name "level08_bomblist"; start $a1da; end $a1db; type addrtable; comment
range { name "level08_map_changes"; start $a1dc; end $a1dd; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level08_indirect_subs"; start $a1de; end $a1df; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level08_sub_bomb"; start $a1e0; end $a1e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level08_sub_start"; start $a1e2; end $a1e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level08_init"; start $a1e2; end $a1e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level08_sub6"; start $a1e4; end $a1e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level08_sub_eol"; start $a1e6; end $a1e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level08_offs_40"; start $a1e8; end $a1ed; type bytetable; comment "all zeroes"; };
@@ -1105,7 +1125,7 @@ range { name "level09_bomblist"; start $a21a; end $a21b; type addrtable; comment
range { name "level09_map_changes"; start $a21c; end $a21d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level09_indirect_subs"; start $a21e; end $a21f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level09_sub_bomb"; start $a220; end $a221; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level09_sub_start"; start $a222; end $a223; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level09_init"; start $a222; end $a223; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level09_sub6"; start $a224; end $a225; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level09_sub_eol"; start $a226; end $a227; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level09_offs_40"; start $a228; end $a22d; type bytetable; comment "all zeroes"; };
@@ -1139,7 +1159,7 @@ range { name "level10_bomblist"; start $a25a; end $a25b; type addrtable; comment
range { name "level10_map_changes"; start $a25c; end $a25d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level10_indirect_subs"; start $a25e; end $a25f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level10_sub_bomb"; start $a260; end $a261; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level10_sub_start"; start $a262; end $a263; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level10_init"; start $a262; end $a263; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level10_sub6"; start $a264; end $a265; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level10_sub_eol"; start $a266; end $a267; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level10_offs_40"; start $a268; end $a26d; type bytetable; comment "all zeroes"; };
@@ -1173,7 +1193,7 @@ range { name "level11_bomblist"; start $a29a; end $a29b; type addrtable; comment
range { name "level11_map_changes"; start $a29c; end $a29d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level11_indirect_subs"; start $a29e; end $a29f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level11_sub_bomb"; start $a2a0; end $a2a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level11_sub_start"; start $a2a2; end $a2a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level11_init"; start $a2a2; end $a2a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level11_sub6"; start $a2a4; end $a2a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level11_sub_eol"; start $a2a6; end $a2a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level11_offs_40"; start $a2a8; end $a2ad; type bytetable; comment "all zeroes"; };
@@ -1207,7 +1227,7 @@ range { name "level12_bomblist"; start $a2da; end $a2db; type addrtable; comment
range { name "level12_map_changes"; start $a2dc; end $a2dd; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level12_indirect_subs"; start $a2de; end $a2df; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level12_sub_bomb"; start $a2e0; end $a2e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level12_sub_start"; start $a2e2; end $a2e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level12_init"; start $a2e2; end $a2e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level12_sub6"; start $a2e4; end $a2e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level12_sub_eol"; start $a2e6; end $a2e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level12_offs_40"; start $a2e8; end $a2ed; type bytetable; comment "all zeroes"; };
diff --git a/leveldesc.info b/leveldesc.info
index 12e7301..bbe8179 100644
--- a/leveldesc.info
+++ b/leveldesc.info
@@ -19,7 +19,7 @@ label { name "work_level_bomblist"; addr $079a; size 2; comment "addr of list of
label { name "work_level_map_changes"; addr $079c; size 2; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
label { name "work_level_indirect_subs"; addr $079e; size 2; comment "pointer to list of indirect subs, always $0000 in this game"; };
label { name "work_level_sub_bomb"; addr $07a0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "work_level_sub_start"; addr $07a2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+label { name "work_level_init"; addr $07a2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "work_level_sub6"; addr $07a4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "work_level_sub_eol"; addr $07a6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
label { name "work_level_offs_40"; addr $07a8; size 6; comment "all zeroes"; };
@@ -53,7 +53,7 @@ label { name "cur_level_bomblist"; addr $07da; size 2; comment "addr of list of
label { name "cur_level_map_changes"; addr $07dc; size 2; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
label { name "cur_level_indirect_subs"; addr $07de; size 2; comment "pointer to list of indirect subs, always $0000 in this game"; };
label { name "cur_level_sub_bomb"; addr $07e0; size 2; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-label { name "cur_level_sub_start"; addr $07e2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+label { name "cur_level_init"; addr $07e2; size 2; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
label { name "cur_level_sub6"; addr $07e4; size 2; comment "always $9740 aka game_main_loop"; };
label { name "cur_level_sub_eol"; addr $07e6; size 2; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
label { name "cur_level_offs_40"; addr $07e8; size 6; comment "all zeroes"; };
@@ -87,7 +87,7 @@ range { name "level01_bomblist"; start $a01a; end $a01b; type addrtable; comment
range { name "level01_map_changes"; start $a01c; end $a01d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level01_indirect_subs"; start $a01e; end $a01f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level01_sub_bomb"; start $a020; end $a021; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level01_sub_start"; start $a022; end $a023; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level01_init"; start $a022; end $a023; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level01_sub6"; start $a024; end $a025; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level01_sub_eol"; start $a026; end $a027; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level01_offs_40"; start $a028; end $a02d; type bytetable; comment "all zeroes"; };
@@ -121,7 +121,7 @@ range { name "level02_bomblist"; start $a05a; end $a05b; type addrtable; comment
range { name "level02_map_changes"; start $a05c; end $a05d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level02_indirect_subs"; start $a05e; end $a05f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level02_sub_bomb"; start $a060; end $a061; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level02_sub_start"; start $a062; end $a063; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level02_init"; start $a062; end $a063; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level02_sub6"; start $a064; end $a065; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level02_sub_eol"; start $a066; end $a067; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level02_offs_40"; start $a068; end $a06d; type bytetable; comment "all zeroes"; };
@@ -155,7 +155,7 @@ range { name "level03_bomblist"; start $a09a; end $a09b; type addrtable; comment
range { name "level03_map_changes"; start $a09c; end $a09d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level03_indirect_subs"; start $a09e; end $a09f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level03_sub_bomb"; start $a0a0; end $a0a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level03_sub_start"; start $a0a2; end $a0a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level03_init"; start $a0a2; end $a0a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level03_sub6"; start $a0a4; end $a0a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level03_sub_eol"; start $a0a6; end $a0a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level03_offs_40"; start $a0a8; end $a0ad; type bytetable; comment "all zeroes"; };
@@ -189,7 +189,7 @@ range { name "level04_bomblist"; start $a0da; end $a0db; type addrtable; comment
range { name "level04_map_changes"; start $a0dc; end $a0dd; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level04_indirect_subs"; start $a0de; end $a0df; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level04_sub_bomb"; start $a0e0; end $a0e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level04_sub_start"; start $a0e2; end $a0e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level04_init"; start $a0e2; end $a0e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level04_sub6"; start $a0e4; end $a0e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level04_sub_eol"; start $a0e6; end $a0e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level04_offs_40"; start $a0e8; end $a0ed; type bytetable; comment "all zeroes"; };
@@ -223,7 +223,7 @@ range { name "level05_bomblist"; start $a11a; end $a11b; type addrtable; comment
range { name "level05_map_changes"; start $a11c; end $a11d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level05_indirect_subs"; start $a11e; end $a11f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level05_sub_bomb"; start $a120; end $a121; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level05_sub_start"; start $a122; end $a123; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level05_init"; start $a122; end $a123; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level05_sub6"; start $a124; end $a125; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level05_sub_eol"; start $a126; end $a127; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level05_offs_40"; start $a128; end $a12d; type bytetable; comment "all zeroes"; };
@@ -257,7 +257,7 @@ range { name "level06_bomblist"; start $a15a; end $a15b; type addrtable; comment
range { name "level06_map_changes"; start $a15c; end $a15d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level06_indirect_subs"; start $a15e; end $a15f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level06_sub_bomb"; start $a160; end $a161; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level06_sub_start"; start $a162; end $a163; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level06_init"; start $a162; end $a163; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level06_sub6"; start $a164; end $a165; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level06_sub_eol"; start $a166; end $a167; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level06_offs_40"; start $a168; end $a16d; type bytetable; comment "all zeroes"; };
@@ -291,7 +291,7 @@ range { name "level07_bomblist"; start $a19a; end $a19b; type addrtable; comment
range { name "level07_map_changes"; start $a19c; end $a19d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level07_indirect_subs"; start $a19e; end $a19f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level07_sub_bomb"; start $a1a0; end $a1a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level07_sub_start"; start $a1a2; end $a1a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level07_init"; start $a1a2; end $a1a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level07_sub6"; start $a1a4; end $a1a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level07_sub_eol"; start $a1a6; end $a1a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level07_offs_40"; start $a1a8; end $a1ad; type bytetable; comment "all zeroes"; };
@@ -325,7 +325,7 @@ range { name "level08_bomblist"; start $a1da; end $a1db; type addrtable; comment
range { name "level08_map_changes"; start $a1dc; end $a1dd; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level08_indirect_subs"; start $a1de; end $a1df; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level08_sub_bomb"; start $a1e0; end $a1e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level08_sub_start"; start $a1e2; end $a1e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level08_init"; start $a1e2; end $a1e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level08_sub6"; start $a1e4; end $a1e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level08_sub_eol"; start $a1e6; end $a1e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level08_offs_40"; start $a1e8; end $a1ed; type bytetable; comment "all zeroes"; };
@@ -359,7 +359,7 @@ range { name "level09_bomblist"; start $a21a; end $a21b; type addrtable; comment
range { name "level09_map_changes"; start $a21c; end $a21d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level09_indirect_subs"; start $a21e; end $a21f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level09_sub_bomb"; start $a220; end $a221; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level09_sub_start"; start $a222; end $a223; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level09_init"; start $a222; end $a223; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level09_sub6"; start $a224; end $a225; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level09_sub_eol"; start $a226; end $a227; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level09_offs_40"; start $a228; end $a22d; type bytetable; comment "all zeroes"; };
@@ -393,7 +393,7 @@ range { name "level10_bomblist"; start $a25a; end $a25b; type addrtable; comment
range { name "level10_map_changes"; start $a25c; end $a25d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level10_indirect_subs"; start $a25e; end $a25f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level10_sub_bomb"; start $a260; end $a261; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level10_sub_start"; start $a262; end $a263; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level10_init"; start $a262; end $a263; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level10_sub6"; start $a264; end $a265; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level10_sub_eol"; start $a266; end $a267; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level10_offs_40"; start $a268; end $a26d; type bytetable; comment "all zeroes"; };
@@ -427,7 +427,7 @@ range { name "level11_bomblist"; start $a29a; end $a29b; type addrtable; comment
range { name "level11_map_changes"; start $a29c; end $a29d; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level11_indirect_subs"; start $a29e; end $a29f; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level11_sub_bomb"; start $a2a0; end $a2a1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level11_sub_start"; start $a2a2; end $a2a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level11_init"; start $a2a2; end $a2a3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level11_sub6"; start $a2a4; end $a2a5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level11_sub_eol"; start $a2a6; end $a2a7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level11_offs_40"; start $a2a8; end $a2ad; type bytetable; comment "all zeroes"; };
@@ -461,7 +461,7 @@ range { name "level12_bomblist"; start $a2da; end $a2db; type addrtable; comment
range { name "level12_map_changes"; start $a2dc; end $a2dd; type addrtable; comment "address of list of addresses of map data, used for changing the map when certain bombs are picked up"; };
range { name "level12_indirect_subs"; start $a2de; end $a2df; type bytetable; comment "pointer to list of indirect subs, always $0000 in this game"; };
range { name "level12_sub_bomb"; start $a2e0; end $a2e1; type addrtable; comment "called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine"; };
-range { name "level12_sub_start"; start $a2e2; end $a2e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
+range { name "level12_init"; start $a2e2; end $a2e3; type addrtable; comment "called at start of level, $06E6 for some levels, or else a ROM subroutine"; };
range { name "level12_sub6"; start $a2e4; end $a2e5; type addrtable; comment "always $9740 aka game_main_loop"; };
range { name "level12_sub_eol"; start $a2e6; end $a2e7; type addrtable; comment "called at end of level (all bombs picked up). $06E6 for all but level08"; };
range { name "level12_offs_40"; start $a2e8; end $a2ed; type bytetable; comment "all zeroes"; };
diff --git a/main.info b/main.info
index d8b71aa..c558d97 100644
--- a/main.info
+++ b/main.info
@@ -115,12 +115,19 @@ label { name "check_collisions_3"; addr $9832; size 1; comment "movement/jumping
label { name "special_init"; addr $8B23; comment "various levels use this as their init, or use an init that calls this"; };
label { name "special_init_jv"; addr $8036; comment "various levels use this as their init, or use an init that calls this"; };
+label { name "si_clear"; addr $8B27; comment "clear memory from $0760 to $077f"; };
+label { name "special_init_2"; addr $8B2D; comment "special_init that doesn't clear memory. does anything use this entry point?"; };
+label { name "special_init_2_jv"; addr $8039; comment "special_init that doesn't clear memory. unused vector?"; };
label { name "next_player"; addr $9AAA; comment "used in multiplayer games, also called in single player (?)"; };
label { name "next_player_jv"; addr $8027; comment "used in multiplayer games, also called in single player (?)"; };
label { name "mul_player_11"; addr $9A7C; comment "multiply current player number by 11, return result in Y"; };
label { name "add_11"; addr $9A82; };
label { name "return_y"; addr $9A8A; };
label { name "save_struct_player"; addr $9A8C; };
+label { name "setup_blank_dlist"; addr $8AE0; comment "show blank screen with empty display list"; };
+label { name "setup_blank_dlist_jv"; addr $803C; comment "show blank screen with empty display list"; };
+label { name "draw_level"; addr $BA00; comment "calls draw_map, plays level intro music, shows level name"; };
+label { name "draw_level_jv"; addr $802A; comment "calls draw_map, plays level intro music, shows level name"; };
label { name "mid_jump"; addr $99A8; size 1; comment "check & see if we're done jumping"; };
label { name "continue_jump"; addr $99BD; size 1; comment "we're in mid-jump and didn't hit anything, keep going"; };
@@ -309,6 +316,7 @@ range { name "falling_table_1"; start $8a39; end $8a7f; type bytetable; };
label { name "falling_table_2"; addr $8A42; };
label { name "play_sfx_death"; addr $8936; };
range { name "data_table_86da"; start $86da; end $8713; type bytetable; };
+label { name "pnum_subtractors"; addr $8702; size 18; comment "3 bytes per table entry"; };
range { name "level_name_hscrol_table"; start $BBF0; end $BBff; type bytetable; comment "used for centering level name on gameboard"; };
range { name "zero_filler_b8bf"; start $b8bf; end $b96a; type bytetable; };
range { name "zero_filler_b7f1"; start $B7F1; end $B7FF; type bytetable; };
@@ -463,8 +471,8 @@ range { name "sfx_letter_bonus"; start $AFCB; end $afff; type bytetable; comment
label { name "cue_letter_sfx"; addr $AFB9; comment "play sfx_letter_bonus"; };
label { name "stub"; addr $8405; comment "just an RTS"; };
range { name "data_table_85b6"; start $85b6; end $85bd; type bytetable; comment "used in vblank_imm_isr, not sure for what yet"; };
-label { name "page6_initial_vectors_minus_one"; addr $85d3; comment "1-indexed"; };
label { name "page6_vectors_minus_one"; addr $05ff; comment "1-indexed"; };
+label { name "page6_initial_vectors_minus_one"; addr $85dd; comment "1-indexed"; };
range { name "page6_initial_vectors"; start $85de; end $85f5; type addrtable; comment "copied into page 6 by init_hardware"; };
label { name "page6_vectors"; addr $0600; size 24; comment "initialized with page6_initial_vectors"; };
label { name "zigzag_sub0"; addr $AD68; comment "move bullets in ways that defy the laws of physics and common sense"; };
@@ -588,6 +596,7 @@ label { name "init_page6_loop"; addr $837e; };
# these are so far only for player 1
label { name "number_of_players"; addr $06f4; size 1; comment "0 for single-player game, otherwise range 1-3 (2 to 4 players)"; };
+label { name "score_minus_one"; addr $06ff; size 1; };
label { name "score"; addr $0700; size 3; };
label { name "level"; addr $06f6; size 1; };
label { name "lives"; addr $070a; size 1; };
@@ -707,8 +716,19 @@ label { name "update_status_window"; addr $8694; comment "bottom 2 GR.1 lines on
label { name "update_status_window_jv"; addr $8012; comment "bottom 2 GR.1 lines on the game board"; };
label { name "setup_gameboard_dlist"; addr $9B00; comment "for some reason there are 2 copies of the display list, at $0800 and $0881"; };
label { name "setup_gameboard_dlist_jv"; addr $8015; comment "for some reason there are 2 copies of the display list, at $0800 and $0881"; };
-label { name "xxx_level_something"; addr $8600; comment "gets called after the level is drawn & the intro music stops, and also during the level (?)"; };
-label { name "xxx_level_something_jv"; addr $8009; comment "gets called after the level is drawn & the intro music stops, and also during the level (?)"; };
+label { name "print_number"; addr $8600; comment "convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out"; };
+label { name "print_number_jv"; addr $8009; comment "convert the 3-byte integer stored at num_in to screen codes, store into memory pointed to by num_out"; };
+label { name "num_tmp"; addr $0665; size 1; comment "temp used by print_number"; };
+label { name "num_in"; addr $D0; size 3; comment "print_number input. 3-byte number (LSB first as usual) to be printed"; };
+label { name "num_out"; addr $D3; size 2; comment "area of (screen) memory where print_number stores its output"; };
+label { name "num_color"; addr $D5; size 1; comment "print_number adds this to numeric screencode output. normally 0, set to $80 on the end-of-game screen."; };
+label { name "print_bonus"; addr $867E; comment "print remaining bonus time; work_level_points_per_bomb should read work_level_time_bonus-1"; };
+label { name "print_bonus_jv"; addr $800F; comment "print remaining bonus time"; };
+label { name "pnum_done"; addr $8667; };
+label { name "next_digit"; addr $8607; comment "starts at 0, gets added to"; };
+label { name "print_score"; addr $8668; };
+label { name "ps_loop"; addr $8672; };
+label { name "pb_loop"; addr $8688; };
label { name "draw_map"; addr $8049; comment "the entry point for parsing the level map and drawing graphics from it. see level_maps.txt. caller must set $C0/$C1 to the address of the map data. modders beware: bogus map data can & will cause infinite loops."; };
label { name "draw_map_jv"; addr $8000; comment "the entry point for parsing the level map and drawing graphics from it. see level_maps.txt."; };
label { name "dm_get_opcode"; addr $804B; comment "$C0/$C1 points to $A300 (level01_desc) on the first call"; };
diff --git a/mklevelinfo.pl b/mklevelinfo.pl
index e3c1492..988606f 100644
--- a/mklevelinfo.pl
+++ b/mklevelinfo.pl
@@ -22,7 +22,7 @@
28 => [ 2, 'map_changes', 'address of list of addresses of map data, used for changing the map when certain bombs are picked up' ],
30 => [ 2, 'indirect_subs', 'pointer to list of indirect subs, always $0000 in this game' ],
32 => [ 2, 'sub_bomb', 'called when a bomb is picked up. $06E6 for most levels (just an RTS), or else a ROM subroutine' ],
- 34 => [ 2, 'sub_start', 'called at start of level, $06E6 for some levels, or else a ROM subroutine' ],
+ 34 => [ 2, 'init', 'called at start of level, $06E6 for some levels, or else a ROM subroutine' ],
36 => [ 2, 'sub6', 'always $9740 aka game_main_loop' ],
38 => [ 2, 'sub_eol', 'called at end of level (all bombs picked up). $06E6 for all but level08' ],
40 => [ 6, 'offs', 'all zeroes' ],
@@ -94,7 +94,7 @@ for $level (-610,-609,0..11) {
}
$type = 'bytetable';
- if(($label eq 'bomblist') or ($label =~ /^sub/) or ($label =~ /^map/) or ($label =~ /^unkn_table/)) {
+ if(($label eq 'bomblist') or ($label eq 'init') or ($label =~ /^sub/) or ($label =~ /^map/) or ($label =~ /^unkn_table/)) {
$type = 'addrtable';
}