Jump to content
IGNORED

Bad Apple: Full Motion Video on the 2600


fb39ca4

Recommended Posts

The Bad Apple video has been made to display on many retro systems, such as the Sega Megadrive, Gameboy Color, NES, Pokemon Mini, and IBM PC. I've also written a version for the TI-84+ SE calculator. I decided to try my hand at making one for the Atari 2600.

 

Features/specs:

  • 3:40 of monochrome video
  • 40x32 resolution at 20FPS
  • 512KiB 3F ROM
  • NTSC
  • Lossless compression - video data fits in under 390KiB as opposed to 685KiB uncompressed.
  • Kernel capable of displaying at 60FPS

post-39589-0-35675800-1403762059_thumb.png

 

Unfortunately, there is no sound. The melody to the song has a very wide range, though, so I don't think it would sound good on the 2600's sound hardware anyways. The ROM is attached if you want to try it out. I've only tested it on emulators, so try it on real hardware at your own risk.

badapple6-25-14.bin

Edited by fb39ca4
  • Like 12
Link to comment
Share on other sites

You could use a tracker like the NES version for playing a simple rendition of the music, only 4 bytes more (tone and volume for each channel) at 60hz.

The other issue apart from tuning is that the beats of the music do not line up with 60Hz. From the TI-84 version, I discovered 32nd notes play at 18Hz. Back then, I had interrupts, so it wasn't a problem. Here though, there still just might be a way, but then I still have to deal with the poor tuning.

 

Off-topic, I realize, but thanks for turning me on to Mediacrush. Youtube has been getting very, very irritating over the last year or two and it's nice to see an open-source competitor that's not designed to promote a failed social network.

Mediacrush is a nice service, but it serves a different purpose from YouTube. YouTube, apart from providing hosting, also lets people discover new videos with searching and reccomendations. Mediacrush is more like an image host, but for pictures, audio, and video. You have to link to the content on another site for it to be visible. I use Mediacrush for quickly sharing things with people, while I use YouTube for a final video. Edited by fb39ca4
  • Like 1
Link to comment
Share on other sites

I've got a 30FPS version somewhat working now. It is supposed to use a 512K ROM/256K RAM 3E cartridge. It decompresses data into the RAM beforehand, allowing for more efficient compression that would not work on-the-fly. Problem is, Stella seems to be only supporting 32K of cartridge RAM. If you try and run the ROM, it looks like mostly garbage, because data going into the RAM gets overwritten by data that was supposed to go into a later bank. I've got the original version, if anyone does know of an emulator that supports 256K RAM, and I have a shortened version that only needs to decompress to 32K so you can see it work. Make sure to set it manually to a 3E cartridge - Stella does not seem to autodetect it.

badapple6-30-14.bin

badapple6-30-14short.bin

Link to comment
Share on other sites

Did you mean to say 15FPS? That would be ideal when the source material is 30FPS. That would be doable. I'm currently doing 6 scanlines per row of pixels, with each scanline loading part of the data for the next row of pixels, but I have just enough time to do it in three scanlines if I wanted to. I prefer higher framerates, however.

Link to comment
Share on other sites

No, the original video is 30FPS. And I actually just realized adding more vertical resolution might be an issue because I am currently using 3 bytes of RAM per row of vertical resolution that stores the bank and address of where the data for each row is located. 32 rows x 3 = 96 bytes, which gives me just enough space for everything else. In the ROM, it is packed into 2 bytes per row and everything for the frame about to be rendered is unpacked in the VBLANK. I could read the two bytes from ROM and then unpack it on the fly, but I don't think I have time for that in a three scanline kernel.

 

Meanwhile, I'm making progress on a 40x32@30FPS version that should run with only 32K cartridge RAM. It'll all be dependent on how good the compression turns out.

  • Like 1
Link to comment
Share on other sites

I finished the 30FPS version this weekend. It also only 414K of ROM, meaning there is going to be plenty of space left over for the music I'm working on. This version decompresses data in the background to the 32K cartridge RAM, so make sure you run it as a 3E ROM. The screen changes between red and green to illustrate when the decompressor is running and not running, respectively, but I'll of course remove that in the final release. Right now, however, the ROM only works in Stella, and not Z26, which has me worried. Can someone with a real 2600 and flashcart try this and report back if it works? I have neither, so the testing would be much appreciated.

 

On another note (pardon the pun), does Stella only check the state of the TIA sound registers once per frame? Because I am trying to update the registers at 36Hz, and the timing of the notes sounds very off. At 30Hz, everything sounds fine, but then the music plays too slow for the video.

badapple-7-7-14.bin

Edited by fb39ca4
  • Like 3
Link to comment
Share on other sites

No, Stella change sound as will just like graphics. You can see some techniques in games like Stella's Stoking menu, where one sound channel register is changed every scanline, to create, by software, multi channel music (with quality) like in pitfall 2 (this last uses a special chip for this).

 

 

Naturally, this takes a lot of processor time. Give a search here and you will find many information about it.

  • Like 2
Link to comment
Share on other sites

  • 4 months later...

Does the Encore support 512Kbytes of ROM and however much RAM this video demo eats? :P

 

Also, everything but the file in the original post are completely scrambled in Stella 4.x :P

it has a total 32k flash and 520k RAM so yes, in theory this scheme could be supported. Just barely ;)
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Awesome, I'd never even heard of the original video before. Have now watched it an unhealthy number of times.

 

If this frame engine really is capable of running at 60 FPS, I wonder how it would look to use temporal dithering (30Hz flicker) to simulate an intermediate grey color. Granted, doubling the frame rate would blow up the ROM size even more.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...