mirror of
https://github.com/a2-4am/pitch-dark.git
synced 2024-09-27 19:57:56 +00:00
set interpreter options, but force 80 columns for hints
This commit is contained in:
parent
e541eaea93
commit
fe4cb466d5
@ -272,6 +272,7 @@ callback_clues
|
|||||||
jsr SetStartupPath
|
jsr SetStartupPath
|
||||||
; shutdown WeeGUI and transfer control to interpreter
|
; shutdown WeeGUI and transfer control to interpreter
|
||||||
jsr ExitWeeGUI
|
jsr ExitWeeGUI
|
||||||
|
jsr SetInterpreterOptionsExceptForce40
|
||||||
jmp kSystemAddress
|
jmp kSystemAddress
|
||||||
.cluesError
|
.cluesError
|
||||||
jmp SoftBell
|
jmp SoftBell
|
||||||
|
94
src/launch.a
94
src/launch.a
@ -4,47 +4,22 @@
|
|||||||
; load and launch the On Beyond Z-Machine! interpreter
|
; load and launch the On Beyond Z-Machine! interpreter
|
||||||
;
|
;
|
||||||
; Public functions
|
; Public functions
|
||||||
|
; - ClearInterpreterOptions
|
||||||
|
; - SetInterpreterOptions
|
||||||
|
; - SetInterpreterOptionsExceptForce40
|
||||||
|
; - LoadInterpreter
|
||||||
; - LaunchInterpreter
|
; - LaunchInterpreter
|
||||||
;
|
;
|
||||||
.playError
|
|
||||||
jmp SoftBell
|
|
||||||
LaunchInterpreter
|
|
||||||
jsr SaveGlobalPreferences
|
|
||||||
jsr LoadInterpreter
|
|
||||||
bcs .playError
|
|
||||||
|
|
||||||
; change prefix to folder of file we want the interpreter to open
|
ClearInterpreterOptions
|
||||||
jsr ResetPath
|
ldy #6
|
||||||
lda #<kGameRootDirectory
|
lda #0
|
||||||
ldy #>kGameRootDirectory
|
- sta $0300,y
|
||||||
jsr AddToPath
|
dey
|
||||||
|
bpl -
|
||||||
|
rts
|
||||||
|
|
||||||
jsr okvs_get
|
SetInterpreterOptions
|
||||||
!word gPrefsStore
|
|
||||||
!word kLastPlayed
|
|
||||||
jsr AddToPath
|
|
||||||
|
|
||||||
jsr SetPrefix
|
|
||||||
!word gPathname
|
|
||||||
bcs .playError
|
|
||||||
|
|
||||||
; put just the filename at $2006
|
|
||||||
ldy #0
|
|
||||||
lda addrVersions
|
|
||||||
sta $00
|
|
||||||
lda addrVersions+1
|
|
||||||
sta $01
|
|
||||||
- lda ($00),y
|
|
||||||
cmp #$BD ; '='
|
|
||||||
beq .doneBuildingFilename
|
|
||||||
iny
|
|
||||||
and #$7F
|
|
||||||
sta $2006,y
|
|
||||||
bra -
|
|
||||||
.doneBuildingFilename
|
|
||||||
sty $2006
|
|
||||||
|
|
||||||
; set options struct at $0300
|
|
||||||
jsr okvs_get
|
jsr okvs_get
|
||||||
!word gPrefsStore
|
!word gPrefsStore
|
||||||
!word kForce40
|
!word kForce40
|
||||||
@ -52,9 +27,10 @@ LaunchInterpreter
|
|||||||
beq +
|
beq +
|
||||||
lda #$CE
|
lda #$CE
|
||||||
!byte $2C
|
!byte $2C
|
||||||
+ lda #$D9
|
+
|
||||||
|
SetInterpreterOptionsExceptForce40
|
||||||
|
lda #$D9
|
||||||
sta $0300 ; 40/80 columns
|
sta $0300 ; 40/80 columns
|
||||||
|
|
||||||
jsr okvs_get
|
jsr okvs_get
|
||||||
!word gPrefsStore
|
!word gPrefsStore
|
||||||
!word kForceUpper
|
!word kForceUpper
|
||||||
@ -99,9 +75,49 @@ LaunchInterpreter
|
|||||||
eor $0304
|
eor $0304
|
||||||
eor $0305
|
eor $0305
|
||||||
sta $0306
|
sta $0306
|
||||||
|
rts
|
||||||
|
|
||||||
|
.playError
|
||||||
|
jmp SoftBell
|
||||||
|
LaunchInterpreter
|
||||||
|
jsr SaveGlobalPreferences
|
||||||
|
jsr LoadInterpreter
|
||||||
|
bcs .playError
|
||||||
|
|
||||||
|
; change prefix to folder of file we want the interpreter to open
|
||||||
|
jsr ResetPath
|
||||||
|
lda #<kGameRootDirectory
|
||||||
|
ldy #>kGameRootDirectory
|
||||||
|
jsr AddToPath
|
||||||
|
|
||||||
|
jsr okvs_get
|
||||||
|
!word gPrefsStore
|
||||||
|
!word kLastPlayed
|
||||||
|
jsr AddToPath
|
||||||
|
|
||||||
|
jsr SetPrefix
|
||||||
|
!word gPathname
|
||||||
|
bcs .playError
|
||||||
|
|
||||||
|
; put just the filename at $2006
|
||||||
|
ldy #0
|
||||||
|
lda addrVersions
|
||||||
|
sta $00
|
||||||
|
lda addrVersions+1
|
||||||
|
sta $01
|
||||||
|
- lda ($00),y
|
||||||
|
cmp #$BD ; '='
|
||||||
|
beq .doneBuildingFilename
|
||||||
|
iny
|
||||||
|
and #$7F
|
||||||
|
sta $2006,y
|
||||||
|
bra -
|
||||||
|
.doneBuildingFilename
|
||||||
|
sty $2006
|
||||||
|
|
||||||
; shut down WeeGUI and transfer control to interpreter
|
; shut down WeeGUI and transfer control to interpreter
|
||||||
jsr ExitWeeGUI
|
jsr ExitWeeGUI
|
||||||
|
jsr SetInterpreterOptions
|
||||||
jmp kSystemAddress
|
jmp kSystemAddress
|
||||||
|
|
||||||
LoadInterpreter
|
LoadInterpreter
|
||||||
|
@ -39,23 +39,19 @@ Start
|
|||||||
+ inc ; 65C02-only INC instruction will clear Z flag
|
+ inc ; 65C02-only INC instruction will clear Z flag
|
||||||
beq - ; if Z flag is still set, this is not a 65C02
|
beq - ; if Z flag is still set, this is not a 65C02
|
||||||
|
|
||||||
jsr DisconnectRAM32 ; disconnect /RAM in S3,D2 so we can use DHGR
|
|
||||||
bit $C010 ; clear keyboard strobe
|
|
||||||
|
|
||||||
jsr LoadFile ; load WEEGUI binary at $4000
|
jsr LoadFile ; load WEEGUI binary at $4000
|
||||||
!word .weeguiFilename
|
!word .weeguiFilename
|
||||||
!word WGInit
|
!word WGInit
|
||||||
!word $2000
|
!word $2000
|
||||||
!word kProDOSFileBuffer
|
!word kProDOSFileBuffer
|
||||||
|
|
||||||
|
jsr DisconnectRAM32 ; disconnect /RAM in S3,D2
|
||||||
|
jsr ClearInterpreterOptions ; clear options struct at $300
|
||||||
jsr WGInit ; initialize WeeGUI
|
jsr WGInit ; initialize WeeGUI
|
||||||
|
|
||||||
jsr LoadGlobalPreferences ; get current game
|
jsr LoadGlobalPreferences ; get current game
|
||||||
jsr LoadGameInfo ; load and parse game description text
|
jsr LoadGameInfo ; load and parse game description text
|
||||||
|
|
||||||
ldx #WGEnableMouse ; enable mouse support
|
ldx #WGEnableMouse ; enable mouse support
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
|
|
||||||
MainScreen
|
MainScreen
|
||||||
ldx #$FF
|
ldx #$FF
|
||||||
txs
|
txs
|
||||||
@ -65,6 +61,7 @@ MainScreen
|
|||||||
ldx #WGClearScreen ; clear screen
|
ldx #WGClearScreen ; clear screen
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
jsr PaintAllViews ; draw all UI elements
|
jsr PaintAllViews ; draw all UI elements
|
||||||
|
bit $C010 ; clear keyboard strobe
|
||||||
.runLoop
|
.runLoop
|
||||||
ldx #WGPendingViewAction
|
ldx #WGPendingViewAction
|
||||||
jsr WeeGUI
|
jsr WeeGUI
|
||||||
|
Loading…
Reference in New Issue
Block a user