How to boot OpenMSX and leaving it in PC=0x000 paused?

By friguron

Expert (82)

friguron's picture

29-05-2019, 03:02

Hi, I'm just creating some proof of concept against OpenMSX and I'd like to know how to boot it with a breakpoint in 0x0000 and with the emulator in pause waiting to receive debug commands via AF_UNIX socket. I've already managed to connect via socket (while running), but I haven't managed to boot it in "auto pause mode" in PC=0x0000.

I could always let it boot, send a "set breakpoint in 0x0000, and then reset" sequence of commands via AF_UNIX socket, but I hope there is a more intelligent approach...

BTW, I'd like to boot in normal mode, no in "stdio mode" where no user interface is shown, please.

After many documents read, I can't manage to find any sensible manual where this need I have can be achieved...

Thanks in advance!

Login or register to post comments

By ricbit

Champion (437)

ricbit's picture

29-05-2019, 08:34

Breakpoint at zero worked for me. I wrote a file stop.tcl with the contents debug set_bp 0, and then started openmsx with openmsx -script stop.tcl. No idea if this works using sockets though.

By Manuel

Ascended (15684)

Manuel's picture

29-05-2019, 08:51

ricbit: that should indeed work, it is one of the options. that stop.tcl can also contain set pause on or debug break for example.

Other options:
1. you can still use stdio mode. No window is shown, but you can send a command to show it unset renderer, set the break point (or pause, same commands as in the stop.tcl example) and then set power on
2. instead of resetting after setting the break point at run time, just do reverse goto 0: rewind back to time 0 and then the break point will trigger you set afterwards.

By friguron

Expert (82)

friguron's picture

29-05-2019, 11:30

Excellent, so many easy approaches Smile

As of now Ricardo's one seems the most straightforward... But the one from Manuel using reverse is fun and silly also Smile

I don't like stdio way because it leaves you really barebones. I don't want to deal with setting up the render engine manually, etc... I like a ready to work emulator as if I was going to use it normally.

Apparently once the emulator is alive its default AF_UNIX socket is up and ready to be used, I'm sure that pause mode will be transparent to it.

Thanks you both, guys.