src/emu/machine/68681.c
| r5811 | r5812 | |
| 8 | 8 | #include "driver.h" |
| 9 | 9 | #include "68681.h" |
| 10 | 10 | |
| 11 | | #define VERBOSE |
| 11 | #define VERBOSE 1 |
| 12 | 12 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 13 | 13 | |
| 14 | 14 | static const char *const duart68681_reg_read_names[0x10] = |
| r5811 | r5812 | |
| 269 | 269 | if ( BIT(ACR,7) == 0 ) |
| 270 | 270 | { |
| 271 | 271 | duart68681->channel[ch].baud_rate = baud_rate_ACR_0[data & 0x0f]; |
| 272 | |
| 273 | if (ch == 0) |
| 274 | { |
| 275 | if ((data & 0xf) == 0xe) |
| 276 | { |
| 277 | duart68681->channel[ch].baud_rate = duart68681->duart_config->ip3clk/16; |
| 278 | } |
| 279 | else if ((data & 0xf) == 0xf) |
| 280 | { |
| 281 | duart68681->channel[ch].baud_rate = duart68681->duart_config->ip3clk; |
| 282 | } |
| 283 | } |
| 284 | else if (ch == 1) |
| 285 | { |
| 286 | if ((data & 0xf) == 0xe) |
| 287 | { |
| 288 | duart68681->channel[ch].baud_rate = duart68681->duart_config->ip5clk/16; |
| 289 | } |
| 290 | else if ((data & 0xf) == 0xf) |
| 291 | { |
| 292 | duart68681->channel[ch].baud_rate = duart68681->duart_config->ip5clk; |
| 293 | } |
| 294 | } |
| 272 | 295 | } |
| 273 | 296 | else |
| 274 | 297 | { |
src/emu/machine/68681.h
| r5811 | r5812 | |
| 8 | 8 | void (*tx_callback)(const device_config *device, int channel, UINT8 data); |
| 9 | 9 | UINT8 (*input_port_read)(const device_config *device); |
| 10 | 10 | void (*output_port_write)(const device_config *device, UINT8 data); |
| 11 | |
| 12 | /* clocks for external baud rates */ |
| 13 | INT32 ip3clk, ip4clk, ip5clk, ip6clk; |
| 11 | 14 | }; |
| 12 | 15 | |
| 13 | 16 | #define DUART68681 DEVICE_GET_INFO_NAME(duart68681) |