Work in Progress

Monochrome video player

4

SP4CEBAR 2023-08-26 10:41 (Edited)

It lacks a video file, but it could play bad apple (in theory).

It plays monochrome videos by copying frames from ROM to the character registers using the copy command. Each frame has a size of 20x128 = 2560 bytes, which means about 13 frames will fit inside our 32768 bytes of ROM.
The program itself is quite small though.

All even rows have a palette of 0, and all uneven a palette of 1 so two cells can share a character.

Extracting data from a video file is hard, I think the best way to do it is to figure out how to use FFMPEG. Another way to do it is to convert a video file to bitmap images and make a bitmap reader that can convert it to this file type.


SP4CEBAR 2023-08-26 10:47

Here's a version that's adapted to be loaded from a string. The copy command can't be used for this, so it'll be slower (it's at 100% CPU while the other version isn't)


McPepic 2023-08-26 15:28

So I was messing around a bit and I think that instead of setting the palettes to:
bbbw, bwbb
they should be set to
bwbw, bbww


SP4CEBAR 2023-08-26 16:15

oh, you're right, it's a binary pattern


McPepic 2023-08-26 16:28

There was one more thing that I thought of. Shouldn't the characters start at index one? Otherwise, character 0 will get drawn under every cell.


SP4CEBAR 2023-08-26 16:50

I can't seem to find where it starts at index 1, did you mean the MID$ functions in the second program where index 1 is the first index of the data string?


McPepic 2023-08-26 18:10

A_CHARACTERS = $8010


SP4CEBAR 2023-08-28 10:44

Oh, I misread your comment, yeah, that would indeed be smart, alternatively I could set:
BG VIEW OFF 1


Log in to reply.