1 /* Miscellaneous definitions for xz80, copyright (C) 1994 Ian Collier.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #define NUM_SEGS (65536/SEG_SIZE)
33 #define DLIMITEDRUN 32
36 extern unsigned char *segments
[];
37 extern char bank_file_name
[];
38 void switchBank( int segment
, unsigned bank
);
43 extern unsigned char mem
[];
45 extern int hsize
,vsize
;
46 extern volatile int interrupted
;
48 extern unsigned short breakpoints
[5];
49 extern unsigned long tstates
;
52 extern int mainloop(int flags
);
53 int handle_sys(int scall
, int parameter
);
55 typedef struct sfunction mfunction
;
56 typedef struct sfunction
*pmfunction
;
66 extern pmfunction fun_first
;
68 #define fetch(x) (mem[x])
69 #define fetch2(x) ((mem[x+1]<<8)|mem[x])
71 #define store( addr, value ) mem[addr]=value;
73 #define store2b(addr,hi,lo) \
77 #define store2(x,y) store2b(x,(y)>>8,(y)&255)
80 static void inline storefunc(unsigned short ad
,unsigned char b
){
85 #define store(x,y) storefunc(x,y)
87 static void inline store2func(unsigned short ad
,unsigned char b1
,unsigned char b2
){
91 #define store2b(x,hi,lo) store2func(x,hi,lo)