diff --git a/res/pitchdark.po b/res/pitchdark.po index e2e3d42..0af2d61 100644 Binary files a/res/pitchdark.po and b/res/pitchdark.po differ diff --git a/src/grue.s b/src/grue.s new file mode 100644 index 0000000..62cac1d --- /dev/null +++ b/src/grue.s @@ -0,0 +1,109 @@ +;license:MIT +;(c) 2018 by qkumba + +!cpu 6502 +*=$2000 +!to "../build/GRUE.SYSTEM#FF2000",plain + +- jsr $bf00 +op_c7 + !byte $c7 + !word runme+c7_parms-reloc + ldx runme+prefix-reloc + bne + + lda $bf30 + sta c5_parms+1 + jsr $bf00 + !byte $c5 + !word c5_parms + ldx runme+prefix+1-reloc + inx + txa + and #$0f + sta runme+prefix-reloc + lda #$2f + sta runme+prefix+1-reloc + dec op_c7 + bne - ++ lda #prefix + sta runme+c6_parms+2-reloc + lda $c083 + lda $c083 + ldy #0 +- lda runme,y + sta $d100,y ;$d1 heh. + sta $1000,y + iny + bne - + jmp $1000 + +c5_parms + !byte 2 + !byte 0 + !word runme+prefix+1-reloc + +runme !pseudopc $1000 { +reloc cld + lda $c082 + sta $c00c + sta $c000 + jsr $fe93 + jsr $fe89 + sta $4fb + jsr $fb2f + jsr $fc58 + ldx #$df + lda #$cf +- sta $be79,x + lda #0 + txs + inx + bne - + inc $bf6f + jsr $bf00 + !byte $c6 + !word c6_parms + jsr $bf00 + !byte $c8 + !word c8_parms + lda c8_parms+5 + sta ca_parms+1 + jsr $bf00 + !byte $ca + !word ca_parms + jsr $bf00 + !byte $cc + !word cc_parms + jmp $6000 + +c7_parms +c6_parms + !byte 1 + !word runme+prefix-reloc + +c8_parms + !byte 3 + !word filename + !word $800 + !byte 0 + +ca_parms + !byte 4 + !byte $d1 + !word $6000 + !word $ffff + !word $34d1 + +cc_parms + !byte 1 + !byte 0 + +filename + !byte (filename_e-filename)-1 + !text "PITCH.DARK" +filename_e + +prefix +} diff --git a/src/pitchdark.a b/src/pitchdark.a index 357ef3a..e6a3e25 100644 --- a/src/pitchdark.a +++ b/src/pitchdark.a @@ -3,19 +3,10 @@ !cpu 65c02 !ct "lcase.ct" -!to "../build/PITCHDRK.SYSTEM#FF2000",plain -*=$2000 +!to "../build/PITCH.DARK#066000",plain +*=$6000 - ldx #$20 - ldy #$00 -.copya lda CodeStart,y -.copyb sta $6000,y - iny - bne .copya - inc .copya+2 - inc .copyb+2 - dex - bne .copya + lda #0 ; set Z flag always !cpu 65816 rep #2 ; clear Z flag on 65816 only !cpu 65c02 @@ -24,8 +15,6 @@ and #$1F sta $C029 ; set GS NEWVIDEO mode to turn off linearize + jmp Start -CodeStart -!pseudopc $6000 { .weeguiFilename !byte 10 !raw "BIN/WEEGUI" @@ -79,4 +68,3 @@ ExitWeeGUI jsr WeeGUI ldx #WGExit ; clean up WeeGUI jmp WeeGUI -} diff --git a/src/quit.s b/src/quit.s deleted file mode 100644 index 80cb67a..0000000 --- a/src/quit.s +++ /dev/null @@ -1,82 +0,0 @@ -;license:MIT -;(c) 2018 by qkumba - -!cpu 6502 -*=$2000 -!to "../build/QUIT.SYSTEM#FF2000",plain - - lda $c083 - lda $c083 - ldy #0 -- lda runme,y - sta $d100,y ;$d1 heh. - sta $1000,y - iny - bne - - jmp $1000 - -runme !pseudopc $1000 { - cld - lda $c082 - sta $c00c - sta $c000 - jsr $fe93 - jsr $fe89 - sta $4fb - jsr $fb2f - jsr $fc58 - ldx #$df - lda #$cf -- sta $be79,x - lda #0 - txs - inx - bne - - inc $bf6f - jsr $bf00 - !byte $c6 - !word c6_parms - jsr $bf00 - !byte $c8 - !word c8_parms - lda c8_parms+5 - sta ca_parms+1 - jsr $bf00 - !byte $ca - !word ca_parms - jsr $bf00 - !byte $cc - !word cc_parms - jmp $2000 - -c6_parms - !byte 1 - !word prefix - -c8_parms - !byte 3 - !word filename - !word $800 - !byte 0 - -ca_parms - !byte 4 - !byte $d1 - !word $2000 - !word $ffff - !word $34d1 - -cc_parms - !byte 1 - !byte 0 - -prefix - !byte (prefix_e-prefix)-1 - !text "/PDBOOT" -prefix_e - -filename - !byte (filename_e-filename)-1 - !text "PITCHDRK.SYSTEM" -filename_e -}