CPCWiki forum

General Category => Off topic => Topic started by: Devilmarkus on 20:39, 13 December 10

Title: Fun movie
Post by: Devilmarkus on 20:39, 13 December 10
Hello,
today I rendered a small CPC movie (playable with WebCPC and JavaCPC).
This movie has 1494 single frames and plays with ca. 30fps.

But the best effect is: It's in MODE 1! (4 colours fixed palette)
But because I overdithered it, it looks like it has many more colours.
Colours used: 0,24,8 and 20! (Same colours like a inkjet printer uses)

Result: http://cpc-live.com/emulator.php?disc=simp2.anz&system=CPC6128&crtc=1&filter=true (http://cpc-live.com/emulator.php?disc=simp2.anz&system=CPC6128&crtc=1&filter=true)

(WebCPC applet! Java is needed.)

Because the movie is ~17mb in size (compressed) please wait some time! (can take many seconds to load the file)
Title: Re: Fun movie
Post by: Devilmarkus on 22:29, 13 December 10
For all of you who cannot run WebCPC here's the same movie as GIF animation:
Spoiler: ShowHide
http://cpc-live.com/cpc_capture.gif


!! 16mb GIF!!
Title: Re: Fun movie
Post by: redbox on 09:09, 14 December 10
The dithering looks really good, amazing how many more colours it 'appears' to produce.
Title: Re: Fun movie
Post by: TrickyNZ on 09:58, 14 December 10
That's really good, well done.
Title: Re: Fun movie
Post by: Devilmarkus on 11:03, 14 December 10
I rendered the scene with JavaCPC's MovieMaker.
JavaCPC can playback those animations.
The format is quite simple:
First byte is screenmode
next 16 bytes are for the palette
and all following 16384 bytes is a frame.

Sad I don't have a playback method in CPC assembly or so, so these animations can only be watched in JavaCPC.
If I also had a "real playback program" I could make a smaller, 576k animation...

Here's how it looks in my Paint app:
Title: Re: Fun movie
Post by: redbox on 11:16, 14 December 10
Quote from: Devilmarkus on 11:03, 14 December 10
Sad I don't have a playback method in CPC assembly or so, so these animations can only be watched in JavaCPC.
If I also had a "real playback program" I could make a smaller, 576k animation...

At 25fps you'd have to shift 8kb per normal 50hz frame.

Difficult for the poor old Z80  :(
Title: Re: Fun movie
Post by: Devilmarkus on 11:30, 14 December 10
I can also do 15fps or less...
Thats no problem.
Title: Re: Fun movie
Post by: redbox on 16:18, 14 December 10
Quote from: Devilmarkus on 11:30, 14 December 10
I can also do 15fps or less...
Thats no problem.

Well the only code you would need would be:

Some sort of copy (LDIR?!)
A paging routine to page in and out the extra RAM (outside of 64kb) full of data
And something to swap between the display screen and the screen being drawn (would need to be double-buffered)

And of course, a 3" disc that holds more than 500kb  ;)
Title: Re: Fun movie
Post by: Devilmarkus on 16:39, 14 December 10
So, comeon!
Please code me a routine which displays many screens as fast as possible!
Then I can try on a RomDOS dsk (800k)... ;)

Title: Re: Fun movie
Post by: Bryce on 16:47, 14 December 10
Or limit it to 512K and you could read it directly from a "video-cartridge" :)

Bryce.
Title: Re: Fun movie
Post by: redbox on 17:02, 14 December 10
576kb - 64kb (working space) = 512kb.

512kb / 16kb (size of a frame) = 32 frames.

So even at 15fps that's still only 2 seconds of video...

Is it worth writing a routine for?

It might be possible to code some compression in, but even with compression of 50% it's still only 4 seconds of video.
Title: Re: Fun movie
Post by: Devilmarkus on 17:21, 14 December 10
Well would be cool if you try it, redbox!
I then will test something...

BTW.: A test with blur filter (Like how the output would look like on a CRT-TV):
http://cpc-live.com/newcapture.gif

(27 mb!!!)
Title: Re: Fun movie
Post by: Devilmarkus on 18:40, 14 December 10
BTW.: Logically this method also works for still images!
unfiltered:
(http://cpc-live.com/mode1_overscan.png)

Blur-filter:
(http://cpc-live.com/mode1_overscan1.png)
Title: Re: Fun movie
Post by: redbox on 18:45, 14 December 10
Quote from: Devilmarkus on 17:21, 14 December 10
Well would be cool if you try it, redbox!
I then will test something...

Okay, I will give it a go when I've finished my current project.

Can use some techniques already covered (pushing data via stack etc) and we could lower the screen size a bit to get some more time out of the video.
Title: Re: Fun movie
Post by: Devilmarkus on 18:53, 14 December 10
Hmmm bad thing is: I just can render to default 16k screens...
So I dont think we could make the images smaller

Another idea is: (I need to prepare my renderer for that)
A splitted image into 4 segments!
[   ][   ]
[   ][   ]
So we could have 4 images per frame but half sized...
Any idea how to playback this?
(play image A from bank c0, then image B from bank c0, then C... then D...
then play image A from bank c4.... etc...)

Title: Re: Fun movie
Post by: Devilmarkus on 19:32, 14 December 10
Here's a little overscan test for you.
Best: Transfer and run it on a real CPC!
Title: Re: Fun movie
Post by: redbox on 20:29, 14 December 10
Quote from: Devilmarkus on 18:53, 14 December 10
Hmmm bad thing is: I just can render to default 16k screens...
So I dont think we could make the images smaller
Another idea is: (I need to prepare my renderer for that)
A splitted image into 4 segments!

You can provide the images in any format you like as they can be converted easily using a little assembler utility.

The overscan pictures look good ( ;) ), what code did you include to setup the overscan screen?
Title: Re: Fun movie
Post by: Devilmarkus on 20:51, 14 December 10
The code is already IN the picture.
JavaCPC Paint generates the SCR files with code.
Load to &200
and CALL &811
(Similar to ConvImgCPC but JavaCPC's code does not wait for a key and does not reset the CRTC registers.
For that you need another CALL (also in code but I actually forgot the address))

Also my code works for CRTC type 2, too...
Title: Re: Fun movie
Post by: redbox on 22:22, 14 December 10
That's really cool, another big tick in the box for your utilities  :)
Title: Re: Fun movie
Post by: Devilmarkus on 23:12, 14 December 10
Well the Overscan code is very simple:
        ;;        Overscan routine
        ;;        adapted from Demoniak's 'ConvImgCPC'
        ;;        modified for usage in JavaCPC
        ;;        CALL &811 - Shows OVS
        ;;        CALL &831 - Returns to normal CRTC offset

        JavaCPC        EQU 1
        WriteIt        EQU 1

        ORG        #811

        IF JavaCPC
            NOHEADER
        ENDIF

        IF WriteIt
            write "overscan.bin"
        ENDIF

        Mode        EQU &800
        Colours    EQU &801

        LD        HL,Overscan
        CALL        SetCrtc
        LD        A,(Mode)
        CALL        #BD1C
        LD        HL,Colours
        XOR        A
SetCol:
        LD        C,(HL)
        LD        B,C
        PUSH        AF
        PUSH        HL
        CALL        #BC32
        POP        HL
        POP        AF
        INC        HL
        INC        A
        CP        16
        JR        NZ,SetCol
        RET
NormalScreen:
        LD        HL,NoOverscan
SetCrtc:
        LD        BC,#BC
Bcl:
        LD        A,(HL)
        AND        A
        RET        Z
        OUT        (C),A
        INC        B
        INC        HL
        LD        A,(HL)
        OUT        (C),A
        INC        HL
        DEC        B
        JR        Bcl

Overscan:
        DB        1,48,2,50,3,137,6,34,7,35,12,13,13,0,0,0
NoOverscan:
        DB        1,40,2,46,3,142,6,25,7,30,12,48,0,0

Title: Re: Fun movie
Post by: redbox on 23:18, 14 December 10
Ah yes, I know overscan is easy, I was saying that it's nice you've built it into your PC utility  ;)
Title: Re: Fun movie
Post by: AMSDOS on 01:28, 20 December 10
Screenshot, animated GIF, etc?

BTW I love you Spoiler Signature!  ;D
Title: Re: Fun movie
Post by: MacDeath on 02:04, 20 December 10
(http://cpc-live.com/mode1_overscan1.png)
Hey, now THAT... is a clever use of the Mode1... ::)


A streaming of those on an Internet CPC would be great...
But... a real CPC could get some problem to display this at 25Hz, or not ?
Also addition a streaming DMA sound on a PLUS and you get it...

I suppose this games plays like a Decathlon : with a Joystick to wank... :o

More seriously what is the resolution ? perhaps getting such stuff with a smaller screen would ease the poor CPC/PLUS...

so, a Mode1 ?

=320x180 : 16/9 as a TV.
=256x144 : still a 16/9 display...yet quite more combortable I suppose...
=160x90...: still 16/9... almost a Quarter of a screen, would be neat to get a You-CPC-Tube online... just wait I get my card and get it to work...


And a CPC-HDD too...
:'(


On the other hand a 4/3 (old TV) display would be like...

=320x240... ouch. prepare your anus for a slowpoke framerate...
=160x130 : better.
=200x150 : perhaps.
=256x192 : hey Speccy, get out of her !
Title: Re: Fun movie
Post by: TFM on 21:29, 20 December 10
Quote from: MacDeath on 02:04, 20 December 10
=256x192 : hey Speccy, get out of her !

Yeah, this guy always sticks in her...
Title: Re: Fun movie
Post by: MacDeath on 07:03, 21 December 10
My bad, I meant "Here"... :laugh:
Title: Re: Fun movie
Post by: TFM on 16:56, 21 December 10
Hehe, English is a dangerous language ;-) (Well, what can you expect with that few words ;-)
Powered by SMFPacks Menu Editor Mod