forked from vadosnaprimer/macrolua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacro-readme.html
333 lines (258 loc) · 26.4 KB
/
macro-readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://www.w3.org/2005/10/profile">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<style type="text/css">
body { color: #000000 ; background-color: #FFFFFF ; font-family: sans-serif ; text-align: justify ; margin-right: 20px ; margin-left: 20px ; }
h1, h2, h3, h4, h6 { font-weight: normal ; font-style: italic ; }
a:link { color: #000080 ; text-decoration: none ; }
a:visited { text-decoration: none ; }
a:link:hover, a:visited:hover { color: #000080 ; background-color: #E0E0FF ; }
a:link:active, a:visited:active { color: #FF0000 ; }
hr { border: 0 ; height: 1px ; color: #a0a0a0 ; background-color: #a0a0a0 ; }
ul { list-style-position: outside ; }
table, td, th { border: 1px solid black ; }
td, th { padding: 4px ; }
th { text-align: center ; }
h6 { margin: 0 ; text-align: right ; }
.emu { font-weight: bold ; width: 14% ; }
.yes { background-color: #BBFFBB ; }
.no { background-color: #FFBBBB ; }
.meh { background-color: #CCCCCC ; }
.foot { vertical-align: super ; font-size: 60% ; }
#foot { font-size: 80% ; }
#feat { list-style-type: upper-alpha ; }
</style>
<title>MacroLua Documentation</title>
</head>
<body>
<h1>MacroLua Documentation</h1>
<h2><a name="TOC"/>Contents</h2>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#mame-rr">A word on MAME-rr</a></li>
<li><a href="#usage">How to use macros</a>
<ul>
<li><a href="#playback">How to play back</a></li>
<li><a href="#record">How to record</a></li>
<li><a href="#keys" />Key bindings</li>
<li><a href="#savestates" />Savestates</li>
</ul></li>
<li><a href="#write">How to read and write macros</a></li>
<li><a href="#modules">Control modules</a></li>
<li><a href="#settings" />Configuration options</li>
<li><a href="#special" />Special playback modes</li>
<li><a href="#mutebgm">How to mute the background music in arcade games</a></li>
<li><a href="#emus">Lua feature availability in each emulator</a></li>
</ul>
<hr />
<h2><a name="intro" />Introduction</h2>
<p>The purpose of this Lua script is to play back and record sequences of button presses in a compact format that is easily readable and editable. Some applications:</p>
<ul>
<li>an alternative to using serialized rerecords for recording input, which can be easier with multiple players</li>
<li>a functional, parseable markup that doubles as a shorthand transcript notation, good for fighting game combo videos</li>
<li>a converter that can change an input sequence from a cryptic format such as <a href="http://code.google.com/p/fbarr/wiki/FBMfileformat">FBM</a> to a human readable one for further editing</li>
<li>a converter that can change an input sequence from one emulator to another</li>
</ul>
<p>MacroLua is portable to any emulator equipped with the core EmuLua functions. It can still work in a limited capacity if some of the functions are missing.</p>
<hr />
<h2><a name="mame-rr" />A word on MAME-rr</h2>
<p>The current version of <a href="http://code.google.com/p/mame-rr/downloads/list">MAME-rr</a> (0139-test2) has some oddities with the savestate system and the first few scripted frames get merged together. To avoid problems:</p>
<ul>
<li>Start playing scripts with the emulator in an unpaused state. Starting from pause will be off by one frame.</li>
<li>Leave at least a few blank frames at the start.</li>
<li>If scripting a save, leave a few blank frames after the last input.</li>
<li>Don't try to load states if using recording mode. Recording is not bulletproof.</li>
</ul>
<hr />
<h2><a name="usage" />How to use macros</h2>
<p>Download and set up one of the supported <a href="#emus">emulators</a>. Choose the latest available version.</p>
<p>Extract the macro archive contents into the emulator's folder. Open <i>macro-options.lua</i> with a text editor and ensure that the macrofile to be played and the path settings are correct. The default path looks for the macros in a folder called <i>./macro</i>.</p>
<p>Run the emulator and open the game. Find <i>Lua Scripting</i> in the menus (Ctrl+L in MAME-rr) and open a script window. Browse for <i>macro.lua</i> and run it. If there's a gamekey definition module available for your game, it is identified in the output console. In the case of arcade emus, the <i>input-display.lua</i> script is run alongside the macro script.</p>
<h3><a name="playback" />How to play back</h3>
<p>Get to the desired point in the game and press the start key (semicolon, or whatever is bound to Lua hotkey 1) to start playback. The macro specified will be analyzed, and warnings appear in the output console if it is misformatted. The scripted sequence will proceed as the game runs normally or in frame advance.</p>
<p>You may replay the macro repeatedly. You may cut the playback short by pressing the start key again before playback is complete. You may also edit the macro file and play the new macro without reloading the script.</p>
<h3><a name="record" />How to record</h3>
<p>Get to the desired point in the game and press the record key (quote, or Lua hotkey 2) to start recording. Any keys input by the player(s), by keypress recordings such as FBM, or even by a playing macro will be recorded. You can use frame advance for more precision. Savestate operations and analog controls are not recorded. Pressing the record key again stops and writes the recording to a <i>.mis</i> file named after the date and time. If multiple players were recorded, the macro is output in asynchronous (bracket) format.</p>
<h3><a name="keys" />Key bindings</h3>
<p>If the emulator supports <code>input.registerhotkey()</code>, the keys to start and stop macros are Lua hotkeys 1 and 2 rather than semicolon and quote. These keys can be bound in the emulator's hotkey configuration.</p>
<h3><a name="savestates" />Savestates</h3>
<p>Some emulators allow the progress of any macros being played or recorded to be saved alongside the savestate. Loading this savestate also restores the progress and the playing/recording status. If this is not supported, loading a savestate during a macro will cause a desync.</p>
<p>Even if those functions aren't available, savestate operations may always be written into the script, and scripts should start with a savestate to ensure consistent playback.</p>
<hr />
<h2><a name="write" />How to read and write macros</h2>
<p>You may produce macros by recording them or by writing them out according to the format below.</p>
<p>In the following commands, <code>n</code> represents a number and <code>k</code> represents a key (direction, button or switch) defined by the game's <a href="#modules">module</a>.</p>
<table>
<tr><th><code>k</code></th>
<td>Input the gamekey <code>k</code>. The key is pressed for the current frame only and then released.</td></tr>
<tr><th><code>_k</code></th>
<td>Hold the gamekey <code>k</code>. The key is pressed for the current frame and any subsequent frames until released.</td></tr>
<tr><th><code>^k</code></th>
<td>Release the gamekey <code>k</code>, if held.</td></tr>
<tr><th><code>*</code></th>
<td>Release all held keys.</td></tr>
<tr><th><code>k[n]</code></th>
<td>Set the analog control <code>k</code> to the (decimal) value <code>n</code> for one frame.</td></tr>
<tr><th><code>k[-nh]</code></th>
<td>You may use a minus sign to set the an analog to a negative number, and <code>h</code> to signify a hexadecimal number.</td></tr>
<tr><th><code>_k[n]</code></th>
<td>Hold an analog control at the value <code>n</code>. You may change the held value by entering another hold. There's no need to release first.</td></tr>
<tr><th><code>^k[n]</code></th>
<td>When releasing an analog control, it makes no difference if there is a <code>^</code> or not. Either way the value is set for one frame and then the control is released. Use <code>*</code> or a value of 0 for immediate release.</td></tr>
<tr><th><code>F</code></th>
<td>Input <code>R</code> for player 1 or odd numbered players, or <code>L</code> for player 2 or even numbered players.</td></tr>
<tr><th><code>B</code></th>
<td>Input <code>L</code> for player 1 or odd numbered players, or <code>R</code> for player 2 or even numbered players.</td></tr>
<tr><td colspan="2">
<ul><li><code>F</code> and <code>B</code> only get substituted if the module is using <code>L</code> and <code>R</code> and not already using <code>F</code> or <code>B</code>.</li></ul>
</td></tr>
<tr><th><code>.</code></th>
<td>Advance one frame.</td></tr>
<tr><th><code>Wn</code></th>
<td>Advance (wait) <code>n</code> frames.</td></tr>
<tr><th><code>Wn?</code></th>
<td>Incremental wait mode: If a wait command is followed by a <code>?</code>, the macro will loop back to the beginning when it reaches the end and repeat indefinitely, both the savestates and the inputs. Stop by pressing the playback key again.
<br /><br />After each iteration, the value of <code>n</code> increases by one, and the value is displayed on screen. This is a more efficient way of finding the optimal wait period for a setup. There can be no more than one incremental wait in a script. If incremental wait is used, <a href="#settings">standard loop mode</a> is disabled.</td></tr>
<tr><th><code>+</code></th>
<td>Select player 1.</td></tr>
<tr><th><code>-</code></th>
<td>Select the next player.</td></tr>
<tr><td colspan="2">
<h4>Synchronous multi-player control with <code>+ -</code></h4><ul>
<li>Commands are applied only to the selected player.</li>
<li>Player 1 is selected by default.</li>
<li>The <code>+</code> and <code>-</code> symbols are used to switch between players.</li>
<li>Time advancement applies to all players.</li>
<li>Nonselected players can give input with their held keys.</li>
<li>To modify the input of multiple players on the same frame, switch between them before advancing frames.</li>
</ul></td></tr>
<tr><th><code><</code></th><td>Open a bracketed section and switch control to player 1.</td></tr>
<tr><th><code>/</code></th><td>Switch to the next player in a bracketed section.</td></tr>
<tr><th><code>></code></th><td>Close a bracketed section.</td></tr>
<tr><td colspan="2">
<h4>Asynchronous multi-player control with <code>< / ></code></h4><ul>
<li>Commands are applied only to the selected player.</li>
<li>Player 1 is selected when the brackets are opened.</li>
<li>Control is switched to the next player after each <code>/</code>.</li>
<li>Time advancement applies only to the selected player.</li>
<li>When the brackets are closed, time is advanced to the point of the player with the most frames, wait frames are added to the others to make up the difference, all player inputs are multiplexed, and control returns to player 1.</li>
<li>The <code>+-</code> symbols are ignored inside brackets.</li>
</ul></td></tr>
<tr><th><code>$n</code></th>
<td>Save the current state to slot <code>n</code>. This can save checkpoints in a long sequence of commands.</td></tr>
<tr><th><code>&n</code></th>
<td>Load savestate slot <code>n</code>. This is useful to put in the first frame.</td></tr>
<tr><td colspan="2">
<p>Save and load operations are performed one frame before the game inputs at the same position. For example, a state operation placed between the second and third dots is done after the second frame advance, while the game inputs there are done after the third. This behavior allows operations to be scripted on the zeroth frame of the macro, resulting in a movie that effectively starts from savestate.</p>
<p>Each emulator has its own limit on savestate indexes.</p>
</td></tr>
<tr><th><code>()n</code></th>
<td>Repeat the commands enclosed in the parentheses <code>n</code> times. Loops can be nested.</td></tr>
<tr><th><code>#text</code></th>
<td>A comment. The rest of the line after the symbol is ignored by the parser.<br />Comments should explain the setup and goal of the macro.</td></tr>
<tr><th><code>!</code></th>
<td>End the macro. Any content after the end is ignored by the parser, and can be used as comments.<br />Don't forget to advance at least one frame after the last input and before the end.</td></tr>
<tr><th><code>???</code></th>
<td>If a script has three consecutive <code>?</code> symbols in an uncommented area, MacroLua converts it to the expanded one-line-per-frame format. Analog control values are given as hexadecimal numbers. The conversion occurs instead of playback and is activated by the playback key. The result is saved as a text file. This feature can help in analyzing and debugging scripts.</td></tr>
</table>
<p>Macros are case insensitive. Commas, whitespaces, tabs and newlines can be used for spacing and legibility, but are ignored by the script. The exception is that some separation is required between multiplier or index numbers (such as after a <code>W</code>) and numerical key presses.</p>
<hr />
<h2><a name="modules" />Control modules</h2>
<p>The game inputs and the symbols used to activate them depend on game system. MacroLua selects the symbol-input mapping based on what emulator is running it, and in the case of arcade, based on the game being run. The traditional format is <code>U</code>,<code>D</code>,<code>L</code>,<code>R</code> for up, down, left and right, and numbers counting up from <code>1</code> for the buttons. Symbols should be a single character for digital controls, but analog symbols can have multiple characters.</p>
<p>Avoid using the reserved characters in symbols: <code><b>. W w _ ^ * + - < / > ( ) [ ] $ & # ! ?</b></code></p>
<p>The available sets are written in <i>macro-modules.lua</i>, and more can be added. Ask for help if needed. The non-arcade systems have a single keyset for all games, so the format only needs to be defined once for each console. However, there are many undefined arcade profiles. MacroLua tries to autogenerate an arcade module if none is available by observing what keys are present in the game. This should work well with games that use an ordinary joystick and numbered buttons.</p>
<hr />
<h2><a name="settings" />Configuration options</h2>
<p>The <i>macro-options.lua</i> file contains the user settings. This file can be edited with any text editor. To update settings, restart the Lua script.</p>
<table>
<tr><td colspan="2" align="center">The file, path and key options must be enclosed in quotes.
<br />The hotkey options are ignored if the emulator supports Lua hotkeys.</td></tr>
<tr><th><code>playbackfile</code></th>
<td>This is the filename of the script to be played.</td></tr>
<tr><th><code>path</code></th>
<td>This is the path where the script file is found and where recordings will be placed. The path may be either relative to <i>macro.lua</i> or absolute. Use either double forward slashes (<code>.\\path\\</code>) or single backslashes (<code>./path/</code>).</td></tr>
<tr><th><code>playkey</code></th>
<td>Press to start playing the specified script or to cancel an already playing script.</td></tr>
<tr><th><code>recordkey</code></th>
<td>Press to start recording input to a new script and to finish a recording in progress.</td></tr>
<tr><th><code>togglepausekey</code></th>
<td>When a macro finishes, the game can be paused automatically. Press this to turn autopause on or off. There is a pause between each repetition in standard loop mode or incremental wait mode.</td></tr>
<tr><th><code>toggleloopkey</code></th>
<td>If loop mode is active, the macro will loop back to the beginning when it reaches the end and repeat indefinitely, both the savestates and the inputs. Stop by pressing the playback key again.
<br /><br />This is useful if you want to make successive changes to a script without having to enter the play command each time. If the emulator supports <a href="#emus">lua+user</a> input, this can also be used for practicing against a scripted attack from the other player.
<br /><br />If <a href="#write">incremental wait mode</a> is active, this key instead cycles between increasing, decreasing, or preserving the delay.</td></tr>
<tr><td colspan="2" align="center">After recording player input, the results are written to file. The following three options affect the style of the output:</td></tr>
<tr><th><code>longwait</code></th>
<td>Idle frames are collapsed into <code>Wn</code> phrases as a shorthand. This option specifies the minimum number of idle frames to trigger this. Set it to <code>0</code> to never use <code>Wn</code> phrases.</td></tr>
<tr><th><code>longpress</code></th>
<td>When an input is active for many consecutive frames, it is abbreviated as a <code>_k</code> at the beginning and a corresponding <code>^k</code> at the end instead of writing <code>k</code> every frame. This option specifies the minimum number of held frames to trigger this. Set it to <code>0</code> to never use <code>_k ^k</code> phrases.</td></tr>
<tr><th><code>longline</code></th>
<td>Each player's input can be broken up into multiple lines. This option specifies the minimum number of characters to trigger a linebreak. Set it to <code>0</code> to not break up lines.</td></tr>
<tr><th><code>framemame</code></th>
<td>Set to <code>true</code> only if running a script that was made for frameMAME, so that the parser can ignore the audio commands.<br />Otherwise leave as <code>false</code>. This only applies to FBA-rr and MAME-rr.</td></tr>
</table>
<p>If the emulator doesn't use Lua hotkeys, you must define hotkeys manually. They must be selected from the following list.<br /><b>Key names are case sensitive.</b></p>
<p><code> shift, control, alt, capslock, numlock, scrolllock, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, backspace, tab, enter, pause, escape, space, pageup, pagedown, end, home, insert, delete, left, up, right, down, numpad0, numpad1, numpad2, numpad3, numpad4, numpad5, numpad6, numpad7, numpad8, numpad9, numpad*, numpad+, numpad-, numpad., numpad/, tilde, plus, minus, leftbracket, rightbracket, semicolon, quote, comma, period, slash, backslash</code></p>
<hr />
<h2><a name="special" />Special playback modes</h2>
<p>Here is a review of MacroLua's special modes:</p>
<table>
<tr><th>mode</th><th>activated by</th><th>function</th></tr>
<tr><td>text dump mode</td><td><code>???</code> written in the script</td><td>Output the script to an expanded frame-by-frame form that may be easier to read.<br />(No playback.)</td></tr>
<tr><td>incremental wait mode</td><td><code>Wn?</code> written in the script</td><td>Loop and automatically adjust the wait period after each iteration.<br />(Macro file is not reread between loops.)</td></tr>
<tr><td>standard loop mode</td><td>press the toggle loop key</td><td>Loop and automatically reread the macro file after each iteration.</td></tr>
</table>
<hr />
<h2><a name="mutebgm" />How to mute the background music in arcade games</h2>
<p>You may want to record videos with the sound effects but without the music. The reliable method to disable music is with a cheat code: The memory addresses that control music are forced to hold values that prevent it from playing.</p>
<p>For FBA-rr, find the code that works for your game in the <i>./FBA examples/mutecodes.txt</i> file provided. Copy the code into an .ini file that matches the rom's short name and put it in FBA's cheat folder (e.g. <i>./support/cheats/sfa3.ini</i>). You may augment this file with other codes as well. Then run the rom (restart if already running) and find <i>Enable Cheats</i> in the <i>Misc</i> menu. If the .ini is properly formatted, the option is available. Click the music entry and select the disable option from the dropbox.</p>
<p>The available FBA mute codes have been converted to MAME xml format and are found in the <a href="http://cheat.retrogames.com/">official cheat code pack</a>. Place <i>cheat.zip</i> in MAME-rr's folder to make the codes available. Access the cheats from the in-game menu in MAME.</p>
<p>Not all games have known mute codes. You can request more at <a href="http://www.mamecheat.co.uk/forums/">Pugsy's site</a>.</p>
<hr />
<h2><a name="emus" />Lua feature availability in each emulator</h2>
<table>
<tbody align="center">
<tr><th>emulator</th><th>version tested</th><th><code>emu</code> alias</th><th>hotkey while<br />paused</th><th>lua+user<br />input</th><th>bulletproof<br />savestates</th><th>adapt to<br />ROMs</th><th>analog<br />scripting</th></tr>
<tr><td class="emu"><a href="http://code.google.com/p/mame-rr/downloads/list">MAME-rr</a></td><td class="yes">0139-test2</td><td class="yes"><code>mame</code></td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td><td class="yes">○</td><td class="no">×</td></tr>
<tr><td class="emu"><a href="http://code.google.com/p/fbarr/downloads/list">FBA-rr</a></td><td class="yes">0.0.5a</td><td class="yes"><code>fba</code></td><td class="yes">○</td><td class="yes">○</td><td class="yes">○</td><td class="yes">○</td><td class="yes">○</td></tr>
<tr><td class="emu"><a href="http://code.google.com/p/pcsxrr/downloads/list">PCSX-rr</a></td><td class="yes">0.1.3b</td><td class="yes"><code>pcsx</code></td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td><td class="no">×</td><td class="no">×</td></tr>
<tr><td class="emu"><a href="http://code.google.com/p/psxjin/downloads/list">psxjin</a></td><td class="yes">2.0 svn619</td><td class="yes"><code>psxjin</code></td><td class="no">×</td><td class="yes">○</td><td class="no">×</td><td class="no">×</td><td class="no">×</td></tr>
<tr><td class="emu"><a href="http://code.google.com/p/gens-rerecording/downloads/list">Gens-rr</a></td><td class="yes">11 svn296</td><td class="yes"><code>gens</code></td><td class="yes">○</td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td><td class="meh">n/a</td></tr>
<tr><td class="emu" rowspan="3"><a href="http://code.google.com/p/snes9x-rr/downloads/list">snes9x-rr</a></td><td class="yes">1.43 svn146</td><td class="yes"><code>snes9x</code></td><td class="no">×</td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td><td class="meh" rowspan="3">n/a</td></tr>
<tr><td class="no">1.51 svn147<a class="foot" href="#1">[1]</a></td><td class="yes"><code>snes9x</code></td><td class="no">×</td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td></tr>
<tr><td class="no">1.52 r185<a class="foot" href="#2">[2]</a></td><td class="no">×</td><td class="yes">○</td><td class="no">×</td><td class="no">×</td><td class="no">×</td></tr>
<tr><td class="emu" rowspan="2"><a href="http://code.google.com/p/vba-rerecording/downloads/list">VBA-rr</a></td><td class="yes"><a href="http://code.google.com/p/vba-rerecording/downloads/detail?name=vba-rerecording-svn225-win32.zip">svn225</a></td><td class="yes"><code>vba</code></td><td class="no">×</td><td class="yes">○</td><td class="no">×</td><td class="no">×</td><td class="meh" rowspan="2">n/a</td></tr>
<tr><td class="no">23.4a<a class="foot" href="#3">[3]</a></td><td class="yes"><code>vba</code></td><td class="no">×</td><td class="yes">○</td><td class="no">×</td><td class="no">×</td></tr>
<tr><td class="emu"><a href="http://www.fceux.com/web/download.html">FCEUX</a></td><td class="yes">2.1.4a</td><td class="yes"><code>FCEU</code></td><td class="yes">○</td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td><td class="meh">n/a</td></tr>
<tr><td class="emu"><a href="http://code.google.com/p/pcejin/downloads/list">PCEjin</a></td><td class="no">SVN177<a class="foot" href="#3">[4]</a></td><td class="no">×</td><td class="yes">○</td><td class="yes">○</td><td class="yes">○</td><td class="no">×</td><td class="meh">n/a</td></tr>
<tr><th><a href="http://desmume.org/">DeSmuMe</a></th><td>0.9.6</td><td colspan="6">not yet tested</td></tr>
<tr><th><a href="http://code.google.com/p/mednafen-rr/">mednafen-rr</a></th><td>1.1</td><td colspan="6">use <a href="http://code.google.com/p/macrolua/wiki/TranScripterDocumentation">TranScripter</a></td></tr>
<tr><th><a href="http://code.google.com/p/yabause-rr/">yabause-rr</a></th><td>svn2541</td><td colspan="6">use <a href="http://code.google.com/p/macrolua/wiki/TranScripterDocumentation">TranScripter</a></td></tr>
<tr><th><a href="http://code.google.com/p/mupen64-rr/">mupen64-rr</a></th><td>v8</td><td colspan="6">does not support Lua</td></tr>
</tbody></table>
<div id="foot"><ol>
<li><a name="1"></a>snes9x 1.51 svn147 only accepts Lua input from within a <code>while true do</code> loop, so playback won't work.</li>
<li><a name="2"></a>snes9x 1.52 r185 lacks an <code>emu</code> alias, <code>savestate.save</code>, <code>savestate.load</code> and the entire <code>joypad</code> library.</li>
<li><a name="3"></a>VBA versions after svn225 only accept Lua input from within a <code>while true do</code> loop and won't work.</li>
<li><a name="4"></a>PCEjin may only need an <code>emu</code> alias to work.</li>
</ol></div>
<table>
<tr><th><code>emu</code> alias</th>
<td>MacroLua identifies the emulator and control scheme by the name of this table of functions.</td></tr>
<tr><th>hotkey while paused</th>
<td>If <code>input.registerhotkey()</code> is available, the user can start and stop recording during pause. The fallback is <code>input.get()</code>, which has the same function but cannot be done while paused.
<br /><br />However, it's possible to use <code>input.get()</code> while paused in PCSX and FCEUX, due to a defect in the Lua implementation. In these cases the hotkeys will activate even if the emulator is not in focus.</td></tr>
<tr><th>lua+user input</th>
<td>The emulator may take input from both a Lua script and the user simultaneously if <code>joypad.set()</code> allows it.</td></tr>
<tr><th>bulletproof savestates</th>
<td>The user may load savestates while playing or recording without losing progress if <code>savestate.registersave() and savestate.registerload()</code> are available. MAME-rr has other problems with savestates.
<br /><br />This feature has not been well tested.</td></tr>
<tr><th>adapt to ROMs</th>
<td>MacroLua can name recordings and reset the control scheme based on the loaded game if <code>emu.registerstart()</code> and <code>emu.romname()</code> are available.</td></tr>
<tr><th>analog scripting</th>
<td>If the emulator's system has analog controls and the emu handles them properly with <code>joypad.set()</code>, MacroLua can script analog inputs.</td></tr>
</table>
<h6>2/18/2011</h6>
</body>
</html>