"Pixel Dream Redux" is an Atari 8-bit demo for 64k Atari 8-bit machines. It is my demake/parody of Pixel Dreams for the Atari STE. It features 16 kHz samples using COVOX (8-bit) or POKEY (4-bit). The demo ranked 3rd in the Atari 8-bit demo compo at Silly Venture 2k24 Winter Edition.

 

The Main Part

I was stunned when I saw the original at Silly Venture 2k24 SE in the summer. Until then, I was no fan of using AI stuff in demos. But the tune was catchy, and I could not get it out of my head. During the presentation, I said that always-recurring sentence to myself: "I think I can do this on my Atari 8-bit, too!". So, after the party, I played around with the graphics and the sound from the YouTube video. But the results were not satisfying. So I reached out to Grey, and he put me in contact with the creators of the original. This way, the music had the original quality as a source. Using Hatari, I was able to get pixel-exact images.

The Graphics

The original Atari STE images use 15 colors plus black for the border. The initial idea was to use Graphics 15 plus DLIs. I create a Java program to analyze the images, stretch, crop, and convert them. However, the analysis showed that using only four colors plus DLIs would not yield reasonable results. Also, the DLIs would have severely impacted the sample replay because they would interrupt it unconditionally. I could not find a good way/algorithm to reduce the number of colors. Ultimately, I decided to use Graphics 10 without DLIs, as it offers nine colors per line, even though the horizontal resolution is only 80 pixels. While researching the algorithms for color reduction, I found ImageMagick. Some years back, I had already used that "swiss army knife of command line image processing", but I had forgotten about it. Running different conversions of many pictures from a batch script was instrumental in finding good results.

Original Version Redux Version
 
 
 
 
The Sound

I have had an unused "4 MB Flash MegaCart" by Bernd Herale lying on my desk for over 10 years, so I decided to go for a cartridge release to obtain the best sample quality. My "The!Cart" cartridge can only emulate "2 MB Flash MegaCart", so I had to restrict myself to that for the initial release.

Using COVOX turned out to be an additional challenge: There are many different ways and addresses where COVOX can be installed, and there is no way of detecting the extension. This means I had to provide a user selection for that. Also, I didn't have a COVOX-equipped machine, and Tigerduck had sold his separate COVOX expansion box just 4 weeks ago at the ABBUC annual meeting. Fortunately, he has a PokeyMax in his primary Atari 800 XL, and PokeyMax includes COVOX. So, he lent me his primary Atari 800 XL to test my program. To be on the safe side and because probably not many people have COVOX extensions, I also added the POKEY version, which uses only 4-bit samples instead. Using COVOX was the primary aim for the party release because it offers much better quality, especially in quieter parts. On my Loewe CRT, the sound of the COVOX is amazing.

The demo was mostly completed two weeks before the deadline, and I finally got Tigerducks Atari 800 XL to run the tests on real hardware. And they failed! The colors on the screen were flickering like hell. I first thought there was an issue with the TV connection cable (we all know the pain of SCART connectors). However, after testing on other machines and CRTs, it turned out that the problem was somewhere in the software. But I had no clue where. Everything worked fine in the Altirra emulator, so I had no means of hunting down the bug. It looked like sometimes, the display list interrupts were missing. But the display list interrupt is non-maskable and has priority over the POKEY timer interrupt I was using for the 16 kHz sample replay. That's what I thought until I vaguely remembered something I had read some years ago... in the Altirra Hardware Reference Manual:

Missed NMIs
If the 6502 responds to an IRQ starting at exactly cycle 4, any NMI that ANTIC would have triggered on cycle 8 will be lost. This happens whenever the IRQ acknowledgment sequence occurs over cycles 4-10 and includes DLIs, VBIs, and on the 400/800, the SYSTEM RESET interrupt. NMIST is still updated as usual, however. The most visible artifact caused by this problem is glitching on screen if you attempt to use DLIs while an SIO transfer is in progress. However, it can happen with any IRQ source, including POKEY timers and the keyboard.

And because Phaeron is a perfectionist, there is, of course, a setting in the Altirra system configuration to also emulator this obscure behavior. Funny enough, it is commented, "Needed for full accuracy, but not generally relied on by software."

That is true. The software would not rely on it - but the hardware does it, and due to the high frequency of the POKEY timer interrupts, the situation occurs in almost every frame, blocking the DLI and the VBI. The same happens during regular cassette or disk operations when the POKEY timers perform SIO operations. But because the ANTIC and GTIA do not need the DLI/VBI to display a stable picture with stable colors across the screen, you will never notice it. In short - I was screwed, and for one week, I had no idea what to do. There is no way around it if you try to simultaneously use both types of interrupts. I needed the IRQ for the sample replay with the screen switch on and the DLI to switch from Graphics 10 to Graphics 8 for the scroller at the bottom of the screen. Then, after many sleepless nights, I realized that the CPU was just busy waiting between the different scenes. More importantly, the moment the scene faded out and switched to the next image of the next scene, no scrolling text was displayed. In this phase, I could replace the DLI with a busy wait for the correct vertical beam position (VCOUNT). This was a significant rewrite, but I finally made the demo work without problems.

 

The Outro

The demo ends with a hires text message screen, which adapts the original demo's screen. It consists of quotes from a conversation with Emkay on YouTube. In the comments of  ATARI XL / XE += ROBOTS RUMBLE =+ NEW PORT GAME 2024 - VBXE, he once more publicly put negativity and false accusations out. For him, everybody who uses modern Atari hardware extensions or creates software to support them is not a real Atari fan. Well, I'm of a different opinion. So, I chose the same solution that Albert from AtariAge chose. I was unsure about how the people at the party would react to my statement. After all, they laughed and clapped, confirming my choice.

Original Version Redux Version
 
 

 

The Intro

The intro is the part that was done last. I had some 16k banks free and wanted to transport the information that this is a demake/parody of the Atari STE original. I could not expect people to know the original, so I needed something to catch their eye and make that obvious. So, I created a fake TOS running on the Atari 8-bit with automatic mouse movement and window animation. This also solved the problem of indicating the COVOX/POKEY version and selecting the base address of the respective sound chip. You can use the "START", "SELECT", and "Shift" keys on the EmuTOS screen for this.

Original Version Redux Version

 

The Versions

The binary download contains the following versions. They all require an Atari 8-bit machine with a PAL video system and at least 64k of RAM.

  • PixelDreamsRedux-MegaCart-2-MB-COVOX.car - the COVOX version of the "2 MB MegaCart"
  • PixelDreamsRedux-MegaCart-2-MB-POKEY.car - the POKEY version of the "2 MB MegaCart"
  • PixelDreamsRedux-TheCart.car - all of the above versions in one "The!Cart" cartridge image
The Feedback

If you have questions or feedback, you can send them via