Jul 19, 2006 at 4:50 AM
Join Date: Jun 18, 2006
Location: Montreal, Canada
Posts: 581
Age: 40
After a bit of screwing around with offsets, I noticed the flags fall very close to relatively harmless stuff in memory. I tried something out.
Turns out there's no check made to see if you go beyond the reserved space for flags. You can go mess around with other data if you know what you're doing. This is potentially dangerous since you might end up setting a flag in Sue's thinking it's safe, but actually be modifying memory elsewhere.
There are 1000 flags, meaning the safe range is between 0000 and 8000. Beyond that you're bumping into other reserved RAM.
0049DDA0 <- The starting offset of the flags.
Each flag is a bit, meaning it takes 8 flags to move by 1 byte. So flag 8 is 0x0049DDA1.
0049E1DC <- This is a "soft" quake effect. You can set a value to it by doing the following.
0049E1DC - 0049DDA0 = 43C (1084 in decimal)
1084 x 8 = 8672.
Flags 8672 to 8679 control the "soft" quake offset. You can give it ANY value by screwing around with the contents in binary using flags (ie, 8672 is 1, 8673 is 2, 8674 is 4...)
Flag 9088 to 9095 controls which key is being held, for instance. I don't have all of the offsets for what is covered by this, but there are a few important system-related things to watch out for (the keyboard handler being one of them, like in this case.)
Enjoy - this is about all that I have in the range flags cover in RAM at the moment. Anyone who can find interesting junk should feel free to use it as desired in their hack. Note that flags past 8000 are unsafe and prone to change often.
Oh yeah, you can also use the game's time as a semi-random number generator (0049E1EC; flags 8800-8831.) The miliseconds are sure to change frequently enough to serve as a reliable random branch device.
Turns out there's no check made to see if you go beyond the reserved space for flags. You can go mess around with other data if you know what you're doing. This is potentially dangerous since you might end up setting a flag in Sue's thinking it's safe, but actually be modifying memory elsewhere.
There are 1000 flags, meaning the safe range is between 0000 and 8000. Beyond that you're bumping into other reserved RAM.
0049DDA0 <- The starting offset of the flags.
Each flag is a bit, meaning it takes 8 flags to move by 1 byte. So flag 8 is 0x0049DDA1.
0049E1DC <- This is a "soft" quake effect. You can set a value to it by doing the following.
0049E1DC - 0049DDA0 = 43C (1084 in decimal)
1084 x 8 = 8672.
Flags 8672 to 8679 control the "soft" quake offset. You can give it ANY value by screwing around with the contents in binary using flags (ie, 8672 is 1, 8673 is 2, 8674 is 4...)
Flag 9088 to 9095 controls which key is being held, for instance. I don't have all of the offsets for what is covered by this, but there are a few important system-related things to watch out for (the keyboard handler being one of them, like in this case.)
Enjoy - this is about all that I have in the range flags cover in RAM at the moment. Anyone who can find interesting junk should feel free to use it as desired in their hack. Note that flags past 8000 are unsafe and prone to change often.
Oh yeah, you can also use the game's time as a semi-random number generator (0049E1EC; flags 8800-8831.) The miliseconds are sure to change frequently enough to serve as a reliable random branch device.