changeset 1737:fdb0dde809d2

Boisy, I just had to rebuild my OS-9 system after a problem with a hard drive. One of many files lost was the source for my current cc3disk so I decided to use rb1773.asm. After several days of struggling without getting the rb1773 code to work, I found a required small change. It may not affect stock SCII units but my altered unit (512 RAM buffer) definitely needs it. I already new that using TFM to transfer to the RAM buffer is problematic at 2Mhz. On my unit, I also can't use a LDD or STD to the RAM buffer on the board at 2Mhz in native mode. I should say that my unit is right on the unstable edge if I used a two byte transfer and it mostly does not work. To accommodate the above, parts of the read/write code need to be changed for SCII units just in case the hardware mod is not the cause of the instability.
author boisy
date Fri, 03 Dec 2004 01:05:27 +0000
parents fd288a57f6ab
children afae4d350682
files level1/modules/rb1773.asm
diffstat 1 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/rb1773.asm	Fri Dec 03 01:00:21 2004 +0000
+++ b/level1/modules/rb1773.asm	Fri Dec 03 01:05:27 2004 +0000
@@ -482,31 +482,31 @@
 
 good     pshs  y
          IFNE  H6309
-         ldw   #128           set counter
+         ldw   #256           set counter
          ldy   #RW.DAT        source of data
          IFNE  SCIIHACK
          tst   flag512,u
          beq   sc2rlp
-         ldw   #256          bump up counter to 512 byte sector
+         ldw   #512          bump up counter to 512 byte sector
          ENDC
 * Don't use tfm if no halt important else need orcc #$50 for tfm
 * If an interrupt occurs during a tfm transfer, the SCII counter
 * will update but the tfm will repeat a byte and lose track.
 * If orcc #$50 used, then key presses may be lost even with no-halt
 * mode.
-sc2rlp   ldd   ,y             read two bytes from SCII
-         std   ,x++           transfer two bytes to system buffer
+sc2rlp   lda   ,y             read byte from SCII
+         sta   ,x+            transfer byte to system buffer
          decw                 update counter
          bne   sc2rlp
          ELSE
-         ldy   #128
+         ldy   #256
          IFNE  SCIIHACK
          tst   flag512,u
          beq   sc2rlp
-         ldy   #256
+         ldy   #512
          ENDC
-sc2rlp   ldd   >RW.DAT
-         std   ,x++
+sc2rlp   lda   >RW.DAT
+         sta   ,x+
          leay  -1,y
          bne   sc2rlp
          ENDC
@@ -692,21 +692,21 @@
          pshs  y
          ldy   #RW.Dat         Send data to SCII RAM buffer
          IFNE  H6309
-         ldw   #128
+         ldw   #256
          tst   flag512,u
          beq   wrbuf
-         ldw   #256
-wrbuf    ldd   ,x++
-         std   ,y
+         ldw   #512
+wrbuf    lda   ,x+
+         sta   ,y
          decw
          bne   wrbuf
          ELSE
-         ldy   #128
+         ldy   #256
          tst   flag512,u
          beq   wrbuf
-         ldy   #256
-wrbuf    ldd   ,x++
-         std   >RW.DAT
+         ldy   #512
+wrbuf    lda   ,x+
+         sta   >RW.DAT
          leay  -1,y
          bne   wrbuf
          ENDC