diff --git a/src/mame/drivers/tceptor.cpp b/src/mame/drivers/tceptor.cpp index 534007c564f..518e9c560e8 100644 --- a/src/mame/drivers/tceptor.cpp +++ b/src/mame/drivers/tceptor.cpp @@ -15,6 +15,7 @@ #include "cpu/m6809/m6809.h" #include "cpu/m6800/m6801.h" #include "cpu/m68000/m68000.h" +#include "machine/adc0808.h" #include "machine/nvram.h" #include "sound/dac.h" #include "sound/ym2151.h" @@ -131,11 +132,7 @@ void tceptor_state::m6809_map(address_map &map) map(0x2000, 0x3fff).ram().w(this, FUNC(tceptor_state::tceptor_bg_ram_w)).share("bg_ram"); // background (VIEW RAM) map(0x4000, 0x43ff).rw(m_cus30, FUNC(namco_cus30_device::namcos1_cus30_r), FUNC(namco_cus30_device::namcos1_cus30_w)); map(0x4800, 0x4800).w(this, FUNC(tceptor_state::tceptor2_shutter_w)); - map(0x4f00, 0x4f00).nopr(); // unknown - map(0x4f01, 0x4f01).portr("PEDAL"); // analog input (accel) - map(0x4f02, 0x4f02).portr("STICKX"); // analog input (left/right) - map(0x4f03, 0x4f03).portr("STICKY"); // analog input (up/down) - map(0x4f00, 0x4f03).nopw(); // analog input control? + map(0x4f00, 0x4f07).rw("adc", FUNC(adc0808_device::data_r), FUNC(adc0808_device::address_offset_start_w)); map(0x5000, 0x5006).w(this, FUNC(tceptor_state::tceptor_bg_scroll_w)); // bg scroll map(0x6000, 0x7fff).ram().share("m68k_shared_ram"); // COM RAM map(0x8000, 0x8000).w(this, FUNC(tceptor_state::m6809_irq_disable_w)); @@ -346,6 +343,12 @@ MACHINE_CONFIG_START(tceptor_state::tceptor) MCFG_NVRAM_ADD_1FILL("nvram") + MCFG_DEVICE_ADD("adc", ADC0809, 1000000) // unknown clock (needs to >640khz or the wait loop is too fast) + MCFG_ADC0808_IN0_CB(NOOP) // unknown + MCFG_ADC0808_IN1_CB(IOPORT("PEDAL")) + MCFG_ADC0808_IN2_CB(IOPORT("STICKX")) + MCFG_ADC0808_IN3_CB(IOPORT("STICKY")) + /* video hardware */ MCFG_GFXDECODE_ADD("gfxdecode", "palette", tceptor) MCFG_PALETTE_ADD("palette", 4096)