[Coco] Frank Hogg Labs E-Forth, which is the only thing I’ve found that won’t run on the CoCo3FPGA ?

phil pt ptaylor2446 at gmail.com
Fri Feb 23 23:14:13 EST 2018


Yummy I love it and using the VI Editor.

On Fri, Feb 23, 2018 at 5:13 AM, Leslie Ayling <layling at bigpond.net.au>
wrote:

> Hi Stephen, Dave, et al.
>
> > If you smart guys can find a work-around to get FHL E-Forth to work on
> the CoCo3FPGA, I will be very grateful!
>
> Yep, certainly do-able.
>
> I've located the routine in the Forth executable which scans the keyboard
> matrix.
> See below with some comments.
>
> As Dave surmised, it does indeed drive the keyboard ports in a
> non-standard way.
>
> The routine relies on the fact that a *real* 6821 PIO has internal pull-up
> resistors on Port A.
> Instead of driving all bits of $F002 as outputs, it only drives one column
> at a time, the other bits will float high
> and appear as '1' when reading the row value from $F000.
>
> From what I can see, only David Keil's MS-DOS emulator correctly emulates
> the pull-ups on port A.
>
> Coco3FPGA certainly doesn't handle it, neither does VCC or Jeff V's
> emulators.
>
> Probably easiest to patch the routine so that it will just work on both
> real hardware and *all* the emulators.
>
>
> RAM:302C
> RAM:302C                READ_KBD_PIO:                           ; CODE
> XREF: RAM:loc_3086↓p
> RAM:302C 34 1E                          pshs    a,b,dp,x
> RAM:302E 86 FF                          lda     #$FF
> RAM:3030 1F 8B                          tfr     a, dp           ; Direct
> Page = $FFXX now
> RAM:3032 DC 02                          ldd     <byte_2         ; read A
> <= $FF02, B <= $FF03
> RAM:3034 34 02                          pshs    a
> RAM:3036 C8 04                          eorb    #4              ; Flip DDR
> select bit for port B ($FF02)
> RAM:3038 D7 03                          stb     <byte_3         ; save old
> contents of $FF03 back to $FF03 ???
> RAM:303A 96 02                          lda     <byte_2         ; A <=
> $FF02
> RAM:303C 34 06                          pshs    a,b             ; $FF $10
> on first run through
> RAM:303E 8E 30 24                       ldx     #word_3024
> RAM:3041 86 01                          lda     #1              ; start at
> column 0 : @,H,P,X,0,8,<ENTER>
> RAM:3043
> RAM:3043                loc_3043:                               ; CODE
> XREF: READ_KBD_PIO+32↓j
> RAM:3043 C6 30                          ldb     #$30 ; '0'
> RAM:3045 D7 03                          stb     <byte_3         ; $FF03
> select DDR in $FF02
> RAM:3047 97 02                          sta     <byte_2         ; *$FF02
> select only *1* column as output, rest are HI-Z (value in A)
> RAM:3049 C6 34                          ldb     #$34 ; '4'
> RAM:304B D7 03                          stb     <byte_3         ; select
> output register
> RAM:304D 0F 02                          clr     <byte_2         ; $FF02 <=
> $00, but only one bit will be selected as an output.
> RAM:304D                                                        ; ** Next
> instruction relies on the internal pull-ups on port A **
> RAM:304D                                                        ; Only one
> bit can be low!
> RAM:304F D6 00                          ldb     <byte_0         ; read B
> <= $FF00,
> RAM:3051 53                             comb
> RAM:3052 E4 10                          andb    -$10,x          ; $3014 ->
> $301B
> RAM:3054 E7 10                          stb     -$10,x
> RAM:3056 D6 00                          ldb     <byte_0
> RAM:3058 53                             comb
> RAM:3059 EA 84                          orab    ,x              ; $3024 ->
> $302B
> RAM:305B E7 80                          stb     ,x+
> RAM:305D 48                             asla                    ; shift
> column select bit left for next run through
> RAM:305E 24 E3                          bcc     loc_3043        ; have we
> done all 8 columns yet?
> RAM:3060 35 06                          puls    b,a
> RAM:3062 D7 03                          stb     <byte_3
> RAM:3064 97 02                          sta     <byte_2
> RAM:3066 C8 04                          eorb    #4
> RAM:3068 D7 03                          stb     <byte_3
> RAM:306A 35 02                          puls    a
> RAM:306C 97 02                          sta     <byte_2
> RAM:306E 35 9E                          puls    pc,x,dp,b,a
> RAM:306E                ; End of function READ_KBD_PIO
>
>
> Cheers,
> Leslie
>
>
> -----Original Message-----
> From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Stephen
> Pereira
> Sent: Friday, 23 February 2018 12:03 PM
> To: CoCoList for Color Computer Enthusiasts
> Subject: Re: [Coco] Frank Hogg Labs E-Forth, which is the only thing I’ve
> found that won’t run on the CoCo3FPGA ?
>
> If you smart guys can find a work-around to get FHL E-Forth to work on the
> CoCo3FPGA, I will be very grateful!
>
> smp
> - - -
> Stephen Pereira
> Bedford, NH. 03110
> KB1SXE
>
>
> > On Feb 22, 2018, at 7:27 PM, Leslie Ayling <layling at bigpond.net.au>
> wrote:
> >
> > Hi Dave, et al.
> >
> > I'm finding it very interesting indeed.
> >
> > I've tried E-Forth out on all the available emulators I have.
> >
> > Only works correctly on David Keil's MS-DOS emulator, but it's difficult
> to debug there.
> >
> > Doesn't work on VCC or Jeff V's emulators, you just get a row of chars
> for each keypress.
> >
> > Still trying to work out exactly what it is doing....
> >
> >
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list