Page 2 of 2

Posted: Wed Nov 14, 2012 4:20 pm
by Stef
+1

Posted: Tue Dec 11, 2012 12:36 am
by bioloid
A new one, as promished. Done fastly for the december 21. weird as well.
http://www.pouet.net/prod.php?which=60832
See you!

Posted: Tue Dec 11, 2012 6:20 am
by TmEE co.(TM)
This one had some pretty cool parts in it !

Posted: Tue Dec 11, 2012 9:16 am
by Stef
Look trashy but nicely done :)
Also you used hardware this time to produce some neats effects !

Posted: Wed Dec 12, 2012 11:09 pm
by sigflup
Yeah, I really like the feel of this one. Nice work

Posted: Sun Dec 16, 2012 1:52 pm
by bioloid
Used a custom SGDK version, but here is the cylindrical effect : http://pastebin.com/2CrA5EgK
Note that it heavily depends of used textures (horizontal tubes are cool).

And here is an old playable version : http://downloads.kstorm.org/tape21_wip.7z (may not work on real hardware, unsure).

Posted: Sun Dec 16, 2012 4:02 pm
by Stef
Nice creation again, i really surprised it can handle the hint code fast enough (it seems you use 2 scanlines hint granularity).
I also really like the "end of world" weird style music ;)

Posted: Sun Dec 16, 2012 10:02 pm
by bioloid
Thanks Stef! Was surprised as well, it's basically coming from playing with the axelay effect, and being kind of lucky, but the one I prefer is the "circular effect", I even don't get how it works ;)

edit: and to precise, following months/years I won't be able to make other demos, cause of professional/personal life changes, but if someone needs raw musics or bitmaps, I'll be pleased to help.

Posted: Mon Dec 17, 2012 12:04 pm
by Stef
Yeah the circular effect looks pretty nice too, it seems you use the cell vertical scroll for this one.

Too bad that you won't have anymore time to make others demos for genesis, your originals creations are very appreciated :o

Posted: Mon Jul 22, 2013 10:52 am
by Christuserloeser
Someone got a copy of the Pastebin upload (cylindrical effect) ?

Posted: Mon Jul 22, 2013 2:27 pm
by Stef
If you mean the source code, here is it:

Code: Select all

#include "effect_cylinder.h"

void EFFECT_cylinder(int sens, int speed, int length)
{
    u16 j = 0;
    u16* scrollTable;
    u16 curY;
    int curX;
    u16 ttt=0;
    int vscroll;
    u16 scr = 0;

    void initTable()
    {
        scrollTable = (u16*)MEM_alloc(21*42*sizeof(u16));
        vscroll=0x840; 
        int k, h;
        int center = 12;
        for (k=0 ; k<42 ; ++k)
        {
            int count = (k*k)*0.02f;
            for (h=0 ; h<21 ; ++h)
            {
                int xv;
                if (k<center) xv = (h-10)*(h-10)*((center-k)*(center-k))*0.004;
                else xv = -(h-10)*(h-10)*((k-center)*(k-center))*0.004;
                scrollTable[k*21+h] = 0x840-count+xv;
            }
        }
    }

    int posY = 0;
    u16* scrollData = NULL;

    void vblank()
    {
        ++ttt;
        curY = 0;
        posY += sens*speed;
        
        scrollData = scrollTable;
    } 

    void hblank()
    {
        vu16 *pw = (u16 *) GFX_DATA_PORT;
        vu32 *pl = (u32 *) GFX_CTRL_PORT;
        int val = -posY-ttt/4;
        
        int x;
        for (x=0 ; x<21 ; ++x)
        {
            u16 addr = (x&0x1F)*4;
            *pl = GFX_WRITE_VSRAM_ADDR(addr);
            *pw = val+scrollData[x];
            *pl = GFX_WRITE_VSRAM_ADDR(addr+2);
            *pw = val/2+scrollData[x];
        }
        
        scrollData += 21;
        curY++;
    } 

    GSKE_setScrollMode(GSKE_HSCROLL_Plane, GSKE_VSCROLL_Column);
    
    initTable();
    
    u32 start = SND_getTime_PCM();
    
    int xs=0, ys=0;
    
    u16 w = cylinder[0];
    u16 h = cylinder[1];
    VDP_setPalette(PAL2, &cylinder[2]);
    VDP_loadBMPTileData((u32*) &cylinder[18], 1, w / 8, h / 8, w/8 );
    for (ys=0 ; ys<VDP_getPlanHeight()/(h/8); ++ys)
    for (xs=0 ; xs<VDP_getPlanWidth()/(w/8); ++xs)
        VDP_fillTileMapRectInc(APLAN, TILE_ATTR_FULL(PAL2, 0, 0, 0, 1), xs*(w/8), ys*(h/8), w/8, h/8);
    
    w = cylinder_back[0];
    h = cylinder_back[1];
    VDP_setPalette(PAL1, &cylinder_back[2]);
    VDP_loadBMPTileData((u32*) &cylinder_back[18], 257, w / 8, h / 8, w/8 );
    for (ys=0 ; ys<VDP_getPlanHeight()/(h/8); ++ys)
    for (xs=0 ; xs<VDP_getPlanWidth()/(w/8); ++xs)
        VDP_fillTileMapRectInc(BPLAN, TILE_ATTR_FULL(PAL1, 0, 0, 0, 257), xs*(w/8), ys*(h/8), w/8, h/8);
        
    SYS_setVIntCallback(vblank);
    SYS_setHIntCallback(hblank);
    VDP_setHIntCounter(1);
    VDP_setHInterrupt(1); 
    
    curY = 0;
    
    u32 t=0;
    do
    {
        u32 ct = SND_getTime_PCM();
        if (ct>start) t = ct-start;
        
        VDP_setHorizontalScroll(APLAN, 0, sinFix16(t*speed/20)*2);
        VDP_setHorizontalScroll(BPLAN, 0, sinFix16(t*speed/20)*2);
    }
    while(t<length);
    
    SYS_setVIntCallback(0);
    SYS_setHIntCallback(0);
    MEM_free(scrollTable);
}

Re: Zombie

Posted: Sun Apr 30, 2017 5:44 pm
by alko
Stef wrote:If you mean the source code, here is it:
translate into the new version syntax please

Re: Zombie

Posted: Sat Jun 02, 2018 4:36 pm
by bioloid
I'm not glad to post ugly code like that, I'll clean it with the new version, add controller support and post it into the sgdk subforum.