From 8e19886ade729f96f473528806fb3dfefbefbd64 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 2 Sep 2020 21:44:10 -0400 Subject: [PATCH] mist: make custom messages for disk2 and disk3 --- mist/Makefile | 32 ++++++++++++++++++++----- mist/wrong_boot2.s | 58 ++++++++++++++++++++++++++++++++++++++++++++++ mist/wrong_boot3.s | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 6 deletions(-) create mode 100644 mist/wrong_boot2.s create mode 100644 mist/wrong_boot3.s diff --git a/mist/Makefile b/mist/Makefile index 1ce9b099..e6f2e37c 100644 --- a/mist/Makefile +++ b/mist/Makefile @@ -69,19 +69,39 @@ mist.dsk: QBOOT TEXT_TITLE QLOAD \ $(DOS33_RAW) mist.dsk 32 12 GENERATOR 0 33 -mist_side2.dsk: CHANNEL ARBOR NIBEL CABIN +mist_side2.dsk: WBOOT2 CHANNEL ARBOR NIBEL CABIN cp extra_empty.dsk mist_side2.dsk + $(DOS33_RAW) mist_side2.dsk 0 0 WBOOT2 0 1 $(DOS33_RAW) mist_side2.dsk 1 0 CHANNEL 0 135 $(DOS33_RAW) mist_side2.dsk 10 0 ARBOR 0 159 $(DOS33_RAW) mist_side2.dsk 20 0 NIBEL 0 109 $(DOS33_RAW) mist_side2.dsk 27 0 CABIN 0 61 -mist_side3.dsk: MECHE SELENA STONEY SUB +mist_side3.dsk: WBOOT3 MECHE SELENA STONEY SUB cp extra_empty.dsk mist_side3.dsk - $(DOS33_RAW) mist_side3.dsk 1 0 MECHE 0 157 - $(DOS33_RAW) mist_side3.dsk 11 0 SELENA 0 145 - $(DOS33_RAW) mist_side3.dsk 21 0 STONEY 0 158 - $(DOS33_RAW) mist_side3.dsk 31 0 SUB 0 54 + $(DOS33_RAW) mist_side3.dsk 0 0 WBOOT3 0 1 + $(DOS33_RAW) mist_side3.dsk 1 0 MECHE 0 157 + $(DOS33_RAW) mist_side3.dsk 11 0 SELENA 0 145 + $(DOS33_RAW) mist_side3.dsk 21 0 STONEY 0 158 + $(DOS33_RAW) mist_side3.dsk 31 0 SUB 0 54 + + + +### + +WBOOT2: wrong_boot2.o + ld65 -o WBOOT2 wrong_boot2.o -C ../linker_scripts/apple2_800.inc + +wrong_boot2.o: wrong_boot2.s + ca65 -o wrong_boot2.o wrong_boot2.s -l wrong_boot2.lst + +### + +WBOOT3: wrong_boot3.o + ld65 -o WBOOT3 wrong_boot3.o -C ../linker_scripts/apple2_800.inc + +wrong_boot3.o: wrong_boot3.s + ca65 -o wrong_boot3.o wrong_boot3.s -l wrong_boot3.lst ### diff --git a/mist/wrong_boot2.s b/mist/wrong_boot2.s new file mode 100644 index 00000000..525a8916 --- /dev/null +++ b/mist/wrong_boot2.s @@ -0,0 +1,58 @@ + + .byte 1 ; number of sectors for ROM to load + +wboot_entry: + ldx $2B ; load slot into X + ; possibly unnecessary, already there? + + lda $C088,X ; turn off drive motor + + ; put $CX00 in $10:$11, where X is slot + ; allows rebooting later + + txa + lsr + lsr + lsr + lsr + ora #$c0 + sta $11 + + lda #$00 + sta $10 + + ; make sure we are in 40col mode + ; with monitor I/O working + + jsr $FE89 ; SETKBD (simulate keypress?) + jsr $FE93 ; SETVID (simulate video output?) + jsr $FB2F ; INIT (clear screen/etc) + jsr $FE84 ; SETNORM (set normal video) + jsr $FC58 ; HOME (clear screen) + + ; print our message + + ldx #$00 ; loop either 256 chars or until hit zero +loop: + lda message,X + beq done + ora #$80 + jsr $FDED ; COUT + inx + bne loop +done: + + ; wait for keypress + + jsr $fd0c ; RDKEY + + ; resboot from current disk (set earlier) + jmp ($0010) + +message: + .byte $0D,$0D,$0D,$0D,$0D + .byte " APPLE II MYST - DISK 2",$0D,$0D,$0D + .byte " PLEASE INSERT DISK 1",$0D,$0D + .byte " PRESS ANY KEY TO REBOOT",$0D + .byte $00 + diff --git a/mist/wrong_boot3.s b/mist/wrong_boot3.s new file mode 100644 index 00000000..cdfaeecf --- /dev/null +++ b/mist/wrong_boot3.s @@ -0,0 +1,58 @@ + + .byte 1 ; number of sectors for ROM to load + +wboot_entry: + ldx $2B ; load slot into X + ; possibly unnecessary, already there? + + lda $C088,X ; turn off drive motor + + ; put $CX00 in $10:$11, where X is slot + ; allows rebooting later + + txa + lsr + lsr + lsr + lsr + ora #$c0 + sta $11 + + lda #$00 + sta $10 + + ; make sure we are in 40col mode + ; with monitor I/O working + + jsr $FE89 ; SETKBD (simulate keypress?) + jsr $FE93 ; SETVID (simulate video output?) + jsr $FB2F ; INIT (clear screen/etc) + jsr $FE84 ; SETNORM (set normal video) + jsr $FC58 ; HOME (clear screen) + + ; print our message + + ldx #$00 ; loop either 256 chars or until hit zero +loop: + lda message,X + beq done + ora #$80 + jsr $FDED ; COUT + inx + bne loop +done: + + ; wait for keypress + + jsr $fd0c ; RDKEY + + ; resboot from current disk (set earlier) + jmp ($0010) + +message: + .byte $0D,$0D,$0D,$0D,$0D + .byte " APPLE II MYST - DISK 3",$0D,$0D,$0D + .byte " PLEASE INSERT DISK 1",$0D,$0D + .byte " PRESS ANY KEY TO REBOOT",$0D + .byte $00 +