mirror of
https://github.com/tjboldt/ProDOS-ROM-Drive.git
synced 2024-08-31 11:29:36 +00:00
Merge pull request #7 from tjboldt/text-fix
Fix text display due to change in Y offset
This commit is contained in:
commit
6b9257044d
Binary file not shown.
@ -1,3 +1,4 @@
|
|||||||
|
;i/o ports to write to
|
||||||
writeLatchHigh = $C081
|
writeLatchHigh = $C081
|
||||||
writeLatchLow = $C080
|
writeLatchLow = $C080
|
||||||
|
|
||||||
@ -57,11 +58,13 @@
|
|||||||
ldy #<text
|
ldy #<text
|
||||||
drawtxt:
|
drawtxt:
|
||||||
lda (buflo),y
|
lda (buflo),y
|
||||||
sta $07D0,y ;put text on last line
|
beq boot
|
||||||
|
sta $07D0-<text,y ;put text on last line
|
||||||
iny
|
iny
|
||||||
bne drawtxt
|
bne drawtxt
|
||||||
|
|
||||||
;load block 0000 at $0800
|
;load block 0000 at $0800
|
||||||
|
boot:
|
||||||
lda #$08
|
lda #$08
|
||||||
sta bufhi
|
sta bufhi
|
||||||
sta jumpAddressHi
|
sta jumpAddressHi
|
||||||
@ -191,4 +194,3 @@ end:
|
|||||||
.byte 0,0 ;0000 blocks = check status
|
.byte 0,0 ;0000 blocks = check status
|
||||||
.byte 3 ;bit 0=read 1=status
|
.byte 3 ;bit 0=read 1=status
|
||||||
.byte <entry ;low byte of entry
|
.byte <entry ;low byte of entry
|
||||||
|
|
||||||
|
Binary file not shown.
@ -2,6 +2,7 @@ ca65 V2.18 - N/A
|
|||||||
Main file : Firmware.asm
|
Main file : Firmware.asm
|
||||||
Current file: Firmware.asm
|
Current file: Firmware.asm
|
||||||
|
|
||||||
|
000000r 1 ;i/o ports to write to
|
||||||
000000r 1 writeLatchHigh = $C081
|
000000r 1 writeLatchHigh = $C081
|
||||||
000000r 1 writeLatchLow = $C080
|
000000r 1 writeLatchLow = $C080
|
||||||
000000r 1
|
000000r 1
|
||||||
@ -58,155 +59,155 @@ Current file: Firmware.asm
|
|||||||
00C720 1 AA tax
|
00C720 1 AA tax
|
||||||
00C721 1
|
00C721 1
|
||||||
00C721 1 ;display copyright message
|
00C721 1 ;display copyright message
|
||||||
00C721 1 A0 C3 ldy #<text
|
00C721 1 A0 C5 ldy #<text
|
||||||
00C723 1 drawtxt:
|
00C723 1 drawtxt:
|
||||||
00C723 1 B1 44 lda (buflo),y
|
00C723 1 B1 44 lda (buflo),y
|
||||||
00C725 1 99 D0 07 sta $07D0,y ;put text on last line
|
00C725 1 F0 06 beq boot
|
||||||
00C728 1 C8 iny
|
00C727 1 99 0B 07 sta $07D0-<text,y ;put text on last line
|
||||||
00C729 1 D0 F8 bne drawtxt
|
00C72A 1 C8 iny
|
||||||
00C72B 1
|
00C72B 1 D0 F6 bne drawtxt
|
||||||
00C72B 1 ;load block 0000 at $0800
|
00C72D 1
|
||||||
00C72B 1 A9 08 lda #$08
|
00C72D 1 ;load block 0000 at $0800
|
||||||
00C72D 1 85 45 sta bufhi
|
00C72D 1 boot:
|
||||||
00C72F 1 85 FB sta jumpAddressHi
|
00C72D 1 A9 08 lda #$08
|
||||||
00C731 1 86 43 stx unit
|
00C72F 1 85 45 sta bufhi
|
||||||
00C733 1 D0 08 bne start
|
00C731 1 85 FB sta jumpAddressHi
|
||||||
00C735 1 ;This is the ProDOS entry point for this card
|
00C733 1 86 43 stx unit
|
||||||
00C735 1 entry:
|
00C735 1 D0 08 bne start
|
||||||
00C735 1 A9 58 lda #<knownRts
|
00C737 1 ;This is the ProDOS entry point for this card
|
||||||
00C737 1 85 FA sta jumpAddressLo
|
00C737 1 entry:
|
||||||
00C739 1 A9 FF lda #>knownRts
|
00C737 1 A9 58 lda #<knownRts
|
||||||
00C73B 1 85 FB sta jumpAddressHi
|
00C739 1 85 FA sta jumpAddressLo
|
||||||
00C73D 1 start:
|
00C73B 1 A9 FF lda #>knownRts
|
||||||
00C73D 1 A9 C0 lda #$C0
|
00C73D 1 85 FB sta jumpAddressHi
|
||||||
00C73F 1 85 FD sta ioAddressHi
|
00C73F 1 start:
|
||||||
00C741 1 20 58 FF jsr knownRts
|
00C73F 1 A9 C0 lda #$C0
|
||||||
00C744 1 BA tsx
|
00C741 1 85 FD sta ioAddressHi
|
||||||
00C745 1 BD 00 01 lda $0100,x
|
00C743 1 20 58 FF jsr knownRts
|
||||||
00C748 1 0A asl a
|
00C746 1 BA tsx
|
||||||
00C749 1 0A asl a
|
00C747 1 BD 00 01 lda $0100,x
|
||||||
00C74A 1 0A asl a
|
00C74A 1 0A asl a
|
||||||
00C74B 1 0A asl a
|
00C74B 1 0A asl a
|
||||||
00C74C 1 AA tax
|
00C74C 1 0A asl a
|
||||||
00C74D 1 E4 43 cpx unit ;make sure same as ProDOS
|
00C74D 1 0A asl a
|
||||||
00C74F 1 F0 04 beq docmd ;yep, do command
|
00C74E 1 AA tax
|
||||||
00C751 1 38 sec ;nope, set device not connected
|
00C74F 1 E4 43 cpx unit ;make sure same as ProDOS
|
||||||
00C752 1 A9 28 lda #nodev
|
00C751 1 F0 04 beq docmd ;yep, do command
|
||||||
00C754 1 60 rts ;go back to ProDOS
|
00C753 1 38 sec ;nope, set device not connected
|
||||||
00C755 1
|
00C754 1 A9 28 lda #nodev
|
||||||
00C755 1 docmd:
|
00C756 1 60 rts ;go back to ProDOS
|
||||||
00C755 1 A5 42 lda command
|
00C757 1
|
||||||
00C757 1 F0 08 beq getstat ;command 0 is GetStatus
|
00C757 1 docmd:
|
||||||
00C759 1 C9 01 cmp #$01
|
00C757 1 A5 42 lda command
|
||||||
00C75B 1 F0 0C beq readblk ;command 1 is ReadBlock
|
00C759 1 F0 08 beq getstat ;command 0 is GetStatus
|
||||||
00C75D 1 38 sec ;Format/Write not permitted
|
00C75B 1 C9 01 cmp #$01
|
||||||
00C75E 1 A9 2B lda #wperr ;write protect error
|
00C75D 1 F0 0C beq readblk ;command 1 is ReadBlock
|
||||||
00C760 1 60 rts ;go back to ProDOS
|
00C75F 1 38 sec ;Format/Write not permitted
|
||||||
00C761 1
|
00C760 1 A9 2B lda #wperr ;write protect error
|
||||||
00C761 1 getstat:
|
00C762 1 60 rts ;go back to ProDOS
|
||||||
00C761 1 18 clc ;send back status
|
00C763 1
|
||||||
00C762 1 A9 00 lda #$00 ;good status
|
00C763 1 getstat:
|
||||||
00C764 1 A2 00 ldx #$00 ;1024 blocks
|
00C763 1 18 clc ;send back status
|
||||||
00C766 1 A0 04 ldy #$04 ;
|
00C764 1 A9 00 lda #$00 ;good status
|
||||||
00C768 1 60 rts
|
00C766 1 A2 00 ldx #$00 ;1024 blocks
|
||||||
00C769 1
|
00C768 1 A0 04 ldy #$04 ;
|
||||||
00C769 1 readblk:
|
00C76A 1 60 rts
|
||||||
00C769 1 A5 47 lda blkhi ;get hi block
|
00C76B 1
|
||||||
00C76B 1 0A asl a ;shift up to top 3 bits
|
00C76B 1 readblk:
|
||||||
00C76C 1 0A asl a ;since that's all the high
|
00C76B 1 A5 47 lda blkhi ;get hi block
|
||||||
00C76D 1 0A asl a ;blocks we can handle
|
00C76D 1 0A asl a ;shift up to top 3 bits
|
||||||
00C76E 1 0A asl a ;
|
00C76E 1 0A asl a ;since that's all the high
|
||||||
00C76F 1 0A asl a ;
|
00C76F 1 0A asl a ;blocks we can handle
|
||||||
00C770 1 85 F8 sta highLatch ;save it in scratch ram 0
|
00C770 1 0A asl a ;
|
||||||
00C772 1 ;so we can stuff it in the
|
00C771 1 0A asl a ;
|
||||||
00C772 1 ;high latch later
|
00C772 1 85 F8 sta highLatch ;save it in scratch ram 0
|
||||||
00C772 1 A5 46 lda blklo ;get low block
|
00C774 1 ;so we can stuff it in the
|
||||||
00C774 1 4A lsr a ;shift so we get the top 5
|
00C774 1 ;high latch later
|
||||||
00C775 1 4A lsr a ;bits - this also goes in
|
00C774 1 A5 46 lda blklo ;get low block
|
||||||
00C776 1 4A lsr a ;the high latch
|
00C776 1 4A lsr a ;shift so we get the top 5
|
||||||
00C777 1 05 F8 ora highLatch ;add it to those top 3 bits
|
00C777 1 4A lsr a ;bits - this also goes in
|
||||||
00C779 1 85 F8 sta highLatch ;save it back in scratch ram
|
00C778 1 4A lsr a ;the high latch
|
||||||
00C77B 1 A5 46 lda blklo ;get low block
|
00C779 1 05 F8 ora highLatch ;add it to those top 3 bits
|
||||||
00C77D 1 0A asl a ;shift it to top 3 bits
|
00C77B 1 85 F8 sta highLatch ;save it back in scratch ram
|
||||||
00C77E 1 0A asl a ;
|
00C77D 1 A5 46 lda blklo ;get low block
|
||||||
00C77F 1 0A asl a ;
|
00C77F 1 0A asl a ;shift it to top 3 bits
|
||||||
00C780 1 0A asl a ;
|
00C780 1 0A asl a ;
|
||||||
00C781 1 0A asl a ;
|
00C781 1 0A asl a ;
|
||||||
00C782 1 85 F9 sta lowLatch
|
00C782 1 0A asl a ;
|
||||||
00C784 1 A9 02 lda #$02
|
00C783 1 0A asl a ;
|
||||||
00C786 1 85 FF sta blockHalfCounter
|
00C784 1 85 F9 sta lowLatch
|
||||||
00C788 1
|
00C786 1 A9 02 lda #$02
|
||||||
00C788 1 ;This gets 256 bytes from the ROM card
|
00C788 1 85 FF sta blockHalfCounter
|
||||||
00C788 1
|
00C78A 1
|
||||||
00C788 1 read256:
|
00C78A 1 ;This gets 256 bytes from the ROM card
|
||||||
00C788 1 A0 00 ldy #$00
|
00C78A 1
|
||||||
00C78A 1 A5 F8 lda highLatch ;get high latch value
|
00C78A 1 read256:
|
||||||
00C78C 1 9D 81 C0 sta writeLatchHigh,x ;set high latch for card
|
00C78A 1 A0 00 ldy #$00
|
||||||
00C78F 1 loop256:
|
00C78C 1 A5 F8 lda highLatch ;get high latch value
|
||||||
00C78F 1 A5 F9 lda lowLatch
|
00C78E 1 9D 81 C0 sta writeLatchHigh,x ;set high latch for card
|
||||||
00C791 1 9D 80 C0 sta writeLatchLow,x
|
00C791 1 loop256:
|
||||||
00C794 1 8A txa
|
00C791 1 A5 F9 lda lowLatch
|
||||||
00C795 1 09 80 ora #$80
|
00C793 1 9D 80 C0 sta writeLatchLow,x
|
||||||
00C797 1 85 FC sta ioAddressLo
|
00C796 1 8A txa
|
||||||
00C799 1 loop16:
|
00C797 1 09 80 ora #$80
|
||||||
00C799 1 84 FE sty tempY
|
00C799 1 85 FC sta ioAddressLo
|
||||||
00C79B 1 A0 00 ldy #$00
|
00C79B 1 loop16:
|
||||||
00C79D 1 B1 FC lda (ioAddressLo),y
|
00C79B 1 84 FE sty tempY
|
||||||
00C79F 1 A4 FE ldy tempY
|
00C79D 1 A0 00 ldy #$00
|
||||||
00C7A1 1 91 44 sta (buflo),y
|
00C79F 1 B1 FC lda (ioAddressLo),y
|
||||||
00C7A3 1 C8 iny
|
00C7A1 1 A4 FE ldy tempY
|
||||||
00C7A4 1 E6 FC inc ioAddressLo
|
00C7A3 1 91 44 sta (buflo),y
|
||||||
00C7A6 1 A5 FC lda ioAddressLo
|
00C7A5 1 C8 iny
|
||||||
00C7A8 1 29 0F and #$0F
|
00C7A6 1 E6 FC inc ioAddressLo
|
||||||
00C7AA 1 D0 ED bne loop16
|
00C7A8 1 A5 FC lda ioAddressLo
|
||||||
00C7AC 1 E6 F9 inc lowLatch
|
00C7AA 1 29 0F and #$0F
|
||||||
00C7AE 1 C0 00 cpy #$00
|
00C7AC 1 D0 ED bne loop16
|
||||||
00C7B0 1 D0 DD bne loop256
|
00C7AE 1 E6 F9 inc lowLatch
|
||||||
00C7B2 1 C6 FF dec blockHalfCounter
|
00C7B0 1 C0 00 cpy #$00
|
||||||
00C7B4 1 D0 08 bne readnext256
|
00C7B2 1 D0 DD bne loop256
|
||||||
00C7B6 1 C6 45 dec bufhi
|
00C7B4 1 C6 FF dec blockHalfCounter
|
||||||
00C7B8 1 18 clc ;clear error code for success
|
00C7B6 1 D0 08 bne readnext256
|
||||||
00C7B9 1 A9 00 lda #$00
|
00C7B8 1 C6 45 dec bufhi
|
||||||
00C7BB 1 6C FA 00 jmp (jumpAddressLo)
|
00C7BA 1 18 clc ;clear error code for success
|
||||||
00C7BE 1
|
00C7BB 1 A9 00 lda #$00
|
||||||
00C7BE 1 readnext256:
|
00C7BD 1 6C FA 00 jmp (jumpAddressLo)
|
||||||
00C7BE 1 E6 45 inc bufhi
|
00C7C0 1
|
||||||
00C7C0 1 18 clc
|
00C7C0 1 readnext256:
|
||||||
00C7C1 1 90 C5 bcc read256
|
00C7C0 1 E6 45 inc bufhi
|
||||||
00C7C3 1
|
00C7C2 1 18 clc
|
||||||
00C7C3 1 ;macro for string with high-bit set
|
00C7C3 1 90 C5 bcc read256
|
||||||
00C7C3 1 .macro aschi str
|
00C7C5 1
|
||||||
00C7C3 1 .repeat .strlen (str), c
|
00C7C5 1 ;macro for string with high-bit set
|
||||||
00C7C3 1 .byte .strat (str, c) | $80
|
00C7C5 1 .macro aschi str
|
||||||
00C7C3 1 .endrep
|
00C7C5 1 .repeat .strlen (str), c
|
||||||
00C7C3 1 .endmacro
|
00C7C5 1 .byte .strat (str, c) | $80
|
||||||
00C7C3 1
|
00C7C5 1 .endrep
|
||||||
00C7C3 1 D2 CF CD AD text: aschi "ROM-Drive (c)1998-2021 Terence J. Boldt"
|
00C7C5 1 .endmacro
|
||||||
00C7C7 1 C4 F2 E9 F6
|
00C7C5 1
|
||||||
00C7CB 1 E5 A0 A8 E3
|
00C7C5 1 D2 CF CD AD text: aschi "ROM-Drive (c)1998-2021 Terence J. Boldt"
|
||||||
00C7CF 1 A9 B1 B9 B9
|
00C7C9 1 C4 F2 E9 F6
|
||||||
00C7D3 1 B8 AD B2 B0
|
00C7CD 1 E5 A0 A8 E3
|
||||||
00C7D7 1 B2 B1 A0 D4
|
00C7D1 1 A9 B1 B9 B9
|
||||||
00C7DB 1 E5 F2 E5 EE
|
00C7D5 1 B8 AD B2 B0
|
||||||
00C7DF 1 E3 E5 A0 CA
|
00C7D9 1 B2 B1 A0 D4
|
||||||
00C7E3 1 AE A0 C2 EF
|
00C7DD 1 E5 F2 E5 EE
|
||||||
00C7E7 1 EC E4 F4
|
00C7E1 1 E3 E5 A0 CA
|
||||||
00C7EA 1 end:
|
00C7E5 1 AE A0 C2 EF
|
||||||
00C7EA 1 00 .byte 0
|
00C7E9 1 EC E4 F4
|
||||||
00C7EB 1
|
00C7EC 1 end:
|
||||||
00C7EB 1 ; These bytes need to be at the top of the 256 byte firmware as ProDOS
|
00C7EC 1 00 .byte 0
|
||||||
00C7EB 1 ; uses these to find the entry point and drive capabilities
|
00C7ED 1
|
||||||
00C7EB 1
|
00C7ED 1 ; These bytes need to be at the top of the 256 byte firmware as ProDOS
|
||||||
00C7EB 1 00 00 00 00 .repeat 251-<end
|
00C7ED 1 ; uses these to find the entry point and drive capabilities
|
||||||
00C7EF 1 00 00 00 00
|
00C7ED 1
|
||||||
00C7F3 1 00 00 00 00
|
00C7ED 1 00 00 00 00 .repeat 251-<end
|
||||||
00C7F7 1 00 00 00 00
|
00C7F1 1 00 00 00 00
|
||||||
00C7FB 1 00
|
00C7F5 1 00 00 00 00
|
||||||
|
00C7F9 1 00 00 00
|
||||||
00C7FC 1 .byte 0
|
00C7FC 1 .byte 0
|
||||||
00C7FC 1 .endrepeat
|
00C7FC 1 .endrepeat
|
||||||
00C7FC 1
|
00C7FC 1
|
||||||
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
00C7FC 1 00 00 .byte 0,0 ;0000 blocks = check status
|
||||||
00C7FE 1 03 .byte 3 ;bit 0=read 1=status
|
00C7FE 1 03 .byte 3 ;bit 0=read 1=status
|
||||||
00C7FF 1 35 .byte <entry ;low byte of entry
|
00C7FF 1 37 .byte <entry ;low byte of entry
|
||||||
00C800 1
|
00C7FF 1
|
||||||
00C800 1
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user