comparison org/total-control.org @ 612:00c5cdfb9da7

misc. fixes.
author Robert McIntyre <rlm@mit.edu>
date Thu, 22 Nov 2012 11:34:57 -0600
parents d9f991cddad9
children e1dcad3ce967
comparison
equal deleted inserted replaced
611:d9f991cddad9 612:00c5cdfb9da7
31 or change your clothes.. There are some games (like chess), where it 31 or change your clothes.. There are some games (like chess), where it
32 is not possible to alter the rules of the game from within the 32 is not possible to alter the rules of the game from within the
33 game. No matter what moves you make in chess, you can never change the 33 game. No matter what moves you make in chess, you can never change the
34 rules of the game so that it becomes checkers or basketball. The point 34 rules of the game so that it becomes checkers or basketball. The point
35 of this run is to show that you CAN change the rules in pokemon 35 of this run is to show that you CAN change the rules in pokemon
36 yellow. There is a certain sequence of valid actions like walking from 36 yellow. There is a certain sequence of valid actions (like walking
37 one place to another or buying items that will allow you to transform 37 from one place to another or buying items) that will allow you to
38 pokemon yellow into Pacman, or Tetris, or Pong, or a MIDI player, or 38 transform pokemon yellow into Pacman, or Tetris, or Pong, or a MIDI
39 anything else you can imagine. 39 player, or anything else you can imagine.
40 40
41 * Background 41 * Background
42 42
43 [[http://tasvideos.org/2913S.html][This speedrun]] by Felipe Lopes de Freitas (p4wn3r), beats pokemon 43 [[http://tasvideos.org/2913S.html][This speedrun]] by Felipe Lopes de Freitas (p4wn3r), beats pokemon
44 yellow in only 1 minute and 36 seconds. It does it by corrupting the 44 yellow in only 1 minute and 36 seconds. It does it by corrupting the
169 hard, so I split the process up into three parts. The program that I 169 hard, so I split the process up into three parts. The program that I
170 actually construct using items is very limited. It reads only from the 170 actually construct using items is very limited. It reads only from the
171 A, B, start, and select buttons, and writes 4 bits each frame to a 171 A, B, start, and select buttons, and writes 4 bits each frame to a
172 fixed point in memory. After it writes 200 or so bytes, it jumps 172 fixed point in memory. After it writes 200 or so bytes, it jumps
173 directly to what it just wrote. In my run, I use this program to write 173 directly to what it just wrote. In my run, I use this program to write
174 another bootstrapping program that can write to any number of bytes to 174 another bootstrapping program that can write any number of bytes to
175 any location in memory, and then jump to any location in memory. This 175 any location in memory, and then jump to any location in memory. This
176 new program also can write 8 bits per frame by using all the 176 new program also can write 8 bits per frame by using all the
177 buttons. Using this new bootstrap program, I write a final 177 buttons. Using this new bootstrap program, I write a final
178 bootstrapping program that does everything the previous bootstrapping 178 bootstrapping program that does everything the previous bootstrapping
179 program does except it also displays the bytes it is writing to memory 179 program does except it also displays the bytes it is writing to memory
274 I also wrote functions that could grovel through the game's memory and 274 I also wrote functions that could grovel through the game's memory and
275 present the internal data structures in usable ways. For example, the 275 present the internal data structures in usable ways. For example, the
276 function =print-inventory= returns the current inventory in a human 276 function =print-inventory= returns the current inventory in a human
277 readable format. 277 readable format.
278 278
279 #+begin_src clojure :results output 279 #+begin_src clojure :results output :exports both
280 (com.aurellem.gb.items/print-inventory) 280 (com.aurellem.gb.items/print-inventory)
281 #+end_src 281 #+end_src
282 282
283 #+results: 283 #+results:
284 #+begin_example 284 #+begin_example
433 ]]))) 433 ]])))
434 434
435 #+end_src 435 #+end_src
436 436
437 I use the glitch items 0x00 and 0xFF to great effect in my run. 0x00 437 I use the glitch items 0x00 and 0xFF to great effect in my run. 0x00
438 sells for almost half of max_money, and I use just 3 of them to 438 sells for almost half of maximum money --- I use just 3 of them to
439 finance the purchase of all the other items I need. 0x00 is also a 439 finance the purchase of all the other items I need. 0x00 is also a
440 NO-OP in the gameboy's machine language, which means that I can stick 440 NO-OP in the gameboy's machine language, which means that I can stick
441 them anywhere where I need to break up an other wise illegal pair of 441 them anywhere where I need to break up an other wise illegal pair of
442 opcodes. 0xFF is also extremely useful because it is the end-of-list 442 opcodes. 0xFF is also extremely useful because it is the end-of-list
443 sentinel. Normally, the game will "compact" your items whenever you 443 sentinel. Normally, the game will "compact" your items whenever you