The following is generated from the swagger.json file via https://swagger-markdown-ui.netlify.app/
An HTTP interface for mGBA scripting.
Contact information:
GitHub Repository
https://github.com/nikouu/mGBA-http/
Sends button presses.
A custom convenience API that implements a key press and release. This is as opposed to the key based core API that sends only either a press or release message.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
key | query | Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. | Yes | string |
Code | Description |
---|---|
200 | OK |
Sends multiple button presses simultaneously.
A custom convenience API that implements multiple simultaneously keys being pressed and released. This is as opposed to the key based core API that sends only either a press or release message.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
keys | query | A key array. | Yes | [ KeysEnum ] |
Code | Description |
---|---|
200 | OK |
Sends a held down button for a given duration in frames.
A custom convenience API that implements a held down button for a given duration in frames. This is as opposed to the key based core API that sends only either a press or release message.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
key | query | Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. | Yes | string |
duration | query | Duration in frames. | Yes | integer |
Code | Description |
---|---|
200 | OK |
Sends multiple button presses simultaneously for a given duration in frames.
A custom convenience API that implements multiple simultaneously keys being pressed and released for a given duration in frames. This is as opposed to the key based core API that sends only either a press or release message.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
keys | query | A key array. | Yes | [ KeysEnum ] |
duration | query | Duration in frames. | Yes | integer |
Code | Description |
---|---|
200 | OK |
Print an error to the console.
Presents textual information to the user via a console.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
message | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Print a log to the console.
Presents textual information to the user via a console.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
message | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Print a warning to the console.
Presents textual information to the user via a console.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
message | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Add a single key.
Add a single key to the currently active key list. As if the key were held down.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
key | query | Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. | Yes | string |
Code | Description |
---|---|
200 | OK |
Add a bitmask of keys.
Add a bitmask of keys to the currently active key list. As if the keys were held down.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
keyBitmask | query | Bitmasking has the keys from the mGBA scripting documentation where each key has a value that goes up in that order in binary: A = 1, B = 2, Select = 4, Start = 8, etc. A bitmask of 12 is Start and Select. | Yes | integer |
Code | Description |
---|---|
200 | OK |
Load save data.
Load the save data associated with the currently loaded ROM file.
Code | Description |
---|---|
200 | OK |
Get the checksum of the loaded ROM.
Get the checksum of the loaded ROM as base 10.
Code | Description |
---|---|
200 | OK |
Remove a single key.
Remove a single key from the currently active key list. As if the key were released.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
key | query | Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. | Yes | string |
Code | Description |
---|---|
200 | OK |
Remove a bitmask of keys.
Remove a bitmask of keys from the currently active key list. As if the keys were released.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
keyBitmask | query | Bitmasking has the keys from the mGBA scripting documentation where each key has a value that goes up in that order in binary: A = 1, B = 2, Select = 4, Start = 8, etc. A bitmask of 12 is Start and Select. | Yes | integer |
Code | Description |
---|---|
200 | OK |
Get the number of the current frame.
Get the number of the current frame.
Code | Description |
---|---|
200 | OK |
Get the number of cycles per frame.
Get the number of cycles per frame.
Code | Description |
---|---|
200 | OK |
Get the number of cycles per second.
Get the number of cycles per second.
Code | Description |
---|---|
200 | OK |
Get internal product code for the game.
Get internal product code for the game from the ROM header, if available.
Code | Description |
---|---|
200 | OK |
Get internal title of the game.
Get internal title of the game from the ROM header.
Code | Description |
---|---|
200 | OK |
Get the active state of a given key.
Get the active state of a given key.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
key | query | Key value of: A, B, Start, Select, Start, Right, Left, Up, Down, R, or L. | Yes | string |
Code | Description |
---|---|
200 | OK |
Get the currently active keys as a bitmask.
Get the currently active keys as a bitmask.
Code | Description |
---|---|
200 | OK |
Load a ROM file.
Load a ROM file into the current state of this core.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
path | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Load save data file.
Load save data from the given path. If the temporary flag is set, the given save data will not be written back to disk.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
path | query | Yes | string | |
temporary | query | Yes | boolean |
Code | Description |
---|---|
200 | OK |
Load state from a buffer.
Load state from a buffer.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
buffer | query | Yes | string | |
flags | query | No | integer |
Code | Description |
---|---|
200 | OK |
Load state from the given path.
Load state from the given path.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
path | query | Yes | string | |
flags | query | No | integer |
Code | Description |
---|---|
200 | OK |
Load state from the slot number.
Load state from the slot number.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
slot | query | Yes | string | |
flags | query | No | integer |
Code | Description |
---|---|
200 | OK |
Get which platform is being emulated.
Get which platform is being emulated.
Code | Description |
---|---|
200 | OK |
Read a 16-bit value from the given bus address.
Read a 16-bit value from the given bus address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
Code | Description |
---|---|
200 | OK |
Read a 32-bit value from the given bus address.
Read a 32-bit value from the given bus address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
Code | Description |
---|---|
200 | OK |
Read an 8-bit value from the given bus address.
Read an 8-bit value from the given bus address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
Code | Description |
---|---|
200 | OK |
Read byte range from the given offset.
Read byte range from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
length | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Read the value of the register with the given name.
Read the value of the register with the given name.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
regName | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Get the size of the loaded ROM.
Get the size of the loaded ROM.
Code | Description |
---|---|
200 | OK |
Run until the next frame.
Run until the next frame.
Code | Description |
---|---|
200 | OK |
Save state and return as a buffer.
Save state and return as a buffer.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
flags | query | No | integer |
Code | Description |
---|---|
200 | OK |
Save state to the given path.
Save state to the given path.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
path | query | Yes | string | |
flags | query | No | integer |
Code | Description |
---|---|
200 | OK |
Save state to the slot number.
Save state to the slot number.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
slot | query | Yes | string | |
flags | query | No | integer |
Code | Description |
---|---|
200 | OK |
Save a screenshot.
Save a screenshot.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
path | query | For example, C:\screenshots\screenshot.png | Yes | string |
Code | Description |
---|---|
200 | OK |
Set the currently active key list.
Set the currently active key list.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
keys | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Run a single instruction.
Run a single instruction.
Code | Description |
---|---|
200 | OK |
Write a 16-bit value from the given bus address.
Write a 16-bit value from the given bus address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Write a 32-bit value from the given bus address.
Write a 32-bit value from the given bus address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Write an 8-bit value from the given bus address.
Write an 8-bit value from the given bus address.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Write the value of the register with the given name.
Write the value of the register with the given name.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
regName | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Reset the emulation.
Reset the emulation and calls the reset callback.
Code | Description |
---|---|
200 | OK |
Get the address of the base of this memory domain.
Get the address of the base of this memory domain.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Get the address of the end bound of this memory domain.
Get the address of the end bound of this memory domain. Note that this address is not in the domain itself, and is the address of the first byte past it.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Get a short, human-readable name for this memory domain.
Get a short, human-readable name for this memory domain.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Read a 16-bit value from the given offset.
Read a 16-bit value from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
Code | Description |
---|---|
200 | OK |
Read a 32-bit value from the given offset.
Read a 32-bit value from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
Code | Description |
---|---|
200 | OK |
Read an 8-bit value from the given offset.
Read an 8-bit value from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
Code | Description |
---|---|
200 | OK |
Read byte range from the given offset.
Read byte range from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
length | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Get the size of this memory domain in bytes.
Get the size of this memory domain in bytes.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string |
Code | Description |
---|---|
200 | OK |
Write a 16-bit value from the given offset.
Write a 16-bit value from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Write a 32-bit value from the given offset.
Write a 32-bit value from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |
Write an 8-bit value from the given offset.
Write an 8-bit value from the given offset.
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
memoryDomain | query | Yes | string | |
address | query | Address in hex, e.g. 0x03000000 | Yes | string |
value | query | Yes | integer |
Code | Description |
---|---|
200 | OK |