mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-13 22:30:49 +00:00
duke: more work on level1/level2 split
This commit is contained in:
parent
63a44430fa
commit
22c7937a21
@ -27,7 +27,7 @@ HELLO: hello.bas
|
||||
LOADER: loader.o
|
||||
ld65 -o LOADER loader.o -C ../linker_scripts/apple2_1000.inc
|
||||
|
||||
loader.o: loader.s
|
||||
loader.o: loader.s init_vars.s
|
||||
ca65 -o loader.o loader.s -l loader.lst
|
||||
|
||||
####
|
||||
|
@ -2,3 +2,8 @@ LOAD_TITLE = 0
|
||||
LOAD_DUKE1 = 1
|
||||
LOAD_DUKE2 = 2
|
||||
|
||||
|
||||
TILES = $9000
|
||||
BIG_TILEMAP = $9400
|
||||
TILEMAP = $BC00
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; Duke PoC
|
||||
; Duke PoC Level 1
|
||||
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
@ -7,10 +7,6 @@
|
||||
.include "hardware.inc"
|
||||
.include "common_defines.inc"
|
||||
|
||||
TILES = $9000
|
||||
BIG_TILEMAP = $9400
|
||||
TILEMAP = $BC00
|
||||
|
||||
duke_start:
|
||||
;===================
|
||||
; init screen
|
||||
@ -88,9 +84,9 @@ duke_start:
|
||||
; load level1 background
|
||||
;====================================
|
||||
|
||||
lda #<duke1_bg_lzsa
|
||||
lda #<level1_bg_lzsa
|
||||
sta LZSA_SRC_LO
|
||||
lda #>duke1_bg_lzsa
|
||||
lda #>level1_bg_lzsa
|
||||
sta LZSA_SRC_HI
|
||||
lda #$c ; load to page $c00
|
||||
jsr decompress_lzsa2_fast
|
||||
@ -204,7 +200,7 @@ done_with_duke:
|
||||
;==========================
|
||||
|
||||
; level graphics
|
||||
.include "graphics/duke_graphics.inc"
|
||||
.include "graphics/level1_graphics.inc"
|
||||
|
||||
.include "text_print.s"
|
||||
.include "gr_offsets.s"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; Duke PoC
|
||||
; Duke Level2 -- Living Dangerously
|
||||
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
@ -7,10 +7,6 @@
|
||||
.include "hardware.inc"
|
||||
.include "common_defines.inc"
|
||||
|
||||
TILES = $9000
|
||||
BIG_TILEMAP = $9400
|
||||
TILEMAP = $BC00
|
||||
|
||||
duke_start:
|
||||
;===================
|
||||
; init screen
|
||||
@ -34,43 +30,24 @@ duke_start:
|
||||
sta FRAMEL
|
||||
sta FRAMEH
|
||||
sta DISP_PAGE
|
||||
sta JOYSTICK_ENABLED
|
||||
sta DUKE_WALKING
|
||||
sta DUKE_JUMPING
|
||||
sta LEVEL_OVER
|
||||
sta LASER_OUT
|
||||
sta DUKE_XL
|
||||
sta SCORE0
|
||||
sta SCORE1
|
||||
sta SCORE2
|
||||
sta DUKE_FALLING
|
||||
sta DUKE_SHOOTING
|
||||
sta KICK_UP_DUST
|
||||
sta DOOR_ACTIVATED
|
||||
sta INVENTORY
|
||||
|
||||
lda #<enemy_data
|
||||
sta ENEMY_DATAL
|
||||
lda #>enemy_data
|
||||
sta ENEMY_DATAH
|
||||
|
||||
; FIXME: temporary
|
||||
; lda INVENTORY
|
||||
; ora #INV_RED_KEY
|
||||
; sta INVENTORY
|
||||
|
||||
; lda #$10
|
||||
; sta SCORE0
|
||||
|
||||
lda #1
|
||||
sta FIREPOWER
|
||||
|
||||
lda #2 ; draw twice (both pages)
|
||||
sta UPDATE_STATUS
|
||||
|
||||
lda #7
|
||||
sta HEALTH
|
||||
|
||||
lda #4
|
||||
sta DRAW_PAGE
|
||||
|
||||
@ -88,9 +65,9 @@ duke_start:
|
||||
; load level1 background
|
||||
;====================================
|
||||
|
||||
lda #<duke1_bg_lzsa
|
||||
lda #<level2_bg_lzsa
|
||||
sta LZSA_SRC_LO
|
||||
lda #>duke1_bg_lzsa
|
||||
lda #>level2_bg_lzsa
|
||||
sta LZSA_SRC_HI
|
||||
lda #$c ; load to page $c00
|
||||
jsr decompress_lzsa2_fast
|
||||
@ -99,9 +76,9 @@ duke_start:
|
||||
; load level1 tilemap
|
||||
;====================================
|
||||
|
||||
lda #<level1_data_lzsa
|
||||
lda #<level2_data_lzsa
|
||||
sta LZSA_SRC_LO
|
||||
lda #>level1_data_lzsa
|
||||
lda #>level2_data_lzsa
|
||||
sta LZSA_SRC_HI
|
||||
lda #$90 ; load to page $9000
|
||||
jsr decompress_lzsa2_fast
|
||||
@ -109,9 +86,9 @@ duke_start:
|
||||
;====================================
|
||||
; copy in tilemap subset
|
||||
;====================================
|
||||
lda #28
|
||||
lda #10
|
||||
sta TILEMAP_X
|
||||
lda #0
|
||||
lda #18
|
||||
sta TILEMAP_Y
|
||||
|
||||
jsr copy_tilemap_subset
|
||||
@ -204,7 +181,7 @@ done_with_duke:
|
||||
;==========================
|
||||
|
||||
; level graphics
|
||||
.include "graphics/duke_graphics.inc"
|
||||
.include "graphics/level2_graphics.inc"
|
||||
|
||||
.include "text_print.s"
|
||||
.include "gr_offsets.s"
|
||||
@ -233,5 +210,5 @@ done_with_duke:
|
||||
.include "sound_effects.s"
|
||||
.include "speaker_tone.s"
|
||||
|
||||
level1_data_lzsa:
|
||||
.incbin "maps/level1_map.lzsa"
|
||||
level2_data_lzsa:
|
||||
.incbin "maps/level2_map.lzsa"
|
||||
|
@ -2,12 +2,17 @@
|
||||
PNG2GR = ../../gr-utils/png2gr
|
||||
LZSA = ~/research/lzsa/lzsa/lzsa
|
||||
|
||||
all: duke_graphics.inc
|
||||
all: level1_graphics.inc level2_graphics.inc
|
||||
|
||||
####
|
||||
|
||||
duke_graphics.inc: duke1_bg.lzsa
|
||||
echo "duke1_bg_lzsa: .incbin \"duke1_bg.lzsa\"" > duke_graphics.inc
|
||||
level1_graphics.inc: level1_bg.lzsa
|
||||
echo "level1_bg_lzsa: .incbin \"level1_bg.lzsa\"" > level1_graphics.inc
|
||||
|
||||
####
|
||||
|
||||
level2_graphics.inc: level2_bg.lzsa
|
||||
echo "level2_bg_lzsa: .incbin \"level2_bg.lzsa\"" > level2_graphics.inc
|
||||
|
||||
####
|
||||
|
||||
@ -20,4 +25,4 @@ duke_graphics.inc: duke1_bg.lzsa
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst *.lzsa duke_graphics.inc
|
||||
rm -f *~ *.o *.lst *.lzsa level1_graphics.inc level2_graphics.inc
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
duke/graphics/level2_bg.png
Normal file
BIN
duke/graphics/level2_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
32
duke/init_vars.s
Normal file
32
duke/init_vars.s
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
;=====================
|
||||
; init vars
|
||||
;=====================
|
||||
init_vars:
|
||||
lda #0
|
||||
sta ANIMATE_FRAME
|
||||
sta FRAMEL
|
||||
sta FRAMEH
|
||||
sta DISP_PAGE
|
||||
sta JOYSTICK_ENABLED
|
||||
sta DUKE_WALKING
|
||||
sta DUKE_JUMPING
|
||||
sta LEVEL_OVER
|
||||
sta LASER_OUT
|
||||
sta DUKE_XL
|
||||
sta SCORE0
|
||||
sta SCORE1
|
||||
sta SCORE2
|
||||
sta DUKE_FALLING
|
||||
sta DUKE_SHOOTING
|
||||
sta KICK_UP_DUST
|
||||
sta DOOR_ACTIVATED
|
||||
sta INVENTORY
|
||||
|
||||
lda #1
|
||||
sta FIREPOWER
|
||||
|
||||
lda #7
|
||||
sta HEALTH
|
||||
|
||||
rts
|
@ -54,6 +54,8 @@ loader_start:
|
||||
jsr init ; unhook DOS, init nibble table
|
||||
|
||||
|
||||
jsr init_vars
|
||||
|
||||
;===================================================
|
||||
;===================================================
|
||||
; SETUP THE FILENAME
|
||||
@ -698,8 +700,12 @@ sectbl: .byte $00,$0d,$0b,$09,$07,$05,$03,$01,$0e,$0c,$0a,$08,$06,$04,$02,$0f
|
||||
|
||||
;bit2tbl: .res 86 ; = nibtbl+128
|
||||
;filbuf: .res 4 ; = bit2tbl+86
|
||||
|
||||
|
||||
;dataend = filbuf+4
|
||||
|
||||
.include "init_vars.s"
|
||||
|
||||
loader_end:
|
||||
|
||||
.assert (<loader_end - <loader_start)>16, error, "loader too big"
|
||||
|
Loading…
x
Reference in New Issue
Block a user