Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

EarthBound’s almost-Turing-complete text system!

33 views

Published on

EarthBound, a role-playing game released for the Super Nintendo in 1994, is one of the most universally revered games of all time. At the core of EarthBound is a super-complex scripting language that controls text, scripted cutscenes, music, sound effects, window management, and more. In this talk, we’ll explore some of the language’s more interesting or charming features.

Presented at !!Con West 2019 in Santa Cruz, CA.

Published in: Software
  • Be the first to comment

  • Be the first to like this

EarthBound’s almost-Turing-complete text system!

  1. 1. @alexras https://www.alexras.info/ https://www.bitsondisk.com/ Alex Rasmussen !!Con West 2019
  2. 2. https://www.talking-time.net/showthread.php?t=13833&page=6
  3. 3. EarthBound’s text system is part of 
 an interpreter. It has registers, an ISA,
 and a call stack. People have been studying 
 it for almost 20 years.
  4. 4. the REGISTERS! Working (4B): return values Argumentary (4B): arguments Secondary (4B): mostly counters Two register sets: active + storage
  5. 5. the INSTRUCTION SET! a.k.a.“ControlCodes” [OP AA BB CC …]
  6. 6. the INSTRUCTION SET! a.k.a.“ControlCodes” [OP AA BB CC …]
  7. 7. the INSTRUCTION SET! a.k.a.“ControlCodes” [OP AA BB CC …]
  8. 8. CONTROLLING TEXT [00] - Line Break [02] - Stop Parsing [03] - Halt w/ Prompt [13] - Halt w/o Prompt
  9. 9. EXAMPLE @Hello !!Con West![03][00] @Look at this nifty box.[13][02] http://billeager.com/ebtext/
  10. 10. BOOLEAN VARIABLES [04 XX XX] - Event flag on [05 XX XX] - Event flag off [06 XX XX YY YY YY YY] - 
 Jump to $YYYYYYYY if 
 $XXXX == 1
  11. 11. BRANCHING [0A XX XX XX XX] - 
 Jump to location $XXXXXXXX [08 XX XX XX XX] - 
 Jump and return [09 XX (..)] - 
 Multi-address jump
  12. 12. BATTLE CONTROL [1E 00 XX YY] - 
 Member $XX HP up by YY% [1E 08 XX YY] - 
 Member $XX now @ level YY [1C 08 01] -
  13. 13. CUTSCENE CONTROL [1F E5 FF] - Lock movement [1F F1/F2 XX XX YY YY] -
 Assign movement pattern [1F E4 XX XX DD] - 
 Change sprite direction
  14. 14. MISCELLANEOUS [1F F0 02] - 
 Summon bicycle [1F D2 XX] - 
 Summon camera guy [1F 21 XX] - 
 Teleport to $XX
  15. 15. http://starmen.net/pkhack/pk_docs/lexicon.txt
  16. 16. http://starmen.net/pkhack/hacks/
  17. 17. CCSCRIPT if hasitem(1, 0x63) { "@Hey, you have a magic truffle!" next "@Would you be willing to sell it?" next menu { "Yes" : "@Cool beans. How does $2 sound?" "No" : "@Not even if I sweetened the deal?" } } end https://starmen.net/pkhack/ccscript/ http://bit.ly/ccscript-lib
  18. 18. COILSNAKE https://mrtenda.github.io/CoilSnake/ Edit just about anything
 in EarthBound! Includes a CCScript 
 dumper and editor
  19. 19. all done, boing! THANK YOU, zoom! @alexras
 alexras.info bitsondisk.com Special thanks to EarthBound Central and starmen.net for the inspiration

×