-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathglue.h
47 lines (35 loc) · 1.13 KB
/
glue.h
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
// Commander X16 Emulator
// Copyright (c) 2019 Michael Steil
// Copyright (c) 2021-2023 Stephen Horn, et al.
// All rights reserved. License: 2-clause BSD
#ifndef GLUE_H
#define GLUE_H
#include <stdbool.h>
#include <stdint.h>
#include "cpu/fake6502.h"
#include "options.h"
#include "ring_buffer.h"
#define LOAD_HYPERCALLS
// #define TRACE
// #define PROFILE
#define MHZ 8
#define NUM_ROM_BANKS 32
#define HIDDEN_RAM_BANKS (256 - 32)
#define TOTAL_ROM_BANKS (NUM_ROM_BANKS + HIDDEN_RAM_BANKS)
#define ROM_SIZE (TOTAL_ROM_BANKS * 16384) /* banks at $C000-$FFFF */
extern _state6502 state6502;
extern _state6502 debug_state6502;
extern uint8_t waiting;
extern lazy_ring_buffer<_smart_stack, 512> stack6502;
extern ring_buffer<_cpuhistory, 1024> history6502;
extern uint8_t *RAM;
extern uint8_t ROM[ROM_SIZE];
extern uint32_t instructions;
extern uint8_t debug6502;
extern bool save_on_exit;
extern void machine_dump(const char *reason);
extern void machine_reset();
extern void machine_toggle_warp();
extern void init_audio();
extern void main_shutdown();
#endif