forked from Apple-2-HW/Apple2-IO-RPi
Fix full byte firmware
This commit is contained in:
parent
50b4ce55d1
commit
991f5788af
@ -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.
BIN
Apple2/Firmware_27256_EPROM.bin
Normal file
BIN
Apple2/Firmware_27256_EPROM.bin
Normal file
Binary file not shown.
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user