Page 4 of 4

Re: DOSBox Static Addresses

Posted: Wed Apr 08, 2020 6:40 am
by Marc
Many thanks for explaining that, really good to know.
Table works finde, of course - added it to my DOSBox-Template file. :)

Re: DOSBox Static Addresses

Posted: Wed Apr 08, 2020 2:33 pm
by SunBeam
Like I use to tell people.. before the emulator is started break on VirtualAlloc and start from there.

Re: DOSBox Static Addresses

Posted: Sun May 10, 2020 5:19 am
by FitDynamite
daninthemix wrote:
Sun Mar 29, 2020 4:43 pm
Anyone got the base addresses for .74-3 ?
Have been trying to find this too. Couldn't find it anywhere. Ended up finding it myself.

DosBox 0.74-3
Base address: 0193C370

It works for me.

Re: DOSBox Static Addresses

Posted: Sun May 10, 2020 5:38 pm
by mgr.inz.Player
First, you found not a base, you found module offset for multilevel pointer base address.

Anyway, it depends on which memory block game is using for storing some values. 2MB (VideoMemory), 4MB, 16MB.

Usually it is 16MB. Paste this code to addresslist:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
      <Description>"Find and set user symbols"</Description>
      <VariableType>Auto Assembler Script</VariableType>
if syntaxcheck then return end

for i,v in ipairs(enumMemoryRegions()) do
  if v.RegionSize==0x1001000 and v.AllocationProtect==4 then
    unregisterSymbol('GameMemoryStart') registerSymbol('GameMemoryStart',v.BaseAddress+0x20)

Attach CE to dosbox, activate "Find and set user symbols", then just use "GameMemoryStart" symbol.

For example there is table for "Cosmo's Cosmic Adventure 1 V1.20"

Health is pointer with last offset 1FCFC.
With "GameMemoryStart" symbol you can just use GameMemoryStart+1FCFC. It is universal, whatever DOSBOX version you use, it should work.
(at least all DOSBox versions up to this date)

If you really want to use pointers than symbols - you can do pointer scan with max level 1 ( and max offset 128 to speedup scanning even more)
In previous page I showed how to do this for pointers for VideoMemory, you can do the same for for 16MB and 4MB memory blocks.
Right click "GameMemoryStart" and choose "pointer scan for this address", max level 1, like in this screenshot:
(of course you will have different address)

That way, after few pointer rescans, I found pointers to GameMemoryStart (the 16MB memory block):

As you see, there's also a pointer with base address: DOSBox.exe+0193C370 (modulename+moduleoffset)
And moduleoffset is the same as yours.

Re: DOSBox Static Addresses

Posted: Thu May 14, 2020 4:02 am
by FitDynamite
Wow player really know this stuff. Nice post!

Seriously, thanks for your reply. I am new to CE. While I don't really understand 100% what you were trying to say, I definitely am learning a thing or two from your post here.

I was (a lousy) DOS programmer back like 25 years ago. I still remembered video memory starts at 0xa000 address if i'm not mistaken. Text mode starts at 0xb800 or something like that. So I'm a bit confused when you refers to video memory at 2MB, but then again it was a really, really, really long time ago and I don't do programming anymore.

Let me do some serious reading, and hope you don't mind if i have a question or two.

Re: DOSBox Static Addresses

Posted: Thu May 14, 2020 7:06 pm
by mgr.inz.Player
I got a PC when Windows Me was released. Before that I had only C64 :) I didn't do much with programming in DOS - simple tasks in Turbo Pascal 7 (with graph library) and some very basic executable modifications with Hiew 6.50. To sum this up - DOS is not my thing.

GameMemoryStart, VideoMemory, GameOtherMemoryStart those are just names for memory regions allocated by DOSBox. Those names were the first thing which came to my mind.

Code: Select all

So I'm a bit confused when you refers to video memory at 2MB
2MB allocated by DOSBox.

DOSBox Static Addresses

Posted: Tue Jun 16, 2020 5:41 pm
by daninthemix
Okay, this table works on DOSBox if the memsize value is set to 16MB or above.

1) Activate 'find and set symbols', wait until 'GameMemoryStart' gets populated.

2) Find your cheat address

3) Subtract the address of GameMemoryStart from your cheat address, then manually add the cheat value as GameMemoryStart+[offset you calculated in step 2]