diff --git a/Apple2/CommandFirmware.lst b/Apple2/CommandFirmware.lst index 519fd43..ded1c5d 100644 --- a/Apple2/CommandFirmware.lst +++ b/Apple2/CommandFirmware.lst @@ -1,7 +1,14 @@ -ca65 V2.17 - Raspbian 2.17-1 +ca65 V2.18 - N/A Main file : CommandFirmware.asm Current file: CommandFirmware.asm +000000r 1 ; Copyright Terence J. Boldt (c)2020-2022 +000000r 1 ; Use of this source code is governed by an MIT +000000r 1 ; license that can be found in the LICENSE file. +000000r 1 +000000r 1 ; This file contains the source for the firmware +000000r 1 ; that was formerly used to act as a pseudo-shell +000000r 1 000000r 1 ;ProDOS Zero Page 000000r 1 Command = $42 ;ProDOS Command 000000r 1 Unit = $43 ;ProDOS unit (SDDD0000) diff --git a/Apple2/DriveFirmware.lst b/Apple2/DriveFirmware.lst index 6991f1f..a734841 100644 --- a/Apple2/DriveFirmware.lst +++ b/Apple2/DriveFirmware.lst @@ -1,7 +1,16 @@ -ca65 V2.17 - Raspbian 2.17-1 +ca65 V2.18 - N/A Main file : DriveFirmware.asm Current file: DriveFirmware.asm +000000r 1 ; Copyright Terence J. Boldt (c)2020-2022 +000000r 1 ; Use of this source code is governed by an MIT +000000r 1 ; license that can be found in the LICENSE file. +000000r 1 +000000r 1 ; This file contains the source for the firmware +000000r 1 ; that allows the Apple II to boot from the card +000000r 1 ; and for ProDOS to recognize the card as two +000000r 1 ; hard drivers +000000r 1 000000r 1 ;ProDOS Zero Page 000000r 1 Command = $42 ;ProDOS Command 000000r 1 Unit = $43 ;ProDOS unit (SDDD0000) diff --git a/Apple2/FileAccessFirmware.lst b/Apple2/FileAccessFirmware.lst index 9b31632..79facb7 100644 --- a/Apple2/FileAccessFirmware.lst +++ b/Apple2/FileAccessFirmware.lst @@ -1,7 +1,15 @@ -ca65 V2.17 - Raspbian 2.17-1 +ca65 V2.18 - N/A Main file : FileAccessFirmware.asm Current file: FileAccessFirmware.asm +000000r 1 ; Copyright Terence J. Boldt (c)2020-2022 +000000r 1 ; Use of this source code is governed by an MIT +000000r 1 ; license that can be found in the LICENSE file. +000000r 1 +000000r 1 ; This file contains the source for the firmware +000000r 1 ; that was formerly used to copy files from RPi +000000r 1 ; to Apple II RAM +000000r 1 000000r 1 ;ProDOS Zero Page 000000r 1 Command = $42 ;ProDOS Command 000000r 1 Unit = $43 ;ProDOS unit (SDDD0000) diff --git a/Apple2/MenuFirmware.lst b/Apple2/MenuFirmware.lst index 77276fa..22ee23f 100644 --- a/Apple2/MenuFirmware.lst +++ b/Apple2/MenuFirmware.lst @@ -1,7 +1,16 @@ -ca65 V2.17 - Raspbian 2.17-1 +ca65 V2.18 - N/A Main file : MenuFirmware.asm Current file: MenuFirmware.asm +000000r 1 ; Copyright Terence J. Boldt (c)2020-2022 +000000r 1 ; Use of this source code is governed by an MIT +000000r 1 ; license that can be found in the LICENSE file. +000000r 1 +000000r 1 ; This file contains the source for the firmware +000000r 1 ; that displays the copyright message on boot +000000r 1 ; and checks for the RPi status to be ready before +000000r 1 ; attempting to boot +000000r 1 000000r 1 ;ProDOS Zero Page 000000r 1 Command = $42 ;ProDOS Command 000000r 1 Unit = $43 ;ProDOS unit (SDDD0000) diff --git a/Apple2/RPi.Command.asm b/Apple2/RPi.Command.asm index 47e4962..3be5270 100644 --- a/Apple2/RPi.Command.asm +++ b/Apple2/RPi.Command.asm @@ -17,10 +17,10 @@ XLEN = $BE52 ;length of command string-1. XCNUM = $BE53 ;CI cmd no. (ext cmd - 0). PBITS = $BE54 ;Command parameter bits. XRETURN = $FF58 ;Known RTS instruction. -InputByte = $c0fe -OutputByte = $c0fd -InputFlags = $c0fb -OutputFlags = $c0f7 +InputByte = $c08e +OutputByte = $c08d +InputFlags = $c08b +OutputFlags = $c087 ReadBlockCommand = $01 WriteBlockCommand = $02 @@ -37,6 +37,62 @@ Keyboard = $c000 ClearKeyboard = $c010 Wait = $fca8 +LastChar = $06 +SlotL = $fe +SlotH = $ff +ESC = $9b + + .org $2000 + ldx #$07 ; start at slot 7 +DetectSlot: + ldy #$00 + lda #$fc + sta SlotL + txa + ora #$c0 + sta SlotH + lda (SlotL),y + bne nextSlot + iny + lda (SlotL),y + bne nextSlot + iny + lda (SlotL),y + cmp #$17 + bne nextSlot + iny + lda (SlotL),y + cmp #$14 + bne nextSlot + txa + asl + asl + asl + asl + tax + clc + bcc Start +nextSlot: + dex + bne DetectSlot + rts +Start: + stx slotx + $1e01 ;set the slot for the driver + ldx #$00 +copyDriver: + lda $2100,x + sta $0300,x + inx + cpx #$e6 + bne copyDriver +end: + jmp $0300 + +.repeat 253-