16-bit wide memory?

Let's talk about anything related to the 6502 microprocessor.
User avatar
banedon
Posts: 742
Joined: 08 Sep 2013
Location: A missile silo somewhere under southern England

Re: 16-bit wide memory?

Post by banedon »

Thanks for the explanation, guys. I was just a bit concerned that there was a speed issue which seemed to be elluded to by Garth saying "Someone looking for fast video generation won't be interested in the '816".
I've already purchased some 65C816's, but was planning putting off using them until I had gained more experience with 65C02's.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 16-bit wide memory?

Post by GARTHWILSON »

Perhaps I should clarify-- Yes, the '816 is a hotter performer than the '02. It definitely does not fall short of the '02 in horsepower. But where the '02 has an advantage in both nostalgia and simplicity, there were few home computers with 816's in them to produce the nostalgia now 30 years later, and someone who is interested in high-performance video will probably be looking at more-complex processors to get there. I'm not the one to talk to about video and calculating hi-res frames in real time on 3D graphics stuff, but that seems to me to be way, way up there in computing performance, way beyond processing audio in real time, or doing word processing, etc.. Many computing applications (including what I do on the workbench) have no need for anywhere near that level of performance, so it becomes needless complexity and cost. The fastest off-the-shelf 65816's today will do three or four MIPS (millions of instructions per second) on 16-bit data, and that's way beyond what we had in any 8-bitter 35 years ago. For the 6502 to keep up while doing a steady stream of 16-bit operations, it would have to do 10 or 12 MIPS. I seem to remember though that even the 6502 outperforms the 32016 32-bit processor National produced for a while many years ago, meaning that bus and register width by themselves are not everything.

Since the topic has developed a bit slowly and I did not re-read to see where we were on it, I see I repeated myself, in the comment about Forth speed. I wasn't trying to be insistent.
Quote:
I've already purchased some 65C816's, but was planning putting off using them until I had gained more experience with 65C02's.
You could still start with the '816 if you want, and initially use it as a 6502, then start picking up the new instructions and addressing modes little by little. Even in 6502-emulation mode, it still has a lot more to offer. If you want more than 64K of memory though, going the '816 route would sure be simpler than trying to add extra logic and handling the associated programming difficulties on the 6502.
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?
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: 16-bit wide memory?

Post by Druzyek »

Quote:
Why does the 65816 fall short speed-wise?
As I'm the one who originally said it falls short, I will try to clarify what I meant. Compared to modern chips like newer Pic32s (with 512k internal SRAM) which people have made BASIC computers out of or even a $2 ARM chip (also available in DIP) the 65816 does fall short. Compared to the 6502 or in some cases, it seems, to the 68000 it does very well. If you are looking for a processor for hobby projects that need processing power, the 65816 is not a good choice. If you are looking for a processor for a retro project, the 65816 is a fine choice.

Originally I meant to point out that people nowadays don't use the 65816 much because they have no nostalgic attachment to it, which is why people use the 6502 and it is not fast enough compared to modern chips to be picked over the above mentioned chips. For your retro project it should be fine.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 16-bit wide memory?

Post by GARTHWILSON »

Quote:
Compared to modern chips like newer Pic32s (with 512k internal SRAM)
I'm not familiar with the PIC32's, although I know they have an entirely different architecture from that of the PIC16's; but I know from plenty of experience that the 65 family is well ahead of the PIC16's. After my last big microcontroller project (taking most of last year with a PIC16), I knew that if I ever do that kind of thing again (and I'm sure I will), I need to find a more-powerful family, and it will probably be the ARMs. The PIC18's fix some of the PIC16's problems, but still leave too many others, and apparently the PIC24 and '32 don't preserve enough of my experience investment in the 16's to make them worth it.
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?
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: 16-bit wide memory?

Post by Druzyek »

I've never used any PICs. I was just impressed by the specs of some of their chips, and the MaxiMite BASIC computer seems like something people here might be interested in. We are all attached to the 6502 in some way but it is hard to argue with 330MIPs :)

http://www.microchip.com/wwwproducts/De ... EC)+family

http://en.wikipedia.org/wiki/Maximite
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 16-bit wide memory?

Post by BigDumbDinosaur »

Druzyek wrote:
I've never used any PICs. I was just impressed by the specs of some of their chips, and the MaxiMite BASIC computer seems like something people here might be interested in. We are all attached to the 6502 in some way but it is hard to argue with 330MIPs :)
MIPS don't always translate to perceived high performance. The quad-core AMD Opteron in my office's Linux server produces about 22500 BogoMIPS, a number that is computed when the kernel is initialized following boot. However, the overall system is not much faster than the single core Opteron in my UNIX "mule" server. The PICs do have a high MIPs rating, but that is internal, not the performance of the overall system.

Something that also must be considered is just how much work gets done during each instruction. The 6502 family tends to be quite efficient in that regard.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 16-bit wide memory?

Post by GARTHWILSON »

BigDumbDinosaur wrote:
MIPS don't always translate to perceived high performance. [...] The PICs do have a high MIPs rating, but that is internal, not the performance of the overall system.

Something that also must be considered is just how much work gets done during each instruction. The 6502 family tends to be quite efficient in that regard.
Yes, and I have found that the PIC16 generally requires twice as many instructions and twice as many clocks to get a job done as the 6502 does, and depending on what you're doing, commonly five times as many instructions as the '816 requires. Still the fastest 65c02's top out at about 50MIPS (200MHz), not hundreds of MIPS, and it's still handling only 8 bits at a time.
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?
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

Re: 16-bit wide memory?

Post by MichaelM »

Druzyek:

That was an interesting device that you linked to above.

The PIC32 family is based on the well known MIPS 4000 architecture which can deliver high performance like the 32-bit ARM architecture. An interesting feature of the PIC32 that I took note of is that it core supports a reduced width instruction like the ARM's Thumb instruction set. Coupled with the wide data path (128 bits) to the 2MB of on-chip Flash, the PIC32 can fetch as many as 8 instructions in a single Flash memory read cycle.

After reading over the architecture description, I can certainly agree that PIC32 will run circles my M65C02A core even when using its single cycle 16-bit arithmetic/logic modes. :? The PIC32's wider data buses and on-chip Flash and SRAM will likely allow it to sustain its advertised instruction ratings.

It is certainly warrants consideration as an embedded controller. With its on-chip High-Speed USB 2.0 interface and 10/100BaseT MII/RMII Ethernet MAC, the PIC32 will give an ARM core a run for the money.
Michael A.
User avatar
BitWise
In Memoriam
Posts: 996
Joined: 02 Mar 2004
Location: Berkshire, UK
Contact:

Re: 16-bit wide memory?

Post by BitWise »

Curiously my next project will be an emulation of the WDC chip that never was, the 65832, using a PIC32. I suspect it will work best in 16-bit mode as a 65816 dipping into 8-bit and 32-modes when needed.

I've found a nice PIC32 developement board (the Diligent ChipKit Wi-Fire) using a PIC32MZ2048ECG100 200 MHz device (330 DMIPS) with 2MB Flash, 512KB RAM, USB OTG, a Wifi adapter and micro SD card. I think you only get the full MIPS rating if you run the code from RAM so I'm reserving 384KB for the emulator and keeping 128KB for RAM based functions, stack and variables.

I'm coding a new emulator in C and want to add monochrome graphics output using DMA driven SPI plus enough of a USB host to access a wireless keyboard and mouse.
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
User avatar
Druzyek
Posts: 367
Joined: 12 May 2014
Contact:

Re: 16-bit wide memory?

Post by Druzyek »

Quote:
The quad-core AMD Opteron in my office's Linux server produces about 22500 BogoMIPS
I'm not sure I understand your argument here. Multi-core processors are a different issue and if they are not being used well in parallel they would not be any faster than a single core system. If we take Garth's example of a 200MHz 6502 that produces 50MIPs we can compare it to this PIC32 (which I have never used and am not a fan of. It's just an example.) which also runs at 200MHz but produces 330MIPs. There is just no comparison there.
Quote:
Something that also must be considered is just how much work gets done during each instruction.
The PIC32 has single-cycle instructions so I'm sure it gets a lot more done.

Also, a 200MHz 6502 is not really relevant to this discussion if we are talking about what chip to use for a hobby project since it seems the 14MHz version is the only one any of us will ever get our hands on.

Again, I'm not trying to beat up on the 6502 or 65816. They are both really neat.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: 16-bit wide memory?

Post by GARTHWILSON »

DMIPS (as in 330 DMIPS) refers to the Dhrystone benchmark. I suspect the PIC32 MIPS number is probably about half of that. I have no idea how a given speed of 6502 would compare in Drystones, but obviously the PIC32 with its 64-bit accumulators and mostly single-clock instructions is in an entirely different league, for entirely different applications.
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?
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 16-bit wide memory?

Post by BigDumbDinosaur »

Druzyek wrote:
Quote:
The quad-core AMD Opteron in my office's Linux server produces about 22500 BogoMIPS
I'm not sure I understand your argument here.
I wasn't arguing, merely pointing out that high MIPS don't necessarily translate to high system performance. The processor is only part of the picture.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
White Flame
Posts: 704
Joined: 24 Jul 2012

Re: 16-bit wide memory?

Post by White Flame »

Druzyek wrote:
Also, a 200MHz 6502 is not really relevant to this discussion if we are talking about what chip to use for a hobby project since it seems the 14MHz version is the only one any of us will ever get our hands on.
Anybody with a SuperCPU for the Commodore 8bits has a 20MHz version, though I think the chip is officially rated at 14.
User avatar
BigDumbDinosaur
Posts: 9427
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: 16-bit wide memory?

Post by BigDumbDinosaur »

White Flame wrote:
Druzyek wrote:
Also, a 200MHz 6502 is not really relevant to this discussion if we are talking about what chip to use for a hobby project since it seems the 14MHz version is the only one any of us will ever get our hands on.
Anybody with a SuperCPU for the Commodore 8bits has a 20MHz version, though I think the chip is officially rated at 14.
In fact, at the time when the SuperCPU cartridge was in production, both the 65C02 and 65C816 came in different speed grades, as production yields varied more widely than they do now.

Again, high MIPS doesn't necessarily translate into high performance. Although the 65C816 in the SuperCPU cartridge ran at 20 MHz, all I/O was carried out at 1 MHz, as the I/O silicon in the host computer (other than the 8563/8568 VDC in the C-128) could not run any faster than that. Hence while much compute-bound processing was accelerated by the presence of the SuperCPU, reads and writes on the computer's memory, which was relatively slow DRAM, were not.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Re: 16-bit wide memory?

Post by BigEd »

That doesn't quite tell the whole story, BDD, because it seems the SuperCPU has 128k of full speed onboard RAM. So accesses to the slow memory on the host machine would be minimised.
http://ftp.giga.or.at/pub/c64/supercpu/superinfo.html

We did a similar thing on our beeb816 project: put fast memory near the fast CPU and shadow as much as you can.
Post Reply