4 |
|
|
5 |
#include "ppport.h" |
#include "ppport.h" |
6 |
|
|
7 |
|
#include "M6502.h" |
8 |
|
#include "config.h" |
9 |
|
|
10 |
|
M6502 *R; |
11 |
|
|
12 |
void |
void |
13 |
run (void) { |
run (void) { |
14 |
printf("M6502::run\n"); |
debugf(("M6502::run")); |
15 |
run_forever(); |
run_forever(); |
16 |
} |
} |
17 |
|
|
18 |
|
void |
19 |
|
reset (void) { |
20 |
|
debugf(("M6502::reset called")); |
21 |
|
if ( ! R ) { |
22 |
|
debugf(("allocating space for R")); |
23 |
|
R = malloc(sizeof(M6502)); |
24 |
|
if (!R) { |
25 |
|
printf("can't alloc %d bytes for M6502", sizeof(M6502)); |
26 |
|
exit(1); |
27 |
|
} |
28 |
|
} |
29 |
|
Reset6502(R); |
30 |
|
dump_R; |
31 |
|
} |
32 |
|
|
33 |
MODULE = M6502 PACKAGE = M6502 |
MODULE = M6502 PACKAGE = M6502 |
34 |
|
|
35 |
PROTOTYPES: DISABLE |
PROTOTYPES: DISABLE |
36 |
|
|
37 |
void |
void |
38 |
run() |
run() |
39 |
|
|
40 |
|
void |
41 |
|
reset() |