[hatari-devel] Tracing AES calls with the existing VDI code?

Eero Tamminen eerot at users.berlios.de
Thu Oct 14 20:46:16 CEST 2010


Hi,

On Thursday 14 October 2010, Thomas Huth wrote:
> Gerhard Stoll <gerhard_stoll at gmx.de> wrote:
>> I have an other question:
>> For what is XBIOS (255) used from Hatari?
>
> This is a "remote control" interface that allows TOS programs to
> control certain settings of the emulator.

Or external program that starts Hatari with --control-socket option
and provides Hatari a socket from which it should read the commands.
"hconsole" and "hatariui" Python scripts are examples of such programs.

The TOS program can do anything that "hconsole" can do through the Hatari
remote API.  "hconsole" can be used to experiment with that API.


> It can be used, for example, to switch to fast-forward mode etc.

The full set of what can be done through it is:
- change anything that can be set by Hatari command line options
  (some of them, like monitor type change, cause emulation reset)
- invoke any debugger commands
  (program can trace or set breakpoints to itself and even log these
  to a file in a GEMDOS HDD directory it can access inside the emulation)
- invoke Hatari keyboard shortcuts (like fast forward)
- simulate key and mouse button presses

The XBios call argument is a string containing the required command
and its arguments.  Supported commands are:
- hatari-debug <Debug UI command>
- hatari-event <event to simulate>
- hatari-option <command line options>
- hatari-enable/disable/toggle <device name>
- hatari-path <config name> <new path>
- hatari-shortcut <shortcut name>
- hatari-embed-info
- hatari-stop
- hatari-cont
The last two can be used to stop and continue the Hatari emulation.

If the command arguments are wrong or missing, Hatari will output
usage information to the host console.

The command or at least their argument names may still change.  They've
evolved along with hatariui and hconsole, and be a bit gnarly, because they
were never "designed" as a full set.  I would be interested about any
comments on them...


>> Is it correct that every  programm can used this call?

Yes, and to track usage of this call, run Hatari with:
	--trace xbios

(and filter other calls out e.g. with "grep HatariControl")


> The XBIOS interception is disabled by default, so it  can not be used
> by TOS programs by default. You've got to enable the (X)BIOS
> interception with --bios-intercept to use it.

Which nowadays will also enable Bconout(2) output to host console...


>> Can this call  uesd independent what TOS is loaded?

Yes.

	- Eero



More information about the hatari-devel mailing list