PATCH: Exiting a level
- JosephBurke
- Posts: 94
- Joined: Sun Aug 31, 2003 9:51 pm
- adurdin
- Site Founder
- Posts: 549
- Joined: Fri Aug 29, 2003 11:27 pm
- Location: Edinburgh, Scotland
- Contact:
A similar patch for Keen 2 and 3 would be quite simple.
If you disassemble the patch using debug or some other utility, you'll find that the code is the following:
This sets the "got keycard" variables at data locations AA9E, AAA0, AAA2, and AAA4 to zero, and also sets the shots variable at data location AAC8 to zero. The rest of the code is NOP (no-operation) commands, to fill up the space which was originally a verbose loop to clear the keycard variables.
If you disassemble the patch using debug or some other utility, you'll find that the code is the following:
Code: Select all
4F43 31C0 XOR AX,AX
4F45 A39EAA MOV [AA9E],AX
4F48 A3A0AA MOV [AAA0],AX
4F4B A3A2AA MOV [AAA2],AX
4F4E A3A4AA MOV [AAA4],AX
4F51 A3C8AA MOV [AAC8],AX
4F54 90 NOP...
-
- Patch Crafter
- Posts: 290
- Joined: Tue Sep 02, 2003 6:42 pm
- Location: Easter Island
- Contact:
..
So how did you manage to make a patch that would only do that on level 1? Did you check the bytes at a certain location (maybe that holds the level number) and do some sort of "if" in assembly?
A suggestion I have is that you write an article that gives the memory locations where certain significant information is stored during the game, that would help the rest of us write our own patches.
A suggestion I have is that you write an article that gives the memory locations where certain significant information is stored during the game, that would help the rest of us write our own patches.
- adurdin
- Site Founder
- Posts: 549
- Joined: Fri Aug 29, 2003 11:27 pm
- Location: Edinburgh, Scotland
- Contact:
Here's the code that the "set shots to zero only on level 1" patch uses:
It checks the word at data location $8304, which stores the current level number. If it is not equal to one, then it skips over the line which resets the shots to zero.
Your suggestion about an article is a good one. Maybe also a bit of a tutorial on using DEBUG to make patches? I'll see what I can do.
Code: Select all
4F43 31C0 XOR AX,AX
4F45 A39EAA MOV [AA9E],AX
4F48 A3A0AA MOV [AAA0],AX
4F4B A3A2AA MOV [AAA2],AX
4F4E A3A4AA MOV [AAA4],AX
4F51 833E048301 CMP WORD PTR [8304],+01
4F56 7503 JNZ 4F5B
4F58 A3C8AA MOV [AAC8],AX
4F5B 90 NOP
4F5C 90 NOP
4F5D 90 NOP
Your suggestion about an article is a good one. Maybe also a bit of a tutorial on using DEBUG to make patches? I'll see what I can do.
- CommanderSpleen
- Posts: 1017
- Joined: Sun Aug 31, 2003 12:11 pm
- Location: The Land of Sparkly Things
- Contact:
re: Keeping Keycards
This is gonna sound completely corny, but it's one method: Have Keen drop through a shallow vertical passage containing all 4 keycards and all 4 doors at the start of a level you're worried about cheating on. This way, even if he already has a Yellow and a Green Keycard when entering a level, he'll still snag all 4, and open all 4 doors, leaving him with nothing.
Yes, it makes the beginning of that level a little jostling and noisy, but it cuts out the need for additional patching--and you might not want him to lose the keycards on *every* level. ;-)
--Xky
Yes, it makes the beginning of that level a little jostling and noisy, but it cuts out the need for additional patching--and you might not want him to lose the keycards on *every* level. ;-)
--Xky
- myrrth sicopath
- Posts: 31
- Joined: Sat May 01, 2004 11:30 pm
- Location: Marooned on Mars
I just got a WICKED idea.
Here it is:
Have sections of the world map in the colors of the keycards. In each color, the levels begin with Keen next to a locked door (to be opened with a card of the color of the map) and a hole with enough points for an extra life (in case the player entered a level by mistake or something). Then the player knows that he or she must have that particular color of keycard to enter and advance through one of those levels. At the end of each level, have another keycard to keep and use for a new level of that color.
I don't think I can use this for what I'm doing, but any takers? :D
Here it is:
Have sections of the world map in the colors of the keycards. In each color, the levels begin with Keen next to a locked door (to be opened with a card of the color of the map) and a hole with enough points for an extra life (in case the player entered a level by mistake or something). Then the player knows that he or she must have that particular color of keycard to enter and advance through one of those levels. At the end of each level, have another keycard to keep and use for a new level of that color.
I don't think I can use this for what I'm doing, but any takers? :D
- CommanderSpleen
- Posts: 1017
- Joined: Sun Aug 31, 2003 12:11 pm
- Location: The Land of Sparkly Things
- Contact:
Keys on Map Patch Upgrade?
I was just thinking over the weekend about bringing this issue back to light again. Can the Keys on Map (TM) patch be modified so that when Keen dies, as opposed to exists the level through the door, all keys are lost?I just noticed that this patch causes keycards to remain even when Keen dies.
The main problem with the patch as-is still remains that Keen can die in a level mid-puzzle and emerge from the level with a keycard that can be used either in another level or to access locked areas of the map prematurely.
I was using this method during my early level development, in addition to making sure the player can't die after collecting a map-key (a one-way tile leads to the exit room containing the door and a key, and nothing that can kill the player). I can stick with this method, as it works well enough for what it's worth, and it's probably possible to only make one card reset upon exiting/dying and thus not need to worry about the three doors at the start of the level, but upgraded patch is preferable. *hopes*Keen drop through a shallow vertical passage containing all 4 keycards and all 4 doors at the start of a level you're worried about cheating on.
>Commander Spleen