elf2: remove unneeded led write trampoline

This commit is contained in:
hap 2025-01-10 15:46:22 +01:00
parent ff17770639
commit 69b8bf52e4
2 changed files with 4 additions and 13 deletions

View File

@ -9,7 +9,8 @@
/*
TODO:
- problem with DMA: open MAME debugger to see RAM, set LOAD, input a value,
and it will write twice
- proper layout
*/
@ -154,11 +155,6 @@ int elf2_state::ef4_r()
return INPUT;
}
void elf2_state::q_w(int state)
{
m_led = state ? 1 : 0;
}
uint8_t elf2_state::dma_r()
{
return m_data;
@ -204,8 +200,6 @@ void elf2_state::machine_start()
{
address_space &program = m_maincpu->space(AS_PROGRAM);
m_led.resolve();
/* setup memory banking */
program.install_rom(0x0000, 0x00ff, m_ram->pointer());
program.install_write_handler(0x0000, 0x00ff, write8sm_delegate(*this, FUNC(elf2_state::memory_w)));
@ -239,7 +233,7 @@ void elf2_state::elf2(machine_config &config)
m_maincpu->wait_cb().set(FUNC(elf2_state::wait_r)).invert();
m_maincpu->clear_cb().set(FUNC(elf2_state::clear_r));
m_maincpu->ef4_cb().set(FUNC(elf2_state::ef4_r));
m_maincpu->q_cb().set(FUNC(elf2_state::q_w));
m_maincpu->q_cb().set_output("led0");
m_maincpu->dma_rd_cb().set(FUNC(elf2_state::dma_r));
m_maincpu->dma_wr_cb().set(m_vdc, FUNC(cdp1861_device::dma_w));
m_maincpu->sc_cb().set(FUNC(elf2_state::sc_w));
@ -249,7 +243,7 @@ void elf2_state::elf2(machine_config &config)
CDP1861(config, m_vdc, XTAL(3'579'545)/2).set_screen(SCREEN_TAG);
m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT);
m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT);
m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1);
SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER);

View File

@ -35,7 +35,6 @@ public:
, m_cassette(*this, "cassette")
, m_ram(*this, RAM_TAG)
, m_special(*this, "SPECIAL")
, m_led(*this, "led0")
{ }
void elf2(machine_config &config);
@ -53,7 +52,6 @@ private:
int wait_r();
int clear_r();
int ef4_r();
void q_w(int state);
uint8_t dma_r();
void sc_w(uint8_t data);
void da_w(int state);
@ -70,7 +68,6 @@ private:
required_device<cassette_image_device> m_cassette;
required_device<ram_device> m_ram;
required_ioport m_special;
output_finder<> m_led;
// display state
uint8_t m_data = 0;