 |
 |
GoldenEye 007 Nintendo 64 Community, GoldenEye X, Nintendo 64 Games Discussion GoldenEye Cheats, GoldenEye X Codes, Tips, Help, Nintendo 64 Gaming Community
|
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
zoinkity 007


Joined: 24 Nov 2005 Posts: 1729
 |
Posted: Fri Jan 08, 2010 8:34 am Post subject: Memory String Mayhem |
 |
|
Memory strings are capable of a lot more than we given them credit. First, so we're all on the same page, here's the basic types, in the order they are set. Note that the numerical value is converted to hex and multiplied by 0x400 to set the actual amount of memory.
Code: | -ma general allocation -> 800241B0
-mgfx microcode and viewport -> 800482E0+(#players*4)
-mvtx vertices tables -> 800482F0+(#players*4)
-mt textures (facemapper bank) -> 80049170 8008C720 |
-ma sets the base memory allocation. -mgfx is used for all the level microcode and anything generatd at runtime, such as the menus, explosions, text, skies, etc. -mvtx is for the vertex tables used in stages or by said generated stuff, although quite honestly most generated code doesn't use vertex tables.
-mt is your general texture allocation, used by menus, stages, or anything else that the facemapper can view. It doesn't include the textures for 1st person models. As mentioned before these numbers are multiplied by 0x400 to set the size. You can calculate the size of the texture bank needed by adding the decompressed size of all the images + 0x18 for each entry to account for the endDL op and the image entry in the table. Divide that by 0x400 and convert to decimal, then maybe add a few extra to account for anything unexpected. NSNA's menus needed 666 minimum to load all the extra stage select images and whatnot, which meant the original value was 20 short. Menu graphics should now be fixed.
+_+
Now, the strings are parsed by a sort of strtok() function. They look for spaces, and each segment must be divided by spaces and in the general C-string format. The first instance of the codewords above are searched for, the numeral following them converted to a long.
Besides these codewords, though, are a slew of other possible codewords. These can either be embedded in the memory string or set to the same memory location as the string then reparsed. Some were parts of debug features, and some were added in so they could quickly set up a stage or scenario and test it out.
For instance:
Code: |
-level_## sets the level#. Must be 2 digits in decimal (09, for instance)
-hard# sets the difficulty to 0-3 (agent-007). Must be exactly 1 digit.
-nochr disables characters
-noobj disables objects
-noprop disables all props
|
There's also a few other memory types:
Code: |
-me# memory-end, or block 6's size. Used for permatext. 0 uses language defaults for blocks 4,5,6 and ignores -ml, -mf flags
-ml# language. set to total space - me's size. This manually sets the size of the permanent text banks and a few other things that load up in this region.
-mf# font space. set to 0, since handles automatically. This sets the memory for the ASCII font set, as well as the japanese if needed.
|
I would recommend only setting -me as 0 and ignoring the other settings. Seriously, these are automatically handled per-language otherwise, and the format is sort of screwy.
There are some that simply don't do anything anymore.
Code: |
-stanlinelog 1->80040FB4
-stanshow_p# converts pad to pointer. First occurance in red, second in green, third in blue, others ignored. This would be displayed, variably, to either the debug console or in-game debug display.
|
Obviously, it is more likely that some in-game features were more the product of replacing the text bank used for the memory string with other generated strings. We also know some stages had more debug output dealing with actions, sicne they still retain special pad names to this end. Whether any of this can be re-enabled is up to debate, but it gives a better idea how the game was debugged originally.
+_+
Also, since there was some question about this, these strings are parsed with strtok() along spaces and the numerical value is read using strtol(). So, if you wrote "-mt0700", it would think the number was in octal--448. Likewise, something like "-ma099" would be invalid and likely lock the game! Likewise, "-mvtx700" is the same as "-mvtx0x2bc".
Also, make sure there are no spaces between the "-m" and numerical value. It offsets right after the text and expects the value to be right there, without checking if it is. If it isn't there, bad stuff will happen.
The only exception to this rule are the "-level_" and "-hard" commands. It directly changes these values from decimal to hex, so they must be decimal numbers and only as many digits as noted above. _________________ (\_/) Beware
(O.o) ze
(> <) Hoppentruppen! |
|
|
|
|
|
 |
 |
 |
 |
 |
SubDrag Administrator

Joined: 16 Aug 2006 Posts: 6168
 |
Posted: Fri Jan 08, 2010 1:46 pm Post subject: |
 |
|
Very cool to know that. Glad we finally knocked down those unknown -m ones. |
|
|
|
|
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
 |