6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 15, 2024 4:12 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: 65c816 computer?
PostPosted: Mon Jun 10, 2019 9:52 am 
Offline

Joined: Mon Jun 10, 2019 9:47 am
Posts: 3
Hi, I don't know much about this sort of thing, but I have been looking for a system that runs on a die that is of a larger process like the 65c816 (0.6um) which is for long long long term stability purposes.
I wonder, I have heard that using it's full 16mb potential one would have to use bank switching and stuff, would all of this be handeld by the c compiler?
Also, would this mean that more chips than just the 816 and ram chips are required to run the full 16mb?
I have tried to do research but honestly being just introduced to this most of it went over my head.
Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 3:56 pm 
Offline

Joined: Mon May 21, 2018 8:09 pm
Posts: 1462
The '816 can be a bit confusing when first approached. Here's my current understanding of its characteristics in native mode (which is strongly recommended):

1: From a hardware perspective, the extra 8 bits of address space (relative to the 6502 family proper) are handled, without increasing the pin count of the device, by multiplexing them onto the data bus lines. They are commonly referred to as the "bank address". A small amount of external hardware (a transparent 8-bit latch and a small number of 74-series gates) is needed to capture and forward them to address decoders and memory devices during each clock cycle. A distinction between program and data accesses can also be detected (VPA pin), and optionally treated as a 25th address bit - but this is most useful if you implement virtual memory paging, as otherwise it would be hard to load a program into memory.

2: There are essentially four address spaces on the '816: Program, Direct, Absolute, and Long. The latter gives you a completely flat 24-bit address space, whilst the others can be treated as shorthand and/or performance optimisations within that space.

3: Program space prepends a Program Bank number to the nominally 16-bit PC for all instruction fetches. The Program Bank number is changed by JML, JSL, RTL, or by taking or returning from an interrupt; it is not incremented when the PC wraps around from $FFFF to $0000. So you must arrange your code in 64KB modules, but it's easy to switch between them. Interrupt handlers (or at least their entry points) must always be in Bank 0.

4: Direct addresses, and their close cousin Stack-Relative accesses, are 8-bit offsets from a 16-bit pointer register, and are always in Bank 0 (even if the offset and/or any indexing causes the 16-bit sum to overflow). This area is primarily used as a sort of extended register bank to compensate for the small number of registers internal to the CPU, and is relatively fast. The Direct Page Register can easily be pushed on the stack or swapped for another copy, so different routines can be given independent Direct address spaces to work with.

5: Absolute addresses are 16-bit and have the Data Bank Register prepended to them. This can be used as a shorthand (relative to Long addressing) for accessing larger (up to 64KB) chunks of data than will comfortably fit in Direct Page.

6: It must be understood that, in general, address 0 may refer to four completely different locations in memory, depending on whether you use Direct, Absolute, Long, or Program addressing modes - and even a fifth if you count Stack-Relative. Unfortunately, the established assembler syntax doesn't make it easy to unambiguously distinguish between them (as the distinction doesn't exist on the 6502 itself). But this is something a good compiler will take care of for you - though I make no representations as to whether any particular compiler is a good one.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 4:04 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
Welcome, nodelink. I have struggled to formulate a reply to your query: there may be a lot you don't know and your decision about your project may be a difficult one especially if your priorities are not clear.

If reliability is paramount, you should know that ICs are extremely reliable once they have been burnt-in, which is usually done in production. You should then be concerned about the reliability of your system construction, of your power supply, of other components such as capacitors, and of course the reliability of your software. So, choosing an '816 primarily because it's made on an older process may not be a great justification.

By all means choose the '816 if you like it, but as noted by chromatix, it's not a simple machine with a simple programming model. A PIC32 might be a better choice, or an FPGA. Everything depends on your real priorities: time, money, performance, support, tooling.

The Space Shuttle had multiple computers and a means of comparing their outputs. This can be very reliable.

The Clock of the Long Now uses a mechanical calculator with great attention to materials and construction. They hope to run for ten thousand years.

The solution space is very large!


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 7:13 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Welcome.

The data sheet shows the basics of decoding the bank byte and multiplexing the data bus. We've had additional good discussion about it in the topic "Managing the 65816 multiplexed bus"

The 6502 is definitely one of the best-documented processors in history. It was not very friendly to C compilers though, and the common cc65 C compiler turns out extremely inefficient code. Word on the street seems to be that WDC's C compiler for the 65816 is somewhat better, although the '816 was still not designed from the ground up to be particularly compiler-friendly either. Still, the very things that seem to make the 6502 a poorly suited target for a C compiler also make it easy to envision solutions in assembly; and my experience is that the '816 is even easier to program than the '02 not just because of the extra instructions and addressing modes that give you more freedom, but also because when you're constantly dealing with 16-bit quantities, you don't have to keep taking them apart and handling them 8 bits at a time to "get them through the door" so to speak.

I cannot pass up the opportunity to recommend the "Programming the 65816—Including the 6502, 65C02 and 65802" 6502/65816 programmer's manual by David Eyes and Ron Lichty. This is definitely the best 65xx programming manual available, and a must-have for every 65xx programmer! It starts with the basics, followed by architecture, the CMOS 65c02's many improvements over the original NMOS 6502 including added instructions and addressing modes and fixing the NMOS's bugs and quirks, and then the natural progression to the 65816; a thorough tutorial, writing applications, then very detailed and diagrammed information on all 34 addressing modes, at least a page of very detailed description for each instruction, with info on every addressing mode available for that instruction, then instruction lists, tables, and groups, of all 255 active op codes, plus more. 469 pages. From Western Design Center. (.pdf) Note: There were many problems with the earlier .pdf version that were not in the original paper manual; but in late March 2015, WDC scanned and OCR'ed the paper manual and posted the new, repaired .pdf.

Some of the other things you allude to like address decoding are discussed in the 6502 primer which is about building your own 6502 computer. Although it's geared to the 6502, many of the sections can be applied much more broadly. It was written to address questions and problems that kept coming up on the forum. It has 22 sections arranged in a logical order.

Regarding stability, Bill Mensch, the owner of Western Design Center (WDC) which owns the 65c02 and '816 intellectual property, intends to make these processors available indefinitely.

_________________
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 8:14 pm 
Offline

Joined: Mon Jun 10, 2019 9:47 am
Posts: 3
Thanks to all of you for your incredibly nice and in depth responses :D . I apologize for my unclear initial post, I shouldn't have mentioned any specifics (Like banking) as that just shows how confused I was and might have confused some readers. :|

Whilst your explanation did clarify this, seeing the scope of this, I believe I must find a different platform.
The 65 series is something I could sink a lot of time into because they are beautiful pieces of hardware and technology, but I think progressing my project is paramount.

As for the reason for creating this post in the first place, if any of you knows a similar component, that has easier memory interfacing I would love to hear about it!!!
I have looked into the Zilog eZ80, but that thing consumes a ton of power according to the data sheet.
I also looked at the 68000 but the versions that do still exist of it aren't really going to be produced much longer and it also seems to consume much more power than for example the 816.
Modern Microcontrollers often totally fit my bill, but they have no memory interface so that makes them worthless to this project :?

Some PIC32's are perfect, but I have found that the PIC32mx which seems like the best choice (Because of it's memory interface, I need at least 16MB of RAM, not just flash) however it's process is smaller than other PIC's and it's reliability and fit data as supplied by Microchip is correspondingly worse than the rest.

See I know that most components on a board will last thousands of times shorter than an integrated circuit, but I don't have any of those components. This project aims to create extreme long time reliability far beyond that of most reliability goals.

I love the 6502 especially, that thing is amazing. I don't know too much about the design specifics of course but it just has this quality I don't know how to describe it. Perhaps it arises from my perceptions of reliability, low power consumption, history etc/
Too bad it can only address 64K :(
Thanks to all! :)


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 8:31 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10977
Location: England
I don't know all the details, but the F4 ARM-based microcontrollers from ST have loads of I/Os with many modes (as is normal), and one of those modes does dedicate a number of pins to an external memory interface ("FSMC external memory controller"). So, it can be done, and I imagine their later offerings have similar facilities. I like the ARM's simplicity, and of course it's really well supported. At assembly level it's not too different from a 6502.


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 8:34 pm 
Offline

Joined: Mon Jun 10, 2019 9:47 am
Posts: 3
Therein lies my dilemma, those chips are great but they are processed on tiny nodes, often 90nm or smaller.
I know that my obsession with feature size may seem irrational and it probably is but it is just one of those quirks I am having to work around.
Luckily we are not talking about a commercial product here, however we are talking about something of scale so a few hundred chips will be needed or more.
Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 9:07 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
I'm not sure what the purpose of staying with wider geometries is, but I know they're down to 7nm now, very tiny compared to the 90nm you quote. I do consulting on the side for a company that makes propulsion units for satellites, and they're using modern MSP430 microcontrollers which they have found are reliable in spite of the radiation they have to survive. (I've been on the analog side of things though, not directly in contact with the MSP430 myself.) In the mid-1980's I worked in applications engineering at a place that made VHF and UHF power transistors, mostly for things like military radars and communications, and came in contact first-hand with matters of heat and metal migration, even in power transistors whose die feature sizes were absolutely humongous compared to those of modern digital logic. These, and not fine lines, seem to be the real enemies of durability (outside of the obvious things like ESD, poor bondwire bonding, etc.). CMOS logic runs very cool compared to the old NMOS and TTL parts. I used a Z8536 I/O IC (in 40-pin DIP) 30 years ago for a project at work, and I had to put heat sinks on them, and you could still hardly hold your hand on them because they ran so hot.

The parts of a board that will usually go first are capacitors, particularly electrolytics. They're easy to replace every 25 years though. Even then, you can get longer life by using greater derating, and using ones designed for higher temperature. There's a good lecture about capacitors at https://www.youtube.com/watch?v=ZAbOHFYRFGg from a Kemet capacitor engineer.

I wouldn't call the 816's data-bus multiplexing "complicated" though. What is more complicated IMO is things like DRAM management, cache, and DMA. Regardless of what processor you go with, milking it for all you can get out of it will require sinking a lot of time into it beyond what it takes to just get it going. My own applications require excellent interrupt performance though, and the 65's really excel in that area.

_________________
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: 65c816 computer?
PostPosted: Mon Jun 10, 2019 9:24 pm 
Offline
User avatar

Joined: Mon May 12, 2014 6:18 pm
Posts: 365
Quote:
I don't know all the details, but the F4 ARM-based microcontrollers from ST have loads of I/Os with many modes (as is normal), and one of those modes does dedicate a number of pins to an external memory interface
This is a really neat option if you decide to go this route. I got a development board a few years ago for and it was a great investment. You get a big LCD, 168MHz M4 ARM with 2MB built in flash and USB, and 8MB DRAM.

Quote:
Some PIC32's are perfect, but I have found that the PIC32mx which seems like the best choice (Because of it's memory interface, I need at least 16MB of RAM, not just flash) however it's process is smaller than other PIC's and it's reliability and fit data as supplied by Microchip is correspondingly worse than the rest.
Do you mean there is data that shows PIC32s are lower reliability? Can you post a link?

I don't really understand why you are focusing on process size but if you really want to do this you might consider some obsolete models apart from the 68000 that were produced in the 80s and 90s. Some of those might have been made on a larger process. I don't know which if any of these meet your requirements but I believe they all have external buses and 24 or 32 bit addressing. It would be a place to start looking at least:

- 32016 (including low power microcontroller versions with integrated clock like NS32CG160)
- Intel i960
- 80251
- XA-S3
- H8/500
- H8S/300
- TMS320 (some models it seems)

I should also mention that your life might become pretty unpleasant if you decide to do a big project with one of these since there is probably little to no community support and software is probably antiquated. They all come in PLCC or DIP, which is what I was looking for when I found these. You might find more options if you expand your search to SMD parts.

If you want to buy one of these chips, you can try eBay or the CPU Shack Trade List, which I have bought from (very nice guy and shipped right away.)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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: