mirror of
https://github.com/tjboldt/Apple2-IO-RPi.git
synced 2024-12-23 08:30:02 +00:00
Update listings to show all bytes
This commit is contained in:
parent
0919e1702d
commit
bc69627bb4
@ -29,111 +29,134 @@ Current file: CommandFirmware.asm
|
||||
000000r 1 SaveFileCommand = $07
|
||||
000000r 1
|
||||
000000r 1 .org SLOT*$100 + $C000
|
||||
00C500 1 ;ID bytes for booting and drive detection
|
||||
00C500 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C502 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C504 1 E0 03 cpx #$03 ;
|
||||
00C506 1
|
||||
00C506 1 A2 50 ldx #SLOT*$10
|
||||
00C508 1 86 2B stx $2b
|
||||
00C50A 1 86 43 stx Unit
|
||||
00C50C 1
|
||||
00C50C 1 ;force EPROM to second page on boot
|
||||
00C50C 1 A9 3F lda #$3f ;set all flags high and page 3 of EPROM for menu
|
||||
00C50E 1 PageJump:
|
||||
00C50E 1 8D D7 C0 sta OutputFlags
|
||||
00C511 1 4C 19 C5 jmp Start ;this jump is only called if coming in from PageJump with A=$2f
|
||||
00C514 1
|
||||
00C514 1 ;entry points for ProDOS
|
||||
00C514 1 DriverEntry:
|
||||
00C514 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C516 1 8D D7 C0 sta OutputFlags
|
||||
00C519 1
|
||||
00C519 1 Start:
|
||||
00C519 1 20 00 C3 jsr $c300 ;enable 80 columns
|
||||
00C51C 1 A5 33 lda $33
|
||||
00C51E 1 48 pha
|
||||
00C51F 1 A9 A4 lda #$a4
|
||||
00C521 1 85 33 sta $33
|
||||
00C523 1 GetCommand:
|
||||
00C523 1 20 67 FD jsr $fd67
|
||||
00C526 1 AD 00 02 lda $0200
|
||||
00C529 1 C9 8D cmp #$8d ;skip when return found
|
||||
00C52B 1 F0 F6 beq GetCommand
|
||||
00C52D 1 20 33 C5 jsr DumpOutput
|
||||
00C530 1 18 clc
|
||||
00C531 1 90 F0 bcc GetCommand
|
||||
00C533 1
|
||||
00C533 1 DumpOutput:
|
||||
00C533 1 A9 05 lda #$05 ;send command 5 = exec
|
||||
00C535 1 20 5C C5 jsr SendByte
|
||||
00C538 1 A0 00 ldy #$00
|
||||
00C53A 1 getInput:
|
||||
00C53A 1 B9 00 02 lda $0200,y
|
||||
00C53D 1 C9 8D cmp #$8d
|
||||
00C53F 1 F0 08 beq sendNullTerminator
|
||||
00C541 1 29 7F and #$7f
|
||||
00C543 1 20 5C C5 jsr SendByte
|
||||
00C546 1 C8 iny
|
||||
00C547 1 D0 F1 bne getInput
|
||||
00C549 1 sendNullTerminator:
|
||||
00C549 1 A9 00 lda #$00
|
||||
00C54B 1 20 5C C5 jsr SendByte
|
||||
00C54E 1 getOutput:
|
||||
00C54E 1 20 7A C5 jsr GetByte
|
||||
00C551 1 C9 00 cmp #$00
|
||||
00C553 1 F0 06 beq endOutput
|
||||
00C555 1 20 ED FD jsr $fded
|
||||
00C558 1 18 clc
|
||||
00C559 1 90 F3 bcc getOutput
|
||||
00C55B 1 endOutput:
|
||||
00C55B 1 60 rts
|
||||
00C55C 1
|
||||
00C55C 1 SendByte:
|
||||
00C55C 1 48 pha
|
||||
00C55D 1 waitWrite:
|
||||
00C55D 1 AD DB C0 lda InputFlags
|
||||
00C560 1 2A rol
|
||||
00C561 1 2A rol
|
||||
00C562 1 B0 F9 bcs waitWrite
|
||||
00C564 1 68 pla
|
||||
00C565 1 8D DD C0 sta OutputByte
|
||||
00C568 1 A9 1E lda #$1e ; set bit 0 low to indicate write started
|
||||
00C56A 1 8D D7 C0 sta OutputFlags
|
||||
00C56D 1 finishWrite:
|
||||
00C56D 1 AD DB C0 lda InputFlags
|
||||
00C570 1 2A rol
|
||||
00C571 1 2A rol
|
||||
00C572 1 90 F9 bcc finishWrite
|
||||
00C574 1 A9 1F lda #$1f
|
||||
00C576 1 8D D7 C0 sta OutputFlags
|
||||
00C579 1 60 rts
|
||||
00C57A 1
|
||||
00C57A 1 GetByte:
|
||||
00C57A 1 A9 1D lda #$1d ;set read flag low
|
||||
00C57C 1 8D D7 C0 sta OutputFlags
|
||||
00C57F 1 waitRead:
|
||||
00C57F 1 AD DB C0 lda InputFlags
|
||||
00C582 1 2A rol
|
||||
00C583 1 B0 FA bcs waitRead
|
||||
00C585 1 AD DE C0 lda InputByte
|
||||
00C588 1 48 pha
|
||||
00C589 1 A9 1F lda #$1f ;set all flags high
|
||||
00C58B 1 8D D7 C0 sta OutputFlags
|
||||
00C58E 1 finishRead:
|
||||
00C58E 1 AD DB C0 lda InputFlags
|
||||
00C591 1 2A rol
|
||||
00C592 1 90 FA bcc finishRead
|
||||
00C594 1 68 pla
|
||||
00C595 1 end:
|
||||
00C595 1 60 rts
|
||||
00C596 1
|
||||
00C596 1 00 00 00 00 .repeat 251-<end
|
||||
00C59A 1 00 00 00 00
|
||||
00C59E 1 00 00 00 00
|
||||
00C5FC 1 .byte 0
|
||||
00C5FC 1 .endrepeat
|
||||
00C5FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C5FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C5FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C5FF 1
|
||||
00C700 1 ;ID bytes for booting and drive detection
|
||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C702 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C704 1 E0 03 cpx #$03 ;
|
||||
00C706 1
|
||||
00C706 1 A2 70 ldx #SLOT*$10
|
||||
00C708 1 86 2B stx $2b
|
||||
00C70A 1 86 43 stx Unit
|
||||
00C70C 1
|
||||
00C70C 1 ;force EPROM to second page on boot
|
||||
00C70C 1 A9 3F lda #$3f ;set all flags high and page 3 of EPROM for menu
|
||||
00C70E 1 PageJump:
|
||||
00C70E 1 8D F7 C0 sta OutputFlags
|
||||
00C711 1 4C 19 C7 jmp Start ;this jump is only called if coming in from PageJump with A=$2f
|
||||
00C714 1
|
||||
00C714 1 ;entry points for ProDOS
|
||||
00C714 1 DriverEntry:
|
||||
00C714 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C716 1 8D F7 C0 sta OutputFlags
|
||||
00C719 1
|
||||
00C719 1 Start:
|
||||
00C719 1 20 00 C3 jsr $c300 ;enable 80 columns
|
||||
00C71C 1 A5 33 lda $33
|
||||
00C71E 1 48 pha
|
||||
00C71F 1 A9 A4 lda #$a4
|
||||
00C721 1 85 33 sta $33
|
||||
00C723 1 GetCommand:
|
||||
00C723 1 20 67 FD jsr $fd67
|
||||
00C726 1 AD 00 02 lda $0200
|
||||
00C729 1 C9 8D cmp #$8d ;skip when return found
|
||||
00C72B 1 F0 F6 beq GetCommand
|
||||
00C72D 1 20 33 C7 jsr DumpOutput
|
||||
00C730 1 18 clc
|
||||
00C731 1 90 F0 bcc GetCommand
|
||||
00C733 1
|
||||
00C733 1 DumpOutput:
|
||||
00C733 1 A9 05 lda #$05 ;send command 5 = exec
|
||||
00C735 1 20 5C C7 jsr SendByte
|
||||
00C738 1 A0 00 ldy #$00
|
||||
00C73A 1 getInput:
|
||||
00C73A 1 B9 00 02 lda $0200,y
|
||||
00C73D 1 C9 8D cmp #$8d
|
||||
00C73F 1 F0 08 beq sendNullTerminator
|
||||
00C741 1 29 7F and #$7f
|
||||
00C743 1 20 5C C7 jsr SendByte
|
||||
00C746 1 C8 iny
|
||||
00C747 1 D0 F1 bne getInput
|
||||
00C749 1 sendNullTerminator:
|
||||
00C749 1 A9 00 lda #$00
|
||||
00C74B 1 20 5C C7 jsr SendByte
|
||||
00C74E 1 getOutput:
|
||||
00C74E 1 20 7A C7 jsr GetByte
|
||||
00C751 1 C9 00 cmp #$00
|
||||
00C753 1 F0 06 beq endOutput
|
||||
00C755 1 20 ED FD jsr $fded
|
||||
00C758 1 18 clc
|
||||
00C759 1 90 F3 bcc getOutput
|
||||
00C75B 1 endOutput:
|
||||
00C75B 1 60 rts
|
||||
00C75C 1
|
||||
00C75C 1 SendByte:
|
||||
00C75C 1 48 pha
|
||||
00C75D 1 waitWrite:
|
||||
00C75D 1 AD FB C0 lda InputFlags
|
||||
00C760 1 2A rol
|
||||
00C761 1 2A rol
|
||||
00C762 1 B0 F9 bcs waitWrite
|
||||
00C764 1 68 pla
|
||||
00C765 1 8D FD C0 sta OutputByte
|
||||
00C768 1 A9 1E lda #$1e ; set bit 0 low to indicate write started
|
||||
00C76A 1 8D F7 C0 sta OutputFlags
|
||||
00C76D 1 finishWrite:
|
||||
00C76D 1 AD FB C0 lda InputFlags
|
||||
00C770 1 2A rol
|
||||
00C771 1 2A rol
|
||||
00C772 1 90 F9 bcc finishWrite
|
||||
00C774 1 A9 1F lda #$1f
|
||||
00C776 1 8D F7 C0 sta OutputFlags
|
||||
00C779 1 60 rts
|
||||
00C77A 1
|
||||
00C77A 1 GetByte:
|
||||
00C77A 1 A9 1D lda #$1d ;set read flag low
|
||||
00C77C 1 8D F7 C0 sta OutputFlags
|
||||
00C77F 1 waitRead:
|
||||
00C77F 1 AD FB C0 lda InputFlags
|
||||
00C782 1 2A rol
|
||||
00C783 1 B0 FA bcs waitRead
|
||||
00C785 1 AD FE C0 lda InputByte
|
||||
00C788 1 48 pha
|
||||
00C789 1 A9 1F lda #$1f ;set all flags high
|
||||
00C78B 1 8D F7 C0 sta OutputFlags
|
||||
00C78E 1 finishRead:
|
||||
00C78E 1 AD FB C0 lda InputFlags
|
||||
00C791 1 2A rol
|
||||
00C792 1 90 FA bcc finishRead
|
||||
00C794 1 68 pla
|
||||
00C795 1 end:
|
||||
00C795 1 60 rts
|
||||
00C796 1
|
||||
00C796 1 00 00 00 00 .repeat 251-<end
|
||||
00C79A 1 00 00 00 00
|
||||
00C79E 1 00 00 00 00
|
||||
00C7A2 1 00 00 00 00
|
||||
00C7A6 1 00 00 00 00
|
||||
00C7AA 1 00 00 00 00
|
||||
00C7AE 1 00 00 00 00
|
||||
00C7B2 1 00 00 00 00
|
||||
00C7B6 1 00 00 00 00
|
||||
00C7BA 1 00 00 00 00
|
||||
00C7BE 1 00 00 00 00
|
||||
00C7C2 1 00 00 00 00
|
||||
00C7C6 1 00 00 00 00
|
||||
00C7CA 1 00 00 00 00
|
||||
00C7CE 1 00 00 00 00
|
||||
00C7D2 1 00 00 00 00
|
||||
00C7D6 1 00 00 00 00
|
||||
00C7DA 1 00 00 00 00
|
||||
00C7DE 1 00 00 00 00
|
||||
00C7E2 1 00 00 00 00
|
||||
00C7E6 1 00 00 00 00
|
||||
00C7EA 1 00 00 00 00
|
||||
00C7EE 1 00 00 00 00
|
||||
00C7F2 1 00 00 00 00
|
||||
00C7F6 1 00 00 00 00
|
||||
00C7FA 1 00 00
|
||||
00C7FC 1 .byte 0
|
||||
00C7FC 1 .endrepeat
|
||||
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C7FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C7FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C7FF 1
|
||||
|
@ -29,167 +29,169 @@ Current file: DriveFirmware.asm
|
||||
000000r 1 SaveFileCommand = $07
|
||||
000000r 1
|
||||
000000r 1 .org SLOT*$100 + $C000
|
||||
00C500 1 ;ID bytes for booting and drive detection
|
||||
00C500 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C502 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C504 1 E0 03 cpx #$03 ;
|
||||
00C506 1
|
||||
00C506 1 A2 50 ldx #SLOT*$10
|
||||
00C508 1 86 2B stx $2b
|
||||
00C50A 1 86 43 stx Unit
|
||||
00C50C 1
|
||||
00C50C 1 ;force EPROM to second page on boot
|
||||
00C50C 1 A9 3F lda #$3f ;set all flags high and page 3 of EPROM for menu
|
||||
00C50E 1 PageJump:
|
||||
00C50E 1 8D D7 C0 sta OutputFlags
|
||||
00C511 1 4C 1C C5 jmp Start ;this jump is only called if coming in from PageJump with A=$0f
|
||||
00C514 1
|
||||
00C514 1 ;entry points for ProDOS
|
||||
00C514 1 DriverEntry:
|
||||
00C514 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C516 1 8D D7 C0 sta OutputFlags
|
||||
00C519 1 4C 32 C5 jmp Driver
|
||||
00C51C 1
|
||||
00C51C 1 ;load first two blocks and execute to boot
|
||||
00C51C 1 Start:
|
||||
00C51C 1 A9 01 lda #$01 ;set read command
|
||||
00C51E 1 85 42 sta Command
|
||||
00C520 1
|
||||
00C520 1 A9 00 lda #$00 ;block 0
|
||||
00C522 1 85 46 sta BlockLo
|
||||
00C524 1 85 47 sta BlockHi
|
||||
00C526 1 85 44 sta BufferLo ;buffer at $800
|
||||
00C528 1 A9 08 lda #$08
|
||||
00C52A 1 85 45 sta BufferHi
|
||||
00C52C 1 20 32 C5 jsr Driver ;get the block
|
||||
00C52F 1
|
||||
00C52F 1 4C 01 08 jmp $801 ;execute the block
|
||||
00C532 1
|
||||
00C532 1 ; ProDOS Driver code
|
||||
00C532 1 ; First check that this is the right drive
|
||||
00C532 1 Driver:
|
||||
00C532 1 A6 43 ldx Unit
|
||||
00C534 1 A5 42 lda Command; Check which command is being requested
|
||||
00C536 1 F0 0C beq GetStatus ;0 = Status command
|
||||
00C538 1 C9 01 cmp #ReadBlockCommand
|
||||
00C53A 1 F0 10 beq ReadBlock
|
||||
00C53C 1 C9 02 cmp #WriteBlockCommand
|
||||
00C53E 1 F0 46 beq WriteBlock
|
||||
00C540 1 38 sec ;set carry as we don't support any other commands
|
||||
00C541 1 A9 53 lda #$53 ;Invalid parameter error
|
||||
00C543 1 60 rts
|
||||
00C544 1
|
||||
00C544 1 ; ProDOS Status Command Handler
|
||||
00C544 1 GetStatus:
|
||||
00C544 1 A2 FF ldx #$ff ;low byte number of blocks
|
||||
00C546 1 A0 FF ldy #$ff ;high byte number of blocks
|
||||
00C548 1 A9 00 lda #$0 ;zero accumulator and clear carry for success
|
||||
00C54A 1 18 clc
|
||||
00C54B 1 60 rts
|
||||
00C54C 1
|
||||
00C54C 1 ; ProDOS Read Block Command
|
||||
00C54C 1 ReadBlock:
|
||||
00C54C 1 A0 00 ldy #$00 ;Get the current time on each block read for now
|
||||
00C54E 1 A9 03 lda #GetTimeCommand
|
||||
00C550 1 20 AE C5 jsr SendByte
|
||||
00C553 1 getTimeByte:
|
||||
00C553 1 20 CC C5 jsr GetByte
|
||||
00C556 1 99 90 BF sta $bf90,y
|
||||
00C559 1 C8 iny
|
||||
00C55A 1 C0 04 cpy #$04
|
||||
00C55C 1 D0 F5 bne getTimeByte
|
||||
00C55E 1 A9 01 lda #ReadBlockCommand ;read the block after setting the clock
|
||||
00C560 1 20 AE C5 jsr SendByte
|
||||
00C563 1 A5 46 lda BlockLo
|
||||
00C565 1 20 AE C5 jsr SendByte
|
||||
00C568 1 A5 47 lda BlockHi
|
||||
00C56A 1 20 AE C5 jsr SendByte
|
||||
00C56D 1 A0 00 ldy #$0
|
||||
00C56F 1 20 7D C5 jsr read256
|
||||
00C572 1 E6 45 inc BufferHi
|
||||
00C574 1 20 7D C5 jsr read256
|
||||
00C577 1 C6 45 dec BufferHi
|
||||
00C579 1 A9 00 lda #$0 ;zero accumulator and clear carry for success
|
||||
00C57B 1 18 clc
|
||||
00C57C 1 60 rts
|
||||
00C57D 1
|
||||
00C57D 1 read256:
|
||||
00C57D 1 20 CC C5 jsr GetByte
|
||||
00C580 1 91 44 sta (BufferLo),y
|
||||
00C582 1 C8 iny
|
||||
00C583 1 D0 F8 bne read256
|
||||
00C585 1 60 rts
|
||||
00C586 1
|
||||
00C586 1 ; ProDOS Write Block Command
|
||||
00C586 1 WriteBlock:
|
||||
00C586 1 A9 02 lda #WriteBlockCommand
|
||||
00C588 1 20 AE C5 jsr SendByte
|
||||
00C58B 1 A5 46 lda BlockLo
|
||||
00C58D 1 20 AE C5 jsr SendByte
|
||||
00C590 1 A5 47 lda BlockHi
|
||||
00C592 1 20 AE C5 jsr SendByte
|
||||
00C595 1 A0 00 ldy #$0
|
||||
00C597 1 20 A5 C5 jsr write256
|
||||
00C59A 1 E6 45 inc BufferHi
|
||||
00C59C 1 20 A5 C5 jsr write256
|
||||
00C59F 1 C6 45 dec BufferHi
|
||||
00C5A1 1 A9 00 lda #$0 ;zero accumulator and clear carry for success
|
||||
00C5A3 1 18 clc
|
||||
00C5A4 1 60 rts
|
||||
00C5A5 1
|
||||
00C5A5 1 write256:
|
||||
00C5A5 1 B1 44 lda (BufferLo),y
|
||||
00C5A7 1 20 AE C5 jsr SendByte
|
||||
00C5AA 1 C8 iny
|
||||
00C5AB 1 D0 F8 bne write256
|
||||
00C5AD 1 60 rts
|
||||
00C5AE 1
|
||||
00C5AE 1 SendByte:
|
||||
00C5AE 1 48 pha
|
||||
00C5AF 1 waitWrite:
|
||||
00C5AF 1 AD DB C0 lda InputFlags
|
||||
00C5B2 1 2A rol
|
||||
00C5B3 1 2A rol
|
||||
00C5B4 1 B0 F9 bcs waitWrite
|
||||
00C5B6 1 68 pla
|
||||
00C5B7 1 8D DD C0 sta OutputByte
|
||||
00C5BA 1 A9 0E lda #$0e ; set bit 0 low to indicate write started
|
||||
00C5BC 1 8D D7 C0 sta OutputFlags
|
||||
00C5BF 1 finishWrite:
|
||||
00C5BF 1 AD DB C0 lda InputFlags
|
||||
00C5C2 1 2A rol
|
||||
00C5C3 1 2A rol
|
||||
00C5C4 1 90 F9 bcc finishWrite
|
||||
00C5C6 1 A9 0F lda #$0f
|
||||
00C5C8 1 8D D7 C0 sta OutputFlags
|
||||
00C5CB 1 60 rts
|
||||
00C5CC 1
|
||||
00C5CC 1 GetByte:
|
||||
00C5CC 1 A9 0D lda #$0d ;set read flag low
|
||||
00C5CE 1 8D D7 C0 sta OutputFlags
|
||||
00C5D1 1 waitRead:
|
||||
00C5D1 1 AD DB C0 lda InputFlags
|
||||
00C5D4 1 2A rol
|
||||
00C5D5 1 B0 FA bcs waitRead
|
||||
00C5D7 1 AD DE C0 lda InputByte
|
||||
00C5DA 1 48 pha
|
||||
00C5DB 1 A9 0F lda #$0f ;set all flags high
|
||||
00C5DD 1 8D D7 C0 sta OutputFlags
|
||||
00C5E0 1 finishRead:
|
||||
00C5E0 1 AD DB C0 lda InputFlags
|
||||
00C5E3 1 2A rol
|
||||
00C5E4 1 90 FA bcc finishRead
|
||||
00C5E6 1 68 pla
|
||||
00C5E7 1 end:
|
||||
00C5E7 1 60 rts
|
||||
00C5E8 1
|
||||
00C5E8 1 00 00 00 00 .repeat 251-<end
|
||||
00C5EC 1 00 00 00 00
|
||||
00C5F0 1 00 00 00 00
|
||||
00C5FC 1 .byte 0
|
||||
00C5FC 1 .endrepeat
|
||||
00C5FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C5FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C5FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C600 1
|
||||
00C600 1
|
||||
00C700 1 ;ID bytes for booting and drive detection
|
||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C702 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C704 1 E0 03 cpx #$03 ;
|
||||
00C706 1
|
||||
00C706 1 A2 70 ldx #SLOT*$10
|
||||
00C708 1 86 2B stx $2b
|
||||
00C70A 1 86 43 stx Unit
|
||||
00C70C 1
|
||||
00C70C 1 ;force EPROM to second page on boot
|
||||
00C70C 1 A9 3F lda #$3f ;set all flags high and page 3 of EPROM for menu
|
||||
00C70E 1 PageJump:
|
||||
00C70E 1 8D F7 C0 sta OutputFlags
|
||||
00C711 1 4C 1C C7 jmp Start ;this jump is only called if coming in from PageJump with A=$0f
|
||||
00C714 1
|
||||
00C714 1 ;entry points for ProDOS
|
||||
00C714 1 DriverEntry:
|
||||
00C714 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C716 1 8D F7 C0 sta OutputFlags
|
||||
00C719 1 4C 32 C7 jmp Driver
|
||||
00C71C 1
|
||||
00C71C 1 ;load first two blocks and execute to boot
|
||||
00C71C 1 Start:
|
||||
00C71C 1 A9 01 lda #$01 ;set read command
|
||||
00C71E 1 85 42 sta Command
|
||||
00C720 1
|
||||
00C720 1 A9 00 lda #$00 ;block 0
|
||||
00C722 1 85 46 sta BlockLo
|
||||
00C724 1 85 47 sta BlockHi
|
||||
00C726 1 85 44 sta BufferLo ;buffer at $800
|
||||
00C728 1 A9 08 lda #$08
|
||||
00C72A 1 85 45 sta BufferHi
|
||||
00C72C 1 20 32 C7 jsr Driver ;get the block
|
||||
00C72F 1
|
||||
00C72F 1 4C 01 08 jmp $801 ;execute the block
|
||||
00C732 1
|
||||
00C732 1 ; ProDOS Driver code
|
||||
00C732 1 ; First check that this is the right drive
|
||||
00C732 1 Driver:
|
||||
00C732 1 A6 43 ldx Unit
|
||||
00C734 1 A5 42 lda Command; Check which command is being requested
|
||||
00C736 1 F0 0C beq GetStatus ;0 = Status command
|
||||
00C738 1 C9 01 cmp #ReadBlockCommand
|
||||
00C73A 1 F0 10 beq ReadBlock
|
||||
00C73C 1 C9 02 cmp #WriteBlockCommand
|
||||
00C73E 1 F0 46 beq WriteBlock
|
||||
00C740 1 38 sec ;set carry as we don't support any other commands
|
||||
00C741 1 A9 53 lda #$53 ;Invalid parameter error
|
||||
00C743 1 60 rts
|
||||
00C744 1
|
||||
00C744 1 ; ProDOS Status Command Handler
|
||||
00C744 1 GetStatus:
|
||||
00C744 1 A2 FF ldx #$ff ;low byte number of blocks
|
||||
00C746 1 A0 FF ldy #$ff ;high byte number of blocks
|
||||
00C748 1 A9 00 lda #$0 ;zero accumulator and clear carry for success
|
||||
00C74A 1 18 clc
|
||||
00C74B 1 60 rts
|
||||
00C74C 1
|
||||
00C74C 1 ; ProDOS Read Block Command
|
||||
00C74C 1 ReadBlock:
|
||||
00C74C 1 A0 00 ldy #$00 ;Get the current time on each block read for now
|
||||
00C74E 1 A9 03 lda #GetTimeCommand
|
||||
00C750 1 20 AE C7 jsr SendByte
|
||||
00C753 1 getTimeByte:
|
||||
00C753 1 20 CC C7 jsr GetByte
|
||||
00C756 1 99 90 BF sta $bf90,y
|
||||
00C759 1 C8 iny
|
||||
00C75A 1 C0 04 cpy #$04
|
||||
00C75C 1 D0 F5 bne getTimeByte
|
||||
00C75E 1 A9 01 lda #ReadBlockCommand ;read the block after setting the clock
|
||||
00C760 1 20 AE C7 jsr SendByte
|
||||
00C763 1 A5 46 lda BlockLo
|
||||
00C765 1 20 AE C7 jsr SendByte
|
||||
00C768 1 A5 47 lda BlockHi
|
||||
00C76A 1 20 AE C7 jsr SendByte
|
||||
00C76D 1 A0 00 ldy #$0
|
||||
00C76F 1 20 7D C7 jsr read256
|
||||
00C772 1 E6 45 inc BufferHi
|
||||
00C774 1 20 7D C7 jsr read256
|
||||
00C777 1 C6 45 dec BufferHi
|
||||
00C779 1 A9 00 lda #$0 ;zero accumulator and clear carry for success
|
||||
00C77B 1 18 clc
|
||||
00C77C 1 60 rts
|
||||
00C77D 1
|
||||
00C77D 1 read256:
|
||||
00C77D 1 20 CC C7 jsr GetByte
|
||||
00C780 1 91 44 sta (BufferLo),y
|
||||
00C782 1 C8 iny
|
||||
00C783 1 D0 F8 bne read256
|
||||
00C785 1 60 rts
|
||||
00C786 1
|
||||
00C786 1 ; ProDOS Write Block Command
|
||||
00C786 1 WriteBlock:
|
||||
00C786 1 A9 02 lda #WriteBlockCommand
|
||||
00C788 1 20 AE C7 jsr SendByte
|
||||
00C78B 1 A5 46 lda BlockLo
|
||||
00C78D 1 20 AE C7 jsr SendByte
|
||||
00C790 1 A5 47 lda BlockHi
|
||||
00C792 1 20 AE C7 jsr SendByte
|
||||
00C795 1 A0 00 ldy #$0
|
||||
00C797 1 20 A5 C7 jsr write256
|
||||
00C79A 1 E6 45 inc BufferHi
|
||||
00C79C 1 20 A5 C7 jsr write256
|
||||
00C79F 1 C6 45 dec BufferHi
|
||||
00C7A1 1 A9 00 lda #$0 ;zero accumulator and clear carry for success
|
||||
00C7A3 1 18 clc
|
||||
00C7A4 1 60 rts
|
||||
00C7A5 1
|
||||
00C7A5 1 write256:
|
||||
00C7A5 1 B1 44 lda (BufferLo),y
|
||||
00C7A7 1 20 AE C7 jsr SendByte
|
||||
00C7AA 1 C8 iny
|
||||
00C7AB 1 D0 F8 bne write256
|
||||
00C7AD 1 60 rts
|
||||
00C7AE 1
|
||||
00C7AE 1 SendByte:
|
||||
00C7AE 1 48 pha
|
||||
00C7AF 1 waitWrite:
|
||||
00C7AF 1 AD FB C0 lda InputFlags
|
||||
00C7B2 1 2A rol
|
||||
00C7B3 1 2A rol
|
||||
00C7B4 1 B0 F9 bcs waitWrite
|
||||
00C7B6 1 68 pla
|
||||
00C7B7 1 8D FD C0 sta OutputByte
|
||||
00C7BA 1 A9 0E lda #$0e ; set bit 0 low to indicate write started
|
||||
00C7BC 1 8D F7 C0 sta OutputFlags
|
||||
00C7BF 1 finishWrite:
|
||||
00C7BF 1 AD FB C0 lda InputFlags
|
||||
00C7C2 1 2A rol
|
||||
00C7C3 1 2A rol
|
||||
00C7C4 1 90 F9 bcc finishWrite
|
||||
00C7C6 1 A9 0F lda #$0f
|
||||
00C7C8 1 8D F7 C0 sta OutputFlags
|
||||
00C7CB 1 60 rts
|
||||
00C7CC 1
|
||||
00C7CC 1 GetByte:
|
||||
00C7CC 1 A9 0D lda #$0d ;set read flag low
|
||||
00C7CE 1 8D F7 C0 sta OutputFlags
|
||||
00C7D1 1 waitRead:
|
||||
00C7D1 1 AD FB C0 lda InputFlags
|
||||
00C7D4 1 2A rol
|
||||
00C7D5 1 B0 FA bcs waitRead
|
||||
00C7D7 1 AD FE C0 lda InputByte
|
||||
00C7DA 1 48 pha
|
||||
00C7DB 1 A9 0F lda #$0f ;set all flags high
|
||||
00C7DD 1 8D F7 C0 sta OutputFlags
|
||||
00C7E0 1 finishRead:
|
||||
00C7E0 1 AD FB C0 lda InputFlags
|
||||
00C7E3 1 2A rol
|
||||
00C7E4 1 90 FA bcc finishRead
|
||||
00C7E6 1 68 pla
|
||||
00C7E7 1 end:
|
||||
00C7E7 1 60 rts
|
||||
00C7E8 1
|
||||
00C7E8 1 00 00 00 00 .repeat 251-<end
|
||||
00C7EC 1 00 00 00 00
|
||||
00C7F0 1 00 00 00 00
|
||||
00C7F4 1 00 00 00 00
|
||||
00C7F8 1 00 00 00 00
|
||||
00C7FC 1 .byte 0
|
||||
00C7FC 1 .endrepeat
|
||||
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C7FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C7FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C800 1
|
||||
00C800 1
|
||||
|
@ -29,80 +29,119 @@ Current file: FileAccessFirmware.asm
|
||||
000000r 1 SaveFileCommand = $07
|
||||
000000r 1
|
||||
000000r 1 .org SLOT*$100 + $C000
|
||||
00C500 1 ;ID bytes for booting and drive detection
|
||||
00C500 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C502 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C504 1 E0 03 cpx #$03 ;
|
||||
00C506 1
|
||||
00C506 1 A2 50 ldx #SLOT*$10
|
||||
00C508 1 86 2B stx $2b
|
||||
00C50A 1 86 43 stx Unit
|
||||
00C50C 1
|
||||
00C50C 1 ;force EPROM to second page on boot
|
||||
00C50C 1 A9 3F lda #$3f ;set all flags high and page 3 of EPROM for menu
|
||||
00C50E 1 PageJump:
|
||||
00C50E 1 8D D7 C0 sta OutputFlags
|
||||
00C511 1 4C 19 C5 jmp Start ;this jump is only called if coming in from PageJump with A=$2f
|
||||
00C514 1
|
||||
00C514 1 ;entry points for ProDOS
|
||||
00C514 1 DriverEntry:
|
||||
00C514 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C516 1 8D D7 C0 sta OutputFlags
|
||||
00C519 1
|
||||
00C519 1 Start:
|
||||
00C519 1
|
||||
00C519 1 ; Put command firmware here
|
||||
00C519 1 ;
|
||||
00C519 1 ;
|
||||
00C519 1 ;
|
||||
00C519 1 60 rts
|
||||
00C51A 1
|
||||
00C51A 1 SendByte:
|
||||
00C51A 1 48 pha
|
||||
00C51B 1 waitWrite:
|
||||
00C51B 1 AD DB C0 lda InputFlags
|
||||
00C51E 1 2A rol
|
||||
00C51F 1 2A rol
|
||||
00C520 1 B0 F9 bcs waitWrite
|
||||
00C522 1 68 pla
|
||||
00C523 1 8D DD C0 sta OutputByte
|
||||
00C526 1 A9 0E lda #$0e ; set bit 0 low to indicate write started
|
||||
00C528 1 8D D7 C0 sta OutputFlags
|
||||
00C52B 1 finishWrite:
|
||||
00C52B 1 AD DB C0 lda InputFlags
|
||||
00C52E 1 2A rol
|
||||
00C52F 1 2A rol
|
||||
00C530 1 90 F9 bcc finishWrite
|
||||
00C532 1 A9 0F lda #$0f
|
||||
00C534 1 8D D7 C0 sta OutputFlags
|
||||
00C537 1 60 rts
|
||||
00C538 1
|
||||
00C538 1 GetByte:
|
||||
00C538 1 A9 0D lda #$0d ;set read flag low
|
||||
00C53A 1 8D D7 C0 sta OutputFlags
|
||||
00C53D 1 waitRead:
|
||||
00C53D 1 AD DB C0 lda InputFlags
|
||||
00C540 1 2A rol
|
||||
00C541 1 B0 FA bcs waitRead
|
||||
00C543 1 AD DE C0 lda InputByte
|
||||
00C546 1 48 pha
|
||||
00C547 1 A9 0F lda #$0f ;set all flags high
|
||||
00C549 1 8D D7 C0 sta OutputFlags
|
||||
00C54C 1 finishRead:
|
||||
00C54C 1 AD DB C0 lda InputFlags
|
||||
00C54F 1 2A rol
|
||||
00C550 1 90 FA bcc finishRead
|
||||
00C552 1 68 pla
|
||||
00C553 1 end:
|
||||
00C553 1 60 rts
|
||||
00C554 1
|
||||
00C554 1 00 00 00 00 .repeat 251-<end
|
||||
00C558 1 00 00 00 00
|
||||
00C55C 1 00 00 00 00
|
||||
00C5FC 1 .byte 0
|
||||
00C5FC 1 .endrepeat
|
||||
00C5FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C5FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C5FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C600 1
|
||||
00C600 1
|
||||
00C700 1 ;ID bytes for booting and drive detection
|
||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C702 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C704 1 E0 03 cpx #$03 ;
|
||||
00C706 1
|
||||
00C706 1 A2 70 ldx #SLOT*$10
|
||||
00C708 1 86 2B stx $2b
|
||||
00C70A 1 86 43 stx Unit
|
||||
00C70C 1
|
||||
00C70C 1 ;force EPROM to second page on boot
|
||||
00C70C 1 A9 3F lda #$3f ;set all flags high and page 3 of EPROM for menu
|
||||
00C70E 1 PageJump:
|
||||
00C70E 1 8D F7 C0 sta OutputFlags
|
||||
00C711 1 4C 19 C7 jmp Start ;this jump is only called if coming in from PageJump with A=$2f
|
||||
00C714 1
|
||||
00C714 1 ;entry points for ProDOS
|
||||
00C714 1 DriverEntry:
|
||||
00C714 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C716 1 8D F7 C0 sta OutputFlags
|
||||
00C719 1
|
||||
00C719 1 Start:
|
||||
00C719 1
|
||||
00C719 1 ; Put command firmware here
|
||||
00C719 1 ;
|
||||
00C719 1 ;
|
||||
00C719 1 ;
|
||||
00C719 1 60 rts
|
||||
00C71A 1
|
||||
00C71A 1 SendByte:
|
||||
00C71A 1 48 pha
|
||||
00C71B 1 waitWrite:
|
||||
00C71B 1 AD FB C0 lda InputFlags
|
||||
00C71E 1 2A rol
|
||||
00C71F 1 2A rol
|
||||
00C720 1 B0 F9 bcs waitWrite
|
||||
00C722 1 68 pla
|
||||
00C723 1 8D FD C0 sta OutputByte
|
||||
00C726 1 A9 0E lda #$0e ; set bit 0 low to indicate write started
|
||||
00C728 1 8D F7 C0 sta OutputFlags
|
||||
00C72B 1 finishWrite:
|
||||
00C72B 1 AD FB C0 lda InputFlags
|
||||
00C72E 1 2A rol
|
||||
00C72F 1 2A rol
|
||||
00C730 1 90 F9 bcc finishWrite
|
||||
00C732 1 A9 0F lda #$0f
|
||||
00C734 1 8D F7 C0 sta OutputFlags
|
||||
00C737 1 60 rts
|
||||
00C738 1
|
||||
00C738 1 GetByte:
|
||||
00C738 1 A9 0D lda #$0d ;set read flag low
|
||||
00C73A 1 8D F7 C0 sta OutputFlags
|
||||
00C73D 1 waitRead:
|
||||
00C73D 1 AD FB C0 lda InputFlags
|
||||
00C740 1 2A rol
|
||||
00C741 1 B0 FA bcs waitRead
|
||||
00C743 1 AD FE C0 lda InputByte
|
||||
00C746 1 48 pha
|
||||
00C747 1 A9 0F lda #$0f ;set all flags high
|
||||
00C749 1 8D F7 C0 sta OutputFlags
|
||||
00C74C 1 finishRead:
|
||||
00C74C 1 AD FB C0 lda InputFlags
|
||||
00C74F 1 2A rol
|
||||
00C750 1 90 FA bcc finishRead
|
||||
00C752 1 68 pla
|
||||
00C753 1 end:
|
||||
00C753 1 60 rts
|
||||
00C754 1
|
||||
00C754 1 00 00 00 00 .repeat 251-<end
|
||||
00C758 1 00 00 00 00
|
||||
00C75C 1 00 00 00 00
|
||||
00C760 1 00 00 00 00
|
||||
00C764 1 00 00 00 00
|
||||
00C768 1 00 00 00 00
|
||||
00C76C 1 00 00 00 00
|
||||
00C770 1 00 00 00 00
|
||||
00C774 1 00 00 00 00
|
||||
00C778 1 00 00 00 00
|
||||
00C77C 1 00 00 00 00
|
||||
00C780 1 00 00 00 00
|
||||
00C784 1 00 00 00 00
|
||||
00C788 1 00 00 00 00
|
||||
00C78C 1 00 00 00 00
|
||||
00C790 1 00 00 00 00
|
||||
00C794 1 00 00 00 00
|
||||
00C798 1 00 00 00 00
|
||||
00C79C 1 00 00 00 00
|
||||
00C7A0 1 00 00 00 00
|
||||
00C7A4 1 00 00 00 00
|
||||
00C7A8 1 00 00 00 00
|
||||
00C7AC 1 00 00 00 00
|
||||
00C7B0 1 00 00 00 00
|
||||
00C7B4 1 00 00 00 00
|
||||
00C7B8 1 00 00 00 00
|
||||
00C7BC 1 00 00 00 00
|
||||
00C7C0 1 00 00 00 00
|
||||
00C7C4 1 00 00 00 00
|
||||
00C7C8 1 00 00 00 00
|
||||
00C7CC 1 00 00 00 00
|
||||
00C7D0 1 00 00 00 00
|
||||
00C7D4 1 00 00 00 00
|
||||
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
|
||||
00C7FC 1 .byte 0
|
||||
00C7FC 1 .endrepeat
|
||||
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C7FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C7FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C800 1
|
||||
00C800 1
|
||||
|
@ -29,88 +29,114 @@ Current file: MenuFirmware.asm
|
||||
000000r 1 SaveFileCommand = $07
|
||||
000000r 1
|
||||
000000r 1 .org SLOT*$100 + $C000
|
||||
00C500 1 ;ID bytes for booting and drive detection
|
||||
00C500 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C502 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C504 1 E0 03 cpx #$03 ;
|
||||
00C506 1
|
||||
00C506 1 A2 50 ldx #SLOT*$10
|
||||
00C508 1 86 2B stx $2b
|
||||
00C50A 1 86 43 stx Unit
|
||||
00C50C 1
|
||||
00C50C 1 ;force EPROM to second page on boot
|
||||
00C50C 1 A9 3F lda #$3f ;set all flags high and page 1 of EPROMi
|
||||
00C50E 1 PageJump:
|
||||
00C50E 1 8D D7 C0 sta OutputFlags
|
||||
00C511 1 4C 19 C5 jmp Start
|
||||
00C514 1
|
||||
00C514 1 ;entry points for ProDOS
|
||||
00C514 1 DriverEntry:
|
||||
00C514 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C516 1 8D D7 C0 sta OutputFlags
|
||||
00C519 1 ;since the firmware page changes to 0, this falls through to the driver
|
||||
00C519 1
|
||||
00C519 1 Start:
|
||||
00C519 1 A9 F0 lda #$f0 ;restore COUT after PR# called
|
||||
00C51B 1 85 36 sta $36
|
||||
00C51D 1 A9 FD lda #$fd
|
||||
00C51F 1 85 37 sta $37
|
||||
00C521 1 20 58 FC jsr $fc58 ;clear screen and show menu options
|
||||
00C524 1 A0 00 ldy #$00
|
||||
00C526 1 PrintString:
|
||||
00C526 1 B9 42 C5 lda Text,y
|
||||
00C529 1 F0 08 beq GetChar
|
||||
00C52B 1 09 80 ora #$80
|
||||
00C52D 1 20 ED FD jsr $fded
|
||||
00C530 1 C8 iny
|
||||
00C531 1 D0 F3 bne PrintString
|
||||
00C533 1
|
||||
00C533 1 GetChar:
|
||||
00C533 1 20 0C FD jsr $fd0c
|
||||
00C536 1 38 sec ;subtract ascii "1" to get 0 - 3 from "1" to "4"
|
||||
00C537 1 E9 B1 sbc #$b1
|
||||
00C539 1 0A asl ;put in top nibble as EPROM page
|
||||
00C53A 1 0A asl
|
||||
00C53B 1 0A asl
|
||||
00C53C 1 0A asl
|
||||
00C53D 1 09 0F ora #$0f ;set all flags high
|
||||
00C53F 1 4C 0E C5 jmp PageJump
|
||||
00C542 1
|
||||
00C542 1 Text:
|
||||
00C542 1
|
||||
00C542 1 41 70 70 6C .byte "Apple2-IO-RPi",$8d
|
||||
00C546 1 65 32 2D 49
|
||||
00C54A 1 4F 2D 52 50
|
||||
00C550 1 28 63 29 32 .byte "(c)2020-2021 Terence J. Boldt",$8d
|
||||
00C554 1 30 32 30 2D
|
||||
00C558 1 32 30 32 31
|
||||
00C56E 1 8D .byte $8d
|
||||
00C56F 1 31 2E 20 42 .byte "1. Boot",$8d
|
||||
00C573 1 6F 6F 74 8D
|
||||
00C577 1 32 2E 20 43 .byte "2. Command Line",$8d
|
||||
00C57B 1 6F 6D 6D 61
|
||||
00C57F 1 6E 64 20 4C
|
||||
00C587 1 33 2E 20 46 .byte "3. File Access [NOT IMPLEMENTED]",$8d
|
||||
00C58B 1 69 6C 65 20
|
||||
00C58F 1 41 63 63 65
|
||||
00C5A8 1 8D .byte $8d
|
||||
00C5A9 1 4D 61 79 20 .byte "May take 45 seconds for RPi to start",$8d
|
||||
00C5AD 1 74 61 6B 65
|
||||
00C5B1 1 20 34 35 20
|
||||
00C5CE 1 61 66 74 65 .byte "after intial power-on...",$00
|
||||
00C5D2 1 72 20 69 6E
|
||||
00C5D6 1 74 69 61 6C
|
||||
00C5E7 1
|
||||
00C5E7 1 end:
|
||||
00C5E7 1 60 rts
|
||||
00C5E8 1
|
||||
00C5E8 1 00 00 00 00 .repeat 251-<end
|
||||
00C5EC 1 00 00 00 00
|
||||
00C5F0 1 00 00 00 00
|
||||
00C5FC 1 .byte 0
|
||||
00C5FC 1 .endrepeat
|
||||
00C5FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C5FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C5FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C600 1
|
||||
00C600 1
|
||||
00C700 1 ;ID bytes for booting and drive detection
|
||||
00C700 1 E0 20 cpx #$20 ;ID bytes for ProDOS and the
|
||||
00C702 1 E0 00 cpx #$00 ; Apple Autostart ROM
|
||||
00C704 1 E0 03 cpx #$03 ;
|
||||
00C706 1
|
||||
00C706 1 A2 70 ldx #SLOT*$10
|
||||
00C708 1 86 2B stx $2b
|
||||
00C70A 1 86 43 stx Unit
|
||||
00C70C 1
|
||||
00C70C 1 ;force EPROM to second page on boot
|
||||
00C70C 1 A9 3F lda #$3f ;set all flags high and page 1 of EPROMi
|
||||
00C70E 1 PageJump:
|
||||
00C70E 1 8D F7 C0 sta OutputFlags
|
||||
00C711 1 4C 19 C7 jmp Start
|
||||
00C714 1
|
||||
00C714 1 ;entry points for ProDOS
|
||||
00C714 1 DriverEntry:
|
||||
00C714 1 A9 0F lda #$0f ;set all flags high and page 0 of EPROM
|
||||
00C716 1 8D F7 C0 sta OutputFlags
|
||||
00C719 1 ;since the firmware page changes to 0, this falls through to the driver
|
||||
00C719 1
|
||||
00C719 1 Start:
|
||||
00C719 1 A9 F0 lda #$f0 ;restore COUT after PR# called
|
||||
00C71B 1 85 36 sta $36
|
||||
00C71D 1 A9 FD lda #$fd
|
||||
00C71F 1 85 37 sta $37
|
||||
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
|
||||
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 46 .byte "3. File Access [NOT IMPLEMENTED]",$8d
|
||||
00C78B 1 69 6C 65 20
|
||||
00C78F 1 41 63 63 65
|
||||
00C793 1 73 73 20 5B
|
||||
00C797 1 4E 4F 54 20
|
||||
00C79B 1 49 4D 50 4C
|
||||
00C79F 1 45 4D 45 4E
|
||||
00C7A3 1 54 45 44 5D
|
||||
00C7A7 1 8D
|
||||
00C7A8 1 8D .byte $8d
|
||||
00C7A9 1 4D 61 79 20 .byte "May take 45 seconds for RPi to start",$8d
|
||||
00C7AD 1 74 61 6B 65
|
||||
00C7B1 1 20 34 35 20
|
||||
00C7B5 1 73 65 63 6F
|
||||
00C7B9 1 6E 64 73 20
|
||||
00C7BD 1 66 6F 72 20
|
||||
00C7C1 1 52 50 69 20
|
||||
00C7C5 1 74 6F 20 73
|
||||
00C7C9 1 74 61 72 74
|
||||
00C7CD 1 8D
|
||||
00C7CE 1 61 66 74 65 .byte "after intial power-on...",$00
|
||||
00C7D2 1 72 20 69 6E
|
||||
00C7D6 1 74 69 61 6C
|
||||
00C7DA 1 20 70 6F 77
|
||||
00C7DE 1 65 72 2D 6F
|
||||
00C7E2 1 6E 2E 2E 2E
|
||||
00C7E6 1 00
|
||||
00C7E7 1
|
||||
00C7E7 1 end:
|
||||
00C7E7 1 60 rts
|
||||
00C7E8 1
|
||||
00C7E8 1 00 00 00 00 .repeat 251-<end
|
||||
00C7EC 1 00 00 00 00
|
||||
00C7F0 1 00 00 00 00
|
||||
00C7F4 1 00 00 00 00
|
||||
00C7F8 1 00 00 00 00
|
||||
00C7FC 1 .byte 0
|
||||
00C7FC 1 .endrepeat
|
||||
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||
00C7FE 1 07 .byte 7 ;bit set(0=status 1=read 2=write) unset(3=format, 4/5=number of volumes, 6=interruptable, 7=removable)
|
||||
00C7FF 1 14 .byte DriverEntry&$00FF ;low byte of entry
|
||||
00C800 1
|
||||
00C800 1
|
||||
|
@ -4,9 +4,9 @@ ca65 DriveFirmware.asm -D SLOT=1 -o DriveSlot1.o
|
||||
ca65 DriveFirmware.asm -D SLOT=2 -o DriveSlot2.o
|
||||
ca65 DriveFirmware.asm -D SLOT=3 -o DriveSlot3.o
|
||||
ca65 DriveFirmware.asm -D SLOT=4 -o DriveSlot4.o
|
||||
ca65 DriveFirmware.asm -D SLOT=5 -o DriveSlot5.o --listing DriveFirmware.lst
|
||||
ca65 DriveFirmware.asm -D SLOT=5 -o DriveSlot5.o
|
||||
ca65 DriveFirmware.asm -D SLOT=6 -o DriveSlot6.o
|
||||
ca65 DriveFirmware.asm -D SLOT=7 -o DriveSlot7.o
|
||||
ca65 DriveFirmware.asm -D SLOT=7 -o DriveSlot7.o --listing DriveFirmware.lst --list-bytes 255
|
||||
ld65 DriveSlot0.o DriveSlot1.o DriveSlot2.o DriveSlot3.o DriveSlot4.o DriveSlot5.o DriveSlot6.o DriveSlot7.o -o DriveFirmware.bin -t none
|
||||
|
||||
ca65 MenuFirmware.asm -D SLOT=0 -o MenuSlot0.o
|
||||
@ -14,9 +14,9 @@ ca65 MenuFirmware.asm -D SLOT=1 -o MenuSlot1.o
|
||||
ca65 MenuFirmware.asm -D SLOT=2 -o MenuSlot2.o
|
||||
ca65 MenuFirmware.asm -D SLOT=3 -o MenuSlot3.o
|
||||
ca65 MenuFirmware.asm -D SLOT=4 -o MenuSlot4.o
|
||||
ca65 MenuFirmware.asm -D SLOT=5 -o MenuSlot5.o --listing MenuFirmware.lst
|
||||
ca65 MenuFirmware.asm -D SLOT=5 -o MenuSlot5.o
|
||||
ca65 MenuFirmware.asm -D SLOT=6 -o MenuSlot6.o
|
||||
ca65 MenuFirmware.asm -D SLOT=7 -o MenuSlot7.o
|
||||
ca65 MenuFirmware.asm -D SLOT=7 -o MenuSlot7.o --listing MenuFirmware.lst --list-bytes 255
|
||||
ld65 MenuSlot0.o MenuSlot1.o MenuSlot2.o MenuSlot3.o MenuSlot4.o MenuSlot5.o MenuSlot6.o MenuSlot7.o -o MenuFirmware.bin -t none
|
||||
|
||||
ca65 CommandFirmware.asm -D SLOT=0 -o CommandSlot0.o
|
||||
@ -24,9 +24,9 @@ ca65 CommandFirmware.asm -D SLOT=1 -o CommandSlot1.o
|
||||
ca65 CommandFirmware.asm -D SLOT=2 -o CommandSlot2.o
|
||||
ca65 CommandFirmware.asm -D SLOT=3 -o CommandSlot3.o
|
||||
ca65 CommandFirmware.asm -D SLOT=4 -o CommandSlot4.o
|
||||
ca65 CommandFirmware.asm -D SLOT=5 -o CommandSlot5.o --listing CommandFirmware.lst
|
||||
ca65 CommandFirmware.asm -D SLOT=5 -o CommandSlot5.o
|
||||
ca65 CommandFirmware.asm -D SLOT=6 -o CommandSlot6.o
|
||||
ca65 CommandFirmware.asm -D SLOT=7 -o CommandSlot7.o
|
||||
ca65 CommandFirmware.asm -D SLOT=7 -o CommandSlot7.o --listing CommandFirmware.lst --list-bytes 255
|
||||
ld65 CommandSlot0.o CommandSlot1.o CommandSlot2.o CommandSlot3.o CommandSlot4.o CommandSlot5.o CommandSlot6.o CommandSlot7.o -o CommandFirmware.bin -t none
|
||||
|
||||
ca65 FileAccessFirmware.asm -D SLOT=0 -o FileAccessSlot0.o
|
||||
@ -34,9 +34,9 @@ ca65 FileAccessFirmware.asm -D SLOT=1 -o FileAccessSlot1.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=2 -o FileAccessSlot2.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=3 -o FileAccessSlot3.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=4 -o FileAccessSlot4.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=5 -o FileAccessSlot5.o --listing FileAccessFirmware.lst
|
||||
ca65 FileAccessFirmware.asm -D SLOT=5 -o FileAccessSlot5.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=6 -o FileAccessSlot6.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=7 -o FileAccessSlot7.o
|
||||
ca65 FileAccessFirmware.asm -D SLOT=7 -o FileAccessSlot7.o --listing FileAccessFirmware.lst --list-bytes 255
|
||||
ld65 FileAccessSlot0.o FileAccessSlot1.o FileAccessSlot2.o FileAccessSlot3.o FileAccessSlot4.o FileAccessSlot5.o FileAccessSlot6.o FileAccessSlot7.o -o FileAccessFirmware.bin -t none
|
||||
|
||||
cat \
|
||||
|
Loading…
Reference in New Issue
Block a user