Unknown module ListParents
This page documents the the behavior and parameters of Lua functions available for the BizHawk emulator.
These perform the standard bitwise operations.
- uint bit.bor(int val, int amt)
Bitwise OR of 'val' against 'amt'.
- uint bit.bxor(int val, int amt)
Bitwise XOR of 'val' against 'amt'.
- uint bit.bnot(int val)
Bitwise NOT of 'val'.
- uint bit.band(int val, int amt)
Bitwise AND of 'val' against 'amt'.
- uint bit.lshift(int val, int amt)
Logical shift left of 'val' by 'amt' bits.
- uint bit.rshift(int val, int amt)
Logical shift right of 'val' by 'amt' bits.
- uint bit.rol(int val, int amt)
Left-rotate 'val' by 'amt' bits.
- uint bit.ror(int val, int amt)
Right-rotate 'val' by 'amt' bits.
- bool bit.check(int num, int pos)
Returns result of bit 'pos' being set in 'num'.
- uint bit.byteswap_16(short_)
Byte swaps 'short_', i.e. bit.byteswap_16(0xFF00) would return 0x00FF
- uint bit.byteswap_32(word_)
Byte swaps 'word_'.
- UInt64 bit.byteswap_64(long_)
Byte swaps 'long_'.
This is a set of library functions for manipulating the multiclient GUI.
client.closerom
- void client.closerom(void)
- closes the currently loaded game
client.enablerewind
- void client.enablerewind(boolean bool)
- Sets whether or not the rewind feature is enabled
client.frameskip
- void client.frameskip(int frames)
- Sets the frame skip value of the client UI.
- string client.getdisplayfilter(void)
- Gets the current display filter setting, possible values:
- "None"
- "x2SAI"
- "SuperX2SAI"
- "SuperEagle"
- "Scanlines"
- void client.setdisplayfilter(string filter)
- Sets the current display filter setting, possible values:
- "None"
- "x2SAI"
- "SuperX2SAI"
- "SuperEagle"
- "Scanlines"
- int client.gettargetscanlineintensity(void)
- Gets the current scanline intensity setting, used for the scanline display filter
- void client.settargetscanlineintensity(int val)
- Sets the current scanline intensity setting, used for the scanline display filter
client.getwindowsize
- int client.setwindowsize(void)
- Gets the main window's size Possible values are 1, 2, 3, 4, 5, and 10
client.ispaused
- bool client.ispaused(void)
- Returns true if emulator is paused, otherwise, false.
client.opencheats
- void client.opencheats(void)
- opens the Cheats dialog
client.openhexeditor
- void client.openhexeditor(void)
- opens the Hex Editor dialog
client.openramsearch
- void client.openramsearch(void)
- opens the Ram Search dialog
client.openramwatch
- void client.openramwatch(void)
- opens the Ram Watch dialog
client.openrom
- void client.openrom(void)
- opens the Open ROM dialog
client.opentastudio
- void client.opentastudio(void)
- opens the TAStudio dialog
client.opentoolbox
- void client.opentoolbox(void)
- opens the Toolbox Dialog
client.opentracelogger
- void client.opentracelogger(void)
- opens the tracelogger if it is available for the given core
client.paint
- void client.paint(void)
- Causes the client UI to repaint the screen
client.pause
- void client.pause(void)
- Pauses the emulator.
client.pause_av
- void client.pause_av(void)
- If currently capturing Audio/Video, this will suspend the record. Frames will not be captured into the AV until client.unpause_av() is called.
client.reboot_core
- void client.reboot_core(void)
- Reboots the currently loaded core.
client.screenheight
- int client.screenheight(void)
- Gets the current width in pixels of the emulator's drawing area
client.screenshot()
- void client.screenshot([string path])
- if a parameter is passed it will function as the Screenshot As menu item of the multiclient, else it will function as the Screenshot menu item.
client.screenshottoclipboard()
- void client.screenshottoclipboard(void)
- Performs the same function as the multiclient's Screenshot To Clipboard menu item.
client.screenwidth
- int client.screenwidth(void)
- Gets the current height in pixels of the emulator's drawing area
client.setscreenshotosd()
- void client.setscreenshotosd(bool value)
- Sets the screenshot Capture OSD property of the multiclient
client.setwindowsize
- void client.setwindowsize(int window_size)
- Sets the main window's size to the give value. Accepted values are 1, 2, 3, 4, 5, and 10
client.speedmode
- void client.speedmode(int percent)
- Sets the speed of the emulator (in terms of percent)
client.togglepause
- void client.togglepause(void)
- Toggles the current pause state.
client.unpause
- void client.pause(void)
- Unpauses the emulator.
client.unpause_av()
- void client.unpause_av(void)
- If currently capturing Audio/Video this resume capturing (see client.pause_av())
client.xpos()
- int client.xpos()
- Returns the x value of the screen position where Bizhawk currently sits
client.ypos()
- int client.ypos()
- Returns the y value of the screen position where BizHawk currently sits
console.clear
- void console.clear(void)
- clears the output box of the Lua Console window
console.log(object message)
- Alias of console.output
console.output
- void console.output(object message)
- sends the given string to the output box on the Lua Console dialog. Note: Can accept a LuaTable.
console.getluafunctionslist
- string[] console.getluafunctionslist(void)
- returns a list of implemented functions
- Note: All references to a color object can be a Hex ARGB value or a named color from the .NET System.Drawing.Color class
emu.displayvsync
- void emu.displayvsync(bool boolean)
- Sets the display vsync property of the emulator
emu.frameadvance
- void emu.frameadvance(void)
- Signals to the emulator to resume emulation. Necessary for any lua script while loop or else the emulator will freeze!
emu.framecount
- int emu.framecount(void)
- Returns the current frame count
emu.getregister
- int emu.getregister(string name)
- returns the value of a cpu register or flag specified by name
- for a complete list of possible registers or flags for a given core, use emu.getregisters()
emu.getregisters
- LuaTable emu.getregisters(void)
- returns the complete set of available flags and registers for a given core
Unsupported Cores for emu.getregister(s): Saturn
emu.getsystemid
- string emu.getsystemid(void)
- Returns the ID string of the current core loaded. Note: No ROM loaded will return the string "NULL"
emu.lagcount
- int emu.lagcount(void)
- Returns the current lag count
emu.islagged
- bool emu.islagged(void)
- returns whether or not the current frame is a lag frame
emu.limitframerate
- void emu.limitframerate(bool boolean)
- sets the limit framerate property of the emulator
emu.minimizeframeskip
- void emu.minimizeframeskip(bool minimize)
- Sets the autominimizeframeskip value of the emulator
emu.yield
- void emu.yield(void)
- allows a script to run while emulation is paused and interact with the gui/main window in realtime
emu.setrenderplanes
- void emu.setrenderplanes(bool plane1, bool plane2, [bool plane3], [bool plane4])
- Toggles the drawing of sprites and background planes. Set to false or nil to disable a pane, anything else will draw them.
- NES/SMS: plane 1: sprites, plane 2: background
- PCE: plane 1: Object1, plane 2: Background1, plane 3: Object2, plane3: Background2
These function represent the various emulator events in which a lua function can be added to. Many of these have aliases. These are the preferred methods to use but the old aliases are left in for backward compatibility
event.onframestart()
- guid event.onframestart(LuaFunction luaf, [string name])
- Calls the given lua function at the beginning of each frame before any emulation and drawing occurs.
If name is not supplied, the function will be registered as an "Anonymous" function
Returns a guid pointing to the registered function.
event.onframeend()
- guid event.onframeend(LuaFunction luaf, [string name])
- Calls the given lua function at the end of each frame, after all emulation and drawing has completed. Note: this is the default behavior of lua scripts.
If name is not supplied, the function will be registered as an "Anonymous" function
Returns a guid pointing to the registered function.
one method on the event
event.oninputpoll()
event.oninputpoll()
- guid event.oninputpoll(LuaFunction luaf, [string name])
- Calls the given lua function after each time the emulator core polls for input.
- Supports multiple event bindings
event.onloadstate()
- guid event.onloadstate(LuaFunction luaf, [string name])
- Fires after a state is loaded. Receives a lua function name, and registers it to the event immediately following a successful savestate event. There is only one available slot for this event.
If name is not supplied, the function will be registered as an "Anonymous" function
Returns a guid pointing to the registered function.
event.onmemoryexecute
- guid event.onmemoryexecute(LuaFunction luaf, int address, [string name])
- Fires after the given address is executed by the core.
Supported cores:
NES, SNES, A2600, GB/GBC, N64
NES, SNES, A2600, GB/GBC, N64
event.onmemoryread
- guid event.onmemoryread(LuaFunction luaf, [int address], [string name])
- Fires after the given address is read by the core.
- If no address is given, it will attach to every memory read
event.onmemorywrite
- guid event.onmemorywrite(LuaFunction luaf, [int address], [string name])
- Fires after the given address is written by the core.
- If no address is given, it will attach to every memory write
Currently unsupported cores for onmemory events:
A7800, GBA, Saturn, N64, C64, Genesis
A7800, GBA, Saturn, N64, C64, Genesis
event.onsavestate()
- guid event.onsavestate(LuaFunction luaf, [string name])
- Fires after a state is saved. Same behavior as event.onloadstate()
If name is not supplied, the function will be registered as an "Anonymous" function
Returns a guid pointing to the registered function.
event.unregisterbyid()
- bool event.unregisteredbyid(guid Guid)
- Removes the registered function that matches the guid. If a function is found and remove the function will return true. If unable to find a match, the function will return false.
event.unregisterbyname()
- bool event.unregisteredbyname(string Name)
- Removes the first registered function that matches Name. If a function is found and remove the function will return true. If unable to find a match, the function will return false.
These functions are used to create and manage custom dialogs
forms.newform()
- int forms.newform([width], [height], [title])
- creates a new default dialog, if both width and height are specified it will create a dialog of the specified size. If title is specified it will be the caption of the dialog, else the dialog caption will be "Lua Dialog". The function will return an int representing the handle of the dialog created.
forms.destroy()
- bool forms.destroy(int handle)
- Closes and removes a Lua created form with the specified handle. If a dialog was found and removed true is returned, else false.
forms.destroyall()
- void forms.destroyall()
- Closes and removes all Lua created dialogs.
forms.openfile()
- string forms.openfile([string FileName], [string InitialDirectory], [string Filter])
- Creates a standard openfile dialog with optional parameters for the filename, directory, and filter. The return value is the directory that the user picked. If they chose to cancel, it will return an empty string.
forms.setsize()
- void forms.setsize(int handle, int width, int height)
- Sets the size of a control or form by passing in the handle of the created object.
forms.setlocation()
- void forms.setlocation(int handle, int x, int y)
- Sets the location of a control or form by passing in the handle of the created object.
- int form_handle (int form_handle, [string caption], [int width], [int height], [string type], [int x], [int y], [bool multiline], [bool fixedWidth])
- Creates a textbox control on the given form. The caption property will be the initial value of the textbox (default is empty). Width and Height are option, if not specified they will be a default size of 100, 20. Type is an optional property to restrict the textbox input. The available options are HEX, SIGNED, and UNSIGNED. Passing it null or any other value will set it to no restriction. x, and y are the optional location parameters for the position of the textbox within the given form. The function returns the handle of the created textbox. If true, the multiline will enable the standard winform multi-line property. If true, the fixedWidth options will create a fixed width font.
forms.button()
- int forms.button(int form_handle, string caption, function lua_event, [int x], [int y], [int width], [int height])
- Creates a button control on the given form. The caption property will be the text value on the button. lua_event is the name of a Lua function that will be invoked when the button is clicked. x, and y are the optional location parameters for the position of the button within the given form. The function returns the handle of the created button. Width and Height are option, if not specified they will be a default size.
- Creates a checkbox control on the given form. The caption property will be the text of the checkbox. x and y are the optional location parameters for the position of the checkbox within the form.
- Returns whether or not a checkbox is checked. Will return false if anything but a checkbox if passed in.
[1]
forms.dropdown()
int forms.dropdown(int form_handle, LuaTable items, [int x], [int y], [int width], [int height])
int forms.dropdown(int form_handle, LuaTable items, [int x], [int y], [int width], [int height])
- Creates a dropdown (with a ComboBoxStyle of DropDownList) control on the given form. Dropdown items are passed via a lua table. Only the values will be pulled for the dropdown items, the keys are irrelevant. Items will be sorted alphabetically. x and y are the optional location parameters, and width and height are the optional size parameters.
forms.label()
- int forms.label(int form_handle, string caption, [int x], [int y], [int width], [int height])
- Creates a label control on the given form. The caption property is the text of the label. x, and y are the optional location parameters for the position of the label within the given form. The function returns the handle of the created label. Width and Height are option, if not specified they will be a default size.
forms.settext()
- void forms.settext(int handle, string caption)
- Sets the text property of a control or form by passing in the handle of the created object.
forms.gettext()
- string forms.gettext(int handle)
- Returns the text property of a given form or control.
forms.addclick()
- void forms_addclick(int handle, function lua_event)
- adds the given lua function as a click event to the given control
forms.clearclicks()
- void forms.clearclicks(int handle)
- Removes all click events from the given control
gui.alert
- void gui.alert(int x, int y, string message, [string background], [string forecolor], [string anchor])
- Functions the same as gui.text() but shows the message in the alert font.
gui.clearGraphics
- void gui.clearGraphics(void)
- clears all lua drawn graphics from the screen
gui.cleartext
- void gui.cleartext(void)
- Clears all lua drawing from the emulator window
gui.drawBezier
- void gui.drawBezier(LuaTable points, color Color)
- Draws a Bezier curve using the table of coordinates provided in the given color.
gui.drawBox
- void gui.drawBox(int x1, int y1, int x2, int y2, [color line], [color background])
- Draws a rectangle on screen from x1/y1 to x2/y2. Same as drawRectangle except it receives two points intead of a point and width/height
If not specified, line color will be white and background will be null
gui.drawEllipse
- void gui.drawEllispse(int x, int y, int width, int height, color line, [color background])
- Draws an ellipse at the given coordinates and the given width and height. Line is the color of the ellipse. Background is the optional fill color.
gui.drawIcon
- void gui.drawIcon(string path, int x, int y, [int width], [int height])
- draws an Icon (.ico) file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly.
gui.drawImage
- void gui.drawImage(string path, int x, int y, [int width], [int height])
- draws an image file from the given path at the given coordinate. width and height are optional. If specified, it will resize the image accordingly.
gui.drawPie
- void gui.drawPie(int x, int y, int width, int height, int startangle, int sweepangle, color line, [color background])
- draws a Pie shape at the given coordinates and the given width and height.
gui.drawLine
- void gui.drawLine(int x, int y, int x2, int y2, [color Color])
- Draws a line from the first coordinate pair to the 2nd. Color is optional (if not specified it will be drawn black).
gui.drawPixel
- void gui.drawPixel(int x, int y, [color Color])
- Draws a single pixel at the given coordinates in the given color. Color is optional (if not specified it will be drawn black).
gui.drawPolygon
- void gui.drawPolygon(LuaTable points, color line, [color background])
- Draws a polygon using the table of coordinates specified in points. Line is the color of the polygon. Background is the optional fill color.
gui.drawRectangle
- void gui.drawRectangle(int x, int y, int width, int height, color line, [color background])
- Draws a rectangle at the given coordinate and the given width and height. Line is the color of the box. Background is the optional fill color.
gui.drawString
- Alias of gui.drawText()
gui.drawText
- void gui.drawText(int x, int y, string message, [string color], [fontsize], [fontfamily], [fontstyle])
- Draws the given message in the emulator screen space (like all draw functions) at the given x,y coordinates and the given color. The default color is white. A fontfamily can be specified and is monospace generic if none is specified (font family options are the same as the .NET FontFamily class. The fontsize default is 12. The default font style. Font style options are regular, bold, italic, strikethrough, underline.
gui.text
- void gui.text(int x, int y, string message, [color background], [color forecolor], [string anchor])
- Displays the given text on the screen at the given coordinates. Optional Foreground and background colors. The optional anchor flag anchors the text to one of the four corners.
- Anchor flag parameters:
- topleft
- topright
- bottomleft
- bottomright
- Anchor flag parameters:
gui.addmessage
- void gui.addmessage(string message)
- Adds a message to the OSD's message area. No return.
input.get
- table input.get(void)
- Returns a lua table of all the buttons the user is currently pressing on their keyboard and gamepads.
input.getmouse
- luatable input.getmouse(void)
- Returns a lua table of the mouse X/Y coordinates and button states. Table returns the values X, Y, Left, Middle, Right, XButton1, XButton2
joypad.get
- table joypad.get([int controller])
- returns a lua table of the controller buttons pressed.
- If supplied, it will only return a table of buttons for the given controller
Note: This will also get float controls (including analog X,Y coordinates)
joypad.getimmediate
- table joypad.getimmediate(void)
- returns a lua table of the controller buttons pressed.
- TODO: details as to specifically when it retrieves this data
joypad.set
- void joypad.set(table buttons, int/string controller = null)
- sets the given buttons to their provided values for the current frame.
- if null is passed in, the button is unaffected
- if true is passed in, the button will be forced on regardless of human input
- if false is passed in, the button will be forced off regardless of human input
- if a string is passed in, the button will be "inversed" (opposite of what the user is pressing)
Note: Analog controls can not be set with this method. Set joypad.setanalog()
joypad.setanalog
- void joypad.setanalog(table controls, int controller)
- sets the given analog controls to their provided values for the current frame. Note that unlike joypad.set() there is only the logic of overriding with the given value.
Main memory functions read and write from the Main memory domain (the default memory domain set by any given core).
read returns an int in the specified format that is the value of the memory address given. All read functions follow this format:
mainmemory.getname
- string mainmemory.getname(void)
- returns the name of the domain defined as main memory for the given core
mainmemory.readbyte
- int mainmemory.readbyte(int address)
- gets the byte value from the given address
write functions set the memory address to the given value and follow this format:
void mainmemory.writebyte(int address, int value)
u = unsigned, s = signed
8 = 8bit, 16 = 16bit, 24 = 24bit, and 32 = 32bit
be = big endian, le = little endian
8 = 8bit, 16 = 16bit, 24 = 24bit, and 32 = 32bit
be = big endian, le = little endian
- mainmemory.read_s16_be
- mainmemory.read_s16_le
- mainmemory.read_s24_be
- mainmemory.read_s24_le
- mainmemory.read_s32_be
- mainmemory.read_s32_le
- mainmemory.read_s8
- mainmemory.read_u16_be
- mainmemory.read_u16_le
- mainmemory.read_u24_be
- mainmemory.read_u24_le
- mainmemory.read_u32_be
- mainmemory.read_u32_le
- mainmemory.read_u8
- mainmemory.write_s16_be
- mainmemory.write_s16_le
- mainmemory.write_s24_be
- mainmemory.write_s24_le
- mainmemory.write_s32_be
- mainmemory.write_s32_le
- mainmemory.write_s8
- mainmemory.write_u16_be
- mainmemory.write_u16_le
- mainmemory.write_u24_be
- mainmemory.write_u24_le
- mainmemory.write_u32_be
- mainmemory.write_u32_le
- mainmemory.write_u8
mainmemory.readbyterange()
- luatable mainmemory.readbyterange(int address, length)
- Reads the address range that starts from address, and is length long. Returns the result into a table of key value pairs (where the address is the key).
mainmemory.writebyterange()
- void mainmemory.writebyterange(luatable memoryblock)
- Write the table of key value pairs (where address is the key) to memory.
mainmemory.readfloat()
- float mainmemory.readfloat(int lua_addr, bool bigendian)
- Reads the given address as a 32-bit float value from the main memory domain with th e given endian.
mainmemory.writefloat()
- void mainmemory.writefloat(int lua_addr, float lua_v, bool bigendian)
- Writes the given 32-bit float value to the given address and endian, on the main memory domain.
These functions behavior identically to the mainmemory functions but the user can set the memory domain to read and write from. The default domain is main memory. Use getcurrentmemorydomain(), and setcurrentmemorydomain() to control which domain is used. Each core has its own set of valid memory domains. Use getmemorydomainlist() to get a list of memory domains for the current core loaded.
memory.getcurrentmemorydomain()
- string memory.getcurrentmemorydomain(void)
- Returns a string name of the current memory domain selected by Lua. The default is Main memory.
memory.getcurrentmemorydomainsize()
- int memory.getcurrentmemorydomainsize(void)
- Returns the number of bytes of the current memory domain selected by Lua. The default is Main memory.
memory.getmemorydomainlist
- string memory.getmemorydomainlist
- Returns a string of the memory domains for the loaded platform core. List will be a single string delimited by line feeds.
memory.usememorydomain
- bool memory.usememorydomain(string name)
- Attempts to set the current memory domain to the given domain. If the name does not match a valid memory domain, the function returns false, else it returns true.
Memory read/write functions
- memory.read_s16_be
- memory.read_s16_le
- memory.read_s24_be
- memory.read_s24_le
- memory.read_s32_be
- memory.read_s32_le
- memory.read_s8
- memory.read_u16_be
- memory.read_u16_le
- memory.read_u24_be
- memory.read_u24_le
- memory.read_u32_be
- memory.read_u32_le
- memory.read_u8
- memory.write_s16_be
- memory.write_s16_le
- memory.write_s24_be
- memory.write_s24_le
- memory.write_s32_be
- memory.write_s32_le
- memory.write_s8
- memory.write_u16_be
- memory.write_u16_le
- memory.write_u24_be
- memory.write_u24_le
- memory.write_u32_be
- memory.write_u32_le
- memory.readfloat
- memory.writefloat
memory.writebyte, memory.readbyte
These are identical to u8 and are legacy function for compatibility with scripts from other emulators.
These are identical to u8 and are legacy function for compatibility with scripts from other emulators.
movie.filename
- string movie.filename(void)
- Returns the file name including path of the currently loaded movie. If no movie is loaded, this will return null.
movie.getinput
- table movie.getinput(int frame)
- Returns a table of buttons pressed on a given frame of the loaded movie. If no movie is loaded this will return null.
movie.getreadonly
- bool movie.getreadonly(void)
- Returns true if the movie is in read-only mode, false if in read+write.
movie.getrerecordcounting
- bool movie.getrerecordcounting(void)
- Returns whether or not the current movie is incrementing rerecords on loadstate (can only be turned off by the lua movie.setrerecordcounting, client does not have control over this variable)
movie.isloaded
- bool movie.isloaded()
- Returns true if a movie is loaded in memory (play, record, or finished modes), false if not (inactive mode).
movie.length
- int movie.length()
- Returns the total number of frames of the loaded movie.
movie.mode
- string movie.mode(void)
- Returns the mode of the current movie. Possible modes:
- PLAY
- RECORD
- FINISHED
- INACTIVE
movie.rerecordcount
- int movie.rerecordcount(void)
- Returns the current rerecord count for the loaded movie.
movie.setreadonly
- void movie.setreadonly(bool readonly)
- Sets the read-only state to the given value. true for read only, false for read+write.
movie.setrerecordcounting
- void movie.setrerecordingcounting(bool value)
- Sets whether or not the current movie will increment the rerecord counter on loadstate.
movie.stop
- void movie.stop(void)
- Stops the current movie.
Functions specific to NESHawk (functions may not run when an NES game is not loaded)
nes.addgamegenie()
- void nes.addgamegenie(string code)
- Adds the specified game genie code. If an NES game is not currently loaded or the code is not a valid game genie code, this will have no effect.
nes.getallowmorethaneightsprites()
- bool nes.getallowmorethaneightsprites(void)
- Gets the NES setting "Allow more than 8 sprites per scanline" value
nes.getclipleftandright()
- bool getclipleftandright(void)
- Gets the current value for the Clip Left and Right sides option
nes.getdispbackground()
- bool nes.getdispsprites(void)
- Returns a bool indicated whether or not spriates are being displayed
nes.gettopscanline()
- int nes.gettopscanline(void)
- Gets the current value for the top scanline value.
nes.removegamegenie()
- void nes.removegamegenie(string code)
- Removes the specified game genie code. If an NES game is not currently loaded or the code is not a valid game genie code, this will have no effect.
nes_setallowmorethaneightsprites()
- void nes_setallowmorethaneightsprites(bool allow)
- Sets the NES setting "Allow more than 8 sprites per scanline"
nes.setclipleftandright()
- void nes.setclipleftandright(bool leftandright)
- Sets the Clip Left and Right sides option
nes.setdispbackground()
- void nes.setdispbackground(bool show)
- Sets whether or not the background will be displayed
nes.setdispsprites()
- void nes.setdispsprites(bool show)
- Sets whether or not the sprites will be displayed
nes.setscanlines()
- void nes.setscanlines(int top, int bottom)
- sets the top and bottom scanlines to be drawn (same values as in the graphics options dialog). Top must be in the range of 0 to 127, bottom must be between 128 and 239
savestate.load
- void savestate.load(string path)
- Loads the given savestate filename
savestate.loadslot
- void savestate.load(int slot)
- Loads the given savestate slot
savestate.save
- void savestate.save(string filename)
- Saves a savestate to the given filename.
savestate.saveslot
- void savestate.saveslot(int slot)
- Saves the given savestate slot
Functions specific to SNESHawk (functions may not run when an SNES game is not loaded)
snes.getlayer_bg_1()
snes.getlayer_bg_2()
snes.getlayer_bg_4()
snes.getlayer_bg_4()
snes.getlayer_obj_1()
snes.getlayer_obj_2()
snes.getlayer_obj_3()
snes.getlayer_obj_4()
snes.getlayer_bg_2()
snes.getlayer_bg_4()
snes.getlayer_bg_4()
snes.getlayer_obj_1()
snes.getlayer_obj_2()
snes.getlayer_obj_3()
snes.getlayer_obj_4()
- bool snes.getlayer_xx_y()
- gets the display status of the given layer
snes.setlayer_bg_1()
snes.setlayer_bg_2()
snes.setlayer_bg_3()
snes.setlayer_bg_4()
snes.setlayer_obj_1()
snes.setlayer_obj_2()
snes.setlayer_obj_3()
snes.setlayer_obj_4()
snes.setlayer_bg_2()
snes.setlayer_bg_3()
snes.setlayer_bg_4()
snes.setlayer_obj_1()
snes.setlayer_obj_2()
snes.setlayer_obj_3()
snes.setlayer_obj_4()
- void snes.setlayer_xx_y(bool value)
- sets the display status of the bg 1 layer
[1]: These are only available in the latest interim version, and not in the latest release