diff --git a/src/grue.system.s b/src/grue.system.s index b6d08c8..8121b32 100644 --- a/src/grue.system.s +++ b/src/grue.system.s @@ -5,6 +5,13 @@ *=$2000 !to "build/GRUE.SYSTEM",plain + lda $BF98 ; machine identification byte + and #$30 + cmp #$30 ; 128K? + bne QuitToProDOS ; no, quit to ProDOS + !byte $1a ; 65C02 INC, clear Z flag if supported + beq QuitToProDOS ; not a 65C02 + - jsr $bf00 op_c7 !byte $c7 @@ -39,6 +46,13 @@ op_c7 bne - jmp $1000 +QuitToProDOS + jsr $bf00 + !byte $65 + !word quit_parms +quit_parms + !byte 4 + c5_parms !byte 2 !byte 0 diff --git a/src/pitchdark.a b/src/pitchdark.a index 6c14a96..10c5a63 100644 --- a/src/pitchdark.a +++ b/src/pitchdark.a @@ -27,8 +27,10 @@ Start and #$30 cmp #$30 ; 128K? beq + ; yes, continue - jmp QuitToProDOS -+ jsr DisconnectRAM32 ; disconnect /RAM in S3,D2 so we can use DHGR +- jmp QuitToProDOS ++ !byte $1a ; 65C02 INC, clear Z flag if supported + beq - ; not a 65C02 + jsr DisconnectRAM32 ; disconnect /RAM in S3,D2 so we can use DHGR bit $C010 jsr LoadFile ; load WEEGUI binary at $4000 !word .weeguiFilename