65816 C compilers

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
65816 C compilers
by on (#234870)
Now that the 8bitguy is making his own machine with a 65816 in it, the number of people pledging to make a C compiler for it seems to have gone up. If it actually happens or not to be seen, but we might at least get more 65816 tools out of it.
Re: 65816 C compilers
by on (#234872)
Please link to those. I have no idea who is 8bitguy, and googling for 8bitguy 65816 shows some dream computer blog post from last Oct.
Re: 65816 C compilers
by on (#234873)
He's a famous YouTuber in the retro gaming circle, and he's building that dream computer now.
Re: 65816 C compilers
by on (#234874)
https://www.youtube.com/watch?v=ayh0qebfD2g

The video shows a bit of his process writing a c64-like kernel for the 65816 and modern peripherals and is outlining general features.

Design goals are:
-low price
-direct hardware intefacing just like with the c64
-modern storage medium
-no NOS components, just readily available off the shelf parts
-no FPGAs

One of his to-solve problems is what sort of GPU/PPU to use. Honestly i'm not sure how you'd solve having a video chip like the ideals he describes without using an FPGA. The current solution is serial, but he wants something that's parallel. The dormant "open PPU" project is not too far of from what he wants, but that'd break the no programmable chip preference.

I'm sure he can solve audio with some modern synth or sample stream chip, but i'm a little worried about the or convoluted interfacing with more modern synth chips. Choosing a practical-to-write-music-for soundchip is going to be crucial to people actually using it.

Edit: fixed autocorrect.


Edit: I see the prototype discussion group on FB has 5000 members and 90+ new posts just today. He's enthused quite a lot of people with this project. :)
Re: 65816 C compilers
by on (#234876)
Yeah the FB group is a ummm mess.. is the best way I can describe it. He didn't get what he was really hoping for ;) But there are more people looking at the machine than say the Mega65, Phoneix256 and SpectrumNext.. which means it does have a better chance of going somewhere.

He has since relented on his no FPGA for the Graphics chip, as it is impossible to not use one.
Re: 65816 C compilers
by on (#234877)
Oziphantom wrote:
He has since relented on his no FPGA for the Graphics chip, as it is impossible to not use one.

So there goes the "inexpensive" requirement as well, right...?
Re: 65816 C compilers
by on (#234878)
The gamedrinou https://excamera.com/sphinx/gameduino/ which is what he is thinking of using is only $39, and that is own board etc, once you put the parts on to a custom board with the rest of the machine, it will probably be cheaper. However it uses an Spartan which is obsolete, and people are looking at porting it to one of the new cheaper FPGAs you can get. Since I think Bil Herd is supporting he will probably push them to Altera as he hates Xillnix with a passion for that one time they screwed over Greg Berlin on the A4000.
Re: 65816 C compilers
by on (#234892)
Quote:
He didn't get what he was really hoping for


Yeah it's a double edged sword. On one hand, you'd get better signal to noise ratio if you actually turned to 65xx developer forums (like this and others)... a lot of the bicycle shed syndrome going on in there from what i saw is also because people think it's a bicycle shed, when it's really not.

On the other hand... if you only turned to current 65xx developers, you have a limited circle of potential users - easily leading to abandonment. While current 65xx users might be interested in using it, the way i interpreted his video is that it'd be nice to have a modern computer (no tape loading horrors etc) that really teaches you programming naturally and is fun to use because its only layer of abstraction is a focused kernel. So i think it's safe to say that a big portion of the user base is meant to be people not already programming assembly, or not already programming much at all but are interested in starting out.


One thing i've thought about today is... i really hope this goes well. But for it to reach its potential, it would probably help to have some "killer apps" beside a BASIC interpreter at launch, perhaps sold as addons or bundled in or distributed for free, whichever model works for each contributor. I think you need a software ecosystem to start with, in order to keep it living. Some good games, in short. For it to have that, some current 65xx developers and teams need to get onboard. For current devs to get onboard, porting already existing independent games from the NES and c64 scene need to be easy enough. Then, i think you want the graphics chip to be able to do something quite similar to what the NES PPU or VIC-II does. Partial backwards compatibility or parallelism would really help.

Someone is bound to port DOOM (someone always does for every system), whether it plays nice or not. But what about after that?
Re: 65816 C compilers
by on (#234904)
The Parallax Propeller 2 is due out this year, for real and not a lie.
I have an engineering sample sitting next to me.

It's 8 cores, 32-bit wide instructions, 200+ MHz clock speed.
Two clocks per instruction when executing from the 512 long local core memory or when its streamer cache is full executing from shared central memory.
Has bit-level instructions that use a barrel shifter, hardware multiply instructions, pipelined CORDIC (trig functions), USB capability, SD card boot capability.
8-bit DACs on every one of the 64 I/O pins with ability to dither to effectively about 12-bit, so VGA or component video is easy.
Audio would effectively be 16-bit per channel after filtering.
DVI signaling over for example an HDMI connector is possible.

So what does this mean?
At the very least, it could be applied as a less expensive peripheral interface, mass storage interface, graphics chip, and sound card instead of an FPGA.
Modes like palleted 1024x768 VGA won't break the memory bank and require an outside DRAM chip.
There is already a SID emulation (SIDCog) available on Propeller 1, recently ported and working even more faithfully on P2.

As for its long and battered development history, just yeah.
Oh so very yeah.
I'd say the original Propeller 2 died of "second system syndrome", and this refocused version is really #3 as it quite honestly started over from scratch.
But marketing is tricky.
Re: 65816 C compilers
by on (#234914)
1024x768 = 786432 and we have 1 byte per pixel so that is 786432/1024 = 768K
4bits per pixel = 384K
2bits per pixel = 192K
1bit per pixel = 96K

So if it gets 512K then you can have 4bpp, gives a 128K but you still need to store sprites as well. Ok for a "title screen" but not really a game.
256K 2bit is possible but again not leaving much for sprites
1bit is possible for 256K though.

I would think its probably going to 640x480 max, which is 300K at 8bits and 150K at 4bits. So I would think 640x480 16 colour is going to be the practical limit, and maybe it will need 320x240.
Re: 65816 C compilers
by on (#235006)
It would probably be better to change the thread from "65816 C compilers" since the discussion's gone elsewhere.
Anyway, my hot take is that I don't really see a target developer audience for this. If you're willing to put up with an antiquated 33 year old processor, you probably have an existing platform in mind. If anyone here disagrees with me and wants to write software for a new 65816 based computer, I'd love to know why.
Re: 65816 C compilers
by on (#235010)
I believe that old computers/consoles still have a following today because of nostalgia and/or sizeable software libraries. A new architecture will have neither, so I don't see this having much support once the novelty wears off.
Re: 65816 C compilers
by on (#235012)
FWIW, I share the same sentiment. I think this is a personal project which, at best, will become similar to CHIP-8. Obviously making improved software that runs native to the system/CPU (presumably 65816) nobody will take issue with, but I strongly doubt this will somehow pull the 65816 from the ashes and make people start developing tons of new and amazing software for it; I expect a short-lived "trend". Honestly, the only reason I can see here that the 65816 was chosen was because the inventor is already familiar with 65xx architecture -- and that's fine (hopefully obvious to readers?). I am certainly not going go through Facebook to try and "catch up" on the decisions or history -- it's not my project, so my opinion/view really has no bearing.
Re: 65816 C compilers
by on (#235033)
This project really just has me thinking about the possibility of developing a sort of old "8-bit" computer style kernel for an SNES flash cart... Not having a keyboard is a bit of a problem though...
Re: 65816 C compilers
by on (#235034)
Drew Sebastino wrote:
Not having a keyboard is a bit of a problem though

Cellphones solved that problem... and/or you could put buttons on the cartridge! :D
Re: 65816 C compilers
by on (#235035)
Drew Sebastino wrote:
This project really just has me thinking about the possibility of developing a sort of old "8-bit" computer style kernel for an SNES flash cart... Not having a keyboard is a bit of a problem though...

The real problem isn't the lack of a keyboard -- because there was one -- the real problem is collector hoarders.
Re: 65816 C compilers
by on (#235077)
just put a PS/2 port on the cart. Or use the existing USB port...

He seems to actually wants to run the 65816 in 6502 mode its an "8bit" machine.. I think he is going for 65816 because he basically wants to make a "new commodore" and that means 6502. The other problems is making a machine around avr is not practical, Z80 sucks.. umm 8088 are not made anymore... 6809 nope... oh look 65816 sweet and they come with a bunch of built in stuff which makes it handy. Interestingly Mensch is in the group.
The Phoniex256 projected started out based upon his "this is what I want in a computer" but it started to get to big so he come to make a smaller one. However with the numbers his group has, I imagine making games for this new machine is probably going to have a larger market then NES games at this point. However everybody seems to be a power trip fantasy and if they will actually use the thing once its doesn't do everything that they want, like use a Z80 of all things.. Between this and say the Spectrum Next.. I think this has more potential, but depending upon the price the Mega65 could cannibalize it.
Re: 65816 C compilers
by on (#235081)
That's a very good analysis.

As you probably have read till your eyes fell out your sockets, my main concern is ease of portation between existing projects and that new platform. The reason it is my main concern is... because i don't feel the user base is as much a concern. That can still fail at the critical point but the interest this project has whipped up is unprecedented. And to make sure it doesn't fail at release, there needs to be some software going for it to show good early, if maybe a bit primitive examples of what it is capable of doing and spike continued interest in using it beyond the novel idea.

The phoenix seems nice but seems to have an interested user base of a dozen so far? Its dedicated forums are empty. And hardware speaking, i don't see why you'd want to cannibalize two SID chips in a stereo configuration? I don't know if it's hard-panned or not, but for game score composition it should be more versatile to have either mono or just a very subtle stereo field.
Re: 65816 C compilers
by on (#235088)
your posts make a refreshing change to read, they contain logic, examples, and not a link to something else..
Re: 65816 C compilers
by on (#235089)
I feel that the groundswell and "marketing power" of Dave can't not be dismissed, however I do have concerns that most people will fall off once its "doesn't do the one thing they want". Everybody is excited because they have always dreamed of making one, and this is as close as they can get.
Once people actually read the FAQ and find out its not open source, open hardware and they can't tinker with KERNAL to make their super special custom version 10,004th version of the KERNAL that boots with their name at the top, then that might put the "OSS" brigade off.

However I don't think the market is large enough to support this one, 256Phoniex, Mega65 and Spectrum Next.
Re: 65816 C compilers
by on (#235096)
Yeah... I mean I kinda get his whole shtick, but it doesn't really add up to me. It won't be more accessible than a real 8-bit unless a *ton* of documentation/tools gets made for it. It won't be more available than a real 8-bit unless they sell millions of them. It's not going to be more recognizable *ever*. "I made a game for the 8-bit guy computer!" -> "Huh?" Outside of his fan base, it will be nothing more than a curiosity. Our local gamedev community just had a play party for the Global Game Jam games made last month, and I overheard comments such as "Hey did you try that NES game?", and "Someone made an actual NES game." It was a mediocre 48 hour jam game to be sure, but running on the NES people thought it was neat. Had I made it for the 8-bit dream computer, I can't imagine a similar reaction. My point being I don't think people outside of his community will "get it", and I think communal nostalgia like that is a non-trivial part of the allure of retro dev.

That said I'll probably buy one, make a small project for it, then put it in a box with my Gameduino 1 and 2. ;)
Re: 65816 C compilers
by on (#235097)
The way i can see this gaining a bit of cult traction on its own outide the youtube community is if beople began having computer clubs and meetups, just like for example modular synth and garden enthusiasts do. There's apparently still an abc80/800 computer club active in sweden. These computers had a really small cult following local to scandinavia. In the 80s they would broadcast software like BBC did for the BBC micro. Nowadays i think it's mostly just a mail list and maybe a yearly meetup over a cup of coffee, but anyway.

Slembcke, if you're considering writing something for it at one point, i might want to make graphics for it. Just to have something done for it at the very least. Feel free to write me a line when/if!
Re: 65816 C compilers
by on (#235115)
I always wanted to build my "own" one but now that I have limited time, it make more sense to work on existing platform that I never had the chance to try first then building or working on a new one since there is more chance to be more information about that platform in the first place.
Re: 65816 C compilers
by on (#235120)
The thing is though, the Spectrum Next solves an "issue", in that the Spectrum user will finally be able to say their machine is better than a C64.
The phoniex256 solves the issues we have with the 128.
The Mega65 hits the super sweet spot of unobtainium that is the C65.
these all hit a certain point of wish fulfillment.

This is "I'm a noob, and there is a community and I can probably handle doing something in BASIC and not having it be 100% crap", which the Spectrum Next, Phoniex256 and Mega65 will also all do. Bil Herd is a going to be a factor though, he will never bless the Mega65. I think he has waived his hands over the Phoenix256 and giving it his blessing but he is also on the Commander-16 "list of people". I think there is a FOMO aspect, people talk about the "good old days" and how we can all do this "amazing" stuff thanks to it, but some people even though they had the machines were never smart enough to work it out, and now that they are older they might be able to.

Does anybody know of Raspberry Pi native games, a game you can put on an SD card and boot? I've not heard of it, there are millions of them, and yet. I think the Commander-16 is going to be a Raspberry Pi of 8bits, people want to tinker with it, play with it for a few hours, make it their own in some capacity, give it their own case etc
Re: 65816 C compilers
by on (#235125)
This thread should probably be moved to General Stuff (and renamed too, for that matter).