riven: have it use the dni printing code to print disk number

this completely fills qload to the brink, should try to free up some room
This commit is contained in:
Vince Weaver 2024-06-20 22:06:33 -04:00
parent 682905299d
commit 962d16e409
9 changed files with 59 additions and 72 deletions

View File

@ -21,7 +21,7 @@ riven_disk01.dsk: QBOOT QLOAD TITLE_01 \
$(DOS33_RAW) riven_disk01.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk01.dsk 0 8 disk01_files/DISK01 0 0
$(DOS33_RAW) riven_disk01.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk01.dsk 1 8 TITLE_01 0 0
$(DOS33_RAW) riven_disk01.dsk 1 9 TITLE_01 0 0
$(DOS33_RAW) riven_disk01.dsk 2 0 disk01_files/LEVEL_ARRIVAL 0 0
###
@ -40,7 +40,7 @@ riven_disk39.dsk: QBOOT QLOAD TITLE_39 \
$(DOS33_RAW) riven_disk39.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk39.dsk 0 8 disk39_files/DISK39 0 0
$(DOS33_RAW) riven_disk39.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk39.dsk 1 8 TITLE_39 0 0
$(DOS33_RAW) riven_disk39.dsk 1 9 TITLE_39 0 0
$(DOS33_RAW) riven_disk39.dsk 2 0 disk39_files/LEVEL_PROJECTOR 0 0
$(DOS33_RAW) riven_disk39.dsk 9 0 disk39_files/LEVEL_OUTSIDE 0 0
$(DOS33_RAW) riven_disk39.dsk 17 0 disk39_files/LEVEL_MAGSTEPS 0 0
@ -58,7 +58,7 @@ riven_disk40.dsk: QBOOT QLOAD TITLE_40 \
$(DOS33_RAW) riven_disk40.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk40.dsk 0 8 disk40_files/DISK40 0 0
$(DOS33_RAW) riven_disk40.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk40.dsk 1 8 TITLE_40 0 0
$(DOS33_RAW) riven_disk40.dsk 1 9 TITLE_40 0 0
$(DOS33_RAW) riven_disk40.dsk 2 0 disk40_files/LEVEL_MAGLEV 0 0
$(DOS33_RAW) riven_disk40.dsk 9 0 disk40_files/LEVEL_OUTSIDE 0 0
@ -71,7 +71,7 @@ riven_disk43.dsk: QBOOT QLOAD TITLE_43 \
$(DOS33_RAW) riven_disk43.dsk 0 4 QBOOT 2 1
$(DOS33_RAW) riven_disk43.dsk 0 8 disk43_files/DISK43 0 0
$(DOS33_RAW) riven_disk43.dsk 1 0 QLOAD 0 0
$(DOS33_RAW) riven_disk43.dsk 1 8 TITLE_43 0 0
$(DOS33_RAW) riven_disk43.dsk 1 9 TITLE_43 0 0
$(DOS33_RAW) riven_disk43.dsk 2 0 disk43_files/LEVEL_CART 0 0
###
@ -85,7 +85,7 @@ qboot_sector.o: qboot_sector.s qboot_stage2.s
###
QLOAD: qload.o
ld65 -o QLOAD qload.o -C $(LINKER_SCRIPTS)/apple2_1800.inc
ld65 -o QLOAD qload.o -C $(LINKER_SCRIPTS)/apple2_1700.inc
qload.o: qload.s qboot.inc \
zx02_optim.s wait.s \
@ -222,7 +222,7 @@ generate_common.o: generate_common.c
####
#qload_start = $1800
#qload_start = $1700
#full_decomp = qload_start+$DB
#wait = qload_start+$161
@ -234,14 +234,14 @@ generate_common.o: generate_common.c
qload.inc: generate_common QLOAD
./generate_common -a 0x1800 -s full_decomp qload.lst > qload.inc
./generate_common -a 0x1800 -s wait qload.lst >> qload.inc
./generate_common -a 0x1800 -s wait_50xms qload.lst >> qload.inc
./generate_common -a 0x1800 -s draw_pointer qload.lst >> qload.inc
./generate_common -a 0x1800 -s save_bg_14x14 qload.lst >> qload.inc
./generate_common -a 0x1800 -s handle_keypress qload.lst >> qload.inc
./generate_common -a 0x1800 -s change_location qload.lst >> qload.inc
./generate_common -a 0x1800 -s move_and_print qload.lst >> qload.inc
./generate_common -a 0x1800 -s set_normal qload.lst >> qload.inc
./generate_common -a 0x1700 -s full_decomp qload.lst > qload.inc
./generate_common -a 0x1700 -s wait qload.lst >> qload.inc
./generate_common -a 0x1700 -s wait_50xms qload.lst >> qload.inc
./generate_common -a 0x1700 -s draw_pointer qload.lst >> qload.inc
./generate_common -a 0x1700 -s save_bg_14x14 qload.lst >> qload.inc
./generate_common -a 0x1700 -s handle_keypress qload.lst >> qload.inc
./generate_common -a 0x1700 -s change_location qload.lst >> qload.inc
./generate_common -a 0x1700 -s move_and_print qload.lst >> qload.inc
./generate_common -a 0x1700 -s set_normal qload.lst >> qload.inc

View File

@ -10,8 +10,7 @@ $0800-$0bff = lores graphics page2
$1000-$11ff = qboot_stage2 (disk code)
$1200-$12ff = QLOAD tables
$1300-$16FF = HGR lookup tables
$1700-$17FF = ????
$1800-$1FFF = QLOAD = loader code (2k?)
$1700-$1FFF = QLOAD = loader code (2k?)
$2000-$3FFF = HGR Page1, lores movie overlays
$4000-$BFFF = our code (up to 32k in theory)
$C000-$CFFF = I/O

View File

@ -12,10 +12,10 @@ track_array:
.byte 0,0,0,0
sector_array:
.byte 8, 0, 0, 0 ; TITLE, ARRIVAL
.byte 9, 0, 0, 0 ; TITLE, ARRIVAL
.byte 0,0,0,0
length_array:
.byte 16, 128,123, 64 ; TITLE, ARRIVAL
.byte 8, 128,123, 64 ; TITLE, ARRIVAL
.byte 0,0,0,0

View File

@ -12,11 +12,11 @@ track_array:
.byte 21,25,27,0 ; MAGLEV, MOVIE1, MOVIE2
sector_array:
.byte 8, 0, 0, 0 ; TITLE, OUTSIDE, PROJECTOR, MAGSTEPS
.byte 9, 0, 0, 0 ; TITLE, OUTSIDE, PROJECTOR, MAGSTEPS
.byte 0, 0, 0, 0 ; MAGLEV, MOVIE1, MOVIE2
length_array:
.byte 16, 123,123, 64 ; TITLE, OUTSIDE, PROJECTOR, MAGSTEPS
.byte 8, 123,123, 64 ; TITLE, OUTSIDE, PROJECTOR, MAGSTEPS
.byte 64, 32, 128, 0 ; MAGLEV, MOVIE1, MOVIE2
disk_exit_disk: ; note: BCD (yes I'm lazy)

View File

@ -12,11 +12,11 @@ track_array:
.byte 0, 0, 0, 0
sector_array:
.byte 8, 0, 0, 0 ; TITLE, MAGLEV, OUTSIDE
.byte 9, 0, 0, 0 ; TITLE, MAGLEV, OUTSIDE
.byte 0,0,0,0
length_array:
.byte 16, 96,96, 64 ; TITLE, MAGLEV, OUTSIDE
.byte 8, 96,96, 64 ; TITLE, MAGLEV, OUTSIDE
.byte 0,0,0,0
disk_exit_disk: ; note: BCD (yes I'm lazy)
@ -26,13 +26,13 @@ disk_exit_disk: ; note: BCD (yes I'm lazy)
.byte $00
disk_exit_dni_h:
.byte $01
.byte $01 ; 43 = 25 + 15 + 3
.byte $00
.byte $00
.byte $00
disk_exit_dni_l:
.byte $24
.byte $33
.byte $00
.byte $00
.byte $00

View File

@ -13,11 +13,11 @@ track_array:
.byte 0,0,0,0
sector_array:
.byte 8, 0, 0, 0 ; TITLE, CART
.byte 9, 0, 0, 0 ; TITLE, CART
.byte 0,0,0,0
length_array:
.byte 16, 96,123, 64 ; TITLE, CART
.byte 8, 96,123, 64 ; TITLE, CART
.byte 0,0,0,0
disk_exit_disk: ; note: BCD (yes I'm lazy)

View File

@ -5,13 +5,13 @@
; Paramaters for loading QLOAD
sectors = 8 ; user-defined
sectors = 9 ; user-defined
firsttrk = 1 ; user-defined, first track to read
firstsec = 0 ; user-defined, first sector to read
; address = $0B ; user-defined
; entry = $B00 ; user-defined
address = $18 ; user-defined
entry = $1800 ; user-defined
address = $17 ; user-defined
entry = $1700 ; user-defined
version = 1
;memory usage:

View File

@ -29,26 +29,13 @@ DISK_EXIT_DIRECTION = QLOAD_TABLE+53
.include "qboot.inc"
;.if DISK=01
;.include "disk01_files/disk01_defines.inc"
;.endif
;.if DISK=39
;.include "disk39_files/disk39_defines.inc"
;.endif
;.if DISK=40
;.include "disk40_files/disk40_defines.inc"
;.endif
;.if DISK=43
;.include "disk43_files/disk43_defines.inc"
;.endif
qload_start:
; preshift table is $300 - $369
; $36C to $3D5 is used as decode table by disk II drive
; init the write code if needed
lda WHICH_SLOT
; lda WHICH_SLOT
; jsr popwr_init
; first time entry
@ -66,11 +53,11 @@ qload_start:
lda #0 ; load title, always 0th
sta WHICH_LOAD
lda #1
sta CURRENT_DRIVE ; not needed for single drive code?
; lda #1
; sta CURRENT_DRIVE ; not needed for single drive code?
lda #$FF
sta DRIVE1_TRACK ; not needed for single drive code?
; lda #$FF
; sta DRIVE1_TRACK ; not needed for single drive code?
; need to modify qboot in that case
@ -136,12 +123,13 @@ change_disk:
lda DISK_EXIT_DIRECTION,X
sta DIRECTION
; see if disk we want is in drive
lda DISK_EXIT_DNI_H,X
sta NUMBER_HIGH
lda DISK_EXIT_DNI_L,X
sta NUMBER_LOW
; TODO: load TITLE
; check disk number
; if no match, wait again
; if escape pressed, go back somehow?
; see if disk we want is in drive
;==============================
; print "insert disk" message
@ -182,6 +170,14 @@ change_disk:
jsr move_and_print
jsr move_and_print
lda #4
sta XPOS
lda #5
sta YPOS
jsr draw_full_dni_number
fnf_keypress:
lda KEYPRESS
bpl fnf_keypress
@ -241,23 +237,9 @@ load_qload_offsets:
.include "text_print.s"
.include "gr_offsets.s"
;.if DISK=01
;.include "disk01_files/disk01_qload.inc"
;.endif
;.if DISK=39
;.include "disk39_files/disk39_qload.inc"
;.endif
;.if DISK=40
;.include "disk40_files/disk40_qload.inc"
;.endif
;.if DISK=43
;.include "disk43_files/disk43_qload.inc"
;.endif
.include "print_dni_numbers.s"
.include "number_sprites.inc"
qload_end:
.assert (>qload_end - >qload_start) < $8 , error, "loader too big"
.assert (>qload_end - >qload_start) < $9 , error, "loader too big"

View File

@ -104,8 +104,14 @@ APPLEII_MODEL = $9D
HGR_PAGE = $9E
WHICH_SLOT = $9F
MAGLEV_FLIP_DIRECTION = $A0
BEACH_ANIMALS_SEEN = $A1
SPRITEX = $A0
SPRITEY = $A1
DRAW_NUMBER = $A2
NUMBER_LOW = $A3
NUMBER_HIGH = $A4
MAGLEV_FLIP_DIRECTION = $B0
BEACH_ANIMALS_SEEN = $B1
TEMP = $F9
MASKL = $FA