Hatari for Mac OS X with patches for development


090216: Hatari built with falcon DSP emu enabled.
090116: Hatari built from the new Mercuri repository (with the DHS patches applied).
081129: Hatari-1.1.0 built with the patches. The CPU frequency can now be set to 128MHz in the GUI menus.
081114: Set CPU frequency from XBios via call 249.
081113: New CPU frequency: 64 and 128 MHz makes the machine runs faster. The speeds are however approximate.
081026: Added new functions to enable/disable the internal Hatari debugger. The --debug option is not default now.


This is a custom build of Hatari from CVS with some specific patches that enhances 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. The following patches are applied to the Hatari sources:
  1. CPU frequency patch. The CPU frequency can be set up to 128 MHz in the SDL and the OSX GUI.
  2. Speedpatch. Via Xbios 255 you can set Hatari into max speed mode (fast forward), useful for assembling, packing and so on. There is also a method to reset the normal ST speed again.
  3. Register dump. Hatari can dump the CPU data+address registers to the console. This is useful for debugging.
  4. Memory dump. Hatari can dump the content of a memory area to the console. This is useful for debugging.
  5. Debugger with instruction stepping. Step thrugh 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.
  6. Cycle counter. Count the number of cycles between two successive calls to Xbios functions. The argument to the call can provide an identifier for the current timer and several counters can be activated simultaneously.


The following binaries are compiled from the corresponding Hatari CVS versions with the DHS specific patches applied. The comand line arguments --bios-intercept and --debug are enabled by default. The following patches are generated from the corresponding CVS tree:


The following Xbios functions are recognized by the patched Hatari:
Xbios Arguments Description
255 0x0001 (w) Min speed
255 0x0002 (w) Max speed
255 0x0003 (w) Enable debugger
255 0x0004 (w) Disable debugger
254 addr(l)/len(l) Dump memory area to Hatari console
253 counter id (w) Start new cycle counter
252 counter id (w) Read cycle counter
251 none Enter Hatari debugger
250 none Dump registers to Hatari console

The following source code provides the above functions:


Updated: February 28, 2009
Contact: gizmo / dhs.nu