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

Topics - llm

#1
does someone builds the repldump-orginal (not repldump) without errors?

for me using the same environment like for restunts/restunts-original it fails


        cd ..
        cd repldump
        if exist makefile make /DTARGET=original
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
        bcc /c /u- /mm /v /nbuild\original /DRESTUNTS_DOS /DRESTUNTS_ORIGINAL -I../c  repldump.c
Borland C++ 5.2 Copyright (c) 1987, 1997 Borland International
Mar 19 1997 17:29:40
repldump.c:
Warning repldump.c 122: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 125: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 131: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 134: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 143: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 146: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 149: Suspicious pointer conversion in function init_trackdata
Warning repldump.c 204: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 208: Call to function 'init_main' with no prototype in function stuntsmain
Warning repldump.c 209: Call to function 'init_div0' with no prototype in function stuntsmain
Warning repldump.c 212: Call to function 'file_load_resfile' with no prototype in function stuntsmain
Warning repldump.c 212: Nonportable pointer conversion in function stuntsmain
Warning repldump.c 214: Call to function 'file_load_resource' with no prototype in function stuntsmain
Warning repldump.c 214: Nonportable pointer conversion in function stuntsmain
Warning repldump.c 215: Call to function 'file_load_resource' with no prototype in function stuntsmain
Warning repldump.c 215: Nonportable pointer conversion in function stuntsmain
Warning repldump.c 222: Call to function 'init_unknown' with no prototype in function stuntsmain
Warning repldump.c 224: Call to function 'init_kevinrandom' with no prototype in function stuntsmain
Warning repldump.c 226: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 227: Call to function 'file_load_replay' with no prototype in function stuntsmain
Warning repldump.c 228: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 231: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 233: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 242: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 244: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 245: Call to function 'track_setup' with no prototype in function stuntsmain
Warning repldump.c 246: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 248: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 250: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 252: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 253: Call to function 'init_game_state' with no prototype in function stuntsmain
Warning repldump.c 254: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 258: Call to function 'get_kevinrandom' with no prototype in function stuntsmain
Warning repldump.c 266: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 267: Call to function 'setup_player_cars' with no prototype in function stuntsmain
Warning repldump.c 284: Call to function 'restore_gamestate' with no prototype in function stuntsmain
Warning repldump.c 285: Call to function 'restore_gamestate' with no prototype in function stuntsmain
Warning repldump.c 286: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 295: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 299: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 302: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 306: Call to function '_printf' with no prototype in function stuntsmain
Warning repldump.c 310: Call to function 'update_gamestate' with no prototype in function stuntsmain
Warning repldump.c 315: Call to function '_printf' with no prototype in function stuntsmain
Fatal: '..\c\build\dos\fileio.obj' does not exist - don't know how to make it

** error 1 ** deleting repldump-original

someone fixed that problem already?
#2
using latest VS2022/x86 + SDL1 libs/includes are found (sitting under src/sdl)
but the build fails with some errors

im a long time (>20 years C/C++,... developer) so im normaly knowing very well what im doing - but i never built that project before

S:\src\restunts>make restunts-sdl
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
        cd sdl
        if exist makefile make
MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
        cl /MD /c /EHsc /Is:\src\sdl\include /I../c /DRESTUNTS_SDL /Zi /Fobuild\main.obj main.cpp
Microsoft (R) C/C++-Optimierungscompiler Version 19.43.34808 für x86
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

main.cpp
S:\src\restunts\c\math.h(56): error C2143: Syntaxfehler: Es fehlt "," vor "*"
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(24): error C2039: "fabs" ist kein Member von "`global namespace'".
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(24): error C3861: "fabs": Bezeichner wurde nicht gefunden.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(28): error C2039: "fabsf" ist kein Member von "`global namespace'".
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(28): error C3861: "fabsf": Bezeichner wurde nicht gefunden.
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(32): error C2039: "fabsl" ist kein Member von "`global namespace'".
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include\cstdlib(32): error C3861: "fabsl": Bezeichner wurde nicht gefunden.
S:\src\restunts\c\shape3d.h(42): error C2732: Bindungsangaben widersprechen vorheriger Angabe für "polarAngle"
S:\src\restunts\c\shape3d.h(42): note: Siehe Deklaration von "polarAngle"
main.cpp(192): warning C4838: Konvertierung von "unsigned int" zu "long" erfordert eine einschränkende Konvertierung
main.cpp(221): warning C4838: Konvertierung von "int" zu "char" erfordert eine einschränkende Konvertierung
main.cpp(222): warning C4838: Konvertierung von "int" zu "char" erfordert eine einschränkende Konvertierung
main.cpp(377): warning C4838: Konvertierung von "int" zu "short" erfordert eine einschränkende Konvertierung

** error 2 ** deleting build\main.obj

** error 1 ** deleting restunts-sdl

S:\src\restunts>

someone got a working build and can tell me what to do? what compiler version is used?
in the make file is cl called (i think the microsoft cl.exe compiler) - but i don't know
if that initally was a very old version or something

#3
https://github.com/xor2003/masm2c/issues/10#issuecomment-1037026893

QuoteFor example I already ported Test drive 3...
#4
Reverse engineered and C ported MT15.DRV (MT32-Sound-Driver) of Stunts 1.0 and 1.1


  • Assembler source can be rebuild to 100% binary exact version of the original
  • Assembler can be partially mixed with C ported functions or all functions can be replaced by C code

Reason for doing it:

Stunts 1.0 MT15.DRV seems to sound better than the 1.1 version (some strange slowdowns happen)
i just wanted to understand what the differences are and how to port that stuff to C

Result: the timing code is different - but only some lines of assembler nothing big

https://github.com/LowLevelMahn/UnifiedMT15
#5
Stunts Modification Projects / Growing a new branch
December 03, 2021, 08:18:41 AM
did you already used the #ifdef define/conditional assembling stuff for these changes?
and are you a git crack now? :)
#6
https://www.reddit.com/r/REGames/comments/qmqq3g/systematic_method_to_reverse_engineer_and_rewrite/

We could do something similar with a dosbox backend, istead of reversing all in a dos environment its possible to replace parts of the code with full 32/64bit c code, until the point everything is ported
#7
MD15.DRV "Versions" in several DSI games


Game                                   ~Release    Filesize MD5

Stunts 1.0                             11.10.1990  1667     7048D28F2A0FE8C8C09141D5C89706DB <- Part of my Reversed-MT15.DRV Projekt
4D Sports Boxing 1.0                   05.10.1990  1667     7048D28F2A0FE8C8C09141D5C89706DB
Bill Elliotts Nascar Challenge         ~1991       1667     7048D28F2A0FE8C8C09141D5C89706DB
Stunts 1.1                             ~1991       1750     ACC5D03D038F1EF0AFA0CF4DCAD72EF9 <- Part of my Reversed-MT15.DRV Projekt
4D Sports Boxing 1.1                   22.04.1991  1788     B17BBC19ED37C9413DD68E20D4D9848F - Sounds correct with Stunts!
Mission Impossible                     22.04.1991  1788     B17BBC19ED37C9413DD68E20D4D9848F - Sounds correct with Stunts!
World Tour Tennis                      ~1993       1789     53F6BCAEBC097893868C69CE994A3321 - Sounds correct with Stunts!
4D Sports Tennis                       03.03.1992  1789     53F6BCAEBC097893868C69CE994A3321 - Sounds correct with Stunts!
Michael Jordan in Flight               21.12.1992  1813     372ED87FEE4FB0762D2531DC8BB34337 - Sounds correct with Stunts!
The Simpsons: Barts House of Weirdness ~1991       1982     8326A348DCC756EEB77466AD53F742EA - Sounds correct with Stunts!


would be interesting to check:
-what are the additional bytes in the other versions (more Data, more Code?) i thinks mostly timing code differences (primary bug source)

btw: nearly equal size does not mean small differences
#8
http://wiki.stunts.hu/index.php/Game_versions

i try to find ORIGINAL floppy images of all the Stunts versions

Brøderbund versions (referred to as BB versions)
  Stunts 1.0 (05 Oct. 1990)
  Stunts 1.1 (12 Feb. 1991)

Mindscape versions (referred to as MS versions)
  4D Sports Driving 1.1 (13 Dec. 1990)
  4D Sports Driving 1.1 (25 Feb. 1991)

there are several download pages with images - but sometimes complete without version info or partially cracked etc.

anyone with the pure unmodified floppy images around?

for my reverse engineering fun projects
#9
my MT15.DRV reverse engineering project goes very well - when i find free time to work on it :)

DONE:

  • fully disassembled Stunts 1 and 1.1 MT15.DRV with script based building and binary comparison to original drivers - producing 100% identical drv files
  • build flags to keep the drvs binary compatible or to allow remove of dead code/data etc.
  • C/asm stubs, my base for the C port - does mimic the original drv layout for beeing loadable - also builded with scripts

i've found some functions that are not in use (dead code) in both drv versions, and init data that is also not used
its very relevant for the C port to test these "cleaned-up" versions if there is anything strange happen (both work on my side so far)

attached are the re-assembled versions without the dead code/data stuff
anyone interested in testing?

NEXT:

  • more analyse of the parameter/data-segment dependencies in the functions, use constants for Port/IO/MPU401 port accesses, more documentation
  • combine the two driver versions into one asm source - with a flag to switch between versions - but still 100% identical drv files in the end - for history preserving reasons :)
  • port that old dirty asm over to C - at this point only function identical - binary equality is hard to reach using a C compiler
  • understand the known bug in the 1.1 version
  • port the other drivers also this way

im using Dosbox Staging for testing - the lastest development version integrates the MT32 stuff so its easier to get it going
download the alpha here if you got a github account: https://dosbox-staging.github.io/downloads/devel/ (clicks windows link and the the bottom dosbox-staging-windows-x64-v0.77.0-alpha-856-g2e93f file)

your dosbox staging config should then contain

[midi]
mididevice=mt32

[mt32]
romdir=rom-dir #  use the mame roms
model=mt32_old # for original stunts release version of MT32
#model=cm32l_102 # or the new one
#11
examples:
"What is the title of track #216?"
"Who won season 2017"

i have no idea how to solve such questions... maybe a little bit too strong for interested people
#12
its some sort of Dosbox but based on Fake86 (http://sourceforge.net/projects/fake86/) and only able to emulate the environment enought to run stunts

the zip contains 3 files

game_pc.exe - the 16bit dos game, build with clvn's execombiner and my own sound driver integration tool for pc-speaker sound
stuntsvm.exe - executes/emulates game_pc.exe
SDL.dll - for Keyboard/Mouse/Gfx (https://www.libsdl.org/)

copy these into your stunts directory (where the tracks, sound and others files are - but make a backup before) and run stuntsvm.exe

what can you do with stuntsvm - test and play - for me its the base of my statical recompilation ideas for stunts



#13
i've installed stunts under

latest fake86 (http://sourceforge.net/projects/fake86)
DosBox 0.74 (dosbox.com)
VMWare Player 7 + MsDos 6.22

and i've get different start positions when just starting the game and fo directly to race

fake86/VMWare showing equal start screen, dosbox a different

why is that - is it a bug?
#14
i talk about the exe result of clvns execombiner - so no code modification

i don't know if it is a known problem also with unmodified stunts - but i get sometimes (svn version) dosbox debuger illegal instruction breakdowns
or my vmware player (v6) totaly crashed with illegal instructions message

it mostly happens when you start a race and directly crash into a wall - anyone else got this problem (very rare)?
#15
i've developed a tool that combines the stunts game.exe with the ad15.drv (adlib/soundblaster) driver (but pc15.drv is also possible)
parts of the game getting patched for disableing the driver (un)loading

why (still same reasons):
-for fun
-reduce the amount of runtime loaded code down to 0% (hope that is reached now) - IDA likes it more then :)

seems to work perfectly - someone want to try?

just copy the attached game_drv.exe into your stunts1.1 directory and start without commandline parameters


#16
i've developed a small C/C++ program that attaches the ad15.drv to the stunts game exe

how is it done:
-attached block of 0x00 in size of former uninitialized data to image
-attach drv code
-add new entry for driver-ptr adjust to relocation table
-change position of stack
-change header sizes

result:

IDA can now fully analyse the code of the sound driver in new seg042 :)

why:
1. just for fun
2. reduce the amount of runtime loaded code further (should be now down to 0%) - so IDA can work better
3. just the next step to my 16bit->32/64bit translation idea


but ... BIG TODO - thats why i named the post "first steps..."

1. fix stunts crash "memory manager - BLOCK NOT FOUND at SEG=37eb" at startup - does the stunts code rely more on the image layout then i thought?
2. patch the driver loading code that the attached code is used instead of runtime loading

clvn, dstien, w4kfu - please help... :)
#18
(this is my first "try" of getting into reverse engeneering the game)

i just found out that load.exe is exepacker based
and can be easily uncompressed with UNP (in zip-archive \unp412b)

and i reduced the normal stunts11 package to the minimal amount of files
(data and "executables") needed to run the game (without the anti-password-crack, setup stuff)
so its easier to use an debugger or disassembler (http://www.hex-rays.com/idapro/idadownfreeware.htm) on it
and the dosbox debugger could also help: http://vogons.zetafleet.com/viewtopic.php?t=3944

in the load.asm file is an first-shot-listing from ida freeware

just use start.bat to start the game - happy opcode extracting