mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-03 18:29:53 +00:00
second: work on disk2 infrastructure
This commit is contained in:
parent
b23413da7f
commit
97d4588348
@ -8,7 +8,7 @@ LINKER_SCRIPTS = ../../linker_scripts/
|
||||
|
||||
all: second_d1.dsk second_d2.dsk
|
||||
|
||||
second_d1.dsk: QBOOT QLOAD MUSIC START \
|
||||
second_d1.dsk: QBOOT QLOAD MUSIC START music.inc \
|
||||
./part01_intropan/INTRO \
|
||||
./part05_dot_tunnel/TUNNEL \
|
||||
./part16_ocean/OCEAN \
|
||||
@ -24,8 +24,9 @@ second_d1.dsk: QBOOT QLOAD MUSIC START \
|
||||
$(DOS33_RAW) second_d1.dsk 11 0 ./part05_dot_tunnel/TUNNEL 0 0
|
||||
$(DOS33_RAW) second_d1.dsk 13 0 ./part16_ocean/OCEAN 0 0
|
||||
|
||||
second_d2.dsk: QBOOT QLOAD2 MUSIC2 \
|
||||
second_d2.dsk: QBOOT QLOAD2 MUSIC2 music2.inc \
|
||||
./part18_3d/THREED \
|
||||
./part19_nuts/NUTS \
|
||||
./part20_credits/CREDITS
|
||||
cp $(EMPTY_DISK) second_d2.dsk
|
||||
$(DOS33_RAW) second_d2.dsk 0 0 QBOOT 0 1
|
||||
@ -33,11 +34,20 @@ second_d2.dsk: QBOOT QLOAD2 MUSIC2 \
|
||||
$(DOS33_RAW) second_d2.dsk 0 4 QBOOT 2 1
|
||||
$(DOS33_RAW) second_d2.dsk 1 0 QLOAD2 0 0
|
||||
$(DOS33_RAW) second_d2.dsk 3 0 MUSIC2 0 0
|
||||
# $(DOS33_RAW) second_d2.dsk 5 0 START 0 0
|
||||
$(DOS33_RAW) second_d2.dsk 10 0 ./part20_credits/CREDITS 0 0
|
||||
$(DOS33_RAW) second_d2.dsk 20 0 ./part18_3d/THREED 0 0
|
||||
$(DOS33_RAW) second_d2.dsk 8 0 ./part19_nuts/NUTS 0 0
|
||||
$(DOS33_RAW) second_d2.dsk 12 0 ./part20_credits/CREDITS 0 0
|
||||
$(DOS33_RAW) second_d2.dsk 20 0 ./part18_3d/THREED 0 0
|
||||
|
||||
####
|
||||
|
||||
part18_3d/THREED:
|
||||
cd part18_3d && make
|
||||
|
||||
part19_nuts/NUTS:
|
||||
cd part19_nuts && make
|
||||
|
||||
part20_credits/CREDITS:
|
||||
cd part20_credits && make
|
||||
|
||||
####
|
||||
|
||||
@ -69,6 +79,7 @@ QLOAD2: qload2.o
|
||||
ld65 -o QLOAD2 qload2.o -C $(LINKER_SCRIPTS)/apple2_1200.inc
|
||||
|
||||
qload2.o: qload2.s \
|
||||
music2.inc \
|
||||
gr_offsets.s \
|
||||
wait.s wait_a_bit.s \
|
||||
lc_detect.s gr_fast_clear.s \
|
||||
@ -155,6 +166,20 @@ music.inc: generate_common MUSIC
|
||||
./generate_common -a 0xd000 -s mockingboard_disable_interrupt music.lst >> music.inc
|
||||
./generate_common -a 0xd000 -s done_pt3_irq_handler music.lst >> music.inc
|
||||
./generate_common -a 0xd000 -s PT3_LOC music.lst >> music.inc
|
||||
./generate_common -a 0xd000 -s copy_main_aux music.lst >> music.inc
|
||||
./generate_common -a 0xd000 -s copy_aux_main music.lst >> music.inc
|
||||
|
||||
music2.inc: generate_common MUSIC2
|
||||
./generate_common -a 0xd000 -s pt3_init_song music2.lst > music2.inc
|
||||
./generate_common -a 0xd000 -s mockingboard_init music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s reset_ay_both music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s clear_ay_both music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s mockingboard_setup_interrupt music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s mockingboard_disable_interrupt music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s done_pt3_irq_handler music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s PT3_LOC music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s copy_main_aux music2.lst >> music2.inc
|
||||
./generate_common -a 0xd000 -s copy_aux_main music2.lst >> music2.inc
|
||||
|
||||
####
|
||||
|
||||
@ -162,6 +187,7 @@ MUSIC: music.o qload.inc
|
||||
ld65 -o MUSIC music.o -C $(LINKER_SCRIPTS)/apple2_d000.inc
|
||||
|
||||
music.o: music.s zp.inc \
|
||||
aux_memcopy.s \
|
||||
music/z00m_unreal2_part1.pt3 \
|
||||
pt3_lib_core.s \
|
||||
pt3_lib_mockingboard_detect.s \
|
||||
@ -173,10 +199,11 @@ music.o: music.s zp.inc \
|
||||
|
||||
####
|
||||
|
||||
MUSIC2: music2.o qload2.inc
|
||||
MUSIC2: music2.o
|
||||
ld65 -o MUSIC2 music2.o -C $(LINKER_SCRIPTS)/apple2_d000.inc
|
||||
|
||||
music2.o: music2.s zp.inc \
|
||||
aux_memcopy.s \
|
||||
music/second_3d.pt3 \
|
||||
pt3_lib_core.s \
|
||||
pt3_lib_mockingboard_detect.s \
|
||||
@ -188,7 +215,7 @@ music2.o: music2.s zp.inc \
|
||||
|
||||
|
||||
|
||||
|
||||
###
|
||||
|
||||
generate_common: generate_common.o
|
||||
$(CC) $(LFLAGS) -o generate_common generate_common.o
|
||||
@ -200,4 +227,7 @@ generate_common.o: generate_common.c
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO SECOND QBOOT QLOAD MUSIC START
|
||||
rm -f *~ *.o *.lst HELLO SECOND QBOOT QLOAD MUSIC START
|
||||
cd part18_3d && make clean
|
||||
cd part19_nuts && make clean
|
||||
cd part20_credits && make clean
|
||||
|
@ -14,11 +14,15 @@ dotbounce: 4k? 0%
|
||||
transmission: 8k? 0%
|
||||
ocean: 24k 90%
|
||||
polar: 5k 50%
|
||||
3d: 32k 75%
|
||||
nuts: 5k 90%
|
||||
credits: 8k 0%
|
||||
=========================
|
||||
|
||||
DISK2: Track Sectors
|
||||
~~~~~~ ~~~ ~~~~~~
|
||||
nuts: 8k 8 32 (2T)
|
||||
credits: 16k 12 64 (4T)
|
||||
3d: 32k 20 128 (8T)
|
||||
==============
|
||||
139k
|
||||
56k
|
||||
|
||||
|
||||
RAM usage:
|
||||
|
@ -11,15 +11,20 @@ DISK II
|
||||
|
||||
- finish the whole thing if possible
|
||||
|
||||
+ nuts
|
||||
|
||||
- sprite animation of ship
|
||||
|
||||
+ credits
|
||||
|
||||
- scroll logos in from right, then out to left
|
||||
- add double height printing with credits
|
||||
- scroll the text in
|
||||
|
||||
- add credits
|
||||
|
||||
- smoother scrolling. Only need to scroll middle 20 bytes or so?
|
||||
wait on vblank?
|
||||
|
||||
+ after-credits
|
||||
RR?
|
||||
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
83
demos/second/aux_memcopy.s
Normal file
83
demos/second/aux_memcopy.s
Normal file
@ -0,0 +1,83 @@
|
||||
;==============================
|
||||
; copy_main_aux
|
||||
;==============================
|
||||
; A = AUX page start (dest)
|
||||
; Y = MAIN page start (src)
|
||||
; X = num pages
|
||||
|
||||
copy_main_aux:
|
||||
|
||||
; self modify
|
||||
sta cma_aux_smc+2
|
||||
sty cma_main_smc+2
|
||||
|
||||
; switch to read MAIN/WRITE AUX
|
||||
sta $C002 ; read MAIN
|
||||
sta $C005 ; write AUX
|
||||
|
||||
copy_main_aux_outer_loop:
|
||||
|
||||
ldy #$00
|
||||
copy_main_aux_inner_loop:
|
||||
|
||||
cma_main_smc:
|
||||
lda $BB00,Y
|
||||
cma_aux_smc:
|
||||
sta $AA00,Y
|
||||
dey
|
||||
bne copy_main_aux_inner_loop
|
||||
|
||||
inc cma_main_smc+2
|
||||
inc cma_aux_smc+2
|
||||
dex
|
||||
bne copy_main_aux_outer_loop
|
||||
|
||||
; switch to read MAIN/WRITE MAIN
|
||||
sta $C002 ; read MAIN
|
||||
sta $C004 ; write MAIN
|
||||
|
||||
rts
|
||||
|
||||
|
||||
|
||||
;==============================
|
||||
; copy_aux_main
|
||||
;==============================
|
||||
; A = AUX page start (src)
|
||||
; Y = MAIN page start (dest)
|
||||
; X = num pages
|
||||
|
||||
copy_aux_main:
|
||||
|
||||
; self modify
|
||||
sta cam_aux_smc+2
|
||||
sty cam_main_smc+2
|
||||
|
||||
; switch to read AUX/WRITE MAIN
|
||||
sta $C003 ; read AUX
|
||||
sta $C004 ; write MAIN
|
||||
|
||||
copy_aux_main_outer_loop:
|
||||
|
||||
ldy #$00
|
||||
copy_aux_main_inner_loop:
|
||||
|
||||
cam_aux_smc:
|
||||
lda $AA00,Y
|
||||
cam_main_smc:
|
||||
sta $BB00,Y
|
||||
|
||||
dey
|
||||
bne copy_aux_main_inner_loop
|
||||
|
||||
inc cam_main_smc+2
|
||||
inc cam_aux_smc+2
|
||||
dex
|
||||
bne copy_aux_main_outer_loop
|
||||
|
||||
; switch to read MAIN/WRITE MAIN
|
||||
sta $C002 ; read MAIN
|
||||
sta $C004 ; write MAIN
|
||||
|
||||
rts
|
||||
|
@ -7,6 +7,9 @@
|
||||
|
||||
;.include "qload.inc"
|
||||
|
||||
memcpy_routines:
|
||||
.include "aux_memcopy.s"
|
||||
|
||||
music_lib:
|
||||
|
||||
PT3_ENABLE_APPLE_IIC = 1
|
||||
|
@ -7,6 +7,10 @@
|
||||
|
||||
;.include "qload.inc"
|
||||
|
||||
|
||||
memcpy_routines:
|
||||
.include "aux_memcopy.s"
|
||||
|
||||
music_lib:
|
||||
|
||||
PT3_ENABLE_APPLE_IIC = 1
|
||||
|
@ -163,6 +163,8 @@ final_credits:
|
||||
.byte 14,"Fenarinarsa",0
|
||||
.byte 15,"T. Greene",0
|
||||
.byte 15,"K. Savetz",0
|
||||
.byte 14,"K. Kennaway",0
|
||||
.byte 15,"textfiles",0
|
||||
.byte 17,"wiz21b",0
|
||||
.byte 17,"Trixter",0
|
||||
.byte 18,"LGR",0
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
.include "zp.inc"
|
||||
.include "hardware.inc"
|
||||
.include "music2.inc"
|
||||
|
||||
;.include "common_defines.inc"
|
||||
.include "qboot.inc"
|
||||
@ -158,19 +159,22 @@ error_string:
|
||||
|
||||
|
||||
which_disk_array:
|
||||
.byte 1,1,1 ; MUSIC2, THREED, CREDITS
|
||||
.byte 1,1,1,1 ; MUSIC2, THREED, CREDITS, NUTS
|
||||
|
||||
load_address_array:
|
||||
.byte $D0,$40,$60 ; MUSIC2, THREED, CREDITS
|
||||
.byte $D0,$40,$60,$60 ; MUSIC2, THREED, CREDITS, NUTS
|
||||
|
||||
track_array:
|
||||
.byte 3, 20, 10 ; MUSIC2, THREED, CREDITS
|
||||
.byte 3, 20, 12, 8 ; MUSIC2, THREED, CREDITS, NUTS
|
||||
|
||||
sector_array:
|
||||
.byte 0, 0, 0 ; MUSIC2, THREED, CREDITS
|
||||
.byte 0, 0, 0, 0 ; MUSIC2, THREED, CREDITS, NUTS
|
||||
|
||||
length_array:
|
||||
.byte 32, 128, 80 ; MUSIC2, THREED, CREDITS
|
||||
.byte 32, 128, 64, 32 ; MUSIC2, THREED, CREDITS, NUTS
|
||||
|
||||
aux_address_array:
|
||||
.byte $FF,$FF,$20,$40 ; MUSIC2, THREED, CREDITS, NUTS
|
||||
|
||||
.include "wait.s"
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
;.include "zp.inc"
|
||||
;.include "hardware.inc"
|
||||
;.include "qload.inc"
|
||||
.include "music.inc"
|
||||
;.include "qload2.inc"
|
||||
;.include "music.inc"
|
||||
|
||||
second_start:
|
||||
;=====================
|
||||
@ -82,20 +82,79 @@ load_loop:
|
||||
bit PAGE1
|
||||
|
||||
;=======================
|
||||
; load
|
||||
; load, copy to AUXMEM
|
||||
;=======================
|
||||
|
||||
; lda #1 ; THREED
|
||||
sta $C008 ; use MAIN zero-page/stack/language card
|
||||
|
||||
;====================
|
||||
; load nuts to $6000
|
||||
|
||||
lda #3 ; NUTS
|
||||
sta WHICH_LOAD
|
||||
jsr load_file
|
||||
|
||||
;======================
|
||||
; copy NUTS to AUX $4000
|
||||
|
||||
lda #$20 ; AUX dest $20
|
||||
ldy #$40 ; MAIN src
|
||||
ldx #32 ; 64 pages
|
||||
jsr copy_main_aux
|
||||
|
||||
;====================
|
||||
; load CREDITS to $6000
|
||||
|
||||
lda #2 ; CREDITS
|
||||
sta WHICH_LOAD
|
||||
|
||||
jsr load_file
|
||||
|
||||
;===========================
|
||||
; copy CREDITS to AUX $2000
|
||||
|
||||
lda #$20 ; AUX dest $20
|
||||
ldy #$60 ; MAIN src
|
||||
ldx #64 ; 64 pages
|
||||
jsr copy_main_aux
|
||||
|
||||
|
||||
; lda #1 ; THREED
|
||||
; sta WHICH_LOAD
|
||||
; jsr load_file
|
||||
|
||||
|
||||
|
||||
|
||||
;=======================
|
||||
; run THREED
|
||||
;=======================
|
||||
|
||||
cli ; start music
|
||||
|
||||
; jmp $4000 ; TODO: paramaterize
|
||||
jmp $6000 ; TODO: paramaterize
|
||||
;=======================
|
||||
; run NUTS
|
||||
;=======================
|
||||
|
||||
;=======================
|
||||
; run CREDITS
|
||||
;=======================
|
||||
|
||||
;============================================
|
||||
; copy CREDITS from AUX $2000 to MAIN $6000
|
||||
|
||||
lda #$20 ; AUX src $2000
|
||||
ldy #$60 ; MAIN dest $6000
|
||||
ldx #64 ; 64 pages
|
||||
jsr copy_aux_main
|
||||
|
||||
; run credits
|
||||
|
||||
jsr $6000
|
||||
|
||||
|
||||
|
||||
|
||||
; TODO: RR?
|
||||
|
||||
forever:
|
||||
jmp forever
|
||||
|
Loading…
Reference in New Issue
Block a user