src/mess/machine/hp48.c
| r14700 | r14701 | |
| 10 | 10 | #include "sound/dac.h" |
| 11 | 11 | #include "cpu/saturn/saturn.h" |
| 12 | 12 | |
| 13 | | #include "devices/xmodem.h" |
| 14 | | #include "devices/kermit.h" |
| 15 | 13 | #include "machine/nvram.h" |
| 16 | 14 | |
| 17 | 15 | #include "includes/hp48.h" |
| r14700 | r14701 | |
| 153 | 151 | static TIMER_CALLBACK( hp48_rs232_byte_sent_cb ) |
| 154 | 152 | { |
| 155 | 153 | hp48_state *state = machine.driver_data<hp48_state>(); |
| 156 | | device_image_interface *xmodem = dynamic_cast<device_image_interface *>(machine.device("rs232_x")); |
| 157 | | device_image_interface *kermit = dynamic_cast<device_image_interface *>(machine.device("rs232_k")); |
| 154 | //device_image_interface *xmodem = dynamic_cast<device_image_interface *>(machine.device("rs232_x")); |
| 155 | //device_image_interface *kermit = dynamic_cast<device_image_interface *>(machine.device("rs232_k")); |
| 158 | 156 | |
| 159 | 157 | LOG_SERIAL(( "%f hp48_rs232_byte_sent_cb: end of send, data=%02x\n", |
| 160 | 158 | machine.time().as_double(), param )); |
| r14700 | r14701 | |
| 168 | 166 | } |
| 169 | 167 | |
| 170 | 168 | /* protocol action */ |
| 171 | | if ( xmodem && xmodem->exists() ) xmodem_receive_byte( &xmodem->device(), param ); |
| 172 | | else if ( kermit && kermit->exists() ) kermit_receive_byte( &kermit->device(), param ); |
| 173 | | #ifdef CHARDEV |
| 174 | | else chardev_out( state->m_chardev, param ); |
| 175 | | #endif |
| 169 | //if ( xmodem && xmodem->exists() ) xmodem_receive_byte( &xmodem->device(), param ); |
| 170 | //else if ( kermit && kermit->exists() ) kermit_receive_byte( &kermit->device(), param ); |
| 171 | //#ifdef CHARDEV |
| 172 | // else chardev_out( state->m_chardev, param ); |
| 173 | //#endif |
| 176 | 174 | } |
| 177 | 175 | |
| 178 | 176 | /* CPU initiates a send event */ |
| r14700 | r14701 | |
| 564 | 562 | { |
| 565 | 563 | /* second nibble of received data */ |
| 566 | 564 | |
| 567 | | device_image_interface *xmodem = dynamic_cast<device_image_interface *>(space->machine().device("rs232_x")); |
| 568 | | device_image_interface *kermit = dynamic_cast<device_image_interface *>(space->machine().device("rs232_k")); |
| 565 | //device_image_interface *xmodem = dynamic_cast<device_image_interface *>(space->machine().device("rs232_x")); |
| 566 | //device_image_interface *kermit = dynamic_cast<device_image_interface *>(space->machine().device("rs232_k")); |
| 569 | 567 | |
| 570 | 568 | state->m_io[0x11] &= ~1; /* clear byte received */ |
| 571 | 569 | data = state->m_io[offset]; |
| 572 | 570 | |
| 573 | 571 | /* protocol action */ |
| 574 | | if ( xmodem && xmodem->exists() ) xmodem_byte_transmitted( &xmodem->device() ); |
| 575 | | else if ( kermit && kermit->exists() ) kermit_byte_transmitted( &kermit->device() ); |
| 572 | //if ( xmodem && xmodem->exists() ) xmodem_byte_transmitted( &xmodem->device() ); |
| 573 | //else if ( kermit && kermit->exists() ) kermit_byte_transmitted( &kermit->device() ); |
| 576 | 574 | break; |
| 577 | 575 | } |
| 578 | 576 | |
src/mess/machine/ti85.c
| r14700 | r14701 | |
| 9 | 9 | #include <stdarg.h> |
| 10 | 10 | #include "emu.h" |
| 11 | 11 | #include "cpu/z80/z80.h" |
| 12 | | #include "machine/ti85_ser.h" |
| 13 | 12 | #include "includes/ti85.h" |
| 14 | 13 | |
| 15 | 14 | #define TI85_SNAPSHOT_SIZE 32976 |
| r14700 | r14701 | |
| 298 | 297 | { |
| 299 | 298 | ti85_state *state = space->machine().driver_data<ti85_state>(); |
| 300 | 299 | |
| 301 | | ti85_update_serial(state->m_serial); |
| 300 | //ti85_update_serial(state->m_serial); |
| 302 | 301 | return (state->m_white_out<<3) |
| 303 | 302 | | (state->m_red_out<<2) |
| 304 | | | ((ti85serial_white_in(state->m_serial,0)&(1-state->m_white_out))<<1) |
| 305 | | | (ti85serial_red_in(state->m_serial,0)&(1-state->m_red_out)) |
| 303 | //| ((ti85serial_white_in(state->m_serial,0)&(1-state->m_white_out))<<1) |
| 304 | //| (ti85serial_red_in(state->m_serial,0)&(1-state->m_red_out)) |
| 306 | 305 | | state->m_PCR; |
| 307 | 306 | } |
| 308 | 307 | |
| r14700 | r14701 | |
| 356 | 355 | { |
| 357 | 356 | ti85_state *state = space->machine().driver_data<ti85_state>(); |
| 358 | 357 | |
| 359 | | ti85_update_serial(state->m_serial); |
| 358 | //ti85_update_serial(state->m_serial); |
| 360 | 359 | return (state->m_white_out<<3) |
| 361 | 360 | | (state->m_red_out<<2) |
| 362 | | | ((ti85serial_white_in(state->m_serial,0)&(1-state->m_white_out))<<1) |
| 363 | | | (ti85serial_red_in(state->m_serial,0)&(1-state->m_red_out)) |
| 361 | //| ((ti85serial_white_in(state->m_serial,0)&(1-state->m_white_out))<<1) |
| 362 | //| (ti85serial_red_in(state->m_serial,0)&(1-state->m_red_out)) |
| 364 | 363 | | state->m_PCR; |
| 365 | 364 | } |
| 366 | 365 | |
| r14700 | r14701 | |
| 432 | 431 | speaker_level_w(state->m_speaker, ( (data>>2)|(data>>3) ) & 0x01); |
| 433 | 432 | state->m_red_out=(data>>2)&0x01; |
| 434 | 433 | state->m_white_out=(data>>3)&0x01; |
| 435 | | ti85serial_red_out( state->m_serial, 0, state->m_red_out ); |
| 436 | | ti85serial_white_out( state->m_serial, 0, state->m_white_out ); |
| 437 | | ti85_update_serial(state->m_serial); |
| 434 | //ti85serial_red_out( state->m_serial, 0, state->m_red_out ); |
| 435 | //ti85serial_white_out( state->m_serial, 0, state->m_white_out ); |
| 436 | //ti85_update_serial(state->m_serial); |
| 438 | 437 | state->m_PCR = data&0xf0; |
| 439 | 438 | } |
| 440 | 439 | |
| r14700 | r14701 | |
| 492 | 491 | speaker_level_w(state->m_speaker,( (data>>0)|(data>>1) )&0x01 ); |
| 493 | 492 | state->m_red_out=(data>>0)&0x01; |
| 494 | 493 | state->m_white_out=(data>>1)&0x01; |
| 495 | | ti85serial_red_out( state->m_serial, 0, state->m_red_out ); |
| 496 | | ti85serial_white_out( state->m_serial, 0, state->m_white_out ); |
| 497 | | ti85_update_serial(state->m_serial); |
| 494 | //ti85serial_red_out( state->m_serial, 0, state->m_red_out ); |
| 495 | //ti85serial_white_out( state->m_serial, 0, state->m_white_out ); |
| 496 | //ti85_update_serial(state->m_serial); |
| 498 | 497 | state->m_PCR = data&0xf0; |
| 499 | 498 | } |
| 500 | 499 | |
src/mess/includes/ti85.h
| r14700 | r14701 | |
| 19 | 19 | : driver_device(mconfig, type, tag), |
| 20 | 20 | m_maincpu(*this, "maincpu"), |
| 21 | 21 | m_speaker(*this, SPEAKER_TAG), |
| 22 | | m_serial(*this, "tiserial"), |
| 22 | // m_serial(*this, "tiserial"), |
| 23 | 23 | m_nvram(*this, "nvram") |
| 24 | 24 | { } |
| 25 | 25 | |
| 26 | 26 | required_device<cpu_device> m_maincpu; |
| 27 | 27 | optional_device<device_t> m_speaker; |
| 28 | | optional_device<device_t> m_serial; |
| 28 | //optional_device<device_t> m_serial; |
| 29 | 29 | optional_shared_ptr<UINT8> m_nvram; |
| 30 | 30 | |
| 31 | 31 | UINT8 m_LCD_memory_base; |
src/mess/drivers/hp48.c
| r14700 | r14701 | |
| 7 | 7 | **********************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "emu.h" |
| 10 | | #include "devices/xmodem.h" |
| 11 | | #include "devices/kermit.h" |
| 12 | 10 | #include "cpu/saturn/saturn.h" |
| 13 | 11 | #include "sound/dac.h" |
| 14 | 12 | #include "machine/nvram.h" |
| r14700 | r14701 | |
| 784 | 782 | |
| 785 | 783 | /**************************** I/O **********************************/ |
| 786 | 784 | |
| 787 | | static const xmodem_config hp48_xmodem_rs232_conf = { &hp48_rs232_start_recv_byte }; |
| 788 | | static const kermit_config hp48_kermit_rs232_conf = { &hp48_rs232_start_recv_byte }; |
| 785 | //static const xmodem_config hp48_xmodem_rs232_conf = { &hp48_rs232_start_recv_byte }; |
| 786 | //static const kermit_config hp48_kermit_rs232_conf = { &hp48_rs232_start_recv_byte }; |
| 789 | 787 | |
| 790 | 788 | |
| 791 | 789 | /**************************** ROMs *********************************/ |
| r14700 | r14701 | |
| 976 | 974 | MCFG_HP48_PORT_ADD ( "port2", hp48gx_port2_config ) |
| 977 | 975 | |
| 978 | 976 | /* serial I/O */ |
| 979 | | MCFG_XMODEM_ADD( "rs232_x", hp48_xmodem_rs232_conf ) |
| 980 | | MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 977 | //MCFG_XMODEM_ADD( "rs232_x", hp48_xmodem_rs232_conf ) |
| 978 | //MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 981 | 979 | MACHINE_CONFIG_END |
| 982 | 980 | |
| 983 | 981 | static MACHINE_CONFIG_DERIVED( hp48g, hp48_common ) |
| r14700 | r14701 | |
| 985 | 983 | MCFG_DEFAULT_LAYOUT ( layout_hp48g ) |
| 986 | 984 | |
| 987 | 985 | /* serial I/O */ |
| 988 | | MCFG_XMODEM_ADD( "rs232_x", hp48_xmodem_rs232_conf ) |
| 989 | | MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 986 | //MCFG_XMODEM_ADD( "rs232_x", hp48_xmodem_rs232_conf ) |
| 987 | //MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 990 | 988 | MACHINE_CONFIG_END |
| 991 | 989 | |
| 992 | 990 | |
| r14700 | r14701 | |
| 995 | 993 | MCFG_DEFAULT_LAYOUT ( layout_hp48gp ) |
| 996 | 994 | |
| 997 | 995 | /* serial I/O */ |
| 998 | | MCFG_XMODEM_ADD( "rs232_x", hp48_xmodem_rs232_conf ) |
| 999 | | MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 996 | //MCFG_XMODEM_ADD( "rs232_x", hp48_xmodem_rs232_conf ) |
| 997 | //MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 1000 | 998 | MACHINE_CONFIG_END |
| 1001 | 999 | |
| 1002 | 1000 | |
| r14700 | r14701 | |
| 1011 | 1009 | MCFG_HP48_PORT_ADD ( "port2", hp48sx_port2_config ) |
| 1012 | 1010 | |
| 1013 | 1011 | /* serial I/O */ |
| 1014 | | MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 1012 | //MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 1015 | 1013 | MACHINE_CONFIG_END |
| 1016 | 1014 | |
| 1017 | 1015 | static MACHINE_CONFIG_DERIVED( hp48s, hp48_common ) |
| r14700 | r14701 | |
| 1021 | 1019 | MCFG_DEFAULT_LAYOUT ( layout_hp48s ) |
| 1022 | 1020 | |
| 1023 | 1021 | /* serial I/O */ |
| 1024 | | MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 1022 | //MCFG_KERMIT_ADD( "rs232_k", hp48_kermit_rs232_conf ) |
| 1025 | 1023 | MACHINE_CONFIG_END |
| 1026 | 1024 | |
| 1027 | 1025 | |
src/mess/drivers/ti85.c
| r14700 | r14701 | |
| 188 | 188 | #include "emu.h" |
| 189 | 189 | #include "cpu/z80/z80.h" |
| 190 | 190 | #include "imagedev/snapquik.h" |
| 191 | | #include "machine/ti85_ser.h" |
| 192 | 191 | #include "machine/nvram.h" |
| 193 | 192 | #include "includes/ti85.h" |
| 194 | 193 | |
| r14700 | r14701 | |
| 534 | 533 | |
| 535 | 534 | static MACHINE_CONFIG_DERIVED( ti85d, ti85 ) |
| 536 | 535 | MCFG_SNAPSHOT_ADD("snapshot", ti8x, "sav", 0) |
| 537 | | MCFG_TI85SERIAL_ADD( "tiserial" ) |
| 536 | //MCFG_TI85SERIAL_ADD( "tiserial" ) |
| 538 | 537 | MACHINE_CONFIG_END |
| 539 | 538 | |
| 540 | 539 | |
| r14700 | r14701 | |
| 562 | 561 | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 563 | 562 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 564 | 563 | |
| 565 | | MCFG_TI82SERIAL_ADD( "tiserial" ) |
| 564 | //MCFG_TI82SERIAL_ADD( "tiserial" ) |
| 566 | 565 | MACHINE_CONFIG_END |
| 567 | 566 | |
| 568 | 567 | static MACHINE_CONFIG_DERIVED( ti81v2, ti82 ) |
| r14700 | r14701 | |
| 599 | 598 | MCFG_NVRAM_HANDLER( ti86 ) |
| 600 | 599 | |
| 601 | 600 | MCFG_SNAPSHOT_ADD("snapshot", ti8x, "sav", 0) |
| 602 | | MCFG_TI86SERIAL_ADD( "tiserial" ) |
| 601 | //MCFG_TI86SERIAL_ADD( "tiserial" ) |
| 603 | 602 | MACHINE_CONFIG_END |
| 604 | 603 | |
| 605 | 604 | static MACHINE_CONFIG_DERIVED( ti83p, ti81 ) |
| r14700 | r14701 | |
| 625 | 624 | MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0) |
| 626 | 625 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 627 | 626 | |
| 628 | | MCFG_TI83PSERIAL_ADD( "tiserial" ) |
| 627 | //MCFG_TI83PSERIAL_ADD( "tiserial" ) |
| 629 | 628 | MACHINE_CONFIG_END |
| 630 | 629 | |
| 631 | 630 | static MACHINE_CONFIG_DERIVED( ti73, ti83p ) |
| 632 | | MCFG_DEVICE_REMOVE( "tiserial" ) |
| 633 | | MCFG_TI73SERIAL_ADD( "tiserial" ) |
| 631 | //MCFG_DEVICE_REMOVE( "tiserial" ) |
| 632 | //MCFG_TI73SERIAL_ADD( "tiserial" ) |
| 634 | 633 | MACHINE_CONFIG_END |
| 635 | 634 | |
| 636 | 635 | ROM_START (ti73) |