It is currently Wed May 24, 2017 6:13 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 3:44 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 237
Location: Colorado USA
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?


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 4:23 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5687
Location: Seattle
DementedPurple wrote:
Hey, I plan on building a z80 based game console, but of course, what's a game console without graphics!?
That's called the ColecoVision or the Sega Master System.

Or any of several dozen arcade machines.

Quote:
Do people still make 8-bit graphics cards?
Not really, but you can get New-Old-Stock of a bunch of them.

Quote:
Would a VIC-II chip from the Commodore 64 work with a z80?
The VIC and VIC-2 require something shaped like the 6502's biphase clock; I don't think the Z80 would play nicely.

Quote:
Another question, what's the difference between a 2C02 and a modern graphics card?
2C02 is:
* 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.

Quote:
How is it able to render 3D polygons?
Math. Matrices, trigonometry, Bresenham's line drawing algorithm, &c.
Quote:
Why doesn't a modern graphics card have sprites and palettes to worry about?
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.

Sprites have been instead handled via rendering to the framebuffer, and renamed "triangles"


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 4:25 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 237
Location: Colorado USA
Could you maybe give an example of one I could use for an arcade machine?


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 4:29 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5687
Location: Seattle
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.


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 4:32 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 237
Location: Colorado USA
No, I meant a graphics processor


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 4:35 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 18345
Location: NE Indiana, USA (NTSC)
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.

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.

Quote:
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.

Then what do you do if you want two characters to look identical except for uniform color? Shaders?


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Mon Mar 27, 2017 4:45 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5687
Location: Seattle
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.

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.
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.

Quote:
[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?
You can bake in the palette swap, if you really want to. That's ok if you have a fixed set of colors.
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.


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Wed Mar 29, 2017 8:15 am 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 237
Location: Colorado USA
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.


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Thu Mar 30, 2017 1:50 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7035
Location: Jongny, VD, Switzerland
I suggest you read my considerations in this relatively recent post.
http://forums.nesdev.com/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.

Quote:
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.

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.


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Thu Mar 30, 2017 4:45 am 
Offline

Joined: Tue Feb 07, 2017 2:03 am
Posts: 120
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.


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Sat Apr 01, 2017 11:35 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 383
Location: Gothenburg, Sweden
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?

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Tue Apr 04, 2017 2:29 pm 
Offline
User avatar

Joined: Sat Jul 04, 2015 9:58 am
Posts: 427
Location: -29.794229 -55.795374
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.


Top
 Profile  
 
 Post subject: Re: z80 compatible PPU?
PostPosted: Tue Apr 04, 2017 2:50 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5687
Location: Seattle
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).


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: B00daW and 2 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:  
Powered by phpBB® Forum Software © phpBB Group