Previous 199869 Revisions Next

r22709 Wednesday 8th May, 2013 at 14:04:25 UTC by Robbbert
(MESS) D6800: Cassette connected up, system marked as WORKING [Robbbert]
[src/mess/drivers]d6800.c

trunk/src/mess/drivers/d6800.c
r22708r22709
1111    NOTE that the display only updates after each 4 digits is entered, and
1212    you can't see what you type as you change bytes. This is by design.
1313
14    The cassette has no checksum, header or blocks. It is simply a stream
15    of pulses. The successful loading of a tape is therefore a matter of luck.
16
1417    Function keys:
1518    FN 0 - Modify memory - firstly enter a 4-digit address, then 2-digit data
1619                    the address will increment by itself, enter the next byte.
1720                    FN by itself will step to the next address.
1821
19    FN 1 - Tape load
22    FN 1 - Tape load. You must have entered the start address at 0002, and
23           the end address+1 at 0004 (big-endian).
2024
2125    FN 2 - Tape save. You must have entered the start address at 0002, and
2226           the end address+1 at 0004 (big-endian).
r22708r22709
2933    Information and programs can be found at http://chip8.com/?page=78
3034
3135
32    TODO:
33    - Cassette
34
3536*/
3637
3738
r22708r22709
7374   DECLARE_READ_LINE_MEMBER( d6800_rtc_pulse );
7475   DECLARE_WRITE_LINE_MEMBER( d6800_screen_w );
7576   UINT32 screen_update_d6800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
77   TIMER_DEVICE_CALLBACK_MEMBER(d6800_c);
7678   TIMER_DEVICE_CALLBACK_MEMBER(d6800_p);
7779   DECLARE_QUICKLOAD_LOAD_MEMBER( d6800 );
7880protected:
r22708r22709
9698   bool m_ca2;
9799   bool m_cb1;
98100   bool m_cb2;
99   UINT8 m_cass_data[3];
101   UINT8 m_cass_data[4];
100102   UINT8 m_portb;
101103   virtual void machine_start();
102104   virtual void machine_reset();
r22708r22709
208210   return 0;
209211}
210212
213/* NE556 */
214
215TIMER_DEVICE_CALLBACK_MEMBER(d6800_state::d6800_c)
216{
217   m_cass_data[3]++;
218
219   if (BIT(m_portb, 0))
220      m_cass->output(BIT(m_cass_data[3], 0) ? -1.0 : +1.0); // 2400Hz
221   else
222      m_cass->output(BIT(m_cass_data[3], 1) ? -1.0 : +1.0); // 1200Hz
223}
224
211225/* PIA6821 Interface */
212226
213
214227TIMER_DEVICE_CALLBACK_MEMBER(d6800_state::d6800_p)
215228{
216229   m_rtc++;
r22708r22709
233246   if (cass_ws != m_cass_data[0])
234247   {
235248      m_cass_data[0] = cass_ws;
236      m_cass_data[2] = ((m_cass_data[1] < 12) ? 0 : 128);
249      m_cass_data[2] = ((m_cass_data[1] < 12) ? 128 : 0);
237250      m_cass_data[1] = 0;
238251   }
239252}
r22708r22709
280293        are in progress (DMA/CB2 line low).
281294   */
282295
283   m_cass->output(BIT(data, 0) ? -1.0 : +1.0);
284296   m_beeper->set_frequency(BIT(data, 0) ? 2400 : 1200);
285297   m_beeper->set_state(BIT(data, 6) & m_cb2);
286298
r22708r22709
348360   m_cass_data[0] = 0;
349361   m_cass_data[1] = 0;
350362   m_cass_data[2] = 128;
363   m_cass_data[3] = 0;
351364}
352365
353366/* Machine Drivers */
r22708r22709
433446   /* devices */
434447   MCFG_PIA6821_ADD("pia", d6800_mc6821_intf)
435448   MCFG_CASSETTE_ADD("cassette", d6800_cassette_interface)
449   MCFG_TIMER_DRIVER_ADD_PERIODIC("d6800_c", d6800_state, d6800_c, attotime::from_hz(4800))
436450   MCFG_TIMER_DRIVER_ADD_PERIODIC("d6800_p", d6800_state, d6800_p, attotime::from_hz(40000))
437451
438452   /* quickload */
r22708r22709
451465ROM_END
452466
453467/*    YEAR  NAME   PARENT  COMPAT  MACHINE   INPUT  CLASS,          INIT      COMPANY        FULLNAME      FLAGS */
454COMP( 1979, d6800, 0,      0,      d6800,    d6800, driver_device,   0,   "Michael Bauer", "Dream 6800", GAME_NOT_WORKING )
468COMP( 1979, d6800, 0,      0,      d6800,    d6800, driver_device,   0,   "Michael Bauer", "Dream 6800", 0 )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team