Canadiangeek.net How do you know you can't do something if you haven't tried

28Apr/204

My Atari 7800 Needs an RGB mod.

Over the last few weeks of Covid isolation i have been working to RGB mod each and every console i own that came out before the invention of component or HDMI. Every console has a published solution or kit that i was able to purchase/build and install with the exception of one console. The Atari 7800.

Most consoles have a native RGB signal on the board that just needs some simple tweaks to bring it in compliance. Those that do not require more work, solutions vary from adapting existing signals, assuming they are of sufficient quality, up to the much more difficult complete emulation of the graphics chip.

The Atari 7800 problem goes one step further. There is no signal on the motherboard that holds sufficient quality to adapt. On top of that the 7800 has two graphics processors, the Maria chip, for 7800 games and a 2600 chip called the TIA to run the older 2600 games.

Now to finding a solution.

Tynemouth Software: Atari 7800 PAL AV out Composite Video Conversion
The 7800 Motherbaord, the maria chip is the larger IC in the middle of the left-hand side. The TIA chip is directly across from Maria on the far right-hand side.

There is already a solution for RGB modding the 2800 by desoldering the TIA chip on the 2800 and adding a board that intercepts the signals on route to the the TIA chip http://etim.net.au/2600rgb/ , it uses at 64 GIPO processor (the cy8c3244axi) to read the address lines in real time and recreate the video output using a tr9c1719-66dca video DAC with 3 channels (red, green, blue). i own one of these boards and it works great.

The solution for the 7800 requires solving 2 problems, the first is to render the data destined for the Maria chip (for 7800 games) and to render data that was destined for the TIA chip (for 2600 games). My focus here is to make this work for 7800 games first, the 2600 problem already has s solution, once the 7800 works 2600 support can be added in later

Option 1, drop in replacement for Maria. Someone has already done the leg work to reproduce the chip https://atariage.com/forums/topic/154745-maria-chip-has-been-resythensized/page/5/#comments this could be adapted to add RGB functionality. But silicon is expensive.

Option 2, unsolder the Maria chip, install a header and use a small board to tap into the address lines, data lines and chip enable lines. The address bus under the maria chip is the same used by the TIA chip so these same pins could read data destined for the 2600, we just need to monitor a different address space. We may need an additional wire to the TIA enable pin however i think we can assume if the Maria enable pin is low the TIA enable will be high (easy to test)

So lets start down the path of option 2 and see if we run into any problems. First we will need the pinout of the Maria chip

pinout
A0-A15memory address bus
D0-D7memory data bus
Vssground
Vddpower
/NMIoutput to cpu
XTAL114 MHz input
XTAL2main clock output
MENMaria enable input. When lo, video is off and memory map is 2600
Ø2phase 2 clock input
TCLKTIA main/4 clock
Ø0phase 0 clock output. 1.79M or 1.19M
DELdelay line control voltage input
/SRAM0-1RAM chipselects
/SEL32RIOTchipselect
/TIASELTIA chipselect
R/WRead/write input
/HALTcpu halt output
READYcpu ready output
LUM0-3luminance output
COLORcolor output
BLANKblank output
SYNCvideo sync output

There are 4 versions of this chip

C024674 7800 NTSC older
C025349 7800 NTSC newer
C025314
C025718 7800 PAL

I believe all 4 have the same pinout. It looks like this pinout will give us all the signals we need plus a few we dont. The plan will be to use this chip still, we are just going to watch signals move between the bus and the chip and recreate a video output, existing composite/rf/svideo mods will not be impacted. The address bus also has the TIA chip as well so we will see traffic destined for the 2600 chip as well, Maria will be ignoring it but we dont have to.

Now that we know the basic hardware layout we need to know the address space the maria chip works with and what each address in that space would normally do. I was able to find this site that lays out the addresses of each chip https://atarihq.com/danb/files/78map.txt as well as the addresses used inside the Maria chip.

Then i found this fantastic document http://www.atari7800.org/manuals/7800_Maria_Specs.pdf that outlines the behavior of the Maria chip, descriptions of the physical chip, etc.

I also found this great diagram that shows the timing cycles that the Atari uses. Turns out the resolution output of the Atari is not set in stone, Program code has to run in the blanking period however if your game did not need as much time for processing its possible to shorten the blanking period and increase the horizontal or vertical resolution.

The next step for this project is to:

  1. Remove the Maria chip from my console
  2. Add a socket
  3. Have a board made that breaks out all maria pins to an IDE cable header
  4. Make another board that brings the IDE cable header into a breadboard.
  5. Decide on a suitable processor that is fast enough to build and put one frame worth of data into a tr9c1719-66dc before the next frame needs to be built. I think i will only need one interrupt triggering off the clock signal. I bet i could use the same processor currently used by the Atari 2600 RGB mod.
  6. Write code to interpret the data and output 7800 frames to my computer over a debugging cable. (doesn't have to be real time at first)
  7. Optimize that code to run fast enough to not lose any frames
  8. Write code to output those frames to the tr9c1719-66dc instead of my computer
  9. Breadboard up the tr9c1719-66dc along without outputs to scart using a BH7236AF, test
  10. Draw up the final circuit in easyeda, get some boards made
  11. If everything works shift focus to write software that attempts to render 2600 video using the same address pins and maria enable pin.

Extra considerations

  1. The palette will need to be recreated (color reproduction on Maria would be approximate, colors are set into the palette addresses on the Maria chip, we get to interpret those colors how we see fit. The NesRGB handles this buy having several options selected with a switch, we could do the same. People always have opinions about this kind of thing (we could get the color RGB values from framemeister configs meant for the Atari 2600)
  2. i could cheat and buy a https://etim.net.au/shop/shop.php?crn=210&rn=552&action=show_detail 2600RGB, simply make an adapter board that moved the address pins from the TIA layout to the Maria layout, I would need to add a few additional address lines because the TIA has a smaller address space, maybe i could borrow them from other pins or add a few bodge wires. I could then erase the data on the 2600RGB and replace it with my 7800 firmware. This could speed up prototyping
  3. I should look into how controller input is read, maybe that comes across the address bus, if i could capture input i could use controller combinations to set pallet information (up up down down left....). Or maybe i could read the consoles physical switches. **UPDATE** Controllers are read directly into the 6532 RIOT chip, this data does go across the bus, to the CPU, i can sniff this data as goes across the bus.
  4. While a simple board gets us 2600 and 7800 video signals, we still need additional wires to get audio (its not part of the Maria chip). Audio comes from the TIA chip as well as the cartridge slot. I need to grab this signal after they are mixed together, maybe at the RF modulator, voltage levels will need to be checked. This should also run through a small non polarized capacitor before being sent out the scart cable.

Sources

  1. http://www.atari7800.org/manuals/Devcard.htm
  2. http://www.atari7800.org/manuals/7800_Maria_Specs.pdf
  3. https://atarihq.com/danb/files/78map.txt
  4. https://atarihq.com/danb/a7800.shtml
  5. https://atariage.com/forums/topic/244830-maria-diagram/
  6. https://atariage.com/forums/topic/154745-maria-chip-has-been-resythensized/#comments
  7. http://www.qotile.net/minidig/docs/stella.pdf
  8. https://atariage.com/7800/archives/schematics_ntsc/

Comments (4) Trackbacks (0)
  1. This looks amazing. Any progress?

  2. I also demand an RGB mod for the 7800. Did you figure out the remaining pieces?


Leave a comment

No trackbacks yet.