source: buchla-emu/emu/all.h@ 4c71d39

Last change on this file since 4c71d39 was 4c71d39, checked in by Thomas Lopatic <thomas@…>, 7 years ago

More granular verbosity.

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/*
2 * Copyright (C) 2017 The Contributors
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or (at
7 * your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * A copy of the GNU General Public License can be found in the file
15 * "gpl-v3.txt" in the top directory of this repository.
16 */
17
18#include <stdbool.h>
19#include <stddef.h>
20#include <stdint.h>
21#include <stdio.h>
22#include <unistd.h>
23
24#include <xmmintrin.h>
25
26#include <m68k.h>
27
28#include <SDL2/SDL.h>
29
30#define inf(...) SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__);
31#define err(...) SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__);
32
33#define _ver(_v, _t, ...) { \
34 if (_v > _t) { \
35 SDL_LogVerbose(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
36 } \
37}
38
39#define fail(...) { \
40 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, __VA_ARGS__); \
41 exit(1); \
42}
43
44#define ARRAY_COUNT(_a) (int32_t)(sizeof (_a) / sizeof (_a)[0])
45
46extern int32_t sdl_verbose;
47extern int32_t cpu_verbose;
48extern int32_t fpu_verbose;
49extern int32_t vid_verbose;
50extern int32_t tim_verbose;
51extern int32_t lcd_verbose;
52extern int32_t ser_verbose;
53extern int32_t mid_verbose;
54extern int32_t fdd_verbose;
55extern int32_t snd_verbose;
56extern int32_t led_verbose;
57extern int32_t kbd_verbose;
58
59extern void sdl_init(void);
60extern void sdl_quit(void);
61
62extern void cpu_loop(const char *bios);
63
64extern void fpu_init(void);
65extern void fpu_quit(void);
66extern void fpu_exec(void);
67extern uint32_t fpu_read(uint32_t off, int32_t sz);
68extern void fpu_write(uint32_t off, int32_t sz, uint32_t val);
69
70extern void vid_init(void);
71extern void vid_quit(void);
72extern void vid_exec(void);
73extern uint32_t vid_read(uint32_t off, int32_t sz);
74extern void vid_write(uint32_t off, int32_t sz, uint32_t val);
75
76extern void tim_init(void);
77extern void tim_quit(void);
78extern void tim_exec(void);
79extern uint32_t tim_read(uint32_t off, int32_t sz);
80extern void tim_write(uint32_t off, int32_t sz, uint32_t val);
81
82extern void lcd_init(void);
83extern void lcd_quit(void);
84extern void lcd_exec(void);
85extern uint32_t lcd_read(uint32_t off, int32_t sz);
86extern void lcd_write(uint32_t off, int32_t sz, uint32_t val);
87
88extern void ser_init(void);
89extern void ser_quit(void);
90extern void ser_exec(void);
91extern uint32_t ser_read(uint32_t off, int32_t sz);
92extern void ser_write(uint32_t off, int32_t sz, uint32_t val);
93
94extern void mid_init(void);
95extern void mid_quit(void);
96extern void mid_exec(void);
97extern uint32_t mid_read(uint32_t off, int32_t sz);
98extern void mid_write(uint32_t off, int32_t sz, uint32_t val);
99
100extern void fdd_init(void);
101extern void fdd_quit(void);
102extern void fdd_exec(void);
103extern uint32_t fdd_read(uint32_t off, int32_t sz);
104extern void fdd_write(uint32_t off, int32_t sz, uint32_t val);
105
106extern void snd_init(void);
107extern void snd_quit(void);
108extern void snd_exec(void);
109extern uint32_t snd_read(uint32_t off, int32_t sz);
110extern void snd_write(uint32_t off, int32_t sz, uint32_t val);
111
112extern void led_init(void);
113extern void led_quit(void);
114extern void led_exec(void);
115extern uint32_t led_read(uint32_t off, int32_t sz);
116extern void led_write(uint32_t off, int32_t sz, uint32_t val);
117
118extern void kbd_init(void);
119extern void kbd_quit(void);
120extern void kbd_exec(void);
121extern uint32_t kbd_read(uint32_t off, int32_t sz);
122extern void kbd_write(uint32_t off, int32_t sz, uint32_t val);
Note: See TracBrowser for help on using the repository browser.