05 December 2016, 14:28 | #61 |
Unregistered User
Join Date: Nov 2005
Location: Tasmania
Age: 42
Posts: 893
|
You'll probably run into problems if you try and use the upper registers in your inline ASM. a0-a3, d0-d3 are fine, all the others cause problems from memory. The 68k code posted above will probably cause a crash when imported into Blitz.
Working on a demo coded in Blitz using inline ASM many years ago our coder (Ript^DisasterArea) had to work around this problem. |
05 December 2016, 15:47 | #62 | |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
I'm not sure if the same applies for Blitz 2.1, but according to the AmiBlitz documentation, only registers A4-A6 and D7 are reserved for compiler use, the rest can be used as you please from Blitz ASM.
Quote:
|
|
05 December 2016, 20:22 | #63 | |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Ok, good to know about the potential problems with those registers.
Today I quickly tested the code pieces posted, and when compiling, all the long commands like these gave a "syntax error": move.b (a5,d0.w),(a1)+ Both code examples had a line with multiple parametres like this, and both gave a syntax error on such lines. But all the other lines that were shorter were seemingly OK. But, even if I could get this to run, most likely I couldn't adapt it to any real use, because I can barely understand the ASM code and the working mechanism. Even if this small example would work fine, I still couldn't build upon it without first learning at least the basics of ASM. And even if I get smarter and would suddenly understand it, the end result would still not run at 50 FPS, because as I explained in a previous post, this whole mirroring process requires: 1. Blit the Blitz "Shape" we want to mirror into a separate bitmap. 2. Transfer some info to the CPU registers. 3. Perform ASM mirror code to the bitmap to mirror it. 4. Read the mirrored bitmap data back to Blitz Shape. 5. And after this Blit the mirrored Shape into the actual game screen. And I tested that process without the ASM code, and it caused slowdown. So even if I could get this to work, I think speedwise it could only barely beat the Blitz's own XFlip. So it might not be worth it after all, especially with my zero ASM skills. But anyways, thanks for all the help and code examples. Quote:
And maybe also some of the "victory celebration" frames of certain characters, and other stuff like that might also be OK to mirror with Blitz XFlip; so we could split some of those frames into half vertically, and do the XFlips when fight ends; the pause would only be 1 or 2 seconds. |
|
05 December 2016, 21:08 | #64 |
CaptainM68K-SPS France
|
Just a few informations i got here and there about the CPS1 arcade hardware :
- The 68000 deals with the tiles metadas (in words) - The Graphics roms are only connected to the graphics tilemap chips - The 68000 has no access to the graphic tiles - The 68000 takes care of the collisions (all done in software !) - The 68000 send requests to the graphic hardware : "print tile $3452 at X 128 Y 64 on tilemap 2". - The AI, state machines, all those are processed by the 68000. |
06 December 2016, 10:23 | #65 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
Quote:
Good work on the analysis |
|
06 December 2016, 15:37 | #66 | |
CaptainM68K-SPS France
|
Quote:
it contains a lot of datas (AI tables, metadata), that have to be externalized. the main game code as program, should be something like 500kb (more or less). |
|
10 December 2016, 02:52 | #67 |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
Is your port going to be full 6 button CD32 controller support?
|
10 December 2016, 12:28 | #68 | |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
|
Quote:
SF and a lot of other fighting games use dynamically per frame allocated bounding boxes for areas that can be hit (usually shown in green in images), and for the areas that are executing the hit, like a fist or leg (usually shown in red in these images)... You can see this principle in action here: [ Show youtube player ] |
|
10 December 2016, 13:42 | #69 | ||
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
Quote:
|
||
10 December 2016, 13:53 | #70 | |
CaptainM68K-SPS France
|
Quote:
|
|
10 December 2016, 15:41 | #71 | |||
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Quote:
Quote:
Here's the shape format in all its glory: http://www.amigacoding.com/index.php...ct_types#shape Here's a script for dumping information about a shapes file: https://github.com/idrougge/ShapesInfo Quote:
|
|||
10 December 2016, 15:45 | #72 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
D7 is reserved, you say? Bloody hell, I must check all my inline asm so it doesn't trash that.
|
10 December 2016, 15:55 | #73 |
Inviyya Dude!
Join Date: Sep 2016
Location: Amiga Island
Posts: 2,770
|
|
10 December 2016, 15:55 | #74 | |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Quote:
Code:
GetReg a0, Addr Shape(0) ; Moves address of shape 0 to address register 0 GetReg a0, myshape\_data ; Moves address of myshape's bitmap data to a0 |
|
10 December 2016, 16:49 | #75 | ||
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
Quote:
Quote:
|
||
11 December 2016, 05:01 | #76 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Either you load the shapes directly from disk or you INCBIN them in your binary and just CludgeShape them.
|
12 December 2016, 16:25 | #77 | ||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Quote:
@Master484 Quote:
|
||
12 December 2016, 16:28 | #78 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
|
17 March 2017, 12:42 | #79 |
Registered User
Join Date: Nov 2015
Location: Vaasa, Finland
Posts: 525
|
I've played around with this demo again, and made a small test to see how it would run on AGA 128 color mode.
The ADF has been added to attachments of the first post of this thread. Minimum requirements : A1200 and 2 MB. Commands: 1 - create fireball 2 - create Balrog 3 - create Blanka 4 - create horizontal 64*16 object 5 - create vertical 16*64 object 8 - 25 FPS MODE 9 - 50 FPS MODE Joystick - scroll level --- Firstly, the 128 color palette has been divided into 2 parts: first 64 colors are for the background and the remaining 64 colors are for the BOBs. This allows a different 64 color palette for each level and also allows using copper effects on the 64 background colors without affecting the BOB colors. And also I made it so that that the 3 first background colors are always transparent, black (0,0,0) and white (255,255,255), and these 3 colors can also be used by the BOBs. So the BOB 64 color palette doesnt need to have tranparent, black or white. All BOBs take their colors from the last 64 colors of the palette, and these colors stay the same throughout the game. The current BOB palette in this demo is just a placeholder filled with random colors, but if well designed, 64 colors should be enough for almost arcade perfect colors ( or Amiga perfect ), especially because the 64 BOB colors doesnt need to include transparent, black or white. --- All drawing operations are done in 128 colors, but it's still quite fast, a good amount of objects can be drawn in 25 FPS. Although full 50 FPS seems impossible in this many colors and with game objects this big. But I recently discovered the AGA 64 pixel fetch mode feature, and turning it on with the Blitz Display Library made all drawing 30% faster. And in addition to this triple buffering is still used: all is drawn with QBlits with Unqueue source bitmap. Together these two tricks make the 25 FPS frame rate possible. And also screen size is bigger than before: 320*200 game area + a 320*32 status panel. Between the panel and the main area there are six empty lines; this is a Blitz feature. Normally the line amount would be 2 or 3, but it seems that with this screen setup it needs 6. But it's not a big deal. Also all sprites are lost thanks to the 64 pix fetch mode + 320 pixel wide screen. But this is only true for the game area, I think the panel can still display sprites, and it can be optimized more with them. Also scrolling is done from the interrupt and always updates at 50 FPS, regardless of the FPS mode or slowdown. --- Test results on standard A1200 configuration without any Fast RAM: 50 FPS MODE Fireballs = 9 One character + 3 fireballs. Two characters at once cause slowdown. 25 FPS MODE Fireballs = 19 One character + 12 fireballs Two characters + 6 fireballs --- If Fast RAM is added, it gives one more fireball. So it would seem that at 25 FPS this game could be made run in 128 color mode. Although if we count 2 characters + 2 shadows + 2 fireballs, then this leaves us about 2 fireballs worth of power, and 3 fireballs with Fast RAM. And to this we add music, sound effects and AI. So it's very tight, but might just be possible. --- Also I noticed something interesting: pressing 4 and 5 makes rectangular box objects appear. The two box types have exactly the same pixel amounts, but first box is a horizontal 64*16 box, and the second one is a vertical 16*64 box. And the interesting thing is that you can draw more horizontal boxes than vertical boxes. 10 horizontal boxes run at 50 FPS, but for the vertical boxes only 7 is needed before slowdown happens. First I thought that this is caused by the 64 pixel fetch mode, but it also happened without it. So maybe the Blitter is better at drawing horizontal objects than vertical objects? Also maybe this is related to the image memory consumption rules; because as you know, adding height to an image consumes more RAM than adding width. Although blitting one full size 64*128 object was still faster than blitting eight 64*16 BOBs, so we can't actually cheat the system with this. But surely this feature is useful when splitting the animation frames into smaller parts; favoring horizontal areas brings more speed. --- And that level background image is actually from the US Gold version. But I made it better, added colors and fixed some things, and now it looks great, although it's still a little bit work-in-progress; a few parts need more polish, and more copper is still possible. The US Gold version backgrounds are actually great, because they're all 640*216 images, and are designed for the 320*200 Amiga resolution, which is the same screen size that we are now using. This is why I think we should use them instead of the arcade versions; we just recolor and improve them using the arcade version as a reference, and the end results will be perfect. But about the fighters, I'm not sure, both the arcade and US Gold versions are possible choices. The problem with the arcade versions would be Chip RAM usage (especially now at 128 colors, and especially if mirrored versions are also in Chip RAM), and also they were designed for the bigger and wider arcade screen, and when put to a 320*200 screen, they are maybe a little bit "too big", meaning that the "long range fighting" aspects of the gameplay could suffer. But I'm not sure how much; because we still havent tested any actual gameplay. And on the other hand, if the US Gold version characters were used, then the problem would be the quality improvement process: All of them and every single frame would need to be fixed, and recolored in 64 colors, and also some missing frames might need to be added using the arcade versions as a reference. But the good points would be the smaller size, meaning more speed and less RAM usage, and also the character sizes would fit better into the 320*200 screen. --- But again, this is all still just speculation, and more of a graphics test rather than an actual conversion project. But of course a playable demo might just arrive one day. |
17 March 2017, 14:54 | #80 |
CaptainM68K-SPS France
|
I can give you any arcade asset from the arcade if you need it Master484.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Street Fighter 2 for CPC !! | dlfrsilver | Retrogaming General Discussion | 140 | 09 April 2017 20:12 |
Street Fighter 2 | weirdreams | Retrogaming General Discussion | 4 | 20 June 2012 23:15 |
Street Fighter 2 credits | dlfrsilver | HOL contributions | 8 | 20 October 2010 12:46 |
Street Fighter 3 gfx found. | Thorham | project.Sprites | 1 | 22 September 2009 13:13 |
street fighter | stuntpup | project.WHDLoad | 5 | 30 August 2007 20:45 |
|
|