Newbie to the 65816. WDCtools C compiler and debugger issue.
-
kernelthread
- Posts: 166
- Joined: 23 Jun 2021
Re: Newbie to the 65816. WDCtools C compiler and debugger is
drogon wrote:
Its simply not the right tool for todays work. It costs more than something that can drive an HDMI display board, it's slower (14Mhz vs 1.4GHz), has less RAM (576 bytes on the 265 vs. 2KB on a popular MCU or 32KB on an entry level "IoT" MCU which is cheaper), no integrated peripherals ('134 and '265 excepted, but they're just digital IO with no on-board pull up's) - requires too many support/glue logic chips and so on. Look at tasks where it might be used - and I can't think of any where AVR or PIC or some ARM or even RISC-V based microcontroller wouldn't be used. Even things like DRAM memory sticks have an on-board embedded MCU now, a "smart" charger for your phone has an on-board MCU of some sort (more compute power than we sent to the moon) - the Chinese have a 3 cent microcontroller they use in battery torches, flashing LED strings and so on. (Sure we can do it with a 555, but the MCU is cheaper, smaller, ...) Car electronics? Well you need to be able to talk CAN bus there these days. Car radios? Sure - make it listen to the dials and buttons, drive a digital tuner and display some nice data, but today that's all integrated in the central car computers and live streaming internet radio in a car is a thing now.
Re: Newbie to the 65816. WDCtools C compiler and debugger is
Just to note, I see TurboRascal (aka Turbo Rascal Syntax Error) supports the '816.
https://github.com/leuat/TRSE#readme
https://retrogamecoders.com/introductio ... ogramming/
https://lemonspawn.com/turbo-rascal-syn ... but-begin/
It's an open source cross-platform IDE for a pascal-like language, supporting various CPUs.
https://github.com/leuat/TRSE#readme
https://retrogamecoders.com/introductio ... ogramming/
https://lemonspawn.com/turbo-rascal-syn ... but-begin/
It's an open source cross-platform IDE for a pascal-like language, supporting various CPUs.
Re: Newbie to the 65816. WDCtools C compiler and debugger is
kernelthread wrote:
drogon wrote:
Its simply not the right tool for todays work. It costs more than something that can drive an HDMI display board, it's slower (14Mhz vs 1.4GHz), has less RAM (576 bytes on the 265 vs. 2KB on a popular MCU or 32KB on an entry level "IoT" MCU which is cheaper), no integrated peripherals ('134 and '265 excepted, but they're just digital IO with no on-board pull up's) - requires too many support/glue logic chips and so on. Look at tasks where it might be used - and I can't think of any where AVR or PIC or some ARM or even RISC-V based microcontroller wouldn't be used. Even things like DRAM memory sticks have an on-board embedded MCU now, a "smart" charger for your phone has an on-board MCU of some sort (more compute power than we sent to the moon) - the Chinese have a 3 cent microcontroller they use in battery torches, flashing LED strings and so on. (Sure we can do it with a 555, but the MCU is cheaper, smaller, ...) Car electronics? Well you need to be able to talk CAN bus there these days. Car radios? Sure - make it listen to the dials and buttons, drive a digital tuner and display some nice data, but today that's all integrated in the central car computers and live streaming internet radio in a car is a thing now.
Or is WDC sitting on a huge stockpile of chips that can quickly be run through a silkscreen printer to update the date codes? Who knows.
-G
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: Newbie to the 65816. WDCtools C compiler and debugger is
BigEd wrote:
Just to note, I see TurboRascal (aka Turbo Rascal Syntax Error) supports the '816.
https://github.com/leuat/TRSE#readme
https://retrogamecoders.com/introductio ... ogramming/
https://lemonspawn.com/turbo-rascal-syn ... but-begin/
It's an open source cross-platform IDE for a pascal-like language, supporting various CPUs.
https://github.com/leuat/TRSE#readme
https://retrogamecoders.com/introductio ... ogramming/
https://lemonspawn.com/turbo-rascal-syn ... but-begin/
It's an open source cross-platform IDE for a pascal-like language, supporting various CPUs.
And .. (Personal opinion) .. like Forth and Marmite, Pascal has it's enthusiasts and those less-so. Once I had systems I could program in C, I left Pascal behind, but like Forth, I've been paid to write Pascal applications in the past. (No amount of money will make me eat Marmite though!!!) The other great distractor for me is the IDE. I have an IDE. I've been using my IDE for over 30 years. It works for me. Give me the command-line tools so I can use them with my IDE.
I have a sort of half-baked plan to write a Pascal compiler - in BCPL to produce code that would run under my BCPL Bytecode VM system. The down-side is that it would probably not be faster than compiled BCPL but at least it would be Pascal.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Re: Newbie to the 65816. WDCtools C compiler and debugger is
Proxy wrote:
Those are very exciting news, I really really hope the plan is to make it generate ca65 compatible assembly, so that the existing cc65 toolchain can be used instead of having to create a new one from scratch. That would also avoid the issue that was already discussed here, where users are hesitant to switch to a new toolchain because of the work required to port everything.
The only part of the cc65 utility that is not 65816 compatible is the compiler, everything else already supports it. So please atleast consider it.
The only part of the cc65 utility that is not 65816 compatible is the compiler, everything else already supports it. So please atleast consider it.
- I prefer the pretty common, more standard syntax that vasm and most assemblers use.
- vasm/vlink support much more input/ouput file formats.
- vasm/vlink support a few features that vbcc uses which ca65 does not support.
- The existing 6502 backend already uses vasm and changing that would be additional work.
Quote:
On a side node, do you have any tips for getting started with a vbcc backend? I tries writing one for my SWEET32 VM for the 65816 (which fittingly requires ca65 compatible assembly to be generated) but using the official documentation and looking at the other targets didn't get me that far. Maybe it's just a bit over my skill level? Hmm...
Btw. you might choose another name for your VM. When googling it (without adding extras like 65816), I pretty much only get results on cyber-attacks...
Re: Newbie to the 65816. WDCtools C compiler and debugger is
vbc wrote:
I am afraid I have to disappoint you here. The vbcc65816 backend is using vasm and vlink just like the 6502 backend for a number of reasons:
- I prefer the pretty common, more standard syntax that vasm and most assemblers use.
- vasm/vlink support much more input/ouput file formats.
- vasm/vlink support a few features that vbcc uses which ca65 does not support.
- The existing 6502 backend already uses vasm and changing that would be additional work.
but i guess i did get used to Calypsi C's toolchain as well, so switching (for me atleast) shouldn't be much of an issue besides taking a weekend to get something up and running for my SBC.
a few questions though, does vlink support the PGZ output format? i even got ca65 to use this output format using some manual assembly magic. though i'm not married to it, so if there are better already supported options that doesn't require a lot of overhead like ELF, then i'm willing to rewrite my bootloader.
also, how do you define "more standard syntax"? one thing i dislike about really old assemblers is how strict they can be with their formatting, like instructions have to be lowercase only, instructions always have to be atleast 1 whitespace character away from the start of a line, or you HAVE to use EQU instead of just =. just ancient limitations that IMO shouldn't exist in modern tools anymore. and ca65 gives you a lot of freedom in how you format your code.
vbc wrote:
The chapter "Backend Interface" in vbcc.pdf should contain the information regarding creating a backend. The source code contains a "generic" backend that can serve as a simple starting point for creating new backends. It does not create code for a real machine but it is intended to get you up running quick. You start by choosing the number of registers, memory-operands vs. load-store-architecture and two- vs three-address instructions. You might already get some output looking remotely like what you need. Of course then the real work starts and you have to get the format right, handle all the special cases, optimize the code etc.
vbc wrote:
Btw. you might choose another name for your VM. When googling it (without adding extras like 65816), I pretty much only get results on cyber-attacks...
hmm, i'll have to think on that for a bit.
Re: Newbie to the 65816. WDCtools C compiler and debugger is
Proxy wrote:
awww, sad 
but i guess i did get used to Calypsi C's toolchain as well, so switching (for me atleast) shouldn't be much of an issue besides taking a weekend to get something up and running for my SBC.
but i guess i did get used to Calypsi C's toolchain as well, so switching (for me atleast) shouldn't be much of an issue besides taking a weekend to get something up and running for my SBC.
Quote:
a few questions though, does vlink support the PGZ output format? i even got ca65 to use this output format using some manual assembly magic. though i'm not married to it, so if there are better already supported options that doesn't require a lot of overhead like ELF, then i'm willing to rewrite my bootloader.
Quote:
also, how do you define "more standard syntax"? one thing i dislike about really old assemblers is how strict they can be with their formatting, like instructions have to be lowercase only, instructions always have to be atleast 1 whitespace character away from the start of a line, or you HAVE to use EQU instead of just =. just ancient limitations that IMO shouldn't exist in modern tools anymore. and ca65 gives you a lot of freedom in how you format your code.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Newbie to the 65816. WDCtools C compiler and debugger is
Proxy wrote:
as65? Do you mean ca65, the assembler cc65 ships with?
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Newbie to the 65816. WDCtools C compiler and debugger is
are you sure? I assumed it was a typo or similar because he mentioned ld65 (which doesn't exist in the dev65 kit) and also said "too bad there is no actual 65816 target for cc65, as it would slot perfectly into what I already have".
Re: Newbie to the 65816. WDCtools C compiler and debugger is
GARTHWILSON wrote:
My impression, as I view them from a distance, is that As65 is far better than ca65.
-
jmthompson
- Posts: 127
- Joined: 30 Dec 2017
- Location: Detroit, Michigan, USA
- Contact:
Re: Newbie to the 65816. WDCtools C compiler and debugger is
drogon wrote:
Checking now, it appears the "Orca" suite - assembler, pascal and C compilers were there, but not for some time. (And the C compiler is written in Pascal). Since these projects are on Github under a source available, but no commercial use basis, then maybe some enterprising person can un-apple them and make them generic?
Last edited by jmthompson on Fri Feb 17, 2023 4:49 am, edited 1 time in total.
-
jmthompson
- Posts: 127
- Joined: 30 Dec 2017
- Location: Detroit, Michigan, USA
- Contact:
Re: Newbie to the 65816. WDCtools C compiler and debugger is
GARTHWILSON wrote:
Proxy wrote:
as65? Do you mean ca65, the assembler cc65 ships with?
Nah he is right, I typo'd in my post and said as65 when I meant ca65. My project is based entirely around the cc65 suite of tools. It's just that in my mind "ca65" always becomes "as65" for some reason.
-
jmthompson
- Posts: 127
- Joined: 30 Dec 2017
- Location: Detroit, Michigan, USA
- Contact:
Re: Newbie to the 65816. WDCtools C compiler and debugger is
Proxy wrote:
as65? Do you mean ca65, the assembler cc65 ships with?
Proxy wrote:
Also what do you mean with the assembler only has "bare minimum" support for the 65816? if you do mean ca65 then the only thing I know it can't do by itself is keeping track of the direct page and data bank register.
In retrospect my choice of words was a bit harsh. I actually really like ca65 and ld65 in general. It just has some rough edges.
Re: Newbie to the 65816. WDCtools C compiler and debugger is
jmthompson wrote:
Specifically the direct page. And not so much tracking DB as (1) not understanding DP not being at $0000 and (2) inability to have more than one such segment.
-
jmthompson
- Posts: 127
- Joined: 30 Dec 2017
- Location: Detroit, Michigan, USA
- Contact:
Re: Newbie to the 65816. WDCtools C compiler and debugger is
tmr4 wrote:
jmthompson wrote:
Specifically the direct page. And not so much tracking DB as (1) not understanding DP not being at $0000 and (2) inability to have more than one such segment.