home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 3609 
 George to All 
 Re: Plus 4 rom error - is there any plac 
 25 Nov 21 17:57:04 
 
INTL 3:770/1 3:770/3
REPLYADDR gh424NO584SPAM@cox.net
REPLYTO 3:770/3.0 UUCP
MSGID: <20211125-235704.195.0@George.ssl-us.astraweb.com> fc1d9b5a
REPLY: <20211114-040302.878.0@George.ssl-us.astraweb.com> 1cb1e1cc
PID: SoupGate-Win32 v1.05
Just to bring this to a conclusion, I've written alternative IRQ servicing
code that bypasses the "BEQ" error in rom, and a BASIC program that
installs the new code into the tape buffer.  It's 120 bytes of ML that does
the ACIA processing and then jumps back into ROM for the rest of the IRQ
routine.  The BASIC program and the source code for the ML portion are
shown below. The actual .PRG file can be downloaded from my Github CBM
repo:

https://github.com/gbhug5a/My_CBM_stuff

Since I no longer have a +4, I have no way to test the new code.

10 rem this code bypasses the "beq" bug
12 rem in the +4's irq acia received-
14 rem byte routine, and eliminates the
16 rem xon/xoff software flow control
18 rem code in both xmit and receive.
20 rem the irq service routine vector
22 rem ($0314) normally points to $ce0e.
24 rem this code duplicates that code up
26 rem to the acia, fixes that, then
28 rem jumps back into rom.  the code is
30 rem poked into the cassette buffer at
32 rem $0333, but can be placed anywhere
34 rem visible in ram when kernel and
36 rem basic roms are banked in.  sys
38 rem to the first byte to take over
40 rem $0314. no need to re-assemble for
42 rem a different location. the code
44 rem detects where it has been placed.
46 rem sys (first byte + 26) to restore
48 rem the the $0314 vector to $ce0e.
100 cb = 819
110 for i = 0 to 119
120 read a
130 poke cb+i,a
140 next
150 sys cb
160 v= (peek(789)*256) + peek(788)
170 print "irq ram vector now";v
180 data 120,32,85,252,186,202,189,0
190 data 1,24,105,36,141,20,3,232
200 data 189,0,1,105,0,141,21,3
210 data 88,96,120,169,14,141,20,3
220 data 169,206,141,21,3,88,96,173
230 data 9,255,41,2,240,3,32,96
240 data 206,44,216,7,16,63,173,1
250 data 253,141,212,7,16,55,173,212
260 data 7,41,8,240,24,173,212,7
270 data 41,247,141,212,7,173,0,253
280 data 141,213,7,173,211,7,201,63
290 data 240,3,32,220,234,173,212,7
300 data 41,16,240,17,173,16,253,41
310 data 2,240,10,162,0,44,206,7
320 data 16,3,32,131,234,76,43,206

.6502

;code to bypass error in +4 acia irq receive-byte routine,
;and eliminate xon/xoff software flow control for
;transmit and receive.

.org $0333           ;object code can be moved anywhere
                     ;  without reassembly
                     ;sys entry to set irq vector to newirq
                     ;sys restore (entry + 26) to restore
		     ;  default vector

entry:

   sei
   jsr   $fc55       ;just rts there
   tsx               ;pc now in stack
   dex
   lda   $0100,x
   clc
   adc   #(newirq - entry - 3) ;point to newirq
   sta   $0314
   inx
   lda   $0100,x
   adc   #0
   sta   $0315       ;irq vector now newirq
   cli
   rts               ;return from sys

restore:             ;restore = entry + 26

   sei               ;restore vector to $ce0e
   lda   #$0e
   sta   $0314
   lda   #$ce
   sta   $0315
   cli
   rts

newirq:              ;$035a (858) if entry = $0333

   lda   $ff09       ;not related to acia
   and   #$02
   beq   checkacia
   jsr   $ce60

checkacia:

   bit   $07d8       ;acia present?
   bpl   backtorom
   lda   $fd01       ;read status reg
   sta   $07d4       ;save status reg
   bpl   backtorom   ;bit 7 set if acia triggered irq

receive:

   lda   $07d4       ;new byte received?
   and   #$08
   beq   transmit
   lda   $07d4
   and   #$f7
   sta   $07d4
   lda   $fd00       ;new byte
   sta   $07d5

   lda   $07d3       ;number of bytes in queue
   cmp   #$3f
   beq   transmit    ;discard byte if full

   jsr   $eadc       ;add new byte to input queue

transmit:

   lda   $07d4
   and   #$10        ;transmit buffer empty?
   beq   backtorom
   lda   $fd10       ;pin k of user port = cts
   and   #$02
   beq   backtorom   ;modem says don't send
   ldx   #$00
   bit   $07ce       ;anything to send?
   bpl   backtorom
   jsr   $ea83       ;send it

backtorom:

   jmp   $ce2b       ;acia done, continue rest of irq
--- SoupGate-Win32 v1.05
 * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
SEEN-BY: 1/123 14/0 18/200 90/1 103/705 105/81 120/340 123/131 129/305
SEEN-BY: 153/250 757 154/10 218/700 840 220/70 221/1 6 226/17 30 227/114
SEEN-BY: 229/424 426 428 664 700 240/1120 5832 249/1 206 317 400 261/38
SEEN-BY: 267/800 282/1038 301/1 113 317/3 322/757 335/364 340/1000
SEEN-BY: 341/66 342/200 633/280 712/848 770/1 3 100 340 772/210 220
SEEN-BY: 772/230 920/1 4500/1 5058/104
PATH: 770/3 1 218/840 221/6 301/1 229/426


<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca