Skip to content

bellinitte/bad-apple-uxn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bad-apple-uxn

Bad Apple!! for the Uxn stack-machine by Hundred Rabbits.

Youtube video thumbnail

Quick start

cargo run --release -- --input assets/badapple.mp4 --output badapple.tal
uxnasm badapple.tal badapple.rom

or download the badapple.rom file from the releases page.

uxnemu badapple.rom

Specifications

  • Display resolution of 42x32 pixels,
  • 810 frames of video (3.75 frames per second),
  • 1-bit images,
  • Compressed with run-length encoding, 1 byte per run, alternating runs with no markers,
  • 63375 bytes,
  • No audio

Building

This repository contains the project needed to build the .tal file from scratch. If you are interested only in downloading and running the file, check out the Running section.

Make sure you have the most recent release of Rust, as well as FFmpeg libraries installed on your system (check out this guide for more information on how to get them). Run the cargo run command with the --release profile, as well as the path to the input MP4 file and paths to the output files, like so:

cargo run --release -- --input assets/badapple.mp4 --output badapple.tal

This should compile the project and run the whole build process.

You have to assemble the ROM from the .tal file yourself. To do that, run

uxnasm badapple.tal badapple.rom

to assemble the ROM with Uxnasm.

Running

Check out the releases page for prebuilt Uxn ROM files.

Before running, make sure you have the Uxn toolchain installed. To run the ROM, run

uxnemu badapple.rom

This should open a window. When you're ready, press any button on your keyboard to start the video.

Tweaking

You can tweak various constants in the ( Tweakables ) section of the final .tal file before the assembly.

  • DEFAULT-SCALE — defines the default width and height of the "video pixel" on screens with unconstrained size.
  • FRAME-TIME — number of Varvara screen frames per each video frame. #0001 means a 60 FPS video (video frame every screen frame), #0010 means a 60 / 16 = 3.75 FPS video (video frame every 16 screen frames).

License

This software is licensed under the MIT license.

See the LICENSE file for more details.