Hi
I have just started my journey down the 6502 road, or perhaps continuing where I left off back in the 80's.
I started with an "Aloha 66" clone of an Apple 2. Unfortunately I no longer have any of the gear that I collected back in the day.
I am currently looking at the WDC compiler.
I am a (Electronics Engineer) embedded C programmer and not really that keen to go back to assembler if I can help it. (though I think assembler it may be)
Tide is a waste of time. I thought it would be something like AVR studio....IDE as in "Integrated Development Environment"....as in editor.
It can call an external editor...that's about it.
If I try to change anything in options I get an Error message "Failed to set data for 'Version'" ...don't know what this means.
Though, when I finally exit options and come back in the changes are there. I had other problems too.
I would not bother with Tide, seems buggy.
(If I supplied software like this to a customer I would be out of business)
After finding the startup.asm files in your posts, (Thanks)
I have managed to compile a simple program for example,
unsigned char x, y;
void main(void)
{
y = 100;
for(x=0;x<10;x++)
{
y++;
}
while(1);
}
Error reporting is rudimentary. For example drop the semi-colon at Y=100 above and you get
WDC 65C02 C Version 3.49.1 Feb 6 2006 16:25:18
Copyright 1992-2006 by The Western Design Center, Inc.
for(x=0;x<10;x++)
So the problem is possibly on or above this line....but we can't tell you any more.
I then add these lines and re-compile
#include "stdio.h"
char WrkSpc[20];
sprintf(WrkSpc,"HELLO WORLD");
WDC 65C816 Linker Version 3.49.1 Apr 24 2006 15:40:38
Copyright (C) 1992-2006 The Western Design Center, Inc.
Undefined symbol: _unlink
Undefined symbol: _close
Undefined symbol: _isatty
Undefined symbol: _write
Undefined symbol: _lseek
Now, the documentation (
https://www.wdc65xx.com/wdc/documentati ... Linker.pdf) mentions in CHAPTER 7 WDCLN (LINKER)
that
Note: There are calls to user defined functions that are system dependent.
Example: _unlink, _ _close, _ _isatty,_ _write, _ _lseek, _ _fseek.
_ _read, _ _open, _ _creat, _ _ access (see WDC_SDS/INCLUDE/FCNTL.H
So I guess I need to write some code to perform these functions or maybe do nothing.
I don't see how sprintf uses them because the result from sprintf goes back to memory.
Actually, after this compile and link there is a HEX file. Not sure if the code will run or not.
As was pointed out, without the ability to recompile the libraries (with modified zpage and cfg files) you are stuck with the standard zpage layout.
This to me is a major problem for what I had in mind.
It would be nice to get this compiler working and to see some (even if limited) support from WDC. It could only benefit them in the long run.
(Off topic)
I receive a first (prototype) 6502 PCB in a few days. Was to lazy to breadboard or use vero board. Some people have too much time.
Was hoping to have the compiler ready to test. The board is pretty much just CPU + memory + 2 expansion slots. I did breadboard a potential video card based loosely on Ben Eater's videos. Bread boarding it is painfully slow and fixing errors means hours of rework. I bought an Altera CPLD programmer and dev board instead. Much easier to change logic on the fly.
Please keep this post alive with new information on the compiler, bug reports/fixes, etc. anything you think will help others.
I will try to use the compiler and see how far I get.
Thanks
Andre