1 /*****************************************************************************
2  *
3  *	 m65ce02.c
4  *	 Portable 65ce02 emulator V1.0beta
5  *
6  *	 Copyright (c) 2000 Peter Trauner, all rights reserved.
7  *
8  *	 - This source code is released as freeware for non-commercial purposes.
9  *	 - You are free to use and redistribute this code in modified or
10  *	   unmodified form, provided you list me in the credits.
11  *	 - If you modify this source code, you must add a notice to each modified
12  *	   source file that it has been changed.  If you're a nice person, you
13  *	   will clearly mark each change too.  :)
14  *	 - If you wish to use this for commercial purposes, please contact me at
15  *	   pullmoll@t-online.de
16  *	 - The author of this copywritten work reserves the right to change the
17  *	   terms of its usage and license at any time, including retroactively
18  *	 - This entire notice must remain in the source code.
19  *
20  *****************************************************************************/
21 
22 #ifndef _M65CE02_H
23 #define _M65CE02_H
24 
25 #include "cpuintrf.h"
26 #include "osd_cpu.h"
27 #include "m6502.h"
28 
29 enum {
30 	M65CE02_PC=1, M65CE02_S, M65CE02_P, M65CE02_A, M65CE02_X, M65CE02_Y,
31 	M65CE02_Z, M65CE02_B, M65CE02_EA, M65CE02_ZP,
32 	M65CE02_NMI_STATE, M65CE02_IRQ_STATE
33 };
34 
35 #define M65CE02_INT_NONE	M6502_INT_NONE
36 #define M65CE02_INT_IRQ 	M6502_INT_IRQ
37 #define M65CE02_INT_NMI 	M6502_INT_NMI
38 
39 #define M65CE02_NMI_VEC 	M6502_NMI_VEC
40 #define M65CE02_RST_VEC 	M6502_RST_VEC
41 #define M65CE02_IRQ_VEC 	M6502_IRQ_VEC
42 
43 extern int m65ce02_ICount;				/* cycle count */
44 
45 extern void m65ce02_reset(void *param);
46 extern void m65ce02_exit(void);
47 extern int	m65ce02_execute(int cycles);
48 extern unsigned m65ce02_get_context (void *dst);
49 extern void m65ce02_set_context (void *src);
50 extern unsigned m65ce02_get_pc (void);
51 extern void m65ce02_set_pc (unsigned val);
52 extern unsigned m65ce02_get_sp (void);
53 extern void m65ce02_set_sp (unsigned val);
54 extern unsigned m65ce02_get_reg (int regnum);
55 extern void m65ce02_set_reg (int regnum, unsigned val);
56 extern void m65ce02_set_nmi_line(int state);
57 extern void m65ce02_set_irq_line(int irqline, int state);
58 extern void m65ce02_set_irq_callback(int (*callback)(int irqline));
59 extern void m65ce02_state_save(void *file);
60 extern void m65ce02_state_load(void *file);
61 extern const char *m65ce02_info(void *context, int regnum);
62 extern unsigned m65ce02_dasm(char *buffer, unsigned pc);
63 
64 #endif /* _M65CE02_H */
65 
66 
67