pouët.net

Bad Apple ZX81

Bad Apple ZX81 v1.1
-------------------

Intro
The famous Bad Apple video is played full screen at 15, 25 or 30fps.

Requirements
This player requires a ZX81 with UDG4ZXpand and a ZXpand+ or ZXpand.

Usage real HW
For the classic ZXpand: use zxp25.p to play the video in 50Hz PAL mode, giving 25fps. TV standard jumper is ignored.
For the classic ZXpand: use zxp15.p to play the video in 60Hz NTSC mode, giving 15fps. TV standard jumper is ignored.
For the ZXpand+: use zxpp2530 to play the video, which auto-adjusts to the ZX81 tv-standard, giving either 25fps or 30fps.

Usage EightyOne emulator v1.8 or later
Use zxpp2530.p to play the video. Both zxp15.p and zxp25.p plays too slow.
Use correct settings:
- RAM pack = 32k
- chr$ generator = CHR$16
- high resolution = none
- ZXpand = yes

Background
It all started when I got the UDG-board and began wondering how I could use it to play video. I thought it would be a quick and simple hack to create an encoder, but I soon realized that I actually had to learn some new tricks and spend quite some time. Not really cozy-coding, but very rewarding :)

Technical
The encoder takes a 256x192 video and groups every 4 frames. Each group is analyzed to get all 8x8 patterns used, and reduce that to a maximum of 128 UDG characters.
The video stream has 768 bytes of frame data and 256 bytes of character set data per frame, so 4 frames gives a new UDG character set.
1kB data per frame is only 1/6th of the original video bandwidth, (just) possible to stream from the ZXpand.

The player for ZXpand+ looks at the PAL/NTSC jumper setting at startup and changes some values regarding the picture generation, and chooses one of the two video files to play. PAL playback at 25fps and NTSC playback at 30fps, just the way we like it.

The players for the classic ZXpand ignores the PAL/NTSC jumper setting and just plays at the programmed framerate. NTSC had to be lowered to 15fps because the overhead of reading from the classic ZXpand is so much greater than on the ZXpand+.

It would be possible to add audio, but this was an exercise in video encoding for me. I've already done a different video/audio version of Bad Apple for the ZX81.

2018-03-21
NollKollTroll