diff --git a/src/constants.a b/src/constants.a index 6301ae6..aaeacf4 100644 --- a/src/constants.a +++ b/src/constants.a @@ -17,7 +17,7 @@ ;~7400...... - program data (approximate) ; -kPitchDarkBinaryAddress = $3F4D +kPitchDarkBinaryAddress = $3F41 kGameInfoBuffer = $0800 ; used by LoadGameInfo kProDOSFileBuffer = $1C00 ; 1K buffer for ProDOS MLI calls diff --git a/src/pitchdark.a b/src/pitchdark.a index 88377b3..d2e2d06 100644 --- a/src/pitchdark.a +++ b/src/pitchdark.a @@ -14,8 +14,8 @@ *=kPitchDarkBinaryAddress - jsr QuitUnless128KAnd65C02; check minimum hardware requirements !source "src/pitchdark.init.a" + jsr LoadGameInfo ; get current game description and game-specific options jsr WGInit ; initialize WeeGUI ldx #WGEnableMouse ; enable mouse support diff --git a/src/pitchdark.init.a b/src/pitchdark.init.a index df55bfa..d85f47f 100644 --- a/src/pitchdark.init.a +++ b/src/pitchdark.init.a @@ -1,3 +1,14 @@ +;------------------------------------------------------------------------------ +; check machine requirements (128K with 65C02) and quit to ProDOS if not met +;------------------------------------------------------------------------------ + lda MACHID + and #$30 + cmp #$30 ; 128K? + beq + ; yes, continue +- jmp QuitToProDOS ++ inc ; 65C02-only INC instruction will clear Z flag + beq - ; if Z flag is still set, this is not a 65C02 + ;------------------------------------------------------------------------------ ; disconnect ProDOS /RAM disk in S3,D2 ; (does not affect other RAM disks like RAMWorks or RAMFactor) diff --git a/src/prodos.mli.a b/src/prodos.mli.a index 2d8d68f..d153d04 100644 --- a/src/prodos.mli.a +++ b/src/prodos.mli.a @@ -9,7 +9,6 @@ ; - SaveFile ; - SetPrefix ; - GetFileInfo -; - QuitToProDOS ; ; MLI command codes @@ -390,14 +389,6 @@ _setprefix ldy #PC_SETPREFIX jmp mli -QuitUnless128KAnd65C02 - lda MACHID - and #$30 - cmp #$30 ; 128K? - bne QuitToProDOS -+ inc ; 65C02-only INC instruction will clear Z flag - bne mliexit ; if Z flag is clear, this is a 65C02 (good) - ; if Z flag is set, this is not a 65C02 (bad) and execution falls through here QuitToProDOS lda #CMD_QUIT ldy #PC_QUIT