This is a file of miscellaneous notes on movement ASM. [$80] = C20000 $88 = Which onscreen TPT entry (add to root of a WRAM table to get/set values) There are thirty possible onscreen TPT entries. The one that is being dealt with is the "current TPT entry". The current TPT entry's data is in a bunch of tables at (tableroot + *$88). 2n = *$88 I suspect that $1A22,2n is a signed value. movement_parser.txt might be mistaken, starting at [45]. If not, there are duplicate codes. CHECK THIS! O_o 7E0C06 + 2n has been observed to hold the height of the Photoman when he's falling/rising off the screen... [2C] and [2D] presumably support negatives (args = 0xFFnn) but this has not been tested. [01] code - What is $84? ------------------------ C0/9603: B7 80 LDA [$80],Y A = args C0/9605: A6 8A LDX $8A X = *$8A C0/9607: C8 INY Y = origY+1 C0/9608: 85 90 STA $90 $90 = args C0/960A: 84 94 STY $94 $94 = origY+1 C0/960C: 98 TYA A = origY+1 C0/960D: BC E6 12 LDY $12E6,X Y = 12E6,*$8A C0/9610: 91 84 STA ($84),Y Store origY+1 to the address made by: (*$84) + 12E6,*$8A C0/9612: C8 INY C0/9613: C8 INY Y = 12E6,*$8A + 2 C0/9614: A5 90 LDA $90 C0/9616: 91 84 STA ($84),Y Store args to the address made by: (*$84) + 12E6,*$8A + 2 C0/9618: C8 INY C0/9619: 98 TYA A = 12E6,*$8A + 3 C0/961A: 9D E6 12 STA $12E6,X Overall, this adds 3 to 12E6,*$8A C0/961D: A4 94 LDY $94 Y = origY+1 C0/961F: 60 RTS SPECULATION: movementccs.txt indicates you can use 39 01 XX ... 02 to do loops. Is the 39 necessary? If not, then 01 XX and 02 are a loop code - 01 XX to start with number of iterations, and 02 marking the end. :O UPDATE: 39 takes no arguments. This looks likely. All that's needed is a test... [01] demands knowledge of $84. [03] demands knowledge of $82. [06] was already known but not in movementcodelist, so I put it here anyway. The time units it uses are speculated to be 1/60th second increments. 00,"End of movement pattern"; 01 XX,"Loop start, with $XX as iterations?"; 02,"Loop end?"; 03 XX XX YY,"Jump to $XXXX and store $YY at $82"; 06 XX,"Pause for $XX time units" 09,"Halt movement (infinitely long wait)"; 0A XX XX,"If $1516,*$8A is 0, jump to $XXXX"; 0B XX XX,"If $1516,*$8A is not 0, jump to $XXXX"; 19 XX XX,"Unconditional jump to $XXXX"; 2A XX XX,"Add $XXXX to ($0C06,*$88) and set ($0CBA,*$88) to 0x8000"; 2B XX XX,"Add $XXXX to ($0B8E,*$88)"; 2C XX XX,"Add $XXXX to X coordinate of object's location"; 2D XX XX,"Add $XXXX to Y coordinate of object's location"; 37 XX YY YY,"Add $YYYY to ($1A02,*$XX)"; 38 XX YY YY,"Add $YYYY to ($1A0A,*$XX)"; 39,"Store 0 to $0DAA, $0CF6, $0DE6, $0D32, $0E22 and $0D6E (all indexed by *$88)"; 3A XX,"Set $1A32,(2 * $XX) / $1A22,(2 * $XX) / $1A3A,(2 * $XX) / $1A2A,(2 * $XX) to zero"; 3B XX,"If $XX is 0xFF, store 0xFFFF to ($10F2,*$88). Else, store $XX to ($10F2,*$88)"; 3C XX,"Increment ($10F2,*$88)"; 3D XX,"Decrement ($10F2,*$88)"; 43 XX,"Store $XX to ($103E,*$88)";