VOGONS


Reply 2400 of 2838, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

You can try DOS32/A this is free realization of DOS4GW if it's works with Icr2, than must be little easier to do something as dos32/a have source code and even debugger

https://github.com/open-watcom/open-watcom-v2 … d/redist/dos4gw
Documentation

https://github.com/open-watcom/open-watcom-v2 … discussions/193
Discussion about getting source

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 2401 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
RaVeN-05 wrote on 2025-02-23, 09:22:
You can try DOS32/A this is free realization of DOS4GW if it's works with Icr2, than must be little easier to do something as do […]
Show full quote

You can try DOS32/A this is free realization of DOS4GW if it's works with Icr2, than must be little easier to do something as dos32/a have source code and even debugger

https://github.com/open-watcom/open-watcom-v2 … d/redist/dos4gw
Documentation

https://github.com/open-watcom/open-watcom-v2 … discussions/193
Discussion about getting source

Thanks dude, will try it when I get back to my pc.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2402 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t

Game runs with Dos32-A. Still doesn't accept large heap sizes.

[EDIT] Time to trawl through the source.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2403 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t

Ok, I built Dos32-A from source and my test app can allocate more than 64 MB RAM just fine.

ICR2 seems to run even without a Dos4GW.exe in the folder. I wonder if it's embedded in the game somehow. Placing a Dos4GW (with Dos32A) seems to have no effect, it seems to be using the same version of Dos4GW always.

It doesn't seem to be in the path or anything.

[EDIT] RR.exe appears to run just fine with Dos32A. ICR2 seems to have its own copy.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2404 of 2838, by robertmo3

User metadata
Rank Oldbie
Rank
Oldbie

to force a different dos4gw for an application that already has dos4gw builtin:
you do it this way:
dos4gw.exe app.exe

Reply 2406 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
robertmo3 wrote on 2025-02-24, 07:45:

to force a different dos4gw for an application that already has dos4gw builtin:
you do it this way:
dos4gw.exe app.exe

Is there a fix for this?

V:\CR>dow4gw cart
Illegal command: dow4gw.

V:\CR>dos4gw cart
DOS/32A -- Protected Mode Run-time Version 7.35
Copyright (C) Supernar Systems, Ltd. 1996-2005
DOS/32A fatal (3006): exec format not supported in file "cart.exe"

[EDIT] I'll try embedding it.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2407 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
robertmo3 wrote on 2025-02-24, 08:28:

and here is how to do it permanently
https://www.dosbox.com/wiki/TOOLS:DOS32A

It locks up after embedding it. I'll do a disassembly dump to see what's up with it.

[EDIT] They persist even with the unpatched EXE off the CD.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2408 of 2838, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

Some minor idea which works for me sometimes.
Compile unmodified dos32a, preserve it.
Compile modified dos32a, preserve it.
Compare both dos32a versions.
Comparison shows how far you should modify assembly code.
And even possible those modifications to apply to dos4gw.
By carrying in hex editor modified bytes or by carrying directly in assembly mode.
Like olly debugger can edit exes assembly directly.

Another try can be a dos4gw to update from last version, maybe Icr2 uses earlier version.

Try unmodified official last build of dos32a with Icr2, does it work?

Last edited by RaVeN-05 on 2025-02-24, 09:25. Edited 1 time in total.

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 2409 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t

The game seems to die after being launched[EDIT], being stuck in a keyboard interrupt loop:

Int 21h, function 0x4B is run app.
In a fully functional run Int 21h, function 0x4A is called to resize dos memory right after startup.
[/EDIT]

file open command 80 file V:\CR.BAT
Int 10h WriteChar V
Int 10h WriteChar :
Int 10h WriteChar \
Int 10h WriteChar C
Int 10h WriteChar R
Int 10h WriteChar >
Int 10h WriteChar c
Int 10h WriteChar a
Int 10h WriteChar r
Int 10h WriteChar t
F000:000020C6 int 21
F000:000014A0 sti
F000:000014A1 callback 0025 (DOS Int 21)
file open command 0 file cart.EXE
F000:000014A6 retf
047C:00002EDC inc ax
047C:00002EDD jb 00000603 ($-28de) (no jmp)
047C:00002EE1 mov [34B8],esi ds:[34B8]=2632F8A1
047C:00002EE6 mov edx,ebx
047C:00002EE9 call 00002FA0 ($+b4)
047C:00002FA0 call 00000CF8 ($-22ab)
047C:00000CF8 push bx
047C:00000CF9 push ds
047C:00000CFA push gs
047C:00000CFC pop ds
047C:00000CFD mov bx,cs:[3470] cs:[3470]=0000
047C:00000D02 mov ah,3F
047C:00000D04 int 21
F000:000014A0 sti
F000:000014A1 callback 0025 (DOS Int 21)
F000:00002084 int 16
F000:000011E0 sti
F000:000011E1 callback 000F (Keyboard)
Last edited by sharangad on 2025-02-24, 09:41. Edited 2 times in total.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2410 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
RaVeN-05 wrote on 2025-02-24, 09:21:
Some minor idea which works for me sometimes. Compile unmodified dos32a, preserve it. Compile modified dos32a, preserve it. Comp […]
Show full quote

Some minor idea which works for me sometimes.
Compile unmodified dos32a, preserve it.
Compile modified dos32a, preserve it.
Compare both dos32a versions.
Comparison shows how far you should modify assembly code.
And even possible those modifications to apply to dos4gw.
By carrying in hex editor modified bytes or by carrying directly in assembly mode.
Like olly debugger can edit exes assembly directly.

Another try can be a dos4gw to update from last version, maybe Icr2 uses earlier version.

Try unmodified official last build of dos32a with Icr2, does it work?

This is an umodified Dos32A compiled by me. I'll try the original binary distribution.

[EDIT] I made a mistake when testing it earlier. The original Dos32A version also seems to be able to allocate more than 64 MB of RAM.

The last official build of dos32a when run as dos32a cart.exe also fails with the error I listed previously.

[EDIT] I wonder if the game carries out a checksum verification on dos4gw.exe.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2411 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t

If you compare the disassembly trace, I think the entry point is messed up:

[EDIT] The two file open commands are there because the older dumps patched the game.

file open command 80 file V:\CR.BAT
Int 10h WriteChar V
Int 10h WriteChar :
Int 10h WriteChar \
Int 10h WriteChar C
Int 10h WriteChar R
Int 10h WriteChar >
Int 10h WriteChar c
Int 10h WriteChar a
Int 10h WriteChar r
Int 10h WriteChar t
F000:000020C6 int 21
F000:000014A0 sti
F000:000014A1 callback 0025 (DOS Int 21)
file open command 0 file cart.EXE
file open command 1 file cart.EXE
F000:000014A6 retf
0361:00002382 mov di,01A4
0361:00002385 mov ss,di
0361:00002387 add sp,120E
0361:0000238B mov si,0361
0361:0000238E sub si,di
0361:00002390 mov ax,si
0361:00002392 mov cl,04
0361:00002394 shl ax,cl
0361:00002396 dec ax
0361:00002397 mov ss:[0CE6],ax ss:[0CE6]=0000
0361:0000239B mov ss:[0CDC],sp ss:[0CDC]=0000
0361:000023A0 mov si,10CC
0361:000023A3 inc si
0361:000023A4 mov [0002],si ds:[0002]=9FFF
0361:000023A8 mov bx,es
0361:000023AA sub bx,si
0361:000023AC neg bx
0361:000023AE mov ah,4A
0361:000023B0 int 21
F000:000014A0 sti
F000:000014A1 callback 0025 (DOS Int 21)
F000:000014A5 iret
0361:000023B2 mov ss:[0CEC],ds ss:[0CEC]=0000
0361:000023B7 push ss
0361:000023B8 pop es
0361:000023B9 cld
0361:000023BA mov di,1186
0361:000023BD mov cx,1210

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2413 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
RaVeN-05 wrote on 2025-02-24, 09:41:

Sounds like it may fails because of patches?
Might be, as dos32a can load to different membase, and on fly patches actually modifies wrong things.

I've disabled all patching in the failed run.

I think the startup is corrupted, it jumps to the wrong address.

I'll have a look at the source for sb.exe and dos32a.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2414 of 2838, by RaVeN-05

User metadata
Rank Oldbie
Rank
Oldbie

In the worst scenario
Need to find exactly same version of DOS4GW Icr2 uses, and reverse engineer?
For example IDA Pro is disassembler/decompiler/and great too for reversing. This organize asm code inro formatted blocks, which makes code more readable. It can load 16bit dos apps, realmode with dosbox plug-in, special edition, unfortunately not supports protected mode. As I understand dos4gw runs in real mode and runs app inside of it in protected mode?
Protected dos apps also can be opened in IDA Pro, as LE executable, works great only major limitation is unability to execute it.

https://www.youtube.com/user/whitemagicraven
https://go.twitch.tv/whitemagicraventv

Reply 2415 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
RaVeN-05 wrote on 2025-02-24, 10:02:
In the worst scenario Need to find exactly same version of DOS4GW Icr2 uses, and reverse engineer? For example IDA Pro is disass […]
Show full quote

In the worst scenario
Need to find exactly same version of DOS4GW Icr2 uses, and reverse engineer?
For example IDA Pro is disassembler/decompiler/and great too for reversing. This organize asm code inro formatted blocks, which makes code more readable. It can load 16bit dos apps, realmode with dosbox plug-in, special edition, unfortunately not supports protected mode. As I understand dos4gw runs in real mode and runs app inside of it in protected mode?
Protected dos apps also can be opened in IDA Pro, as LE executable, works great only major limitation is unability to execute it.

Is Ida Pro the free DOS version?

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2416 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
RaVeN-05 wrote on 2025-02-24, 10:02:
In the worst scenario Need to find exactly same version of DOS4GW Icr2 uses, and reverse engineer? For example IDA Pro is disass […]
Show full quote

In the worst scenario
Need to find exactly same version of DOS4GW Icr2 uses, and reverse engineer?
For example IDA Pro is disassembler/decompiler/and great too for reversing. This organize asm code inro formatted blocks, which makes code more readable. It can load 16bit dos apps, realmode with dosbox plug-in, special edition, unfortunately not supports protected mode. As I understand dos4gw runs in real mode and runs app inside of it in protected mode?
Protected dos apps also can be opened in IDA Pro, as LE executable, works great only major limitation is unability to execute it.

Trying to run Whiplash with Dos32A bring up the Dosclient window and then:

V:\WHIP>v:\cr\dos32a rwhip
DOS/32A -- Protected Mode Run-time Version 7.35
Copyright (C) Supernar Systems, Ltd. 1996-2005
.000.000.000.000.000.000.000.000.000.
ACCELERATED FOR THE RENDITION CHIPSET
.000.000.000.000.000.000.000.000.000.
Press a key ...
Initialising MIDI device A002 ... OK
Loading Instrument bank file ... OK
Loading Drums bank file ... OK
Initialising DIGI device E016 ... OK
Unable to open texture map data file iplogo.bm

DOS/32A warning (9003): real mode interrupt vector has been modified: INT 00h
DOS/32A warning (9003): real mode interrupt vector has been modified: INT 24h

V:\WHIP>

[EDIT] Rebel Moon runs with Dos32A, as does Tomb Raider. I'm sure many more of them will run. ICR2 seems to be the odd man out.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2417 of 2838, by robertmo3

User metadata
Rank Oldbie
Rank
Oldbie

run:
Rebel Moon
Descent II
Tomb Raider

don't run:
EuroFighter 2000
CART Racing
NASCAR Racing II
Scorched Planet

not a dos4gw game:
Quake

Reply 2418 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t
robertmo3 wrote on 2025-02-24, 10:36:
run: Rebel Moon Descent II Tomb Raider […]
Show full quote

run:
Rebel Moon
Descent II
Tomb Raider

don't run:
EuroFighter 2000
CART Racing
NASCAR Racing II
Scorched Planet

not a dos4gw game:
Quake

I'm guessing the ones that don't run use an embedded dos4gw, apart from quake.

[EDIT] Yup, the ones that don't run have embedded dos4gws, apart from vquake which doesn't use it and whiplash which is just plain incompatible.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda

Reply 2419 of 2838, by sharangad

User metadata
Rank l33t
Rank
l33t

In fact cart.exe itself can't be run using its own dos4gw from the command line. It *has* to use the built in version.

Developer of RReady - Rendition Verité Wrapper.
https://www.youtube.com/@sharangadayananda