VOGONS


First post, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Hello. I have Blood Money (Psygnosis) laying around in all it's 5 1/4" floppy glory. Anyway, today i downloaded it from Underdogs (while I was bored at work) and I discovered it didn't run neither under WinXP's NTVDM or DOSBox. What gives?
After checking around a bit I found the following...

The game is compiled in a weird way. Main executables are BM.EXE and BM.PRG (which I think it's main EXE file in disguise - packed also (CMP) and also using EXEPACK).

Loading BM.EXE as supposed, makes NTVDM freak out with a memory allocation error due to the wonderful EXEPACK 4.00 by Microsoft (someday they will learn to code). Solution: Using Loadfix enables it to run properly. Good.

Run it under DOSBox and it didn't work (even after using Loadfix under DB). First thing I did was to get rid of crappy EXEPACK 4.00, which left the original 2506 bytes BM.EXE to just 1936 bytes (EXEPACK is pathetic). It still doesn't work under DOSBox because blood.prg is packed twice (CMP + EXEPACK). So unless we can unpack it, we are out of luck.

Well, that's what exactly what I did. I somehow merged bm.exe + blood.prg into a new executable. Now it works under DOSBox, but I have lost the intro (referenced by bm.exe which doesn't exist anymore). I am looking now into properly unpacking blood.prg alone.

Last edited by eL_PuSHeR on 2005-08-13, 12:09. Edited 1 time in total.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 1 of 17, by Xian97

User metadata
Rank Member
Rank
Member

I wonder if the .PRG file is the original Atari ST version of Blood Money and they just left it packed in that format when it was ported to the PC. That extension was what the executables on the Atari ST used. You might try checking some ST resources for packing information on that platform since you are trying to unpack blood.prg.

Reply 2 of 17, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

It is possible. Every file seems to be packed (CMP extension).Anyway I got blood.prg unpacked now, but as I have said before, bm.exe calls for intro.cmp (or introvga.cmp) so the title screen is lost forever.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 5 of 17, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++
wd wrote:

And what error do you get? Just crashes?

Works fine here when using loadfix.

"Packed file is corrupt", courtesy of EXEPACK 4.xx

Of course, my uncompressed BLOOD.PRG works fine with DOSBox.
The problem I have is that all files are compressed using some in-house .CMP compression algorithm. Thus, BLOOD.PRG is just an EXEPACKed 4.xx (CMP packed) executable. The problem is that I do not know the algorithm used by that CMP compression. If I knew it (maybe if I would know how to disassemble it), I would extract the original EXE from BLOOD.PRG, then I would remove EXEPACK from it (should be called EXECRAP) and them I would repack it again with its original CMP (and leaving its name as blood.prg). This way, the game would work with title screens.

In a nutshell:

BM.EXE -> Exepack 4.xx (when unpacked it's smaller in size. LAME). It's less than 2KB in size and it's just a loader for intro.cmp - introvga.cmp - blood.prg - There is also some mention for "insert keydisk in drive A: or B:" even if game has no noticeable protection (I know because I have the original)

BLOOD.PRG -> Exepack 4.xx main executable. It's also packed with an in-house CMP compression.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 6 of 17, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> He mentions that loadfix works fine in the NTVDM, but doesn't work in DOSBox

No:
> even after using Loadhigh under DB

loadfix is used to overcome the exepack bugs, not loadhigh
It does not show any error when using loadfix for me.

Reply 9 of 17, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

I think I was misunderstood since my first post. AS IS, Blood Money DOESN'T WORK under DOSBox or any CVS (at least for me). Remember that I have both the original (which doesn't work) and an unpacked version I made (which now works flawlessly under DOSBox). You NEED to unpack BLOOD.PRG (what I did, losing loading screens by the way) for making it run under DOSBox. What I was trying to do now is unpack->repack it without EXEPACK (that's what makes DOSBox fail) for keeping everything intact.
Right now, this isn't possible. What I don't understand is why it works under NTVDM (after removing BM.EXE EXEPACK - even if BLOOD.PRG remains with it) using LOADFIX.

Using LOADFIX under DOSBox seems to be carried out when an executable LOADS (invokes) a different one.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 10 of 17, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Using LOADFIX under DOSBox seems to be carried out when an executable LOADS (invokes) a different one.

No, it allocates a memory block so all further loaded programs,
be it loaded from the command line or from within another
program, have their load segment higher (exepack can't handle
load segments that are too low, which is the case when you
have much memory free).

Reply 11 of 17, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I attached the unpacked executable [removed it now].
There was nothing like exepack, just the custom compression.

Still i'd like to know what error you get when starting the
original game with "loadfix bm", and when (before/after
the intro etc.)
If it is the same error as when started by just "bm"
please note this.

Last edited by wd on 2005-08-14, 15:39. Edited 1 time in total.

Reply 12 of 17, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Thanks for your efforts. In the end I found I was doing something VERY WRONG (it seems i specified some invalid parameter for loadfix which unloaded it). The game works just fine under DOSBox 0.63 but you need to use loadfix before running it. And it also seems that EXEPACK doesn't have nothing to do. It doesn't matter whether the main executable (bm.exe) is unpacked or not. If you do not use loadfix inside DOSBox, it will close after showing the title screen. Just type in LOADFIX at the DOSBox prompt and you will be fine. 😎

Again, my humble thanks.

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 13 of 17, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I wonder if it would be possible for functionality to be added to DOSBox to make it detect these executables that need LOADFIX when you try to run them, and then to compensate automatically?

Reply 14 of 17, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You can't detect if something needs loadfix (see Wing Commander2
or this game). Was thinking some time ago about adding a small
loadfix-block by default, so most games run without the need for
loadfix itself. As the memory startsegment has already been raised
lately, this wasn't added.
Blood Money needs an 8kb loadfix block, would this be acceptable?
(meaning you have only 625kb low dos memory free by default)
It's a bit too much i think...

Reply 15 of 17, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

I prefer leaving the most of conventional memory free as possible and use LOADFIX when needed. We are just turning into lazy bastards. 😁

Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
8 GB GeForce GTX 1070 G1 Gaming (Gigabyte)

Reply 17 of 17, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Yeah I wouldn't worry about it. I just thought it would be nice to be lazy it could be done automatically with no downside, but it doesn't look worth it. Thanks for putting some thought into it and aswering my question 😀