mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-27 23:30:56 +00:00
lemm: separate level1 file working
This commit is contained in:
parent
491687d03b
commit
5d0e4bd7fd
@ -18,13 +18,14 @@ all: lemm.dsk
|
||||
# $(DOS33) -y lemm.dsk BSAVE -a 0x4000 LEMM_TEST
|
||||
|
||||
|
||||
lemm.dsk: QBOOT QLOAD LEMM LEMM
|
||||
lemm.dsk: QBOOT QLOAD LEMM LEVEL1
|
||||
cp $(EMPTY_DISK) lemm.dsk
|
||||
$(DOS33_RAW) lemm.dsk 0 0 QBOOT 0 1
|
||||
$(DOS33_RAW) lemm.dsk 0 2 QBOOT 1 1
|
||||
$(DOS33_RAW) lemm.dsk 0 4 QBOOT 2 1
|
||||
$(DOS33_RAW) lemm.dsk 1 0 QLOAD 0 0
|
||||
$(DOS33_RAW) lemm.dsk 3 0 LEMM 0 0
|
||||
$(DOS33_RAW) lemm.dsk 10 0 LEVEL1 0 0
|
||||
|
||||
|
||||
###
|
||||
@ -47,7 +48,8 @@ qload.o: qload.s qboot.inc \
|
||||
###
|
||||
|
||||
qload.inc: generate_common QLOAD
|
||||
./generate_common -a 0x1200 -s play_audio qload.lst > qload.inc
|
||||
./generate_common -a 0x1200 -s load_file qload.lst > qload.inc
|
||||
./generate_common -a 0x1200 -s play_audio qload.lst >> qload.inc
|
||||
./generate_common -a 0x1200 -s decompress_lzsa2_fast qload.lst >> qload.inc
|
||||
./generate_common -a 0x1200 -s getsrc_smc qload.lst >> qload.inc
|
||||
|
||||
@ -73,16 +75,58 @@ LEMM: lemm.o
|
||||
ld65 -o LEMM lemm.o -C ../../linker_scripts/apple2_6000.inc
|
||||
|
||||
lemm.o: lemm.s zp.inc hardware.inc qload.inc \
|
||||
graphics/graphics_test.inc graphics/sprites.inc \
|
||||
graphics/sprites.inc \
|
||||
intro_level1.s update_time.s hgr_sprite.s draw_flames.s \
|
||||
draw_door.s move_lemming.s draw_lemming.s \
|
||||
hgr_hlin.s hgr_vlin.s update_menu.s \
|
||||
interrupt_handler.s keyboard.s draw_pointer.s \
|
||||
pointer_sprites.inc particle_hgr.s \
|
||||
level1.s level5.s title.s audio.s letsgo.s
|
||||
level5.s title.s audio.s letsgo.s
|
||||
ca65 -o lemm.o lemm.s -l lemm.lst
|
||||
|
||||
|
||||
###
|
||||
|
||||
lemm.inc: generate_common LEMM
|
||||
./generate_common -a 0x6000 -s chunk_h_smc lemm.lst > lemm.inc
|
||||
./generate_common -a 0x6000 -s chunk_l_smc lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s load_song_chunk lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s intro_level lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s hgr_make_tables lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s play_letsgo lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s lemming_out lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s lemming_exploding lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s lemming_x lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s lemming_y lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s lemming_direction lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s lemming_status lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_lemming lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s move_lemmings lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s erase_lemming lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s update_time lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_door lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_flames lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s draw_pointer lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s erase_pointer lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s handle_keypress lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s wait lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s disable_music lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s outro_level1 lemm.lst >> lemm.inc
|
||||
./generate_common -a 0x6000 -s update_lemmings_out lemm.lst >> lemm.inc
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
||||
LEVEL1: level1.o
|
||||
ld65 -o LEVEL1 level1.o -C ../../linker_scripts/apple2_a000.inc
|
||||
|
||||
level1.o: level1.s zp.inc hardware.inc qload.inc lemm.inc \
|
||||
graphics/graphics_level1.inc
|
||||
ca65 -o level1.o level1.s -l level1.lst
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
||||
generate_common: generate_common.o
|
||||
|
@ -1 +1,32 @@
|
||||
LEMM: 23782 (original v0.01)
|
||||
|
||||
|
||||
Plan:
|
||||
$000 = zero page
|
||||
$100 = stack
|
||||
$300 = disk lookup tables
|
||||
$400-$700 = text page 1
|
||||
$800-$b00 = hgr lookup tables
|
||||
$c00-$f00 = particle effects?
|
||||
$1000-$1100 = disk code
|
||||
$1200-$1f00 = common routines
|
||||
|
||||
HGR PAGE1 = $2000
|
||||
HGR PAGE2 = $4000
|
||||
|
||||
LEMM load at $6000
|
||||
|
||||
LEVELs load at $A000
|
||||
|
||||
SOUND/MUSIC data in language card at $D000
|
||||
|
||||
|
||||
level data
|
||||
number of lemmings
|
||||
number needed to win (percent? percent is hard)
|
||||
location of entrance door
|
||||
entrace door type
|
||||
location of exit door
|
||||
number of each job type
|
||||
release speed
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
.include "qload.inc"
|
||||
.include "lemming_status.inc"
|
||||
|
||||
lemm_test_start:
|
||||
|
||||
@ -223,6 +224,11 @@ zurg:
|
||||
lda #25
|
||||
jsr wait_a_bit
|
||||
|
||||
; load level from disk
|
||||
lda #1
|
||||
sta WHICH_LOAD
|
||||
jsr load_file
|
||||
|
||||
|
||||
;=======================
|
||||
; do level1
|
||||
@ -348,5 +354,8 @@ config_string:
|
||||
letsgo:
|
||||
.incbin "sounds/letsgo.btc.lz4"
|
||||
|
||||
.include "level1.s"
|
||||
; .include "level1.s"
|
||||
.include "level5.s"
|
||||
|
||||
do_level1 = $a000
|
||||
level1_preview_lzsa = $b06b
|
||||
|
5
games/lemm/lemming_status.inc
Normal file
5
games/lemm/lemming_status.inc
Normal file
@ -0,0 +1,5 @@
|
||||
LEMMING_FALLING = 1
|
||||
LEMMING_WALKING = 2
|
||||
LEMMING_DIGGING = 3
|
||||
LEMMING_EXPLODING = 4
|
||||
LEMMING_PARTICLES = 5
|
@ -1,4 +1,10 @@
|
||||
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
.include "qload.inc"
|
||||
.include "lemm.inc"
|
||||
.include "lemming_status.inc"
|
||||
|
||||
do_level1:
|
||||
|
||||
;==============
|
||||
@ -13,14 +19,14 @@ do_level1:
|
||||
|
||||
; set up first song
|
||||
|
||||
lda #<music_parts_l
|
||||
lda #<music5_parts_l
|
||||
sta chunk_l_smc+1
|
||||
lda #>music_parts_l
|
||||
lda #>music5_parts_l
|
||||
sta chunk_l_smc+2
|
||||
|
||||
lda #<music_parts_h
|
||||
lda #<music5_parts_h
|
||||
sta chunk_h_smc+1
|
||||
lda #>music_parts_h
|
||||
lda #>music5_parts_h
|
||||
sta chunk_h_smc+2
|
||||
|
||||
|
||||
@ -251,11 +257,11 @@ l1_level_over:
|
||||
.include "graphics/graphics_level1.inc"
|
||||
|
||||
|
||||
music_parts_h:
|
||||
music5_parts_h:
|
||||
.byte >lemm5_part1_lzsa,>lemm5_part2_lzsa,>lemm5_part3_lzsa
|
||||
.byte >lemm5_part4_lzsa,>lemm5_part5_lzsa,$00
|
||||
|
||||
music_parts_l:
|
||||
music5_parts_l:
|
||||
.byte <lemm5_part1_lzsa,<lemm5_part2_lzsa,<lemm5_part3_lzsa
|
||||
.byte <lemm5_part4_lzsa,<lemm5_part5_lzsa
|
||||
|
||||
|
@ -191,12 +191,6 @@ lemming_out:
|
||||
lemming_frame:
|
||||
.byte 0
|
||||
|
||||
LEMMING_FALLING = 1
|
||||
LEMMING_WALKING = 2
|
||||
LEMMING_DIGGING = 3
|
||||
LEMMING_EXPLODING = 4
|
||||
LEMMING_PARTICLES = 5
|
||||
|
||||
lemming_status:
|
||||
.byte LEMMING_FALLING
|
||||
|
||||
|
@ -11,7 +11,9 @@
|
||||
; p86 (dos reference)
|
||||
;
|
||||
|
||||
WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
||||
;WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
||||
|
||||
WAIT = norom_wait
|
||||
|
||||
.org $1000
|
||||
|
||||
@ -311,7 +313,6 @@ partial2: .byte $00
|
||||
code_end:
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; enable drive motor
|
||||
;==========================
|
||||
@ -361,3 +362,21 @@ load_sector:
|
||||
load_length:
|
||||
.byte $00
|
||||
|
||||
|
||||
|
||||
; copy of ROM wait
|
||||
; because we might disable ROM
|
||||
|
||||
norom_wait:
|
||||
sec
|
||||
wait2:
|
||||
pha
|
||||
wait3:
|
||||
sbc #$01
|
||||
bne wait3
|
||||
pla
|
||||
sbc #$01
|
||||
bne wait2
|
||||
rts
|
||||
wait_end:
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
;.include "common_defines.inc"
|
||||
.include "qboot.inc"
|
||||
|
||||
LOAD_TEXT_TITLE = 0
|
||||
|
||||
qload_start:
|
||||
|
||||
; init the write code
|
||||
@ -17,7 +15,7 @@ qload_start:
|
||||
; first time entry
|
||||
; start by loading text title
|
||||
|
||||
lda #LOAD_TEXT_TITLE ; load title
|
||||
lda #0 ; load LEMM engine
|
||||
sta WHICH_LOAD
|
||||
|
||||
lda #1
|
||||
@ -25,25 +23,7 @@ qload_start:
|
||||
|
||||
jsr load_file
|
||||
|
||||
jsr $6000
|
||||
.if 0
|
||||
lda #LOAD_TITLE ; load title
|
||||
sta WHICH_LOAD
|
||||
|
||||
main_game_loop:
|
||||
jsr load_file
|
||||
|
||||
lda WHICH_LOAD
|
||||
bne not_title
|
||||
|
||||
start_title:
|
||||
jsr $4000
|
||||
jmp main_game_loop
|
||||
|
||||
not_title:
|
||||
jsr $2000
|
||||
jmp main_game_loop
|
||||
.endif
|
||||
jmp $6000 ; jump to LEMM
|
||||
|
||||
;====================================
|
||||
; loads file specified by WHICH_LOAD
|
||||
@ -180,50 +160,30 @@ error_string:
|
||||
.endif
|
||||
|
||||
which_disk_array:
|
||||
.byte 1,1,3,3 ; LEMM
|
||||
.byte 1,1,3,2 ;
|
||||
.byte 2,1,2,2 ;
|
||||
.byte 1,1,1,3 ;
|
||||
.byte 1 ;
|
||||
.byte 1,1,1,1,1 ;
|
||||
.byte $f ;
|
||||
.byte 1,1,1,1 ; LEMM, LEVEL1, LEVEL2, LEVEL3
|
||||
.byte 1,1,1,1 ; LEVEL4, LEVEL5
|
||||
.byte 1,1,1,1 ;
|
||||
|
||||
load_address_array:
|
||||
.byte $60,$20,$20,$20 ; LEMM
|
||||
.byte $20,$20,$20,$20 ;
|
||||
.byte $20,$20,$20,$20 ;
|
||||
.byte $20,$20,$20,$20 ;
|
||||
.byte $08 ;
|
||||
.byte $0E,$0E,$0E,$0E ;
|
||||
.byte $0E ;
|
||||
.byte $0C ;
|
||||
.byte $60,$A0,$A0,$A0 ; LEMM, LEVEL1, LEVEL2, LEVEL3
|
||||
.byte $A0,$A0,$A0,$A0 ; LEVEL4, LEVEL5
|
||||
.byte $A0,$A0,$A0,$A0 ;
|
||||
|
||||
track_array:
|
||||
.byte 3, 8, 1,21 ; LEMM
|
||||
.byte 18,31,11, 1 ;
|
||||
.byte 27,26,10,20 ;
|
||||
.byte 30,32,28,30 ;
|
||||
.byte 0 ;
|
||||
.byte 0, 0, 0, 0, 0 ;
|
||||
.byte 0 ;
|
||||
.byte 3,10,12,14 ; LEMM, LEVEL1, LEVEL2, LEVEL3
|
||||
.byte 16,18,20,22 ; LEVEL4, LEVEL5
|
||||
.byte 24,26,28,40 ;
|
||||
|
||||
sector_array:
|
||||
.byte 0, 0, 0, 0 ; LEMM
|
||||
.byte 0, 8, 0, 0 ;
|
||||
.byte 0, 0, 0, 0 ; LEMM, LEVEL1, LEVEL2, LEVEL3
|
||||
.byte 0, 0, 0, 0 ; LEVEL4, LEVEL5
|
||||
.byte 0, 0, 0, 0 ;
|
||||
.byte 0,13, 0, 1 ;
|
||||
.byte 6 ;
|
||||
.byte 11,12,13,14,15 ;
|
||||
.byte 0 ;
|
||||
|
||||
length_array:
|
||||
.byte 96,159,157,145 ; LEMM
|
||||
.byte 128, 20,158,135 ;
|
||||
.byte 61, 31,159,109 ;
|
||||
.byte 20, 33, 27, 78 ;
|
||||
.byte 3 ;
|
||||
.byte 1,1,1,1,1 ;
|
||||
.byte 1 ;
|
||||
.byte 64, 32, 32, 32 ; LEMM, LEVEL1, LEVEL2, LEVEL3
|
||||
.byte 32, 32, 32, 32 ; LEVEL4, LEVEL5
|
||||
.byte 32, 32, 32, 32 ;
|
||||
|
||||
|
||||
.include "audio.s"
|
||||
.include "decompress_fast_v2.s"
|
||||
|
12
linker_scripts/apple2_a000.inc
Normal file
12
linker_scripts/apple2_a000.inc
Normal file
@ -0,0 +1,12 @@
|
||||
MEMORY {
|
||||
ZP: start = $00, size = $1A, type = rw;
|
||||
RAM: start = $A000, size = $2000, file = %O;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
CODE: load = RAM, type = ro, align=$100;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user