Ed Minchau Posted August 3 Share Posted August 3 (edited) 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 August 3 by Ed Minchau 8 Quote Link to comment Share on other sites More sharing options...
ZeroByte Posted August 4 Share Posted August 4 (edited) 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 August 4 by ZeroByte 2 Quote Link to comment Share on other sites More sharing options...
Ed Minchau Posted August 4 Author Share Posted August 4 (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 August 4 by Ed Minchau Quote Link to comment Share on other sites More sharing options...
ZeroByte Posted August 4 Share Posted August 4 You should be able to squeeze a little more speed out of it doing that, probably about 2% - 5% faster I'd imagine. The overhead of opening a file is not trivial. Quote Link to comment Share on other sites More sharing options...
Ed Minchau Posted August 4 Author Share Posted August 4 If I do another one of these it'll be with a couple sequential files. That 2%-5% would probably be enough to keep the video synched at 15 fps. I'm just happy to see this working on an 8-bit machine at all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.