-
Notifications
You must be signed in to change notification settings - Fork 6
/
emu-int.h
55 lines (36 loc) · 1.07 KB
/
emu-int.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
48
49
50
51
52
53
54
55
#pragma once
#include "emu-types.h"
// Generic interrupt controller
#define INT_LEVEL 0 // level triggered
#define INT_EDGE 1 // rising edge triggered
extern int _int_line_max;
extern int _int_prio_max;
extern int _int_mode []; // level or edge
extern int _int_prio []; // priority
extern int _int_vect []; // vector (0..255 for IA16)
extern int _int_mask []; // mask flag
extern int _int_req []; // requested flag
extern int _int_serv []; // serviced flag
extern int _int_cpu; // from controller to processor
void int_line_set (int line, int stat);
int int_ack (byte_t * vect);
void int_end_line (int line);
void int_end_prio ();
// Breakpoint interrupt
extern byte_t _break_int_flag;
int int_03h (void);
// Emulated interrupt handlers
typedef int (* int_hand_t) ();
struct int_num_hand_s
{
byte_t num;
int_hand_t hand;
};
typedef struct int_num_hand_s int_num_hand_t;
extern int_num_hand_t _int_tab [];
int int_hand (byte_t i);
void int_init (void);
// TODO: move to rom header
void rom_init (void);
void rom_term (void);
int rom_image_load (char *path);