News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - llm

#1
Quote from: HerrNove on February 03, 2025, 02:19:37 PMSince I got the attention of the experts, let's try to squeeze some of their knowledge...

Last weekend I wasted a couple of hours by trying to alleviate the memory problems of my program. My plan was
* modify dseg.asm create an extra data segment, called fseg
* move the big containers for the runtime graphics data (polyinfoptr and co.) there
* add an `assume fs:fseg` directive so that the linker can keep using 16-bit pointers. Put some assembly at program start to load the FS register with the fseg segment address

The plan failed, but I think it's because I am not expert enough in assembly programming. In particular, when I put in a C file the assembly fragment to set FS, the Borland compiler complained that FS is not a valid name (this despite me adding the -3 option, that should compile for 386 processors). The linker also complained about "fixup errors"; changing the model to `huge` alleviated that but I think this is wrong since we should be able to keep working with 16-bit pointers.

Ideas are welcome.

thats a hard one,

Quote* modify dseg.asm create an extra data segment, called fseg

that should work if its at the very end - or before stack with some fixes for the stack start

Quote* move the big containers for the runtime graphics data (polyinfoptr and co.) there

1. works only if there are no non-symbolic offsets in the assembler(or C) refering to this data
2. the other (non yours) polyinfoptr and co. using code needs to use then fs instead of ds (or whatever register is use at that point to the segment)

big pain-point with restunts for me was always - there are offsets in the code that are non-symbolic

#2
Quote from: HerrNove on February 02, 2025, 03:07:42 PM
Quote from: llm on February 01, 2025, 03:10:00 PMproblem with IDA is: we used the commercial version of IDA in the beginning and everyone needs to have the same IDA version user with older or freeware versions are not able to open the IDA file

I am a beginner with Ghidra and not so willing to (pirate and) learn a different debugger, so I will be pragmatical: after I cleanup the code I will submit my labelings made with search-and-replace. This will put the .asms out of sync with the IDA database, but one can always adjust that at a later time.

Ghidras support for 16bit DOS segmen/offset stuff etc. is in a very early stage and often buggy

and i think there is no one on this forum who can currently change the IDB besides me :) - maybe dstien is around, clvn is not active for a long time
#3
i've started(with help of others) something similar for porting a different DOS game

its an EXE loader that loads another exe and can hook functions/code in the loaded executeable detouring it to the loader C code

a very early proove of concept but seems to work so far

only the relative exe-image addresses of variables/functions etc. is needed
#4
nice project  :o

Quote from: HerrNove on January 27, 2025, 11:17:58 PM* The renames of the global variables must be performed on the asm code too. I could do it easily with a search-and-replace but it is my understanding that the asm files are somehow generated by IDA Pro, so the clean thing to do would be to update the IDA database. Do you know how the process works?

i helped starting the restunts project (but mainly driven by users clvn/dstien) - i wrote the drvcombiner tool in the src folder

IDA process is: changing the names in IDA + running the src/idc/anders.idc script from IDA - that generates the complete asm code

problem with IDA is: we used the commercial version of IDA in the beginning and everyone needs to have the same IDA version user with older or freeware versions are not able to open the IDA file

i always wanted to change the assembler from Turbo Assembler to UASM or WASM and using a recent linker like WLINK or ULINK - so multi/cross platform builds are esier doable - but never found the time
#5
neuviemeporte's strategy is to reverse the disassembly function by function into C code that produces the same binary code as in the original executable

using the old MSC 5.1 compiler that was originaly used to compile the game (which is the exact same compiler that was used for Stunts)

this strategy is very time consuming and will take easily years to finish - what is typical for reverse projects - for example BladeRunner in ScummVM took more then a decade to finish

the reconstructed C source will be more or less exact the same as the original (except symbol-names, comments, etc.)

based on this C source everything will be possible - porting as is over to other platforms (keeping the software renderer etc.) or replacing the 3d engine with OpenGL, Vulkan, Raytracing... stuff, Resolution changes etc. just everything someone can think of

there is an discord for technical discussion: https://discord.com/channels/819897993624682516/1155564470828007434

#6
Quote from: Daniel3D on November 07, 2023, 03:31:34 PMhttp://anders-e.com/code/browser/restunts/trunk/restunts

i've got a recent svn backup
but i think that xor2003 and Duplodes fork are recent - there wasn't changes in the last years
#7
Quote from: Daniel3D on November 07, 2023, 06:59:33 AMI know nothing about clvn. So impossible to tell for me if he maintains a copy..

last change to the "official" svn server (seems to be down) from clvn is from ~2015
#8
Quote from: dreadnaut on November 05, 2023, 12:50:14 PMI know @dstien put stunpack online, not sure if restunts also exists somewhere.

dstien isn't the initial creator/svn maintainer of restunts - clvn is - so he never controlled the source
#9
Quote from: dstien on July 12, 2023, 01:16:17 PMBrøderbund Stunts 1.0 support

nice!

anything planned for Stressed - also a move to the new github repo, ..., extensions?
#10
Stunts Chat / Re: Combining two tracks into one
June 02, 2023, 05:58:41 PM
Quote from: mrdries on June 02, 2023, 04:01:21 PMI'm using Stressed 0.2.1 now, which is very cool. Though I'm not sure I'm losing a lot of functionality or not.

0.2.1 seems latest so you're not losing anything
#11
Stunts Chat / Re: Combining two tracks into one
June 02, 2023, 12:43:36 PM
QuoteI found the source in the Github. But then I'd have to compile it myself. I'll give that a try.

done that for you: ~6MB, stressed20230602.7z, fresh VS2019 x64 build of the stressed source code, using Qt 5.15.2

https://easyupload.io/pmo3nr
#12
Wow, great Stuff

Do you think it could be possible to export all that information to created a Blender movie from replays?
#13
Quote from: Daniel3D on October 30, 2022, 11:49:25 AMThere are a lot of them (if i read correctly)
Is it possible to redo it while maintaining the labels and comments that are made?

Quotesadly that feature can't be reverted

but i check if there is some other option to revert it
#14
Quote from: llm on October 16, 2022, 03:41:54 PMim currently a little bit confused about the current state of some functions in the asmorig - some of the functions you've showed me are full of unused labels, messing the asm code a little
these labels do not exists if i freshly analyze the current game exe with IDA - need to find out what these labels are for

found the reason for that: IDA got a "Display assembly lines/basic block boundaries" feature for the disassembling - these strange lables get generated if that option is activated - sadly that feature can't be reverted
#15
Cas is correct, i've forgot that detail

so your logic is correct Daniel but the CPU still needs different code