Fix firmware missing x

This commit is contained in:
Terence Boldt 2021-01-16 17:12:17 -05:00
parent 278425d8d3
commit 7602dae70a
5 changed files with 11 additions and 13 deletions

View File

@ -1,4 +1,4 @@
ca65 V2.19 - Git 59c58ac
ca65 V2.19 - Git 59c58acb
Main file : Driver.asm
Current file: Driver.asm

View File

@ -11,7 +11,6 @@ IOError = $27
NoDevice = $28
WriteProtect = $2B
SlotDrive = $50
InputByte = $c08e
OutputByte = $c08d
InputFlags = $c08b
@ -52,15 +51,6 @@ Boot:
sta BufferHi
jsr Driver ;get the block
; lda #$00 ;block 1
; sta BlockLo
; sta BlockHi
; sta BufferLo ;buffer at $A00
; lda #$0A
; sta BufferHi
; jsr Driver ;get the block
; ldx #sdrive ;set up for slot n
jmp $801 ;execute the block
;;
@ -170,7 +160,7 @@ waitRead:
lda InputFlags,x
rol
bcs waitRead
lda InputByte
lda InputByte,x
pha
lda #$0f ;set all flags high
sta OutputFlags,x

Binary file not shown.

Binary file not shown.

View File

@ -103,7 +103,12 @@ func handleReadBlockCommand(file *os.File) {
file.ReadAt(buffer, int64(block)*512)
//dumpBlock(buffer)
readBlock(buffer)
err := readBlock(buffer)
if err == nil {
fmt.Printf("Read block completed\n")
} else {
fmt.Printf("Failed to read block\n")
}
}
func handleWriteBlockCommand(file *os.File) {
@ -119,6 +124,7 @@ func handleWriteBlockCommand(file *os.File) {
writeBlock(buffer)
file.WriteAt(buffer, int64(block)*512)
file.Sync()
fmt.Printf("Write block completed\n")
}
func handleExecCommand() {
@ -142,6 +148,7 @@ func handleExecCommand() {
}
func handleGetTimeCommand() {
fmt.Printf("Sending date/time...\n")
/* 49041 ($BF91) 49040 ($BF90)
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
@ -173,6 +180,7 @@ func handleGetTimeCommand() {
writeByte(bf91)
writeByte(bf92)
writeByte(bf93)
fmt.Printf("Send time complete\n")
}
func readBlock(buffer []byte) error {