Some specific patches by DHS are applied to the Hatari sources for Mac OS X to enhance the debug and trace functions. These features are of great help for demo hacking in overscan since ordinary debug tools is very hard to use in such conditions.
Binaries and patches are available on DHS website.
• CounterRead | Stop a cycle counter. |
• CounterStart | Start or restart a cycle counter. |
• CPUFreq | Set Hatari CPU frequency. |
• Debug | Debug output to console. |
• DebugUI | Enter Hatari debug UI. |
• HatariOption | Change emulator options. |
• Registers | Dump all registers to console. |
Name: | »Stop counter« - Read a cycle counter.
|
Opcode: | 252 (0x00fc)
|
Syntax: | See Bindings for CounterRead
|
Description: | Stop a cycle counter.
The id argument to the call can provide an identifier for the current timer and several counters can be activated simulaneously. Valid values are between 0 and 255. |
Return value: | None.
|
Availability: | Hatari for Mac OS X with specific patches by DHS.
|
Group: | Hatari DHS XBIOS extension
|
See also: | Binding
|
C: | void xbios ( 252, int16_t id );
|
Assembler: |
move.w id,-(sp) ; Offset 2 move.w #252,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #4,sp ; Correct stack |
Name: | »Start counter« - Start or restart a cycle counter.
|
Opcode: | 253 (0x00fd)
|
Syntax: | See Bindings for CounterStart
|
Description: | Start a new cycle counter or restart an existing one.
Count the number of cycles between two successive calls to XBIOS functions. The id argument to the call can provide an identifier for the current timer and several counters can be activated simulaneously. Valid values are between 0 and 255. |
Return value: | None.
|
Availability: | Hatari for Mac OS X with specific patches by DHS.
|
Group: | Hatari DHS XBIOS extension
|
See also: | Binding
|
C: | void xbios ( 253, int16_t id );
|
Assembler: |
move.w id,-(sp) ; Offset 2 move.w #253,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #4,sp ; Correct stack |
Name: | »Set Frequency« - Set Hatari CPU frequency.
|
Opcode: | 249 (0x00f9)
|
Syntax: | See Bindings for CPUFreq
|
Description: | Set Hatari CPU frequency.
Maximum frequency is 511 MHz. The frequency can be set up to 128 MHz in the SDL and the OSX GUI. |
Return value: | None.
|
Availability: | Hatari for Mac OS X with specific patches by DHS.
|
Group: | Hatari DHS XBIOS extension
|
See also: | Binding
|
C: | void xbios ( 249, int16_t frequency );
|
Assembler: |
move.w frequency,-(sp) ; Offset 2 move.w #249,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #4,sp ; Correct stack |
Name: | »Debug output to console« - Dump memory area to Hatari
console.
|
Opcode: | 254 (0x00fe)
|
Syntax: | See Bindings for Debug
|
Description: | Memory dump.
Hatari can dump the content of a memory area to the console. This is useful for debugging. memptr and length specifiy the start address and length of the area. Maximum length is 256 bytes. |
Return value: | None.
|
Availability: | Hatari for Mac OS X with specific patches by DHS.
|
Group: | Hatari DHS XBIOS extension
|
See also: | Binding
|
C: | void xbios ( 254, int32_t memptr, int32_t length );
|
Assembler: |
move.l length,-(sp) ; Offset 6 move.l memptr,-(sp) ; Offset 2 move.w #254,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea 10(sp),sp ; Correct stack |
Name: | »Enter Debug UI« - Enter Hatari Debug UI.
|
Opcode: | 251 (0x00fb)
|
Syntax: | See bindings for Debug UI
|
Description: | Debugger with instruction stepping.
Step through the code from the OSX console. By calling XBIOS, Hatari will enter the debugger. A new command i will then step the emulator one (1) instruction and then return to the debugger. |
Return value: | None.
|
Availability: | Hatari for Mac OS X with specific patches by DHS.
|
Group: | Hatari DHS XBIOS extension
|
See also: | Binding
|
C: | void xbios ( 251 );
|
Assembler: |
move.w #251,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #2,sp ; Correct stack |
Name: | »Change options« - Change emulator options.
| ||||||||||||
Opcode: | 255
| ||||||||||||
Syntax: | See Bindings for HatariOption
| ||||||||||||
Description: | This function changes the given option. The following
apply:
| ||||||||||||
Return value: | The function returns 0, or -1 if the specified option is out of
range.
| ||||||||||||
Availability: | Hatari for Mac OS X with specific patches by DHS.
| ||||||||||||
Group: | Hatari DHS XBIOS extension
| ||||||||||||
See also: | Binding
|
C: | int32_t xbios ( 255, int16_t option );
|
Assembler: |
move.w option,-(sp) ; Offset 2 move.w #255,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #4,sp ; Correct stack |
Name: | »Dump Registers« - Dump all registers to console.
|
Opcode: | 250 (0x00fa)
|
Syntax: | See Bindings for Registers
|
Description: | Dump all registers to console.
Hatari can dump the CPU data+address registers to the console. This is useful for debugging. |
Return value: | None.
|
Availability: | Hatari for Mac OS X with specific patches by DHS.
|
Group: | Hatari DHS XBIOS extension
|
See also: | Binding
|
C: | void xbios ( 250 );
|
Assembler: |
move.w #250,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #2,sp ; Correct stack |