sprite hit hack, softscale fix
[fceu.git] / out_gp2x / readme_cheat.txt
CommitLineData
aa2dba92 1\r
2\r
3 FCE Ultra Cheat Guide\r
4\r
5***** This file was obtained from *****\r
6http://mednafen.com/documentation/cheat.html\r
7\r
8\r
9/Last updated November 12, 2003\r
10Valid as of FCE Ultra 0.97.4/\r
11\r
12*Table of Contents:*\r
13\r
14 * Introduction <#intro>\r
15 o Cheat Files <#cheatfiles> \r
16 * The Windows Interface <#windows>\r
17 o Cheat Search Interface <#windows-search> \r
18 * The Text Interface(TODO)\r
19 * Examples <#examples>\r
20 o "Mega Man 3" Windows Example <#examples-mm3>\r
21 o "Over Horizon" Text Interface Example <#examples-oh> \r
22 * Tips <#tips> \r
23\r
24------------------------------------------------------------------------\r
25\r
26\r
27 Introduction\r
28\r
29FCE Ultra allows cheating by the periodic "patching" of arbitrary\r
30addresses in the 6502's memory space with arbitrary values, as well as\r
31read substitution. "Read substitution" is the method that would be used\r
32on a real NES/Famicom, such as done by the Game Genie and Pro Action\r
33Replay. It is required to support GG and PAR codes, but since it is\r
34relatively slow when done in emulation, it is not the preferred method\r
35when a RAM patch will suffice. Also, in FCE Ultra, read substitution\r
36will not work properly with zero-page addressing modes(instructions that\r
37operate on RAM at $0000 through $00FF).\r
38\r
39The RAM patches are all applied a short time before the emulated\r
40vertical blanking period. This detail shouldn't concern most people,\r
41though. However, this does mean that cheating with games that use\r
42bank-switched RAM may be problematic. Fortunately, such games are not\r
43very common(in relation to the total number of NES and Famicom games).\r
44\r
45\r
46 Cheat Files\r
47\r
48Cheats are stored in the "cheats" subdirectory under the base FCE Ultra\r
49directory. The files are in a simple plain-text format. Each line\r
50represents a one-byte memory patch. The format is as follows(text in\r
51brackets [] represents optional parameters):\r
52\r
53 [S][C][:]Address(hex):Value(hex):[Compare value:]Description \r
54\r
55Example:\r
56\r
57 040e:05:Infinite super power.\r
58\r
59A colon(:) near the beginning of the line is used to disable the cheat.\r
60"S" denotes a cheat that is a read-substitute-style cheat(such as with\r
61Game Genie cheats), and a "C" denotes that the cheat has a compare value.\r
62\r
63------------------------------------------------------------------------\r
64\r
65\r
66 The Windows Interface\r
67\r
68All addresses listed in the cheats window are in unsigned 16-bit\r
69hexadecimal format and all values in these windows are in an unsigned\r
708-bit decimal format(the range for values is 0 through 255).\r
71\r
72The cheats window contains the list of cheats for the currently loaded\r
73game on the right side. Existing cheats can be selected, edited, and\r
74updated using the "Update" button.\r
75\r
76\r
77 Cheat Search Interface\r
78\r
79The cheat search interface consists of several components: a list of\r
80addresses and associated data for a search, several command buttons, and\r
81the search parameters.\r
82\r
83Each entry in the list is in the format of:\r
84\r
85 Address:Original Value:Current Value\r
86\r
87The address is the location in the 6502's address space, the original\r
88value is the value that was stored at this address when the search was\r
89reset, and the current value is the value that is currently stored at\r
90that address. Selecting an item in this list will automatically cause\r
91the "Address" field in the cheat information box on the right side of\r
92the window to be updated with the selected address.\r
93\r
94The "Reset Search" button resets the search process; all valid addresses\r
95are displayed in the cheat list and the data values at those addresses\r
96noted.\r
97\r
98The "Do Search" buttons performs a search based on the search parameters\r
99and removes any non-matching addresses from the address list.\r
100\r
101The "Set Original to Current" button sets the remembered original values\r
102to the current values. It is like the "Reset Search" button, but it does\r
103not affect which addresses are shown in the address list. This command\r
104is especially useful when used in conjunction with the "O!=C" search\r
105filter.\r
106\r
107The "Unhide Excluded" button shows all addresses that are excluded as a\r
108result of any previous searches. It is like the "Reset Search" button\r
109except that it does not affect the remembered original values.\r
110\r
111The numbers assigned the names "V1" and "V2" have different meanings\r
112based on which filter is selected. A list of the names of the filters\r
113and detailed information on what they do follows("original value"\r
114corresponds to the value remembered for a given addres and "current\r
115value" is the value currently at that address. Also, if a value is not\r
116explicitly said to be shown under a certain condition, then it is\r
117obviously excluded.):\r
118\r
119"O==V1 && C==V2":\r
120\r
121 Show the address if the original value is equal to "V1" AND the\r
122 current value is equal to "V2". \r
123\r
124"O==V1 && |O-C|==V2":\r
125\r
126 Show the address if the original value is equal to "V1" AND the\r
127 difference between the current value and the original value is equal\r
128 to "V2". \r
129\r
130"|O-C|==V2":\r
131\r
132 Show the address if the difference between the current value and the\r
133 original value is equal to "V2". \r
134\r
135"O!=C":\r
136\r
137 Show the address if the original value does not equal the current\r
138 value. \r
139\r
140The following cheat methods/filters automatically perform the function\r
141of the "Set Original to Current" button after "Do Search" is pressed.\r
142\r
143"Value decreased."\r
144\r
145 Show the address if the value has decreased. \r
146\r
147"Value increased."\r
148\r
149 Show the address if the value has increased. \r
150\r
151------------------------------------------------------------------------\r
152\r
153\r
154 Examples\r
155\r
156\r
157 "Mega Man 3" Windows Example\r
158\r
159This example will give Mega Man unlimited energy. Immediately after\r
160entering the Top Man stage, make your way to the "Add Cheat" window.\r
161Push "Reset Search". Go back to playing and move right until the first\r
162enemy appears. Allow yourself to be hit twice. Each hit does "2" damage,\r
163so you've lost 4 energy bars. Go to the "Add Cheat" window again and\r
164select the third filter ("|O-C|==V2") and enter the value 4 next to\r
165"V2". Then push "Do Search".\r
166\r
167Several addresses will appear in the address list. You can try to find\r
168the address you want through trial and error, or you can narrow the\r
169results down further. We will do the latter.\r
170\r
171Go back to playing MM3 and get hit one more time and make your way back\r
172to the "Add Cheat" window. Your damage is now "6". You can probably see\r
173which address that contains your life(it is 00A2). If not, change V2 to\r
1746 and push "Do Search" again. This should leave only 00A2.\r
175\r
176Select that entry in the address list. Shift your attention to the "Add\r
177Cheat" box to the right. Type in a meaningful name and the desired\r
178value(156; it was the value when you had no damage, so it's safe to\r
179assume it's the maximum value you can use). Push the "Add" button and a\r
180new entry will appear in the cheats list. The cheat has been added.\r
181\r
182\r
183 "Over Horizon" Text Interface Example\r
184\r
185This example will give you infinite lives in the NTSC(Japanese) version\r
186of "Over Horizon".\r
187\r
188Start a new game. Notice that when you press "Start" during gameplay,\r
189the number of lives you have left is indicated. With no cheating, you\r
190start with 3 lives(2 lives left).\r
191\r
192Activate the cheat interface immediately after starting a new game.\r
193Select the "New Cheats" menu and "Reset Search".\r
194\r
195I'll assume that the number of lives left shown in the game is the same\r
196number that's stored in RAM. Now, "Do Search". You're going to use the\r
197first search filter. For V1, enter the value 2. For V2, enter the same\r
198value. This, coupled with the fact that you just reset the search, will\r
199allow you to search for a value "absolutely"(as opposed to changes in\r
200the value).\r
201\r
202Now, "Show Results". When I did it, I received 11 results:\r
203\r
204 1) $0000:002:002\r
205 2) $001c:002:002\r
206 3) $001e:002:002\r
207 4) $009d:002:002\r
208 5) $00b9:002:002\r
209 6) $00e3:002:002\r
210 7) $0405:002:002\r
211 8) $0406:002:002\r
212 9) $0695:002:002\r
213 10) $07d5:002:002 \r
214 11) $07f8:002:002\r
215\r
216You really can't do much yet(unless you want to spend time doing trial\r
217and error cheat additions). Return to the game.\r
218\r
219After losing a life, go back to the cheat interface, to the "New Cheats"\r
220menu, and "Show Results". Here are my results:\r
221\r
222 1) $0000:002:002\r
223 2) $001c:002:002\r
224 3) $001e:002:002\r
225 4) $009d:002:002\r
226 5) $00b9:002:041\r
227 6) $00e3:002:002\r
228 7) $0405:002:001\r
229 8) $0406:002:002\r
230 9) $0695:002:002\r
231 10) $07d5:002:001\r
232 11) $07f8:002:002\r
233\r
234Notice that two addresses seem to hold the number of lives($0405 and\r
235$07d5). You can lose another life and go "Show Results" again, and you\r
236should see that $07d5 is the address that holds the number of lives.\r
237\r
238Now that you know the address that holds the number of lives, you can\r
239add a cheat. You can either type in the number from the cheat results\r
240list corresponding to the address you want to add a cheat for, or you\r
241can remember the address and select "Add Cheat" from the "New Cheats"\r
242menu. Do the former.\r
243\r
244Now you will need to enter a name for the cheat. I suggest something\r
245short, but descriptive. "Infinite lives" will work fine. Next, a prompt\r
246for the address will show up. Since you selected an item from the list,\r
247you can press enter to use the associated address($07d5). Next, you will\r
248need to enter a value. It doesn't need to be large(in fact, it probably\r
249shouldn't be; abnormally high numbers can cause some games to\r
250misbehave). I suggest a value of 2. After this, you should get a prompt\r
251that looks like this:\r
252\r
253 Add cheat "Infinite lives" for address $07d5 with value 002?(Y/N)[N]:\r
254\r
255Answer "Y". You now have infinite lives.\r
256\r
257------------------------------------------------------------------------\r
258\r
259\r
260 Tips\r
261\r
262Games store player information in many different ways. For example, if\r
263you have "3" lives in Super Wacky Dodgeball 1989, the game might store\r
264it in memory as 2, 3, or 4, or perhaps a different number all together.\r
265Also, say that you have 69 life points out of 200 in Mole Mashers. The\r
266game might store how many life points you have, or how much damage you\r
267have taken. Relative value searches are very valuable because you\r
268probably don't know the way that the game stores its player data.\r
269\r
270Some games, especially RPGs, deal with individual numbers greater than\r
2718-bits in size. Most that I've seen seem to store the multiple-byte data\r
272least significant byte(lower byte of number) first in memory, though\r
273conceivably, it could be stored most significant byte first, or the\r
274component bytes of the number could be non-contiguous, though the latter\r
275is very unlikely. For example, say I have 5304 experience points in\r
276Boring Quest for the Overused Plot Device. To split the number into two\r
277eight bit decimal numbers, take 5304 %(modulus) 256. This will give a\r
278number that is the lower 8 bits. Next, take 5304 / 256. The integral\r
279component of your answer will be the upper 8 bits(or the next 8 bits, if\r
280the number is or can be larger than 16 bits) of 5304. Now you will need\r
281to search for these numbers. Fortunately, most(all?) RPGs seem to store\r
282large numbers exactly as they are shown in the game.\r
283\r