Difference between revisions of "Modules/debug/Usage"

From MSX Game Library

< Modules‎ | debug

(Created page with "=== Emulators === ==== {{Emulicious}} Emulicious ==== Emulicious support all debug functions. It is recommended to call the <tt>DEBUG_INIT()</tt> function at the beginning of...")
 
Line 1: Line 1:
 
=== Emulators ===
 
=== Emulators ===
 
==== {{Emulicious}} Emulicious ====
 
==== {{Emulicious}} Emulicious ====
Emulicious support all debug functions. It is recommended to call the <tt>DEBUG_INIT()</tt> function at the beginning of your program to mark the memory area reserved by the BIOS and let know the emulator to don't through warning when accessing this uninitialized memory.
+
Emulicious support all avaible debug functions. The
  
For profiling, you don't need
 
  
 +
For profiling your program with Emulicious, you don't need to modify ant thing in your code. Emulicious use the symbols file to detection func
 +
 +
<img src="https://raw.githubusercontent.com/aoineko-fr/MSXgl/main/engine/doc/img/tools/emulicious_3.png" style="width:50%" />
 +
<img src="https://raw.githubusercontent.com/aoineko-fr/MSXgl/main/engine/doc/img/tools/emulicious_4.png" style="width:50%" />
 +
 +
It is recommended to call the <tt>DEBUG_INIT()</tt> function at the beginning of your program to mark the memory area reserved by the BIOS and let know the emulator to don't through warning when accessing this uninitialized memory.
  
 
==== {{openMSX}} openMSX ====
 
==== {{openMSX}} openMSX ====
 +
 +
When <tt>DEBUG_TOOL</tt> is set to <tt>DEBUG_OPENMSX_P</tt>, you also need to setup additionnal emulator command line in your project configuration (<tt>project_config.js</tt>):
 +
<syntaxhighlight lang="js">
 +
//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
 +
EmulExtraParam= `-script ${ToolsDir}script/openMSX/debugger_pvm.tcl`;
 +
</syntaxhighlight>
 +
 +
When <tt>PROFILE_TOOL</tt> is set to <tt>PROFILE_OPENMSX_G</tt> (Grauw's profiler), you also need to setup additionnal emulator command line in your project configuration (<tt>project_config.js</tt>):
 +
<syntaxhighlight lang="js">
 +
//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
 +
EmulExtraParam= `-script ${ToolsDir}script/openMSX/profiler_grauw.tcl`;
 +
</syntaxhighlight>
 +
 +
When <tt>PROFILE_TOOL</tt> is set to <tt>PROFILE_OPENMSX_S</tt> (Sallute's profiler), you also need to setup additionnal emulator command line in your project configuration (<tt>project_config.js</tt>):
 +
<syntaxhighlight lang="js">
 +
//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
 +
EmulExtraParam= `-script ${ToolsDir}script/openMSX/profiler_salute.tcl -command "profile::section_scope_bp frame 0xFD9F; profile_osd ms;"`;
 +
</syntaxhighlight>
 +
 +
 
==== Others ====
 
==== Others ====

Revision as of 23:29, 18 September 2024

Emulators

Emulicious

Emulicious support all avaible debug functions. The


For profiling your program with Emulicious, you don't need to modify ant thing in your code. Emulicious use the symbols file to detection func

It is recommended to call the DEBUG_INIT() function at the beginning of your program to mark the memory area reserved by the BIOS and let know the emulator to don't through warning when accessing this uninitialized memory.

openMSX

When DEBUG_TOOL is set to DEBUG_OPENMSX_P, you also need to setup additionnal emulator command line in your project configuration (project_config.js):

//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
EmulExtraParam= `-script ${ToolsDir}script/openMSX/debugger_pvm.tcl`;

When PROFILE_TOOL is set to PROFILE_OPENMSX_G (Grauw's profiler), you also need to setup additionnal emulator command line in your project configuration (project_config.js):

//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
EmulExtraParam= `-script ${ToolsDir}script/openMSX/profiler_grauw.tcl`;

When PROFILE_TOOL is set to PROFILE_OPENMSX_S (Sallute's profiler), you also need to setup additionnal emulator command line in your project configuration (project_config.js):

//-- Emulator extra parameters to be add to command-line (string). Emulator sotfware specific
EmulExtraParam= `-script ${ToolsDir}script/openMSX/profiler_salute.tcl -command "profile::section_scope_bp frame 0xFD9F; profile_osd ms;"`;


Others