News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

Fun movie

Started by Devilmarkus, 20:39, 13 December 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

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

(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)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

#1
For all of you who cannot run WebCPC here's the same movie as GIF animation:


!! 16mb GIF!!
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

The dithering looks really good, amazing how many more colours it 'appears' to produce.

TrickyNZ

That's really good, well done.

Devilmarkus

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:
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

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  :(

Devilmarkus

I can also do 15fps or less...
Thats no problem.
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

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  ;)

Devilmarkus

So, comeon!
Please code me a routine which displays many screens as fast as possible!
Then I can try on a RomDOS dsk (800k)... ;)

When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Bryce

Or limit it to 512K and you could read it directly from a "video-cartridge" :)

Bryce.

redbox

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.

Devilmarkus

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!!!)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

BTW.: Logically this method also works for still images!
unfiltered:


Blur-filter:
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

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.

Devilmarkus

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...)

When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

Here's a little overscan test for you.
Best: Transfer and run it on a real CPC!
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

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?

Devilmarkus

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...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

That's really cool, another big tick in the box for your utilities  :)

Devilmarkus

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

When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

redbox

Ah yes, I know overscan is easy, I was saying that it's nice you've built it into your PC utility  ;)

AMSDOS

Screenshot, animated GIF, etc?

BTW I love you Spoiler Signature!  ;D
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

MacDeath

#22

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 !

TFM

Quote from: MacDeath on 02:04, 20 December 10
=256x192 : hey Speccy, get out of her !

Yeah, this guy always sticks in her...
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

My bad, I meant "Here"... :laugh:

Powered by SMFPacks Menu Editor Mod