annotate 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
rev   line source
rlm@240 1 ******** Game Sequence
rlm@240 2
rlm@240 3
rlm@239 4 start game
rlm@239 5
rlm@240 6 name rival "<space><PK>G<PK>G<PK>"
rlm@240 7 (0x7F 0xE1 0x86 0xE1 0x86 0xE1 in character codes)
rlm@240 8
rlm@239 9 get pikachu, fight rival, deliver oak's parcel
rlm@239 10
rlm@239 11 buy 5 items from viridian store, with the last one being a
rlm@239 12 burn-heal.
rlm@239 13
rlm@239 14 Perform save corruption.
rlm@239 15
rlm@239 16 move one of the other items that wasn't destroyed (but not
rlm@239 17 burn-heal) to the money counter to get a bunch of money.
rlm@239 18
rlm@239 19 buy 94 more burn heals. 95 burn heals spells out the
rlm@240 20 address that will safely return control to the pokemon
rlm@240 21 kernel.
rlm@239 22
rlm@240 23 deposit the cancel item one at a time into the item computer
rlm@240 24 35 times.
rlm@239 25
rlm@240 26 deposit 95 burn heals into item computer. This establishes
rlm@240 27 the return point for the program so it doesn't crash the game.
rlm@239 28
rlm@240 29 throw away the second character of rival's name until it is
rlm@240 30 equal to D5. Now the first two characters of rival's name
rlm@240 31 spell out the start point of the program that will be
rlm@240 32 constructed in the item computer.
rlm@240 33
rlm@240 34 throw away the fourth and sixth characters of rival's name
rlm@240 35 until it they are equal to D5. The (thrid and fourth) and
rlm@240 36 characters of rival's name now spell out the target item
rlm@240 37 which we will manipulate in the item computer.
rlm@240 38
rlm@240 39 toss the zero items past the map data in item memory to
rlm@240 40 spell the following assembly (using underflow) and combine
rlm@240 41 with rival's name like so
rlm@240 42
rlm@240 43 0x00
rlm@240 44 0xFA -- first part of "Load A from Literal address"
rlm@240 45
rlm@240 46 third rival's name character
rlm@240 47 fourth rival's name character -- target item address
rlm@240 48
rlm@240 49 0x00
rlm@240 50 0x3C -- increment A register
rlm@240 51
rlm@240 52 0x00
rlm@240 53 0xEA -- first part of "Save A to literal address"
rlm@240 54
rlm@240 55 fifth rival's name character
rlm@240 56 fourth rival's name character -- target item address
rlm@240 57
rlm@240 58 0x00
rlm@240 59 0xC3 -- first part of "Absolute Jump to literal address"
rlm@240 60
rlm@240 61 burn-heal
rlm@240 62 x 95 -- address of Route 3 memory-function
rlm@240 63
rlm@240 64
rlm@240 65 shift rival's name's first two characters into
rlm@240 66 mem-function-address.
rlm@240 67
rlm@240 68
rlm@240 69
rlm@240 70 now close the menu and continue item manipulations using the
rlm@240 71 newly constructed program. Starting and then canceling the
rlm@240 72 start menu activates the program.
rlm@240 73
rlm@240 74
rlm@240 75
rlm@240 76 ********** END Game Sequence
rlm@240 77
rlm@240 78
rlm@240 79
rlm@240 80
rlm@240 81
rlm@240 82
rlm@240 83
rlm@240 84
rlm@240 85
rlm@240 86 valid start addresses for the initial bootstrap program are
rlm@240 87 the following:
rlm@240 88
rlm@240 89 0xD31D - 0xD41B
rlm@240 90 --OR--
rlm@240 91 0xD53A - 0XD59C
rlm@240 92
rlm@240 93
rlm@240 94
rlm@240 95
rlm@240 96