SCRYMAMEReferenceReadAlso in DOSBox-X
The Read tools
These tools read the program without writing to it: bytes of memory, the registers, the code at an address, the instructions that ran before a stop. They need the program stopped at the debugger; while it runs they refuse (not_stopped), except where an entry says otherwise.
An address is a ref: a symbol of your program, or a number written 0x. Bare hex that names no symbol is refused (unknown_ref), with the 0x spelling it most likely meant.
On a board with several cpus, a call that names no cpu acts on the one the debugger is showing. read_memory, registers and memdump read another only on a MAME whose gdbstub serves each cpu as a thread; status lists them in threads. Without that they read the first cpu and refuse any other (bad_argument).
Three of them run one instruction
read_block, screen_map_find and screen_map_write's add go through MAME's Lua console, which runs one instruction to answer. Their replies end with the readings of the new stop, as lua's does. They write nothing to the program.
The tools
read_memoryRead a few bytes of memory at an address, as hex text.read_blockRead bytes MAME keeps under a tag and no cpu can read back: write-only memory, or a ROM outside every cpu's address space.registersRead the cpu's registers, now or as they were at the last stop.disassembleDisassemble the code at an address, one instruction a line, each marked as a call, a branch, a return or none of those.findFind every address in a range of memory that holds a given sequence of bytes.historyList the last instructions a cpu ran before the stop, oldest first.memdumpWrite a range of memory to a file, for ranges too large to read into the conversation.screen_map_findName the screen your program is showing, from its screen map: a file of the program's screens and the named areas of each.screen_map_writeBuild the screen map, the file that names your program's screens and their areas: add the screen showing, load a file, or save one.