For a forum that prides itself on trying new things, for the love of all that is novel and interesting, please can we have a new QotM? - Krill

Create an account  

 
Master of Orion 1 unofficial patch

(July 21st, 2021, 09:59)SDragon Wrote: So most likely the issue will appear in late game where the tech levels are higher and the number of ships are greater, usually seen in small/medium ship types.

Yes, I've only seen it in late game.

It might help in getting this solved eventually if you would paste some asm code from that function along with asm coding problem description. That is, something to show to someone expert in asm so they can come up with a solution.
Reply

[attachment=22445 Wrote:merlinp pid='792260' dateline='1626978186']Yes, I've only seen it in late game.

It might help in getting this solved eventually if you would paste some asm code from that function along with asm coding problem description. That is, something to show to someone expert in asm so they can come up with a solution.

It should be this part of the asm code (attached).  In 1oom, they basically typecast the the resulting calculation into 64bit so there's no issue anymore.  

Here, it gets complicated because it doesn't just use asm mul, imul or div, idiv to do the calculation but actually calls another function mul32_u and div32_u to do the calculations.  And I believe the div32_U required values are given by the mul32 function which is why they can't be swapped.  But basically the calculation is [bp+shipsl] * [bp+wlh2][bp+wll2] / [bp+wlh][bp+wll].  So the possible part comes in being able to figure out how to divide either the ship or the wlh2wll2 by wlhwll first before and then multiply after, but I can't follow the full push, pop and register flow to really get a grasp of it.

We can't modify the mul32_u or div32_u function because it's used in multiple functions but I included them for reference. The section of that instruction set starts at 16D65 and can't go past 16D97 so any workaround needs to fit in there.


Attached Files Thumbnail(s)
           
Reply

Dividing first might lead to precision issue since this looks like integer math. If DOS programs did 64-bit integer math then maybe mul64_u and div64_u functions could be found elsewhere and added to the executable.
Reply

(July 23rd, 2021, 05:07)merlinp Wrote: Dividing first might lead to precision issue since this looks like integer math. If DOS programs did 64-bit integer math then maybe mul64_u and div64_u functions could be found elsewhere and added to the executable.

Ya, I'm not quite sure how assembly handles decimal and floating point numbers, which may be why they multiply first.  Another alternative solution would be find enough space somewhere to do a initial divide on the weighted totals before they are used in the multiplication so that the number wouldn't be as high.  It would involve tweaking some other values to adjust for the division, but it's all speculation as I don't see any place available to create the space required.
Reply

Thanks for still looking into things like this!  Another bug I noticed (I have a save file demonstrating it, but not on this computer) is that AI Silicoids are still/again/sometimes willing to trade valuable techs for the likes of Soil Enrichment, though they can't actually make use of the tech. I'm not sure whether that also happens in 1oom.
Reply

(August 2nd, 2021, 13:47)RefSteel Wrote: Thanks for still looking into things like this!  Another bug I noticed (I have a save file demonstrating it, but not on this computer) is that AI Silicoids are still/again/sometimes willing to trade valuable techs for the likes of Soil Enrichment, though they can't actually make use of the tech.  I'm not sure whether that also happens in 1oom.

I enjoy the challenge of trying to figure out the code in IDA, not so much realizing that nothing can be done about them.   I did look into the algorithm briefly and it seems it doesn't have a separate function to look at the tech to trade but just uses the spy tech to determine what it's interested in.  I haven't followed it enough to fully understand it as it's summer here and trying to get as much yardwork and house stuff done as I can before winter, but there is a small part that does check to see if the race is Silicoid, just not sure what it's doing yet.   As far as the 1oom project, I don't see anything in their functions that mention anything about fixing the bug so I believe it's probably in there as well.  

If you have the save file available, it might help motivate me some in case I wanted to test some changes out.
Reply

Hi guys,

I stumbled upon the forum after a very long time (even forgot the password to my account, hehe) and I am genuinely surprised this still somehow goes on. It's nice to see old names here as well! I worked on several projects since, but this old Moo game here is still golden for me... Simplicity and style, just one of those unique gems.

Hope I did not miss anything important. I have not read any PM messages, so apologies to anybody trying to contact me.
Kudos to SDragon for working with the code and IDA (I think I lost even the database file I once had; or have I posted it on-line somewhere?).
Reply

Oh, wow! Great to see you around again, kyrub! (Now, if only I had replied in a remotely timely manner!) I think one of the admins around here (I'm not one - just a moderator) can restore your old account if you'd like. I've been working on other projects lately myself, but I agree about MoO's simplicity and style: I keep coming back to this one, and it never disappoints.
Reply

Nah, it's not necessary to go back in time for me. I wiped every old file from my HD anyway.
Still nice to see you here, RefSteel. I always enjoyed reading your game stories.
Reply

(April 20th, 2020, 15:29)SDragon Wrote: Since kyrub's v1.40m patch has been around for years and is pretty stable, I've repackaged it without the autosave every year debugging help that was added.  It now uses the previous v1.3 autosave of saving every 5 years and only saved to SAVE7.GAM.  That way people can play and enjoy his patch without having to worry about having their directory saving every year that they play.

No other code was touched in regards to his patch.

Thank you so much for this. Today I started trying out 1.40m and I noticed that it was saving every turn. Not good when playing on a REAL 1997 Pentium 166-MMX with a 6.5 GB HD that's 99% full :-). I decided to search for any info about how I might disable that "feature" and to my utter delight I found exactly what I was looking for right here. Wow. Hmm I think I better pinch myself to make sure I'm awake. Hmm pinching doesn't really do much LOL. Guess I didn't choose a sensitive enough spot ;-)

Anyways. Thank you 10^100^100.

p.s. I also DLed the other patch for battle scanner display. Question: does the no auto save starmap.exe also patch that when used with the new resources.lbx from the battle scanner patch or does one have to choose which of the 2 to use?
"I think most people posting on a MOO/MOM forum in 2020 BC probably count as Time Travelers." : )
Reply



Forum Jump: