6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Sep 20, 2024 9:47 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Mar 16, 2019 12:10 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
People might find this build by Sérgio Vieira interesting - it's a Z80 machine, with one extra microcontroller performing video output and another performing video drawing, using a pair of frame buffers. (It's a detailed blog post but I think there are no public sources or documentation.)

The result is a machine with sprites and tile-based graphics, capable of the usual kind of 8 bit games but maybe also a bit more. There's a Basic too.

Image

Short demo videos:


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 16, 2019 12:30 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1467
Location: Scotland
BigEd wrote:
People might find this build by Sérgio Vieira interesting - it's a Z80 machine, with one extra microcontroller performing video output and another performing video drawing, using a pair of frame buffers. (It's a detailed blog post but I think there are no public sources or documentation.)

The result is a machine with sprites and tile-based graphics, capable of the usual kind of 8 bit games but maybe also a bit more. There's a Basic too.


I saw that recently too. It's fascinating. It actually has 2 microcontrollers making up the video generator.

From what I've gathered - it's a composite video output in RGB format suitable for a normal TV SCART input. (Much easier than generating PAL) There is some fine-tuned AVR assembler reading data from an external RAM chip, throwing it into a simple 3-chanel R,2R "DAC", then out. This is enhanced though in that there are 2 video RAM banks and a 2nd ATmega which is the one doing the "pixel poking".

So the video generator ATmega (VPU) reads from one Video RAM chip, sends it to the display, and at the same time, the Picture Processing Unit (the 2nd ATmega) updates the other video RAM chip, then at the end of the frame, the 2 video memorys are swapped over, the VPU ATmega caries on generating the video and the PPU ATmega pokes the video RAM with a new frame of data.

I think the sprites and tiles are all done in software.

The resolution is relatively low - 224x192, but not that different from some colour composite video output devices on the early 80's.

The entire video unit connects to the processor via a dual-port shared RAM buffer memory mapped into the Z80's address space, although I couldn't work out how (video ram needs about 44KB)

Anyway, it's quite a nice little system - and a very novel approach to get 8-bit colour sprites & tiles at a resolution an 8-bit micro can handle.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 16, 2019 8:02 pm 
Offline

Joined: Sun Oct 14, 2012 7:30 pm
Posts: 107
I am more impressed that it generates a good video signal with that rats nest of wires! It's difficult enough to get a clean NTSC composite video signal with a dedicated PCB circuit! :)


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 16, 2019 8:42 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Here are some bits from the blog post. I hadn't realised there are as many as four microcontrollers - but that seems fine to me, as each is a subsystem which could back in the day have been a custom or semicustom chip.

Quote:
After all the modules were developed, some were put into protoboards.
As for the CPU module, I’ve managed to design and order a custom PCB, don’t know if I’ll do the same for the other modules, I think I was pretty lucky to get a working PCB on the first try.
Only the sound module remains as a breadboard (for now).


Image

Image


Quote:
CPU: Zilog Z80 operating at 10Mhz
CPU-ROM: 8KB EEPROM, holds the bootloader code
CPU-RAM: 128KB RAM (56KB usable), holds the code and data of the programs/games
IO MCU: Atmega324, serves as an interface between the CPU and the RS232, PS/2 Keyboard, Controllers and SD Card filesystem
PPU-RAM: 4KB Dual-port RAM, it’s the interface RAM between the CPU and the PPU
CHRRAM: 128KB RAM, holds the custom background tiles and sprites graphics (in 8x8 pixel characters).
VRAM1, VRAM2: 128KB RAM (43008 bytes used), they are used to store the framebuffer and are written to by the PPU and read by the VPU.
PPU (Picture Processing Unit): Atmega1284, draws the frame to the framebuffers.
VPU (Video Processing Unit): Atmega324, reads the framebuffers and generates an RGB and PAL Sync signal.
SPU-RAM: 2KB Dual-port RAM, serves as an interface between the CPU and the SPU.
SNDRAM: 128KB RAM, holds PWM Patchs, PCM samples and FM Synthesis instruction blocks.
YM3438: YM3438, FM Synthesis chip.
SPU (Sound Processing Unit): Atmega644, generates PWM-based sound and controls the YM3438.


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

All times are UTC


Who is online

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