src/mess/machine/c16.c
| r4733 | r4734 | |
| 119 | 119 | cbm_serial_clock_write (device->machine, clk = !(data & 0x02)); |
| 120 | 120 | cbm_serial_data_write (device->machine, dat = !(data & 0x01)); |
| 121 | 121 | |
| 122 | | // vc20_tape_write (!(data & 0x02)); // CASSETTE_RECORD not implemented yet |
| 122 | cassette_output(devtag_get_device(device->machine, "cassette"), !(data & 0x02) ? -(0x5a9e >> 1) : +(0x5a9e >> 1)); |
| 123 | |
| 124 | cassette_change_state(devtag_get_device(device->machine, "cassette"), (data & 0x08) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); |
| 123 | 125 | } |
| 124 | 126 | |
| 125 | 127 | UINT8 c16_m7501_port_read(const device_config *device, UINT8 direction) |
| r4733 | r4734 | |
| 140 | 142 | else |
| 141 | 143 | data &= ~0x10; |
| 142 | 144 | |
| 143 | | cassette_change_state(devtag_get_device(device->machine, "cassette"), (c16_port7501 & 0x08) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); |
| 144 | | |
| 145 | 145 | return data; |
| 146 | 146 | } |
| 147 | 147 | |
| r4733 | r4734 | |
| 303 | 303 | { |
| 304 | 304 | int data = 0x00; |
| 305 | 305 | |
| 306 | | if (!((cassette_get_state(devtag_get_device(space->machine, "cassette")) & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)) |
| 307 | | data |= 0x04; |
| 306 | if ((cassette_get_state(devtag_get_device(space->machine, "cassette")) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) |
| 307 | data &= ~0x04; |
| 308 | else |
| 309 | data |= 0x04; |
| 310 | |
| 308 | 311 | return data; |
| 309 | 312 | } |
| 310 | 313 | |
| r4733 | r4734 | |
| 312 | 315 | { |
| 313 | 316 | int data = 0x00; |
| 314 | 317 | |
| 315 | | if (!((cassette_get_state(devtag_get_device(space->machine, "cassette")) & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY)) |
| 316 | | data |= 0x04; |
| 318 | if ((cassette_get_state(devtag_get_device(space->machine, "cassette")) & CASSETTE_MASK_UISTATE) != CASSETTE_STOPPED) |
| 319 | data &= ~0x04; |
| 320 | else |
| 321 | data |= 0x04; |
| 322 | |
| 317 | 323 | return data; |
| 318 | 324 | } |
| 319 | 325 | |