Page 1 of 4

W65C816SXB

Posted: Wed Aug 05, 2015 9:36 am
by BitWise
I ordered a W65C816SXB yesterday to try some code out on - Quicker than building my own but a bit pricey (£160 so far and I might be done for import duty -- ordered from Mouser UK but being delivered from TX, USA).

Its a bit of shame that the board only comes with 32K on onboard RAM and its not entirely clear how the 128K Flash ROM works -- one line in the 'datasheet' suggests that there are some bank selection pins on one of the connectors.

Re: W65C816SXB

Posted: Wed Aug 05, 2015 7:58 pm
by floobydust
I also looked at their SXBs when they first announced them. I agree that the 65C816 board should have more RAM by default, no real reason, sans the cost of using the same SRAM chips on all of their SXBs. They've also integrated their TIDE interface which should be a plus when using their dev IDE, but I've no experience using it (TIDE interface). According to the doc, two pins of the TIDE VIA control the extra address lines on the 128KB EEPROM. It's anyone's guess on the configuration of how the lines are configured and which 32KB bank of the EEPROM they use. An email to David Gray should help get some detail. I'd be interested to know which W65C51 chip LOT# they are supplying with the SXB. The ACIA connector is just raw pins, so using it requires a level shifter for RS232 or an FTDI USB/UART chip.

As you ordered from the UK distributor, you shouldn't get sacked with the duty costs as a result of their non-stock inventory. Mouser in the US is based in Dallas, Texas, so the additional shipping and duty should be their responsibility, not yours. Do post your findings once you get the board and have some luck getting some code loaded.

Re: W65C816SXB

Posted: Thu Aug 06, 2015 9:20 am
by BitWise
My SXB has just arrived and I can already see that the surface mount tact switch for the NMI interrupt was not well soldered and has come off the board.

Re: W65C816SXB

Posted: Thu Aug 06, 2015 5:45 pm
by BigDumbDinosaur
BitWise wrote:
My SXB has just arrived and I can already see that the surface mount tact switch for the NMI interrupt was not well soldered and has come off the board.
That's not a ringing endorsement by any measure. Can you fix it yourself?

Re: W65C816SXB

Posted: Thu Aug 06, 2015 7:11 pm
by BitWise
I've soldered the TACT back on and tried the demo project.
W65C816SXB.jpg
When I try to create my own project I get an "Failed to set 'Version'" error when I try to close the options dialog.
version error.jpg
version error.jpg (20.74 KiB) Viewed 2575 times
I can assemble a code module and get a listing but I can't link yet. The TIDE documentation is not very detailed.

It looks like you need to define a 'shadow' vector table as part of your code (its in the demo) but there is no documentation describing how the WDC firmware interacts with your program.

Re: W65C816SXB

Posted: Thu Aug 06, 2015 7:20 pm
by BitWise
On page 7 of the board manual note how the ACIA pin out looks like a copy and paste of the start of the 65C22 table

http://www.westerndesigncenter.com/wdc/ ... 816SXB.pdf

Re: W65C816SXB

Posted: Thu Aug 06, 2015 8:05 pm
by floobydust
That is somewhat disappointing regarding the switch. I also caught the pinout on the ACIA being a copy/paste on the 65C02 version and alerted David at WDC... he fixed it in the C02 version PDF, then I found the same on the C816 board. Here's the correct pinout:
ACIA-Pinout.jpg
ACIA-Pinout.jpg (23.76 KiB) Viewed 2563 times
I'd be interested to know the Lot# on the W65C51, to see if it's the known Xmit bit buggy version.

What version of TIDE are you using?

Re: W65C816SXB

Posted: Thu Aug 06, 2015 8:38 pm
by BitWise
floobydust wrote:
That is somewhat disappointing regarding the switch. I also caught the pinout on the ACIA being a copy/paste on the 65C02 version and alerted David at WDC... he fixed it in the C02 version PDF, then I found the same on the C816 board. Here's the correct pinout:
ACIA-Pinout.jpg
I'd be interested to know the Lot# on the W65C51, to see if it's the known Xmit bit buggy version.

What version of TIDE are you using?
I downloaded the latest 2.0.5.0 but I've abandoned it for now and am using a Makefile with Microsoft NMAKE to drive the build.

I guessed the pin out would be the same as the 65C02 board but would like it confirmed and documented properly. I think they should also make the location of pin 1 explicit for each of the connectors in the board picture.

Re: W65C816SXB

Posted: Thu Aug 06, 2015 9:07 pm
by BigDumbDinosaur
I hope WDC is being made aware of these contretemps.

Not too long after the SXB boards were announced I contemplated getting one for experimentation. However, when I saw that the 65C816 SXB had only 32KB of RAM installed I decided against it. The '816 can address 16MB, so why did WDC decide to install such a small amount of RAM? My POC V1.1 unit has 20KB more, and much faster TIA-232 to boot. Had the SXB had at least 512KB I would have considered it.

Re: W65C816SXB

Posted: Thu Aug 06, 2015 9:10 pm
by BigDumbDinosaur
BitWise wrote:
floobydust wrote:
What version of TIDE are you using?
I downloaded the latest 2.0.5.0 but I've abandoned it for now and am using a Makefile with Microsoft NMAKE to drive the build.
I too had gotten TIDE but set it aside, as it didn't mesh well with the way in which I develop assembly language programs. Frankly, I found TIDE to be a cumbersome and non-intuitive environment. I continue to develop in Mike Kowalski's simulator due to the speed at which I can go from editing to assembling to generation and transmission of an S-record object file to POC.

Re: W65C816SXB

Posted: Thu Aug 06, 2015 10:10 pm
by BitWise
I don't think adding more RAM will be particularly hard. One of the connectors carries D<7:0> + A<23:0> along with VDA and VPA for chip select generation and RWB and PHI2 for OE,WR. One SRAM and a GAL are all you need to expand the memory by 128K or 512K.

CS = (A<23:16> between 1 and 8 ) & (VPA | VDA)
OE = RWB & PHI2
WR = !RWB & PHI2

The WDC tools work quite well with a simple makefile and a few batch files to kick off builds and debugging. Its the same way I drive my JAVA based tools.

I think WDC need to add some more documentation for the firmware and the USB protocol used by the debugger. Seems silly protecting it as you would have to pull and read the flash ROM if you wanted to make use of the spare 96K inside it.

Re: W65C816SXB

Posted: Fri Aug 07, 2015 10:50 pm
by BitWise
Ok. So I now have the UART working at 19200 (the top speed) and can confirm that the 65C51 ACIA is one of the bugged versions.

WDC sent me a copy of the schematic which allowed me to investigate the flash ROM. It can be reprogrammed under software control. A couple of VIA outputs can be used to select the active bank and the ROM has software unlock sequence to allow writing.

Re: W65C816SXB

Posted: Sun Aug 09, 2015 4:06 pm
by BitWise
Yesterday's minor annoyance with WDC's assembler this that equates can only be absolute expressions, its not a fully relocatable assembler.

Today's is that it does not like spaces in expressions. It silently stops parsing at the first one.

For example, given this definition

Code: Select all

    29             007A1200   OSC_FREQ        equ     8000000                 ; SXB runs at 8MHz
WDC816AS will produce this:

Code: Select all

    57             007A1200   TXD_COUNT_SP    equ     OSC_FREQ / (BAUD_RATE / 11)
    58             000011E8   TXD_COUNT       equ     OSC_FREQ/(BAUD_RATE/11)
Edit: Added example code

Re: W65C816SXB

Posted: Sun Aug 09, 2015 9:30 pm
by BitWise
This evenings annoyance is that the SXB seems to be using all the timers on both VIAs to drive the debugger even though the documentation suggests only one VIA is used for TIDE.

I'm seriously considering ditching the WDC firmware and development tools altogether, ordering a spare flash ROM and starting again completely from scratch. Using the USB FIFO as a fast serial connection (which seems to be supported by the device driver -- its appears as COM11) to access a decent on board monitor would be much more productive and ultimately a much easier route to boot something like FUSIX.

The board and the software have the potential to be good but there are just so many rough edges that need sorting out.

Re: W65C816SXB

Posted: Fri Aug 14, 2015 8:50 pm
by BitWise
I managed to download and disassemble the WDC firmware. There are no references to the VIA I was using it so I think the problem lies in their debugger.

I had a memory window open showing the VIA registers and it was reading the values from memory. Unfortunately reading some of the timer latches and counts clears the interrupt flags so the debugger was clearing the interrupts before my code had a chance to see the flags. I have a suspicion that even when the window is closed the memory is read in the background.

I've managed to switch pages in the 128K flash ROM but the ACIA is being very unreliable. It periodically locks up until it has received a number (~30) characters then it starts working again. I did at one point take control of the USB Serial FIFO and use it as a COM port. When you take control the debugger locks up and has to be killed with task manager.

WDC sent me a links to a new copy if the 816 assembler and linker. Unfortunately the assembler crashed and the Norton is convinced that the linker contains a virus.

The hacking continues ...