|
From: SourceForge.net <no...@so...> - 2009-02-23 17:39:39
|
Bugs item #2108524, was opened at 2008-09-13 01:34 Message generated for change (Comment added) made by adelikat You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113536&aid=2108524&group_id=13536 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: lua Group: None Status: Open Resolution: None Priority: 8 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Lua doesn't recognize frozen addresses Initial Comment: Middle-clicking in the Hex Editor, selecting Freeze, or adding it to the Cheats window manually will cause memory addresses to behave oddly. They don't "freeze"; an Lua script that simply displays the state of the RAM address will act strangely and display the wrong value. 22:27'01" Sonicandtails: i froze 0x075A 22:27'03" Sonicandtails: at 02 22:27'40" Sonicandtails: The Lua counter starts at x3 22:27'49" Sonicandtails: Drops to x2 when you die even if the life counter is frozen in RAM 22:27'55" Sonicandtails: Then stays at x2 Tested using 4matsy's SMB Lua and the latest FCEUX. Lua script is attached for easy access ---------------------------------------------------------------------- >Comment By: Andres Delikat (adelikat) Date: 2009-02-23 12:39 Message: Here are the factors in this: 1) Lua's memory read.byte will only update when the memory address changes by the game (adding a cheat that changes its value will not update it. I don't necessarily think this is an issue). 2) When freezing in Hex editor, it allows the value to change once, but still display the original value. For instance, if you freeze mario's lives at 1 and die, Lua will receive that the value changed to 0. Memory watch, hex editor, and cheats still show it at 1. However, as soon as you unfreeze, it goes down to 0. If you die twice and then go to unfreeze, it still moves down to 0. So somehow hex editor allows the value to change once. Adding a cheat via the cheat search window will do this too. Make a cheat that turn his lives to 10 and it will immediately change to 10. Turn off the cheat and it will go back to 2. Turn the 10 lives cheat on and die, then turn if off: 9 Lives. So the game is keeping track of the "real value" and even allows it to change once before truly freezing. Lua is seeing the "real" value, which is why are you getting the results that you are. ---------------------------------------------------------------------- Comment By: Andres Delikat (adelikat) Date: 2009-02-23 12:30 Message: Here are the factors in this: 1) Lua's memory read.byte will only update when the memory address changes by the game (adding a cheat that changes its value will not update it. I don't necessarily think this is an issue). 2) When freezing in Hex editor, it allows the value to change once, but still display the original value. For instance, if you freeze mario's lives at 1 and die, Lua will receive that the value changed to 0. Memory watch, hex editor, and cheats still show it at 1. However, as soon as you unfreeze, it goes down to 0. If you die twice and then go to unfreeze, it still moves down to 0. So somehow hex editor allows the value to change once. Adding a cheat via the cheat search window will do this too. Make a cheat that turn his lives to 10 and it will immediately change to 10. Turn off the cheat and it will go back to 2. Turn the 10 lives cheat on and die, then turn if off: 9 Lives. So the game is keeping track of the "real value" and even allows it to change once before truly freezing. Lua is seeing the "real" value, which is why are you getting the results that you are. ---------------------------------------------------------------------- Comment By: Andres Delikat (adelikat) Date: 2009-02-23 11:18 Message: Here are the factors in this: 1) Lua's memory read.byte will only update when the memory address changes by the game (adding a cheat that changes its value will not update it. I don't necessarily think this is an issue). 2) When freezing in Hex editor, it allows the value to change once, but still display the original value. For instance, if you freeze mario's lives at 1 and die, Lua will receive that the value changed to 0. Memory watch, hex editor, and cheats still show it at 1. However, as soon as you unfreeze, it goes down to 0. If you die twice and then go to unfreeze, it still moves down to 0. So somehow hex editor allows the value to change once. Adding a cheat via the cheat search window will do this too. Make a cheat that turn his lives to 10 and it will immediately change to 10. Turn off the cheat and it will go back to 2. Turn the 10 lives cheat on and die, then turn if off: 9 Lives. So the game is keeping track of the "real value" and even allows it to change once before truly freezing. Lua is seeing the "real" value, which is why are you getting the results that you are. ---------------------------------------------------------------------- Comment By: Andres Delikat (adelikat) Date: 2009-02-23 11:02 Message: Ok, so this issue is definately with the hex editor. If you freeze the address with the cheats window, everything works out fine. ---------------------------------------------------------------------- Comment By: Andres Delikat (adelikat) Date: 2008-12-14 16:50 Message: Freezing works just fine in this case. What is happening is that Lua doesn't recognize and read frozen addresses. This was done semi-intentionally when Lua was designed. If you watch an address in the hex editor or memory watch you see it is behaving normally. Lua may need to be changed to recognize frozen addresses so I am changing the name of this bug issue and adding it to the Lua category. ---------------------------------------------------------------------- Comment By: qFox (qfox) Date: 2008-12-12 20:26 Message: The problem is the secret (1k?) limit on addresses that can be frozen at once. A fix is not anywhere to be seen for now... -- qFox, who doesnt feel like logging in. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113536&aid=2108524&group_id=13536 |