diff --git a/Makefile b/Makefile index 6e1d832..3370bf4 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ -.PHONY: all +.PHONY: all clean all: make -C driver make -C example disk + +clean: + make clean -C driver + make clean -C example diff --git a/README.md b/README.md index ed3d6af..239d3c7 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,8 @@ This is an implementation of a reliable 2400b serial driver for the userport of Based on George Hug's 'Towards 2400' article in the Transactor Magazine volume 9 issue 3. (https://archive.org/details/transactor-magazines-v9-i03) +I used this fix to get around the 0x0d problem when a 0 byte is received. +(https://modelrail.otenko.com/electronics/commodore-64-fixing-rs-232-serial-limitations) + Cheers, Johan diff --git a/driver/c64-up2400.s b/driver/c64-up2400.s index a1a23cf..5267e16 100644 --- a/driver/c64-up2400.s +++ b/driver/c64-up2400.s @@ -147,7 +147,7 @@ GET: jsr CHKIN jsr rshavedata beq GET_NO_DATA - jsr BASIN + jsr OURBASIN ldx #$00 sta (ptr1,x) jsr CLRCH @@ -160,6 +160,19 @@ GET_NO_DATA: ldx #>SER_ERR_NO_DATA rts +;---------------------------------------------------------------------------- +; OURBASIN: This is a minimised call to get the character from the buffer. +; The Kernal code does not allow zero bytes (0x00)... this does. +; + +OURBASIN: + jsr $F14E + bcc @exit + jmp $F1B4 +@exit + clc + rts + ;---------------------------------------------------------------------------- ; PUT: Output character in A. ; Must return an error code in a/x. @@ -185,6 +198,7 @@ STATUS: lda #