src/mess/machine/trs80.c
| r4485 | r4486 | |
| 441 | 441 | /* UART set baud rate. Rx = bits 0..3, Tx = bits 4..7 |
| 442 | 442 | 00h 50 |
| 443 | 443 | 11h 75 |
| 444 | | 22h 100 |
| 444 | 22h 110 |
| 445 | 445 | 33h 134.5 |
| 446 | 446 | 44h 150 |
| 447 | 447 | 55h 300 |
| r4485 | r4486 | |
| 456 | 456 | EEh 9600 |
| 457 | 457 | FFh 19200 */ |
| 458 | 458 | |
| 459 | | int baud_clock[]={ 800, 1200, 1600, 2152, 2400, 4800, 9600, 19200, 28800, 32000, 38400, 57600, 76800, 115200, 153600, 307200 }; |
| 459 | int baud_clock[]={ 800, 1200, 1760, 2152, 2400, 4800, 9600, 19200, 28800, 32000, 38400, 57600, 76800, 115200, 153600, 307200 }; |
| 460 | 460 | ay31015_set_receiver_clock( trs80_ay31015, baud_clock[data & 0x0f]); |
| 461 | 461 | ay31015_set_transmitter_clock( trs80_ay31015, baud_clock[data>>4]); |
| 462 | 462 | } |
| r4485 | r4486 | |
| 527 | 527 | |
| 528 | 528 | WRITE8_HANDLER( trs80m4_f4_w ) |
| 529 | 529 | { |
| 530 | | /* Selection of drive and parameters - d7..d5 not emulated. |
| 530 | /* Selection of drive and parameters - d6..d5 not emulated. |
| 531 | 531 | A write also causes the selected drive motor to turn on for about 3 seconds. |
| 532 | 532 | When the motor turns off, the drive is deselected. |
| 533 | 533 | d7 1=MFM, 0=FM |
| r4485 | r4486 | |
| 560 | 560 | wd17xx_set_drive(trs80_fdc,drive); |
| 561 | 561 | wd17xx_set_side(trs80_fdc,head); |
| 562 | 562 | } |
| 563 | |
| 564 | wd17xx_set_density(trs80_fdc, (data & 0x80) ? 1 : 0); |
| 563 | 565 | } |
| 564 | 566 | |
| 565 | 567 | WRITE8_HANDLER( sys80_f8_w ) |
src/mess/drivers/kaypro2.c
| r4485 | r4486 | |
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | Things that need doing:
|
| 22 | | - How to specify interrupts in callbacks when a daisy-chain is in use?
|
| 23 | | - Which order are devices to be specified in the daisy chain?
|
| 24 | 22 | - Keyboard is a separate device and not emulated (includes a beeper)
|
| 25 | 23 | - Floppy disks (I have no knowledge of how to set these up)
|
| 26 | 24 | - Split this code to video, machine
|
| r4485 | r4486 | |
| 59 | 57 | static PALETTE_INIT( kaypro2 )
|
| 60 | 58 | {
|
| 61 | 59 | palette_set_color(machine,0,RGB_BLACK); /* black */
|
| 62 | | palette_set_color(machine,1,MAKE_RGB(0, 200, 0)); /* green */
|
| 60 | palette_set_color(machine,1,MAKE_RGB(0, 220, 0)); /* green */
|
| 63 | 61 | }
|
| 64 | 62 | |
| 65 | 63 | static VIDEO_UPDATE( kaypro2 )
|
| r4485 | r4486 | |
| 133 | 131 | |
| 134 | 132 | ************************************************************/
|
| 135 | 133 | |
| 134 | static WRITE8_DEVICE_HANDLER( kaypro2_interrupt )
|
| 135 | {
|
| 136 | cpu_set_input_line(device->machine->cpu[0], 0, data);
|
| 137 | }
|
| 138 | |
| 136 | 139 | static WRITE8_DEVICE_HANDLER( pio_printer_w )
|
| 137 | 140 | {
|
| 138 | 141 | /* d7..d0 output to Centronics printer */
|
| r4485 | r4486 | |
| 196 | 199 | |
| 197 | 200 | static const z80pio_interface kaypro2_pio_g_intf =
|
| 198 | 201 | {
|
| 199 | | DEVCB_NULL, /* callback when change interrupt status - assume this is handled by the daisy-chain? */
|
| 202 | DEVCB_HANDLER(kaypro2_interrupt),
|
| 200 | 203 | DEVCB_NULL,
|
| 201 | 204 | DEVCB_NULL,
|
| 202 | 205 | DEVCB_HANDLER(pio_printer_w), /* output data to printer */
|
| r4485 | r4486 | |
| 207 | 210 | |
| 208 | 211 | static const z80pio_interface kaypro2_pio_s_intf =
|
| 209 | 212 | {
|
| 210 | | DEVCB_NULL, /* callback when change interrupt status - assume this is handled by the daisy-chain? */
|
| 213 | DEVCB_HANDLER(kaypro2_interrupt),
|
| 211 | 214 | DEVCB_HANDLER(pio_system_r), /* read printer status */
|
| 212 | 215 | DEVCB_NULL,
|
| 213 | 216 | DEVCB_HANDLER(pio_system_w), /* activate various internal devices */
|
| r4485 | r4486 | |
| 288 | 291 | }
|
| 289 | 292 | }
|
| 290 | 293 | |
| 294 | /* when sio devcb'ed like pio is, change to use pio's int handler */
|
| 295 | static void kaypro2_int_sio(const device_config *device, int state)
|
| 296 | {
|
| 297 | cpu_set_input_line(device->machine->cpu[0], 0, state);
|
| 298 | }
|
| 291 | 299 | |
| 292 | 300 | static const z80sio_interface kaypro2_sio_intf =
|
| 293 | 301 | {
|
| 294 | | 0, /* interrupt handler - assume handled by daisy-chain? */
|
| 295 | | 0, /* DTR changed handler */
|
| 296 | | 0, /* RTS changed handler */
|
| 297 | | 0, /* BREAK changed handler */
|
| 298 | | 0, /* transmit handler - which channel is this for? */
|
| 299 | | 0 /* receive handler - which channel is this for? */
|
| 302 | kaypro2_int_sio, /* interrupt handler */
|
| 303 | 0, /* DTR changed handler */
|
| 304 | 0, /* RTS changed handler */
|
| 305 | 0, /* BREAK changed handler */
|
| 306 | 0, /* transmit handler - which channel is this for? */
|
| 307 | 0 /* receive handler - which channel is this for? */
|
| 300 | 308 | };
|
| 301 | 309 | |
| 302 | 310 | static const z80_daisy_chain kaypro2_daisy_chain[] =
|