Page 2 of 2

Re: Trying to figure out tho WDC C compiler

Posted: Thu Mar 14, 2019 11:55 pm
by randrews
Which is exactly what I'm doing now, but it would be nice if they told you that, maybe along with a #define you can do to enable monitor-outputting versions.

Re: Trying to figure out tho WDC C compiler

Posted: Wed Oct 23, 2019 1:11 pm
by dderny
At least they could provide an empty stub with the functions to implement
with the list of functions and some indication of what each function should do

for example as in the customisation kit for multiplan/word in 1985

finally all that is not very serious
- tide.exe not working
- debugger working from time to time
- board received broken, I had to resolder the reset button

Re: Trying to figure out tho WDC C compiler

Posted: Wed Oct 23, 2019 8:37 pm
by BigEd
Welcome, dderny! Feel free to introduce yourself in the Introduce Yourself topic, and let us know what kinds of projects interest you, and so on. And start a new topic if you have a project of your own you'd like to showcase, or tell the story of as it unfolds.

Re: Trying to figure out tho WDC C compiler

Posted: Wed Oct 30, 2019 12:13 pm
by dderny
I contacted WDC about the compiler, they sent me an example working but not using the library
as soon as I tried their script with a source using the library I got the same problem :(

they told me that the compiler was not "seeing" the library
that on windows WDC_LIB was set automatically

I checked the variable, it exist and is pointing to the right directory

frankly I'm deceived by the W65C816SXB board. I had great expectations [sorry some days I feel like Dickens :) ]
but till now I had to repair the board to use it (bad solder on reset)
and I've not been able to compile anything serious

in the past on C64 I compiled Conroy's emacs and David Betz lisp...
now I'm not even able to compile "hello world"

has anybody successfully used tide.exe on window 10 ? (till now it's a tidal wave of failures, even when trying xp compatibility)
is there any method to start the debugger successfully each time ? (resoldering reset helped me a lot but it's not perfect)

what can we really do with WDCTOOLS ? I'm not sure the license permit to build a software
for any board containing a 65c816...

perhaps that we could try to gather the information on a page to help people wanting to use this board
actually I'm using the board in emulation mode and I'm assembling with 64tass.

Re: Trying to figure out tho WDC C compiler

Posted: Wed Oct 30, 2019 12:56 pm
by BitWise
I have used the compiler to build a 816 executable for the 265SXB using a copy of Microsoft Make and a makefile. I never use TIDE but I do sometimes use the debugger with the 816SXB.

I don't have a small C application that I can post as an example. Its on my to do list.

In my application I used #define to redirect some standard I/O functions to my own code.

Code: Select all

#define getchar			uart3_getchar
#define putchar			uart3_putchar
#define puts			uart3_puts
I was considering rebuilding the library to make a cleaner split between the core routines (ctype, string, stdlib) and those related to files and I/O (stdio) but its a pain without the source code, especially as you need to do it for the four memory models.

The WDC C header files could do with a clean up. There's a load of irrelevant definitions in some of them.

This is series of commands that builds the parts of a simple BASIC interpreter I'm working on in C.

Code: Select all

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

        wdc816as -G -LW boot.asm
WDC 65C816 Assembler  Version 3.49.1 Feb  6 2006 17:24:51
       Copyright (C) 1992-2006 by The Western Design Center, Inc.
        wdc816as -G -LW setjmp.asm
WDC 65C816 Assembler  Version 3.49.1 Feb  6 2006 17:24:51
       Copyright (C) 1992-2006 by The Western Design Center, Inc.
        wdc816cc -BS -LW -SOP -MC -MK -MT -MU -MV -SS -PE -DUSING_816 basic.c
WDC 65816 C   Version 3.49  Jan 19 2006 14:38:08
      Copyright (C) 1992-2006 by The Western Design Center, Inc.
WDC 65C816 Optimizer Version 3.49.1  Feb  6 2006 13:38:41
      Copyright (C) 1992-2006 by The Western Design Center, Inc.
        wdc816cc -BS -LW -SOP -MC -MK -MT -MU -MV -SS -PE -DUSING_816 w65c265.c
WDC 65816 C   Version 3.49  Jan 19 2006 14:38:08
      Copyright (C) 1992-2006 by The Western Design Center, Inc.
WDC 65C816 Optimizer Version 3.49.1  Feb  6 2006 13:38:41
      Copyright (C) 1992-2006 by The Western Design Center, Inc.
        wdcln -G -HM28 -T -CC00000 -DC10000 -Obasic.s28 boot.obj setjmp.obj basic.obj w65c265.obj -LMC -LCC
WDC 65C816 Linker Version 3.49.1 Apr 24 2006 15:40:38
   Copyright (C) 1992-2006 The Western Design Center, Inc.

Section: ORG:    ROM ORG:  SIZE:
CODE     C00000  C00000     23DAH (  9178)
KDATA    C023DA  C023DA       D8H (   216)
DATA     C10000  C10000        2H (     2)
UDATA    C10002  ------      19DH (   413)
boot     00FF00  00FF00      100H (   256)
Total                       2751H ( 10065)

Re: Trying to figure out tho WDC C compiler

Posted: Wed Nov 06, 2019 2:15 pm
by BitWise
I spent some time over the last week putting together a complete program for the W65C816SXB board that contains a custom boot module, interrupt handling and stub stdio functions. I've just made the GitHub repository for it public here:

https://github.com/andrew-jacobs/w65c816sxb-cdemo

I haven't finished documenting all the header files or completed the #defines for the PIA (which probably won't inconvience anyone as it not a well liked chip).

Everything you need to build and run the application EXCEPT the WDC C compiler and tools is included in the repository. The 'make' batch file kicks of the build process. The 'clean' batch file erases all the compiler generated files. Just double kick them on a Windows system to run them or start a command shell in the same directory. (You might need to tell Windows to trust them if you download the repository as a ZIP)

I'm using T2 on the system VIA to generate an interrupt when its time to transmit a character to get around the broken TDRE bit on the 65C51. Its running all the time at the moment and I suspect it could be disabled when the transmit buffer is empty but it works.