TVOut - TIA?
Topic: TVOut - TIA?
(Read 2135 times)
Where's the beer?
TVOut - TIA?
Jun 30, 2011, 01:37 am
I was doing some reading about the Atari 2600 and how programmers managed to have it do some impressive graphics with it, even though it only had an approximately 1 MHz processor, 128 bytes of RAM, and 4K of ROM (in the cartridge). I began to think about the TVOut library, which is really impressive - but lacks color. Now - we all know that there just isn't enough RAM on the Arduino to have a framebuffer with color (or even a gray-level!); the TVOut library already can take up a big chunk of RAM as it is.
So why use RAM at all?
This was basically the same position the Atari 2600 was in (except at the time, they couldn't increase RAM due to price - whereas we can't increase RAM due to hardware limitations) - so what do people think about doing something like the TIA:
I figure that maybe if the video signal is generated like however it is in the TVOut library - with some kind of "hook" to know both the HBI (horizontal blank) and VBI (vertical blank), and have the data read from a smaller line-buffer, that could be updated on the fly as the video data is output to the TV - that maybe color could be generated, perhaps the resolution increased - but all at the expense of having one heck of a difficult time programming the thing to do interesting "stuff".
Then again - the programmers of the Atari were (are?) able to do it - so why can't "we"? I put that in quotes because I am just throwing this idea out there - I don't have time to pursue this idea beyond suggesting it, and seeing if it goes anywhere, unfortunately - I would soooo love to have that time, though - back in the mid-90's I used to hang out with Nick Bensema, and I would love to get in touch with him again to find out what he knew about the TIA and how it could be replicated...
Hmm - maybe there might be enough memory to double (or more) the size of the "buffer" - could this help anything? I don't know...
There's also the idea of programming an Arduino (ATMega328) to simply act like the TIA - and send a pin-change interrupt signal to the Arduino on the HBI/VBI (which is something the TIA/6507 combo couldn't do because the 6507 dropped hardward interrupt lines); this would free up the main Arduino for the program logic, and leave the display-driving ATMega328 to concentrate on the display (perhaps the extra RAM left over could be used as a small tile buffer or something of that nature?)...
Does anyone think this is a good idea? Where are the flaws (I'm sure there's many that I'm not thinking about, or my limited knowledge of TV signals and the Atari is making me overlook something)?
Maybe someone out there could take this up as a "challenge"...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.
Re: TVOut - TIA?
Jun 30, 2011, 07:13 am
: Jun 30, 2011, 07:22 am by focalist
Well you know I'm a huge fan of the TVout lib a well as an ANTIC and POKEY fanatic from way back
I also had arrive today the three BoArduino kits I sniped off eBay and assembled them while the tech was getting my cable back online.. tree branch took out phone, cable and internet for past several days. Seriously, that duration of an outage is something I haven't even considered since moving from the rural midwest better than a decage ago- this is suburban Boston, a residence left without phone or internet service for the better part of week and dealing with belligerant minimum-wage script-readers.. I think Verizon is about to be given a try. Heck, I might try two soup cans and some twine...
I too had been thinking about "dedicating" and Arduino (in this case, a Boarduino) to handling video and accepting SPI in some way or something similar.. the limitation being (as noted) the memory limitations for the 328.
What may be more reasonable to implement would be Text vs Graphics modes, with optimizations for both... as was typical in the systems we grew up with. The memory for grayscale (internal, anyway) would be a vector array at best, there's just not enough there for a memory-mapped image with more than a single bit layer at any reasonable resolution. What is possible however is to define text-only video modes (and simple player/missile routines) as well as remappable "text" fonts. In addition, there may be some issues in reproducing some of the tricks used to produce "color" images. Monitors and TV's are no longer the Cathode-ray monsters of old, where you could drive the signal in such a way that a pattern of black and white on the screen would create an overlap of the phosphors which would roughly render as a "color" at a reduced resolution. If we want to render color on anything but mid-80's CRT, we need actual colorburst signals, which are beyond (I think) the speed we can get out of a 328... rather than the raster error "colors" we used...
The question is, how far do we want to carry the 328 as a video graphics MPU?
I already see no reason for the external vsync detection of the video experimenter shield.. seems to me the onboard comparator ought to detect those transistions easily, and therefore video overlay and digitization can remain a single-chip solution in my opinion.
I *LOVE* the 328, and I'll be the first to thrash the TvOut lib far beyond what it should be used for.. but I think the question becomes "when is it reasonable to consider an external GPU of some type, and for that matter, are we reasonable individuals?"
Re: TVOut - TIA?
Jan 06, 2013, 03:57 am
Interesting idea...just bought a bunch of NTSCx(2&4) crystals for oscillators to try this...I started out on an Atari 800/Vic 20. (NTSC/2 for Atari, 2xNTSC/7 for Commodore)...but the Atari had the GTIA...the super version of the TIA. If the Arduino were to be clocked at a multiple of the colorburst...I don't see how it would be much of a problem...save for serial communication with a bootloader.
Re: TVOut - TIA?
Mar 14, 2013, 03:05 am
I just recently tried my hand at some form of color using an external circuit, based on a design I saw in byte issue 1
I took a 3.579Mhz crystal and hooked it up to a 74HC14 Hex inverting Schmitt trigger to form an oscillator, then chained it to other i/o's of the 14 to delay the signal, which was then piped to a 4051
the magic trick is to have one of the 4051 inputs to be tied to the unaltered crystal wave to create a reference burst after the back porch, then switch it to one of the offset / delayed signals for a color
I did not get it to work, but I was able to glitch it into producing bands of color
it was just a haphazard attempt using whatever I could find on a breadboard (yea 3.5Mhz on a breadboard) Maybe revisit it later after ordering more appropriate parts
Re: TVOut - TIA?
Mar 24, 2013, 02:44 pm
I know about colorburst signal a little.
Severeal people have generated NTSC or PAL color signal by one chip microcomputer.
So, I would like to try?someday.