cop400: zerofill more class variables,

thayers: add todo note about key conflict,
y301xl: update company string
This commit is contained in:
hap 2024-02-03 20:26:19 +01:00
parent 57857a0365
commit d713b8c1c5
4 changed files with 28 additions and 11 deletions

View File

@ -1065,11 +1065,11 @@ void cop400_cpu_device::inil_tick()
void cop400_cpu_device::device_start()
{
/* find address spaces */
// find address spaces
space(AS_PROGRAM).cache(m_program);
space(AS_DATA).specific(m_data);
/* allocate counter timer */
// allocate counter timer
m_counter_timer = nullptr;
if (m_has_counter)
{
@ -1077,7 +1077,7 @@ void cop400_cpu_device::device_start()
m_counter_timer->adjust(attotime::zero, 0, attotime::from_ticks(m_cki * 4, clock()));
}
/* register for state saving */
// register for state saving
save_item(NAME(m_pc));
save_item(NAME(m_prevpc));
save_item(NAME(m_sa));
@ -1133,21 +1133,39 @@ void cop400_cpu_device::device_start()
set_icountptr(m_icount);
// zerofill
m_pc = 0;
m_prevpc = 0;
m_a = 0;
m_b = 0;
m_c = 0;
m_en = 0;
m_g = 0;
m_q = 0;
m_sa = 0;
m_sb = 0;
m_sc = 0;
m_sio = 0;
m_skl = 0;
m_t = 0;
m_skt_latch = 0;
m_il = 0;
m_in[0] = m_in[1] = m_in[2] = m_in[3] = 0;
memset(m_in, 0, sizeof(m_in));
m_si = 0;
m_so_output = 0;
m_sk_output = 0;
m_l_output = 0;
m_skip = false;
m_skip_lbi = 0;
m_last_skip = false;
m_skip = false;
m_halt = false;
m_idle = false;
m_opcode = 0x44;
m_second_byte = false;
}

View File

@ -199,7 +199,7 @@ protected:
// registers
uint16_t m_pc; // 9/10/11-bit ROM address program counter
uint16_t m_prevpc; // previous value of program counter
uint8_t m_a; // 4-bit accumulator
uint8_t m_a; // 4-bit accumulator
uint8_t m_b; // 5/6/7-bit RAM address register
int m_c; // 1-bit carry register
uint8_t m_en; // 4-bit enable register

View File

@ -237,4 +237,4 @@ ROM_END
*******************************************************************************/
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS
SYST( 1988, y301xl, 0, 0, y301xl, y301xl, y301xl_state, empty_init, "Yeno", "301 XL (Yeno)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
SYST( 1988, y301xl, 0, 0, y301xl, y301xl, y301xl_state, empty_init, "Yeno / Bray Research", "301 XL (Yeno)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )

View File

@ -9,6 +9,7 @@
TODO:
- No viable solution for reading configuration DIPs at init time,
so the driver is hard-coded to LD-V1000 mode.
- conflict between keyboard and service mode default key (F2)
*************************************************************************/
@ -507,7 +508,7 @@ void thayers_state::den_w(offs_t offset, u8 data)
// 7 N/C
static constexpr u8 LED_MAP[16] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7c, 0x07, 0x7f, 0x67, 0x77, 0x7c, 0x39, 0x5e, 0x79, 0x00 };
m_digits[(offset * 8) | (data >> 4 & 7)] = LED_MAP[data & 0x0f];
m_digits[(offset << 3 & 8) | (data >> 4 & 7)] = LED_MAP[data & 0x0f];
}
@ -563,9 +564,7 @@ static INPUT_PORTS_START( thayers )
PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "A:8" )
PORT_START("DSWB")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Service_Mode ) ) PORT_DIPLOCATION( "B:1" )
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE_DIPLOC( 0x01, 0x01, "B:1" )
PORT_DIPUNUSED_DIPLOC( 0x02, IP_ACTIVE_LOW, "B:2" )
PORT_DIPUNUSED_DIPLOC( 0x04, IP_ACTIVE_LOW, "B:3" )
PORT_DIPNAME( 0x18, 0x18, "LD Player" ) PORT_DIPLOCATION( "B:5,4" )