# HG changeset patch # User drencor-xeen # Date 1358966215 21600 # Node ID 0a3f4d8ea6d58a2c50266ab0188589a015c5918c # Parent 8b2df903334ceadb5c5dfd654fa17e82ef214ed5 Found ENDC in wrong location in dwread.asm and dwwrite.asm. Corrected. Moved the native 6309 code in dwread.asm and dwwrite.asm into the H6309 labeled area and changed IFEQ H6309 to IFNE H6309. Also moved the 57600bps 6809 code to the default location. This change had been done in the old dwread.asm and dwwrite.asm files to make it easier to follow. Though these two files were overwritten from the HDBDOS project dwread.asm and dwwrite.asm files. So this conversion needed to be done again so it made the source easier to follow. diff -r 8b2df903334c -r 0a3f4d8ea6d5 3rdparty/utils/view/makefile --- a/3rdparty/utils/view/makefile Tue Jan 22 19:18:48 2013 -0600 +++ b/3rdparty/utils/view/makefile Wed Jan 23 12:36:55 2013 -0600 @@ -5,8 +5,8 @@ TARGET = view #LFLAGS += -y -l=$(HOME)/Projects/c3/lib/rmalib/alib.l -LFLAGS += $(C3BASE)/lib/root.r -RMAFLAGS += -I$(C3BASE)/lib +LFLAGS += $(NITROS9DIR)/lib/root.r +RMAFLAGS += -I$(NITROS9DIR)/lib ROFS = debug.r view.r view_arith.r view_clp.r view_cm3.r view_convert.r \ view_gfx.r view_gfx2.r view_gif.r view_gifcol.r view_gifpix.r \ diff -r 8b2df903334c -r 0a3f4d8ea6d5 ChangeLog --- a/ChangeLog Tue Jan 22 19:18:48 2013 -0600 +++ b/ChangeLog Wed Jan 23 12:36:55 2013 -0600 @@ -1,6 +1,25 @@ NitrOS-9 V3.2.9: ---------------------------------------------------------- +2013/01/23 David Ladd +M 3rdparty/utils/view/makefile +M ChangeLog +M level1/modules/dwread.asm +M level1/modules/dwwrite.asm + +Corrected a ENDC that was in the incorrect location in +dwread.asm and dwwrite.asm also moved the 6309 native code +into the H6309 section and changed the IFEQ H6309 to IFNE H6309 +so the code would get correctly loaded. Moved the 57600 6809 +code to the default location as it was in the old dwread.asm +and dwwrite.asm before these files got overwritten by the +dwread.asm and dwwrite.asm from HDBDOS project. + +Also did some updates to the 3rdparty/utils/view/makefile +but this file is not done yet to try to fix all the problems +with it. + +---------------------------------------------------------- 2013/01/18 David Ladd M ChangeLog M level2/coco3/cmds/makefile diff -r 8b2df903334c -r 0a3f4d8ea6d5 level1/modules/dwread.asm --- a/level1/modules/dwread.asm Tue Jan 22 19:18:48 2013 -0600 +++ b/level1/modules/dwread.asm Wed Jan 23 12:36:55 2013 -0600 @@ -1,322 +1,323 @@ -******************************************************* -* -* DWRead -* Receive a response from the DriveWire server. -* Times out if serial port goes idle for more than 1.4 (0.7) seconds. -* Serial data format: 1-8-N-1 -* 4/12/2009 by Darren Atkinson -* -* Entry: -* X = starting address where data is to be stored -* Y = number of bytes expected -* -* Exit: -* CC = carry set on framing error, Z set if all bytes received -* X = starting address of data received -* Y = checksum -* U is preserved. All accumulators are clobbered -* - - IFNE ARDUINO -* Note: this is an optimistic routine. It presumes that the server will always be there, and -* has NO timeout fallback. It is also very short and quick. -DWRead clra ; clear Carry (no framing error) - pshs u,x,cc ; preserve registers - leau ,x - ldx #$0000 -loop@ tst $FF51 ; check for CA1 bit (1=Arduino has byte ready) - bpl loop@ ; loop if not set - ldb $FF50 ; clear CA1 bit in status register - stb ,u+ ; save off acquired byte - abx ; update checksum - leay ,-y - bne loop@ - - leay ,x ; return checksum in Y - puls cc,x,u,pc ; restore registers and return - - ELSE - - IFNE JMCPBCK -* NOTE: There is no timeout currently on here... -DWRead clra ; clear Carry (no framing error) - deca ; clear Z flag, A = timeout msb ($ff) - tfr cc,b - pshs u,x,dp,b,a ; preserve registers, push timeout msb - leau ,x - ldx #$0000 - orcc #IntMasks -loop@ ldb $FF4C - bitb #$02 - beq loop@ - ldb $FF44 - stb ,u+ - abx - leay ,-y - bne loop@ - - tfr x,y - ldb #0 - lda #3 - leas 1,s ; remove timeout msb from stack - inca ; A = status to be returned in C and Z - ora ,s ; place status information into the.. - sta ,s ; ..C and Z bits of the preserved CC - leay ,x ; return checksum in Y - puls cc,dp,x,u,pc ; restore registers and return - ELSE - IFNE BECKER -* NOTE: There is no timeout currently on here... -DWRead clra ; clear Carry (no framing error) - deca ; clear Z flag, A = timeout msb ($ff) - tfr cc,b - pshs u,x,dp,b,a ; preserve registers, push timeout msb - leau ,x - ldx #$0000 - orcc #IntMasks -loop@ ldb $FF41 - bitb #$02 - beq loop@ - ldb $FF42 - stb ,u+ - abx - leay ,-y - bne loop@ - - tfr x,y - ldb #0 - lda #3 - leas 1,s ; remove timeout msb from stack - inca ; A = status to be returned in C and Z - ora ,s ; place status information into the.. - sta ,s ; ..C and Z bits of the preserved CC - leay ,x ; return checksum in Y - puls cc,dp,x,u,pc ; restore registers and return - ENDC - ENDC - - IFEQ BECKER+JMCPBCK+ARDUINO - IFNE BAUD38400 -******************************************************* -* 38400 bps using 6809 code and timimg -******************************************************* - -DWRead clra ; clear Carry (no framing error) - deca ; clear Z flag, A = timeout msb ($ff) - tfr cc,b - pshs u,x,dp,b,a ; preserve registers, push timeout msb - orcc #$50 ; mask interrupts - tfr a,dp ; set direct page to $FFxx - setdp $ff - leau ,x ; U = storage ptr - ldx #0 ; initialize checksum - adda #2 ; A = $01 (serial in mask), set Carry - -* Wait for a start bit or timeout -rx0010 bcc rxExit ; exit if timeout expired - ldb #$ff ; init timeout lsb -rx0020 bita