trunk/src/mess/drivers/d6800.c
| r22708 | r22709 | |
| 11 | 11 | NOTE that the display only updates after each 4 digits is entered, and |
| 12 | 12 | you can't see what you type as you change bytes. This is by design. |
| 13 | 13 | |
| 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 | |
| 14 | 17 | Function keys: |
| 15 | 18 | FN 0 - Modify memory - firstly enter a 4-digit address, then 2-digit data |
| 16 | 19 | the address will increment by itself, enter the next byte. |
| 17 | 20 | FN by itself will step to the next address. |
| 18 | 21 | |
| 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). |
| 20 | 24 | |
| 21 | 25 | FN 2 - Tape save. You must have entered the start address at 0002, and |
| 22 | 26 | the end address+1 at 0004 (big-endian). |
| r22708 | r22709 | |
| 29 | 33 | Information and programs can be found at http://chip8.com/?page=78 |
| 30 | 34 | |
| 31 | 35 | |
| 32 | | TODO: |
| 33 | | - Cassette |
| 34 | | |
| 35 | 36 | */ |
| 36 | 37 | |
| 37 | 38 | |
| r22708 | r22709 | |
| 73 | 74 | DECLARE_READ_LINE_MEMBER( d6800_rtc_pulse ); |
| 74 | 75 | DECLARE_WRITE_LINE_MEMBER( d6800_screen_w ); |
| 75 | 76 | UINT32 screen_update_d6800(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 77 | TIMER_DEVICE_CALLBACK_MEMBER(d6800_c); |
| 76 | 78 | TIMER_DEVICE_CALLBACK_MEMBER(d6800_p); |
| 77 | 79 | DECLARE_QUICKLOAD_LOAD_MEMBER( d6800 ); |
| 78 | 80 | protected: |
| r22708 | r22709 | |
| 96 | 98 | bool m_ca2; |
| 97 | 99 | bool m_cb1; |
| 98 | 100 | bool m_cb2; |
| 99 | | UINT8 m_cass_data[3]; |
| 101 | UINT8 m_cass_data[4]; |
| 100 | 102 | UINT8 m_portb; |
| 101 | 103 | virtual void machine_start(); |
| 102 | 104 | virtual void machine_reset(); |
| r22708 | r22709 | |
| 208 | 210 | return 0; |
| 209 | 211 | } |
| 210 | 212 | |
| 213 | /* NE556 */ |
| 214 | |
| 215 | TIMER_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 | |
| 211 | 225 | /* PIA6821 Interface */ |
| 212 | 226 | |
| 213 | | |
| 214 | 227 | TIMER_DEVICE_CALLBACK_MEMBER(d6800_state::d6800_p) |
| 215 | 228 | { |
| 216 | 229 | m_rtc++; |
| r22708 | r22709 | |
| 233 | 246 | if (cass_ws != m_cass_data[0]) |
| 234 | 247 | { |
| 235 | 248 | 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); |
| 237 | 250 | m_cass_data[1] = 0; |
| 238 | 251 | } |
| 239 | 252 | } |
| r22708 | r22709 | |
| 280 | 293 | are in progress (DMA/CB2 line low). |
| 281 | 294 | */ |
| 282 | 295 | |
| 283 | | m_cass->output(BIT(data, 0) ? -1.0 : +1.0); |
| 284 | 296 | m_beeper->set_frequency(BIT(data, 0) ? 2400 : 1200); |
| 285 | 297 | m_beeper->set_state(BIT(data, 6) & m_cb2); |
| 286 | 298 | |
| r22708 | r22709 | |
| 348 | 360 | m_cass_data[0] = 0; |
| 349 | 361 | m_cass_data[1] = 0; |
| 350 | 362 | m_cass_data[2] = 128; |
| 363 | m_cass_data[3] = 0; |
| 351 | 364 | } |
| 352 | 365 | |
| 353 | 366 | /* Machine Drivers */ |
| r22708 | r22709 | |
| 433 | 446 | /* devices */ |
| 434 | 447 | MCFG_PIA6821_ADD("pia", d6800_mc6821_intf) |
| 435 | 448 | MCFG_CASSETTE_ADD("cassette", d6800_cassette_interface) |
| 449 | MCFG_TIMER_DRIVER_ADD_PERIODIC("d6800_c", d6800_state, d6800_c, attotime::from_hz(4800)) |
| 436 | 450 | MCFG_TIMER_DRIVER_ADD_PERIODIC("d6800_p", d6800_state, d6800_p, attotime::from_hz(40000)) |
| 437 | 451 | |
| 438 | 452 | /* quickload */ |
| r22708 | r22709 | |
| 451 | 465 | ROM_END |
| 452 | 466 | |
| 453 | 467 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS, INIT COMPANY FULLNAME FLAGS */ |
| 454 | | COMP( 1979, d6800, 0, 0, d6800, d6800, driver_device, 0, "Michael Bauer", "Dream 6800", GAME_NOT_WORKING ) |
| 468 | COMP( 1979, d6800, 0, 0, d6800, d6800, driver_device, 0, "Michael Bauer", "Dream 6800", 0 ) |