Earthbound Control Codes is a proprietary collection of dialogue and scripting codes with something very like a [[ISA|bytecode interpreter]] written in native ASM developed by Hal/Ape. - Specification - Documentation > QUOTE # Notability ## Implementations The entire [Mother](<https://en.wikipedia.org/wiki/Mother_(video_game)>) series has a bizarre development history and all of them contain very quirky code. Mother 2 (AKA [Earthbound](https://en.wikipedia.org/wiki/EarthBound)) used a [unique system](https://starmen.net/mother2/gameinfo/script/) of [control codes](https://datacrystal.romhacking.net/wiki/EarthBound:Control_Codes) directly embedded in dialogue text in order to trigger events and influence the rest of the game in a similar way to other advanced dialogue systems. This innovation predated the Bioware system by several years and despite its complexity was implemented on meager SNES hardware. Earthbound's dialogue control codes can be viewed as a powerful bytecode scripting system that extends quite far beyond just simple lines of text. [Mother 3](https://en.wikipedia.org/wiki/Mother_3) also demonstrates a bunch of similar embedded codes in its [dialogue](https://earthboundcentral.com/m3script/). # Instruction Set ```cardlink url: https://datacrystal.romhacking.net/wiki/EarthBound:Control_Codes title: "EarthBound:Control Codes - Data Crystal" host: datacrystal.romhacking.net favicon: https://datacrystal.romhacking.net/favicon.ico ``` | | Purpose | Description | | --- | ---------------------------------------------------------- | ----------- | | | Line Break | | | | Start on Blank Line | | | | Stop Parsing | | | | Halt Parsing with Prompt - Variable | | | | Toggle On Event Flag | | | | Toggle Off Event Flag | | | | Event-Dependent Pointer | | | | Return Event Flag | | | | Reference Pointer | | | | Multiple-Address Jump Pointer | | | | Jump Pointer | | | | Perform Boolean True Check - Equal to Working Memory | | | | Perform Boolean False Check - Equal to Working Memory | | | | Copy to Argumentative Memory | | | | Store to Secondary Memory | | | | Increment Secondary Memory | | | | Delay Parsing | | | | Creation Selection Menu from Strings | | | | Clear Text Line | | | | Halt Parsing without Prompt | | | | Halt Parsing with Prompt | | | | Display Compressed Text/Bank 0 | | | | Display Compressed Text/Bank 1 | | | | Display Compressed Text/Bank 2 | | | | Close Current Window | | | | Open Text Window | | | | Save Text Window State | | | | Switch to Window | | | | Close All Windows | | | | Force Text Alignment | | | | Clear Current Window | | | | Compare Window Register to Number | | | | Selection Menu in Window, No Cancelling | | | | Selection Menu in Window | | | | Show Wallet Window | | | | Print Character Status Info | | | | Load String to Memory | | | | Clear All Loaded Strings | | | | Return Character Number | | | | Return One Later from a Character's Name | | | | Return One Item from Escargo Express Storage | | | | Return Byte YY of Character's Status | | | | Return Amount of Exp Needed to Levelup | | | | Return YYth Item from Character XX's Inventory | | | | Return XXth Item in Escargo Express Inventory | | | | Return Number of Strings Loaded with [19 02] for Window XX | | | | Queue Item for Delivery/Pickup | | | | | | etc # History # Footnotes # References