15 January 2021, 17:02 | #121 | ||
Registered User
Join Date: Sep 2008
Location: UK
Posts: 318
|
Quote:
Also there is the vanilla option of using a different 16 colours for each fighter - one can use sprites and the other the blitter. If you were being super adventurous - you could effectively blit over sprites or put some sprites over a blitter object to get the same 32 colours for each character. Would still look a lot better than standard Amiga version and you could probably get all the frames in memory. The arcade would use 4 bitplanes I imagine but be tile based. I still would guess not a huge number of different colours used per fighter in the arcade. I would actually guess at 32 max but I have been wrong before here EDIT : Have just done a test on the arcade (SF2) sprites and they use 16 colours per fighter The SNES also has 16 colours per fighter but the sprites are slightly weedier (not as beefy) and it misses a few animation frames out. Arcade sprite for Guile (looks wider here because CPS1 has narrow width pixels) Arcade Sprites here: https://www.spriters-resource.com/ar...treetfighter2/ Problem is number of sprites. Guile has 237 animation frames (facing one way) +24 for win poses (can be halved by only loading one win pose per round) + 7 for projectile animation (sonic boom). Wonder how much memory this would take up? Quote:
Last edited by Gilbert; 15 January 2021 at 17:36. |
||
15 January 2021, 19:14 | #122 | |||
BiO-sanitation Battalion
Join Date: Jun 2017
Location: Scotland
Posts: 151
|
Quote:
Quote:
The two timing bars here illustrate just how much of a problem this is. It's taking almost a complete frame to merely blit two fighters. Adding an erase step pushes this deep in to 25fps territory and a decompression step would add yet more pain. The test program this is taken from uses a 128 colour background with 64 separate colours for each fighter. I think the best approach for a game like SF2 on CD32 would be using large AGA hardware sprites. There is a post somewhere on the board with a Blitz Basic (I think) demo doing just that. Add two scrolling 16 colour background layers in dual playfield mode, or ditch the parallax and have a single, but much nicer, 128 colour background. Quote:
B |
|||
15 January 2021, 21:44 | #123 | |||
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,411
|
Quote:
As for 12/17FPS, this is really not enough for good gameplay for games like this. Even 25FPS usually doesn't feel "right" when playing, 17 or 12 FPS starts to feel like moving through muck. These games really do kind of need 50FPS to truly feel right. Quote:
Quote:
|
|||
16 January 2021, 11:02 | #124 | |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
Width is always rounded up to the nearest power of 16. So for example if something is 50 pixels wide, it actually consumes 64 pixels worth of Chip RAM. And if the graphic is a blitter object (bob), then the Bitplanes also need a "mask", which adds one extra bitplane. So 16 color bobs means 4 bitplanes + 1 bitplane for the mask. But Sprites don't have the mask cost. So for example if we take the normal standing pose of the SNES version of Zangief, that frame is of size 64*93 pixels. So if it was a bob, it would consume (64 / 8) * 93 * 5 = 3720 bytes = 3,72 kb Now, let's assume that the character has 200 frames of animation. This would be 3,72 kb * 200 = 744 kb. But that is only the "facing right" frames. If we want the mirrored frames also in RAM, then it consumes double the 744 kb, which is 1,48 megs. So right away we can see that the whole game can never fit into memory; only this one character eats 75 % of the 2 Megabytes that we have. And this is just the SNES version character. In the arcade version, even the smallest fighters have much bigger graphics than anything found in the SNES version. |
|
16 January 2021, 11:46 | #125 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
The first thing you do is think "how do we flip the frames, so we only have to store half"
You could use the CPU... with a 64k word flip buffer But how can we optimise the flip? Well.. the solution is to take each frame, and only flip one half of it. So whichever way the character wants to face, you either flip the top half or the bottom half. This reduces your flip CPU cost to around 50% Of course, there is also a way to flip image data using the blitter in several passes. Again, we'd only need to flip the half of the sprite that needs flipping. Now I would also hazard a guess, that many characters do have a lot of blank space in their frames. You'd want to really try to avoid storing some of that blank space. A simple way would be to slice the frames into 16 pixel wide vertical strips, and remove space from top and bottom. This would surely save some memory on quite a few frames. There are other ways that you could save memory too, by slicing the frames up slightly differently, but I'll leave that for someone else to figure out And just to add.. if you used one 16 colour playfield for the background, and one 16 colour playfield for one character, and hardware sprites for another character, you would not need to store any masks for the character frames, and you would use very simple D = A blitter modes to draw them (either to the playfield, or into the sprite data) |
16 January 2021, 11:57 | #126 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
Of all the games we talk about, i think that SF2 could translate really well to A1200 / CD32 and produce a version that is not too far from perfect
|
16 January 2021, 12:13 | #127 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,773
|
Quote:
Thanks for that, will come in handy with my next game. |
|
16 January 2021, 12:37 | #128 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
|
16 January 2021, 13:53 | #129 |
Zone Friend
Join Date: Apr 2005
Location: London
Posts: 1,176
|
|
16 January 2021, 14:21 | #130 | ||
BiO-sanitation Battalion
Join Date: Jun 2017
Location: Scotland
Posts: 151
|
Quote:
Quote:
B |
||
16 January 2021, 14:35 | #131 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
oops.. my bad.. it would be a 128k word flip table, and that would require shifting the original word up to get a long word offset into the table... might be better working with bytes in that case (a 256 byte table)
|
16 January 2021, 14:47 | #132 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
Let's compare byte vs. word (just the main flipping of 16 bytes of data in a simple way), assuming a0 points to our source, a1 points to our destination, and a2 points to our flip table:
using a byte flip table (256 bytes): move.b (a0)+,d0 ;8 cycles move.b (a2,d0.b),-(a1) ;18 cycles move.b (a0)+,d0 ;8 cycles move.b (a2,d0.b),-(a1) ;18 cycles ; total 52 cycles per word using a word flip table (128kb): moveq #0,d0 ;4 cycles move.w (a0)+,d0 ;8 cycles add.l d0,d0 ;8 cycles move.w (a2,d0.l),-(a1) ;18 cycles ; total 38 cycles per word |
16 January 2021, 14:55 | #133 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
I wonder if this would work for a 64k table:
Code:
move.w (a0)+,d0 ; 8 add.w d0,d0 ; 4 move.w (a2,d0.w),d0 ;14 addx.w d0,d0 ;4 move.w d0,-(a1) ;8 38 cycles again.. but table can be 64k... essentialy you are flipping the low 15 bits, and the addx moves the leftmost bit to the right |
16 January 2021, 15:29 | #134 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,411
|
On A1200/CD32 it may actually be more effective to run the flipping on the CPU with a small routine that fits in the cache. You could run (part of) the flip while you blit the non-flipped part. Key would be to do the flipping into registers as much as possible and only read/write in 32 bit chunks to keep memory accesses low.
Not tested this, but it does intuitively feel like a reasonable approach. |
16 January 2021, 15:51 | #135 | |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
Quote:
|
|
16 January 2021, 18:32 | #136 | ||
Registered User
Join Date: Sep 2008
Location: UK
Posts: 318
|
You guys know your stuff! I'm not a proper coder but I thought flipping sprites was fairly common on the Amiga? - even AMOS on A500 had flipping for both sprites and Bobs and it didn't seem to slow it down if at all.
I agree it seems hard to fit all the graphics into memory but we can use the decompression method. I read what Bob wrote about it being hard but I still think the extra power of the CD32's CPU could do it - esp with sprites and dual playfield mode being used to get a close - but not arcade perfect version. The SNES version missed out some animation frames from the arcade and no one really noticed. I would also say the original Arcade version of Streetfighter is just over 7Mb (it's 58 Megabit) and that has 12 fighters in there. So I think the sprites could take up less space than you think? Maybe we are overestimating? Unless 58 Megabit is wrong - but it is way larger than both the SNES and Megadrive carts. Quote:
Quote:
|
||
16 January 2021, 18:52 | #137 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,762
|
|
16 January 2021, 19:01 | #138 |
Registered User
Join Date: Aug 2013
Location: Marseille / France
Posts: 1,437
|
Well surprinsgly this dead end thread is becoming very interesting with all the technicall comments of many.
|
16 January 2021, 19:35 | #139 |
Lemon. / Core Design
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
|
|
17 January 2021, 00:10 | #140 |
Registered User
Join Date: Nov 2010
Location: South Wales
Age: 46
Posts: 937
|
Sorry for the slight O/T but people have mentioned just playing on mame. This might interest some
https://www.nintendo.com/games/detai...tadium-switch/ and this https://www.eurogamer.net/articles/2...intendo-switch |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SNES/MD Games Versus The CD32 Versions | Gilbert | Retrogaming General Discussion | 16 | 14 June 2020 22:45 |
Why Demos run in perfect resolution in WinUAE but not on real NTSC Amigas? | c0dehunter | support.Demos | 14 | 04 December 2017 16:11 |
CD32 compilation Games run on 2mb only..why can't WHDLoad games run on 2mb | spannernick | support.Games | 2 | 12 July 2017 17:15 |
WHD games AGA or CD32 versions? | fatboy | support.Games | 5 | 09 October 2014 13:34 |
Were CD32 Games Different 2 the Original Amiga Versions? | skywalka | support.Games | 6 | 11 July 2005 13:32 |
|
|