Tickompiler Documentation Release 1.9.0
Total Page:16
File Type:pdf, Size:1020Kb
Tickompiler Documentation Release 1.9.0 chrislo27, SneakySpook May 29, 2021 Tickflow Documentation 1 Basic Tickflow Syntax 3 1.1 Function Calls..............................................3 1.2 Compile-time Variables.........................................4 1.3 Markers..................................................4 1.4 Directives.................................................4 2 Key Tickflow Concepts / Glossary5 3 Known Global Tickflow Operations7 3.1 Asynchronous Subroutine (0)......................................7 3.2 Get Async/Set Function (1).......................................7 3.3 Async Call Location (2).........................................8 3.4 Kill Threads (3).............................................8 3.5 Subroutine (4)..............................................8 3.6 Get Sync (5)...............................................8 3.7 Call Location (6).............................................9 3.8 Return (7).................................................9 3.9 Stop (8)..................................................9 3.10 Set Category (9).............................................9 3.11 Set Conditional Variable (0xA).....................................9 3.12 Add Conditional Variable (0xB).....................................9 3.13 Push Conditional Variable (0xC).....................................9 3.14 Pop Conditional Variable (0xD)..................................... 10 3.15 Rest (0xE)................................................ 10 3.16 Get/Set Rest (0xF)............................................ 10 3.17 Reset Rest Counter (0x11)........................................ 10 3.18 Unrest (0x12)............................................... 10 3.19 Label (0x14)............................................... 10 3.20 Goto (0x15)............................................... 11 3.21 If, Else, Endif (0x16. 0x18)...................................... 11 3.22 Switch, Case, Break, Default, Endswitch (0x19. 0x1D)........................ 11 3.23 Countdown (0x1E)............................................ 12 3.24 Speed (0x24)............................................... 12 3.25 Relative Speed (0x25).......................................... 13 3.26 Engine (0x28).............................................. 13 3.27 Set Game to Asset Slot (0x2A)..................................... 13 3.28 Model Asset Management (0x31).................................... 13 i 3.29 Cellanim Asset Management (0x35)................................... 14 3.30 Effect Asset Management (0x39).................................... 14 3.31 Layout Asset Management (0x3E).................................... 14 3.32 Play SFX (0x40)............................................. 15 3.33 Set SFX Slot (0x5D)........................................... 15 3.34 Remove SFX (0x5F)........................................... 15 3.35 Enable/Disable Input (0x6A)....................................... 15 3.36 Zoom View (0x7E)............................................ 16 3.37 Pan View (0x7F)............................................. 16 3.38 Rotate View (0x80)............................................ 16 3.39 Skill Star (0xAE)............................................. 16 3.40 Random (0xB8)............................................. 17 4 Game Engines 19 4.1 Spaceball (0)............................................... 21 4.2 Clappy Trio (1).............................................. 22 4.3 Sneaky Spirits (2)............................................ 23 4.4 Rhythm Tweezers (3)........................................... 24 4.5 Bouncy Road (4)............................................. 26 4.6 Marching Orders (5)........................................... 26 4.7 Night Walk (6).............................................. 28 4.8 Quiz Show (7).............................................. 29 4.9 Bunny Hop (8).............................................. 32 4.10 Rat Race (9)............................................... 32 4.11 Power Calligraphy (0xA)......................................... 34 4.12 Space Dance (0xB)............................................ 37 4.13 Tap Trial (0xC).............................................. 39 4.14 Ninja Bodyguard (0xD)......................................... 42 4.15 Airboarder (0xE)............................................. 43 4.16 Lockstep (0xF).............................................. 45 4.17 Blue Birds (0x10)............................................ 46 4.18 The Dazzles (0x11)............................................ 48 4.19 Freeze Frame (0x12)........................................... 51 4.20 Glee Club (0x13)............................................. 53 4.21 Frog Hop (0x14)............................................. 55 4.22 Fan Club (0x15)............................................. 58 4.23 Dog Ninja (0x16)............................................. 61 4.24 Rhythm Rally (0x17)........................................... 62 4.25 Fillbots (0x18).............................................. 63 4.26 Shoot-‘Em-Up (0x19).......................................... 65 4.27 Big Rock Finish (0x1A)......................................... 66 4.28 Munchy Monk (0x1B).......................................... 69 4.29 Built to Scale (0x1C)........................................... 70 4.30 Air Rally (0x1D)............................................. 73 4.31 Exhibition Match (0x1E)......................................... 75 4.32 Flockstep (0x1F)............................................. 78 4.33 Cheer Readers (0x20).......................................... 79 4.34 Double Date (0x21)........................................... 82 4.35 Catch of the Day (0x22)......................................... 83 4.36 Micro-Row (0x23)............................................ 85 4.37 Fork Lifter (0x24)............................................ 86 4.38 Hole in One (0x25)............................................ 87 4.39 Flipper-Flop (0x26)........................................... 88 4.40 Ringside (0x27)............................................. 90 ii 4.41 Karate Man (0x28)............................................ 92 4.42 Working Dough (0x29).......................................... 96 4.43 Figure Fighter (0x2A).......................................... 97 4.44 Love Rap (0x2B)............................................. 100 4.45 Bossa Nova (0x2C)............................................ 102 4.46 Screwbot Factory (0x2D)........................................ 103 4.47 Launch Party (0x2E)........................................... 105 4.48 Board Meeting (0x2F).......................................... 107 4.49 Samurai Slice (0x30)........................................... 109 4.50 See-Saw (0x31)............................................. 112 4.51 Packing Pests (0x32)........................................... 113 4.52 Monkey Watch (0x33).......................................... 115 4.53 Blue Bear (0x34)............................................. 116 4.54 Animal Acrobat (0x35).......................................... 118 4.55 Tongue Lashing (0x36).......................................... 120 4.56 Super Samurai Slice (0x37)....................................... 123 iii iv Tickompiler Documentation, Release 1.9.0 Tickompiler is a compiler and decompiler for Tickflow, a language constructed from the bytecode format used by the game Rhythm Heaven Megamix for the Nintendo 3DS to create the sequence of events in its rhythm games and remixes. Tickompiler allows easy editing of these rhythm games in a more human-readable format. Tickflow Documentation 1 Tickompiler Documentation, Release 1.9.0 2 Tickflow Documentation CHAPTER 1 Basic Tickflow Syntax Every line in tickflow is one of four things: • Function Calls, which directly correspond to a single bytecode instruction. These are the only lines of tickflow that translate into bytecode; • Compile-time variable assignments, which do not correspond to bytecode, but rather allow you to use constant variables to replace magic numbers; • Markers, which allow you to use locations in the tickflow code as variables; • and Directives, which include custom function aliases and file metadata. 1.1 Function Calls Function calls are of the form op<special> arg1, arg2... Here, op is either a name or a number; it determines what operation is performed. In bytecode, the opcode is a number between 0 and 0x3FF. This is an accepted value for op in Tickflow, but there are a number of known operations that have defined names in Tickflow. Examples include rest, if and case. <special> is an expression enclosed in <>, which is used as a special argument for the operation. The function of this special argument varies per operation, but it can also be used to differentiate similar operations in place of creating a separate op value for it. <special> can be omitted, in which case it defaults to 0. Following the special argument is a comma-separated list of arguments. These are all expressions, and their effect and amount depends on the operation. There can be from 0 up to 15 arguments. 1.1.1 Expressions Expressions resolve to numbers. They consist of variables, numbers and mathematical operations. The operators you can use for expressions are multiplication (*), addition (+), subtraction (-), integer division (/), bitwise right shift 3 Tickompiler Documentation, Release 1.9.0 (>>), bitwise left shift (<<), bitwise AND (&), bitwise OR (|), and bitwise XOR (^). Examples of expressions include 5, 0xFE3, 0xFF << 5, and x + 2. 1.2 Compile-time Variables Compile-time