Comment by jordigh
18 days ago
The tech demo that really made me fall in love with Bad Apple was getting it to run on the NES.
https://somethingnerdy.com/downloads/
Here it is running from my Everdrive.
https://inversethought.com/jordi/video/badapple.mp4
Yes, with full audio. It's about one gigabyte of data. On a system where the typical game size is no more than a couple hundred kilobytes, and your CPU only has three 8-bit registers for you to do any calculation with.
Very cool. Having done a bit of NES dev I can imagine this wasn't super straightforward to make performant for the graphics, given you can typically only have a few sprites on a row before the NES starts to 'dissolve' them (not sure the term).
I wonder if it's using the background tile map for this instead of sprites, though that's also an impressive amount of graphics bandwidth.
> with full audio playback rate (44.2kHz)
The audio being so clear is also impressive, is that something that the card extends? IIRC the PCM channel on the NES isn't anywhere near that bitrate, and is also 8-bit sample size.
The channel can either play back delta-modulation samples from memory, or you can directly set the output as a 7 bit value.
So by burning a lot of CPU cycles, you can keep up a perfectly good sample rate using the latter method.
The bitrate of the PCM is determined based on how quickly you can write a byte to the register. The fastest you could write general data is once every 6 cycles, which gives ~298 MHz of sample rate, so 44.2 kHz is easily doable if that's all you want to do with the CPU.
Do you mean 298 KHz? I thought the 6502 on the NES was slightly over 1MHz
> I wonder if it's using the background tile map for this instead of sprites
Yes, it's all background tiles being loaded continuously from the SD card. We created the tiles with a custom tile de-maker.
Very cool, thanks for the info :)
Depending on what aspects of that you enjoyed, you might also enjoy this similar Bad Apple implementation on the NES. With the extra challenge of it being done through ACE in Super Mario Bros. and all data being streamed in through the controller. https://www.youtube.com/watch?v=lfG8DbxFibY
They also made an accompanying breakdown video. https://www.youtube.com/watch?v=Wa0u1CjGtEQ
This is really neat - did you do any kind of writeup on it? I’d love to read it if you did.
It's not my work. I'm just a script kitty.
There are some details in the description and comments here.
https://www.youtube.com/watch?v=WPUYjDNks9Y
That is glorious!