Miscellaneous 42614c

Access Counters v1o53

getAccessCounters 323r66

Syntax 4o3n5

emu.getAccessCounters(memType, counterOpType)

Parameters
memType - Enum A value from the emu.memType enum
counterOpType - Enum A value from the emu.counterOpType enum

Return value
Array 32-bit integers

Description
Returns an array of access counters for the specified memory and operation types.

resetAccessCounters 2747z

Syntax

emu.resetAccessCounters()

Return value
None

Description
Resets all access counters.

Misc 6e6k4a

getLogWindowLog 65495v

Syntax

emu.getLogWindowLog()

Return value
String A string containing the log shown in the log window

Description
Returns the same text as what is shown in the emulator’s Log Window.

getRomInfo 3g2f2s

Syntax

emu.getRomInfo()

Return value
Table Information about the current ROM with the following structure:

name: string,            Filename of the current ROM
path: string,            Full path to the current ROM (including parent compressed archive when needed)
fileSha1Hash: string,    The SHA1 hash for the whole ROM file

Description
Returns information about the ROM file that is currently running.

getScriptDataFolder 2b3c6

Syntax

emu.getScriptDataFolder()

Return value
String The script’s data folder

Description
This function returns the path to a unique folder (based on the script’s filename) where the script should store its data (if any data needs to be saved).
The data will be saved in subfolders inside the LuaScriptData folder in Mesen-S’ home folder.

takeScreenshot 5d102x

Syntax

emu.takeScreenshot()

Return value
String A binary string containing a PNG image.

Description
Takes a screenshot and returns a PNG file as a string.
The screenshot is not saved to the disk.