Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/target/mame/mess.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,7 @@ files {
MAME_DIR .. "src/mess/drivers/bk.c",
MAME_DIR .. "src/mess/machine/bk.c",
MAME_DIR .. "src/mess/video/bk.c",
MAME_DIR .. "src/mess/drivers/dvk_kcgd.c",
MAME_DIR .. "src/mess/drivers/dvk_ksm.c",
MAME_DIR .. "src/mess/machine/ms7004.c",
MAME_DIR .. "src/mess/drivers/mk85.c",
Expand Down
43 changes: 43 additions & 0 deletions src/emu/cpu/t11/t11.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,24 @@


const device_type T11 = &device_creator<t11_device>;
const device_type K1801VM2 = &device_creator<k1801vm2_device>;


k1801vm2_device::k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: t11_device(mconfig, K1801VM2, "K1801VM2", tag, owner, clock, "k1801vm2", __FILE__)
{
}

t11_device::t11_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)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source)
, m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0)
, c_initial_mode(0)
{
m_is_octal = true;
memset(m_reg, 0x00, sizeof(m_reg));
memset(&m_psw, 0x00, sizeof(m_psw));
}

t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: cpu_device(mconfig, T11, "T11", tag, owner, clock, "t11", __FILE__)
, m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0)
Expand Down Expand Up @@ -294,6 +310,26 @@ void t11_device::state_string_export(const device_state_entry &entry, std::strin
}
}

void k1801vm2_device::state_string_export(const device_state_entry &entry, std::string &str)
{
switch (entry.index())
{
case STATE_GENFLAGS:
strprintf(str, "%c%c%c%c%c%c%c%c%c",
m_psw.b.l & 0x100 ? 'H':'.',
m_psw.b.l & 0x80 ? 'P':'.',
m_psw.b.l & 0x40 ? '?':'.',
m_psw.b.l & 0x20 ? '?':'.',
m_psw.b.l & 0x10 ? 'T':'.',
m_psw.b.l & 0x08 ? 'N':'.',
m_psw.b.l & 0x04 ? 'Z':'.',
m_psw.b.l & 0x02 ? 'V':'.',
m_psw.b.l & 0x01 ? 'C':'.'
);
break;
}
}


/*************************************
*
Expand Down Expand Up @@ -326,6 +362,13 @@ void t11_device::device_reset()
m_wait_state = 0;
}

void k1801vm2_device::device_reset()
{
t11_device::device_reset();

PC = RWORD(c_initial_mode);
PSW = RWORD(c_initial_mode+2);
}


/*************************************
Expand Down
16 changes: 16 additions & 0 deletions src/emu/cpu/t11/t11.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class t11_device : public cpu_device
public:
// construction/destruction
t11_device(const machine_config &mconfig, const char *_tag, device_t *_owner, UINT32 _clock);
t11_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);

// static configuration helpers
static void set_initial_mode(device_t &device, const UINT16 mode) { downcast<t11_device &>(device).c_initial_mode = mode; }
Expand Down Expand Up @@ -1133,8 +1134,23 @@ class t11_device : public cpu_device
void sub_ixd_ixd(UINT16 op);
};

class k1801vm2_device : public t11_device
{
public:
// construction/destruction
k1801vm2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);

protected:
// device-level overrides
virtual void device_reset();

// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
};


extern const device_type T11;
extern const device_type K1801VM2;


#endif /* __T11_H__ */
1 change: 1 addition & 0 deletions src/mame/mess.lst
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,7 @@ itt3030
vax785
ms0515
ie15
dvk_kcgd
dvk_ksm
dvk_ksm01
asmapro
Expand Down
Loading