PCEngineFans.com - The PC Engine and TurboGrafx-16 Community Forum

Tech and Homebrew => Turbo/PCE Game/Tool Development => Topic started by: touko on October 16, 2009, 03:41:08 AM

Title: Fire effect on PCE
Post by: touko on October 16, 2009, 03:41:08 AM
Hi all i have made a fire effect  ..

http://www.partage-facile.com/4GZK92OKUH/essai_asm.pce
Title: Re: Fire effect on PCE
Post by: SignOfZeta on October 16, 2009, 03:59:22 AM
Wow. That is the single worst barrage of advertising I've seen in the history of the internet. I can't imagine what it would be like for those poor shmucks running 5 year old copies of IE with no pop-up blocker.

Anyway, hosting aside...

I'm running TGEmu right now, not the best emulator ever made, and I see a static image of fire. Is it supposed to move? Not that I'm complaining. I can't even code "Hello World" on a PCE.
Title: Re: Fire effect on PCE
Post by: touko on October 16, 2009, 04:05:22 AM
Wow. That is the single worst barrage of advertising I've seen in the history of the internet. I can't imagine what it would be like for those poor shmucks running 5 year old copies of IE with no pop-up blocker.

Anyway, hosting aside...

I'm running TGEmu right now, not the best emulator ever made, and I see a static image of fire. Is it supposed to move? Not that I'm complaining. I can't even code "Hello World" on a PCE.

 :mrgreen: Lool ..

For emulator, i don't know tgemu, but try with mednafen  :wink:
Title: Re: Fire effect on PCE
Post by: sunteam_paul on October 16, 2009, 05:35:27 AM
It works in Magic Engine, looks pretty cool as well. You could probably use a similar routine to simulate water I imagine.

(And for the love of god, please upload to somewhere like rapidshare next time!)
Title: Re: Fire effect on PCE
Post by: touko on October 16, 2009, 05:37:20 AM
ok i'll try rapid share next time  :wink:

It works in Magic Engine, looks pretty cool as well. You could probably use a similar routine to simulate water I imagine.

Yes i have used a tom's hsync routine used for a sgx demo (in colaboration with xavier).

The demo have a wavy hsync deformation of background.
I have used that with my fire background, without wave data, the deformation is randomised,and very fast.  8)
This give you an illusion of fire  :mrgreen:

Thanks tom for your hsync routine  :clap:
Title: Re: Fire effect on PCE
Post by: Arkhan on October 16, 2009, 07:40:34 AM
what hsync routine is that?
Title: Re: Fire effect on PCE
Post by: touko on October 16, 2009, 07:50:51 AM
what hsync routine is that?


I have found it on the frozen utopia forum ..

link is : http://forum.frozenutopia.com/index.php?topic=214.0
Title: Re: Fire effect on PCE
Post by: SignOfZeta on October 16, 2009, 03:26:13 PM
OK, I tried it in Magic Engine. Looks great!
Title: Re: Fire effect on PCE
Post by: Necromancer on October 16, 2009, 06:10:41 PM
Looks pretty nice.  It'd look great in the background of the first level of Dracula X.
Title: Re: Fire effect on PCE
Post by: Tom on October 16, 2009, 06:22:32 PM
what hsync routine is that?


I have found it on the frozen utopia forum ..

link is : http://forum.frozenutopia.com/index.php?topic=214.0


 Wow, that's old. This one's faster, slimmer, but no SGX support. http://75.126.152.9/~pcengine//huc_stuff/hsync.zip


 Dude, that fire demo is awesome! Hahaha :D Nice

Title: Re: Fire effect on PCE
Post by: blueraven on October 16, 2009, 09:20:51 PM
Ads were thrown at my browser, causing a massive Abort Mission.  8-[
Title: Re: Fire effect on PCE
Post by: touko on October 16, 2009, 10:21:12 PM
Tom i post here the version what i have used ..

http://rapidshare.com/files/294119725/sgx_wave.zip.html

Thanks tom for latest version  :mrgreen: ..

Eh tom the huc function to set bgnd color to 0 is ..

set_color(0,0); 

nothing is more easy  :mrgreen:
Title: Re: Fire effect on PCE
Post by: touko on October 19, 2009, 01:33:39 AM
Tom ,if i use your hsync routine ,in first time for make a background x_scroll, the scrolling is flicking !!  :shock:

But a background y_scroll is normal ..


Bug removed, it turn more faster in C LOOL , :-"

this
Code: [Select]
    temp=map_x+scroll_x1;

#asm
lda _temp+1 ;// This is over a hunderd times faster
ldy _temp
lsr a
say
ror a
cly
sta _hs_x_l,y
sta _hs_x_h,y
#endasm

replaced by
Code: [Select]
temp=map_x+scroll_x1;
    hs_x_l[0]=temp>>1; /* A little fixed/float point variable */
    hs_x_h[0]=temp>>9;
    temp=map_y+scroll_y1;
    hs_y_l[0]=temp>>1;
    hs_y_h[0]=temp>>9;

finaly i have replaced by
Code: [Select]
#asm
    cly
    lda _temp
    sta _hs_x_l,y
    lda _temp+1
    sta _hs_x_h,y   
#endasm
it seems that your code is a 2 divider .
For exemple, if i have 10 in temp,both hs_x_h and hs_x_l have 5 ..
probably not the best way, but it works.
Title: Re: Fire effect on PCE
Post by: Tom on October 19, 2009, 11:34:47 AM
Heh, I must have messed with the source example a few times. That one part is a 15bit:1bit fixed point number. That's why there's a 16bit shift there (A:Y).
Title: Re: Fire effect on PCE
Post by: touko on October 19, 2009, 08:14:34 PM
Heh, I must have messed with the source example a few times. That one part is a 15bit:1bit fixed point number. That's why there's a 16bit shift there (A:Y).

Strange, because it works fine with your exemple, but very bad with a classic bgnd ..

And re strange, y_scroll works good with same code ..

BTW, is it possible to use your hsync routine like huc scroll function ???
I have tried to make it, but all my bcgnd is duplicated in x_scroll, not a part of it.