-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnatfeats.h
More file actions
78 lines (65 loc) · 1.57 KB
/
natfeats.h
File metadata and controls
78 lines (65 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
* natfeats.h - NatFeats API header file
*
* Copyright (c) 2014 by Eero Tamminen
*
* This file is distributed under the GPL, version 2 or at your
* option any later version. See doc/license.txt for details.
*/
#ifndef _NATFEAT_H
#define _NATFEAT_H
#ifdef __cplusplus
extern "C" {
#endif
/* AHCC uses registers to pass arguments, but
* NatFeats calls expect arguments to be in stack.
* "cdecl" can be used to declare that arguments
* should be passed in stack.
*/
#if __AHCC__
#define CDECL cdecl
#else
#define CDECL
#endif
/* nf_asm.s ASM helper interface for natfeats.c */
long CDECL nf_id(const char *);
long CDECL nf_call(long ID, ...);
/* call only from Supervisor mode */
int CDECL detect_nf(void);
/* natfeats.c public prototypes */
/**
* detect & initialize native features
* returns zero for fail
*/
int nf_init(void);
/**
* print string to emulator console
* returns number of chars output
*/
long nf_print(const char *text);
int nf_printf(const char *fmt, ...);
/**
* invoke emulator debugger
* (Hatari specific, can be used e.g. in asserts)
*/
long nf_debugger(void);
/**
* set emulator fastforward mode on (1) or off (0)
* (Hatari specific)
* returns previous value
*/
long nf_fastforward(long enabled);
/**
* terminate the execution of the emulation if possible
* (runs in supervisor mode)
*/
void nf_shutdown(void);
/**
* terminate the execution of the emulation with exit code
* (Hatari specific, can be used e.g. for determining test-case success)
*/
void nf_exit(long exitval);
#ifdef __cplusplus
}
#endif // _cplusplus
#endif /* _NATFEAT_H */