Forums

Full Version: Magic addresses
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Others include 0x5028 for changing horizontal texture coordinate multiplier (every DOS game uses this and even a few Windows games)
0x5029 for vertical tc multiplier. These two don't appear to be used in ghidra's disassembly.


0x1000 Set Source Texture Base
0x1004 SetDestinationBase to set the rendering destination to either the framebuffer or a texture. (This does appear in the game).
0x4000 Set current texture (also used for the audio subsystem as a sampling rate)

Maybe @checkpoint10 and OpenAI can make better sense of these values.
This looks like a view distance (EDIT: or some kind of modulus to bring a value that's greater than 600,000 back into a sub 600,000 range by repeated subtraction[/EDIT[):
0003d87c 8b 35 bc MOV ESI ,dword ptr [DAT_000f15bc ]
15 0f 00
0003d882 89 c2 MOV EDX ,EAX
0003d884 a1 20 be MOV EAX ,[DAT_000ebe20 ]
0e 00
0003d889 05 c0 27 ADD EAX ,0x927c0
09 00
0003d88e 39 f0 CMP EAX ,ESI

0x927c0 = 600,000 is a magic number that keeps popping up again and again. I did mess with it, replacing all know occurrences (which was silly) and the world disappeared in the Riverside track after a while.

[EDIT2] Doubling all 21 occurrences of this value causes the world to disappear at the end of the stock Australia track. Halving it has no effect. I'm still convinced this is view distance. It's also compared against 0x60000000 and 0x40000000.
[EDIT3] Might be MIP map detail distnace ranges.
DOS32A EXE
FUN_0005cd64 has the transformation for the cars. I can get cars to rotate vertically by adjusting some of these parameters.
Address 98BCA 0x40000000 camera vertical scaling of some sort making it higher will make the cars zoom up vertically and lower will sink the cars below ground and affect scaling of player car. [Translation]
98C4C 0x00002000 another rotation parameter [rotation]

[EDIT] The rest has to be here somewhere.
[EDIT2] Following the camera offset it's possible to do this:
[Image: ICR2.Rotation.png]

This is fairly useless, but it highlights two things. First the rotation affects only the cars and not the world.  Secondly there doesn't appear to be any sort of scaling going on here.
Scaling appears to uniform both horizontally and vertically and only affects cars:
[Image: ICR2.Scaling.png]


I would guess the same parameters are used for the world as well, so tweaking them in every single location should fix it. Vertical scaling would have to be different.
That one with the rotation was funny. Keep up the great work!
(08-04-2025, 03:49 PM)checkpoint10 Wrote: [ -> ]ICR2Edit 0.5.2 - small update to allow signed integers. And editable in-car camera position (for the Rendition DOS32A version)!!!

[Image: attachment.php?aid=2450]
Binary: https://skchow.com/icr2/icr2edit/icr2edit_0.5.2.zip

Github: https://github.com/skchow03/icr2edit
A quick question, are those in game units or something else? I mean with 1 mile =  316800.
(08-12-2025, 08:22 PM)sharangad Wrote: [ -> ]
(08-04-2025, 03:49 PM)checkpoint10 Wrote: [ -> ]ICR2Edit 0.5.2 - small update to allow signed integers. And editable in-car camera position (for the Rendition DOS32A version)!!!

[Image: attachment.php?aid=2450]
Binary: https://skchow.com/icr2/icr2edit/icr2edit_0.5.2.zip

Github: https://github.com/skchow03/icr2edit
A quick question, are those in game units or something else? I mean with 1 mile =  316800. [EDIT][Actually I can test this.
Yes, 1 mile is 3168000 in so called 'Papy' (Papyrus) units. This units are used in most games by Papyrus.
1 Papy unit = 1/500 inch. So one mile is 31680000.
Thanks guys!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26