OpenMSX debugger: We have high level block commands like "showmem"/"cpu regs". Do raw (not beautified) block commands exist ?

Page 1/4
| 2 | 3 | 4

By friguron

Master (188)

friguron's picture

30-05-2019, 13:10

Hi,

I need "just data" debug commands inside openmsx console. I mean, once the console is alive inside openmsx, you can write many, MANY commands to the console parser...
Many of these commands give you info in low level format, for example "reg a" is really concise, "peek 0x40f0" is also concise... just one byte of data (of course, surrounded with the unavoidable XML overhead/noise). But they're useful nonetheless...

But then we have to deal with "block" commands, like "showmem", "cpuregs" they also return what they promise (some ram dump, some cpu registers dump), but adding some presentation additional layer on top of it, ( proper format), etc...

After spending some time looking for some commands browsing the console/debugger command list, I haven't discovered what I'm looking for, so, my question is:

Are there any block commands (for the openmsx console/debugger) that return data in a more "raw" fashion than "showmem" or "cpuregs"? Of coufse, I could build up a memory block (for example) making MANY Peek calls to the debugger, but that should be a last resort solution, as it would imply a lot of XML NOISE overhead. I'd like to receive just hex raw data separated by commas, with no beautified info... Is it possible?

Greetings and thanks.

Login or register to post comments

By Manuel

Ascended (19683)

Manuel's picture

30-05-2019, 15:33

debug read_block and debug write_block are what you are looking for.

See also: about block and help debug

By gdx

Enlighted (6438)

gdx's picture

30-05-2019, 15:59

.

By friguron

Master (188)

friguron's picture

30-05-2019, 16:51

I know there's a help system inside the console, I already used it... but right THESE commands you told me to use (that I already supposed that were the ones I might need) come up as difficult to understand and I only got "syntax error"...

Note:
For newbies, current openmsx debug help system is too harsh and robotic (and then somewhat useless), specially for some commands like read_block, it seems to be intended for openmsx creators only Smile A small compilation of REAL LIFE examples would be more than advisable for the manual:
i.e. "how to read 100 bytes from memory starting from 0x0000" -> debug read_block memory 0 100"

Anyway, after some minutes with many tries with "debug read_block" (and many "syntax error" messages), I've come up with what it seems to be something similar to what I asked for:

"debug read_block memory 0000 0100" returns 100 binary bytes on srcreen. It's "too binary" for my taste... Sad

(OTOH, I had to hack what a "debugable" was, and I had to deduct that "memory" was the name of one of them)...

Right now I can't test it (I'm at work), but what does that command return when called from a connected socket instead than from console? binary chars inside xml? "Ugly" binary bytes as a response between tags?

I need/want something like this (if ever): F3,00,2D,0C,3E,FF,5A... (or similar). binary ascii representation... or even decimal bytes would be ok 254,34,33,10,10,2,0,0,0,0,30,24,205... Does openmsx offer something like this?

Greetings and thanks.

By friguron

Master (188)

friguron's picture

30-05-2019, 17:01

I finally managed to ask openmsx for this info (from a stdio connection), and openmsx seems to return (unrecommended) raw binary data between the reply tags...
Shouldn't it be beautified beforehand somehow? Is it actually useful as it is now?

I can remember reading somewhere that sending raw binary data between xml tags might (and actually can) be dangerous (this data might contain the '

By friguron

Master (188)

friguron's picture

30-05-2019, 17:03

haha, my answer was truncated because I wanted to say that the xml raw binary data might contain the byte sequence "less than" + "slash" (and this forum truncated it badly Smile )

By NYYRIKKI

Enlighted (6093)

NYYRIKKI's picture

30-05-2019, 17:20

How about:
showdebuggable memory 0
? (or just showmem 0)

By NYYRIKKI

Enlighted (6093)

NYYRIKKI's picture

30-05-2019, 17:34

Sorry... I didn't read your question properly... but I think you can edit the _showdebuggable.tcl in scripts folder to match your needs better.

By friguron

Master (188)

friguron's picture

30-05-2019, 17:47

I think Nyyrikki approach might be the best in terms of "I will create my own new command with my desired behaviour"... It's a pity my TCL scripting abilities are close to 0 Smile
But I In fact, I might easily clone some working command to adapt it to my needs... I'm sure it won't be that difficult.

As always, thanks everyone.

By Manuel

Ascended (19683)

Manuel's picture

30-05-2019, 19:18

help debug read_block?

By Manuel

Ascended (19683)

Manuel's picture

30-05-2019, 19:56

The openMSX debugger uses the same interface to do its job, so everything really works... You can also have a look how it is doing that and how it is decoding the data from the XML.

Page 1/4
| 2 | 3 | 4