src/mess/drivers/digel804.c
| r15689 | r15690 | |
| 73 | 73 | m_maincpu(*this, "maincpu"), |
| 74 | 74 | m_terminal(*this, TERMINAL_TAG), |
| 75 | 75 | m_speaker(*this, "speaker"), |
| 76 | | m_acia(*this, "acia") |
| 76 | m_acia(*this, "acia"), |
| 77 | m_vfd(*this, "vfd") |
| 77 | 78 | //, m_main_ram(*this, "main_ram") |
| 78 | 79 | { } |
| 79 | 80 | |
| r15689 | r15690 | |
| 81 | 82 | required_device<device_t> m_terminal; |
| 82 | 83 | required_device<device_t> m_speaker; |
| 83 | 84 | required_device<acia6551_device> m_acia; |
| 85 | required_device<roc10937_t> m_vfd; |
| 84 | 86 | DECLARE_READ8_MEMBER( ip40 ); |
| 85 | 87 | DECLARE_WRITE8_MEMBER( op40 ); |
| 86 | 88 | DECLARE_WRITE8_MEMBER( op41 ); |
| r15689 | r15690 | |
| 161 | 163 | static DRIVER_INIT( digel804 ) |
| 162 | 164 | { |
| 163 | 165 | digel804_state *state = machine.driver_data<digel804_state>(); |
| 164 | | ROC10937_init(0,0,0); // TODO: replace this with a proper device |
| 165 | 166 | state->vfd_old = state->vfd_data = state->vfd_count = 0; |
| 166 | 167 | state->m_speaker_state = 0; |
| 167 | 168 | //state->port43_rtn = 0xEE;//0xB6; |
| r15689 | r15690 | |
| 185 | 186 | static MACHINE_RESET( digel804 ) |
| 186 | 187 | { |
| 187 | 188 | digel804_state *state = machine.driver_data<digel804_state>(); |
| 188 | | ROC10937_reset(0); // TODO: replace this with a proper device |
| 189 | state->m_vfd->reset(); |
| 189 | 190 | state->vfd_old = state->vfd_data = state->vfd_count = 0; |
| 190 | 191 | } |
| 191 | 192 | |
| r15689 | r15690 | |
| 263 | 264 | |
| 264 | 265 | */ |
| 265 | 266 | // HACK to dump display contents to stderr |
| 266 | | fprintf(stderr,"%s\n",ROC10937_get_string(0)); |
| 267 | // FIXME : not sure what to do here with the new device! 201207 |
| 268 | // fprintf(stderr,"%s\n",ROC10937_get_string(0)); |
| 267 | 269 | #ifdef PORT43_R_VERBOSE |
| 268 | 270 | logerror("Digel804: returning %02X for port 43 status read\n", port43_rtn); |
| 269 | 271 | #endif |
| r15689 | r15690 | |
| 329 | 331 | #ifdef VFD_VERBOSE |
| 330 | 332 | logerror("Digel804: Full byte written to port 44 vfd: %02X '%c'\n", vfd_data, vfd_data); |
| 331 | 333 | #endif |
| 332 | | ROC10937_newdata(0,vfd_data); |
| 334 | m_vfd->shift_data(vfd_data? 1 : 0); |
| 333 | 335 | vfd_data = 0; |
| 334 | 336 | vfd_count = 0; |
| 335 | 337 | } |
| r15689 | r15690 | |
| 570 | 572 | MCFG_CPU_IO_MAP(z80_io) |
| 571 | 573 | MCFG_QUANTUM_TIME(attotime::from_hz(60)) |
| 572 | 574 | MCFG_MACHINE_RESET(digel804) |
| 575 | MCFG_ROC10937_ADD("vfd",0,RIGHT_TO_LEFT) |
| 573 | 576 | |
| 574 | 577 | /* video hardware */ |
| 575 | 578 | MCFG_GENERIC_TERMINAL_ADD(TERMINAL_TAG, digel804_terminal_intf) |