FIG Forth on the WDC W65C134SXB board

Topics relating to various Forth models on the 6502, 65816, and related microprocessors and microcontrollers.
Post Reply
cheekyfox
Posts: 19
Joined: 20 Mar 2010
Location: Germany

FIG Forth on the WDC W65C134SXB board

Post by cheekyfox »

So I first encountered FORTH in 1983 at the Army Apprentice College, I already knew about BASIC so they had a teacher come in to teach me FORTH as one of the BBC Microcomputers had a FORTH ROM installed. So since then I have had a paper listing of FIG FORTH and wanted now to give it a go. So purchased a board from WDC with the W65C134S microcontroller and 32k RAM and a socket for an external ROM chip ( 128k ). I also got the memSIM2 emulator and a cheap USB logic analyser.

First was to get the board to jump from the internal ROM to the external ROM at $800, much head scratching (and use of the logic analyser) later I acheived the fisrt 'Hello World' ( Assembler ) from the external ROM using the internal Serial routines. Then I ported over what I needed for the FORTH ( mainly serial in and out via RS232/USB ) connection and got this running.

So I had the basics in place and started on the FORTH kernel, converting it to assemble with the WDC tool set, the hardest part was getting it to compile to run in RAM but be stored in ROM. The startup would copy it from ROM to RAM before calling 'COLD'.

Then I got it to run and print 'fig-FORTH 1.0' on the terminal emulator.

A little debugging later I have a running system on the board. It currently has a RAM disk buffer that holds 16 screens, this is initialised from data in the ROM at start up... what joy to see '? EMPTY STACK' instead of '? MSG # 0'.

Next job is to see if I can boot straight into the external ROM after RESET and bypass the internal ROM completly.

Points to note:
1) WDC Data sheets and manuals need a lot of time to understand and they miss a few points out.
2) Board is good for a start up system, would like to add in a second serial port to get a 'disk' added.
3) The board has 16 bytes of zero page missing, and would need considerable external decoding and RAM chip to add this. Why they did not have this on board is another question.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: FIG Forth on the WDC W65C134SXB board

Post by BigEd »

(Welcome back! Haven't seen you for a while.)
cheekyfox
Posts: 19
Joined: 20 Mar 2010
Location: Germany

Re: FIG Forth on the WDC W65C134SXB board

Post by cheekyfox »

Thanks for the welcome back, life got in the way ( in a bad way ). So picking myself up and moving forward. Nice to get back to some 6502 work. Just plqanning what to do next...
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: FIG Forth on the WDC W65C134SXB board

Post by BigEd »

Well done on the successful bringup though. Odd that there should be some missing zero page... perhaps not a problem so long as it's well-documented... which is not a WDC strength.
cheekyfox
Posts: 19
Joined: 20 Mar 2010
Location: Germany

Re: FIG Forth on the WDC W65C134SXB board

Post by cheekyfox »

It has from $00 to $2F for the internal registers ( IO etc ) and $40 to $FF for internal RAM. On the board the external ram is mapped to the CS6 line which is from $0100 to $7FFF. To get to the 'missing' 16 bytes ( $30 to $3F ) you would need to use the CS0 line and gate it with the CS6 line to use on the external RAM ( involving cutting tracks on the board ) or add a second board with a 16 byte memory chip to fill the gap.
Zero page is the most important part of the 6502 memory map so they should have filled it completly.
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: FIG Forth on the WDC W65C134SXB board

Post by BigEd »

Oh, I see, I/O in zero page - that's a tradeoff.
cheekyfox
Posts: 19
Joined: 20 Mar 2010
Location: Germany

Re: FIG Forth on the WDC W65C134SXB board

Post by cheekyfox »

The 65c265 microcontroller is better in that it has a full 512 bytes of ram covering page 0 and 1. IO is mapped at higher addresses ($Dxxx). Maybe my next challange is to get the c265 board and get FIG working in Native mode on it. Then enjoy the fun of getting it working with 16 bit registers.
Or get a 5v CPLD/GAL/FPGA and expand the current board.
pbj
Posts: 34
Joined: 24 Jun 2019

Re: FIG Forth on the WDC W65C134SXB board

Post by pbj »

cheekyfox wrote:
The 65c265 microcontroller is better in that it has a full 512 bytes of ram covering page 0 and 1. IO is mapped at higher addresses ($Dxxx). Maybe my next challange is to get the c265 board and get FIG working in Native mode on it. Then enjoy the fun of getting it working with 16 bit registers.
Or get a 5v CPLD/GAL/FPGA and expand the current board.

I used the M377xx which is a superset of the 65816 in the 90's plus I have an industrial strength Forth that I wrote for it. I do have some 134 and 256 samples floating around though plus I think there was another chip they had too a bit like the 134.
cheekyfox
Posts: 19
Joined: 20 Mar 2010
Location: Germany

Re: FIG Forth on the WDC W65C134SXB board

Post by cheekyfox »

Have just started putting in Garth's zero-overhead service routines, it now deals with a timer interrupt that goes off each 1 second and increments a counter.

Next is the big work of moving the UART TX/RX routines from external routines into the FORTH kernal.

I keep asking why
and get the answer WHY ? MSG # 0
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: FIG Forth on the WDC W65C134SXB board

Post by barrym95838 »

cheekyfox wrote:
I keep asking why
and get the answer WHY ? MSG # 0
On the TRS-80 Model I Level I the answer was WHAT?
But carefully and slowly repeating the question had no effect. Maybe a more appropriate response would have been DUNNO.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: FIG Forth on the WDC W65C134SXB board

Post by Dr Jefyll »

From another post... :)
Attachments
DSC01724ShpCrpLores.JPG
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
JimBoyd
Posts: 931
Joined: 05 May 2017

Re: FIG Forth on the WDC W65C134SXB board

Post by JimBoyd »

barrym95838 wrote:
cheekyfox wrote:
I keep asking why
and get the answer WHY ? MSG # 0
On the TRS-80 Model I Level I the answer was WHAT?
But carefully and slowly repeating the question had no effect. Maybe a more appropriate response would have been DUNNO.

Each time I ask WHY? , I get a different answer! :lol:
Post Reply