6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 06, 2024 5:42 am

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 5:40 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
I have been thinking about some new projects and have a few ideas in mind for the 6502. However, I've been thinking about the 65C816. As something to do it has a bit of merit, but for the life of me, beyond having the experience of creating it I can't think of a compelling reason to do so.

Sure, I could re-write a few assembly language routines to take advantage of the 16 bit extensions, but for the most part I can see no real way to take advantage of the extra oomph the chip offers. Other than apple GS/OS has there ever been an operating system built for the 65C816? Even still, id I wanted to run that it might be better just to buy a used Apple IIGS. How about language interpreters or code libraries?

It seems to make little sense to me to build such a machine only to have to run like it was a 6502. It would be a bit like owning a Porsche GT3 to deliver pizza in suburbia.

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 5:50 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10798
Location: England
Perhaps see also this previous discussion:


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 7:06 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1405
Location: Scotland
You may want to keep an eye on this new (probably commercial) project - nothing to 65c816 @ 14Mhz with video, sound and storage (and a nice box) in under 6 months:

https://www.c256foenix.com/

It's looking very promising and from what I've read on their forums, software is progressing.

I started my own 65c02 SBC recently (after having made several some 30 years ago), but have changed track with the aim to make a 65c816 system. I have a very good idea of the operating system and languages I want to run on it though - hopefully I can write more on it in the new year.


So - with that in-mind, I'd suggest that if you want a 6502 SBC sort of thing, then do it, but with just a couple of design changes that can be implemented with jumpers, you can have a 64K 65c816 system which might give you a bootstrap into the '816 world...

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 7:10 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8175
Location: Midwestern USA
BillO wrote:
I have been thinking about some new projects and have a few ideas in mind for the 6502. However, I've been thinking about the 65C816. As something to do it has a bit of merit, but for the life of me, beyond having the experience of creating it I can't think of a compelling reason to do so...It seems to make little sense to me to build such a machine only to have to run like it was a 6502. It would be a bit like owning a Porsche GT3 to deliver pizza in suburbia.

I have to agree that if you don't have a compelling reason to build around the '816 there's no incentive to do so. Indeed, use of the '816 may somewhat complicate your design.

That said, I think part of what makes a hobby a hobby is going beyond the status quo and coming up with something the other guys haven't done. Perhaps a careful study of the '816 hardware may lead you to identifying a desire you didn't know was there. Also, the '816 offers a plethora of software features that, once understood, can have a surprisingly strong effect on how you write your programs. Once you go 16 bit you start wondering how it was you managed with only eight bit arithmetic, an eight bit stack pointer, etc. Even if you don't build your gadget with extended RAM, you can quickly find a lot about the '816 that makes it appealing.

I encourage you to consider the 65C816, if for no other reason than that of it being available.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 7:44 pm 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
The 65816 is an enormously frustrating chip. Parts of it I've fallen in love with, like the stack stuff, and it's really, really hard to go back to 8-bit after using a 16 bit processor. Others I absolutely hate -- the decision to have a mode switch and use the same opcodes for 8 and 16 bit was, ahem, debatable and the new mnemonics are bad enough I ended up creating my own. It's a real missed opportunity, and I wish somebody could convince WDC to go back and do a clean 16 bit version of the 65816. There are basically no other 16 bit processors out there in this package, AFAIK. In few years, it will either be the 65c02 or directly up to a RISC-V variant.

Still, as BDD said, the 65816 great as a hobby project.

For software, the practical barriers are that there is no easy to use emulator like the py65 for the 6502 you can just sit down and play around with; the same goes for assemblers. I ended up writing my own of both, which was a great experience in itself, but they're not really "easy to use" by anybody's definition (one is in Forth). I have back burner projects for both a new emulator (in Go this time, to force me to learn golang) and an assembler (in Python, to learn how to write real lexers, parsers etc). In that respect, the 65816 is fantastic because it has all kinds of weird edge cases -- the Forth emulator finally helped me understand how to use DEFER, for instance.

For hardware, the chip needs more complicated memory signals, but I think the main barrier is that there isn't a simple bare minimum reference design out there like Garth's for the 6502. If we had something like that, it would be a lot easier to say to yourself, dude, I can totally do this, and then things would positively feed into themselves, even after you found out you were actually in over your head. By then, as a lot of us know, it's already too late.

Another way of dealing with the 65816 I have thought about would be to create a bytecode interpreter for it, that is, put a thin software layer over it to make it more accessible. That would make it a better target for high-level languages. PLASMA went this way with the 65c02, but it is a bytecode stack machine, and I think a bytecode register machine would be the better, because faster choice: Those great stack instructions of the 65816 would let you access virtual registers with very little trouble. It's on my list, but then again, my list is very, very long by now ... :D

Anyway, I haven't regretted any of my time with the 65816. Go for it.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 7:55 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8175
Location: Midwestern USA
scotws wrote:
For hardware, the chip needs more complicated memory signals, but I think the main barrier is that there isn't a simple bare minimum reference design out there like Garth's for the 6502.

My POC V1.1 unit is probably as close to a reference design as any—it is based entirely on discrete logic. However, it doesn't use any of the 65xx peripheral devices.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Tue Nov 06, 2018 11:12 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
scotws wrote:
For hardware, the chip needs more complicated memory signals, but I think the main barrier is that there isn't a simple bare minimum reference design out there like Garth's for the 6502.

Besides BDDs board, there's also the board from WDC. I don't know why that can't be considered a reference board.

It has all of the peripherals, and it's all discrete logic.

The data sheet describes a small circuit for decoding the 24 bit address bus on, like, page 46. That same circuit is used on the board.

The only thing I can't see is anything done with VDA and VPA, and I know BDD has run in to some instances of that.

So I don't know what that means. The board ties them together with an NAND gate, and labels that SYNCB, but it doesn't seem to do anything with the signal. It doesn't even expose it on the expansion connector.

I think this is necessary for some peripherals that might do unpredictable things with the address bus goes wacky?

Anyway, lots to cherry pick from the WDC board me thinks.

But what the chip doesn't have is a wide array of other implementations. Experimenters and their boards. "3 chip" solutions, etc.

It's "too big" for a simple 8 bit micro, but "too small" for other things. The hobbyist "unfriendly" packaging options don't help.

And, of course, the lack of software. 6502 is popular for it's simplicity, ubiquity, and availability. Z80 is popular because you can get CP/M running on it. Folks are perfectly happy with a Z80 and a dumb terminal. But 6502 seems to require sprites and color and all the rest.

That c256foenix thing is starkly missing any system specs outside of the 14Mhz '816 and a memory map.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 12:57 am 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
I have not considered using the 65C816 for anything, but if I did, I would probably want something like the barebones schematics on Garth's page with at least one more chip for the third address byte. I don't think any would-be beginner would have the confidence or know-how to go through the schematics for BDD's or WDC's board and figure out what to keep and what to get rid of without breaking basic functionality.

BillO, what things are you using the 6502 for to begin with? Maybe that would suggest where you might need a 65C816. I have nothing against Porches. Maybe it's delivering pizza you should rethink :P


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 1:33 am 
Offline

Joined: Mon Sep 14, 2015 8:50 pm
Posts: 110
Location: Virginia USA
Regarding operating systems, for Atari fans, there is this: http://drac030.krap.pl/en-specyfikacja.php

Myself, I was/am an Apple II clone owner/user (Laser 128EX) who "upgraded" to a 65c802 shortly after and was disappointed at the lack of native software for it. I eventually found something I could hack (HyperC)
that would at least take advantage of most of its native capabilities like 16 bit registers, 16 bit stack and native mode vectors and most of the native addressing modes in a 64k address space.

Downside for me was that the clone's rom is written in 65c02 emulation mode of course so intput/output always had to be executed in emulation mode which required for me saving native stack/restoring emulation mode stack and 16 bit registers before and after switching. A full native mode rom could make a big difference in performance. I estimated a 20% increase in performance in native mode with emulation mode switching for I/O. The editor I was using had smoother faster scrolling with the native interpreter as opposed to the emulation mode interpreter that I hacked.

Although I haven't yet tried it PLASMA has a native interpreter for 65802/816.

65c802s are rare these days. There are alternatives. See a2heaven.com's 65c02->65816 module.

Cheers,
Andy


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 8:03 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10798
Location: England
whartung wrote:
scotws wrote:
The only thing I can't see is anything done with VDA and VPA, and I know BDD has run in to some instances of that.

I think this is necessary for some peripherals that might do unpredictable things with the address bus goes wacky?


BDD's problem, once debugged, was very simple, and a simple software workaround was available. The problem was a consequence of two things: an unusual peripheral chip which needed substantial time between successive accesses, and BDD's use of an indexed addressing mode to access the chip. It's unlikely that anyone else would hit this, and if they did, there's a simple workaround.

So this whole refrain of needing to decode valid accesses is a red herring. It's an interesting war story, but nothing more.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 10:11 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
handyandy wrote:
65c802s are rare these days.

Even rarer since I bought up most of the stock ;-)

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 11:52 am 
Offline

Joined: Mon Jan 07, 2013 2:42 pm
Posts: 576
Location: Just outside Berlin, Germany
Here is something that I think would be fun on a 65816: Scheme or Lisp. If i understand the internal structure, you need two pointers and a bunch of type bits in each cell -- not something you want to do on a 6502. With 16 bit, you could probably get away with it. Think of all the stuff you would have to figure out, GC, interpreter, compiler ... basically, the whole Structure and Interpretation of Computer Programs. That's pretty much enough stuff to last a lifetime.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 12:08 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10798
Location: England
I like it!


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 1:05 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1001
Location: Canada
Lots of interesting ideas. Thanks for those - fodder for future day dreams.


Druzyek wrote:
BillO, what things are you using the 6502 for to begin with? Maybe that would suggest where you might need a 65C816. I have nothing against Porches. Maybe it's delivering pizza you should rethink :P
For the two designs I've just completed (I still have to share them...) one is a workbench computer for experiments and development. The other is mostly for embedded applications (a la Arduino) , but experimentation and development are not a reach for it. Future builds might have different goals.


BitWise wrote:
handyandy wrote:
65c802s are rare these days.

Even rarer since I bought up most of the stock ;-)
Do you have any left that one might purchase???? :D

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: 65C816 - Why?
PostPosted: Wed Nov 07, 2018 3:10 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
BillO wrote:
BitWise wrote:
handyandy wrote:
65c802s are rare these days.

Even rarer since I bought up most of the stock ;-)
Do you have any left that one might purchase???? :D

I could but with International shipping a single chip would be rather expensive. It might be worth checking out these people. Allegedly they have thousands in their warehouse on your side of the pond. Search for W65C802.

http://www.greenlightelectronics.com/electronic-part-search

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: rwiker and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: