src/mess/drivers/ptcsol.c
| r10178 | r10179 | |
| 19 | 19 | Note that the CONSOL rom is basically a dumb terminal program and doesn't |
| 20 | 20 | do anything useful unless the MODE key (whatever that is) is pressed. |
| 21 | 21 | |
| 22 | | Other OS ROMs to be dumped: |
| 23 | | - CONSOL |
| 24 | | - CUTER |
| 25 | | - BOOTLOAD |
| 26 | | - DPMON (3rd party) |
| 22 | CUTER is a relocatable cassette-based alternative to SOLOS. |
| 27 | 23 | |
| 24 | Need a dump of BOOTLOAD. Need a tape of CUTER. Need orginal dumps of |
| 25 | SOLOS, DPMON and CONSOL. |
| 26 | |
| 28 | 27 | Other roms needed: |
| 29 | 28 | - Dump of the 2 character generators (motorola 6574 and 6575) |
| 30 | 29 | - Dump of U18 in the keyboard |
| r10178 | r10179 | |
| 41 | 40 | - The cassette format is totally identical, in fact tapes from one |
| 42 | 41 | machine can be loaded on the other natively. They won't run of course. |
| 43 | 42 | - Sorcerer monitor commands are almost identical to the SOLOS ones. |
| 44 | | To illustrate some differences: |
| 45 | | Run a program in memory GO (sorcerer) EX (SOLOS) |
| 46 | | Load a file from tape LO (Sorcerer) GE (SOLOS) |
| 47 | | Set tape operation to 300 baud SE T=1 (sorcerer) SE TA 1 (SOLOS) |
| 43 | example: to change tape speed to 300 baud: |
| 44 | SE T=1 (sorcerer) SE TA 1 (SOLOS) |
| 48 | 45 | Most other commands are identical. The EN command (enter bytes into |
| 49 | 46 | memory) is rather primitive in SOLOS, better on Sorcerer. |
| 50 | 47 | - Sol20 has "personality modules" where you could plug a new OS into |
| 51 | 48 | a special socket on the motherboard. Sorcerer improved upon this by |
| 52 | 49 | being the first computer to use cartridges. |
| 53 | 50 | - Some circuits are completely different... the video and keyboard are |
| 54 | | notable examples, while the address of ram on the basic machines is |
| 55 | | another major difference. |
| 51 | notable examples, while the addresses of ram and bios on the basic |
| 52 | machines is another major difference. |
| 56 | 53 | ****************************************************************************/ |
| 57 | 54 | #define ADDRESS_MAP_MODERN |
| 58 | 55 | |
| r10178 | r10179 | |
| 95 | 92 | required_device<device_t> m_uart; |
| 96 | 93 | required_device<device_t> m_uart_s; |
| 97 | 94 | required_device<device_t> m_terminal; |
| 95 | DECLARE_READ8_MEMBER( sol20_f9_r ); |
| 98 | 96 | DECLARE_READ8_MEMBER( sol20_fa_r ); |
| 99 | 97 | DECLARE_READ8_MEMBER( sol20_fb_r ); |
| 100 | 98 | DECLARE_READ8_MEMBER( sol20_fc_r ); |
| 99 | DECLARE_WRITE8_MEMBER( sol20_f9_w ); |
| 101 | 100 | DECLARE_WRITE8_MEMBER( sol20_fa_w ); |
| 102 | 101 | DECLARE_WRITE8_MEMBER( sol20_fb_w ); |
| 103 | 102 | DECLARE_WRITE8_MEMBER( sol20_fe_w ); |
| r10178 | r10179 | |
| 105 | 104 | UINT8 m_sol20_fa; |
| 106 | 105 | UINT8 m_sol20_fc; |
| 107 | 106 | UINT8 m_sol20_fe; |
| 108 | | UINT8 m_s4; |
| 109 | 107 | const UINT8 *FNT; |
| 110 | 108 | const UINT8 *m_videoram; |
| 111 | 109 | UINT8 m_framecnt; |
| r10178 | r10179 | |
| 217 | 215 | } |
| 218 | 216 | } |
| 219 | 217 | |
| 218 | READ8_MEMBER( sol20_state::sol20_f9_r) |
| 219 | { |
| 220 | UINT8 data = ay31015_get_received_data( m_uart_s ); |
| 221 | ay31015_set_input_pin( m_uart_s, AY31015_RDAV, 0 ); |
| 222 | ay31015_set_input_pin( m_uart_s, AY31015_RDAV, 1 ); |
| 223 | return data; |
| 224 | } |
| 220 | 225 | |
| 221 | 226 | READ8_MEMBER( sol20_state::sol20_fa_r ) |
| 222 | 227 | { |
| r10178 | r10179 | |
| 247 | 252 | return m_sol20_fc; |
| 248 | 253 | } |
| 249 | 254 | |
| 255 | WRITE8_MEMBER( sol20_state::sol20_f9_w ) |
| 256 | { |
| 257 | ay31015_set_transmit_data( m_uart_s, data ); |
| 258 | } |
| 259 | |
| 250 | 260 | WRITE8_MEMBER( sol20_state::sol20_fa_w ) |
| 251 | 261 | { |
| 252 | 262 | m_sol20_fa &= 1; |
| r10178 | r10179 | |
| 292 | 302 | static ADDRESS_MAP_START( sol20_io , ADDRESS_SPACE_IO, 8, sol20_state) |
| 293 | 303 | ADDRESS_MAP_UNMAP_HIGH |
| 294 | 304 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 305 | AM_RANGE(0xf9, 0xf9) AM_READWRITE(sol20_f9_r,sol20_f9_w) |
| 295 | 306 | AM_RANGE(0xfa, 0xfa) AM_READWRITE(sol20_fa_r,sol20_fa_w) |
| 296 | 307 | AM_RANGE(0xfb, 0xfb) AM_READWRITE(sol20_fb_r,sol20_fb_w) |
| 297 | 308 | AM_RANGE(0xfc, 0xfc) AM_READ(sol20_fc_r) |
| r10178 | r10179 | |
| 359 | 370 | PORT_DIPSETTING( 0x80, "4800/9600") |
| 360 | 371 | |
| 361 | 372 | PORT_START("S4") // these switches need to be checked for correct polarity |
| 362 | | PORT_DIPNAME( 0x11, 0x00, "Parity") |
| 363 | | PORT_DIPSETTING( 0x00, DEF_STR(None)) |
| 364 | | PORT_DIPSETTING( 0x10, "Odd") |
| 365 | | PORT_DIPSETTING( 0x11, "Even") |
| 373 | PORT_DIPNAME( 0x11, 0x10, "Parity") |
| 374 | PORT_DIPSETTING( 0x00, "Even") |
| 375 | PORT_DIPSETTING( 0x01, "Odd") |
| 376 | PORT_DIPSETTING( 0x10, DEF_STR(None)) |
| 366 | 377 | PORT_DIPNAME( 0x06, 0x06, "Data Bits") |
| 367 | 378 | PORT_DIPSETTING( 0x00, "5") |
| 368 | 379 | PORT_DIPSETTING( 0x02, "6") |
| r10178 | r10179 | |
| 462 | 473 | ay31015_set_receiver_clock( state->m_uart_s, s_clock); |
| 463 | 474 | ay31015_set_transmitter_clock( state->m_uart_s, s_clock); |
| 464 | 475 | |
| 465 | | // video dips |
| 466 | | state->m_s4 = input_port_read(machine, "S1"); |
| 467 | | |
| 468 | 476 | // boot-bank |
| 469 | 477 | memory_set_bank(machine, "boot", 1); |
| 470 | 478 | timer_set(machine, ATTOTIME_IN_USEC(9), NULL, 0, sol20_boot); |
| r10178 | r10179 | |
| 484 | 492 | |
| 485 | 493 | static VIDEO_UPDATE( sol20 ) |
| 486 | 494 | { |
| 495 | // Visible screen is 64 x 16, with start position controlled by scroll register. |
| 496 | // Note on blinking characters: |
| 497 | // any character with bit 7 set will blink. With DPMON, do DA C000 C2FF to see what happens |
| 498 | UINT8 s1 = input_port_read(machine, "S1"); |
| 487 | 499 | sol20_state *state = screen->machine->driver_data<sol20_state>(); |
| 488 | | /* visible screen is 64 x 16, with start position controlled by scroll register */ |
| 489 | 500 | UINT8 y,ra,chr,gfx; |
| 490 | 501 | UINT16 sy=0,ma,x,inv; |
| 491 | | UINT8 ctrl_off = state->m_s4 & 4; |
| 492 | | UINT8 polarity = (state->m_s4 & 8) ? 0xff : 0; |
| 502 | UINT8 polarity = (s1 & 8) ? 0xff : 0; |
| 493 | 503 | |
| 504 | UINT8 cursor_inv = FALSE; |
| 505 | if ((s1 == 0x20) || ((s1 == 0x10) && (state->m_framecnt & 0x08))) |
| 506 | cursor_inv = TRUE; |
| 507 | |
| 494 | 508 | state->m_framecnt++; |
| 495 | 509 | |
| 496 | 510 | ma = state->m_sol20_fe << 6; // scroll register |
| r10178 | r10179 | |
| 506 | 520 | inv = polarity; |
| 507 | 521 | chr = state->m_videoram[x & 0x3ff]; |
| 508 | 522 | |
| 509 | | /* Take care of flashing characters */ |
| 510 | | //if ((chr & 0x80) && (state->m_framecnt & 0x08)) |
| 511 | | if (chr & 0x80) |
| 523 | // cursor |
| 524 | if (BIT(chr, 7) && cursor_inv) |
| 512 | 525 | inv ^= 0xff; |
| 513 | 526 | |
| 514 | 527 | chr &= 0x7f; |
| 515 | 528 | |
| 516 | | if ((ra == 0) || ((ctrl_off) && (chr < 0x20))) |
| 529 | if ((ra == 0) || ((s1 & 4) && (chr < 0x20))) |
| 517 | 530 | gfx = inv; |
| 518 | 531 | else |
| 519 | 532 | if (ra < 10) |