Guest User

Untitled

a guest
Mar 30th, 2018
509
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. * emu.app_name() - return application name
  2. * emu.app_version() - return application version
  3. * emu.gamename() - returns game full name
  4. * emu.softname() - returns softlist name
  5. * emu.keypost(keys) - post keys to natural keyboard
  6. * emu.time() - return emulation time
  7. * emu.start(driver) - start given driver
  8. * emu.pause() - pause emulation
  9. * emu.unpause() - unpause emulation
  10. * emu.register_prestart(callback) - callback before reset
  11. * emu.register_start(callback) - callback after reset
  12. * emu.register_stop(callback) - callback after stopping
  13. * emu.register_pause(callback) - callback at pause
  14. * emu.register_resume(callback) - callback at resume
  15. * emu.register_frame(callback) - callback at end of frame
  16. * emu.register_frame_done(callback) - callback after frame is drawn to screen (for overlays)
  17. * emu.register_periodic(callback) - periodic callback while program is running
  18. * emu.register_menu(event_callback, populate_callback, name) - callbacks for plugin menu
  19. * emu.print_verbose(str) -- output to stderr at verbose level
  20. * emu.print_error(str) -- output to stderr at error level
  21. * emu.print_info(str) -- output to stderr at info level
  22. * emu.print_debug(str) -- output to stderr at debug level
  23. * emu.driver_find(driver) -- find and return game_driver for driver
  24. * emu.wait(len) -- wait for len within coroutine
  25. * emu.lang_translate(str) -- get translation for str if available
  26.  
  27.  
  28. * emu.file([opt] searchpath, flags) - flags can be as in osdcore "OPEN_FLAG_*" or lua style with 'rwc' with addtional c for create *and truncate* (be careful)
  29. * support zipped files on the searchpath
  30. * file:open(name) - open first file matching name in searchpath, supports read and write sockets as "socket.127.0.0.1:1234"
  31. * file:open_next() - open next file matching name in searchpath
  32. * file:read(len) - only reads len bytes, doen't do lua style formats
  33. * file:write(data) - write data to file
  34. * file:seek(offset, whence) - whence is as C "SEEK_*" int
  35. * file:seek([opt] whence, [opt] offset) - lua style "set"|"cur"|"end", returns cur offset
  36. * file:size() -
  37. * file:filename() - name of current file, container name if file is in zip
  38. * file:fullpath() -
  39.  
  40.  
  41. * emu.thread()
  42. * thread.start(scr) - run scr (string not function) in a seperate thread in a new empty (other then modules) lua context
  43. * thread.continue(val) - resume thread and pass val to it
  44. * thread.result() - get thread result as string
  45. * thread.busy - check if thread is running
  46. * thread.yield - check if thread is yielded
  47.  
  48. manager:options()
  49. * machine:options()
  50. * machine:ui():options()
  51. * options:help() - get help for options
  52. * options:command(command) - return output for command
  53. * options.entries[] - get table of option entries
  54.  
  55. options.entries[entry_name]
  56. * entry.value() - get value of entry
  57. * entry.value(val) - set entry to val
  58. * entry.description() - get info about entry
  59. * entry.default_value() - get default for entry
  60. * entry.minimum() - get min value for entry
  61. * entry.maximum() - get max value for entry
  62. * entry.has_range() - are min and max valid for entry
  63.  
  64. manager:machine()
  65. * machine:exit() - close program
  66. * machine:hard_reset() - hard reset emulation
  67. * machine:soft_reset() - soft reset emulation
  68. * machine:save(filename) - save state to filename
  69. * machine:load(filename) - load state from filename
  70. * machine:system() - get game_driver for running driver
  71. * machine:video() - get video_manager
  72. * machine:render() - get render_manager
  73. * machine:ioport() - get ioport_manager
  74. * machine:parameters() - get parameter_manager
  75. * machine:options() - get machine core_options
  76. * machine:output() - get output_manager
  77. * machine:input() - get input_manager
  78. * machine:uiinput() - get ui_input_manager
  79. * machine.paused - get paused state
  80. * machine.devices[] - get device table
  81. * machine.screens[] - get screens table
  82. * machine.images[] - get available image devices
  83. * machine:popmessage(str) - print str as popup
  84. * machine:logerror(str) - print str to log
  85.  
  86. game_driver - this should be self explanatory
  87.  
  88. machine:debugger()
  89. * debug:command(cmd) - run cmd in debugger console
  90. * debug.consolelog[] - get consolelog
  91. * debug.errorlog[] - get errorlog
  92. * debug.visible_cpu - accessor for debugger active cpu for commands, affects debug views
  93. * debug.execution_state - accessor for active cpu run state
  94.  
  95. device:debug()
  96. * debug:step([opt] steps) - run cpu steps, default 1
  97. * debug:go() - run cpu
  98. * debug:bpset(addr, cond, act) - set break, cond and act are debugger expressions
  99. * debug:bpclr(idx) - clear break
  100. * debug:bplist()[] - table of breakpoints
  101. * debug:wpset(space, type, addr, len, cond, act) - set watch, cond and act are debugger expressions
  102. * debug:wpclr(idx) - clear watch
  103. * debug:wplist(space)[] - table of watchpoints
  104.  
  105. machine.devices[device_tag]
  106. * device:name() - device long name
  107. * device:shortname() - device short name
  108. * device:tag() - device tree tag
  109. * device:owner() - device parent tag
  110. * device:debug() - debug interface, cpus only
  111. * device.spaces[] - device address spaces table
  112. * device.state[] - device state entries table
  113. * device.items[] - device save state items table
  114.  
  115. machine:ioport()
  116. * ioport:count_players() - get count of player controllers
  117. * ioport.ports[] - ioports table
  118.  
  119. ioport.ports[port_tag]
  120. * port:tag() - get port tag
  121. * port:active() - get port status
  122. * port:live() - get port ioport_port_live (TODO: not usable from lua as of now)
  123. * port:read() - get port value
  124. * port:write(val, mask) - set port to value & mask (output fields only, for other fields use field:set_value(val))
  125. * port:field(mask) - get ioport_field for port and mask
  126. * port.field[] - get ioport_field table
  127.  
  128. port.field[field_tag] - this should be self explanatory
  129.  
  130. field.live
  131.  
  132. machine:parameters()
  133. * parameter:add(tag, val) - add tag = val parameter
  134. * parameter:lookup(tag) - get val for tag
  135.  
  136. machine:video()
  137. * video:begin_recording([opt] filename) - start recording to filename if given or default
  138. * video:end_recording() - stop recording
  139. * video:snapshot() - save shot of all screens
  140. * video:is_recording() - get recording status
  141. * video:skip_this_frame() - is current frame going to be skipped
  142. * video:speed_factor() - get speed factor
  143. * video:speed_percent() - get percent from realtime
  144. * video.frameskip - current frameskip
  145. * video.throttled - throttle state
  146. * video.throttle_rate - throttle rate
  147.  
  148. machine:input()
  149. * input:code_from_token(token) - get input_code for KEYCODE_* string token
  150. * input:code_pressed(code) - get pressed state for input_code
  151. * input:code_to_token(code) - get KEYCODE_* string token for code
  152. * input:code_name(code) - get code friendly name
  153. * input:seq_from_tokens(tokens) - get input_seq for multiple space separated KEYCODE_* string tokens
  154. * input:seq_pressed(seq) - get pressed state for input_seq
  155. * input:seq_to_tokens(seq) - get KEYCODE_* string tokens for seq
  156. * input:seq_name(seq) - get seq friendly name
  157.  
  158. machine:uiinput()
  159. * uiinput:find_mouse() - returns x, y, button state, ui render target
  160. * uiinput:pressed(key) - get pressed state for ui key
  161.  
  162. render.targets[target_index]
  163. * render:ui_target()
  164. * target:view_bounds() - get x0, x1, y0, y1 bounds for target
  165. * target:width() - get target width
  166. * target:height() - get target height
  167. * target:pixel_aspect() - get target aspect
  168. * target:hidden() - is target hidden
  169. * target:is_ui_target() - is ui render target
  170. * target:index() - target index
  171. * target:view_name(index) - current target layout view name
  172. * target.max_update_rate -
  173. * target.view - current target layout view
  174. * target.orientation - current target orientation
  175. * target.backdrops - enable backdrops
  176. * target.bezels - enable bezels
  177. * target.marquees - enable marquees
  178. * target.screen_overlay - enable overlays
  179. * target.zoom - enable zoom
  180.  
  181. render:ui_container() - this should be self explanatory
  182.  
  183. machine:render()
  184. * render:max_update_rate() -
  185. * render:ui_target() - target for ui drawing
  186. * render:ui_container() - container for ui drawing
  187. * render.target[] - render_target table
  188.  
  189. machine.screens[screen_tag]
  190. * screen:draw_box(x1, y1, x2, y2, fillcol, linecol) - draw box from (x1, y1)-(x2, y2) colored linecol filled with fillcol
  191. * screen:draw_line(x1, y1, x2, y2, linecol) - draw line from (x1, y1)-(x2, y2) colored linecol
  192. * screen:draw_text(x || justify, y, message, [opt] color) - draw message at (x, y) or at line y with left, right, center justification
  193. * screen:height() - screen height
  194. * screen:width() - screen width
  195. * screen:orientation() - screen angle, flipx, flipy
  196. * screen:refresh() - screen refresh rate
  197. * screen:snapshot() - save snap shot
  198. * screen:type() - screen drawing type
  199. * screen:frame_number() - screen frame count
  200. * screen:name() - screen device full name
  201. * screen:shortname() - screen device short name
  202. * screen:tag() - screen device tag
  203. * screen:xscale() - screen x scale factor
  204. * screen:yscale() - screen y scale factor
  205.  
  206. mame_manager:ui()
  207. * ui:is_menu_active() - ui menu state
  208. * ui:options() - ui core_options
  209. * ui.show_fps - fps display enabled
  210. * ui.show_profiler - profiler display enabled
  211. * ui:get_line_height() - current ui font height
  212. * ui:get_string_width(str, scale) - get str width with ui font at scale factor of current font size
  213. * ui:get_char_width(char) - get width of utf8 glyph char with ui font
  214.  
  215. device.state[]
  216. * state:name() - get device state name
  217. * state:value() - get device state value
  218. * state:is_visible() - is state visible in debugger
  219. * state:is_divider() - is state a divider
  220.  
  221. machine:memory()
  222. * memory.banks[] - table of memory banks
  223. * memory.regions[] - table of memory regions
  224. * memory.shares[] - table of memory shares
  225.  
  226. machine:output()
  227. * output:set_value(name, val) - set output name to val
  228. * output:set_indexed_value(index, val) - set output index to val
  229. * output:get_value(name) - get output name value
  230. * output:get_indexed_value(index) - get output index value
  231. * output:name_to_id(name) - get index for name
  232. * output:id_to_name(index) - get name for index
  233.  
  234. machine.images[] - images are floppy/cart/cdrom/tape/hdd etc, otherwise this should be self explanatory
RAW Paste Data