|
|
1.1 root 1: /*
2: * natfeats.h - NatFeats API header file
3: *
4: * Copyright (c) 2014 by Eero Tamminen
5: *
6: * This file is distributed under the GPL, version 2 or at your
7: * option any later version. See doc/license.txt for details.
8: */
9:
10: #ifndef _NATFEAT_H
11: #define _NATFEAT_H
12:
13: /* AHCC uses registers to pass arguments, but
14: * NatFeats calls expect arguments to be in stack.
15: * "cdecl" can be used to declare that arguments
16: * should be passed in stack.
17: */
18: #if __AHCC__
19: #define CDECL cdecl
20: #else
21: #define CDECL
22: #endif
23:
1.1.1.2 ! root 24:
! 25: /* internal ASM helper interface for natfeats.c */
1.1 root 26: long CDECL nf_id(const char *);
1.1.1.2 ! root 27: /* it's best not to use this directly as arguments are untyped */
1.1 root 28: long CDECL nf_call(long ID, ...);
29: /* call only from Supervisor mode */
30: int CDECL detect_nf(void);
31:
32:
33: /* natfeats.c public prototypes */
34:
35: /**
36: * detect & initialize native features
37: * returns zero for fail
38: */
39: extern int nf_init(void);
40:
41: /**
42: * print string to emulator console
43: * returns number of chars output
44: */
45: extern long nf_print(const char *text);
46:
47: /**
48: * invoke emulator debugger
49: * (Hatari specific, can be used e.g. in asserts)
50: */
51: extern long nf_debugger(void);
52:
53: /**
54: * set emulator fastforward mode on (1) or off (0)
55: * (Hatari specific)
56: * returns previous value
57: */
58: extern long nf_fastforward(long enabled);
59:
60: /**
61: * terminate the execution of the emulation if possible
62: * (runs in supervisor mode)
63: */
64: extern void nf_shutdown(void);
65:
66: /**
67: * terminate the execution of the emulation with exit code
68: * (Hatari specific, can be used e.g. for determining test-case success)
69: */
70: extern void nf_exit(long exitval);
71:
72: #endif /* _NATFEAT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.