Jump to content
IGNORED

TIA Video Output Implementation


Phosphorus

Recommended Posts

Hello there!

 

I am currently writing an Atari2600 emulator for Windows (32). So far, things have been going quite swimmingly; all the basic CPU core & Op-codes have been implemented, certain PD games are actually running and so on but I have hit on a proverbial brick wall.

 

This steep, slippery wall is: Video Output! Yes the registers, in fact pretty much everything to do with it have me twisted up in seemingly endless balls of twine.

 

Now we all know that the video and sound output is produced through the TIA chip, and the output is somehow formed by writing data into the TIA registers. And then the video Output in drawn at 3 times the clock speed of the CPU (3.75MHZ). Now one of (my) biggest problems is that this is all of course done in real time, and thus quite a bit trickier than your regular electron beam output, as you can command that one!

 

This all sounds very good in theory (well not really actually) but in practicality I just need something, some ray of light to get me started upon scaling this brick wall; could anyone here supply the climbing gear? ;).

Link to comment
Share on other sites

Ok, here is some advice from someone who has worked on a 2600 emulator...

 

First be sure you have read an understand all the Stella documenation you can find, specifically the Stella programmers manual. You can get links to most of this at my site http://atarihq.com/danb

 

Next, it sounds like you wrote your own CPU core, if so be sure you are counting cycles absolutly correctly. Be sure each instruction has the right cycle count and that you implement the instructions that have variable cycle counts the correct way.

 

When you are emulating the TIA you have to do it on a cycle by cycle basis. You need to keep track of exactly where your "virtual electron beam" is on the screen so that any write to the TIA registers can take effect immediatly. You also need to know when during a scan line things happen. For example, when you write to the playfield register, at what point does this effect the display. This information is not really documented anywhere that I know of. You may be able to find information in the Stella Programmers Mailling List archive, there is a link on my site to it.

 

If you need anymore info, please feel free to ask.

 

Dan

Link to comment
Share on other sites

Thanks for the helpful reply DanBoris.

 

I am still a bit stuck however, I need detailed information (as detailed as the Stella Docs) on how precisely to render the screen.

 

Coupled with as much information on the TIA chip as possible, then I should be able to get some video output set up. Everything else is going very well, it is just this spot that hinders my progress.

Link to comment
Share on other sites

The information in the Stella doc is about as detailed as you will get. You will not find anything that documents every details of the TIA all in one place. The best bet is to start with the Stella doc and try to get Combat working based on that. Combat doesn't do anything tricky so it's the easiest to get working. Then you will have to start modifying your emulation to support all the tricks that other games pulls like mid-line changes etc.

 

Dan

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