It is currently Tue Jun 27, 2017 7:06 am

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Mar 13, 2017 11:11 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 725
Stef wrote:
Wow, that is really impressive :)

Thanks!

Quote:
Something i wonder, do you have any kind of double buffering with the SFX memory ?

Yes. The SNES can change the screen base register after the frame has been drawn, which allows the Super FX to start work on the next frame before the current one has been fully transferred. This can actually happen before the first available VBlank, as the Super FX's stop instruction issues an interrupt to the SNES by default (you can mask it if you want). The SNES can also temporarily suspend the Super FX's access to Game Pak RAM by changing a flag, which puts the Super FX in a wait state the next time it needs RAM access; this allows the SNES to proceed with the transfer during VBlank without having to forcibly kill the Super FX program.

I'm hoping to be able to keep lag to a minimum when doing 4bpp by drawing one half of the playfield first (possibly the bottom half, because it's likely to be faster) and copying it to VRAM before the other half is finished. Hopefully this won't result in glaring priority issues near the seam... actually, now that I think of it, I could use the anti-wrapping method in FXtest1 to prevent that...

psycopathicteen wrote:
I did a demo like this a while ago and I got 256 bullets at 30fps, though I had to make the bullets really small like 5x5.

For the convenience of the reader: viewtopic.php?f=12&t=13834&start=45#p164693

Impressive work. (Also gave me an idea for transferring 2bpp graphics into a sprite table - rendering into the source format is going to be interesting, but the transfer itself works beautifully...)


Top
 Profile  
 
PostPosted: Wed Mar 15, 2017 5:49 am 
Offline

Joined: Mon Jul 01, 2013 11:25 am
Posts: 227
Oh yeah i remember than 256 bullets stuff at 30 FPS on stock SNES, very impressive as well ;)
You are both obsessed by bullet hell shooter X'D

Quote:
Yes. The SNES can change the screen base register after the frame has been drawn, which allows the Super FX to start work on the next frame before the current one has been fully transferred. This can actually happen before the first available VBlank, as the Super FX's stop instruction issues an interrupt to the SNES by default (you can mask it if you want). The SNES can also temporarily suspend the Super FX's access to Game Pak RAM by changing a flag, which puts the Super FX in a wait state the next time it needs RAM access; this allows the SNES to proceed with the transfer during VBlank without having to forcibly kill the Super FX program


That is cool so the SFX can be used almost at 100% if you cleverly use the double buffering :)
I wanted to do that sort of software sprite rendering (mostly for bullet) on the Megadrive as the sprite multiplexing cannot work as i expected unfortunately. You cannot use 2bpp rendering on Megadrive (or to be more precise you can do it but it won't bring any speed improvement in that case) so i have to use classic 4bpp rendering. To be honest given the code done by psycopathicteen, i believe it will be quite difficult to match the same performance level on the MD using 4bpp rendering. That kind of code is perfectly adapted to 65816, it uses the fast disp+indexed addressing mode, fast immediate ops and also take advantage of the 16 bits memory operation allowed by the 65816.


Last edited by Stef on Fri Mar 17, 2017 2:31 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Mar 15, 2017 1:18 pm 
Offline

Joined: Sun Aug 11, 2013 6:07 am
Posts: 57
Very cool tech demo, great to see more people programming the superfx!

If you were to target PAL you could do 4bpp at 50fps.

One problem with double buffering is that no cart has more than 64K ram, so if someone were to do double buffering at 8bpp they'd either have to gut the resolution or put 128K on donor carts. I suppose you could do the latter regardless as some sort of weak, makeshift copy protection.


Top
 Profile  
 
PostPosted: Thu Mar 16, 2017 11:32 pm 
Offline

Joined: Fri Jul 04, 2014 9:31 pm
Posts: 725
ARM9 wrote:
Very cool tech demo, great to see more people programming the superfx!

Thanks! Hopefully this is just the beginning...

Quote:
If you were to target PAL you could do 4bpp at 50fps.

That's true. The demo resolution of 224x192 doesn't seem to quite fit, but a slightly smaller screen would. In fact, at 2bpp there seems to be enough room for the whole screen (256x224), as long as you don't use overscan...

In my case, though, this demo is just an algorithm test/training exercise. I'm attempting a faithful port of an existing game, and while most of it is indeed too colourful for 2bpp, large chunks of it are too busy for the Super FX to maintain 50 fps at 4bpp. I have serious doubts about holding 30. Unless I've grossly overestimated the rendering load, the extra DMA bandwidth would be an embarrassment of riches for the most part.

Besides, I'm Canadian and the game is Japanese...

Quote:
One problem with double buffering is that no cart has more than 64K ram, so if someone were to do double buffering at 8bpp they'd either have to gut the resolution or put 128K on donor carts. I suppose you could do the latter regardless as some sort of weak, makeshift copy protection.

I may not end up needing 128 KB of GPRAM (the only 8bpp rendering I've encountered so far is a fairly small chunk of the title screen), but I do need CPU ROM, which no existing Super FX cart has any of... I don't think the usual emulators can even load CPU ROM - not that it matters, as due to mid-scanline shenanigans nothing below higan v095 accuracy can so much as run my display engine, so I suppose I can just use a manifest...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group