Previous 15994 Revisions Next

r14838 Sunday 1st April, 2012 at 19:26:38 UTC by Curt Coder
[NANO] Death to static. (nw)
[src/mess/drivers]tmc1800.c
[src/mess/includes]tmc1800.h

src/mess/includes/tmc1800.h
r14837r14838
141141   required_device<cdp1864_device> m_cti;
142142   required_device<cassette_image_device> m_cassette;
143143   required_device<ram_device> m_ram;
144
144   
145   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
145146   virtual void machine_start();
146147   virtual void machine_reset();
147148
148149   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
150   
151   enum
152   {
153      TIMER_ID_EF4
154   };
149155
150156   DECLARE_WRITE8_MEMBER( keylatch_w );
151157   DECLARE_WRITE8_MEMBER( bankswitch_w );
r14837r14838
158164
159165   /* keyboard state */
160166   int m_keylatch;         /* key latch */
161
162   /* timers */
163   emu_timer *m_ef4_timer;   /* EF4 line RC timer */
164167};
165168
166169/* ---------- defined in video/tmc1800.c ---------- */
src/mess/drivers/tmc1800.c
r14837r14838
435435   {
436436      // TODO: what are the correct values?
437437      int t = RES_K(27) * CAP_U(1) * 1000; // t = R26 * C1
438      m_ef4_timer->adjust(attotime::from_msec(t));
438      timer_set(attotime::from_msec(t), TIMER_ID_EF4);
439439   }
440440}
441441
r14837r14838
609609
610610// OSCOM Nano
611611
612static TIMER_CALLBACK( nano_ef4_tick )
613{
614   cputag_set_input_line(machine, CDP1802_TAG, COSMAC_INPUT_LINE_EF4, ASSERT_LINE);
615}
616
617612READ_LINE_MEMBER( nano_state::clear_r )
618613{
619614   int run = BIT(input_port_read(machine(), "RUN"), 0);
r14837r14838
725720
726721// OSCOM Nano
727722
723void nano_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
724{
725   switch (id)
726   {
727   case TIMER_ID_EF4:
728      m_maincpu->set_input_line(COSMAC_INPUT_LINE_EF4, ASSERT_LINE);   
729      break;
730   }
731}
732
728733void nano_state::machine_start()
729734{
730   /* allocate monitor timer */
731   m_ef4_timer = machine().scheduler().timer_alloc(FUNC(nano_ef4_tick));
732
733735   /* register for state saving */
734736   save_item(NAME(m_keylatch));
735737}

Previous 15994 Revisions Next


© 1998-2018 The MESS Team