| |
lA-sTYLe
Registered: Sep 2003 Posts: 63 |
Sending Floppy Init doesnt work as expected
I try to send "UI" with Doscommand and afterwards read the errorchannel to get to Rom and Versionstring from a Drive.
Like in Jiffydos or Retroreplay with
@ui
@
Reading the errorchannel works fine but sennding the "UI" with the following code (just the send drivecommand) doesnt respond as expected.
!to "doscmd.prg",cbm
*=$1000
lda#$0f ;open 15,8,15
ldx#$08
ldy#$0f
jsr $ffba
lda #$02
ldx#<(init)
ldy#>(init)
jsr$ffbd
jsr$ffc0
lda#$0f ;close 15
jsr$ffc3
rts
init !byte 85,73
I know about the Drivedetection routine available at codebase but this one doesnt work on Drives like xd2031, thats the Reason why i want to get the Drivestring.
Is there a better solution ? |
|
| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
init !byte 85,73
should be
init !byte $55, $49
Edit:
I had not noticed that your values are decimal... Doh!
BTW, your code works on Vice with 1541 and TDE.
Where don't works for you? |
| |
soci
Registered: Sep 2003 Posts: 480 |
When you close the error channel it's just telling you that closing of all channels went fine without an error "00, OK...". It would be a good idea to read the result first. |
| |
lA-sTYLe
Registered: Sep 2003 Posts: 63 |
thx soci, that was the correct hint, reading the errorchannel before closing does exactly what i was looking for.just incase someone might need that sometime....
lda#$0f
ldx#$08
ldy#$0f
jsr $ffba
lda #$02
ldx#<(init)
ldy#>(init)
jsr$ffbd
jsr$ffc0
LDX #$0F
JSR $FFC6
.loop JSR $FFB7
BNE .eof
JSR $FFCF
JSR $FFD2
JMP .loop
.eof lda#$0f
jsr$ffc3
rts
init !byte 85,73 ;($55, $49) |