13 June 2023, 11:51 | #241 |
Registered User
Join Date: Nov 2014
Location: Italy
Posts: 2,377
|
the game is slow mainly for the numbers of triangles of every polygons. Then Amiga hardware is not ideal for this type of games that are developed in chunky also on Amiga that is planar.
If TFX was developed in Planar (like Virtual GP) it would be very fast and smoth on 68030. |
13 June 2023, 12:37 | #242 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
Quote:
Given that most c2p routines today hit copyspeed, there would likely be no loss in performance rewriting the polygon rendering as chunky. In fact, it may run faster because generating pixels, especially when shaded and texture becomes that much easier. |
|
13 June 2023, 12:51 | #243 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,379
|
Interesting interpretation. Did you read the whole thread? TFX WAS developed "in Planar" which is why it is still slower than it could be. Multi-colour 3D rasterisation does not lend itself to planar because you have to do small read-modify-writes.
|
13 June 2023, 13:16 | #244 |
Moderator
Join Date: Apr 2006
Location: Germany
Age: 44
Posts: 4,007
|
Very fast on my V1200!
Thank you!! |
13 June 2023, 13:19 | #245 |
Registered User
Join Date: Dec 2016
Location: Finland
Posts: 168
|
Depends on the detail level, how thick and how many color gradient colors you have in horizon. If you use blitter fill mode, its like treating each of these areas like a simple polygon. If you have 25 FPS as frame rate you can spend two entire frames on the horizon drawing with blitter, should be enough time.
|
13 June 2023, 13:42 | #246 |
Registered User
Join Date: Aug 2013
Location: Marseille / France
Posts: 1,456
|
Isn't it the technique used in Guardian ?
|
13 June 2023, 13:50 | #247 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
A point that has been missed here is that the game wasn't written for the Amiga. It was written for the PC, with an Amiga conversion. I don't think this approach lends itself to having the most tightly optimised blitter rendering.
And even if it did, we'd all still be complaining it was too slow on accelerated machines. There's a reason everyone uses tools like FBlit on faster non-RTG machines. |
13 June 2023, 17:23 | #248 | |
Amiga Games Database
Join Date: Jun 2006
Location: South West England
Posts: 1,269
|
Quote:
I don't know much about FBlit, would it still function within a WHDLoad game? |
|
13 June 2023, 18:14 | #249 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,272
|
|
13 June 2023, 18:31 | #250 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
The point about fblit was to illustrate that for faster CPUs, the blitter is just a hindrance.
|
13 June 2023, 18:56 | #251 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,127
|
Lot's of replies, so maybe missed something, but some info.
What I did is (assuming old drawing code isn't enabled): - Make sure the blitter isn't used at all. This was only in a few places: Line drawing, rectangle filling and sprite blitting in some cases. This meant adding some new CPU replacement functions (that could certainly be optimized). - At the start of each (in game only) frame I replace the pointer to the screen buffer (originally in chip mem) with one pointing to fast mem. (From the great testing by especially tomcat, I found that this needed to be after keyboard handling that can put up the map/menus). - Game runs as normal with now all rendering done by CPU (this was already mostly the case) - When the game wants to present the newly drawn frame I copy the fast buffer to chip mem and update the copper pointer (without waiting for end of frame like the original code, since the displayed frame can't be corrupted by the rendering) Latest update also has a few extra tweaks for plain 020 version: - A frequently accessed variable is moved to fast mem - Frequently used unimplemented 060 integer instructions (32x32->64 mul, 64/32 div) are handled without having to go through exception handler (from previous measurements this saves >3000 cycles each time) Major caveat: These optimizations were done to benefit very fast Amigas only. I have a real 68060/050 I can test on, and feel fairly confident in my ability to do something for that, so that's my target. PI storm (which was the original challenge naturally benefits as well). I don't know, and can't test, to what extend these changes matter for better or worse on systems with those CPUs. I'm fairly sure it's a benefit on 040, but doubtful to the extend on 030. General notes: - The game doesn't explicitly clear the screen buffer as the complete view is rebuilt every frame - Code mostly seems fine. Probably 95% C code compiled with a decent compiler, and the handwritten assembly functions are written with care, targeting the right areas. - Profiling was not easy back then, and like conjectured already, maybe they hadn't come to that point in the development cycle Considering the hypothetical "why didn't they use C2P" - Were good C2P routines *that could be used commercially* available when the project started? - For commercial reasons they probably needed to target low-end 020 systems, and for those I'm not sure a C2P based solution will be faster - Even if they did realize it would be faster, making that change would require rewriting many functions. While the important functions (polygon filling) could be rewritten quite fast, there's lots of other stuff that I didn't touch like the HUD (text, etc. etc.) - Maybe there was a bit of 90ies PC mindset (not necessarily from the developers) to release something that could on paper run on ancient machines, but really required a machine that wasn't realized yet, and let Moore's law do it's work (not realizing this wouldn't help). |
13 June 2023, 19:48 | #252 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
Never mind all that, when can I play it on my 1MB OCS A500?!
|
13 June 2023, 19:59 | #253 |
Registered User
Join Date: Aug 2013
Location: Marseille / France
Posts: 1,456
|
|
13 June 2023, 20:07 | #254 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
|
13 June 2023, 20:11 | #255 |
Registered User
Join Date: Aug 2013
Location: Marseille / France
Posts: 1,456
|
|
13 June 2023, 20:21 | #256 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
Reflecting on @paraj longer post, I'm pretty sure efficient software C2P was not a common technique in 1993 or 1994. The first practical example I recall was in Breathless, which was 1995 I think. The technique overall was known and Akiko was doing it in hardware on the CD32, but back when DID was working on TFX it was likely considered too slow for any machine they might be realistically targeting.
It's interesting how such notions change. Looking at TKG, for example, the C2P time is basically an irrelevance on 060. RTG graphics cards aren't faster because they don't skip the C2P, they are faster because they generally have faster write speeds that chip ram. I'm sure if you found an old Zorro II card you could end up with a lower frame rate than on AGA for a fast enough CPU. |
13 June 2023, 20:23 | #257 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,127
|
Last ditch effort attempt at push for 1 frame on PI storm. In the zone is "TFXAGA_custom3=4_only_test.7z" as description says it ONLY works with custom3=4 (TFX.040). This one also moves sprite buffers to fast ram.
@Karlos: And one of the first thing I remember from the TKG thread was the immediate improvement of replacing the existing C2P with a modern (Kalms) one. |
13 June 2023, 20:35 | #258 | |
Retro Freak
Join Date: Nov 2001
Location: Slovenia
Age: 51
Posts: 1,648
|
Quote:
Video: [ Show youtube player ] |
|
13 June 2023, 20:49 | #259 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,213
|
Quote:
|
|
13 June 2023, 21:01 | #260 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,127
|
Quote:
Thanks for testing! I'll apply this to all versions (also seems to at least be no worse on 060). Maybe a some more chip writes can be avoided... Might as well exhaust all (simple) opportunities while I'm at it EDIT: TFXAGA_RC2.7z in the zone (no optimizations, but all versions supported with sprite buffer in fast mem)- Last edited by paraj; 13 June 2023 at 21:31. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PiStorm32-Lite problems | tech3475 | support.Hardware | 52 | 23 October 2023 17:49 |
Pistorm a500 & Pistorm32: Can you VNC? | ElectroBlaster | support.Hardware | 4 | 09 March 2023 09:00 |
AGA, Amiga Demos on Pistorm32 | nikosidis | Amiga scene | 8 | 06 March 2023 22:11 |
Unique - Origins on Pistorm32 | nikosidis | Amiga scene | 5 | 01 March 2023 18:02 |
FS: Pistorm32 - GreaseWeazle - ATX Adaptors | RetroPassionUK | MarketPlace | 0 | 14 January 2023 13:34 |
|
|