Page 1 of 1

Atari 8-bit architecture and homebrew versions

Posted: 16 Nov 2019, 01:10
by PurpleGirl
When I was a teen, I owned an Atari 800 that I still have today. Recently, I've been researching the Atari 8-bit computers. It is interesting how the hobbyist and FPGA community have made all sorts of mods and are still using them or homebrew versions of them today.

Atari 8-Bit Computer Architecture
Atari 8-bit computers use a modified 6502 processor that they nicknamed "SALLY." Atari modified the 6502 CPU to add a /halt line in place of an unused pin and may have added a second R/W line. Atari literature refers to the Sally chip as a 6502C but it is a modified 6502B. That was unofficial since the MOS 6502C does not have a /halt pin. The earliest Ataris added 4 chips to disable the 6502 while ANTIC accessed the RAM. So the Sally 6502 reduced the chip count.

Atari uses the Sally 6502 because they also use a video coprocessor called ANTIC (Alpha-Numeric Television Interface Controller) which needs to access memory. ANTIC also acts as a DMA controller. In addition to running user code, SALLY writes a display list, then ANTIC takes over to process the display list. In turn, ANTIC sends its output to the GTIA (or CTIA, or FGTIA, depending on the television standard used and the exact Atari model). The CTIA was a lower-cost version of GTIA with fewer graphics modes. ANTIC uses an interrupt signal to get SALLY to run display list handlers. The GTIA makes things displayable and sends output to the RF modulator.

"Freddie" and the MMU chips handle the refresh, using ANTIC as a DMA controller. The port and keyboard controller, POKEY, handles the sound, and along with the Peripheral Interface Adapter (PIA), POKEY also handles the ports.

1088 XEL
The 1088 XEL is an interesting project. It uses 5 of the original Atari chips (Sally 6502, Antic, GTIA, Pokey, and PIA). It adds a 2nd POKEY to add true stereo. It uses SRAM, so the FREDDY and MMU chips do not exist. That improves performance since there is no DRAM refresh, so ANTIC doesn't pause SALLY for that reason. I wonder if using dual-ported SRAM would improve performance since Sally could be attached to one channel and ANTIC and the rest could connect to the other. Then maybe the /halt line could be disconnected since memory accesses would be safe. The 1088 XEL does not include a ROM since it is made from the ground up to use the Ultra 1 meg daughterboard, and the Ultra 1M replaces the ROM in stock Atari machines. Other modifications from the original design include using a PS2 keyboard and mouse.

The 1088 XEL only provides S-video and maybe composite, but if you add the VBXE mod, you can get enhanced RGB/CGA with extra modes. You might be able to modify the FPGA core and change a crystal to get the VBXE to work with some VGA monitors. With the Sophia mod, you can get DVI. The VBXE mod replaces the Antic chip, and the Sophia mod intercepts the GTIA. If I had a 1088 XEL, I'd add the Rapidus mod which sits between Sally and its socket. The Rapidus adds a W65C816 CPU, which is a 16-bit version of the 6502, and it is clocked at 20 Mhz.

Rapidus Upgrade
There is the Rapidus modification that can upgrade stock Atari machines and possibly even the 1088 XEL by adding a 65816 CPU. That is a 16-bit CPU with some modifications and added instructions when compared to the 6502. The 65816 is not fully pin-compatible with the Sally 6502, so if you want to use it, you'd need a multiplexer or some other chip to make up for the generations and implement a /halt line. The Rapidus board allows you to switch between the original SALLY 6502 and the 65816.

I like the one Rapidus benchmark that is on Youtube. It compares between the regular BASIC cartridge in stock Atari mode, the Turbo BASIC cartridge in stock Atari mode, the Veronica BASIC cartridge in stock Atari mode, and Turbo Basic running with the Rapidus in 65816 mode. Regular BASIC with the Rapidus disabled takes about a minute and 55 seconds to draw a sphere. Turbo Basic with the 6502 takes 33 seconds to do it. Turbo Basic has faster drawing routines and faster FPU emulation. Veronica BASIC takes 8 seconds. Veronica BASIC cheats because, in addition to having better drawing and FP routines, it has a 65816 in the cartridge that is clocked at 8 times the 6502 clock rate. Having the Rapidus mode enabled and running Turbo BASIC runs the program in 3 seconds.

Universal Memory Upgrade and Repair Kit
There is also a universal Atari memory problem repair kit. It is a 64k SRAM board that fits between the "Sally" 6502 and the socket. Other than that, you remove all the memory boards, and optionally, you can solder the CAS-disable wire between the SRAM board and the appropriate pin on the motherboard or CPU board, depending on which exact model you put it in. Some models may require an alternative FREDDIE chip to disable the DRAM refresh. So if you have a problem with a memory board or the DRAM refresh circuitry, this is a simple workaround. If you disable the refresh, it should work a tad faster since ANTIC halts the CPU less. So it only halts the CPU to process the video and not refresh the RAM.

Atari 2600 Video Game
The Atari 2600 video game system is simpler than the Atari computers. It uses a 6507 (a 28-pin version of the 6502 with 13 instead of 16 memory address pins, though they only used 12, no /halt line, and no interrupt lines), the TIA chip (like GTIA, but not as complex), and the RIOT chip (RAM, I/O, Timer). Other than that it has mostly discrete resistors and a few pots, inductors, capacitors, and crystals. The cartridges were the ROM and software. One company did make a keyboard and a homebrewer made a BASIC for it.

Re: Atari 8-bit architecture and homebrew versions

Posted: 17 Nov 2019, 14:03
by qwertyface
On the subject of the Atari 2600, I recently saw this demo which I thought was really impressive considering the severe limitations of the hardware (and also I love the music).

It did get me thinking what a demo scene production for the Gigatron could look like - with clever coding it could probably knock the C64 into a cocked hat, as Marcel's demo posted today also shows.

Re: Atari 8-bit architecture and homebrew versions

Posted: 17 Nov 2019, 14:07
by qwertyface
I might add that I thought the final image was less than classy, and subtracted from the otherwise impressive feat.

Re: Atari 8-bit architecture and homebrew versions

Posted: 17 Nov 2019, 20:09
by PurpleGirl
The 2600 demo was impressive. The demos for modified Atari computers and homebrew clones are even more impressive.

The Eclaire is another homebrew Atari clone, but it is an FPGA implementation with a turbo Sally and other Atari chips in the FPGA, whereas the 1088 XEL uses authentic Atari chips, with custom TTL glue logic (a bit simpler than in the original Atari) and a couple of additional chips such as a PS2 controller. The XEL requires the Ultra 1 Meg upgrade to work, which uses an FPGA and can be ordered with the XEL ROM version installed. The 2 homebrew Atari implementations each have their own strengths. The XEL is likely more compatible, more upgradeable, and has more memory, but the Eclaire is faster (due to the turbo modes implemented in FPGA). I do imagine the XEL can be faster than it is with the Rapidus upgrade (and can then run things the Eclaire cannot run), but I don't think that was ever tried. The Rapidus fits in the Sally socket and requires 3 additional wires to be soldered to the motherboard, or 2 to the motherboard and 1 to the Ultra 1 Meg board. It also requires an option ROM, and the Ultra 1M has room for flashing that. So in theory, the Rapidus board should work on the XEL, provided that there is room if other daughterboards are installed.

Speaking of Rapidus and the 65C816, the Super Nintendo uses a derivative of the 65C816 with additional instructions, making it a 16-bit gaming system.

There is also a Mist, which is a vintage computer emulator with different FPGA cores. However, its main disadvantage is that it will not work with vintage peripherals. The Mist (in Atari mode) and Eclaire run neck to neck in terms of performance, with the Mist seeming faster on a few operations, and the Eclaire seeming faster on others and perhaps faster overall.

About all the modern Atari clones use SRAM and also include a "CMOS" configuration page. The configuration page is good to get vintage software to work and to configure things such as peripherals and boot devices.