comparison org/total-control.org @ 614:b531d490859c

submitting to TAS...
author Robert McIntyre <rlm@mit.edu>
date Thu, 22 Nov 2012 13:12:21 -0600
parents e1dcad3ce967
children a79e5a852347 90575d3a64d1
comparison
equal deleted inserted replaced
613:e1dcad3ce967 614:b531d490859c
166 After gathering these items, I deposit them in the appropriate order 166 After gathering these items, I deposit them in the appropriate order
167 into the item PC to spell out my bootstrapping program. Writing a full 167 into the item PC to spell out my bootstrapping program. Writing a full
168 bootstrap program in one go using only items turned out to be too 168 bootstrap program in one go using only items turned out to be too
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 starting
172 fixed point in memory. After it writes 200 or so bytes, it jumps 172 at a 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 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
460 items below it from compaction. It the beginning of the run, I stick 460 items below it from compaction. It the beginning of the run, I stick
461 an 0xFF item at the top of the PC item list, allowing me to put items 461 an 0xFF item at the top of the PC item list, allowing me to put items
462 in with impunity. At the end, I toss the 0xFF away to reveal the 462 in with impunity. At the end, I toss the 0xFF away to reveal the
463 completed bootstrap program. 463 completed bootstrap program.
464 464
465 The final payload program is actually multiple programs. I created a 465 The final payload program is multiple programs. I created a reduced
466 reduced form of MIDI and implemented it in gameboy machine 466 form of MIDI and implemented it in gameboy machine language. Then I
467 language. Then I translated a midi file from 467 translated a midi file from http://www.everyponysings.com/ into this
468 http://www.everyponysings.com/ into this reduced MIDI language. The 468 reduced MIDI language. The payload program contains both the music
469 payload program contains both the music data and the MIDI interpreter 469 data and the MIDI interpreter to play that data. The picture works in
470 to play that data. The picture works in a similar way. There is code 470 a similar way. There is code to translate a png file into a form that
471 to translate a png file into a form that can be displayed on a 471 can be displayed on a gameboy, and other code to actually display that
472 gameboy, and other code to actually display that image. Both the image 472 image. Both the image and the display code are also written by the
473 and the display code are also written by the final bootstrapping 473 final bootstrapping program. Even though my final payload is rather
474 program. Even though my final payload is rather simple, you can write 474 simple, you can write any program at all as the payload. The source
475 any program at all as the payload. The source for the sound and image 475 for the sound and image displaying code is at
476 displaying code is at http://hg.bortreb.com/vba-clojure. 476 http://hg.bortreb.com/vba-clojure.
477 477
478 478