Newbie question: using openMSX to debug

Page 1/3
| 2 | 3

Par albs_br

Champion (499)

Portrait de albs_br

17-04-2021, 05:16

I'm having a hard time trying to debug my game with openMsx.

I use this command on console to watch an address: "ram_watch add 0x0D00D -type word -desc BGCurrentIndex".
And then I do it to all other variables.
Each time is the same thing. Is it supposed to be used like this? I strongly doubt it.

Is there a way to load a script and run these commands. This is the first question.

Other question: Is there a way to create this script automatically from the symbol file (tniasm.sym)? It will be a pain rewrite the file each time the variables change.

!login ou Inscrivez-vous pour poster

Par albs_br

Champion (499)

Portrait de albs_br

17-04-2021, 05:27

The documentation don't help much. Even a simple thing as discover what is the shortcut key for reset (if exists) is hard.

How can I bind the CTRL-BACKSPACE combination to reset?

Par Manuel

Ascended (19682)

Portrait de Manuel

17-04-2021, 09:52

Before I answer your questions: are you aware of the separate openMSX debugger program?

Par albs_br

Champion (499)

Portrait de albs_br

17-04-2021, 14:39

Yep. I can watch a memory adress there, but not a list.

I tried also on Emulicious debugger, but with other problems...

Par Manuel

Ascended (19682)

Portrait de Manuel

17-04-2021, 16:33

For all openMSX commands in the console, use the TAB key to get hints on what kinds of things you can type. That way you discover that ram_watch also has 'save' and 'load' subcommands.

You can automatically run a text file with openMSX (Tcl) commands from the command line, if you use the -script command line parameter.

There is no shortcut key for reset. The default key bindings are here: http://openmsx.org/manual/user.html#keymapping

New keybindings can be made with the bind command, as described here: http://openmsx.org/manual/commands.html#bind
For your case try: bind CTRL+BACKSPACE reset (pretty intuitive, I'd say, if you ask "How can I bind the CTRL-BACKSPACE combination to reset?" ;-))

Par albs_br

Champion (499)

Portrait de albs_br

17-04-2021, 19:46

Manuel wrote:

For all openMSX commands in the console, use the TAB key to get hints on what kinds of things you can type. That way you discover that ram_watch also has 'save' and 'load' subcommands.

You can automatically run a text file with openMSX (Tcl) commands from the command line, if you use the -script command line parameter.

Thanks @Manuel, I managed to save the ram_watches, create a TCL script to load them and put it to run automatically after each build on VS code.

Manuel wrote:

There is no shortcut key for reset. The default key bindings are here: http://openmsx.org/manual/user.html#keymapping

New keybindings can be made with the bind command, as described here: http://openmsx.org/manual/commands.html#bind
For your case try: bind CTRL+BACKSPACE reset (pretty intuitive, I'd say, if you ask "How can I bind the CTRL-BACKSPACE combination to reset?" ;-))

OpenMSX is awesome in almost all aspects, but "intuitive" I would say is not one of them, for example there is no list of key names to bind on the documentation. How would I know if is BACKSPACE, BKPSPC, BKSP, BACK_SPACE, etc?

Other example: there is no help for the ram_watch command on docs... Just say "Add or remove RAM watch addresses to/from the list on the right side of the screen, useful for debugging or TASing". For help you have to use console command "help ram_watch" on console. All small things like this together makes for some hours of unnecessary frustration.

Par Manuel

Ascended (19682)

Portrait de Manuel

17-04-2021, 23:23

But, why do you think we have a help command? I think the TAB key and the help command are one of the first things you need to know to find your way in the console, see also http://openmsx.org/manual/user.html#starting
Isn't the online help much easier to find than a separate document?

About the key names, you're right about that. We should make that list available somewhere (maybe it already is, but I can't find it at the moment).

I just found it funny that "How can I bind the CTRL-BACKSPACE combination to reset?" is answered by almost the simplest thing you can imagine for that: bind CTRL+BACKSPACE reset Never mind :)

Par Calindro

Rookie (18)

Portrait de Calindro

18-04-2021, 20:39

albs_br wrote:

Yep. I can watch a memory adress there, but not a list.

I tried also on Emulicious debugger, but with other problems...

What other problems did you have with Emulicious debugger?

Par albs_br

Champion (499)

Portrait de albs_br

18-04-2021, 21:06

Calindro wrote:
albs_br wrote:

Yep. I can watch a memory adress there, but not a list.

I tried also on Emulicious debugger, but with other problems...

What other problems did you have with Emulicious debugger?

I load the symbol file (tniasm.sym), and then I try to watch a variable (RAM address), say BgCurrentIndex, it shows the address $100d, even though the symbol file has the entry:

BgCurrentIndex: equ 0D00Dh ; last def. pass 3

Apart from this, the Emulicious is great to view the contents of VRAM (tiles and tilemaps).

Par albs_br

Champion (499)

Portrait de albs_br

18-04-2021, 21:07

If you want to test yourself, the code is at https://github.com/albs-br/penguin-platformer.

Par Tamagozawari

Resident (39)

Portrait de Tamagozawari

19-04-2021, 22:22

Calindro wrote:
albs_br wrote:

Yep. I can watch a memory adress there, but not a list.

I tried also on Emulicious debugger, but with other problems...

What other problems did you have with Emulicious debugger?

Sorry for the offtopic, but I had problems loading a Konami-mapper-type-ROM file that was (apparently) wrongly autodetected as an "MSX basic" cartridge. Could you maybe explain how Emulicious analyses ROMs in order to determine their mapper? Is it possible to override the autodetected value and force a particular mapper type?

Thanks in advance.

Page 1/3
| 2 | 3