Jump to content
IGNORED

TIA as sound and video for homemade z80 computer?


universal2600

Recommended Posts

Hello, as the title suggests im planning to build a from scratch z80 computer and wanted to know if a TIA from a 2600 can be used with a z80 cpu or is it designed solely for the 6502(7) i figured i'd use it since i have several of them laying around, i just dont want to have 4 main chips with a plethora of ic's just to communicate between the z80 and TIA.

 

thanks

Link to comment
Share on other sites

One problem is Z80 uses more cycles per typical instruction, since you have to hit registers on TIA on the fly for video generation it might be a problem. Object positioning probably the biggest - IIRC hitting the register for coarse positioning relies on delay loops that are multiples of 5 cycles.

 

Likely the problems could be overcome - for starters you could probably run the Z80 at the same 3.6 MHz speed as TIA. Though it expects register accesses to occur at 1/3rd that speed, it shouldn't be too hard to sync accesses on a 1.16 MHz clock.

Link to comment
Share on other sites

One problem is Z80 uses more cycles per typical instruction, since you have to hit registers on TIA on the fly for video generation it might be a problem. Object positioning probably the biggest - IIRC hitting the register for coarse positioning relies on delay loops that are multiples of 5 cycles.

 

Likely the problems could be overcome - for starters you could probably run the Z80 at the same 3.6 MHz speed as TIA. Though it expects register accesses to occur at 1/3rd that speed, it shouldn't be too hard to sync accesses on a 1.16 MHz clock.

yeah that's why i posted since they created the tia to eliminate the need for a framebuffer,so you need to change values on the fly, but i was thinking is it possible to have lets say an 8k ram chip between the z80 and tia, the z80 will write to the ram, the tia would pull what it needs from the ram, i guess adding a framebuffer in a rough sense

Edited by universal2600
Link to comment
Share on other sites

Some sort of intermediate hardware which automated the display would be a cool idea.

Problem is you've got all of 40 pixels playfield which is represented in the hardware by 20 bits which you either have replicated or mirrored or you have to store again with the CPU for unique graphics on the right of the display, plus you need to get the PMs into action for detail and text.

Then it comes back to cycle critical timing and the CPU doing things like writing player graphics registers at appropriate time or hitting the VDELAY register to bring buffered player graphics into play.

 

Maybe some sort of PIC with access to an SRAM, the Z80 would need access as well. Then devise a psuedo instruction set that the PIC can run during the display, maybe some sort of way cut down 6502 emulation.

Link to comment
Share on other sites

Some sort of intermediate hardware which automated the display would be a cool idea.

Problem is you've got all of 40 pixels playfield which is represented in the hardware by 20 bits which you either have replicated or mirrored or you have to store again with the CPU for unique graphics on the right of the display, plus you need to get the PMs into action for detail and text.

Then it comes back to cycle critical timing and the CPU doing things like writing player graphics registers at appropriate time or hitting the VDELAY register to bring buffered player graphics into play.

 

Maybe some sort of PIC with access to an SRAM, the Z80 would need access as well. Then devise a psuedo instruction set that the PIC can run during the display, maybe some sort of way cut down 6502 emulation.

Yeah I was thinking about using a micro i do have a few pic18f4550, one of those 40 pdip pic mcu with all the bells and whistles, even has usb capability on chip, maybe it could be possible to use the pic and TIA to produce two video modes, tia would be lowres graphical mode, pic would be hi res but fewer colors. I think the what's the hard part is that to a cpu a tia is just a few bytes ram the tia isn't really much of a processor from the cpu point of view, just a bunch of latched memory addresses

Edited by universal2600
Link to comment
Share on other sites

Likely the problems could be overcome - for starters you could probably run the Z80 at the same 3.6 MHz speed as TIA. Though it expects register accesses to occur at 1/3rd that speed, it shouldn't be too hard to sync accesses on a 1.16 MHz clock.

 

Wickeycolumbus did an experiment a few years ago where he had a 65C02 running at the same clock rate as TIA, TIA appeared to work fine with that.

Link to comment
Share on other sites

 

Wickeycolumbus did an experiment a few years ago where he had a 65C02 running at the same clock rate as TIA, TIA appeared to work fine with that.

that's cool but he is using a newer 6502 variant, im using a old 4Mhz NEC D780c z80, and 6502 has a noticeable speed difference at any given clock, z80 takes ~2-4 cycles more to complete an instruction vs the 6502.

 

nice read though, thanks for the info!

Link to comment
Share on other sites

  • 1 year later...

apologies for the necrobump, but i have gone back and actually started work, i have got a 4 MHz z80, tia, 6532, and two pic16f628a (why not), my question is with the tia, one is that is clock frequency MUST be 3.58MHZ, or can it be overclocked; lets say clock the tia @ 4HMZ and have the cpu run of the div by 3 osc from the tia and still have it function (i was thinking to have a 4MHZ "master" clock and wire it to have a slow and fast switch from the 4 MHZ to the tia div by 3 for the cpu if thats possible), and two with tia drawing the frame, is hardware controlled to a 160 x 192 resolution or can it be programmed to draw at higher resolutions? mainly speaking since that the z80 has a full 16-bit address space instead of the 6507 13bit, I can address 64k at a time instead of 4k of the 6507 (iirc) so i have alot more addressable memory?(i was thinking of putting 8 or 16k of ram to start haven't decided yet depends if can find my 32k chip wherever it is)

Link to comment
Share on other sites

TIA doesn't have a frequency lock, the signal output is completely dependent on correct clock being used. Also it doesn't have video RAM, every single pixel has to be manually drawn on the fly. It is part of 2600's quirk that makes it a bit hard to program for. One cycle short or one cycle too many on a single line, you would have video tearing. A few lines short or too many lines and older TV will roll. Newer TV may cut off extra or refuse the signal.

 

Good luck with your project and do let us know!

Link to comment
Share on other sites

TIA doesn't have a frequency lock, the signal output is completely dependent on correct clock being used. Also it doesn't have video RAM, every single pixel has to be manually drawn on the fly. It is part of 2600's quirk that makes it a bit hard to program for. One cycle short or one cycle too many on a single line, you would have video tearing. A few lines short or too many lines and older TV will roll. Newer TV may cut off extra or refuse the signal.

 

Good luck with your project and do let us know!

that brings another question is it feasible to store the tia frame in ram and have the tia pull it from memory?

Link to comment
Share on other sites

As 7800 said the tia won't do much tight without a proper clock based around video timings

 

3.57xxxxy was chosen as the color burst reference cause it's a multiple of the line draw rate, sooo messing with it to much will result in a unusable video signal

Link to comment
Share on other sites

  • 4 weeks later...

how possible would it be to draw the take a Tia frame, with the z80 writing the values into a reserved are of ram like a buffer,a frame ahead of the current frame, have a micro ( I have two pic16f628a aswell a 74hc595 shift register) and just have the pic relay the frame into the Tia, and allow the CPU to work on other instructions, and just by poking new values in the ram space to control the Tia since there is 8k ram + 128 byte onboard the riot

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...