mirror of
https://github.com/holub/mame
synced 2025-04-26 02:07:14 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
b3f5dd46f2
@ -169,7 +169,7 @@ void er1400_device::erase_data()
|
|||||||
offs_t offset = 10 * (tens - 10) + units;
|
offs_t offset = 10 * (tens - 10) + units;
|
||||||
if (m_data_array[offset] != 0x3fff)
|
if (m_data_array[offset] != 0x3fff)
|
||||||
{
|
{
|
||||||
logerror("Erasing data at %d\n", m_data_register, offset);
|
logerror("Erasing data at %d\n", offset);
|
||||||
m_data_array[offset] = 0x3fff;
|
m_data_array[offset] = 0x3fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#define KBD_VERBOSE 1
|
#define KBD_VERBOSE 1
|
||||||
#define LED_VERBOSE 1
|
#define LED_VERBOSE 0
|
||||||
|
#define DC305_VERBOSE 0
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// DRIVER STATE
|
// DRIVER STATE
|
||||||
@ -78,9 +79,8 @@ READ8_MEMBER( decwriter_state::la120_KBD_r )
|
|||||||
uint8_t code = 0;
|
uint8_t code = 0;
|
||||||
if (offset&0x8) code |= m_col_array[offset&0x7]->read();
|
if (offset&0x8) code |= m_col_array[offset&0x7]->read();
|
||||||
if (offset&0x10) code |= m_col_array[(offset&0x7)+8]->read();
|
if (offset&0x10) code |= m_col_array[(offset&0x7)+8]->read();
|
||||||
#ifdef KBD_VERBOSE
|
if (KBD_VERBOSE)
|
||||||
logerror("Keyboard column %X read, returning %02X\n", offset&0xF, code);
|
logerror("Keyboard column %X read, returning %02X\n", offset&0xF, code);
|
||||||
#endif
|
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,9 +95,8 @@ WRITE8_MEMBER( decwriter_state::la120_LED_w )
|
|||||||
*/
|
*/
|
||||||
if (!(offset&0x10)) // we're updating an led state
|
if (!(offset&0x10)) // we're updating an led state
|
||||||
{
|
{
|
||||||
#ifdef LED_VERBOSE
|
if (LED_VERBOSE)
|
||||||
logerror("Updated LED status array: LED #%d is now %d\n", ((offset&0xe)>>1), (offset&1));
|
logerror("Updated LED status array: LED #%d is now %d\n", ((offset&0xe)>>1), (offset&1));
|
||||||
#endif
|
|
||||||
m_led_array &= ((1<<((offset&0xe)>>1))^0xFF); // mask out the old bit
|
m_led_array &= ((1<<((offset&0xe)>>1))^0xFF); // mask out the old bit
|
||||||
m_led_array |= ((offset&1)<<((offset&0xe)>>1)); // OR in the new bit
|
m_led_array |= ((offset&1)<<((offset&0xe)>>1)); // OR in the new bit
|
||||||
m_led_7seg_counter = 0;
|
m_led_7seg_counter = 0;
|
||||||
@ -106,9 +105,8 @@ WRITE8_MEMBER( decwriter_state::la120_LED_w )
|
|||||||
{
|
{
|
||||||
m_led_7seg_counter++;
|
m_led_7seg_counter++;
|
||||||
m_led_7seg_counter &= 0xF;
|
m_led_7seg_counter &= 0xF;
|
||||||
#ifdef LED_VERBOSE
|
if (LED_VERBOSE)
|
||||||
logerror("Updated 7seg display: displaying a digit of %d in position %d\n", (offset&0xF)^0xF, m_led_7seg_counter-1);
|
logerror("Updated 7seg display: displaying a digit of %d in position %d\n", (offset&0xF)^0xF, m_led_7seg_counter-1);
|
||||||
#endif
|
|
||||||
if ((m_led_7seg_counter >= 1) && (m_led_7seg_counter <= 4))
|
if ((m_led_7seg_counter >= 1) && (m_led_7seg_counter <= 4))
|
||||||
{
|
{
|
||||||
m_led_7seg[m_led_7seg_counter-1] = (offset&0xF)^0xF;
|
m_led_7seg[m_led_7seg_counter-1] = (offset&0xF)^0xF;
|
||||||
@ -150,7 +148,7 @@ WRITE8_MEMBER( decwriter_state::la120_NVR_w )
|
|||||||
m_nvm->c1_w(BIT(offset, 8));
|
m_nvm->c1_w(BIT(offset, 8));
|
||||||
|
|
||||||
// C2 is used to disable pullup on data line
|
// C2 is used to disable pullup on data line
|
||||||
m_nvm->data_w(!BIT(offset, 9) ? 0 : BIT(data, 7));
|
m_nvm->data_w(!BIT(offset, 9) ? 0 : !BIT(data, 7));
|
||||||
|
|
||||||
m_nvm->clock_w(BIT(offset, 0));
|
m_nvm->clock_w(BIT(offset, 0));
|
||||||
}
|
}
|
||||||
@ -173,6 +171,7 @@ WRITE8_MEMBER( decwriter_state::la120_NVR_w )
|
|||||||
READ8_MEMBER( decwriter_state::la120_DC305_r )
|
READ8_MEMBER( decwriter_state::la120_DC305_r )
|
||||||
{
|
{
|
||||||
uint8_t data = 0x00;
|
uint8_t data = 0x00;
|
||||||
|
if (DC305_VERBOSE)
|
||||||
logerror("DC305 Read from offset %01x, returning %02X\n", offset, data);
|
logerror("DC305 Read from offset %01x, returning %02X\n", offset, data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -188,6 +187,7 @@ READ8_MEMBER( decwriter_state::la120_DC305_r )
|
|||||||
*/
|
*/
|
||||||
WRITE8_MEMBER( decwriter_state::la120_DC305_w )
|
WRITE8_MEMBER( decwriter_state::la120_DC305_w )
|
||||||
{
|
{
|
||||||
|
if (DC305_VERBOSE)
|
||||||
logerror("DC305 Write of %02X to offset %01X\n", data, offset);
|
logerror("DC305 Write of %02X to offset %01X\n", data, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Skeleton driver for Visual 100 display terminal.
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "cpu/z80/z80.h"
|
#include "cpu/z80/z80.h"
|
||||||
#include "machine/com8116.h"
|
#include "machine/com8116.h"
|
||||||
//#include "machine/er1400.h"
|
#include "machine/er1400.h"
|
||||||
#include "machine/i8214.h"
|
#include "machine/i8214.h"
|
||||||
#include "machine/i8251.h"
|
#include "machine/i8251.h"
|
||||||
#include "machine/i8255.h"
|
#include "machine/i8255.h"
|
||||||
@ -22,14 +22,28 @@ public:
|
|||||||
v100_state(const machine_config &mconfig, device_type type, const char *tag)
|
v100_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||||
: driver_device(mconfig, type, tag)
|
: driver_device(mconfig, type, tag)
|
||||||
, m_maincpu(*this, "maincpu")
|
, m_maincpu(*this, "maincpu")
|
||||||
|
, m_earom(*this, "earom")
|
||||||
, m_p_chargen(*this, "chargen")
|
, m_p_chargen(*this, "chargen")
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
DECLARE_READ8_MEMBER(earom_r);
|
||||||
|
DECLARE_WRITE8_MEMBER(ppi_porta_w);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
|
required_device<er1400_device> m_earom;
|
||||||
required_region_ptr<u8> m_p_chargen;
|
required_region_ptr<u8> m_p_chargen;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
READ8_MEMBER(v100_state::earom_r)
|
||||||
|
{
|
||||||
|
return m_earom->data_r();
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER(v100_state::ppi_porta_w)
|
||||||
|
{
|
||||||
|
logerror("Writing %02X to PPI port A\n", data);
|
||||||
|
}
|
||||||
|
|
||||||
static ADDRESS_MAP_START( mem_map, AS_PROGRAM, 8, v100_state )
|
static ADDRESS_MAP_START( mem_map, AS_PROGRAM, 8, v100_state )
|
||||||
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("maincpu", 0)
|
AM_RANGE(0x0000, 0x3fff) AM_ROM AM_REGION("maincpu", 0)
|
||||||
@ -44,7 +58,7 @@ static ADDRESS_MAP_START( io_map, AS_IO, 8, v100_state )
|
|||||||
AM_RANGE(0x13, 0x13) AM_DEVREADWRITE("usart", i8251_device, status_r, control_w)
|
AM_RANGE(0x13, 0x13) AM_DEVREADWRITE("usart", i8251_device, status_r, control_w)
|
||||||
// 0x14-0x15 - second 8251 (not populated)
|
// 0x14-0x15 - second 8251 (not populated)
|
||||||
// 0x16 - second 8116T (not populated)
|
// 0x16 - second 8116T (not populated)
|
||||||
// 0x20 - read ???
|
AM_RANGE(0x20, 0x20) AM_READ(earom_r)
|
||||||
// 0x30 - write ???
|
// 0x30 - write ???
|
||||||
AM_RANGE(0x40, 0x40) AM_NOP // read/write ???
|
AM_RANGE(0x40, 0x40) AM_NOP // read/write ???
|
||||||
// 0x48 - write ???
|
// 0x48 - write ???
|
||||||
@ -73,6 +87,14 @@ static MACHINE_CONFIG_START( v100 )
|
|||||||
MCFG_DEVICE_ADD("picu", I8214, XTAL_47_736MHz / 12)
|
MCFG_DEVICE_ADD("picu", I8214, XTAL_47_736MHz / 12)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("ppi", I8255, 0)
|
MCFG_DEVICE_ADD("ppi", I8255, 0)
|
||||||
|
MCFG_I8255_OUT_PORTA_CB(WRITE8(v100_state, ppi_porta_w))
|
||||||
|
MCFG_I8255_OUT_PORTB_CB(DEVWRITELINE("earom", er1400_device, c3_w)) MCFG_DEVCB_BIT(6) MCFG_DEVCB_INVERT
|
||||||
|
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("earom", er1400_device, c2_w)) MCFG_DEVCB_BIT(5) MCFG_DEVCB_INVERT
|
||||||
|
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("earom", er1400_device, c1_w)) MCFG_DEVCB_BIT(4) MCFG_DEVCB_INVERT
|
||||||
|
MCFG_I8255_OUT_PORTC_CB(DEVWRITELINE("earom", er1400_device, data_w)) MCFG_DEVCB_BIT(6) MCFG_DEVCB_INVERT
|
||||||
|
MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("earom", er1400_device, clock_w)) MCFG_DEVCB_BIT(0) MCFG_DEVCB_INVERT
|
||||||
|
|
||||||
|
MCFG_DEVICE_ADD("earom", ER1400, 0)
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user