z80 compatible PPU?
Moderator: Moderators
-
- Posts: 318
- Joined: Mon Jan 30, 2017 5:20 pm
- Location: Colorado USA
z80 compatible PPU?
Hey, I plan on building a z80 based game console, but of course, what's a game console without graphics!? Do people still make 8-bit graphics cards? Would a VIC-II chip from the Commodore 64 work with a z80? Another question, what's the difference between a 2C02 and a modern graphics card? How is it able to render 3D polygons? Why doesn't a modern graphics card have sprites and palettes to worry about?
Re: z80 compatible PPU?
That's called the ColecoVision or the Sega Master System.DementedPurple wrote:Hey, I plan on building a z80 based game console, but of course, what's a game console without graphics!?
Or any of several dozen arcade machines.
Not really, but you can get New-Old-Stock of a bunch of them.Do people still make 8-bit graphics cards?
The VIC and VIC-2 require something shaped like the 6502's biphase clock; I don't think the Z80 would play nicely.Would a VIC-II chip from the Commodore 64 work with a z80?
2C02 is:Another question, what's the difference between a 2C02 and a modern graphics card?
* fixed function
* just-in-time
Modern GPUs are neither.
In the distant past, memory was so expensive that some kind of real-time decompression (like how graphics work on the NES) is required.
However, at some point RAM became cheap enough that it began to make sense to instead provide allow the graphics unit to draw things into a "framebuffer" and just replay the contents of the framebuffer to the display instead.
Math. Matrices, trigonometry, Bresenham's line drawing algorithm, &c.How is it able to render 3D polygons?
Palettes just kinda suck.Why doesn't a modern graphics card have sprites and palettes to worry about?
You can't interpolate them
You can't mix them
They're a great way of handling real-time decompression, but RAM's too cheap now for it to make any sense.
Sprites have been instead handled via rendering to the framebuffer, and renamed "triangles"
-
- Posts: 318
- Joined: Mon Jan 30, 2017 5:20 pm
- Location: Colorado USA
Re: z80 compatible PPU?
Could you maybe give an example of one I could use for an arcade machine?
Re: z80 compatible PPU?
The Pac-Man hardware is Z80 based. Quickly looking through MAME's source I think I see roughly several hundred others, of which probably half are using it as a coprocessor rather than the main CPU.
-
- Posts: 318
- Joined: Mon Jan 30, 2017 5:20 pm
- Location: Colorado USA
Re: z80 compatible PPU?
No, I meant a graphics processor
Re: z80 compatible PPU?
It wasn't memory cost as much as the speed of updating it. The Apple II (1977) had a frame buffer in HGR mode, and it preceded the TMS9918 (1979), which made sprites over a tiled background the standard.lidnariq wrote:In the distant past, memory was so expensive that some kind of real-time decompression (like how graphics work on the NES) is required.
Then what do you do if you want two characters to look identical except for uniform color? Shaders?Palettes just kinda suck.
You can't interpolate them
You can't mix them
They're a great way of handling real-time decompression, but RAM's too cheap now for it to make any sense.
Re: z80 compatible PPU?
Early arcade machines mostly used arrays of discrete logic (e.g. Pac-Man)
Late 80s-early '90s machines often used custom-built silicon (e.g. Neo Geo)
Late 90s-modern arcades machines often used modified versions of existing home consoles (e.g. Triforce) or PCs.
There are a few arcade machines that explicitly used the same TMS9928 as is in the ColecoVision.
If you want something to have a dynamically chosen color, you can use a shader to emulate palettes at blit time. Or you can build your objects out of multiple polygons and change the color of the texture.
But you probably shouldn't hem too close to palette emulation, though; palette swaps were an easy cheap way of getting more variation for negligible storage costs. But now, storage is sufficiently cheaper (in all but the most contrived of modern examples) that you're really better making more visible variations between characters than just color. Plus the more shape differences you get, the more colorblind-friendly it is.
Late 80s-early '90s machines often used custom-built silicon (e.g. Neo Geo)
Late 90s-modern arcades machines often used modified versions of existing home consoles (e.g. Triforce) or PCs.
There are a few arcade machines that explicitly used the same TMS9928 as is in the ColecoVision.
The Apple 2's release list price was ~4.5 times more expensive than the contemporary Intellivision, and most of that cost was RAM. The C64 came five years later and still cost dramatically more than the NES.tepples wrote:It wasn't memory cost as much as the speed of updating it. The Apple II (1977) had a frame buffer in HGR mode, and it preceded the TMS9918 (1979), which made sprites over a tiled background the standard.
You can bake in the palette swap, if you really want to. That's ok if you have a fixed set of colors.[after I explained what's wrong with palettes]
Then what do you do if you want two characters to look identical except for uniform color? Shaders?
If you want something to have a dynamically chosen color, you can use a shader to emulate palettes at blit time. Or you can build your objects out of multiple polygons and change the color of the texture.
But you probably shouldn't hem too close to palette emulation, though; palette swaps were an easy cheap way of getting more variation for negligible storage costs. But now, storage is sufficiently cheaper (in all but the most contrived of modern examples) that you're really better making more visible variations between characters than just color. Plus the more shape differences you get, the more colorblind-friendly it is.
-
- Posts: 318
- Joined: Mon Jan 30, 2017 5:20 pm
- Location: Colorado USA
Re: z80 compatible PPU?
You know what I just realized, you could have a 6502 run 1080p polygonal FPS games! (With crappy frame-rate, of course.) Correct me if I'm wrong, but you could use a GPU that is at least 32-bit, and treat each 32-bit memory address as 4 different 8-bit ones, and use a mapper to change what 32k is visible to the CPU.
Re: z80 compatible PPU?
I suggest you read my considerations in this relatively recent post.
viewtopic.php?f=5&t=14766&start=75#p190292
Basically there weren't many (or should I say any ?) "general purpose PPUs" made in the late 80s. The TMS chips being the only ones who fits this criteria. Apparently every arcade machine manufacturer would create it's own ASICs for that purpose. If you want a general purpose solution, your only change is re-using chips from a specific machine or daisy chaining TMS chips, but even when daisy chaining many of them you should still expect relatively crappy graphics.
viewtopic.php?f=5&t=14766&start=75#p190292
Basically there weren't many (or should I say any ?) "general purpose PPUs" made in the late 80s. The TMS chips being the only ones who fits this criteria. Apparently every arcade machine manufacturer would create it's own ASICs for that purpose. If you want a general purpose solution, your only change is re-using chips from a specific machine or daisy chaining TMS chips, but even when daisy chaining many of them you should still expect relatively crappy graphics.
I have no experience in interfacing GPUs, but usually merging hardware from different generations is difficult because of different expectations when it comes to bus speeds, voltages, memory sizes and data/address buses width. But yes, you could have a 6502 CPU hooked up to modern hardware with some effort, although whether this makes any sense it up to anyone's opinion.Correct me if I'm wrong, but you could use a GPU that is at least 32-bit, and treat each 32-bit memory address as 4 different 8-bit ones, and use a mapper to change what 32k is visible to the CPU.
-
- Posts: 1565
- Joined: Tue Feb 07, 2017 2:03 am
Re: z80 compatible PPU?
Just a note about the VIC II + Z80.
You can put a Z80 with a VIC but you need to add some buffer logic to handle the fact 6502 wants data at the falling edge and Z80 wants it at the rising edge. The Commodore 128 has the logic already worked out for you so you can just copy Bil Herds Implementation I would also recommend a VIC-IIe as it has a faster clock that is timed for the Z80 CPU over the 8502 clock.
You can put a Z80 with a VIC but you need to add some buffer logic to handle the fact 6502 wants data at the falling edge and Z80 wants it at the rising edge. The Commodore 128 has the logic already worked out for you so you can just copy Bil Herds Implementation I would also recommend a VIC-IIe as it has a faster clock that is timed for the Z80 CPU over the 8502 clock.
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: z80 compatible PPU?
Is using the z80 a price argument? I know there's a handful of 65x computer kit projects to buy and build, but new production of the CPUs are in low volumes and they are therefore not that cheap (depending on what your goal is) and graphics solutions are few.
Regardless z80/65x, Having arduino or a FPGA chip emulate a processor might be worth considering, since it ought to be cheaper. Maybe you can clone a known PPU this way?
Regardless z80/65x, Having arduino or a FPGA chip emulate a processor might be worth considering, since it ought to be cheaper. Maybe you can clone a known PPU this way?
Re: z80 compatible PPU?
Would interface a Z80 with a cheap VGA card be too hard?
Maybe you could try some old ISA or PCI cards?
AFAIK, they cost next to nothing.
Ardruino or Raspberry Pi seems to be the easier and cheaper solution.
Maybe you could try some old ISA or PCI cards?
AFAIK, they cost next to nothing.
Ardruino or Raspberry Pi seems to be the easier and cheaper solution.
Re: z80 compatible PPU?
If you can dig up an ancient 8-bit ISA VGA card, that's pretty easy to interface with any 8-bit microcontroller. I had a friend in college who hooked one up to an 8051; the awkwardest part was having to disassemble the BIOS ROM to find the correct initialization commands (i.e. having to port a part of the BIOS from x86 to 8051 asm).
Re: z80 compatible PPU?
I've been banned for spam.
Last edited by Charless on Tue Jan 07, 2020 10:34 pm, edited 1 time in total.