Post by moodswing on Jan 6, 2009 19:37:27 GMT -5
I was curious how the uIEC would work with multiple Infocom disk sides. I made d64 images of Sherlock Holmes: The Riddle of the Crown Jewels. Side one I renamed as "a.d64", side two as "b.d64", and I copied "b.d64" as "c.d64" to have a place to save games.
Then I redirected the C64 keyboard decode vector with the following:
Note that the above underscore is supposed to be the Commodore backarrow ←.
Device 8 is hard-coded throughout the game, so rather than fix their code, it is easier to switch the uIEC to device 8. I found I could send a @"u0>H" command to do this, where H is a control-H. You can also leave off the trailing quote from the JiffyDOS command.
In the game, press control-2 to automatically switch to image "b.d64" and likewise, control-1 for image "a.d64" and control-3 for image "c.d64".
Then I redirected the C64 keyboard decode vector with the following:
device = $ba
lastKey = $c5
thisKey = $cb
firstKeyDelay = $028c
shiftFlag = $028d
org $380
sei
lda #<decode
sta $028f
lda #>decode
sta $0290
cli
rts
decode
lda shiftFlag
cmp #4
bne oldDecode
ldy thisKey
cpy lastKey
beq oldDecode
lda ($f5),y
cmp #'1'
bcc oldDecode
cmp #'9'+1
bcs oldDecode
dec $d020
sty lastKey
ldy #30
sty firstKeyDelay
; clc
adc #'a'-'1'
sta data1+2
lda #3
ldx #<data2
ldy #>data2
jsr sub0
ldx #11
g0 lda $d012
bpl g0
g1 lda $d012
bmi g1
dex
bne g0
changeDir
lda #7
ldx #<data1
ldy #>data1
jsr sub0
inc $d020
exitIrq
jmp $eb42
oldDecode
jmp $eb48
sub0
jsr $ffbd
lda #1
ldx device
ldy #15
jsr $ffba
jsr $ffc0
lda #1
jsr $ffc3
jmp $ffcc
data1
byt "cda.d64"
data2
byt "cd_"
Note that the above underscore is supposed to be the Commodore backarrow ←.
Device 8 is hard-coded throughout the game, so rather than fix their code, it is easier to switch the uIEC to device 8. I found I could send a @"u0>H" command to do this, where H is a control-H. You can also leave off the trailing quote from the JiffyDOS command.
In the game, press control-2 to automatically switch to image "b.d64" and likewise, control-1 for image "a.d64" and control-3 for image "c.d64".