Specifications
Saturn Debug Stub Functions 10-3
Psy-Q Development System
The Pollhost Macro
Description
This causes the target box to poll the host PC, allowing access to the target memory
when it is running, i.e. not single stepping.
These periodic calls enable the Debugger to display and edit memory and allow
intervention to stop/step/trace the target program.
Syntax
pollhost is defined as a macro:
#define pollhost() asm(“trapa #33”)/* Ox0400 */
so its syntax is obvious:
pollhost()
Remarks
A macro is used so the call is inline; this preserves the variable scope.
This macro should be included in the user source code for the Debugger to operate
correctly. It is responsible for transferring data to the host Debugger, so should be
put in the main loop or the vertical blank interrupt of the program to be debugged.
This call takes time to transfer the data; if however, updates are turned off or the
Debugger is exited, the call will return immediately.
A suitable Poll rate would be 25 to 100 times a second. The poll call may sensibly be
placed in the program's main loop or in the VBL interrupt handler. The Poll call takes
very little time if the host is not requesting or sending any data. If the host requests
access to the target memory then the call will take a little longer.
Note:
Poll host is not necessary for NMI modified Saturns, including Saturn CD-
Emulators.