![]() |
![]() |
#1 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,303
|
Breathless
Prompted by a request from Dunny to make Breathless run faster on pistorm, I've picked up the torch from pipper (https://eab.abime.net/showthread.php?t=103741) and replaced the C2P routines with more modern ones (from Kalms) done a few bugfixes etc.
In the zone is Breathless_20231107.zip that you should be able to unzip and use without doing anything other than the usual (protect xxx +E stuff). Use the 060 version if you have a normal 060 (with FPU), LC060 if you have an 060 without FPU, and the last version otherwise. Press F8 to show FPS (times 100), F9 to give all weapons/items/health, F10 to toggle invincibility, 8/9 to skip arena/world. Source code is available here: https://github.com/mras0/Breathless/ (based on pipper's work, again based on http://aminet.net/game/shoot/Breathless-1996-Source.zip) On the (maybe) TODO list: - Mouselook - RTG - Limit enemy movement to 25pfs? |
![]() |
![]() |
#2 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,447
|
Great work again! Does it run faster on 68060 too?
|
![]() |
![]() |
#3 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,303
|
Of course
![]() |
![]() |
![]() |
#4 |
Registered User
Join Date: Jan 2019
Location: Finland
Posts: 662
|
Comparison video on TF1260 100mhz. Huge performance boost, the old version was only really playable in 1x2 pixel mode.
[ Show youtube player ] |
![]() |
![]() |
#5 |
Global Moderator
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,532
|
Great work paraj
![]() ![]() |
![]() |
![]() |
#6 |
Thalion Webshrine
Join Date: Jan 2004
Location: Oxford
Posts: 14,636
|
Amazing work. As always.
|
![]() |
![]() |
#7 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 688
|
Great example of what could have been. The engine was certainly capable, but the game is typical “programmers art”. The textures are repetitive and boring grey, the enemies are a blurry mess. If you look at Dread/Grind and see how much care is put into choosing the palette, textures and enemy sprites, one can only imagine how good Breathless could have been…
And having the gun literally shoot bullets - facepalm… Excellent work, though, Paraj!! |
![]() |
![]() |
#8 | |
Senior Member
Join Date: Jun 2001
Location: Germany
Posts: 1,667
|
From HOL:
Quote:
|
|
![]() |
![]() |
#9 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,888
|
What does it use the long divisions for? If it's primarily for geometry then I'm sure alternatives are possible. Even a table of FP reciprocals and a floating point multiplication might be faster.
|
![]() |
![]() |
#10 | |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,888
|
Quote:
|
|
![]() |
![]() |
#11 |
Registered User
Join Date: Sep 2005
Location: Peterborough
Age: 48
Posts: 862
|
Thanks so much to you and others on here that have the knowledge and skills to develop/improve software for us users. It's so generous of you.
I notice you say "use the last version" if don't have an 060. Does that mean the file just called "Breathless" in the zip file you zoned and has that non-060 version been given any performance tweaks? |
![]() |
![]() |
#12 | |
Registered User
Join Date: Aug 2006
Location: Scunthorpe/United Kingdom
Posts: 2,176
|
Quote:
|
|
![]() |
![]() |
#13 |
Senior Member
Join Date: Jun 2001
Location: Germany
Posts: 1,667
|
|
![]() |
![]() |
#14 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,888
|
Sure but division still sucks, whether it's done on hardware or not. Getting rid of a lot of it in TKG gave a conspicuous improvement on 060 (also on on 030 but the relative improvement is less there since the 060 has such fast multiplication compared to previous 68K)
|
![]() |
![]() |
#15 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,303
|
Thanks guys! The source code is pretty clean, so it wasn't too much work to replace the C2P routines since pipper had already done the work of getting it to assemble.
The plain "Breathless" executable doesn't have any performance tweaks other than using newer, CPU-only, C2P routines. If you don't have at least an 040 it might be slower than the original game though. The game uses 16.16 fixpoint, which is why it relies on 64-bit math. The expensive divisions are only used in the raycasting part though. I'm sure it can be sped up, but I wanted to get a working version done first. You should not believe everything you read on the internet. The main reason it's sluggish on fast machines is primarily because it uses a blitter-assisted C2P routine. A decent choice for the targeted machine (020+fast RAM), but it means that it's severely handicapped on 040+. I suspect that whoever did the "060 optimized" version did not have access to a real 060 machine, as they dun goofed. The replacement routines (macros really) for multiplication are fine, but the division routine uses shift and subtract!! (https://github.com/mheyer32/Breathle...ulDiv64.i#L213). This takes >400 cycles/division which is much slower than simply letting 060.lib handled it (measured)!! So what I did to speed it up further is to correct that mistake (LC060) and use the FPU when available for the 64-bit stuff (060 version). The latter is not much of a win for division, but gives quite a nice boost for multiplication. More speed-up could be gained by using the FPU even more. Maybe I'll look at that at some point. I also applied some quick microoptimizations to the rendering loops. On my B1260/50Mhz raycast/render takes roughly 15/35ms for the plain version (i.e. letting 060.lib handle divs.l/muls.l), 10/30 for lc060 and 5/30 for 060 (i.e. with FPU). The original "060 optimized" routines uses 17/30... So they lose almost all performance gain with their shift-and-sub routine. |
![]() |
![]() |
#16 |
Senior Member
Join Date: Jun 2001
Location: Germany
Posts: 1,667
|
True, but take note that this is from the mouth of the developers. HOL mirrored the text, but it is included in the update itself. See the full text here:
https://aminet.net/package/game/patch/Breathless060 Also, maybe the 060 libs at that time (early 1996) were not as good/fast as what we have today. |
![]() |
![]() |
#17 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,662
|
@paraj so in the FPU case you convert 16.16 to ieee754 and use the fpu to multiply, then convert back to 16.16?
|
![]() |
![]() |
#18 | ||
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,303
|
Quote:
Quote:
I don't know what the state of 060 libraries in 1996 were, but board makers would have had access to MC's ISP which uses "Algorithm D" from TAOCP, so there would be no excuse for them. Still, the sluggish performance on 060 (and probably 040) and certainly on pistorm is due to the C2P, not 64-bit integer math. |
||
![]() |
![]() |
#19 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,303
|
Quote:
Commit that changed it: https://github.com/mras0/Breathless/...7f0ba4034b8966 |
|
![]() |
![]() |
#20 |
Alien Bleed
Join Date: Aug 2022
Location: UK
Posts: 4,888
|
Does the game support RTG?
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Breathless | Arnie | support.Games | 4 | 11 May 2015 00:44 |
Breathless 1.1? cracked | AmigaNeverDie | request.Old Rare Games | 10 | 23 February 2011 11:40 |
Breathless problem | djcasey | support.Games | 15 | 15 June 2010 22:21 |
Codes for Breathless | Bad Mr Frosty | support.Games | 2 | 20 January 2004 08:50 |
Settings for Breathless? | lordsnooty | support.Games | 1 | 25 July 2003 14:06 |
|
|