Was 8-bit Atari (6502) faster than IBM PC (8088)?

  • by

I was silent for a while as some things required my attention more than old computers. We extended the list of implementations of our Sieve Benchmark and it now supports even 6502. It was developed on Atari 800XL without any modern hardware or software (it’s written in ATMAS II macro-assembler). And it was a pain.

We all remember the lovely days of being young and playing with these simple computers, where programming was often the best way to spend time. These nostalgic memories don’t say the truth how horribly inefficient the development was on these machines in comparison with what came a decade later. David told me that his productivity was about 20 times lower in comparison with developing an assembly program of similar complexity and size on PC. These were one of the biggest reasons for your entertainment:

  • It was easy to fill whole available memory with the source code text. There was a situation when only 100 characters could be added to the text buffer, but about 2000 were needed. That caused that multiple parts were optimized for source code length (except, of course, the sieve routine itself, which was optimized for speed).
  • At the end, it was necessary to split the source code into two parts anyway.
  • Unlike with PCs, the Atari keyboard doesn’t support roll-over on standard keys. It is necessary to release the key before pressing another one (otherwise the
    key-press is not properly recognized).
  • Having a disk drive was a big advantage over tapes. However, the implementation on Atari was very slow and everything took incredible amount of time. Boot into editor? 20 seconds. Loading the first part of the source code? 5 seconds. Loading the second part? 30 seconds. Storing it back? 60 seconds (for just 17 KB). You needed about 160 seconds before trying to run the program after every larger change (including 20 seconds for compiling). Often a minute
    more if the program crashed the whole computer.

Although David never started to use “modern” features like syntax highlighting and code completion and he still programs mostly in the 80×25 text-mode, he said that this was too much for him so I don’t think we will repeat this again soon.

Regarding the results: A 1.77-MHz MOS 6502 in Atari 800XL/XE (PAL) required about 66 CPU cycles to go through a single inner-loop step. If graphics output was disabled during the test, this decreased to just 49 CPU cycles. A 4.77-MHz Intel 8088 needed about 73 CPU cycles to do the same. Thus, 6502 is faster if running on the same clock.

On the other side, the original IBM PC is clocked 2.7x higher than the Atari and 4.7x higher than other important 6502 machines (Apple IIe, Commodore 64). Thus, IBM PC was at least twice as fast in this type of tasks (similar to compiling, XML parsing…). I’m not surprised, but it is nice to see the numbers.

Interestingly, the heavily optimized assembly code running on Atari provides the same performance as compiled BASIC (MS QuickBasic 4.5) running on 20MHz 386DX (interpreted version would be three times slower). This was one of the fastest BASICs out there so it gives you good perspective on how these high-level languages killed the performance back then. David spent a lot of time optimizing the code for both CPUs and used the available tricks for each architecture (like self-modifying code…). If you feel that your favorite CPU should have been faster, you can download the project folder and check the source code. If you create a faster version, please send it to me (but please read the README first, especially the part called “Allowed tricks”).

Also if somebody is able to port the code to Commodore 64, it would be nice to compare the results with Atari (only the disk access, timer and console input/output need to be rewritten). Any expert/volunteer?

Sieve Benchmark download

Transferring old files from Atari floppies

  • by

David asked me if I could help him with transferring all files from the pack of floppy disks he used during the late 80s with an 8-bit Atari (800XE). We are working on the Atari version of our Sieve Benchmark (to compare the performance of old computers) and he told me that, as a kid, he  created many assembly programs that can now speed up the development . The ultimate goal is to compare extremely optimized assembly versions of the benchmark for 6502, Z80 and 8088 to find out, which CPU is faster.

I didn’t have any modern disk emulator for the system so I transferred the files to the PC the old way. I used Atari 800XL and two floppy drives (1050 and XF551). At the beginning, I had just one drive, but then I realized that I was not able to create at least a small RAM disk on a 64k machine with MyDOS – that would allow me to copy files from one disk to another without using multiple drives (this is not straightforward when each of the disks has different density).

Copying files to different disks was necessary. David used the 130KB “ehnanced density” format that is not readable on floppy drives in PC. The Atari XF551 disk drive supports all the Atari formats up to the 360KB double-sided double density that is sort of compatible with PC drives. With the two drives connected to the Atari, I copied the files from the old disks to a few “new” ones and started searching what is necessary to do on the PC side.

At the end, I used two MS-DOS programs – ATUTIL for reading/writing individual files and WRITEATR for creating ATR disk images out of real floppies. All of this took me two evenings, but I’m happy that I didn’t have to use modern hardware to copy files both ways between 8-bit Atari and PC.

(btw David also decided not to use modern hardware so he is programming directly on the Atari 800XL with Atmas II macro assembler from 1985)

Vintage Computers at Work

  • by

We prepared a small room with old computers as a part of a bigger event at work. After careful consideration, we selected Atari 800XL and Commodore Amiga 500 for the contest purposes. Atari was running Space Invaders and each visitor played with the highest difficulty (three lives, level 12). For Amiga, we chose Pinball Dreams and the goal was to get the highest score using just a single ball.

To make the room more appealing, we brought several old computer magazines and 80s props. Curious visitors could also experience ZX Spectrum+ with the Who Dares Wins game. The feedback on our room was very positive and people were talking a lot about their first computers there. However, the biggest surprise for me is that the joystick survived all the players. Some of them gave it a hard time.

Atari Stacy And a New Display

  • by

You can still buy a new white-on-blue LCD for Atari Stacy (a 30 years old system). The reason is simple – the same screen is used in multiple medical/industrial devices. The result is better than backlight replacement we did on a different unit although the new screen is glossier. Now we have two fully working machines.

I don’t have much experience with 16-bit Atari computers so I was quite surprised that the system has also some tricks to get more than 16 colors our of the machine. Albeit not as useful as the HAM mode on Amiga, this is still impressive.

Atari XL Design

  • by

I like the clear aesthetic of the Atari XL series. These were the most visually appealing 8-bit home computers from the 80s. It’s sad that the design of newer Atari computers was much worse after Jack Tramiel came to the company.

Atari XEP80 (1987)

  • by

This device allowed users of Atari 8-bit computers to display full 80 characters per row on their screens. XEP80 came too late and used very strange way for connection with the computer – it was attached to a joystick port. It was quite slow with the original driver but there were 3rd-party drivers allowing users to double the screen update speed (matching 9600-baud serial terminals).

It’s a shame that Atari came with the device at the end of the 8-bit Atari series life and implemented it this way. The powerful terminal processor inside could do much more but that would need to connect it using the bus expansion connector. However, that connector changed over time on the 8-bit Atari series so that would affect compatibility. As a result there were not many software packages supporting its 80×24 mode.

Unfortunately, I didn’t have much time to play with the device. I only run bundled demo programs and took these photos (don’t be confused with the Commodore monitor and keyboard). I will definitely take it home one day and try how seriously this could be used back then.

Atari Touch Tablet (1984)

  • by

Atari Touch Tablet was a device compatible with 8-bit Atari computers and was intended for users who didn’t want to draw pictures with just joysticks or keyboards. We had not much time to test the device and an available heavily upgraded Atari computer didn’t work with the Atariartist cartridge. Therefore we tested it just using a simple BASIC program. It looked like the surface sensitivity degraded little bit over time but it was still usable.

I will post more once I have enough time to properly play with the device and supported software.

External Graphics Cards

  • by

A friend of mine showed me a low-cost option to expand graphics capabilities of Atari TT030. VME bus was converted to ISA and a standard ISA VGA board could be used then. It looked very cumbersome to me and I was thinking how desperate one must be to do it this way.

After few months, another friend sent me the eGPU kit that allows to connect a desktop PCIe graphics card to a computer (laptop) that has only M.2, mini-PCIe or ExpressCard connection. I tried only the ExpressCard version but there are people who made holes in their laptops, removed a Wi-Fi adapter and installed a thin cable that can connect internal PCIe x1 with the external adapter. With an additional ATX power supply, huge compatibility issues and necessary OS hacks, this is even more cumbersome. Anyway, I’m pretty sure that there is a target audience even for this.

Looks like some people didn’t change much in almost 30 years.

Atari STacy 2 (1989)

  • by

It would be a shame to not share the rest of Atari STacy photos. This was my first experience with this machine and it was wonderful. The large trackball is a pleasure to use and the only thing I don’t like are small arrow keys.

The machine is in perfect condition (the display is less bright though). Its internal 640×400 1-bit monochrome LCD operates in the ST High mode and it doesn’t support any other mode. You can use STacy for playing games but you need to attach a TV set or a color monitor then.

You’ve probably noticed that there is a battery LED indicator. The machine doesn’t have a battery (other than the one for RTC backup) because Atari was not satisfied with a very low battery life and decided to not include it (in order to lower the price).