Open jxu opened 6 years ago
Thanks!
Yes, this worked but was not enough : ld complained about double definitions. Here is a diff to make compilation working :
diff --git a/emu/calc6809.h b/emu/calc6809.h index 7951f1e..f1cdb56 100644 --- a/emu/calc6809.h +++ b/emu/calc6809.h @@ -15,13 +15,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-int ccc, ccv, ccz, ccn, cci, cch, ccf, cce; +extern int ccc, ccv, ccz, ccn, cci, cch, ccf, cce;
/ help to compute V bit /
-tt_u32 ccvx, ccvy, ccvz; -int ccvr, ccv8; +extern tt_u32 ccvx, ccvy, ccvz; +extern int ccvr, ccv8;
@@ -53,10 +53,10 @@ int ccvr, ccv8;
-int addrmode; +extern int addrmode;
-tt_u16 (eaddrmodb[7])(); -tt_u16 (eaddrmodw[7])(); +extern tt_u16 (eaddrmodb[7])(); +extern tt_u16 (eaddrmodw[7])();
diff --git a/emu/emu6809.c b/emu/emu6809.c index 5d96b00..a72ffa2 100644 --- a/emu/emu6809.c +++ b/emu/emu6809.c @@ -27,6 +27,8 @@ tt_u16 rpc, rx, ry, ru, rs; tt_u8 ra, rb, rdp;
int ccc, ccv, ccz, ccn, cci, cch, ccf, cce; +tt_u32 ccvx, ccvy, ccvz; +int ccvr, ccv8;
tt_u16 *regp[] = { &rx, &ry, &ru, &rs };
diff --git a/emu/emu6809.h b/emu/emu6809.h index 7f79384..1235c25 100644 --- a/emu/emu6809.h +++ b/emu/emu6809.h @@ -16,17 +16,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-tt_u16 rpc, rx, ry, ru, rs; -tt_u8 ra, rb, rdp; -int nbcycle; -int err6809; +extern tt_u16 rpc, rx, ry, ru, rs; +extern tt_u8 ra, rb, rdp; +extern int nbcycle; +extern int err6809;
-long cycles; +extern long cycles;
-tt_u16 pchist[PC_HISTORY_SIZE]; -int pchistidx; -int pchistnbr; +extern tt_u16 pchist[PC_HISTORY_SIZE]; +extern int pchistidx; +extern int pchistnbr;
/ macros / diff --git a/hardware/acia.c b/hardware/acia.c index 45eb3e5..5c26141 100644 --- a/hardware/acia.c +++ b/hardware/acia.c @@ -51,6 +51,7 @@ static void acia_run_pty(); static void acia_run_midi();
void (*acia_run)() = NULL; +struct Acia acia;
static int midi_init() { int i; diff --git a/hardware/acia.h b/hardware/acia.h index e2a9cd2..e2564ea 100644 --- a/hardware/acia.h +++ b/hardware/acia.h @@ -32,11 +32,11 @@
int acia_init(int device); void acia_destroy(); -void (acia_run)(); +extern void (acia_run)(); uint8_t acia_rreg(int reg); void acia_wreg(int reg, uint8_t val);
-struct { +extern struct Acia { uint8_t cr; uint8_t sr; uint8_t tdr;
Running
./configure
Running
autoconf
Requires
autoreconf -i
, then configures and makes correctly