Why 6502 and not Z80?

artik

New Member
Jan 5, 2020
22
0
1
I understand that both processors were popular in the 8bit are. However z80 has much more "modern" design:

1. Rich instruction set
2. Large number of general registers
3. Index registers like ix/iy supporting modern paradigms like stack frame recursion etc.
4. Virtually unlimited stack etc.

It is basically modern CPU just for 8 bit era (x86-64 actually comes from common predecessor 8080). It supports CP/M thus potentially allowing running of some historical SW. There is up-to date and well maintained C compiler toolset - z88dk. And in any case it X16 commander is not compatible with c64...

I assume there several reasons to choose 6502:

- The author's familiarity with 6502, it is probably the most important one, since best platform is one you are familiar with
- Maybe better availability of 6502 over z80

Or is there any other particular reason that I missing to choose 6502 over z80?
 

rje

New Member
Nov 6, 2019
26
11
3
I understand that both processors were popular in the 8bit are. However z80 has much more "modern" design:
...
I assume there several reasons to choose 6502:
...
Or is there any other particular reason that I missing to choose 6502 over z80?
I know Dave posts his reasons on his YouTube videos. And ALSO the FAQ, which says:

"I want it to be as similar as possible to programming on a VIC-20, C64, or Plus/4."

Because the 6502 influenced more people, and the Commodore was the most common 'brand' of 6502 computer, I think his decision is reasonable. Also because I used Commodore machines when I was growing up of course!!

Z80 fans could do the same for the Z80, and perhaps they already have. They will have to make some of the same decisions made for the CX16 -- for example, finding appropriate video and sound hardware. (I think there's nothing stopping a hardware guy from building a Z80-based computer using VERA!)
 
May 22, 2019
592
300
63
Z80 fans could do the same for the Z80, and perhaps they already have. They will have to make some of the same decisions made for the CX16 -- for example, finding appropriate video and sound hardware. (I think there's nothing stopping a hardware guy from building a Z80-based computer using VERA!)
A Z80 Commander would just be... a faster MSX computer.

There are actually some modern MSX recreations out there, although they are hard to get. I've been looking at the SX-1, but it's been perpetually out of stock. I'll probably have to make do with a PC emulator or the MSX core on MISTer...
 

BruceMcF

Active Member
May 19, 2019
205
63
28
And putting a Z80 CP/M card into the CX16 shouldn't be too hard. Cheapest and simplest would be one running on the CX16 clock, but if you used a dual port SRAM to communicate you could have the Z80 running on its own clock. Even have an ez80 running at 50MHz.
 
  • Like
Reactions: rje
May 22, 2019
592
300
63
The planned system will not be capable of hosting a CPU on the expansion ports - at least not as a bus master. Basically, the Commander would be a dumb terminal for the Z80 host.
 

BruceMcF

Active Member
May 19, 2019
205
63
28
The planned system will not be capable of hosting a CPU on the expansion ports - at least not as a bus master.
That "at least not as a bus master" is carrying most of the weight there.

That's why you'd design it to be a processor running on it's own RAM ... given that you can get a 128KB SRAM for under $10, being able to run directly on the host RAM is not such a big deal as it once was. It also avoids a host of issues in interfacing the Z80 to a 65C02 bus if you never actually interface the Z80 to the 65C02 bus, but instead interface the 65C02 to a window in the RAM on the Z80 bus.

Basically, the Commander would be a dumb terminal for the Z80 host.
Implementing it as a dumb terminal would be a deliberate design decision, and far from a necessity. It can be as smart a terminal / IO box for the Z80 card as the 6502 code and the Z80 BIOS conspire to allow it to be. Ideally the BIOS is little more than a shim for triggering the 6502 support code, since that allows the TPA to be larger.
 

Schol-R-LEA

New Member
Sep 20, 2019
20
13
3
Note that there were "CP/M Compatibility Cards" for both the C64 and Apple II consisting of a Z80 and between 16K and 48K of memory, in much the manner described, using the host computer as a terminal. Since these were generally intended to run CP/M business applications (as the name implies), it was assumed that there was no reason for them to have direct access to the video system. There were few graphical programs for CP/M, and all of those were specific to the particular hardware (since there was no standard for video output - even as text - on S-100 bus systems at the time - which is also why CP/M's soft BIOS needed to be ported to each system it was used on), so this was seen as a reasonable move.

However, if one wanted to support an MSX system, or one based on some other popular system which used a Z80 such as the TRS-80, you would run into the multi-mastering issue mentioned by TomXP411. Sharing the VERA output directly would require the Commander X16 hardware to be significantly redesigned, and a more indirect (hardware or software) approach may not be feasible as it very likely would leave the 6502 processor occupied handling the video requests, and impact the Z80's performance as well.

One could make a board with it's own VERA and video output, but at this point, you would essentially be making a second motherboard.

It might make more sense to fork the project outright, developing a separate MSX-compliant system which uses the VERA for video and developed in parallel to the Commander X16. This sounds the closest to what Artik wanted, and may well be worthwhile doing for those interested in the idea. A 'Master X80', as it were.

(And yes, I am aware that I've already used the "Master and Commander" joke for one of my own software projects; that reminds me, I need to read that novel... maybe watch the film, too, though from what I've heard it isn't based directly on the first book, but is a composite of storylines from the series.)

However, I don't know much about the MSX standard, so I'm not certain whether MSX video could be supported (either directly or in emulation) by VERA. It may be better to use VERA as a design template for an MSX-compatible video system, which would make it an actual MSX system capable of running the older software while also having the improved video system for new software.
 
Last edited:
  • Like
Reactions: rje

BruceMcF

Active Member
May 19, 2019
205
63
28
Note that there were "CP/M Compatibility Cards" for both the C64 and Apple II consisting of a Z80 and between 16K and 48K of memory, in much the manner described, using the host computer as a terminal. Since these were generally intended to run CP/M business applications (as the name implies), it was assumed that there was no reason for them to have direct access to the video system. There were few graphical programs for CP/M, and all of those were specific to the particular hardware (since there was no standard for video output - even as text - on S-100 bus systems at the time - which is also why CP/M's soft BIOS needed to be ported to each system it was used on), so this was seen as a reasonable move.
Yes, when running CP/M, the 65C02 would be running the terminal and providing the disk I/O, DMA into some small slice of the Z80 memory space. With a 128K SRAM on board, the 65C02 would also control the memory banking with a single bit in a control register, to have two parallel CP/M 2.2 memory spaces rather than memory banking by a CP/M 3.0 system. The CP/M would only directly control whatever resources are on the card itself ... which might be nothing for the cheapest card, but which would include a lot of I/O resources if it was an ez80.

However, if one wanted to support an MSX system, or one based on some other popular system which used a Z80 such as the TRS-80, ...
Yeah, I'd have no interest in doing that, so that simplifies things for me.