Home XBIOSXBIOS DSP-ProgrammierungDSP-Programmierung InterruptfunktionenInterruptfunktionen

4.12 Hatari-DHS-XBIOS-Erweiterung

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.

4.12.1 CounterRead

Name: »Stop counter« - Read a cycle counter.
 
Xbiosnummer: 252 (0x00fc)
 
Deklaration: Bindings für CounterRead
 
Beschreibung: 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.
 
Ergebnis: None.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.1.1 Bindings für CounterRead

C: void xbios ( 252, int16_t id );
 
Assembler:
 
move.w    id,-(sp)        ; Offset 2
move.w    #252,-(sp)      ; Offset 0
trap      #14             ; XBIOS aufrufen
addq.l    #4,sp           ; Stack korrigieren

4.12.2 CounterStart

Name: »Start counter« - Start or restart a cycle counter.
 
Xbiosnummer: 253 (0x00fd)
 
Deklaration: Bindings für CounterStart
 
Beschreibung: 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.
 
Ergebnis: None.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.2.1 Bindings für CounterStart

C: void xbios ( 253, int16_t id );
 
Assembler:
 
move.w    id,-(sp)        ; Offset 2
move.w    #253,-(sp)      ; Offset 0
trap      #14             ; XBIOS aufrufen
addq.l    #4,sp           ; Stack korrigieren

4.12.3 CPUFreq

Name: »Set Frequency« - Set Hatari CPU frequency.
 
Xbiosnummer: 249 (0x00f9)
 
Deklaration: Bindings für CPUFreq
 
Beschreibung: 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.
 
Ergebnis: None.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.3.1 Bindings für CPUFreq

C: void xbios ( 249, int16_t frequency );
 
Assembler:
 
move.w    frequency,-(sp) ; Offset 2
move.w    #249,-(sp)      ; Offset 0
trap      #14             ; XBIOS aufrufen
addq.l    #4,sp           ; Stack korrigieren

4.12.4 Debug

Name: »Debug output to console« - Dump memory area to Hatari console.
 
Xbiosnummer: 254 (0x00fe)
 
Deklaration: Bindings für Debug
 
Beschreibung: 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.
 
Ergebnis: None.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.4.1 Bindings für Debug

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             ; XBIOS aufrufen
lea       10(sp),sp       ; Stack korrigieren

4.12.5 DebugUI

Name: »Enter Debug UI« - Enter Hatari Debug UI.
 
Xbiosnummer: 251 (0x00fb)
 
Deklaration: Bindings für DebugUI
 
Beschreibung: 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.
 
Ergebnis: None.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.5.1 Bindings für DebugUI

C: void xbios ( 251 );
 
Assembler:
 
move.w    #251,-(sp)      ; Offset 0
trap      #14             ; XBIOS aufrufen
addq.l    #2,sp           ; Stack korrigieren

4.12.6 HatariOption

Name: »Change options« - Change emulator options.
 
Xbiosnummer: 255
 
Deklaration: Bindings für HatariOption
 
Beschreibung: This function changes the given option. The following apply:
 
Option Meaning
   
1 Reset the normal ST speed (disable Fast Forward).
2 Set Hatari into max speed mode (enable Fast Forward). Useful for assembling, packing and so on.
3 Enable debugger.
4 Disable debugger.
Ergebnis: The function returns 0, or -1 if the specified option is out of range.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.6.1 Bindings für HatariOption

C: int32_t xbios ( 255, int16_t option );
 
Assembler:
 
move.w    option,-(sp)    ; Offset 2
move.w    #255,-(sp)      ; Offset 0
trap      #14             ; XBIOS aufrufen
addq.l    #4,sp           ; Stack korrigieren

4.12.7 Registers

Name: »Dump Registers« - Dump all registers to console.
 
Xbiosnummer: 250 (0x00fa)
 
Deklaration: Bindings für Registers
 
Beschreibung: Dump all registers to console.
 
Hatari can dump the CPU data+address registers to the console. This is useful for debugging.
 
Ergebnis: None.
 
Verfügbar: Hatari for Mac OS X with specific patches by DHS.
 
Gruppe: Hatari-DHS-XBIOS-Erweiterung
 
Querverweis: Binding
 

4.12.7.1 Bindings für Registers

C: void xbios ( 250 );
 
Assembler:
 
move.w    #250,-(sp)      ; Offset 0
trap      #14             ; XBIOS aufrufen
addq.l    #2,sp           ; Stack korrigieren

Home XBIOSXBIOS DSP-ProgrammierungDSP-Programmierung InterruptfunktionenInterruptfunktionen