Skip to content

Any chance you can fix Birthright : Gorgon's alliance too? #13

Closed

Description

@Question2

It runs first except for one problem : the game will randomly crash with a "the memory could not be read from" error during adventures, and since you can't save during adventures, that can result in a lot of progress wasted.

Activity

  1. juanitogan commented on Jul 24, 2018

    @juanitogan
    Owner

    Hi. Thanks for asking. Seems like a worthy game to fix. I'm busy with publishing my own game at the moment so no time in the near future unless I need a break. But, first, some questions.

    I assume you are running the Windows version so...

    What version of the game are you running? That is, what game patches did you install for it? Also, what version of Windows are you running on?

    And, why not run the DOS version in DOSBox instead? I don't know the game but people seem happy with that option. I think I know the answer to this but I would still like to hear your take on it.

    And, finally, does that error message show the exact same codes each time or are they different each time?

  2. Question2 commented on Nov 19, 2018

    @Question2
    Author

    Hey, thanks for replying.

    I had the latest patches installed, which seems to be 1.0.0.4 when i right click winbr.exe and check the details tab.

    I cant recall the exact reason but I think the dos version isnt as up to date or has some other drawback?

    I cant recall the exact code or if its the same...but the odds of that crash happening seems to be dramatically increased the longer you play. It never seems to crash if i restart the game then do an adventure right after, but is almost guaranteed to crash if i do multiple adventures without restarting the game or play multiple turns in realm mode without restarting the game.

    Hope your game works out OK by the way.

  3. juanitogan commented on Nov 20, 2018

    @juanitogan
    Owner

    Hey, thanks for finding your way back to 🌍. 😜

    All I can tell right now is that the DOS version was up to 1.0.0.3, and the Win was up to 1.0.0.4 only because they decided to move it to DirectX 5 (fortunately).

    Thus, the only reason I see to fix the Win version is:

    1. Some users will find it less intimidating to install yet another patch for the Win version than to install DOSBox. In other words, it lowers the barrier to entry (even though I don't take the time to write friendly patchers).

    2. I find it fairly rewarding to fix stuff like this.

    Given that it mostly runs, I will probably be able to fix it, so I'll add it to my todo list. But, given how niche this game is and the probable small number of fans of it unwilling to run it in DOSBox, I can't put a very high priority on it. I suspect it will also run fine in DxWnd, but that can be more messy than DOSBox.

    I already have at least two side projects besides my full-time game project, so no telling when I might get to it.

    In the mean time, if you play it more and are willing, start writing down the error addresses and report them here. It will help save on testing time.


    UPDATE 2025: It has been noticed that the BRWIN14 patch also contains a new build for DOS. (Something I would have noticed before if I was at all familiar with the game.) NOVA.EXE is tagged internally as v1.15 (in a float32 value) -- the same that WINBR.EXE is tagged -- which is the internal version for patch 1.0.0.4.

    Whether or not there are any fixes in 14's NOVA.EXE is still unclear. The file is larger than in BRDOS13, and looks different internally, but that could be due to the various changes to the code base for the Windows-related upgrade. Yes, the BRWIN14 readme under fixes says "Several minor bugs" and "Code support for the Deluxe Tools" but it also said exactly that in the BRDOS13 readme and could be leftover from a lazy edit (e.g. the patch date "10/31/1997" and the instruction to "run BRPATCH3.EXE" were not updated due to lazy editing). In the 13 readme those fix lines were then followed by a list of fixes, whereas the 14 readme does not list anything other than the DirectX 5.0 upgrade. STRDAT.DAT in 14 has changed as well, but the diff on it doesn't show anything significant as near as I can tell. All other game files in the 14 patch are the same as in 13.

    The source code doesn't have a changelog or any other central file with details about patch changes. VERSION.CPP only lists patch internal version numbers with dates. No CVS or the like either. It appears zip files were once used for rolling back changes, but none of these zip files were found in the released source. Fortunately, code edits are generally tagged with initials and dates in header or inline comments. But I found no tags with a date between patches 13 and 14. STRDAT*.DAT each had 3 lines tagged as added with DirectX 5. Weirdly, I found an edit in WINSYS\MACHINE.C tagged "12-16-97" (after patch 14) that appears to add some joystick inits. This could party explain why the last build (and many source files) have a file date of 12/19/97 (patch 14 was 12/09/97). Finally, there are many files with various 12/xx/97 mod dates that may or may not be new and/or modified (and it is also unfortunate that the creator of the source zip did not zip directly from the original disk, thus losing the original file-creation dates).

  4. Question2 commented on Nov 21, 2018

    @Question2
    Author

    Doesnt the 0.4 version have more bug fixes than the 0.3 version at least? I will let you know if i can get the error message to happen again.

  5. Question2 commented on Nov 21, 2018

    @Question2
    Author

    I checked windows event viewer and it still has the error logs for the crashes :

    Faulting application name: WINBR.EXE, version: 1.0.0.4, time stamp: 0x348dd6ed
    Faulting module name: WINBR.EXE, version: 1.0.0.4, time stamp: 0x348dd6ed
    Exception code: 0xc0000005
    Fault offset: 0x0004da28
    Faulting process id: 0x14e4
    Faulting application start time: 0x01d42ae3d54423ef
    Faulting application path: D:\Birthright\WINBR.EXE
    Faulting module path: D:\Birthright\WINBR.EXE
    Report Id: 2c4aa0aa-96e4-11e8-9c4c-bbc5207c92ca

    Faulting application name: WINBR.EXE, version: 1.0.0.4, time stamp: 0x348dd6ed
    Faulting module name: WINBR.EXE, version: 1.0.0.4, time stamp: 0x348dd6ed
    Exception code: 0xc0000005
    Fault offset: 0x0004db6f
    Faulting process id: 0x1f40
    Faulting application start time: 0x01d428b8253ce402
    Faulting application path: D:\Birthright\WINBR.EXE
    Faulting module path: D:\Birthright\WINBR.EXE
    Report Id: 07f3a8b0-94af-11e8-bade-ca61a241f120

    Faulting application name: WINBR.EXE, version: 1.0.0.4, time stamp: 0x348dd6ed
    Faulting module name: WINBR.EXE, version: 1.0.0.4, time stamp: 0x348dd6ed
    Exception code: 0xc0000005
    Fault offset: 0x0004da28
    Faulting process id: 0x1808
    Faulting application start time: 0x01d427bdccdc0d60
    Faulting application path: D:\Birthright\WINBR.EXE
    Faulting module path: D:\Birthright\WINBR.EXE
    Report Id: 26eb5c08-93b5-11e8-83bd-b072957d99ca

    The exception codes all seem to be the same but the rest differs slightly

  6. juanitogan commented on Nov 21, 2018

    @juanitogan
    Owner

    Awesome 😮 thank you! Other than the exception code, what I'm looking at most is:

    Fault offset: 0x0004da28
    Fault offset: 0x0004db6f
    Fault offset: 0x0004da28

    The more of those I get and the more I can see a pattern in them, the better. Thus, if you have more of those in your logs feel free to paste them all here (with or without the other text, whatever is easiest).

    The .4 version is most likely just Win fixes and not game fixes (a la DirectX 2 to 5). This was back in the day when serious gamers still preferred to play GPU-demanding games in DOS for performance reasons. The Win versions were mostly to drive sales. Thus, it is not likely they would have done any game fixes that weren't released for the DOS version -- and the DOS patches support that theory. Possible, yes, just not likely.

  7. minexew commented on Oct 25, 2020

    @minexew

    FWIW, archive.org has what looks like the complete source code to the game (both Windows & DOS versions), with files dated 1997-12-19: https://archive.org/details/birthrt_source

    Definitely worth checking out even as a curiosity, although I haven't found any OBJ/MAP/PDB files in there that could help resolve the crashing addresses.

  8. juanitogan commented on Oct 25, 2020

    @juanitogan
    Owner

    Cool. I'll check it out. Thanks! Not the game I was hoping to find source code to but, hey, I might get tempted some day to rebuild it if enough people ask. (Still thinking about an open-source, hi-res version of Cyberstorm.) I spend most of my spare time these days writing new games hoping to find something to supplement my meager income. Currently working on Sendit Soccer on weekends, with GRITS Racing on the back burner. I would like to spend more time on classic games and platforms, but focus on income has to come first.

  9. minexew commented on Oct 26, 2020

    @minexew

    Nice, good luck with your games!

  10. Question2 commented on Jun 12, 2021

    @Question2
    Author

    @minexew @juanitogan Im guessing that rebuilding the game even with the source code would be next to impossible? That you cant just run it through a compiler and have it work?

    And i dont suppose either of you knows if there is a way to open/modify the .dat files that the game uses?

  11. minexew commented on Jun 12, 2021

    @minexew

    IMO it would mainly depend on how complete the source code leak is, especially with regards to 3rd-party libraries and middleware (even as pre-compiled binaries). Then you would just need to find the exact toolchain that they used, which I'm 99% sure was some version of Visual C++.

  12. juanitogan commented on Jun 12, 2021

    @juanitogan
    Owner

    @minexew is right on target there.

    Personally, I think it has a good possibility of turning out to be pretty straight forward, and I put it on my game-jam TODO list last year. That is, during game jams, I tend to work on side projects like this rather than jamming up a new game. I like to hang out with the jammers but typically see more value in advancing my own side games, or attempting hero (I mean: game-preservation) work like this. For example, next game jam I will likely add a feature to my River Raid Squadron game (which will also move it from v0.9 to v1.0 -- look it up on itch.io if you're into 80's games). After that, I may then tackle this rebuild. Depends.

    I remember digging into this a bit when I downloaded it and finding that it appeared complete and possibly the latest version. I believe, also, that I saw it was Watcom C/C++. Which, as far as I know, is what most games of the era were built with -- certainly the one's from Sierra and Dynamix. As far as libraries, etc, I haven't noticed much dependence on things outside the standard Watcom and Windows toolsets. Sometimes I see an MP3 dll and similar edge-tech stuff.

    Because Watcom saw support to the end of the 90's and then saw a few more years of support as an open-source product, I give it pretty good odds of being buildable as 32-bit Windows 7+ with a few days or a week of effort (while doing all the work in 64-bit Win10, hopefully). If that fails, I might drop down to WinXP and build it there -- which should still be good for running in Win10. But, building is one thing -- testing, packaging, and shipping is quite another. A lot of hours with little reward.

    For me, however, the likelihood of me actually doing this is measured against the fact that the DOS version is feature complete and runs fine in DOSBox. Thus, I have to look to other reasons such as: I like to avoid VMs and emus when possible; and maybe if I do this, and up the res, then maybe someone else will start throwing better textures into it, and maybe see continuous mods like DOOM gets.

    Can't help you with the DAT files but you can often find such tools and guides for the same or similar games if you dig deep enough. One is a text file and the other two appear to be a fairly simple format such as a regular C data file -- but, no idea what any of the numeric fields are for -- best bet on those fields is to dig through the code for comments on them (which is 100x better than trial-and-error that we usually have to resort to).

  13. Question2 commented on Jun 13, 2021

    @Question2
    Author

    @juanitogan : You wouldnt need to build it to get it to work on windows since the windows version runs on win10 anyway. I was thinking more along the lines of being able to modify the source code to change things like unit stats as such, it would add a ton more replayability to the game. Unless theres a better way to do that?

    I couldnt find any tools to unpack or modify old sierra DAT files...i found a tool to unpack DAT files for Arcanum, but it doesnt work for Birthright DAT files.

    Not sure how you would dig through the code. I cant even open the DAT files...they just show up as gibberish in notepad++. What are you using to open them?

    In regards to the original crashing issue, oddly enough, on my latest install of win10, i havent been able to get the game to crash in adventures anymore. Not sure why...i do have environment sounds turned off, not sure if that makes a difference.

  14. juanitogan commented on Jun 14, 2021

    @juanitogan
    Owner

    Turning off the env sounds could very very likely make a difference (crashes due to audio is what started this project) and useful intel to have. Same with new Windows installs and/or different machines.

    I can't help you with DAT files any more than what I've already said. That rabbit hole is entirely up to you. If you don't already know how to decode various data types in binary files, you should probably let it go.

  15. Question2 commented on Jun 16, 2021

    @Question2
    Author

    Lets say i wanted to try compiling the source code. What propgram/settings do i need to do that? Any ideas? Ive never used a c++ compiler before.

    Theres a make.log in the source code that says "WATCOM Make Version 10.6".

  16. 17 remaining items

  17. juanitogan commented on Sep 17, 2025

    @juanitogan
    Owner

    Back to my previous comments. It has occurred to me that I, myself, might not bother learning all the batch files. For example, my personal goal here would be to simply fix the one or two EXE's that need fixing. Thus, I'd focus on only the batch files needed to do that and not worry about building the whole shebang. That is, I'd recompile the EXE's (WINBR and/or NOVA??) and test them by dropping them into a regular install of the retail game.

    Another useful resource on early DirectX versions (and demystifies the many builds of 9.0c):

    Also, I'm not finding the DX5.2 release notes very helpful and don't have as much hope in 5.2 as I did before looking into it. If I'm reading things correctly, 5.2 primarily fixes installs on international computers (and other minor things regarding digital joysticks on NEC computers and old sound drivers). It also adds a couple diagnostic tools: Dxbug.exe and Dxinfo.exe. Surface stuff, not engine stuff. 5.2a seems to be primarily fixes for DX Media... and also not likely not relevant here. I'd probably still test 5.2 but not dwell on it, and quickly move on to DX6/Watcom11/Win98SE or whatever makes sense.

  18. Shiryou commented on Sep 17, 2025

    @Shiryou

    Yeah, my primary goal is recompiling WINBR and NOVA. The game uses BR in DOS, which I need to take a look at, but I think it only bootstraps NOVA. It lost all fonts when I copied my compiled NOVA into the install directory.

    I won't have much time to dig into things until the weekend, but my first goal is to get things compiling using the existing batch files (they mostly pass commands to wmake), document everything I can, and then start verifying that the output is byte-for-byte the same.

    I did try compiling WINBR with DirectX 5.0 SDK, but haven't gotten any further than with DirectX 2 so far. I'm itching to troubleshoot it, but I won't have time until Friday, sadly.

    Another useful resource on early DirectX versions (and demystifies the many builds of 9.0c):

    I actually had that open in a tab, but hadn't had a chance to review it yet. I'll do that during my lunch break.

  19. juanitogan commented on Sep 17, 2025

    @juanitogan
    Owner

    Well, bummer that installing dx5.0 didn't magically work. I took another quick browse over the batch files. I now suspect the ones in the BATCH folder are just the default/skeleton batch files -- possibly mostly written by id and/or Watcom. And that the ones in the root folder are the ones the dev used most. For example, SETPROJ.BAT versus the older BATCH\ADDPATH.BAT tells us he moved his dev env from d:\birthrt\ to n:\.

    If you haven't run SETPROJ.BAT before making then, yes, that's one reason why the Win version doesn't build as that sets envars for DX5 building. Unfortunately, it also calls CWATDOS.BAT and NETCONN.BAT, both of which are not included in the source. Hopefully, CWATDOS is included with Watcom C and NETCONN is just a connection to Sierra's internal fileserver for drive N.

    The batch files give us other clues such as MAKE.BAT is written to work with both 4DOS (wiki) and regular DOS (probably not critical) and also uses the grep command -- which is not a DOS command. Perhaps Watcom installs grep for you... but if not, you should install it yourself to make life with Make easier. Also, it is apparent that MAKE.BAT is usually not called directly but by one of the other Make batch files, depending on what build you want to make (demo, debug, release, etc. -- some of which also call CLEAN.BAT). UPDATE.BAT also offers valuable clues into the build names of the EXEs (and where does sync.exe come from?).

    And, oh, the 3dfx page doesn't give much more info than the Wiki -- as I expect you've already discovered -- it's mostly just an alternate view of the DX versions, and might be of help when approaching DX9. Which, btw, I've been rethinking that building on XP is likely a harder reach than it first appears. It if requires a new memory manager, then I'd likely stop at Win98SE and whatever DX version I can meld it with. (That, or build in XP but in Win98SE mode or something of the sort.)

  20. juanitogan commented on Sep 17, 2025

    @juanitogan
    Owner

    Oh, yes, I also agree that BR.EXE is just the 16-bit launcher for the 32-bit protected-mode NOVA.EXE.

    I've also just learned that N95_REL.EXE = NOVA95.EXE = BRWIN.EXE, and that N95_REL.EXE in the source folder is identical to BRWIN.EXE in the BRWIN14 patch -- so that's even more reassuring all the latest code is here (and didn't change after the 4th patch, since it appears to have been built again 10 days after that patch).

    NOVA_REL.EXE should = NOVA.EXE... but the filesize of the last build of NOVA_REL.EXE in the source folder is way off. Also, NOVA.EXE in BRWIN14 is 27,000 bytes larger than NOVA.EXE in BRDOS13. So I guess this means there was a 1...4 version of the DOS build after all, and that it must include more than just the DX update (it says it does, but very vaguely so and in an abbreviated repeat of 13's fixes).

    I was hoping to see a recent debug build in with the source... but I don't. Let's hope you can build one and see what's what -- or at least get better logs from it.

  21. Shiryou commented on Sep 21, 2025

    @Shiryou

    Anything on the N:\ drive seems to be lost to time as far as I can tell, and the batch files referenced in SETROJ.BAT aren't part of Watcom or anything else that I can find.

    There are some DirectX and Windows header file errors during the compilation of WINBR, so I'm still working through those slowly. In NOVA, (some) fonts are still missing, and the tutorial windows aren't visible. There are no errors in the build. The debug build has some logs, but nothing helpful. I'm pretty sure fonts are loaded from FONTS.RES, which is unchanged.

    There's a DEBUGIT.BAT that contains wd /tr=rsi nova >aux, which gives me Cannot debug a DOS extender application under DPMI 0.9. Use remote debugging. Is that something you're familiar with? I never did much C++ debugging, and this is about 8 years before I started working with C++ at all.

    EDIT: I'm guessing I need to run it with DOS4GW. I'll try that tomorrow.

  22. juanitogan commented on Sep 21, 2025

    @juanitogan
    Owner

    Yeah, I'm not worried too much about the N drive (yet). I see enough references to D drive here and there that I've gone back to thinking D was his primary work drive. Besides, that N drive reference also comes with a reference to "Triple Play"... which is very mysterious to me. Perhaps a long lost dev tool, or a very confusing reference to Triple Play 97, an EA baseball game???

    Anyhow, yeah, it's looking like you're facing some project rot here and it would be nice to see both the original C and D drives and not just the source.

    Personally, I wouldn't worry about debugging DOS builds unless you have some reason to. The focus of this issue is the Windows build. Building the DOS version, yes, of course, is a great test of the source and dev env. Beyond that? I would focus on just Windows. Anyhow, that message is basically telling you that you need a special debugger to debug 32-bit DOS apps (or use a remote debugger). DPMI = DOS Protected Mode Interface = "extended mode" = "enhanced mode" and who knows how many other names. DOS4GW is just an interface between DOS 16- and 32-bit. It's presence is an easy way to identify 32-bit DOS games (but can also be built into the main EXE).

    A debug build of the Windows version is likely only useful after you get things building well. It would ideally give us much more useful error messages when the game crashes. So... debug builds are something to worry about later.

    It is very unfortunate we don't have CWATDOS.BAT. Best clue is that it sets envars for the Watcom C compiler in DOS mode. Why those envars wouldn't already be set from the Watcom install is a mystery. It likely sets several. Thus, I can only guess the dev might change things a bit as he switches between projects. So... hopefully not critical... but dunno. And, as I mentioned before NETCONN.BAT does not sound critical.

    On the other hand, MAKEREL.BAT calls CLEAN.BAT before compiling... which sounds very critical.

    As to C++ itself, I'm not going to be of much help. I've done very little in C and C++. Sure, I can grab some skeleton code in C++, read it, change it, make it work... but it is far from one of my main tools. But C from the ground up? Never. My career has mostly been contract work and, thus, a new tech stack every few months or few years. Thus, I'm good at faking prowess in many languages (they all work more or less the same way) but, as I said, not a lot of that in C, or any of the header-file languages. Although, to be clear, I always told the client what exactly I do and do not know up front... then I'd go off and learn enough overnight to start work and get it done on time.

    As to debugging, I find I don't use debuggers much. Typically, a read through the code is all I need. I've heard of remote debuggers with console dev and such... but don't recall if I've ever spun one up (although, all debuggers are remote, in a way -- it just depends on your point of view of just how separated your dev tools are, I guess). But, again, not an issue until after you get things building.

  23. Shiryou commented on Sep 28, 2025

    @Shiryou

    Finally, an update. I have NOVA95 compiling on Windows 95. I realized that I had misconfigured an include path and was accidentally including 16-bit Windows header files instead of the 32-bit ones.

    In NOVA95, the fonts do work, so that's a good sign! I've played a couple of turns (including a speedrun of the Stormpoint Castle adventure and a quick battle), and it didn't crash.

    Interestingly, despite DEBUG=OFF being set in the batch file, it ended up being a debug build with an FPS counter at the top of the screen.

    Image

    Either way, I can move on to the next step. I'll have to either find a way to extract files from my Windows 95 VM or locate a checksum utility that runs on Windows 95, so I can compare the executables. Then I'll have to see why that FPS counter is there. The file size is a clean 512 bytes bigger, which is interesting.

    As dumb as it may be, I might set up a Windows 7 VM, since that still supports SMB 1 and can run most of the tools I want to use.

    Edit: I just remembered I can mount the VDI file in Windows 11. Will report back tomorrow.

    Edit 2: It compiles on Windows 11!

    Edit 3: I've compared the binary data of the executables. There are small sections of 1-3 bytes here and there that are different (but there's a pattern to them). There are about 512 bytes of something inserted around 0x000852, and the last 84 bytes are null in my compile, but not theirs. I wish I could compare object files and see if it's specific files.

    The compile creates MAP files, which would be useful for tracing the adventure bug, but since the memory addresses are different, I'd have to replicate the issue in my compile.

    Edit 4: Actually, it's about 332 bytes at 0x000852. The other 180 must be further down.

  24. juanitogan commented on Sep 29, 2025

    @juanitogan
    Owner

    Sounds awesome! I was getting curious enough that I was getting very tempted to spend a few hours on this myself since I was sure it was all DOS env stuff (something I know all too well). I'm happy you figured it out and I can worry about other things for now.

    It also sounds like you don't need a diff tool for Win95 any longer but, in case you do, I typically use WinMerge in Windows. According to their site, the last version that supported 95 is 2.12. I've no idea how mature their binary compare was in that version but I would guess it's fine. I believe I've used older versions. Anyhow, find it here it: https://winmerge.org/downloads/?lang=en

    Regarding byte diffs, my first guess is something I noted in a recent update/addendum to the 4th post above (yeah, sorry, not a place that would pop up on your radar -- but likely worth a read of the whole edit above):

    Weirdly, I found an edit in WINSYS\MACHINE.C tagged "12-16-97" (after patch 14) that appears to add some joystick inits. This could party explain why the last build (and many source files) have a file date of 12/19/97 (patch 14 was 12/09/97).

    So, look at that file, plus any others with similar mod dates.

    Re debug, I believe a debug build would be massively larger (due to embedding readable identifiers), so I suspect the FPS counter is appearing due to something else--could be in the code, could be the env, or a test build that is neither debug nor release.

    And, yes indeed, very good news that it compiles in the latest Windows. Same bytes as your Win95 compile, I hope? (I guess, yeah, if the compiler is entirely DOS based, and you point the env to only old Win SDKs, then that makes sense.) I was gonna shortcut Win95 and start with a Win93SE disk I have around here somewhere. But good to know I can probably skip that as well should I ever come to it.

  25. Shiryou commented on Sep 29, 2025

    @Shiryou

    It also sounds like you don't need a diff tool for Win95 any longer but, in case you do, I typically use WinMerge in Windows. According to their site, the last version that supported 95 is 2.12. I've no idea how mature their binary compare was in that version but I would guess it's fine. I believe I've used older versions. Anyhow, find it here it: https://winmerge.org/downloads/?lang=en

    Yes, WinMerge is what I use, too. The binary view is invaluable for these kinds of comparisons.

    Regarding byte diffs, my first guess is something I noted in a recent update/addendum to the 4th post above

    Thanks! That makes sense. I'll take a closer look at those.

    And, yes indeed, very good news that it compiles in the latest Windows. Same bytes as your Win95 compile, I hope? (I guess, yeah, if the compiler is entirely DOS-based, and you point the env to only old Win SDKs, then that makes sense.)

    They're mostly the same. There are some byte differences scattered throughout. DirectX, Watcom, and Windows 95 DDK files were extracted from the exact same ZIPs for both. The differences are also similar to the differences between the Windows 95 compile and the WINBR.EXE from the patch. I'm not used to comparing EXE's at this level, so I don't know if this is common or not.

  26. juanitogan commented on Sep 30, 2025

    @juanitogan
    Owner

    They're mostly the same. There are some byte differences scattered throughout. DirectX, Watcom, and Windows 95 DDK files were extracted from the exact same ZIPs for both. The differences are also similar to the differences between the Windows 95 compile and the WINBR.EXE from the patch. I'm not used to comparing EXE's at this level, so I don't know if this is common or not.

    Bummer there are some diffs between Win95 and Win11 compiles. It shouldn't matter down the road after squashing the bug -- it just makes it harder to know where your starting point is right now. On the other hand, if you release a build that nobody can crash, then, well, maybe you don't really need to find the exact point the 14 patch left off. The reason for its crash may remain a mystery at that point, and so be it. (Personally, I don't like leaving mysteries dangling... but I've learned to let some go.)

    Just to swag it, I'd guess that the 2-4-byte diffs are address changes (jump points, var pointers, whatever) due to some small change causing the compiler to shift addresses/identifiers, such as a new var causing identifier shifts (they tend to get enumerated upon compile) or different versions of the compiler optimizing differently--creating compiled routines of different sizes and/or different order--and, thus, different jump points in and out of them. This is all very typical with small changes to code. That said, I'd expect the Watcom compiler to be entirely deterministic (as any sane compiler is) and, thus, it should be possible to recreate the 14 build and/or some of the other builds left with the source. On the other hand, considering there appears to be at leaset one known code change after the 14 build, whether or not byte accuracy is worth pursuing is entirely up to you right now.

    Hmm, I wonder if CPU type can have an effect on the optimizations of a compiler--even when compiling for the same target? Possible, I suppose--particularly if a CPU has a logic error, but I really wouldn't know otherwise.

    My personal hunch is that only MACHINE.C was changed and that all the other files with newer timestamps were just everything else he had open at the time and weren't really changed. Thus, I'd likely try to revert MACHINE.C to what it might have been before, compile it, compare it, and if I find no new hints or progress in the right direction (filesize, etc), I'd probably call it good enough and move on. That is, then focus on just the reported crash, how to reproduce it, and whether it magically went away or not.

  27. Shiryou commented on Sep 30, 2025

    @Shiryou

    I ran the compile three times on the same system, moving the .obj, .map, and .exe files to a unique folder after each run, then compared them in WinMerge.

    The differences between each compile are all related to the compile time, which is embedded in version.obj, strmake.obj, NOVA95.EXE, and NOVA95.RES.

    Image

    This likely also explains the small groups of bytes that I noticed before. When the hour and minute are different, the difference is 2 bytes. When only the minute is different, then the difference is 1 byte. For some reason, this propagates to approximately 100 changes in the executable.

    Image

    This is used to verify that strdat.dat was created to match the executable. I can only assume this was used to verify WINBR.EXE and strdat.dat are from the same version when they released patches, so that they wouldn't get nonsensical bug reports. I think using a variable in version.cpp would probably have been cleaner. There is already a reminder message in the Makefile process to ensure it was updated.

    If there are two identical executables, it can only be because one of them was copied to the other.

  28. juanitogan commented on Sep 30, 2025

    @juanitogan
    Owner

    Oh, wow, that is nutty! So, uh, I guess that means the compile is only deterministic if you set your clock back. I'm assuming this is a function of the make scripting (or some such weirdness) and not the compiler itself -- since that timestamp appears next to Realm AI and not Watcom.

    That is some good sleuthing work. It sounds correct to me on all accounts. I can see now why the world moved from just version numbers to version+build numbers. Because, yeah, using timestamp as a build number is a headache when you need a deterministic build.

    Anyhow, no matter. :feelsgood: Now that you know which bytes to ignore, you can focus on the rest. :godmode:

  29. Shiryou commented on Oct 6, 2025

    @Shiryou

    I've created a repository for this project now (Shiryou/birp), so you can close this issue if you want. I can continue to update you on the progress here if you'd like, but I'll also continue writing about it on my website.

  30. juanitogan commented on Oct 13, 2025

    @juanitogan
    Owner

    @Shiryou, I leave it in your hands -- you will surely give this more attention than I ever would have. I added some links to your project in all the appropriate places and will now close this. Thanks, but no need to update me here. I know where to find your news and updates should I get curious. That said, feel free to ping me for whatever.

    Also, thank you to everybody else who contributed to prodding this along, and to @Question2 for asking in the first place... 7 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions