Fix full byte firmware

This commit is contained in:
Terence Boldt 2021-01-15 22:58:13 -05:00
parent 50b4ce55d1
commit 991f5788af
4 changed files with 21 additions and 9 deletions

View File

@ -147,31 +147,37 @@ SendByte:
pha pha
waitWrite: waitWrite:
lda InputFlags,x lda InputFlags,x
asl ;Second highest bit goes low when ready ror
bmi waitWrite ror ;Second lowest bit goes low when ready
bcs waitWrite
pla pla
sta OutputByte,x sta OutputByte,x
lda #$0e ; set bit 0 low to indicate write started
sta OutputFlags,x
finishWrite: finishWrite:
lda InputFlags,x lda InputFlags,x
asl ror
bpl finishWrite ror
lda #$FF bcc finishWrite
lda #$0f
sta OutputFlags,x sta OutputFlags,x
rts rts
GetByte: GetByte:
lda #$b0 ;set read flag low lda #$0d ;set read flag low
sta OutputFlags,x sta OutputFlags,x
waitRead: waitRead:
lda InputFlags,x lda InputFlags,x
bmi waitRead ror
bcs waitRead
lda InputByte lda InputByte
pha pha
lda #$f0 ;set all flags high lda #$0f ;set all flags high
sta OutputFlags,x sta OutputFlags,x
finishRead: finishRead:
lda InputFlags,x lda InputFlags,x
bpl finishRead ror
bcc finishRead
pla pla
end: end:
rts rts

Binary file not shown.

Binary file not shown.

View File

@ -10,3 +10,9 @@ ca65 Firmware.asm -D STARTSLOT=\$c500 -o Slot5.o --listing Firmware5.lst
ca65 Firmware.asm -D STARTSLOT=\$c600 -o Slot6.o --listing Firmware6.lst ca65 Firmware.asm -D STARTSLOT=\$c600 -o Slot6.o --listing Firmware6.lst
ca65 Firmware.asm -D STARTSLOT=\$c700 -o Slot7.o --listing Firmware7.lst ca65 Firmware.asm -D STARTSLOT=\$c700 -o Slot7.o --listing Firmware7.lst
ld65 Slot0.o Slot1.o Slot2.o Slot3.o Slot4.o Slot5.o Slot6.o Slot7.o -o Firmware.bin -t none ld65 Slot0.o Slot1.o Slot2.o Slot3.o Slot4.o Slot5.o Slot6.o Slot7.o -o Firmware.bin -t none
cat \
Firmware.bin Firmware.bin Firmware.bin Firmware.bin \
Firmware.bin Firmware.bin Firmware.bin Firmware.bin \
Firmware.bin Firmware.bin Firmware.bin Firmware.bin \
Firmware.bin Firmware.bin Firmware.bin Firmware.bin \
> Firmware_27256_EPROM.bin