dragon200e: Implemented external character ROM.

This commit is contained in:
Nigel Barnes 2020-06-27 18:35:51 +01:00
parent 6b98d81489
commit 84bf91d354
3 changed files with 30 additions and 8 deletions

View File

@ -193,12 +193,12 @@ static INPUT_PORTS_START( dragon200e )
PORT_INCLUDE(dragon200e_keyboard)
PORT_INCLUDE(coco_joystick)
PORT_INCLUDE(coco_analog_control)
INPUT_PORTS_END
MC6847_GET_CHARROM_MEMBER( dragon200e_state::char_rom_r )
{
return m_char_rom->base()[(ch * 12 + line) & 0xfff];
}
PORT_START("LK1")
PORT_CONFNAME(0x01, 0x01, "Inverse Video")
PORT_CONFSETTING(0x00, "Inverse")
PORT_CONFSETTING(0x01, "Normal")
INPUT_PORTS_END
void dragon_cart(device_slot_interface &device)
{
@ -379,6 +379,7 @@ void dragon200e_state::dragon200e(machine_config &config)
dragon64(config);
// video hardware
m_vdg->set_get_char_rom(FUNC(dragon200e_state::char_rom_r));
m_vdg->input_callback().set(FUNC(dragon200e_state::sam_read));
}
void d64plus_state::d64plus(machine_config &config)
@ -542,7 +543,7 @@ COMP( 1982, dragon32, 0, 0, dragon32, dragon, dragon_state,
COMP( 1983, dragon64, dragon32, 0, dragon64, dragon, dragon64_state, empty_init, "Dragon Data Ltd", "Dragon 64", 0 )
COMP( 19??, dragon64h, dragon32, 0, dragon64h, dragon, dragon64_state, empty_init, "Dragon Data Ltd", "Dragon 64 (HD6309E CPU)", MACHINE_UNOFFICIAL )
COMP( 1985, dragon200, dragon32, 0, dragon64, dragon, dragon64_state, empty_init, "Eurohard S.A.", "Dragon 200", 0 )
COMP( 1985, dragon200e, dragon32, 0, dragon200e, dragon200e, dragon200e_state, empty_init, "Eurohard S.A.", "Dragon 200-E", MACHINE_NOT_WORKING )
COMP( 1985, dragon200e, dragon32, 0, dragon200e, dragon200e, dragon200e_state, empty_init, "Eurohard S.A.", "Dragon 200-E", 0 )
COMP( 1985, d64plus, dragon32, 0, d64plus, dragon, d64plus_state, empty_init, "Dragon Data Ltd / Compusense", "Dragon 64 Plus", 0 )
COMP( 1983, tanodr64, dragon32, 0, tanodr64, dragon, dragon64_state, empty_init, "Dragon Data Ltd / Tano Ltd", "Tano Dragon 64 (NTSC)", 0 )
COMP( 19??, tanodr64h, dragon32, 0, tanodr64h, dragon, dragon64_state, empty_init, "Dragon Data Ltd / Tano Ltd", "Tano Dragon 64 (NTSC; HD6309E)", MACHINE_UNOFFICIAL )

View File

@ -93,14 +93,17 @@ public:
dragon200e_state(const machine_config &mconfig, device_type type, const char *tag)
: dragon64_state(mconfig, type, tag)
, m_char_rom(*this, "chargen")
, m_lk1(*this, "LK1")
{
}
uint8_t sam_read(offs_t offset);
MC6847_GET_CHARROM_MEMBER(char_rom_r);
void dragon200e(machine_config &config);
private:
required_memory_region m_char_rom;
required_ioport m_lk1;
};

View File

@ -111,12 +111,10 @@ void dragon64_state::pia1_pb_changed(uint8_t data)
if (ddr & 0x04)
{
page_rom(data & 0x04 ? true : false);
logerror("pia1_pb_changed\n");
}
}
//-------------------------------------------------
// page_rom - Controls rom paging in Dragon 64,
// and Dragon Alpha.
@ -138,6 +136,26 @@ void dragon64_state::page_rom(bool romswitch)
}
/***************************************************************************
DRAGON200-E
***************************************************************************/
uint8_t dragon200e_state::sam_read(offs_t offset)
{
uint8_t data = sam().display_read(offset);
m_vdg->as_w(data & 0x80 ? ASSERT_LINE : CLEAR_LINE);
m_vdg->intext_w(data & 0x80 ? CLEAR_LINE : ASSERT_LINE);
m_vdg->inv_w(m_lk1->read() ? ASSERT_LINE : CLEAR_LINE);
return data;
}
MC6847_GET_CHARROM_MEMBER(dragon200e_state::char_rom_r)
{
uint16_t addr = (line << 8) | (BIT(pia_1().b_output(), 4) << 7) | ch;
return m_char_rom->base()[addr & 0xfff];
}
/***************************************************************************
DRAGON64 PLUS
***************************************************************************/