Jump to content

another video demo


Recommended Posts

Now that the emulator loads files at the same speed as the actual hardware, I decided to revisit video.  This one is from the opening scene to The Spy Who Loved Me, including one of the greatest stunts ever recorded on film.

The video was extracted to bmp images, and those were compressed to 160x32 pixels, and then the closest color in a custom palette was found for each pixel. The color palette was not chosen for this video. It's a palette I'm using on another project, and most of the colors are based on the Wolfenstein 3D wall images.

These images are stretched to the desired 2.35:1 widescreen aspect ratio by setting the HSCALE to $20 and the VSCALE to $0F. The sound file was recorded in Audacity as 16 bit mono at 12970 Hz, and then cut up into files consisting of a 2 byte header and 2594 bytes of PCM audio data each. There are 10 audio files played per second. The video is shown at 15 frames per second at 5 kb each, so that's about 100 kb per second being loaded from the SD card and pushed to VERA. This should work on the actual hardware.

By the end of the video the audio and video are slightly out of sync, with the video lagging slightly. I could probably make the video and audio line up exactly if I dropped the video frame rate down to 12 frames per second, but that's getting into slideshow territory. I got the PCM audio figured out so that there's no bursts of static anymore; unfortunately the audio is so good that YouTube flagged it for copyright violation, even though the copyright owners do allow the use of it on YouTube.

I'm attaching a zip file containing BOND.PRG and the BOND folder, as well as the metadata files in the META folder.  If you unzip this into the same folder as the emulator, it should work for you if you type

LOAD"BOND.PRG",8,1

RUN

If you also have the META/L editor, changing the BASIC bootstrap to 1 SYS$0400 will load up the editor and metadata so you can look at the code.

BOND.zip

Edited by Ed Minchau
  • Like 8
Link to comment
Share on other sites

Are you loading the video with VLOAD or by loading into HiRam and then copying into VERA?

If you're loading directly to VERA, you can get a lot more speed by buffering it through HiRam first because under the hood, VLOAD uses the slow byte-by-byte load method and LOAD to HiRam uses block transfer mode.

Also - if you want to just stream from a single large file, you can do that as well - just don't use LOAD but instead make direct calls to MACPTR. See my thread here:

 

Edited by ZeroByte
  • Like 2
Link to comment
Share on other sites

Posted (edited)

The 5kb image data files are loaded at $6C00, and the audio (2594 bytes) is loaded at $35DE. The last byte of the image is thus $7FFF and the last byte of audio is at $3FFF, so I'm just looking at bit 6 or 7 of the high byte for the end of data. I just used the regular LOAD; haven't touched sequential files yet.

Edited by Ed Minchau
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.

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.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use