English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 15 May 2023, 13:49   #2521
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Quote:
Originally Posted by Seiya View Post
ok
I will also say, the mod is becoming increasingly dependent on the new engine build which fixed a number of historic bugs, so for the best experience, use the builds posted in this thread.
Karlos is online now  
Old 15 May 2023, 17:19   #2522
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,024
Quote:
Originally Posted by Karlos View Post
I tried to make update my toolchain but despite having never made any changes, many of the component repos ended up conflicted to death, so I'm just reinstalling it from scratch. I've chosen NDK=3.2 in the build options this time so that should fix things... I hope!
Any joy after re installing the tool chain?
abu_the_monkey is offline  
Old 15 May 2023, 17:20   #2523
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
@pipper, @abu_the_monkey

I did a completely fresh checkout and rebuild of the toolchain, this time with NDK=3.2 but it seems like adtools isn't present - the build fails on finding SDI_compiler.h, which doesn't appear to be present anywhere.

Did I miss a step?
Karlos is online now  
Old 15 May 2023, 17:26   #2524
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 681
Did you also make the “all-sdk” target?
pipper is offline  
Old 15 May 2023, 17:27   #2525
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,024
I just followed pippers instructions on page 6 or 7 of this thread, and all (bar me screwing up when installing Ubuntu and having to change permissions ,owner/user stuff) went ok.
abu_the_monkey is offline  
Old 15 May 2023, 17:27   #2526
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Quote:
Originally Posted by pipper View Post
Did you also make the “all-sdk” target?
Damn. I bet I didn't.

-edit-

Yep. That was it.

So, the C build compiles now but I am getting a lot of warnings for the use of the __saveds__ attribute only being usable with fbaserel. Do you get the same warnings?

Last edited by Karlos; 15 May 2023 at 17:34.
Karlos is online now  
Old 15 May 2023, 17:36   #2527
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Now that this is done, I think a devmode with C target seems like a useful addition.
Karlos is online now  
Old 15 May 2023, 17:37   #2528
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 681
Yes, that’s normal. The current build is not an -fbaserel build, but it might in future. So I added __saveds where needed. This is what the compiler complains about. I could try suppressing the warning…
pipper is offline  
Old 15 May 2023, 17:55   #2529
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Quote:
Originally Posted by pipper View Post
Yes, that’s normal. The current build is not an -fbaserel build, but it might in future. So I added __saveds where needed. This is what the compiler complains about. I could try suppressing the warning…
It's fine as long as it's expected
Karlos is online now  
Old 15 May 2023, 18:13   #2530
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Just examined the output of the compiler for system.c and a few things caught my eye:

The code for clear keymap is basically the same loop unrolled 32-bit clr.l (a0)+ that was in the original assembler, which is reassuring to see the compiler understands this sort of code is unrollable.

On the other hand, I think tuning for 030 introduces some stuff that may be bad for 060:

In Sys_EvalFPS:
Code:
    Sys_FPSFracAvg_w = 1000 % (UWORD)avg;
    Sys_FPSIntAvg_w = 1000 / (UWORD)avg;
Is correctly reduced to a single division operation. However, rather than the 32/16 => 16:16, it generates this one:

Code:
	move.l #1000,d2
	divsl.l d0,d1:d2
	move.w d1,_Sys_FPSFracAvg_w
	move.w d2,_Sys_FPSIntAvg_w
It feels like the compiler plays it too safe here. I think that particular incantation will be a lot slower (admittedly it's once per frame, but still). The 32/16 => 16:16 only needs around 18 cycles, in the worst case.
Karlos is online now  
Old 15 May 2023, 18:24   #2531
pipper
Registered User
 
Join Date: Jul 2017
Location: San Jose
Posts: 681
Yeah, it’s a mixed bag. Sometimes it generates good code, sometimes you wonder why it replicates so much code to save a few jumps…
I mean, look at the code for mnu_pass1!

But for the parts we replace, it should be good enough, though. Maintainability and extensibility imho outweighs the slightly larger code. You can try playing with the -m -mtune and -O settings… -Os could also be a good choice. -fomit-frame-pointer may also help a bit, freeing up a5.
Maybe at some point having a dedicated 060 version makes sense.
pipper is offline  
Old 15 May 2023, 18:31   #2532
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Or just being wary that 32-bit int is the default and C will always widen to the largest type of an input to an operator. For example:

Code:
    Sys_FPSFracAvg_w = (UWORD)1000 % (UWORD)avg;
    Sys_FPSIntAvg_w = (UWORD)1000 / (UWORD)avg;
gives:

Code:
	move.w #1000,d2
	and.l #0xFFFF,d2
	divu.w d0,d2
	move.l d2,d1
	swap d1
	move.w d1,_Sys_FPSFracAvg_w
	move.w d2,_Sys_FPSIntAvg_w
which is almost identical to the hand rolled version. A bit surprised it didn't just clr.l d2 then move.w #1000,d2 (or even just move.l #1000,d2... shrug)

Incidentally, I always use -fomit-frame-pointer. I thought that was standard at -O3 ?

Last edited by Karlos; 15 May 2023 at 18:37.
Karlos is online now  
Old 15 May 2023, 18:39   #2533
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
If you are looking for another relatively low hanging fruit to convert to C, I would suggest the whole IO subsystem for loading and saving would be good. It needs a bit of an overhaul if we want to be able to load additional custom stuff, which will be a lot easier in C.
Karlos is online now  
Old 15 May 2023, 19:22   #2534
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,604
At this point given the differences are growing i think is good to give the refactor a new name, like, thinking at Doom, something like Chocolate Breed or similar?
saimon69 is offline  
Old 15 May 2023, 19:53   #2535
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Quote:
Originally Posted by saimon69 View Post
At this point given the differences are growing i think is good to give the refactor a new name, like, thinking at Doom, something like Chocolate Breed or similar?
I dunno. That sounds kinda racist...
Karlos is online now  
Old 15 May 2023, 19:53   #2536
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,024
Quote:
Originally Posted by saimon69 View Post
At this point given the differences are growing i think is good to give the refactor a new name, like, thinking at Doom, something like Chocolate Breed or similar?
maybe if/when RTG is introduced as an option?
abu_the_monkey is offline  
Old 15 May 2023, 19:55   #2537
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,024
Quote:
Originally Posted by Karlos View Post
I dunno. That sounds kinda racist...
abu_the_monkey is offline  
Old 15 May 2023, 19:56   #2538
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
I know it sounds like a lot has changed, but in reality it hasn't. The display handling is all peripheral, really. Figuratively and literally. The vast corpus of the code is the same
Karlos is online now  
Old 15 May 2023, 19:59   #2539
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,516
Quote:
Originally Posted by abu_the_monkey View Post
maybe if/when RTG is introduced as an option?
Speaking of which, I may have a stab at this on the weekend. No promises, but I have more recent experience with RTG, in that I've written code for it this millennium.
Karlos is online now  
Old 15 May 2023, 20:00   #2540
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,024
Quote:
Originally Posted by Karlos View Post
I know it sounds like a lot has changed, but in reality it hasn't. The display handling is all peripheral, really. Figuratively and literally. The vast corpus of the code is the same
exactly this.

to me its more finishing off things that weren't back in the day, so far
abu_the_monkey is offline  
 


Currently Active Users Viewing This Thread: 4 (0 members and 4 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alien Breed 3D II The Killing Grounds RTG patch Angus Retrogaming General Discussion 63 14 December 2022 15:20
Alien Breed & Alien Breed '92: SE - delay when picking up items / opening doors Ian support.WinUAE 16 23 December 2016 15:50
Alien Breed 3D II : The Killing Grounds code booklet alexh support.Games 19 10 October 2012 22:17
Alien Breed 3D 2 - The Killing Grounds Ironclaw support.Games 12 13 September 2005 13:07
HD Version of Alien Breed I ? Kintaro request.Old Rare Games 20 31 July 2003 10:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:00.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.22087 seconds with 14 queries