view clojure/com/aurellem/exp/notes.txt @ 240:25022f3c6607

working on preliminary script to bootstrap my way into a RAM writing program
author Robert McIntyre <rlm@mit.edu>
date Sun, 25 Mar 2012 01:53:29 -0500
parents 19fd38fe376e
children 7984a084aa07
line wrap: on
line source
1 ******** Game Sequence
4 start game
6 name rival "<space><PK>G<PK>G<PK>"
7 (0x7F 0xE1 0x86 0xE1 0x86 0xE1 in character codes)
9 get pikachu, fight rival, deliver oak's parcel
11 buy 5 items from viridian store, with the last one being a
12 burn-heal.
14 Perform save corruption.
16 move one of the other items that wasn't destroyed (but not
17 burn-heal) to the money counter to get a bunch of money.
19 buy 94 more burn heals. 95 burn heals spells out the
20 address that will safely return control to the pokemon
21 kernel.
23 deposit the cancel item one at a time into the item computer
24 35 times.
26 deposit 95 burn heals into item computer. This establishes
27 the return point for the program so it doesn't crash the game.
29 throw away the second character of rival's name until it is
30 equal to D5. Now the first two characters of rival's name
31 spell out the start point of the program that will be
32 constructed in the item computer.
34 throw away the fourth and sixth characters of rival's name
35 until it they are equal to D5. The (thrid and fourth) and
36 characters of rival's name now spell out the target item
37 which we will manipulate in the item computer.
39 toss the zero items past the map data in item memory to
40 spell the following assembly (using underflow) and combine
41 with rival's name like so
43 0x00
44 0xFA -- first part of "Load A from Literal address"
46 third rival's name character
47 fourth rival's name character -- target item address
49 0x00
50 0x3C -- increment A register
52 0x00
53 0xEA -- first part of "Save A to literal address"
55 fifth rival's name character
56 fourth rival's name character -- target item address
58 0x00
59 0xC3 -- first part of "Absolute Jump to literal address"
61 burn-heal
62 x 95 -- address of Route 3 memory-function
65 shift rival's name's first two characters into
66 mem-function-address.
70 now close the menu and continue item manipulations using the
71 newly constructed program. Starting and then canceling the
72 start menu activates the program.
76 ********** END Game Sequence
86 valid start addresses for the initial bootstrap program are
87 the following:
89 0xD31D - 0xD41B
90 --OR--
91 0xD53A - 0XD59C