cop400.c: Modernized cpu core (nw)

This commit is contained in:
Wilbert Pol 2013-07-14 12:52:54 +00:00
parent daf291e96f
commit 9048c5daf1
10 changed files with 1140 additions and 1323 deletions

File diff suppressed because it is too large Load diff

View file

@ -95,61 +95,364 @@ enum cop400_microbus {
COP400_MICROBUS_ENABLED
};
/* interface */
struct cop400_interface
#define MCFG_COP400_CONFIG(_cki, _cko, _microbus) \
cop400_cpu_device::set_cki(*device, _cki); \
cop400_cpu_device::set_cko(*device, _cko); \
cop400_cpu_device::set_microbus(*device, _microbus);
class cop400_cpu_device : public cpu_device
{
cop400_cki_bond cki; /* CKI bonding option */
cop400_cko_bond cko; /* CKO bonding option */
cop400_microbus microbus; /* microbus option */
public:
// construction/destruction
cop400_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source, UINT8 program_addr_bits, UINT8 data_addr_bits, UINT8 featuremask, UINT8 g_mask, UINT8 d_mask, UINT8 in_mask, bool has_counter, bool has_inil, address_map_constructor internal_map_program, address_map_constructor internal_map_data);
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
static void set_cki(device_t &device, cop400_cki_bond cki) { downcast<cop400_cpu_device &>(device).m_cki = cki; }
static void set_cko(device_t &device, cop400_cko_bond cko) { downcast<cop400_cpu_device &>(device).m_cko = cko; }
static void set_microbus(device_t &device, cop400_microbus microbus) { downcast<cop400_cpu_device &>(device).m_microbus = microbus; }
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
// device_execute_interface overrides
virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + m_cki - 1) / m_cki; }
virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * m_cki); }
virtual UINT32 execute_min_cycles() const { return 1; }
virtual UINT32 execute_max_cycles() const { return 2; }
virtual UINT32 execute_input_lines() const { return 0; }
virtual void execute_run();
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
return (spacenum == AS_PROGRAM) ? &m_program_config :
( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
}
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
virtual void state_export(const device_state_entry &entry);
void state_string_export(const device_state_entry &entry, astring &string);
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
address_space_config m_program_config;
address_space_config m_data_config;
address_space_config m_io_config;
cop400_cki_bond m_cki;
cop400_cko_bond m_cko;
cop400_microbus m_microbus;
bool m_has_counter;
bool m_has_inil;
address_space *m_program;
direct_read_data *m_direct;
address_space *m_data;
address_space *m_io;
UINT8 m_featuremask;
/* registers */
UINT16 m_pc; /* 9/10/11-bit ROM address program counter */
UINT16 m_prevpc; /* previous value of program counter */
UINT8 m_a; /* 4-bit accumulator */
UINT8 m_b; /* 5/6/7-bit RAM address register */
int m_c; /* 1-bit carry register */
UINT8 m_n; /* 2-bit stack pointer (COP440 only) */
UINT8 m_en; /* 4-bit enable register */
UINT8 m_g; /* 4-bit general purpose I/O port */
UINT8 m_q; /* 8-bit latch for L port */
UINT16 m_sa, m_sb, m_sc; /* subroutine save registers (not present in COP440) */
UINT8 m_sio; /* 4-bit shift register and counter */
int m_skl; /* 1-bit latch for SK output */
UINT8 m_h; /* 4-bit general purpose I/O port (COP440 only) */
UINT8 m_r; /* 8-bit general purpose I/O port (COP440 only) */
UINT8 m_flags; // used for I/O only
/* counter */
UINT8 m_t; /* 8-bit timer */
int m_skt_latch; /* timer overflow latch */
/* input/output ports */
UINT8 m_g_mask; /* G port mask */
UINT8 m_d_mask; /* D port mask */
UINT8 m_in_mask; /* IN port mask */
UINT8 m_il; /* IN latch */
UINT8 m_in[4]; /* IN port shift register */
UINT8 m_si; /* serial input */
/* skipping logic */
int m_skip; /* skip next instruction */
int m_skip_lbi; /* skip until next non-LBI instruction */
int m_last_skip; /* last value of skip */
int m_halt; /* halt mode */
int m_idle; /* idle mode */
/* microbus */
int m_microbus_int; /* microbus interrupt */
/* execution logic */
int m_InstLen[256]; /* instruction length in bytes */
int m_LBIops[256];
int m_LBIops33[256];
int m_icount; /* instruction counter */
/* timers */
emu_timer *m_serial_timer;
emu_timer *m_counter_timer;
emu_timer *m_inil_timer;
emu_timer *m_microbus_timer;
typedef void ( cop400_cpu_device::*cop400_opcode_func ) (UINT8 opcode);
/* The opcode table now is a combination of cycle counts and function pointers */
struct cop400_opcode_map {
UINT32 cycles;
cop400_opcode_func function;
};
const cop400_opcode_map *m_opcode_map;
static const cop400_opcode_map COP410_OPCODE_23_MAP[];
static const cop400_opcode_map COP410_OPCODE_33_MAP[];
static const cop400_opcode_map COP410_OPCODE_MAP[];
static const cop400_opcode_map COP420_OPCODE_23_MAP[];
static const cop400_opcode_map COP420_OPCODE_33_MAP[];
static const cop400_opcode_map COP420_OPCODE_MAP[];
static const cop400_opcode_map COP444_OPCODE_23_MAP[256];
static const cop400_opcode_map COP444_OPCODE_33_MAP[256];
static const cop400_opcode_map COP444_OPCODE_MAP[256];
void serial_tick();
void counter_tick();
void inil_tick();
void microbus_tick();
void PUSH(UINT16 data);
void POP();
void WRITE_Q(UINT8 data);
void WRITE_G(UINT8 data);
void illegal(UINT8 opcode);
void asc(UINT8 opcode);
void add(UINT8 opcode);
void aisc(UINT8 opcode);
void clra(UINT8 opcode);
void comp(UINT8 opcode);
void nop(UINT8 opcode);
void rc(UINT8 opcode);
void sc(UINT8 opcode);
void xor_(UINT8 opcode);
void adt(UINT8 opcode);
void casc(UINT8 opcode);
void jid(UINT8 opcode);
void jmp(UINT8 opcode);
void jp(UINT8 opcode);
void jsr(UINT8 opcode);
void ret(UINT8 opcode);
void cop420_ret(UINT8 opcode);
void retsk(UINT8 opcode);
void halt(UINT8 opcode);
void it(UINT8 opcode);
void camq(UINT8 opcode);
void ld(UINT8 opcode);
void lqid(UINT8 opcode);
void rmb0(UINT8 opcode);
void rmb1(UINT8 opcode);
void rmb2(UINT8 opcode);
void rmb3(UINT8 opcode);
void smb0(UINT8 opcode);
void smb1(UINT8 opcode);
void smb2(UINT8 opcode);
void smb3(UINT8 opcode);
void stii(UINT8 opcode);
void x(UINT8 opcode);
void xad(UINT8 opcode);
void xds(UINT8 opcode);
void xis(UINT8 opcode);
void cqma(UINT8 opcode);
void ldd(UINT8 opcode);
void camt(UINT8 opcode);
void ctma(UINT8 opcode);
void cab(UINT8 opcode);
void cba(UINT8 opcode);
void lbi(UINT8 opcode);
void lei(UINT8 opcode);
void xabr(UINT8 opcode);
void cop444_xabr(UINT8 opcode);
void skc(UINT8 opcode);
void ske(UINT8 opcode);
void skgz(UINT8 opcode);
void skgbz0(UINT8 opcode);
void skgbz1(UINT8 opcode);
void skgbz2(UINT8 opcode);
void skgbz3(UINT8 opcode);
void skmbz0(UINT8 opcode);
void skmbz1(UINT8 opcode);
void skmbz2(UINT8 opcode);
void skmbz3(UINT8 opcode);
void skt(UINT8 opcode);
void ing(UINT8 opcode);
void inl(UINT8 opcode);
void obd(UINT8 opcode);
void omg(UINT8 opcode);
void xas(UINT8 opcode);
void inin(UINT8 opcode);
void cop402m_inin(UINT8 opcode);
void inil(UINT8 opcode);
void ogi(UINT8 opcode);
void cop410_op23(UINT8 opcode);
void cop410_op33(UINT8 opcode);
void cop420_op23(UINT8 opcode);
void cop420_op33(UINT8 opcode);
void cop444_op23(UINT8 opcode);
void cop444_op33(UINT8 opcode);
void skgbz(int bit);
void skmbz(int bit);
};
#define COP400_INTERFACE(name) const cop400_interface (name) =
/***************************************************************************
MACROS
***************************************************************************/
#define CPU_COP401 CPU_GET_INFO_NAME( cop401 )
#define CPU_COP410 CPU_GET_INFO_NAME( cop410 )
#define CPU_COP411 CPU_GET_INFO_NAME( cop411 )
#define CPU_COP402 CPU_GET_INFO_NAME( cop402 )
#define CPU_COP420 CPU_GET_INFO_NAME( cop420 )
#define CPU_COP421 CPU_GET_INFO_NAME( cop421 )
#define CPU_COP422 CPU_GET_INFO_NAME( cop422 )
#define CPU_COP404 CPU_GET_INFO_NAME( cop404 )
#define CPU_COP424 CPU_GET_INFO_NAME( cop424 )
#define CPU_COP425 CPU_GET_INFO_NAME( cop425 )
#define CPU_COP426 CPU_GET_INFO_NAME( cop426 )
#define CPU_COP444 CPU_GET_INFO_NAME( cop444 )
#define CPU_COP445 CPU_GET_INFO_NAME( cop445 )
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
/* COP410 family */
DECLARE_LEGACY_CPU_DEVICE(COP401, cop401);
DECLARE_LEGACY_CPU_DEVICE(COP410, cop410);
DECLARE_LEGACY_CPU_DEVICE(COP411, cop411);
// COP401 is a ROMless version of the COP410
class cop401_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
class cop410_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop410_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP411 is a 20-pin package version of the COP410, missing D2/D3/G3/CKO
class cop411_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop411_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
/* COP420 family */
DECLARE_LEGACY_CPU_DEVICE(COP402, cop402);
DECLARE_LEGACY_CPU_DEVICE(COP420, cop420);
DECLARE_LEGACY_CPU_DEVICE(COP421, cop421);
DECLARE_LEGACY_CPU_DEVICE(COP422, cop422);
// COP402 is a ROMless version of the COP420
class cop402_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
class cop420_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop420_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP421 is a 24-pin package version of the COP420, lacking the IN ports
class cop421_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop421_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP422 is a 20-pin package version of the COP420, lacking G0/G1, D0/D1, and the IN ports
class cop422_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop422_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
/* COP444 family */
DECLARE_LEGACY_CPU_DEVICE(COP404, cop404);
DECLARE_LEGACY_CPU_DEVICE(COP424, cop424);
DECLARE_LEGACY_CPU_DEVICE(COP425, cop425);
DECLARE_LEGACY_CPU_DEVICE(COP426, cop426);
DECLARE_LEGACY_CPU_DEVICE(COP444, cop444);
DECLARE_LEGACY_CPU_DEVICE(COP445, cop445);
// COP404 is a ROMless version of the COP444, which can emulate a COP410C/COP411C, COP424C/COP425C, or a COP444C/COP445C
class cop404_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop404_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP424 is functionally equivalent to COP444, with only 1K ROM and 64x4 bytes RAM
class cop424_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop424_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP425 is a 24-pin package version of the COP424, lacking the IN ports
class cop425_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop425_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP426 is a 20-pin package version of the COP424, with only L0-L7, G2-G3, D2-D3 ports
class cop426_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop426_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
class cop444_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop444_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
// COP445 is a 24-pin package version of the COP444, lacking the IN ports
class cop445_cpu_device : public cop400_cpu_device
{
public:
// construction/destruction
cop445_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
};
extern const device_type COP401;
extern const device_type COP410;
extern const device_type COP411;
extern const device_type COP402;
extern const device_type COP420;
extern const device_type COP421;
extern const device_type COP422;
extern const device_type COP404;
extern const device_type COP424;
extern const device_type COP425;
extern const device_type COP426;
extern const device_type COP444;
extern const device_type COP445;
/* disassemblers */
extern CPU_DISASSEMBLE( cop410 );
extern CPU_DISASSEMBLE( cop420 );
extern CPU_DISASSEMBLE( cop444 );
#endif /* __COP400__ */

View file

@ -36,7 +36,7 @@ INSTRUCTION( asc )
if (A > 0xF)
{
C = 1;
cpustate->skip = 1;
m_skip = 1;
A &= 0xF;
}
else
@ -87,7 +87,7 @@ INSTRUCTION( aisc )
if (A > 0x0f)
{
cpustate->skip = 1;
m_skip = 1;
A &= 0xF;
}
}
@ -239,7 +239,7 @@ INSTRUCTION( casc )
if (A > 0xF)
{
C = 1;
cpustate->skip = 1;
m_skip = 1;
A &= 0xF;
}
else
@ -330,7 +330,7 @@ INSTRUCTION( jp )
{
// JSRP
UINT8 a = opcode & 0x3f;
PUSH(cpustate, PC);
PUSH(PC);
PC = 0x80 | a;
}
}
@ -354,7 +354,7 @@ INSTRUCTION( jsr )
{
UINT16 a = ((opcode & 0x07) << 8) | ROM(PC);
PUSH(cpustate, PC + 1);
PUSH(PC + 1);
PC = a;
}
@ -373,7 +373,7 @@ INSTRUCTION( jsr )
INSTRUCTION( ret )
{
POP(cpustate);
POP();
}
/*
@ -393,8 +393,8 @@ INSTRUCTION( ret )
INSTRUCTION( cop420_ret )
{
POP(cpustate);
cpustate->skip = cpustate->last_skip;
POP();
m_skip = m_last_skip;
}
/*
@ -414,8 +414,8 @@ INSTRUCTION( cop420_ret )
INSTRUCTION( retsk )
{
POP(cpustate);
cpustate->skip = 1;
POP();
m_skip = 1;
}
/*
@ -433,7 +433,7 @@ INSTRUCTION( retsk )
INSTRUCTION( halt )
{
cpustate->halt = 1;
m_halt = 1;
}
/*
@ -449,8 +449,8 @@ INSTRUCTION( halt )
INSTRUCTION( it )
{
cpustate->halt = 1;
cpustate->idle = 1;
m_halt = 1;
m_idle = 1;
}
/***************************************************************************
@ -506,11 +506,11 @@ INSTRUCTION( camq )
UINT8 data = (A << 4) | RAM_R(B);
WRITE_Q(cpustate, data);
WRITE_Q(data);
#ifdef CAMQ_BUG
WRITE_Q(cpustate, 0x3c);
WRITE_Q(cpustate, data);
WRITE_Q(0x3c);
WRITE_Q(data);
#endif
}
@ -553,10 +553,10 @@ INSTRUCTION( ld )
INSTRUCTION( lqid )
{
PUSH(cpustate, PC);
PUSH(PC);
PC = (PC & 0x700) | (A << 4) | RAM_R(B);
WRITE_Q(cpustate, ROM(PC));
POP(cpustate);
WRITE_Q(ROM(PC));
POP();
}
/*
@ -733,7 +733,7 @@ INSTRUCTION( xds )
B = B ^ r;
if (Bd == 0x0f) cpustate->skip = 1;
if (Bd == 0x0f) m_skip = 1;
}
/*
@ -768,7 +768,7 @@ INSTRUCTION( xis )
B = B ^ r;
if (Bd == 0x00) cpustate->skip = 1;
if (Bd == 0x00) m_skip = 1;
}
/*
@ -920,7 +920,7 @@ INSTRUCTION( lbi )
B = (opcode & 0x70) | (((opcode & 0x0f) + 1) & 0x0f);
}
cpustate->skip_lbi = 1;
m_skip_lbi = 1;
}
/*
@ -1014,7 +1014,7 @@ INSTRUCTION( cop444_xabr )
INSTRUCTION( skc )
{
if (C == 1) cpustate->skip = 1;
if (C == 1) m_skip = 1;
}
/*
@ -1032,7 +1032,7 @@ INSTRUCTION( skc )
INSTRUCTION( ske )
{
if (A == RAM_R(B)) cpustate->skip = 1;
if (A == RAM_R(B)) m_skip = 1;
}
/*
@ -1050,7 +1050,7 @@ INSTRUCTION( ske )
INSTRUCTION( skgz )
{
if (IN_G() == 0) cpustate->skip = 1;
if (IN_G() == 0) m_skip = 1;
}
/*
@ -1073,15 +1073,15 @@ INSTRUCTION( skgz )
*/
INLINE void skgbz(cop400_state *cpustate, int bit)
void cop400_cpu_device::skgbz(int bit)
{
if (!BIT(IN_G(), bit)) cpustate->skip = 1;
if (!BIT(IN_G(), bit)) m_skip = 1;
}
INSTRUCTION( skgbz0 ) { skgbz(cpustate, 0); }
INSTRUCTION( skgbz1 ) { skgbz(cpustate, 1); }
INSTRUCTION( skgbz2 ) { skgbz(cpustate, 2); }
INSTRUCTION( skgbz3 ) { skgbz(cpustate, 3); }
INSTRUCTION( skgbz0 ) { skgbz(0); }
INSTRUCTION( skgbz1 ) { skgbz(1); }
INSTRUCTION( skgbz2 ) { skgbz(2); }
INSTRUCTION( skgbz3 ) { skgbz(3); }
/*
@ -1103,15 +1103,15 @@ INSTRUCTION( skgbz3 ) { skgbz(cpustate, 3); }
*/
INLINE void skmbz(cop400_state *cpustate, int bit)
void cop400_cpu_device::skmbz(int bit)
{
if (!BIT(RAM_R(B), bit)) cpustate->skip = 1;
if (!BIT(RAM_R(B), bit)) m_skip = 1;
}
INSTRUCTION( skmbz0 ) { skmbz(cpustate, 0); }
INSTRUCTION( skmbz1 ) { skmbz(cpustate, 1); }
INSTRUCTION( skmbz2 ) { skmbz(cpustate, 2); }
INSTRUCTION( skmbz3 ) { skmbz(cpustate, 3); }
INSTRUCTION( skmbz0 ) { skmbz(0); }
INSTRUCTION( skmbz1 ) { skmbz(1); }
INSTRUCTION( skmbz2 ) { skmbz(2); }
INSTRUCTION( skmbz3 ) { skmbz(3); }
/*
@ -1128,10 +1128,10 @@ INSTRUCTION( skmbz3 ) { skmbz(cpustate, 3); }
INSTRUCTION( skt )
{
if (cpustate->skt_latch)
if (m_skt_latch)
{
cpustate->skt_latch = 0;
cpustate->skip = 1;
m_skt_latch = 0;
m_skip = 1;
}
}
@ -1212,7 +1212,7 @@ INSTRUCTION( obd )
INSTRUCTION( omg )
{
WRITE_G(cpustate, RAM_R(B));
WRITE_G(RAM_R(B));
}
/*
@ -1314,5 +1314,5 @@ INSTRUCTION( ogi )
{
UINT8 y = opcode & 0x0f;
WRITE_G(cpustate, y);
WRITE_G(y);
}

View file

@ -190,14 +190,6 @@ static CDP1852_INTERFACE( draco_cdp1852_out1_intf )
DEVCB_NULL
};
/* COP400 Interface */
static COP400_INTERFACE( draco_cop_intf )
{
COP400_CKI_DIVISOR_16, // ???
COP400_CKO_OSCILLATOR_OUTPUT, // ???
COP400_MICROBUS_DISABLED
};
/* Memory Maps */
@ -518,7 +510,7 @@ static MACHINE_CONFIG_START( draco, draco_state )
MCFG_CPU_ADD(COP402N_TAG, COP402, DRACO_SND_CHR1)
MCFG_CPU_PROGRAM_MAP(draco_sound_map)
MCFG_CPU_IO_MAP(draco_sound_io_map)
MCFG_CPU_CONFIG(draco_cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED )
/* input/output hardware */
MCFG_CDP1852_ADD("ic29", CDP1852_CLOCK_HIGH, cidelsa_cdp1852_in0_intf) /* clock is really tied to CDP1876 CMSEL (pin 32) */

View file

@ -622,12 +622,6 @@ static const ay8910_interface ay8910_config =
DEVCB_NULL
};
static COP400_INTERFACE( looping_cop_intf )
{
COP400_CKI_DIVISOR_16, // ???
COP400_CKO_OSCILLATOR_OUTPUT, // ???
COP400_MICROBUS_DISABLED
};
/*************************************
*
@ -651,7 +645,7 @@ static MACHINE_CONFIG_START( looping, looping_state )
MCFG_CPU_PROGRAM_MAP(looping_cop_map)
MCFG_CPU_DATA_MAP(looping_cop_data_map)
MCFG_CPU_IO_MAP(looping_cop_io_map)
MCFG_CPU_CONFIG(looping_cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED )
/* video hardware */

View file

@ -782,15 +782,6 @@ void thayers_state::machine_reset()
// laserdisc_set_type(m_laserdisc, newtype);
}
/* COP400 Interface */
static COP400_INTERFACE( thayers_cop_intf )
{
COP400_CKI_DIVISOR_4, // ???
COP400_CKO_OSCILLATOR_OUTPUT, // ???
COP400_MICROBUS_DISABLED
};
/* Machine Driver */
static MACHINE_CONFIG_START( thayers, thayers_state )
@ -801,7 +792,7 @@ static MACHINE_CONFIG_START( thayers, thayers_state )
MCFG_CPU_ADD("mcu", COP421, XTAL_4MHz/2) // COP421L-PCA/N
MCFG_CPU_IO_MAP(thayers_cop_io_map)
MCFG_CPU_CONFIG(thayers_cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_4, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_DISABLED )
MCFG_LASERDISC_PR7820_ADD("laserdisc")

View file

@ -62,13 +62,6 @@ INPUT_PORTS_END
/* Machine Driver */
static COP400_INTERFACE( advision_cop411_interface )
{
COP400_CKI_DIVISOR_4,
COP400_CKO_RAM_POWER_SUPPLY, // ??? or not connected
COP400_MICROBUS_DISABLED
};
static MACHINE_CONFIG_START( advision, advision_state )
/* basic machine hardware */
MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_11MHz)
@ -76,7 +69,7 @@ static MACHINE_CONFIG_START( advision, advision_state )
MCFG_CPU_IO_MAP(io_map)
MCFG_CPU_ADD(COP411_TAG, COP411, 52631*16) // COP411L-KCN/N
MCFG_CPU_CONFIG(advision_cop411_interface)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_4, COP400_CKO_RAM_POWER_SUPPLY, COP400_MICROBUS_DISABLED )
MCFG_CPU_IO_MAP(sound_io_map)
/* video hardware */

View file

@ -119,13 +119,6 @@ static const floppy_interface lisa_floppy_interface =
NULL
};
static COP400_INTERFACE( cop_intf )
{
COP400_CKI_DIVISOR_16, // ???
COP400_CKO_OSCILLATOR_OUTPUT,
COP400_MICROBUS_ENABLED
};
/***************************************************************************
MACHINE DRIVER
***************************************************************************/
@ -139,11 +132,11 @@ static MACHINE_CONFIG_START( lisa, lisa_state )
MCFG_CPU_ADD(COP421_TAG, COP421, 3900000)
MCFG_CPU_IO_MAP(lisa_cop_io_map)
MCFG_CPU_CONFIG(cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED )
MCFG_CPU_ADD(KB_COP421_TAG, COP421, 3900000) // ?
MCFG_CPU_IO_MAP(kb_cop_io_map)
MCFG_CPU_CONFIG(cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED )
MCFG_CPU_ADD("fdccpu", M6504, 2000000) /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */
MCFG_CPU_PROGRAM_MAP(lisa_fdc_map)

View file

@ -1337,13 +1337,6 @@ INTERRUPT_GEN_MEMBER(newbrain_state::newbrain_interrupt)
}
}
static COP400_INTERFACE( newbrain_cop_intf )
{
COP400_CKI_DIVISOR_16, // ???
COP400_CKO_OSCILLATOR_OUTPUT,
COP400_MICROBUS_ENABLED
};
/* Machine Drivers */
static const cassette_interface newbrain_cassette_interface =
@ -1382,7 +1375,7 @@ static MACHINE_CONFIG_START( newbrain_a, newbrain_state )
MCFG_CPU_ADD(COP420_TAG, COP420, XTAL_16MHz/8) // COP420-GUW/N
MCFG_CPU_IO_MAP(newbrain_cop_io_map)
MCFG_CPU_CONFIG(newbrain_cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED )
MCFG_GFXDECODE(newbrain)

View file

@ -32,23 +32,16 @@ static ADDRESS_MAP_START( cop_io, AS_IO, 8, t400_test_suite_state )
AM_RANGE(COP400_PORT_CKO, COP400_PORT_CKO) AM_NOP
ADDRESS_MAP_END
static COP400_INTERFACE( cop_intf )
{
COP400_CKI_DIVISOR_16,
COP400_CKO_OSCILLATOR_OUTPUT,
COP400_MICROBUS_ENABLED
};
static MACHINE_CONFIG_START( test_t410, t400_test_suite_state )
MCFG_CPU_ADD("maincpu", COP410, 1000000)
MCFG_CPU_IO_MAP(cop_io)
MCFG_CPU_CONFIG(cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED )
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( test_t420, t400_test_suite_state )
MCFG_CPU_ADD("maincpu", COP420, 1000000)
MCFG_CPU_IO_MAP(cop_io)
MCFG_CPU_CONFIG(cop_intf)
MCFG_COP400_CONFIG( COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, COP400_MICROBUS_ENABLED )
MACHINE_CONFIG_END
ROM_START( test410 )