b2 icon indicating copy to clipboard operation
b2 copied to clipboard

Debugger: Save a region of memory

Open TobyLobster opened this issue 5 years ago • 3 comments

Feature request (if not already available): Is it possible to save a region of memory (e.g. save $7C00-$7FFF for MODE 7 screen data) just as raw binary data to the Mac / Windows filing system? (Probably the emulation should be stopped first!)

TobyLobster avatar Aug 22 '20 16:08 TobyLobster

While not quite as convenient as something accessible via the GUI, this functionality is available via the HTTP REST API:

  • https://github.com/tom-seddon/b2/blob/master/doc/Debug-version.md#peekwinbegin-addrend-addr-peekwinbegin-addrsize

So you can use a tool like wget or curl for example to save a range of memory to a file like this:

wget 'http://localhost:48075/peek/b2/0x0000/0x4500'

follower avatar May 26 '21 11:05 follower

ooh, that is useful - thank you!

TobyLobster avatar May 26 '21 13:05 TobyLobster

Completely forgot about the http option! Thanks for the note :D

An in-GUI option of some kind will still be forthcoming. I've missed this feature a few times myself.

--Tom

P.S. as an additional note - eventually, I'll probably be moving the HTTP API address syntax away from JGH's scheme, and having it use the backtick syntax that's used by the rest of the debugger. Also support $ and & for hex as well as 0x. (Not that any of these are very convenient to type on the command line... but at least it'll be consistent...)

tom-seddon avatar May 26 '21 17:05 tom-seddon