Change firmware to wait for RPi ready

This commit is contained in:
Terence Boldt 2021-06-01 00:37:38 +00:00
parent 0d6a4bf78a
commit 460440ea42
6 changed files with 97 additions and 71 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
*.o
*.DS_Store
RaspberryPi/apple2driver/apple2driver
RaspberryPi/Apple2-IO-RPi.log

Binary file not shown.

Binary file not shown.

View File

@ -55,12 +55,28 @@ Start:
ldy #$00
PrintString:
lda Text,y
beq GetChar
beq WaitForRPi
ora #$80
jsr $fded
iny
bne PrintString
WaitForRPi:
lda InputFlags
rol
bcs OK
lda #$ff
jsr $fca8
lda #$ae
jsr $fded
jmp WaitForRPi
OK:
lda #$cf
jsr $fded
lda #$cb
jsr $fded
GetChar:
jsr $fd0c
sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"

View File

@ -58,81 +58,90 @@ Current file: MenuFirmware.asm
00C721 1 20 58 FC jsr $fc58 ;clear screen and show menu options
00C724 1 A0 00 ldy #$00
00C726 1 PrintString:
00C726 1 B9 42 C7 lda Text,y
00C729 1 F0 08 beq GetChar
00C726 1 B9 5F C7 lda Text,y
00C729 1 F0 08 beq WaitForRPi
00C72B 1 09 80 ora #$80
00C72D 1 20 ED FD jsr $fded
00C730 1 C8 iny
00C731 1 D0 F3 bne PrintString
00C733 1
00C733 1 GetChar:
00C733 1 20 0C FD jsr $fd0c
00C736 1 38 sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
00C737 1 E9 B1 sbc #$b1
00C739 1 0A asl ;put in top nibble as EPROM page
00C73A 1 0A asl
00C73B 1 0A asl
00C73C 1 0A asl
00C73D 1 09 0F ora #$0f ;set all flags high
00C73F 1 4C 0E C7 jmp PageJump
00C742 1
00C742 1 Text:
00C742 1
00C742 1 41 70 70 6C .byte "Apple2-IO-RPi",$8d
00C746 1 65 32 2D 49
00C74A 1 4F 2D 52 50
00C74E 1 69 8D
00C750 1 28 63 29 32 .byte "(c)2020-2021 Terence J. Boldt",$8d
00C754 1 30 32 30 2D
00C758 1 32 30 32 31
00C75C 1 20 54 65 72
00C760 1 65 6E 63 65
00C764 1 20 4A 2E 20
00C768 1 42 6F 6C 64
00C76C 1 74 8D
00C76E 1 8D .byte $8d
00C76F 1 31 2E 20 42 .byte "1. Boot",$8d
00C773 1 6F 6F 74 8D
00C777 1 32 2E 20 43 .byte "2. Command Line",$8d
00C77B 1 6F 6D 6D 61
00C77F 1 6E 64 20 4C
00C783 1 69 6E 65 8D
00C787 1 33 2E 20 4C .byte "3. Load File",$8d
00C78B 1 6F 61 64 20
00C78F 1 46 69 6C 65
00C793 1 8D
00C794 1 8D .byte $8d
00C795 1 4D 61 79 20 .byte "May take 45 seconds for RPi to start",$8d
00C799 1 74 61 6B 65
00C79D 1 20 34 35 20
00C7A1 1 73 65 63 6F
00C7A5 1 6E 64 73 20
00C7A9 1 66 6F 72 20
00C7AD 1 52 50 69 20
00C7B1 1 74 6F 20 73
00C7B5 1 74 61 72 74
00C7B9 1 8D
00C7BA 1 61 66 74 65 .byte "after intial power-on...",$00
00C7BE 1 72 20 69 6E
00C7C2 1 74 69 61 6C
00C7C6 1 20 70 6F 77
00C7CA 1 65 72 2D 6F
00C7CE 1 6E 2E 2E 2E
00C7D2 1 00
00C7D3 1
00C7D3 1 end:
00C7D3 1 60 rts
00C7D4 1
00C7D4 1 00 00 00 00 .repeat 251-<end
00C7D8 1 00 00 00 00
00C7DC 1 00 00 00 00
00C7E0 1 00 00 00 00
00C7E4 1 00 00 00 00
00C7E8 1 00 00 00 00
00C7EC 1 00 00 00 00
00C7F0 1 00 00 00 00
00C7F4 1 00 00 00 00
00C7F8 1 00 00 00 00
00C733 1 WaitForRPi:
00C733 1 AD FB C0 lda InputFlags
00C736 1 2A rol
00C737 1 B0 0D bcs OK
00C739 1 A9 FF lda #$ff
00C73B 1 20 A8 FC jsr $fca8
00C73E 1 A9 AE lda #$ae
00C740 1 20 ED FD jsr $fded
00C743 1 4C 33 C7 jmp WaitForRPi
00C746 1
00C746 1 OK:
00C746 1 A9 CF lda #$cf
00C748 1 20 ED FD jsr $fded
00C74B 1 A9 CB lda #$cb
00C74D 1 20 ED FD jsr $fded
00C750 1
00C750 1 GetChar:
00C750 1 20 0C FD jsr $fd0c
00C753 1 38 sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
00C754 1 E9 B1 sbc #$b1
00C756 1 0A asl ;put in top nibble as EPROM page
00C757 1 0A asl
00C758 1 0A asl
00C759 1 0A asl
00C75A 1 09 0F ora #$0f ;set all flags high
00C75C 1 4C 0E C7 jmp PageJump
00C75F 1
00C75F 1 Text:
00C75F 1
00C75F 1 41 70 70 6C .byte "Apple2-IO-RPi",$8d
00C763 1 65 32 2D 49
00C767 1 4F 2D 52 50
00C76B 1 69 8D
00C76D 1 28 63 29 32 .byte "(c)2020-2021 Terence J. Boldt",$8d
00C771 1 30 32 30 2D
00C775 1 32 30 32 31
00C779 1 20 54 65 72
00C77D 1 65 6E 63 65
00C781 1 20 4A 2E 20
00C785 1 42 6F 6C 64
00C789 1 74 8D
00C78B 1 8D .byte $8d
00C78C 1 31 2E 20 42 .byte "1. Boot",$8d
00C790 1 6F 6F 74 8D
00C794 1 32 2E 20 43 .byte "2. Command Line",$8d
00C798 1 6F 6D 6D 61
00C79C 1 6E 64 20 4C
00C7A0 1 69 6E 65 8D
00C7A4 1 33 2E 20 4C .byte "3. Load File",$8d
00C7A8 1 6F 61 64 20
00C7AC 1 46 69 6C 65
00C7B0 1 8D
00C7B1 1 8D .byte $8d
00C7B2 1 4D 61 79 20 .byte "May take 45 seconds for RPi to start",$8d
00C7B6 1 74 61 6B 65
00C7BA 1 20 34 35 20
00C7BE 1 73 65 63 6F
00C7C2 1 6E 64 73 20
00C7C6 1 66 6F 72 20
00C7CA 1 52 50 69 20
00C7CE 1 74 6F 20 73
00C7D2 1 74 61 72 74
00C7D6 1 8D
00C7D7 1 61 66 74 65 .byte "after intial power-on...",$00
00C7DB 1 72 20 69 6E
00C7DF 1 74 69 61 6C
00C7E3 1 20 70 6F 77
00C7E7 1 65 72 2D 6F
00C7EB 1 6E 2E 2E 2E
00C7EF 1 00
00C7F0 1
00C7F0 1 end:
00C7F0 1 60 rts
00C7F1 1
00C7F1 1 00 00 00 00 .repeat 251-<end
00C7F5 1 00 00 00 00
00C7F9 1 00 00 00
00C7FC 1 .byte 0
00C7FC 1 .endrepeat
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status

Binary file not shown.