Previous 199869 Revisions Next

r30756 Sunday 1st June, 2014 at 13:26:55 UTC by Robbbert
(MESS) LX800 : connected up analog inputs.
[src/mess/drivers]lx800.c

trunk/src/mess/drivers/lx800.c
r30755r30756
99
1010    - CPU type uPD7810HG
1111    - CPU PORTD and PORTF are connected to the Gate Array
12    - CPU Analog Port (AN0-AN7) is not emulated (connects to DIPSW2 and
13      some other things).
1412    - processing gets stuck in a loop, and never gets to scan the
1513      input buttons and switches.
1614    - CPU disassembly doesn't seem to indicate conditional JR or RET.
r30755r30756
3230{
3331public:
3432   lx800_state(const machine_config &mconfig, device_type type, const char *tag)
35      : driver_device(mconfig, type, tag),
36   m_maincpu(*this, "maincpu"),
37   m_beep(*this, "beeper")
33      : driver_device(mconfig, type, tag)
34      , m_maincpu(*this, "maincpu")
35      , m_beep(*this, "beeper")
3836   { }
3937
40   required_device<cpu_device> m_maincpu;
41   required_device<beep_device> m_beep;
4238   DECLARE_READ8_MEMBER(lx800_porta_r);
4339   DECLARE_WRITE8_MEMBER(lx800_porta_w);
4440   DECLARE_READ8_MEMBER(lx800_portc_r);
r30755r30756
4743   DECLARE_WRITE_LINE_MEMBER(lx800_centronics_pe_w);
4844   DECLARE_WRITE_LINE_MEMBER(lx800_paperempty_led_w);
4945   DECLARE_WRITE_LINE_MEMBER(lx800_reset_w);
46   DECLARE_READ_LINE_MEMBER(an0_r);
47   DECLARE_READ_LINE_MEMBER(an1_r);
48   DECLARE_READ_LINE_MEMBER(an2_r);
49   DECLARE_READ_LINE_MEMBER(an3_r);
50   DECLARE_READ_LINE_MEMBER(an4_r);
51   DECLARE_READ_LINE_MEMBER(an5_r);
52private:
53   required_device<cpu_device> m_maincpu;
54   required_device<beep_device> m_beep;
5055   virtual void machine_start();
5156};
5257
r30755r30756
114119   m_beep->set_state(!BIT(data, 7));
115120}
116121
122READ_LINE_MEMBER( lx800_state::an0_r )
123{
124   return BIT(ioport("DIPSW2")->read(), 0);
125}
117126
127READ_LINE_MEMBER( lx800_state::an1_r )
128{
129   return BIT(ioport("DIPSW2")->read(), 1);
130}
131
132READ_LINE_MEMBER( lx800_state::an2_r )
133{
134   return BIT(ioport("DIPSW2")->read(), 2);
135}
136
137READ_LINE_MEMBER( lx800_state::an3_r )
138{
139   return BIT(ioport("DIPSW2")->read(), 3); // can also read an external line AUTO_FEED_XT
140}
141
142READ_LINE_MEMBER( lx800_state::an4_r )
143{
144   return 0; // Printer select line (0=always selected)
145}
146
147READ_LINE_MEMBER( lx800_state::an5_r )
148{
149   return 1; // Monitors 24v line, should return 4.08 volts
150}
151
152
118153/***************************************************************************
119154    GATE ARRAY
120155***************************************************************************/
r30755r30756
249284   MCFG_CPU_ADD("maincpu", UPD7810, XTAL_14_7456MHz)
250285   MCFG_CPU_PROGRAM_MAP(lx800_mem)
251286   MCFG_CPU_IO_MAP(lx800_io)
287   MCFG_UPD7810_AN0(READLINE(lx800_state, an0_r))
288   MCFG_UPD7810_AN1(READLINE(lx800_state, an1_r))
289   MCFG_UPD7810_AN2(READLINE(lx800_state, an2_r))
290   MCFG_UPD7810_AN3(READLINE(lx800_state, an3_r))
291   MCFG_UPD7810_AN4(READLINE(lx800_state, an4_r))
292   MCFG_UPD7810_AN5(READLINE(lx800_state, an5_r))
252293
253294   MCFG_DEFAULT_LAYOUT(layout_lx800)
254295
255296   /* audio hardware */
256297   MCFG_SPEAKER_STANDARD_MONO("mono")
257298   MCFG_SOUND_ADD("beeper", BEEP, 0)
258   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
299   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05)
259300
260301   /* gate array */
261302   MCFG_DEVICE_ADD("ic3b", E05A03, 0)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team