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
waitWrite:
lda InputFlags,x
asl ;Second highest bit goes low when ready
bmi waitWrite
ror
ror ;Second lowest bit goes low when ready
bcs waitWrite
pla
sta OutputByte,x
lda #$0e ; set bit 0 low to indicate write started
sta OutputFlags,x
finishWrite:
lda InputFlags,x
asl
bpl finishWrite
lda #$FF
ror
ror
bcc finishWrite
lda #$0f
sta OutputFlags,x
rts
GetByte:
lda #$b0 ;set read flag low
lda #$0d ;set read flag low
sta OutputFlags,x
waitRead:
lda InputFlags,x
bmi waitRead
ror
bcs waitRead
lda InputByte
pha
lda #$f0 ;set all flags high
lda #$0f ;set all flags high
sta OutputFlags,x
finishRead:
lda InputFlags,x
bpl finishRead
ror
bcc finishRead
pla
end:
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=\$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
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