mirror of
https://github.com/deater/dos33fsprogs.git
synced 2026-04-21 16:16:47 +00:00
peasant: move peasant sprites to $B000
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
peasant_sprites_temp = $4000
|
||||
peasant_sprites_location = $a000
|
||||
peasant_sprites_temp = $6000
|
||||
;peasant_sprites_location = $a000
|
||||
peasant_sprites_location = $b000
|
||||
|
||||
|
||||
load_buffer = $ba00 ; 512 bytes
|
||||
hposn_low = $bc00
|
||||
hposn_high = $bd00
|
||||
collision_location = $be00 ; 256 bytes
|
||||
verb_table = $bf00 ; 256 bytes
|
||||
load_buffer = $e000 ; 512 bytes
|
||||
hposn_low = $e200
|
||||
hposn_high = $e300
|
||||
collision_location = $e400 ; 256 bytes
|
||||
verb_table = $e500 ; 256 bytes
|
||||
|
||||
|
||||
@@ -45,7 +45,11 @@ Memory Map
|
||||
$A000 - $AFFF = peasant sprite data
|
||||
$D000 - $DFFF = pt3 music still (4k) though hacked
|
||||
|
||||
|
||||
New:
|
||||
$6000 - $7FFF = offscreen image
|
||||
$8000 - $B800 = code (14k?)
|
||||
|
||||
$BC-$BD (512B) Hi-res lookup tables
|
||||
|
||||
; ================================
|
||||
; This is the layout for levels
|
||||
@@ -65,18 +69,28 @@ $0B-$1F (5.25k) QLOAD disk and common routines (5376 bytes, 4996 bytes used)
|
||||
$20-$3F (8k) HGR Page 1 (PAGE1)
|
||||
$40-$5f (8k) HGR Page 2 (PAGE2)
|
||||
$60-$7F (8k) Offscreen Background
|
||||
$80-$9F (8k) Programs (we limit to 8k, 8192 bytes, $20 pages)
|
||||
$A0-$AF (4k) peasant sprites
|
||||
$B0-$B9 (2k) unused currently?
|
||||
$BA-$BB (512B) temp area for load/save file marshalling
|
||||
$BC-$BD (512B) Hi-res lookup tables
|
||||
$BE (256B) collision lookup
|
||||
$BF (256B) verb table
|
||||
$80-$AF (12k) Programs (we limit to 12k, 12288 bytes, $30 pages)
|
||||
$B0-$BF (4k) peasant sprites
|
||||
;$A0-$AF (4k) peasant sprites
|
||||
;$B0-$B9 (2k) unused currently?
|
||||
$C0-$CF (n/a) I/O
|
||||
|
||||
TODO: sprites $b000-$bfff
|
||||
other stuff up in language card
|
||||
|
||||
Language card (high 16k)
|
||||
|
||||
$D0-$ED (bank1) (7.5k) per-levelstrings (biggest is ~3571 [outer] currently)
|
||||
;$D0-$ED (bank1) (7.5k) per-levelstrings (biggest is ~3571 [outer] currently)
|
||||
;$D0-$DF (bank2) (4k) inventory (3122 bytes)
|
||||
;$EE-$FF (both) (4.5k) parser code (4608 bytes, 4332 currently)
|
||||
|
||||
|
||||
$D0-$DF (bank1) (4k) per-levelstrings (biggest is ~3571 [outer] currently)
|
||||
$E0-$E1 (512B) temp area for load/save file marshalling
|
||||
$E2-$E3 (512B) Hi-res lookup tables
|
||||
$E4 (256B) collision lookup
|
||||
$B5 (256B) verb table
|
||||
|
||||
$D0-$DF (bank2) (4k) inventory (3122 bytes)
|
||||
$EE-$FF (both) (4.5k) parser code (4608 bytes, 4332 currently)
|
||||
|
||||
|
||||
@@ -46,12 +46,8 @@ all: INTRO
|
||||
|
||||
###
|
||||
|
||||
# ../hgr_routines/hgr_save_restore.s \
|
||||
# ../hgr_routines/hgr_partial_save.s \
|
||||
|
||||
|
||||
INTRO: intro.o
|
||||
ld65 -o INTRO intro.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||
ld65 -o INTRO intro.o -C $(LINKER_SCRIPTS)/apple2_8000.inc
|
||||
|
||||
intro.o: intro.s ../zp.inc ../qload.inc ../music/music.inc \
|
||||
../peasant_sprite.inc \
|
||||
|
||||
+20
-28
@@ -8,18 +8,24 @@
|
||||
.include "../zp.inc"
|
||||
.include "../common_defines.inc"
|
||||
|
||||
|
||||
.include "../qload.inc"
|
||||
.include "../music/music.inc"
|
||||
|
||||
peasant_quest_intro:
|
||||
|
||||
|
||||
; we get here from "tips"
|
||||
; DRAW_PAGE = PAGE2
|
||||
; looking at PAGE1
|
||||
|
||||
|
||||
lda #0
|
||||
sta ESC_PRESSED
|
||||
sta LEVEL_OVER
|
||||
sta PEASANT_STEPS
|
||||
sta INPUT_X
|
||||
sta input_buffer ; reset buffer (NUL at start)
|
||||
; ????
|
||||
sta GAME_STATE_2
|
||||
|
||||
;===========================
|
||||
@@ -28,10 +34,10 @@ peasant_quest_intro:
|
||||
|
||||
; jsr hgr2
|
||||
|
||||
jsr hgr2_clearscreen
|
||||
; jsr hgr2_clearscreen ; clear PAGE2
|
||||
|
||||
lda #$20 ; draw to page2
|
||||
sta DRAW_PAGE
|
||||
; lda #$20 ; draw to page2
|
||||
; sta DRAW_PAGE
|
||||
|
||||
|
||||
;==============================
|
||||
@@ -41,24 +47,12 @@ peasant_quest_intro:
|
||||
;==============================
|
||||
; load initial peasant sprites
|
||||
|
||||
; urgh over-writes $6000 where intro code lives
|
||||
; make it use $4000 again?
|
||||
; loads temporarily in $6000
|
||||
|
||||
lda #0 ; FIXME: default walking
|
||||
jsr load_peasant_sprites
|
||||
|
||||
|
||||
|
||||
; lda #<walking_sprite_data
|
||||
; sta zx_src_l+1
|
||||
; lda #>walking_sprite_data
|
||||
; sta zx_src_h+1
|
||||
|
||||
; lda #$A0 ; load to $A000
|
||||
|
||||
; jsr zx02_full_decomp
|
||||
|
||||
|
||||
;===============================
|
||||
; restart music, only drum loop
|
||||
;===============================
|
||||
@@ -88,7 +82,7 @@ mockingboard_notfound:
|
||||
|
||||
lda ESC_PRESSED
|
||||
bne escape_handler
|
||||
|
||||
.if 0
|
||||
;========================
|
||||
; Lake West
|
||||
;========================
|
||||
@@ -121,7 +115,7 @@ mockingboard_notfound:
|
||||
;========================
|
||||
|
||||
jsr intro_knight
|
||||
|
||||
.endif
|
||||
;========================
|
||||
; Start actual game
|
||||
;========================
|
||||
@@ -162,10 +156,10 @@ mockingboard_notfound2:
|
||||
.include "new_game.s"
|
||||
|
||||
.include "intro_cottage.s"
|
||||
.include "intro_lake_w.s"
|
||||
.include "intro_lake_e.s"
|
||||
.include "intro_river.s"
|
||||
.include "intro_knight.s"
|
||||
;.include "intro_lake_w.s"
|
||||
;.include "intro_lake_e.s"
|
||||
;.include "intro_river.s"
|
||||
;.include "intro_knight.s"
|
||||
|
||||
.include "../draw_peasant_new.s"
|
||||
|
||||
@@ -178,7 +172,7 @@ mockingboard_notfound2:
|
||||
;.include "../hgr_routines/hgr_partial_restore.s"
|
||||
;.include "../hgr_routines/hgr_partial_save.s"
|
||||
|
||||
.include "../gr_copy.s"
|
||||
;.include "../gr_copy.s"
|
||||
.include "../hgr_routines/hgr_copy_fast.s"
|
||||
|
||||
;.include "../wait.s"
|
||||
@@ -246,9 +240,7 @@ no_peasant_wrap:
|
||||
|
||||
rts
|
||||
|
||||
|
||||
;walking_sprite_data:
|
||||
; .incbin "../sprites_peasant/walking_sprites.zx02"
|
||||
|
||||
.include "../peasant_sprite.inc"
|
||||
|
||||
.include "../priority_copy.s"
|
||||
.include "../hgr_routines/hgr_copy_faster.s"
|
||||
|
||||
@@ -32,64 +32,50 @@ intro_cottage:
|
||||
lda #>cottage_priority_zx02
|
||||
sta zx_src_h+1
|
||||
|
||||
lda #$20 ; temporarily load to $2000
|
||||
lda #$60 ; temporarily load to $6000
|
||||
|
||||
jsr zx02_full_decomp
|
||||
|
||||
; copy to $400
|
||||
|
||||
jsr gr_copy_to_page1
|
||||
; jsr gr_copy_to_page1
|
||||
|
||||
jsr priority_copy
|
||||
|
||||
|
||||
|
||||
;==========================
|
||||
; load background to $2000 (PAGE1)
|
||||
; load background to $6000
|
||||
|
||||
lda #<(cottage_zx02)
|
||||
sta zx_src_l+1
|
||||
lda #>(cottage_zx02)
|
||||
sta zx_src_h+1
|
||||
|
||||
lda #$20
|
||||
lda #$60
|
||||
|
||||
jsr zx02_full_decomp
|
||||
|
||||
; copies from $2000 to $4000, intentionally slow for miniblind
|
||||
|
||||
; jsr hgr_copy
|
||||
|
||||
|
||||
; instead
|
||||
|
||||
lda #$20
|
||||
sta DRAW_PAGE
|
||||
jsr hgr_copy_fast
|
||||
|
||||
|
||||
;===================
|
||||
; print title
|
||||
|
||||
jsr intro_print_title
|
||||
|
||||
|
||||
;====================
|
||||
;====================
|
||||
; walk loop
|
||||
;====================
|
||||
;====================
|
||||
; save background
|
||||
|
||||
; lda PEASANT_X
|
||||
; sta CURSOR_X
|
||||
; lda PEASANT_Y
|
||||
; sta CURSOR_Y
|
||||
|
||||
;=======================
|
||||
; walking
|
||||
|
||||
; jsr save_bg_1x28
|
||||
|
||||
cottage_walk_loop:
|
||||
|
||||
; lda PEASANT_X
|
||||
; sta CURSOR_X
|
||||
; lda PEASANT_Y
|
||||
; sta CURSOR_Y
|
||||
;===========================
|
||||
; copy bg to current screen
|
||||
|
||||
; lda #$60
|
||||
jsr hgr_copy_faster
|
||||
|
||||
|
||||
;=======================
|
||||
@@ -132,20 +118,6 @@ check_cottage_action2:
|
||||
cmp #1
|
||||
bne check_cottage_action3
|
||||
|
||||
;=======================
|
||||
; un-draw the text box
|
||||
|
||||
; FIXME: have it auto-save to one of the slots
|
||||
|
||||
; lda #12
|
||||
; sta SAVED_Y1
|
||||
; lda #100
|
||||
; sta SAVED_Y2
|
||||
|
||||
; lda #0
|
||||
; ldx #39
|
||||
|
||||
; jsr hgr_partial_restore2
|
||||
|
||||
;=======================
|
||||
; display cottage text 2
|
||||
@@ -158,18 +130,6 @@ check_cottage_action3:
|
||||
cmp #13
|
||||
bne done_cottage_action
|
||||
|
||||
;=========================
|
||||
; undraw the text box
|
||||
|
||||
; lda #12
|
||||
; sta SAVED_Y1
|
||||
; lda #100
|
||||
; sta SAVED_Y2
|
||||
|
||||
; lda #0
|
||||
; ldx #39
|
||||
; jsr hgr_partial_restore2
|
||||
|
||||
;=========================
|
||||
; display cottage text 3
|
||||
|
||||
@@ -185,6 +145,8 @@ done_cottage_action:
|
||||
|
||||
; jsr wait_until_keypress
|
||||
|
||||
jsr hgr_page_flip
|
||||
|
||||
lda FRAME
|
||||
bne special2
|
||||
lda #25
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
;=================================
|
||||
; load peasant sprites to $A000
|
||||
; load peasant sprites to peasant_sprites_location ($de00)
|
||||
; which to load in A
|
||||
; current is in WHICH_PEASANT_SPRITES
|
||||
|
||||
@@ -12,7 +12,7 @@ load_peasant_sprites:
|
||||
|
||||
jsr load_file
|
||||
|
||||
; loads to $4000 (peasant_sprites_temp)
|
||||
; loads to $6000 (peasant_sprites_temp)
|
||||
|
||||
lda WHICH_PEASANT_SPRITES
|
||||
asl
|
||||
@@ -26,5 +26,5 @@ load_peasant_sprites:
|
||||
|
||||
jsr zx02_full_decomp
|
||||
|
||||
rts ; tail call?
|
||||
rts ; TODO: tail call?
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
peasant_sprite_offset = $a000
|
||||
|
||||
peasant_sprites_xsize = peasant_sprite_offset+0
|
||||
peasant_sprites_ysize = peasant_sprite_offset+36
|
||||
peasant_sprites_data_l = peasant_sprite_offset+72
|
||||
peasant_sprites_data_h = peasant_sprite_offset+108
|
||||
peasant_mask_data_l = peasant_sprite_offset+144
|
||||
peasant_mask_data_h = peasant_sprite_offset+180
|
||||
peasant_sprites_xsize = peasant_sprites_location+0
|
||||
peasant_sprites_ysize = peasant_sprites_location+36
|
||||
peasant_sprites_data_l = peasant_sprites_location+72
|
||||
peasant_sprites_data_h = peasant_sprites_location+108
|
||||
peasant_mask_data_l = peasant_sprites_location+144
|
||||
peasant_mask_data_h = peasant_sprites_location+180
|
||||
|
||||
@@ -41,7 +41,7 @@ which_disk_array:
|
||||
.byte $FF ; disk detect
|
||||
|
||||
load_address_array:
|
||||
.byte $60,$60,$60,$60 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte $60,$60,$80,$60 ; VID_LOGO, TITLE, INTRO, COPY_CHECK
|
||||
.byte $60,$60,$D0,$40 ; TROGDOR, ENDING, MUSIC, CLIFF_BASE
|
||||
.byte $60,$D0,$20,$60 ; GAME_OVER, INVENTORY, PARSE_INPUT, INN
|
||||
.byte $60,$60,$60 ; ARCHERY, MAP, CLIMB
|
||||
@@ -51,7 +51,7 @@ load_address_array:
|
||||
.byte $40,$40,$40,$40,$40 ; JHONKA, COTTAGE, LAKE_W, LAKE_E, OUTSIDE_INN
|
||||
.byte $40,$40,$40,$40,$40 ; NED, WAVY_TREE, KERREK2, LADY_COTTAGE, BURN_TREE
|
||||
.byte $40,$40,$40 ; INSIDE_LADY, INSIDE_NED, HIDDEN_GLEN
|
||||
.byte >load_buffer,$40,$40 ; SAVE_DATA,PEASANT_SPRITES , ?
|
||||
.byte >load_buffer,>peasant_sprites_temp,$40 ; SAVE_DATA,PEASANT_SPRITES , ?
|
||||
.byte >load_buffer ; disk detect
|
||||
|
||||
track_array:
|
||||
|
||||
@@ -14,7 +14,7 @@ all: walk_sprites.inc climb_flame_sprites.inc \
|
||||
####
|
||||
|
||||
PEASANT_SPRITES_COMMON: peasant_sprite_common.o
|
||||
ld65 -o PEASANT_SPRITES_COMMON peasant_sprite_common.o -C $(LINKER_SCRIPTS)/apple2_4000.inc
|
||||
ld65 -o PEASANT_SPRITES_COMMON peasant_sprite_common.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||
|
||||
peasant_sprite_common.o: peasant_sprite_common.s \
|
||||
walking_sprites.zx02 \
|
||||
@@ -28,7 +28,7 @@ climbing_sprites.zx02: climbing_sprites
|
||||
$(ZX02) -f climbing_sprites climbing_sprites.zx02
|
||||
|
||||
climbing_sprites: climbing_sprites.o
|
||||
ld65 -o climbing_sprites climbing_sprites.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
|
||||
ld65 -o climbing_sprites climbing_sprites.o -C $(LINKER_SCRIPTS)/apple2_b000.inc
|
||||
|
||||
climbing_sprites.o: climbing_sprites.s \
|
||||
climb_flame_sprites.inc \
|
||||
@@ -41,7 +41,7 @@ walking_sprites.zx02: walking_sprites
|
||||
$(ZX02) -f walking_sprites walking_sprites.zx02
|
||||
|
||||
walking_sprites: walking_sprites.o
|
||||
ld65 -o walking_sprites walking_sprites.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
|
||||
ld65 -o walking_sprites walking_sprites.o -C $(LINKER_SCRIPTS)/apple2_b000.inc
|
||||
|
||||
walking_sprites.o: walking_sprites.s \
|
||||
flame_sprites.inc walk_sprites.inc
|
||||
@@ -53,7 +53,7 @@ robe_sprites.zx02: robe_sprites
|
||||
$(ZX02) -f robe_sprites robe_sprites.zx02
|
||||
|
||||
robe_sprites: robe_sprites.o
|
||||
ld65 -o robe_sprites robe_sprites.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
|
||||
ld65 -o robe_sprites robe_sprites.o -C $(LINKER_SCRIPTS)/apple2_b000.inc
|
||||
|
||||
robe_sprites.o: robe_sprites.s \
|
||||
flame_sprites.inc robe_sprites.inc
|
||||
@@ -65,7 +65,7 @@ robe_shield_sprites.zx02: robe_shield_sprites
|
||||
$(ZX02) -f robe_shield_sprites robe_shield_sprites.zx02
|
||||
|
||||
robe_shield_sprites: robe_shield_sprites.o
|
||||
ld65 -o robe_shield_sprites robe_shield_sprites.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
|
||||
ld65 -o robe_shield_sprites robe_shield_sprites.o -C $(LINKER_SCRIPTS)/apple2_b000.inc
|
||||
|
||||
robe_shield_sprites.o: robe_shield_sprites.s \
|
||||
flame_sprites.inc robe_shield_sprites.inc
|
||||
@@ -78,7 +78,7 @@ robe_sprites_purple.zx02: robe_sprites_purple
|
||||
$(ZX02) -f robe_sprites_purple robe_sprites_purple.zx02
|
||||
|
||||
robe_sprites_purple: robe_sprites_purple.o
|
||||
ld65 -o robe_sprites_purple robe_sprites_purple.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
|
||||
ld65 -o robe_sprites_purple robe_sprites_purple.o -C $(LINKER_SCRIPTS)/apple2_b000.inc
|
||||
|
||||
robe_sprites_purple.o: robe_sprites_purple.s \
|
||||
flame_sprites.inc robe_sprites_purple.inc
|
||||
@@ -90,7 +90,7 @@ robe_sprites_orange.zx02: robe_sprites_orange
|
||||
$(ZX02) -f robe_sprites_orange robe_sprites_orange.zx02
|
||||
|
||||
robe_sprites_orange: robe_sprites_orange.o
|
||||
ld65 -o robe_sprites_orange robe_sprites_orange.o -C $(LINKER_SCRIPTS)/apple2_a000.inc
|
||||
ld65 -o robe_sprites_orange robe_sprites_orange.o -C $(LINKER_SCRIPTS)/apple2_b000.inc
|
||||
|
||||
robe_sprites_orange.o: robe_sprites_orange.s \
|
||||
flame_sprites.inc robe_sprites_orange.inc
|
||||
|
||||
@@ -25,6 +25,15 @@ title:
|
||||
|
||||
jsr hgr2_clearscreen
|
||||
|
||||
|
||||
;===================================
|
||||
; switch in language card
|
||||
; read/write RAM, $d000 bank 2
|
||||
|
||||
lda $C083
|
||||
lda $C083
|
||||
|
||||
|
||||
;=========================
|
||||
; set up hgr lookup tables
|
||||
;=========================
|
||||
|
||||
@@ -22,8 +22,8 @@ PT3_ENABLE_APPLE_IIC = 1
|
||||
; switch in language card
|
||||
; read/write RAM, $d000 bank 2
|
||||
|
||||
lda $C083
|
||||
lda $C083
|
||||
; lda $C083
|
||||
; lda $C083
|
||||
|
||||
; actually load it
|
||||
lda #LOAD_MUSIC
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
MEMORY {
|
||||
ZP: start = $00, size = $1A, type = rw;
|
||||
RAM: start = $B000, size = $1000, 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;
|
||||
}
|
||||
Reference in New Issue
Block a user