trunk/src/mess/machine/e01.c
| r20582 | r20583 | |
| 39 | 39 | |
| 40 | 40 | TODO: |
| 41 | 41 | |
| 42 | | - memory_bank::set_entry called for bank ':econet254:e01s:bank2' with invalid bank entry 0 |
| 43 | 42 | - centronics strobe |
| 44 | 43 | - econet clock speed select |
| 45 | 44 | - ADLC interrupts |
| r20582 | r20583 | |
| 274 | 273 | //------------------------------------------------- |
| 275 | 274 | |
| 276 | 275 | static ADDRESS_MAP_START( e01_mem, AS_PROGRAM, 8, e01_device ) |
| 277 | | AM_RANGE(0x0000, 0xfbff) AM_READ_BANK("bank1") AM_WRITE_BANK("bank2") |
| 276 | AM_RANGE(0x0000, 0xffff) AM_READWRITE(read, write) |
| 278 | 277 | AM_RANGE(0xfc00, 0xfc00) AM_MIRROR(0x00c3) AM_READWRITE(rtc_address_r, rtc_address_w) |
| 279 | 278 | AM_RANGE(0xfc04, 0xfc04) AM_MIRROR(0x00c3) AM_READWRITE(rtc_data_r, rtc_data_w) |
| 280 | 279 | AM_RANGE(0xfc08, 0xfc08) AM_MIRROR(0x00c0) AM_READ(ram_select_r) AM_WRITE(floppy_w) |
| r20582 | r20583 | |
| 288 | 287 | AM_RANGE(0xfc31, 0xfc31) AM_MIRROR(0x00c0) AM_READ(hdc_status_r) |
| 289 | 288 | AM_RANGE(0xfc32, 0xfc32) AM_MIRROR(0x00c0) AM_WRITE(hdc_select_w) |
| 290 | 289 | AM_RANGE(0xfc33, 0xfc33) AM_MIRROR(0x00c0) AM_WRITE(hdc_irq_enable_w) |
| 291 | | AM_RANGE(0xfd00, 0xffff) AM_READ_BANK("bank3") AM_WRITE_BANK("bank4") |
| 292 | 290 | ADDRESS_MAP_END |
| 293 | 291 | |
| 294 | 292 | |
| r20582 | r20583 | |
| 423 | 421 | m_scsibus(*this, SCSIBUS_TAG ":host"), |
| 424 | 422 | m_floppy0(*this, WD2793_TAG":0"), |
| 425 | 423 | m_floppy1(*this, WD2793_TAG":1"), |
| 424 | m_rom(*this, R65C102_TAG), |
| 426 | 425 | m_adlc_ie(0), |
| 427 | 426 | m_hdc_ie(0), |
| 428 | 427 | m_rtc_irq(CLEAR_LINE), |
| r20582 | r20583 | |
| 447 | 446 | m_scsibus(*this, SCSIBUS_TAG ":host"), |
| 448 | 447 | m_floppy0(*this, WD2793_TAG":0"), |
| 449 | 448 | m_floppy1(*this, WD2793_TAG":1"), |
| 449 | m_rom(*this, R65C102_TAG), |
| 450 | 450 | m_adlc_ie(0), |
| 451 | 451 | m_hdc_ie(0), |
| 452 | 452 | m_rtc_irq(CLEAR_LINE), |
| r20582 | r20583 | |
| 492 | 492 | m_fdc->setup_intrq_cb(wd2793_t::line_cb(FUNC(e01_device::fdc_irq_w), this)); |
| 493 | 493 | m_fdc->setup_drq_cb(wd2793_t::line_cb(FUNC(e01_device::fdc_drq_w), this)); |
| 494 | 494 | |
| 495 | | // setup memory banking |
| 496 | | UINT8 *ram = m_ram->pointer(); |
| 497 | | UINT8 *rom = memregion(R65C102_TAG)->base(); |
| 498 | | |
| 499 | | membank("bank1")->configure_entry(0, ram); |
| 500 | | membank("bank1")->configure_entry(1, rom); |
| 501 | | membank("bank1")->set_entry(1); |
| 502 | | |
| 503 | | membank("bank2")->configure_entry(0, ram); |
| 504 | | // membank("bank2")->set_entry(0); |
| 505 | | |
| 506 | | membank("bank3")->configure_entry(0, ram + 0xfd00); |
| 507 | | membank("bank3")->configure_entry(1, rom + 0xfd00); |
| 508 | | membank("bank3")->set_entry(1); |
| 509 | | |
| 510 | | membank("bank4")->configure_entry(0, ram + 0xfd00); |
| 511 | | membank("bank4")->set_entry(0); |
| 512 | | |
| 513 | 495 | // allocate timers |
| 514 | 496 | m_clk_timer = timer_alloc(); |
| 515 | 497 | |
| r20582 | r20583 | |
| 531 | 513 | void e01_device::device_reset() |
| 532 | 514 | { |
| 533 | 515 | m_clk_timer->adjust(attotime::zero, 0, attotime::from_hz(200000)); |
| 534 | | |
| 535 | | membank("bank1")->set_entry(1); |
| 536 | | membank("bank3")->set_entry(1); |
| 516 | m_ram_en = false; |
| 537 | 517 | } |
| 538 | 518 | |
| 539 | 519 | |
| r20582 | r20583 | |
| 552 | 532 | |
| 553 | 533 | |
| 554 | 534 | //------------------------------------------------- |
| 535 | // read - |
| 536 | //------------------------------------------------- |
| 537 | |
| 538 | READ8_MEMBER( e01_device::read ) |
| 539 | { |
| 540 | UINT8 data = 0; |
| 541 | |
| 542 | if (m_ram_en) |
| 543 | { |
| 544 | data = m_ram->pointer()[offset]; |
| 545 | } |
| 546 | else |
| 547 | { |
| 548 | data = m_rom->base()[offset]; |
| 549 | } |
| 550 | |
| 551 | return data; |
| 552 | } |
| 553 | |
| 554 | |
| 555 | //------------------------------------------------- |
| 556 | // write - |
| 557 | //------------------------------------------------- |
| 558 | |
| 559 | WRITE8_MEMBER( e01_device::write ) |
| 560 | { |
| 561 | m_ram->pointer()[offset] = data; |
| 562 | } |
| 563 | |
| 564 | |
| 565 | //------------------------------------------------- |
| 555 | 566 | // eprom_r - ROM/RAM select read |
| 556 | 567 | //------------------------------------------------- |
| 557 | 568 | |
| 558 | 569 | READ8_MEMBER( e01_device::ram_select_r ) |
| 559 | 570 | { |
| 560 | | membank("bank1")->set_entry(0); |
| 561 | | membank("bank3")->set_entry(0); |
| 571 | m_ram_en = true; |
| 562 | 572 | |
| 563 | 573 | return 0; |
| 564 | 574 | } |
trunk/src/mess/includes/cgc7900.h
| r20582 | r20583 | |
| 28 | 28 | cgc7900_state(const machine_config &mconfig, device_type type, const char *tag) |
| 29 | 29 | : driver_device(mconfig, type, tag), |
| 30 | 30 | m_maincpu(*this, M68000_TAG), |
| 31 | | m_chrom_ram(*this, "chrom_ram"), |
| 32 | | m_plane_ram(*this, "plane_ram"), |
| 33 | | m_clut_ram(*this, "clut_ram"), |
| 34 | | m_overlay_ram(*this, "overlay_ram"), |
| 35 | | m_roll_bitmap(*this, "roll_bitmap"), |
| 36 | | m_pan_x(*this, "pan_x"), |
| 37 | | m_pan_y(*this, "pan_y"), |
| 38 | | m_zoom(*this, "zoom"), |
| 39 | | m_blink_select(*this, "blink_select"), |
| 40 | | m_plane_select(*this, "plane_select"), |
| 41 | | m_plane_switch(*this, "plane_switch"), |
| 42 | | m_color_status_fg(*this, "color_status_fg"), |
| 43 | | m_color_status_bg(*this, "color_status_bg"), |
| 44 | | m_roll_overlay(*this, "roll_overlay"){ } |
| 31 | m_char_rom(*this, "gfx1"), |
| 32 | m_chrom_ram(*this, "chrom_ram"), |
| 33 | m_plane_ram(*this, "plane_ram"), |
| 34 | m_clut_ram(*this, "clut_ram"), |
| 35 | m_overlay_ram(*this, "overlay_ram"), |
| 36 | m_roll_bitmap(*this, "roll_bitmap"), |
| 37 | m_pan_x(*this, "pan_x"), |
| 38 | m_pan_y(*this, "pan_y"), |
| 39 | m_zoom(*this, "zoom"), |
| 40 | m_blink_select(*this, "blink_select"), |
| 41 | m_plane_select(*this, "plane_select"), |
| 42 | m_plane_switch(*this, "plane_switch"), |
| 43 | m_color_status_fg(*this, "color_status_fg"), |
| 44 | m_color_status_bg(*this, "color_status_bg"), |
| 45 | m_roll_overlay(*this, "roll_overlay") |
| 46 | { } |
| 45 | 47 | |
| 46 | 48 | required_device<cpu_device> m_maincpu; |
| 49 | required_memory_region m_char_rom; |
| 50 | required_shared_ptr<UINT16> m_chrom_ram; |
| 51 | required_shared_ptr<UINT16> m_plane_ram; |
| 52 | required_shared_ptr<UINT16> m_clut_ram; |
| 53 | required_shared_ptr<UINT16> m_overlay_ram; |
| 54 | required_shared_ptr<UINT16> m_roll_bitmap; |
| 55 | required_shared_ptr<UINT16> m_pan_x; |
| 56 | required_shared_ptr<UINT16> m_pan_y; |
| 57 | required_shared_ptr<UINT16> m_zoom; |
| 58 | required_shared_ptr<UINT16> m_blink_select; |
| 59 | required_shared_ptr<UINT16> m_plane_select; |
| 60 | required_shared_ptr<UINT16> m_plane_switch; |
| 61 | required_shared_ptr<UINT16> m_color_status_fg; |
| 62 | required_shared_ptr<UINT16> m_color_status_bg; |
| 63 | required_shared_ptr<UINT16> m_roll_overlay; |
| 47 | 64 | |
| 48 | 65 | virtual void machine_start(); |
| 49 | 66 | virtual void machine_reset(); |
| 50 | 67 | |
| 51 | | virtual void video_start(); |
| 52 | 68 | UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 53 | 69 | |
| 54 | 70 | DECLARE_READ16_MEMBER( keyboard_r ); |
| r20582 | r20583 | |
| 72 | 88 | |
| 73 | 89 | /* video state */ |
| 74 | 90 | rgb_t m_clut[256]; |
| 75 | | required_shared_ptr<UINT16> m_chrom_ram; |
| 76 | | required_shared_ptr<UINT16> m_plane_ram; |
| 77 | | required_shared_ptr<UINT16> m_clut_ram; |
| 78 | | required_shared_ptr<UINT16> m_overlay_ram; |
| 79 | | UINT8 *m_char_rom; |
| 80 | | required_shared_ptr<UINT16> m_roll_bitmap; |
| 81 | | required_shared_ptr<UINT16> m_pan_x; |
| 82 | | required_shared_ptr<UINT16> m_pan_y; |
| 83 | | required_shared_ptr<UINT16> m_zoom; |
| 84 | | required_shared_ptr<UINT16> m_blink_select; |
| 85 | | required_shared_ptr<UINT16> m_plane_select; |
| 86 | | required_shared_ptr<UINT16> m_plane_switch; |
| 87 | | required_shared_ptr<UINT16> m_color_status_fg; |
| 88 | | required_shared_ptr<UINT16> m_color_status_bg; |
| 89 | | required_shared_ptr<UINT16> m_roll_overlay; |
| 90 | 91 | int m_blink; |
| 91 | | UINT32 screen_update_cgc7900(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 92 | |
| 92 | 93 | TIMER_DEVICE_CALLBACK_MEMBER(blink_tick); |
| 93 | 94 | }; |
| 94 | 95 | |
trunk/src/mess/includes/tmc1800.h
| r20582 | r20583 | |
| 28 | 28 | : driver_device(mconfig, type, tag), |
| 29 | 29 | m_maincpu(*this, CDP1802_TAG), |
| 30 | 30 | m_vdc(*this, CDP1861_TAG), |
| 31 | | m_cassette(*this, CASSETTE_TAG) |
| 31 | m_cassette(*this, CASSETTE_TAG), |
| 32 | m_ram(*this, RAM_TAG), |
| 33 | m_rom(*this, CDP1802_TAG), |
| 34 | m_run(*this, "RUN") |
| 32 | 35 | { } |
| 33 | 36 | |
| 34 | 37 | required_device<cpu_device> m_maincpu; |
| 35 | 38 | required_device<cdp1861_device> m_vdc; |
| 36 | 39 | required_device<cassette_image_device> m_cassette; |
| 40 | required_device<ram_device> m_ram; |
| 41 | required_memory_region m_rom; |
| 42 | required_ioport m_run; |
| 37 | 43 | |
| 38 | 44 | virtual void machine_start(); |
| 39 | 45 | virtual void machine_reset(); |
| r20582 | r20583 | |
| 58 | 64 | osc1000b_state(const machine_config &mconfig, device_type type, const char *tag) |
| 59 | 65 | : driver_device(mconfig, type, tag), |
| 60 | 66 | m_maincpu(*this, CDP1802_TAG), |
| 61 | | m_cassette(*this, CASSETTE_TAG) |
| 67 | m_cassette(*this, CASSETTE_TAG), |
| 68 | m_rom(*this, CDP1802_TAG), |
| 69 | m_run(*this, "RUN") |
| 62 | 70 | { } |
| 63 | 71 | |
| 64 | 72 | required_device<cpu_device> m_maincpu; |
| 65 | 73 | required_device<cassette_image_device> m_cassette; |
| 74 | required_memory_region m_rom; |
| 75 | required_ioport m_run; |
| 66 | 76 | |
| 67 | 77 | virtual void machine_start(); |
| 68 | 78 | virtual void machine_reset(); |
| r20582 | r20583 | |
| 87 | 97 | m_maincpu(*this, CDP1802_TAG), |
| 88 | 98 | m_cti(*this, CDP1864_TAG), |
| 89 | 99 | m_cassette(*this, CASSETTE_TAG), |
| 90 | | m_ram(*this, RAM_TAG) |
| 100 | m_ram(*this, RAM_TAG), |
| 101 | m_rom(*this, CDP1802_TAG), |
| 102 | m_colorram(*this, "color_ram"), |
| 103 | m_in0(*this, "IN0"), |
| 104 | m_in1(*this, "IN1"), |
| 105 | m_in2(*this, "IN2"), |
| 106 | m_in3(*this, "IN3"), |
| 107 | m_in4(*this, "IN4"), |
| 108 | m_in5(*this, "IN5"), |
| 109 | m_in6(*this, "IN6"), |
| 110 | m_in7(*this, "IN7"), |
| 111 | m_run(*this, "RUN") |
| 91 | 112 | { } |
| 92 | 113 | |
| 93 | 114 | required_device<cpu_device> m_maincpu; |
| 94 | 115 | required_device<cdp1864_device> m_cti; |
| 95 | 116 | required_device<cassette_image_device> m_cassette; |
| 96 | 117 | required_device<ram_device> m_ram; |
| 118 | required_memory_region m_rom; |
| 119 | optional_shared_ptr<UINT8> m_colorram; |
| 120 | required_ioport m_in0; |
| 121 | required_ioport m_in1; |
| 122 | required_ioport m_in2; |
| 123 | required_ioport m_in3; |
| 124 | required_ioport m_in4; |
| 125 | required_ioport m_in5; |
| 126 | required_ioport m_in6; |
| 127 | required_ioport m_in7; |
| 128 | required_ioport m_run; |
| 97 | 129 | |
| 98 | 130 | virtual void machine_start(); |
| 99 | 131 | virtual void machine_reset(); |
| r20582 | r20583 | |
| 117 | 149 | int m_roc; |
| 118 | 150 | |
| 119 | 151 | /* video state */ |
| 120 | | UINT8 *m_colorram; /* color memory */ |
| 121 | 152 | UINT8 m_color; |
| 122 | 153 | |
| 123 | 154 | /* keyboard state */ |
| r20582 | r20583 | |
| 132 | 163 | m_maincpu(*this, CDP1802_TAG), |
| 133 | 164 | m_cti(*this, CDP1864_TAG), |
| 134 | 165 | m_cassette(*this, CASSETTE_TAG), |
| 135 | | m_ram(*this, RAM_TAG) |
| 166 | m_ram(*this, RAM_TAG), |
| 167 | m_rom(*this, CDP1802_TAG), |
| 168 | m_ny0(*this, "NY0"), |
| 169 | m_ny1(*this, "NY1"), |
| 170 | m_run(*this, "RUN"), |
| 171 | m_monitor(*this, "MONITOR") |
| 136 | 172 | { } |
| 137 | 173 | |
| 138 | 174 | required_device<cpu_device> m_maincpu; |
| 139 | 175 | required_device<cdp1864_device> m_cti; |
| 140 | 176 | required_device<cassette_image_device> m_cassette; |
| 141 | 177 | required_device<ram_device> m_ram; |
| 178 | required_memory_region m_rom; |
| 179 | required_ioport m_ny0; |
| 180 | required_ioport m_ny1; |
| 181 | required_ioport m_run; |
| 182 | required_ioport m_monitor; |
| 142 | 183 | |
| 143 | 184 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 144 | 185 | virtual void machine_start(); |
trunk/src/mess/drivers/ql.c
| r20582 | r20583 | |
| 247 | 247 | |
| 248 | 248 | UINT8 data = 0; |
| 249 | 249 | |
| 250 | | if (BIT(m_keylatch, 0)) data |= ioport("ROW0")->read() | ioport("JOY0")->read(); |
| 251 | | if (BIT(m_keylatch, 1)) data |= ioport("ROW1")->read() | ioport("JOY1")->read(); |
| 252 | | if (BIT(m_keylatch, 2)) data |= ioport("ROW2")->read(); |
| 253 | | if (BIT(m_keylatch, 3)) data |= ioport("ROW3")->read(); |
| 254 | | if (BIT(m_keylatch, 4)) data |= ioport("ROW4")->read(); |
| 255 | | if (BIT(m_keylatch, 5)) data |= ioport("ROW5")->read(); |
| 256 | | if (BIT(m_keylatch, 6)) data |= ioport("ROW6")->read(); |
| 257 | | if (BIT(m_keylatch, 7)) data |= ioport("ROW7")->read(); |
| 250 | if (BIT(m_keylatch, 0)) data |= m_y0->read() | m_joy0->read(); |
| 251 | if (BIT(m_keylatch, 1)) data |= m_y1->read() | m_joy1->read(); |
| 252 | if (BIT(m_keylatch, 2)) data |= m_y2->read(); |
| 253 | if (BIT(m_keylatch, 3)) data |= m_y3->read(); |
| 254 | if (BIT(m_keylatch, 4)) data |= m_y4->read(); |
| 255 | if (BIT(m_keylatch, 5)) data |= m_y5->read(); |
| 256 | if (BIT(m_keylatch, 6)) data |= m_y6->read(); |
| 257 | if (BIT(m_keylatch, 7)) data |= m_y7->read(); |
| 258 | 258 | |
| 259 | 259 | return data; |
| 260 | 260 | } |
| r20582 | r20583 | |
| 434 | 434 | //------------------------------------------------- |
| 435 | 435 | |
| 436 | 436 | static INPUT_PORTS_START( ql ) |
| 437 | | PORT_START("ROW0") |
| 437 | PORT_START("Y0") |
| 438 | 438 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("F4") |
| 439 | 439 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("F1") |
| 440 | 440 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| r20582 | r20583 | |
| 444 | 444 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 445 | 445 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') |
| 446 | 446 | |
| 447 | | PORT_START("ROW1") |
| 447 | PORT_START("Y1") |
| 448 | 448 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 449 | 449 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 450 | 450 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| r20582 | r20583 | |
| 454 | 454 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 455 | 455 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 456 | 456 | |
| 457 | | PORT_START("ROW2") |
| 457 | PORT_START("Y2") |
| 458 | 458 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') |
| 459 | 459 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 460 | 460 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| r20582 | r20583 | |
| 464 | 464 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 465 | 465 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('\"') |
| 466 | 466 | |
| 467 | | PORT_START("ROW3") |
| 467 | PORT_START("Y3") |
| 468 | 468 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') |
| 469 | 469 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) |
| 470 | 470 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| r20582 | r20583 | |
| 474 | 474 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 475 | 475 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 476 | 476 | |
| 477 | | PORT_START("ROW4") |
| 477 | PORT_START("Y4") |
| 478 | 478 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 479 | 479 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 480 | 480 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| r20582 | r20583 | |
| 484 | 484 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 485 | 485 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 486 | 486 | |
| 487 | | PORT_START("ROW5") |
| 487 | PORT_START("Y5") |
| 488 | 488 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') |
| 489 | 489 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 490 | 490 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| r20582 | r20583 | |
| 494 | 494 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 495 | 495 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 496 | 496 | |
| 497 | | PORT_START("ROW6") |
| 497 | PORT_START("Y6") |
| 498 | 498 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') |
| 499 | 499 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| 500 | 500 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') |
| r20582 | r20583 | |
| 504 | 504 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 505 | 505 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 506 | 506 | |
| 507 | | PORT_START("ROW7") |
| 507 | PORT_START("Y7") |
| 508 | 508 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 509 | 509 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) |
| 510 | 510 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("ALT") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_CODE(KEYCODE_RALT) |
| r20582 | r20583 | |
| 551 | 551 | static INPUT_PORTS_START( ql_es ) |
| 552 | 552 | PORT_INCLUDE(ql) |
| 553 | 553 | |
| 554 | | PORT_MODIFY("ROW1") |
| 554 | PORT_MODIFY("Y1") |
| 555 | 555 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_NAME("] \xc3\x9c") PORT_CHAR(']') PORT_CHAR(0xfc) PORT_CHAR(0xdc) |
| 556 | 556 | |
| 557 | | PORT_MODIFY("ROW2") |
| 557 | PORT_MODIFY("Y2") |
| 558 | 558 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('`') PORT_CHAR('^') |
| 559 | 559 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('!') |
| 560 | 560 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("[ \xc3\x87") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('[') PORT_CHAR(0xe7) PORT_CHAR(0xc7) |
| 561 | 561 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(';') PORT_CHAR(':') |
| 562 | 562 | |
| 563 | | PORT_MODIFY("ROW3") |
| 563 | PORT_MODIFY("Y3") |
| 564 | 564 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('\'') PORT_CHAR('"') |
| 565 | 565 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\x91") PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf1) PORT_CHAR(0xd1) |
| 566 | 566 | |
| 567 | | PORT_MODIFY("ROW4") |
| 567 | PORT_MODIFY("Y4") |
| 568 | 568 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1 \xc2\xa1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR(0xa1) |
| 569 | 569 | |
| 570 | | PORT_MODIFY("ROW6") |
| 570 | PORT_MODIFY("Y6") |
| 571 | 571 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("2 \xc2\xbf") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR(0xbf) |
| 572 | 572 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('/') |
| 573 | 573 | |
| 574 | | PORT_MODIFY("ROW7") |
| 574 | PORT_MODIFY("Y7") |
| 575 | 575 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('<') PORT_CHAR('>') |
| 576 | 576 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?') |
| 577 | 577 | INPUT_PORTS_END |
| r20582 | r20583 | |
| 584 | 584 | static INPUT_PORTS_START( ql_de ) |
| 585 | 585 | PORT_INCLUDE(ql) |
| 586 | 586 | |
| 587 | | PORT_MODIFY("ROW0") |
| 587 | PORT_MODIFY("Y0") |
| 588 | 588 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') |
| 589 | 589 | |
| 590 | | PORT_MODIFY("ROW1") |
| 590 | PORT_MODIFY("Y1") |
| 591 | 591 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('<') PORT_CHAR('>') |
| 592 | 592 | |
| 593 | | PORT_MODIFY("ROW2") |
| 593 | PORT_MODIFY("Y2") |
| 594 | 594 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('+') PORT_CHAR('*') |
| 595 | 595 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 596 | 596 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') |
| 597 | 597 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('\\') PORT_CHAR('^') |
| 598 | 598 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\x84") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xe4) PORT_CHAR(0xc4) |
| 599 | 599 | |
| 600 | | PORT_MODIFY("ROW3") |
| 600 | PORT_MODIFY("Y3") |
| 601 | 601 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\x9c") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0xfc) PORT_CHAR(0xdc) |
| 602 | 602 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('#') PORT_CHAR('\'') |
| 603 | 603 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\x96") PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf6) PORT_CHAR(0xd6) |
| 604 | 604 | |
| 605 | | PORT_MODIFY("ROW4") |
| 605 | PORT_MODIFY("Y4") |
| 606 | 606 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("3 \xc2\xa3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR(0xa7) |
| 607 | 607 | |
| 608 | | PORT_MODIFY("ROW5") |
| 608 | PORT_MODIFY("Y5") |
| 609 | 609 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') |
| 610 | 610 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\x9f ?") PORT_CODE(KEYCODE_MINUS) PORT_CHAR(0xdf) PORT_CHAR('?') |
| 611 | 611 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 612 | 612 | |
| 613 | | PORT_MODIFY("ROW6") |
| 613 | PORT_MODIFY("Y6") |
| 614 | 614 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 615 | 615 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 616 | 616 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 617 | 617 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') |
| 618 | 618 | |
| 619 | | PORT_MODIFY("ROW7") |
| 619 | PORT_MODIFY("Y7") |
| 620 | 620 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_') |
| 621 | 621 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') |
| 622 | 622 | INPUT_PORTS_END |
| r20582 | r20583 | |
| 629 | 629 | static INPUT_PORTS_START( ql_it ) |
| 630 | 630 | PORT_INCLUDE(ql) |
| 631 | 631 | |
| 632 | | PORT_MODIFY("ROW0") |
| 632 | PORT_MODIFY("Y0") |
| 633 | 633 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('(') PORT_CHAR('5') |
| 634 | 634 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('\'') PORT_CHAR('4') |
| 635 | 635 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("7 \xc3\xa8") PORT_CODE(KEYCODE_7) PORT_CHAR('?') PORT_CHAR('7') |
| 636 | 636 | |
| 637 | | PORT_MODIFY("ROW1") |
| 637 | PORT_MODIFY("Y1") |
| 638 | 638 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('<') PORT_CHAR('>') |
| 639 | 639 | |
| 640 | | PORT_MODIFY("ROW2") |
| 640 | PORT_MODIFY("Y2") |
| 641 | 641 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('$') PORT_CHAR('&') |
| 642 | 642 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 643 | 643 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR(':') PORT_CHAR('/') |
| r20582 | r20583 | |
| 645 | 645 | PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('?') |
| 646 | 646 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\xb9 %") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xf9) PORT_CHAR('%') |
| 647 | 647 | |
| 648 | | PORT_MODIFY("ROW3") |
| 648 | PORT_MODIFY("Y3") |
| 649 | 649 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\xac =") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0xec) PORT_CHAR('=') |
| 650 | 650 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('+') |
| 651 | 651 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 652 | 652 | |
| 653 | | PORT_MODIFY("ROW4") |
| 653 | PORT_MODIFY("Y4") |
| 654 | 654 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('"') PORT_CHAR('3') |
| 655 | 655 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('#') PORT_CHAR('1') |
| 656 | 656 | |
| 657 | | PORT_MODIFY("ROW5") |
| 657 | PORT_MODIFY("Y5") |
| 658 | 658 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\xa7 9") PORT_CODE(KEYCODE_9) PORT_CHAR(0xe7) PORT_CHAR('9') |
| 659 | 659 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 660 | 660 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(')') PORT_CHAR('\\') |
| 661 | 661 | |
| 662 | | PORT_MODIFY("ROW6") |
| 662 | PORT_MODIFY("Y6") |
| 663 | 663 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('^') PORT_CHAR('8') |
| 664 | 664 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\xa9 2") PORT_CODE(KEYCODE_2) PORT_CHAR(0xe9) PORT_CHAR('2') |
| 665 | 665 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('_') PORT_CHAR('6') |
| 666 | 666 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\xa0 0") PORT_CODE(KEYCODE_0) PORT_CHAR(0xe0) PORT_CHAR('0') |
| 667 | 667 | |
| 668 | | PORT_MODIFY("ROW7") |
| 668 | PORT_MODIFY("Y7") |
| 669 | 669 | PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("\xc3\xb2 !") PORT_CODE(KEYCODE_SLASH) PORT_CHAR(0xf2) PORT_CHAR('!') |
| 670 | 670 | PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('.') |
| 671 | 671 | INPUT_PORTS_END |
trunk/src/mess/drivers/tmc1800.c
| r20582 | r20583 | |
| 151 | 151 | |
| 152 | 152 | bit description |
| 153 | 153 | |
| 154 | | 0 X0 |
| 155 | | 1 X1 |
| 156 | | 2 X2 |
| 157 | | 3 Y0 |
| 158 | | 4 not connected |
| 159 | | 5 not connected |
| 160 | | 6 not connected |
| 161 | | 7 not connected |
| 154 | 0 A |
| 155 | 1 B |
| 156 | 2 C |
| 157 | 3 NY0 |
| 158 | 4 NY1 |
| 159 | 5 |
| 160 | 6 |
| 161 | 7 |
| 162 | 162 | |
| 163 | 163 | */ |
| 164 | 164 | |
| 165 | | m_keylatch = data & 0x0f; |
| 165 | m_keylatch = data & 0x1f; |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | void tmc2000_state::bankswitch() |
| 169 | 169 | { |
| 170 | 170 | address_space &program = m_maincpu->space(AS_PROGRAM); |
| 171 | 171 | UINT8 *ram = m_ram->pointer(); |
| 172 | | UINT8 *rom = memregion(CDP1802_TAG)->base(); |
| 172 | UINT8 *rom = m_rom->base(); |
| 173 | 173 | |
| 174 | 174 | if (m_roc) |
| 175 | 175 | { |
| r20582 | r20583 | |
| 440 | 440 | } |
| 441 | 441 | |
| 442 | 442 | static INPUT_PORTS_START( nano ) |
| 443 | | PORT_START("IN0") |
| 443 | PORT_START("NY0") |
| 444 | 444 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0') |
| 445 | 445 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1') |
| 446 | 446 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('2') |
| r20582 | r20583 | |
| 450 | 450 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6') |
| 451 | 451 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7') |
| 452 | 452 | |
| 453 | | PORT_START("IN1") |
| 453 | PORT_START("NY1") |
| 454 | 454 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8') |
| 455 | 455 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9') |
| 456 | 456 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| r20582 | r20583 | |
| 473 | 473 | |
| 474 | 474 | READ_LINE_MEMBER( tmc1800_state::clear_r ) |
| 475 | 475 | { |
| 476 | | return BIT(ioport("RUN")->read(), 0); |
| 476 | return BIT(m_run->read(), 0); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | READ_LINE_MEMBER( tmc1800_state::ef2_r ) |
| 480 | 480 | { |
| 481 | | return (m_cassette)->input() < 0; |
| 481 | return m_cassette->input() < 0; |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | 484 | READ_LINE_MEMBER( tmc1800_state::ef3_r ) |
| 485 | 485 | { |
| 486 | | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 487 | | UINT8 data = ~ioport(keynames[m_keylatch / 8])->read(); |
| 488 | | |
| 489 | | return BIT(data, m_keylatch % 8); |
| 486 | return CLEAR_LINE; // TODO |
| 490 | 487 | } |
| 491 | 488 | |
| 492 | 489 | WRITE_LINE_MEMBER( tmc1800_state::q_w ) |
| r20582 | r20583 | |
| 514 | 511 | |
| 515 | 512 | READ_LINE_MEMBER( osc1000b_state::clear_r ) |
| 516 | 513 | { |
| 517 | | return BIT(ioport("RUN")->read(), 0); |
| 514 | return BIT(m_run->read(), 0); |
| 518 | 515 | } |
| 519 | 516 | |
| 520 | 517 | READ_LINE_MEMBER( osc1000b_state::ef2_r ) |
| 521 | 518 | { |
| 522 | | return (m_cassette)->input() < 0; |
| 519 | return m_cassette->input() < 0; |
| 523 | 520 | } |
| 524 | 521 | |
| 525 | 522 | READ_LINE_MEMBER( osc1000b_state::ef3_r ) |
| 526 | 523 | { |
| 527 | | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 528 | | UINT8 data = ~ioport(keynames[m_keylatch / 8])->read(); |
| 529 | | |
| 530 | | return BIT(data, m_keylatch % 8); |
| 524 | return CLEAR_LINE; // TODO |
| 531 | 525 | } |
| 532 | 526 | |
| 533 | 527 | WRITE_LINE_MEMBER( osc1000b_state::q_w ) |
| r20582 | r20583 | |
| 555 | 549 | |
| 556 | 550 | READ_LINE_MEMBER( tmc2000_state::clear_r ) |
| 557 | 551 | { |
| 558 | | return BIT(ioport("RUN")->read(), 0); |
| 552 | return BIT(m_run->read(), 0); |
| 559 | 553 | } |
| 560 | 554 | |
| 561 | 555 | READ_LINE_MEMBER( tmc2000_state::ef2_r ) |
| r20582 | r20583 | |
| 565 | 559 | |
| 566 | 560 | READ_LINE_MEMBER( tmc2000_state::ef3_r ) |
| 567 | 561 | { |
| 568 | | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 569 | | UINT8 data = ~ioport(keynames[m_keylatch / 8])->read(); |
| 562 | ioport_port *ports[] = { m_in0, m_in1, m_in2, m_in3, m_in4, m_in5, m_in6, m_in7 }; |
| 563 | UINT8 data = ~ports[m_keylatch / 8]->read(); |
| 570 | 564 | |
| 571 | 565 | return BIT(data, m_keylatch % 8); |
| 572 | 566 | } |
| r20582 | r20583 | |
| 611 | 605 | |
| 612 | 606 | READ_LINE_MEMBER( nano_state::clear_r ) |
| 613 | 607 | { |
| 614 | | int run = BIT(ioport("RUN")->read(), 0); |
| 615 | | int monitor = BIT(ioport("MONITOR")->read(), 0); |
| 608 | int run = BIT(m_run->read(), 0); |
| 609 | int monitor = BIT(m_monitor->read(), 0); |
| 616 | 610 | |
| 617 | | return run & monitor; |
| 611 | return run && monitor; |
| 618 | 612 | } |
| 619 | 613 | |
| 620 | 614 | READ_LINE_MEMBER( nano_state::ef2_r ) |
| 621 | 615 | { |
| 622 | | return (m_cassette)->input() < 0; |
| 616 | return m_cassette->input() < 0; |
| 623 | 617 | } |
| 624 | 618 | |
| 625 | 619 | READ_LINE_MEMBER( nano_state::ef3_r ) |
| 626 | 620 | { |
| 627 | | static const char *const keynames[] = { "IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7" }; |
| 628 | | UINT8 data = ~ioport(keynames[m_keylatch / 8])->read(); |
| 621 | UINT8 data = 0xff; |
| 629 | 622 | |
| 630 | | return BIT(data, m_keylatch % 8); |
| 623 | if (!BIT(m_keylatch, 3)) data &= m_ny0->read(); |
| 624 | if (!BIT(m_keylatch, 4)) data &= m_ny1->read(); |
| 625 | |
| 626 | return !BIT(data, m_keylatch & 0x07); |
| 631 | 627 | } |
| 632 | 628 | |
| 633 | 629 | WRITE_LINE_MEMBER( nano_state::q_w ) |
| r20582 | r20583 | |
| 692 | 688 | { |
| 693 | 689 | UINT16 addr; |
| 694 | 690 | |
| 695 | | m_colorram = auto_alloc_array(machine(), UINT8, TMC2000_COLORRAM_SIZE); |
| 691 | m_colorram.allocate(TMC2000_COLORRAM_SIZE); |
| 696 | 692 | |
| 697 | 693 | // randomize color RAM contents |
| 698 | 694 | for (addr = 0; addr < TMC2000_COLORRAM_SIZE; addr++) |
| r20582 | r20583 | |
| 701 | 697 | } |
| 702 | 698 | |
| 703 | 699 | // state saving |
| 704 | | save_pointer(NAME(m_colorram), TMC2000_COLORRAM_SIZE); |
| 705 | 700 | save_item(NAME(m_keylatch)); |
| 706 | 701 | save_item(NAME(m_rac)); |
| 707 | 702 | save_item(NAME(m_roc)); |
| r20582 | r20583 | |
| 746 | 741 | |
| 747 | 742 | /* enable ROM */ |
| 748 | 743 | address_space &program = m_maincpu->space(AS_PROGRAM); |
| 749 | | UINT8 *rom = memregion(CDP1802_TAG)->base(); |
| 744 | UINT8 *rom = m_rom->base(); |
| 750 | 745 | program.install_rom(0x0000, 0x01ff, 0, 0x7e00, rom); |
| 751 | 746 | } |
| 752 | 747 | |
| r20582 | r20583 | |
| 763 | 758 | |
| 764 | 759 | static QUICKLOAD_LOAD( tmc1800 ) |
| 765 | 760 | { |
| 766 | | UINT8 *ptr = image.device().machine().root_device().memregion(CDP1802_TAG)->base(); |
| 761 | tmc1800_state *state = image.device().machine().driver_data<tmc1800_state>(); |
| 762 | UINT8 *ptr = state->m_rom->base(); |
| 767 | 763 | int size = image.length(); |
| 768 | 764 | |
| 769 | | if (size > image.device().machine().device<ram_device>(RAM_TAG)->size()) |
| 765 | if (size > state->m_ram->size()) |
| 770 | 766 | { |
| 771 | 767 | return IMAGE_INIT_FAIL; |
| 772 | 768 | } |
trunk/src/mess/drivers/pc8001.c
| r20582 | r20583 | |
| 160 | 160 | static ADDRESS_MAP_START( pc8001_io, AS_IO, 8, pc8001_state ) |
| 161 | 161 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 162 | 162 | ADDRESS_MAP_UNMAP_HIGH |
| 163 | | AM_RANGE(0x00, 0x00) AM_READ_PORT("KEY0") |
| 164 | | AM_RANGE(0x01, 0x01) AM_READ_PORT("KEY1") |
| 165 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("KEY2") |
| 166 | | AM_RANGE(0x03, 0x03) AM_READ_PORT("KEY3") |
| 167 | | AM_RANGE(0x04, 0x04) AM_READ_PORT("KEY4") |
| 168 | | AM_RANGE(0x05, 0x05) AM_READ_PORT("KEY5") |
| 169 | | AM_RANGE(0x06, 0x06) AM_READ_PORT("KEY6") |
| 170 | | AM_RANGE(0x07, 0x07) AM_READ_PORT("KEY7") |
| 171 | | AM_RANGE(0x08, 0x08) AM_READ_PORT("KEY8") |
| 172 | | AM_RANGE(0x09, 0x09) AM_READ_PORT("KEY9") |
| 163 | AM_RANGE(0x00, 0x00) AM_READ_PORT("Y0") |
| 164 | AM_RANGE(0x01, 0x01) AM_READ_PORT("Y1") |
| 165 | AM_RANGE(0x02, 0x02) AM_READ_PORT("Y2") |
| 166 | AM_RANGE(0x03, 0x03) AM_READ_PORT("Y3") |
| 167 | AM_RANGE(0x04, 0x04) AM_READ_PORT("Y4") |
| 168 | AM_RANGE(0x05, 0x05) AM_READ_PORT("Y5") |
| 169 | AM_RANGE(0x06, 0x06) AM_READ_PORT("Y6") |
| 170 | AM_RANGE(0x07, 0x07) AM_READ_PORT("Y7") |
| 171 | AM_RANGE(0x08, 0x08) AM_READ_PORT("Y8") |
| 172 | AM_RANGE(0x09, 0x09) AM_READ_PORT("Y9") |
| 173 | 173 | AM_RANGE(0x10, 0x10) AM_MIRROR(0x0f) AM_WRITE(port10_w) |
| 174 | 174 | AM_RANGE(0x20, 0x20) AM_MIRROR(0x0e) AM_DEVREADWRITE(I8251_TAG, i8251_device, data_r, data_w) |
| 175 | 175 | AM_RANGE(0x21, 0x21) AM_MIRROR(0x0e) AM_DEVREADWRITE(I8251_TAG, i8251_device, status_r, control_w) |
| r20582 | r20583 | |
| 235 | 235 | /* Input Ports */ |
| 236 | 236 | |
| 237 | 237 | static INPUT_PORTS_START( pc8001 ) |
| 238 | | PORT_START("KEY0") |
| 238 | PORT_START("Y0") |
| 239 | 239 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) |
| 240 | 240 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) |
| 241 | 241 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) |
| r20582 | r20583 | |
| 245 | 245 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) |
| 246 | 246 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) |
| 247 | 247 | |
| 248 | | PORT_START("KEY1") |
| 248 | PORT_START("Y1") |
| 249 | 249 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) |
| 250 | 250 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) |
| 251 | 251 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) |
| r20582 | r20583 | |
| 255 | 255 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) |
| 256 | 256 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) |
| 257 | 257 | |
| 258 | | PORT_START("KEY2") |
| 258 | PORT_START("Y2") |
| 259 | 259 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') |
| 260 | 260 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 261 | 261 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| r20582 | r20583 | |
| 265 | 265 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 266 | 266 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 267 | 267 | |
| 268 | | PORT_START("KEY3") |
| 268 | PORT_START("Y3") |
| 269 | 269 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 270 | 270 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 271 | 271 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| r20582 | r20583 | |
| 275 | 275 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 276 | 276 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 277 | 277 | |
| 278 | | PORT_START("KEY4") |
| 278 | PORT_START("Y4") |
| 279 | 279 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 280 | 280 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 281 | 281 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| r20582 | r20583 | |
| 285 | 285 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 286 | 286 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 287 | 287 | |
| 288 | | PORT_START("KEY5") |
| 288 | PORT_START("Y5") |
| 289 | 289 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 290 | 290 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 291 | 291 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| r20582 | r20583 | |
| 295 | 295 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') |
| 296 | 296 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 297 | 297 | |
| 298 | | PORT_START("KEY6") |
| 298 | PORT_START("Y6") |
| 299 | 299 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 300 | 300 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 301 | 301 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| r20582 | r20583 | |
| 305 | 305 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 306 | 306 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 307 | 307 | |
| 308 | | PORT_START("KEY7") |
| 308 | PORT_START("Y7") |
| 309 | 309 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 310 | 310 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 311 | 311 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| r20582 | r20583 | |
| 315 | 315 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 316 | 316 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(" _") PORT_CODE(KEYCODE_DEL) PORT_CHAR(0) PORT_CHAR('_') |
| 317 | 317 | |
| 318 | | PORT_START("KEY8") |
| 318 | PORT_START("Y8") |
| 319 | 319 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Clr Home") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) |
| 320 | 320 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 321 | 321 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| r20582 | r20583 | |
| 325 | 325 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 326 | 326 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 327 | 327 | |
| 328 | | PORT_START("KEY9") |
| 328 | PORT_START("Y9") |
| 329 | 329 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Stop") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 330 | 330 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 331 | 331 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| r20582 | r20583 | |
| 338 | 338 | PORT_START("DSW1") |
| 339 | 339 | INPUT_PORTS_END |
| 340 | 340 | |
| 341 | | /* Video */ |
| 342 | | |
| 343 | | void pc8001_state::video_start() |
| 344 | | { |
| 345 | | // find memory regions |
| 346 | | m_char_rom = memregion("chargen")->base(); |
| 347 | | } |
| 348 | | |
| 349 | 341 | /* uPD3301 Interface */ |
| 350 | 342 | |
| 351 | 343 | static const rgb_t PALETTE[] = |
| r20582 | r20583 | |
| 364 | 356 | { |
| 365 | 357 | pc8001_state *state = device->machine().driver_data<pc8001_state>(); |
| 366 | 358 | |
| 367 | | UINT8 data = state->m_char_rom[(cc << 3) | lc]; |
| 359 | UINT8 data = state->m_char_rom->base()[(cc << 3) | lc]; |
| 368 | 360 | int i; |
| 369 | 361 | |
| 370 | 362 | if (lc >= 8) return; |
| r20582 | r20583 | |
| 503 | 495 | /* setup memory banking */ |
| 504 | 496 | UINT8 *ram = m_ram->pointer(); |
| 505 | 497 | |
| 506 | | membank("bank1")->configure_entry(1, memregion("n80")->base()); |
| 498 | membank("bank1")->configure_entry(1, m_rom->base()); |
| 507 | 499 | program.install_read_bank(0x0000, 0x5fff, "bank1"); |
| 508 | 500 | program.unmap_write(0x0000, 0x5fff); |
| 509 | 501 | |
| r20582 | r20583 | |
| 624 | 616 | /* ROMs */ |
| 625 | 617 | |
| 626 | 618 | ROM_START( pc8001 ) |
| 627 | | ROM_REGION( 0x6000, "n80", 0 ) |
| 619 | ROM_REGION( 0x6000, Z80_TAG, 0 ) |
| 628 | 620 | ROM_SYSTEM_BIOS( 0, "v101", "N-BASIC v1.01" ) |
| 629 | 621 | ROMX_LOAD( "n80v101.rom", 0x00000, 0x6000, CRC(a2cc9f22) SHA1(6d2d838de7fea20ddf6601660d0525d5b17bf8a3), ROM_BIOS(1) ) |
| 630 | 622 | ROM_SYSTEM_BIOS( 1, "v102", "N-BASIC v1.02" ) |
| r20582 | r20583 | |
| 632 | 624 | ROM_SYSTEM_BIOS( 2, "v110", "N-BASIC v1.10" ) |
| 633 | 625 | ROMX_LOAD( "n80v110.rom", 0x00000, 0x6000, CRC(1e02d93f) SHA1(4603cdb7a3833e7feb257b29d8052c872369e713), ROM_BIOS(3) ) |
| 634 | 626 | |
| 635 | | ROM_REGION( 0x800, "chargen", 0) |
| 627 | ROM_REGION( 0x800, UPD3301_TAG, 0) |
| 636 | 628 | ROM_LOAD( "font.rom", 0x000, 0x800, CRC(56653188) SHA1(84b90f69671d4b72e8f219e1fe7cd667e976cf7f) ) |
| 637 | 629 | ROM_END |
| 638 | 630 | |
| 639 | 631 | ROM_START( pc8001mk2 ) |
| 640 | | ROM_REGION( 0x8000, "n80", 0 ) |
| 632 | ROM_REGION( 0x8000, Z80_TAG, 0 ) |
| 641 | 633 | ROM_LOAD( "n80_2.rom", 0x00000, 0x8000, CRC(03cce7b6) SHA1(c12d34e42021110930fed45a8af98db52136f1fb) ) |
| 642 | 634 | |
| 643 | | ROM_REGION( 0x800, "chargen", 0) |
| 635 | ROM_REGION( 0x800, UPD3301_TAG, 0) |
| 644 | 636 | ROM_LOAD( "font.rom", 0x0000, 0x0800, CRC(56653188) SHA1(84b90f69671d4b72e8f219e1fe7cd667e976cf7f) ) |
| 645 | 637 | |
| 646 | 638 | ROM_REGION( 0x20000, "kanji", 0) |
trunk/src/mess/drivers/lc80.c
| r20582 | r20583 | |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | static INPUT_PORTS_START( lc80 ) |
| 83 | | PORT_START("ROW0") |
| 83 | PORT_START("Y0") |
| 84 | 84 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 85 | 85 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 86 | 86 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| r20582 | r20583 | |
| 88 | 88 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 89 | 89 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("-") PORT_CODE(KEYCODE_DOWN) PORT_CHAR('V') |
| 90 | 90 | |
| 91 | | PORT_START("ROW1") |
| 91 | PORT_START("Y1") |
| 92 | 92 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LD") PORT_CODE(KEYCODE_L) |
| 93 | 93 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 94 | 94 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("+") PORT_CODE(KEYCODE_UP) PORT_CHAR('^') |
| r20582 | r20583 | |
| 96 | 96 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 97 | 97 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 98 | 98 | |
| 99 | | PORT_START("ROW2") |
| 99 | PORT_START("Y2") |
| 100 | 100 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ST") PORT_CODE(KEYCODE_S) |
| 101 | 101 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 102 | 102 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| r20582 | r20583 | |
| 104 | 104 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 105 | 105 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DAT") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') |
| 106 | 106 | |
| 107 | | PORT_START("ROW3") |
| 107 | PORT_START("Y3") |
| 108 | 108 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("EX") PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 109 | 109 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 110 | 110 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| r20582 | r20583 | |
| 190 | 190 | |
| 191 | 191 | */ |
| 192 | 192 | |
| 193 | | return ((m_cassette)->input() < +0.0); |
| 193 | return (m_cassette->input() < +0.0); |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | WRITE8_MEMBER( lc80_state::pio1_pb_w ) |
| r20582 | r20583 | |
| 261 | 261 | { |
| 262 | 262 | if (!BIT(m_digit, i)) |
| 263 | 263 | { |
| 264 | | if (!BIT(ioport("ROW0")->read(), i)) data &= ~0x10; |
| 265 | | if (!BIT(ioport("ROW1")->read(), i)) data &= ~0x20; |
| 266 | | if (!BIT(ioport("ROW2")->read(), i)) data &= ~0x40; |
| 267 | | if (!BIT(ioport("ROW3")->read(), i)) data &= ~0x80; |
| 264 | if (!BIT(m_y0->read(), i)) data &= ~0x10; |
| 265 | if (!BIT(m_y1->read(), i)) data &= ~0x20; |
| 266 | if (!BIT(m_y2->read(), i)) data &= ~0x40; |
| 267 | if (!BIT(m_y3->read(), i)) data &= ~0x80; |
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | |
| r20582 | r20583 | |
| 299 | 299 | address_space &program = m_maincpu->space(AS_PROGRAM); |
| 300 | 300 | |
| 301 | 301 | /* setup memory banking */ |
| 302 | | membank("bank1")->configure_entry(0, memregion(Z80_TAG)->base()); // TODO |
| 303 | | membank("bank1")->configure_entry(1, memregion(Z80_TAG)->base()); |
| 302 | membank("bank1")->configure_entry(0, m_rom->base()); // TODO |
| 303 | membank("bank1")->configure_entry(1, m_rom->base()); |
| 304 | 304 | membank("bank1")->set_entry(1); |
| 305 | 305 | |
| 306 | | membank("bank2")->configure_entry(0, memregion(Z80_TAG)->base() + 0x800); // TODO |
| 307 | | membank("bank2")->configure_entry(1, memregion(Z80_TAG)->base() + 0x800); |
| 306 | membank("bank2")->configure_entry(0, m_rom->base() + 0x800); // TODO |
| 307 | membank("bank2")->configure_entry(1, m_rom->base() + 0x800); |
| 308 | 308 | membank("bank2")->set_entry(1); |
| 309 | 309 | |
| 310 | | membank("bank3")->configure_entry(0, memregion(Z80_TAG)->base() + 0x1000); // TODO |
| 311 | | membank("bank3")->configure_entry(1, memregion(Z80_TAG)->base() + 0x1000); |
| 310 | membank("bank3")->configure_entry(0, m_rom->base() + 0x1000); // TODO |
| 311 | membank("bank3")->configure_entry(1, m_rom->base() + 0x1000); |
| 312 | 312 | membank("bank3")->set_entry(1); |
| 313 | 313 | |
| 314 | | membank("bank4")->configure_entry(0, memregion(Z80_TAG)->base() + 0x2000); |
| 314 | membank("bank4")->configure_entry(0, m_rom->base() + 0x2000); |
| 315 | 315 | membank("bank4")->set_entry(0); |
| 316 | 316 | |
| 317 | 317 | program.install_readwrite_bank(0x0000, 0x07ff, "bank1"); |
trunk/src/mess/drivers/tek405x.c
| r20582 | r20583 | |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | |
| 26 | | #include "emu.h" |
| 27 | | #include "cpu/m6800/m6800.h" |
| 28 | | #include "machine/ram.h" |
| 29 | | #include "machine/6821pia.h" |
| 30 | | #include "machine/6850acia.h" |
| 31 | | #include "machine/ieee488.h" |
| 32 | | #include "sound/speaker.h" |
| 33 | | #include "video/vector.h" |
| 34 | 26 | #include "includes/tek405x.h" |
| 35 | 27 | |
| 36 | 28 | |
| r20582 | r20583 | |
| 123 | 115 | switch (lbs) |
| 124 | 116 | { |
| 125 | 117 | case LBS_RBC: |
| 126 | | program.install_rom(0x8800, 0xa7ff, memregion(MC6800_TAG)->base() + 0x800); |
| 118 | program.install_rom(0x8800, 0xa7ff, m_rom->base() + 0x800); |
| 127 | 119 | break; |
| 128 | 120 | |
| 129 | 121 | case LBS_BSOFL: |
| 130 | | program.install_rom(0x8800, 0xa7ff, memregion("020_0147_00")->base()); |
| 122 | program.install_rom(0x8800, 0xa7ff, m_bsofl_rom->base()); |
| 131 | 123 | break; |
| 132 | 124 | |
| 133 | 125 | case LBS_BSCOM: |
| 134 | | program.install_rom(0x8800, 0xa7ff, memregion("672_0799_08")->base()); |
| 126 | program.install_rom(0x8800, 0xa7ff, m_bscom_rom->base()); |
| 135 | 127 | break; |
| 136 | 128 | |
| 137 | 129 | default: |
| r20582 | r20583 | |
| 639 | 631 | */ |
| 640 | 632 | |
| 641 | 633 | UINT8 data = 0; |
| 642 | | UINT8 special = ioport("SPECIAL")->read(); |
| 634 | UINT8 special = m_special->read(); |
| 643 | 635 | |
| 644 | 636 | // keyboard column |
| 645 | 637 | data = m_kc; |
| r20582 | r20583 | |
| 668 | 660 | */ |
| 669 | 661 | |
| 670 | 662 | UINT8 data = 0; |
| 671 | | UINT8 special = ioport("SPECIAL")->read(); |
| 663 | UINT8 special = m_special->read(); |
| 672 | 664 | |
| 673 | 665 | // shift |
| 674 | 666 | data |= (BIT(special, 0) & BIT(special, 1)); |
| r20582 | r20583 | |
| 1242 | 1234 | MCFG_RAM_ADD(RAM_TAG) |
| 1243 | 1235 | MCFG_RAM_DEFAULT_SIZE("8K") |
| 1244 | 1236 | MCFG_RAM_EXTRA_OPTIONS("16K,24K,32K") |
| 1237 | |
| 1238 | // cartridge |
| 1239 | MCFG_CARTSLOT_ADD("cart1") |
| 1240 | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 1241 | MCFG_CARTSLOT_INTERFACE("tek4050_cart") |
| 1242 | |
| 1243 | MCFG_CARTSLOT_ADD("cart2") |
| 1244 | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 1245 | MCFG_CARTSLOT_INTERFACE("tek4050_cart") |
| 1245 | 1246 | MACHINE_CONFIG_END |
| 1246 | 1247 | |
| 1247 | 1248 | |
| r20582 | r20583 | |
| 1274 | 1275 | MCFG_RAM_ADD(RAM_TAG) |
| 1275 | 1276 | MCFG_RAM_DEFAULT_SIZE("32K") |
| 1276 | 1277 | MCFG_RAM_EXTRA_OPTIONS("64K") |
| 1278 | |
| 1279 | // cartridge |
| 1280 | MCFG_CARTSLOT_ADD("cart1") |
| 1281 | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 1282 | MCFG_CARTSLOT_INTERFACE("tek4050_cart") |
| 1283 | |
| 1284 | MCFG_CARTSLOT_ADD("cart2") |
| 1285 | MCFG_CARTSLOT_EXTENSION_LIST("bin") |
| 1286 | MCFG_CARTSLOT_INTERFACE("tek4050_cart") |
| 1287 | |
| 1288 | // software lists |
| 1289 | MCFG_SOFTWARE_LIST_ADD("cart_list", "tek4052_cart") |
| 1277 | 1290 | MACHINE_CONFIG_END |
| 1278 | 1291 | |
| 1279 | 1292 | |
| r20582 | r20583 | |
| 1328 | 1341 | ROM_LOAD( "156-0714-00.u121", 0x1000, 0x0800, NO_DUMP ) |
| 1329 | 1342 | ROM_LOAD( "156-0714-01.u121", 0x1000, 0x0800, NO_DUMP ) |
| 1330 | 1343 | ROM_LOAD( "156-0715-01.u131", 0x1800, 0x0800, NO_DUMP ) |
| 1331 | | |
| 1344 | /* |
| 1332 | 1345 | ROM_REGION( 0x2000, "4051r01", 0 ) // 4051R01 Matrix Functions |
| 1333 | 1346 | ROM_LOAD( "4051r01", 0x0000, 0x1000, NO_DUMP ) |
| 1334 | 1347 | |
| r20582 | r20583 | |
| 1338 | 1351 | |
| 1339 | 1352 | ROM_REGION( 0x2000, "4051r06", 0 ) // 4051R06 Editor |
| 1340 | 1353 | ROM_LOAD( "4051r06", 0x0000, 0x1000, NO_DUMP ) |
| 1354 | */ |
| 1341 | 1355 | ROM_END |
| 1342 | 1356 | |
| 1343 | 1357 | |
| r20582 | r20583 | |
| 1367 | 1381 | ROM_LOAD16_BYTE( "160-1702-00.u845", 0x10000, 0x2000, CRC(013344b1) SHA1(4a79654427e15d0fcedd9519914f6448938ecffd) ) |
| 1368 | 1382 | ROM_LOAD16_BYTE( "160-1685-00.u863", 0x10001, 0x2000, CRC(53ddc8f9) SHA1(431d6f329dedebb54232c623a924d5ecddc5e44e) ) |
| 1369 | 1383 | |
| 1370 | | ROM_REGION( 0x2000, "4052r06", 0 ) // 4052R06 Editor |
| 1371 | | ROM_LOAD( "160-1415 v2.0.u11", 0x0000, 0x1000, CRC(04cbc80d) SHA1(7bfb80fa099a794b18a7a5d7f8c2de4b36e245ec) ) |
| 1372 | | ROM_LOAD( "160-1414 v2.0.u1", 0x1000, 0x1000, CRC(675da652) SHA1(36a9677853e50a40195519dfdb6a3b3985438bc4) ) |
| 1384 | ROM_REGION( 0x2000, "020_0147_00", 0 ) // Firmware Backpack (020-0147-00) |
| 1385 | ROM_LOAD( "156-0747-xx.u101", 0x0000, 0x0800, CRC(9e1facc1) SHA1(7e7a118c3e8c49630f630ee02c3de843dd95d7e1) ) // -00 or -01 ? |
| 1386 | ROM_LOAD( "156-0748-xx.u201", 0x0800, 0x0800, CRC(be42bfbf) SHA1(23575b411bd9dcb7d7116628820096e3064ff93b) ) // -00 or -01 ? |
| 1373 | 1387 | |
| 1374 | | ROM_REGION( 0x2000, "4052r07", 0 ) // 4052R07 Signal Processing No. 1 |
| 1375 | | ROM_LOAD( "160-1416-00 v2.0.u1", 0x0000, 0x1000, CRC(537acdb2) SHA1(275e016eda327173095ae60ca79e72075c606954) ) |
| 1376 | | |
| 1377 | | ROM_REGION( 0x2000, "4052r08", 0 ) // 4052R08 Signal Processing No. 2 (FFT) |
| 1378 | | ROM_LOAD( "160-1418 v2.0.u11", 0x1000, 0x1000, CRC(f1c19044) SHA1(b1b86009980900f31eccf158dcc7036c7810b8f5) ) |
| 1379 | | ROM_LOAD( "160-1417 v2.0.u1", 0x0000, 0x1000, CRC(bee2e90f) SHA1(9f1a26aa98583678047fc532f5fdb3c8a468e617) ) |
| 1380 | | |
| 1381 | | ROM_REGION( 0x3000, "020_0478_01", 0 ) // 4052/4054 File Manager |
| 1382 | | ROM_LOAD( "160-1703-00 v3.0.u13", 0x0000, 0x1000, CRC(991c9f5f) SHA1(cce038f90edec6e551049c4411da8eeca6faeb4e) ) |
| 1383 | | ROM_LOAD( "160-1420-00 v3.0.u11", 0x1000, 0x1000, CRC(6545e073) SHA1(63a8d774a4b6f3640a833fd8be592a1baf124f7d) ) |
| 1384 | | ROM_LOAD( "160-1419-00 v3.0.u1", 0x2000, 0x1000, CRC(66d9d2d5) SHA1(e603ef1cacd6a20b975cf532f2e1978dcbee9789) ) |
| 1385 | | |
| 1386 | | ROM_REGION( 0x800, "720_dac", 0 ) // Transera 4052/4054 D/A Converter |
| 1387 | | ROM_LOAD( "transera.da", 0x0000, 0x0800, CRC(1c16e4da) SHA1(6d6ea0c5c68bab8e6a885b3cb05aa591f7754c56) ) |
| 1388 | ROM_REGION( 0x2000, "021_0188_00", 0 ) // Communications Backpack (021-0188-00) |
| 1389 | ROM_LOAD( "156-0712-00.u101", 0x0000, 0x0800, NO_DUMP ) |
| 1390 | ROM_LOAD( "156-0712-01.u101", 0x0000, 0x0800, NO_DUMP ) |
| 1391 | ROM_LOAD( "156-0713-00.u111", 0x0800, 0x0800, NO_DUMP ) |
| 1392 | ROM_LOAD( "156-0713-01.u111", 0x0800, 0x0800, NO_DUMP ) |
| 1393 | ROM_LOAD( "156-0714-00.u121", 0x1000, 0x0800, NO_DUMP ) |
| 1394 | ROM_LOAD( "156-0714-01.u121", 0x1000, 0x0800, NO_DUMP ) |
| 1395 | ROM_LOAD( "156-0715-01.u131", 0x1800, 0x0800, NO_DUMP ) |
| 1388 | 1396 | ROM_END |
| 1389 | 1397 | |
| 1390 | 1398 | |
trunk/src/mess/drivers/xerox820.c
| r20582 | r20583 | |
| 45 | 45 | if (bank) |
| 46 | 46 | { |
| 47 | 47 | /* ROM */ |
| 48 | | program.install_rom(0x0000, 0x0fff, memregion("monitor")->base()); |
| 48 | program.install_rom(0x0000, 0x0fff, m_rom->base()); |
| 49 | 49 | program.unmap_readwrite(0x1000, 0x1fff); |
| 50 | 50 | program.install_ram(0x3000, 0x3fff, m_video_ram); |
| 51 | 51 | } |
| r20582 | r20583 | |
| 64 | 64 | if (bank) |
| 65 | 65 | { |
| 66 | 66 | /* ROM */ |
| 67 | | program.install_rom(0x0000, 0x17ff, memregion("monitor")->base()); |
| 67 | program.install_rom(0x0000, 0x17ff, m_rom->base()); |
| 68 | 68 | program.unmap_readwrite(0x1800, 0x2fff); |
| 69 | 69 | program.install_ram(0x3000, 0x3fff, m_video_ram); |
| 70 | 70 | program.unmap_readwrite(0x4000, 0xbfff); |
| r20582 | r20583 | |
| 522 | 522 | |
| 523 | 523 | /* Video */ |
| 524 | 524 | |
| 525 | | void xerox820_state::video_start() |
| 526 | | { |
| 527 | | /* find memory regions */ |
| 528 | | m_char_rom = memregion("chargen")->base(); |
| 529 | | } |
| 530 | | |
| 531 | | |
| 532 | 525 | UINT32 xerox820_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |
| 533 | 526 | { |
| 534 | 527 | UINT8 y,ra,chr,gfx; |
| r20582 | r20583 | |
| 555 | 548 | chr |= 0x80; |
| 556 | 549 | |
| 557 | 550 | /* get pattern of pixels for that character scanline */ |
| 558 | | gfx = m_char_rom[(m_ncset2 << 10) | (chr<<3) | ra ]; |
| 551 | gfx = m_char_rom->base()[(m_ncset2 << 10) | (chr<<3) | ra ]; |
| 559 | 552 | } |
| 560 | 553 | else |
| 561 | 554 | gfx = 0xff; |
| r20582 | r20583 | |
| 787 | 780 | /* ROMs */ |
| 788 | 781 | |
| 789 | 782 | ROM_START( bigboard ) |
| 790 | | ROM_REGION( 0x1000, "monitor", 0 ) |
| 783 | ROM_REGION( 0x1000, Z80_TAG, 0 ) |
| 791 | 784 | ROM_LOAD( "bigboard.u67", 0x0000, 0x0800, CRC(5a85a228) SHA1(d51a2cbd0aae80315bda9530275aabfe8305364e)) |
| 792 | 785 | |
| 793 | 786 | ROM_REGION( 0x800, "chargen", 0 ) |
| r20582 | r20583 | |
| 797 | 790 | #define rom_mk82 rom_bigboard |
| 798 | 791 | |
| 799 | 792 | ROM_START( x820 ) |
| 800 | | ROM_REGION( 0x1000, "monitor", 0 ) |
| 793 | ROM_REGION( 0x1000, Z80_TAG, 0 ) |
| 801 | 794 | ROM_DEFAULT_BIOS( "v20" ) |
| 802 | 795 | ROM_SYSTEM_BIOS( 0, "v10", "Xerox Monitor v1.0" ) |
| 803 | 796 | ROMX_LOAD( "x820v10.u64", 0x0000, 0x0800, NO_DUMP, ROM_BIOS(1) ) |
| r20582 | r20583 | |
| 820 | 813 | ROM_END |
| 821 | 814 | |
| 822 | 815 | ROM_START( x820ii ) |
| 823 | | ROM_REGION( 0x1800, "monitor", 0 ) |
| 816 | ROM_REGION( 0x1800, Z80_TAG, 0 ) |
| 824 | 817 | ROM_DEFAULT_BIOS( "v404" ) |
| 825 | 818 | ROM_SYSTEM_BIOS( 0, "v404", "Balcones Operating System v4.04" ) |
| 826 | 819 | ROMX_LOAD( "537p3652.u33", 0x0000, 0x0800, CRC(7807cfbb) SHA1(bd3cc5cc5c59c84a50747aae5c17eb4617b0dbc3), ROM_BIOS(1) ) |
| r20582 | r20583 | |
| 836 | 829 | ROM_END |
| 837 | 830 | |
| 838 | 831 | ROM_START( x168 ) |
| 839 | | ROM_REGION( 0x1800, "monitor", 0 ) |
| 832 | ROM_REGION( 0x1800, Z80_TAG, 0 ) |
| 840 | 833 | ROM_DEFAULT_BIOS( "v404" ) |
| 841 | 834 | ROM_SYSTEM_BIOS( 0, "v404", "Balcones Operating System v4.04" ) |
| 842 | 835 | ROMX_LOAD( "537p3652.u33", 0x0000, 0x0800, CRC(7807cfbb) SHA1(bd3cc5cc5c59c84a50747aae5c17eb4617b0dbc3), ROM_BIOS(1) ) |
| r20582 | r20583 | |
| 855 | 848 | ROM_END |
| 856 | 849 | |
| 857 | 850 | ROM_START( mk83 ) |
| 858 | | ROM_REGION( 0x1000, "monitor", 0 ) |
| 851 | ROM_REGION( 0x1000, Z80_TAG, 0 ) |
| 859 | 852 | ROM_LOAD( "2732mk83.bin", 0x0000, 0x1000, CRC(a845c7e1) SHA1(3ccf629c5cd384953794ac4a1d2b45678bd40e92)) |
| 860 | 853 | ROM_REGION( 0x800, "chargen", 0 ) |
| 861 | 854 | ROM_LOAD( "2716mk83.bin", 0x0000, 0x0800, CRC(10bf0d81) SHA1(7ec73670a4d9d6421a5d6a4c4edc8b7c87923f6c)) |
trunk/src/mess/drivers/vixen.c
| r20582 | r20583 | |
| 291 | 291 | //------------------------------------------------- |
| 292 | 292 | |
| 293 | 293 | INPUT_PORTS_START( vixen ) |
| 294 | | PORT_START("ROW0") |
| 294 | PORT_START("Y0") |
| 295 | 295 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 296 | 296 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 297 | 297 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 301 | 301 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 302 | 302 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 303 | 303 | |
| 304 | | PORT_START("ROW1") |
| 304 | PORT_START("Y1") |
| 305 | 305 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 306 | 306 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 307 | 307 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 311 | 311 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 312 | 312 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 313 | 313 | |
| 314 | | PORT_START("ROW2") |
| 314 | PORT_START("Y2") |
| 315 | 315 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 316 | 316 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 317 | 317 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 321 | 321 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 322 | 322 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 323 | 323 | |
| 324 | | PORT_START("ROW3") |
| 324 | PORT_START("Y3") |
| 325 | 325 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 326 | 326 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 327 | 327 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 331 | 331 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 332 | 332 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 333 | 333 | |
| 334 | | PORT_START("ROW4") |
| 334 | PORT_START("Y4") |
| 335 | 335 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 336 | 336 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 337 | 337 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 341 | 341 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 342 | 342 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 343 | 343 | |
| 344 | | PORT_START("ROW5") |
| 344 | PORT_START("Y5") |
| 345 | 345 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 346 | 346 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 347 | 347 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 351 | 351 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 352 | 352 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 353 | 353 | |
| 354 | | PORT_START("ROW6") |
| 354 | PORT_START("Y6") |
| 355 | 355 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 356 | 356 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 357 | 357 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 361 | 361 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 362 | 362 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 363 | 363 | |
| 364 | | PORT_START("ROW7") |
| 364 | PORT_START("Y7") |
| 365 | 365 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 366 | 366 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 367 | 367 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 398 | 398 | |
| 399 | 399 | void vixen_state::video_start() |
| 400 | 400 | { |
| 401 | | // find memory regions |
| 402 | | m_sync_rom = memregion("video")->base(); |
| 403 | | m_char_rom = memregion("chargen")->base(); |
| 404 | | |
| 405 | 401 | // register for state saving |
| 406 | 402 | save_item(NAME(m_alt)); |
| 407 | 403 | save_item(NAME(m_256)); |
| 408 | 404 | save_item(NAME(m_vsync)); |
| 409 | | save_pointer(NAME(m_video_ram.target()), 0x1000); |
| 410 | 405 | } |
| 411 | 406 | |
| 412 | 407 | |
| r20582 | r20583 | |
| 423 | 418 | for (int chadr = 0; chadr < 128; chadr++) |
| 424 | 419 | { |
| 425 | 420 | UINT16 sync_addr = (txadr << 7) | chadr; |
| 426 | | UINT8 sync_data = m_sync_rom[sync_addr]; |
| 421 | UINT8 sync_data = m_sync_rom->base()[sync_addr]; |
| 427 | 422 | int blank = BIT(sync_data, 4); |
| 428 | 423 | /* |
| 429 | 424 | int clrchadr = BIT(sync_data, 7); |
| r20582 | r20583 | |
| 453 | 448 | reverse = BIT(video_data, 7); |
| 454 | 449 | } |
| 455 | 450 | |
| 456 | | UINT8 char_data = m_char_rom[char_addr]; |
| 451 | UINT8 char_data = m_char_rom->base()[char_addr]; |
| 457 | 452 | |
| 458 | 453 | for (int x = 0; x < 8; x++) |
| 459 | 454 | { |
| r20582 | r20583 | |
| 498 | 493 | { |
| 499 | 494 | UINT8 data = 0xff; |
| 500 | 495 | |
| 501 | | if (!BIT(m_col, 0)) data &= ioport("ROW0")->read(); |
| 502 | | if (!BIT(m_col, 1)) data &= ioport("ROW1")->read(); |
| 503 | | if (!BIT(m_col, 2)) data &= ioport("ROW2")->read(); |
| 504 | | if (!BIT(m_col, 3)) data &= ioport("ROW3")->read(); |
| 505 | | if (!BIT(m_col, 4)) data &= ioport("ROW4")->read(); |
| 506 | | if (!BIT(m_col, 5)) data &= ioport("ROW5")->read(); |
| 507 | | if (!BIT(m_col, 6)) data &= ioport("ROW6")->read(); |
| 508 | | if (!BIT(m_col, 7)) data &= ioport("ROW7")->read(); |
| 496 | if (!BIT(m_col, 0)) data &= m_y0->read(); |
| 497 | if (!BIT(m_col, 1)) data &= m_y1->read(); |
| 498 | if (!BIT(m_col, 2)) data &= m_y2->read(); |
| 499 | if (!BIT(m_col, 3)) data &= m_y3->read(); |
| 500 | if (!BIT(m_col, 4)) data &= m_y4->read(); |
| 501 | if (!BIT(m_col, 5)) data &= m_y5->read(); |
| 502 | if (!BIT(m_col, 6)) data &= m_y6->read(); |
| 503 | if (!BIT(m_col, 7)) data &= m_y7->read(); |
| 509 | 504 | |
| 510 | 505 | return data; |
| 511 | 506 | } |
| r20582 | r20583 | |
| 755 | 750 | UINT8 *ram = m_ram->pointer(); |
| 756 | 751 | |
| 757 | 752 | membank("bank1")->configure_entry(0, ram); |
| 758 | | membank("bank1")->configure_entry(1, memregion(Z8400A_TAG)->base()); |
| 753 | membank("bank1")->configure_entry(1, m_rom->base()); |
| 759 | 754 | |
| 760 | 755 | membank("bank2")->configure_entry(0, ram); |
| 761 | 756 | membank("bank2")->configure_entry(1, m_video_ram); |
| 762 | 757 | |
| 763 | 758 | membank("bank3")->configure_entry(0, m_video_ram); |
| 764 | | membank("bank3")->configure_entry(1, memregion(Z8400A_TAG)->base()); |
| 759 | membank("bank3")->configure_entry(1, m_rom->base()); |
| 765 | 760 | |
| 766 | 761 | membank("bank4")->configure_entry(0, m_video_ram); |
| 767 | 762 | |
| r20582 | r20583 | |
| 894 | 889 | m_reset = 0; |
| 895 | 890 | } |
| 896 | 891 | |
| 897 | | direct.explicit_configure(0xf000, 0xffff, 0xfff, machine().root_device().memregion(Z8400A_TAG)->base()); |
| 892 | direct.explicit_configure(0xf000, 0xffff, 0xfff, m_rom->base()); |
| 898 | 893 | |
| 899 | 894 | return ~0; |
| 900 | 895 | } |
| r20582 | r20583 | |
| 904 | 899 | |
| 905 | 900 | DRIVER_INIT_MEMBER(vixen_state,vixen) |
| 906 | 901 | { |
| 907 | | address_space &program = machine().device<cpu_device>(Z8400A_TAG)->space(AS_PROGRAM); |
| 908 | | program.set_direct_update_handler(direct_update_delegate(FUNC(vixen_state::vixen_direct_update_handler), this)); |
| 902 | m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(vixen_state::vixen_direct_update_handler), this)); |
| 909 | 903 | } |
| 910 | 904 | |
| 911 | 905 | |
trunk/src/mess/drivers/pc8401a.c
| r20582 | r20583 | |
| 37 | 37 | { |
| 38 | 38 | int row, strobe = 0; |
| 39 | 39 | |
| 40 | | static const char *const keynames[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6", "KEY7", "KEY8", "KEY9" }; |
| 40 | UINT8 keydata[10] = { m_y0->read(), m_y1->read(), m_y2->read(), m_y3->read(), m_y4->read(), m_y5->read(), m_y6->read(), m_y7->read(), m_y8->read(), m_y9->read() }; |
| 41 | 41 | |
| 42 | 42 | /* scan keyboard */ |
| 43 | 43 | for (row = 0; row < 10; row++) |
| 44 | 44 | { |
| 45 | | UINT8 data = ioport(keynames[row])->read(); |
| 45 | UINT8 data = keydata[row]; |
| 46 | 46 | |
| 47 | 47 | if (data != 0xff) |
| 48 | 48 | { |
| r20582 | r20583 | |
| 259 | 259 | |
| 260 | 260 | READ8_MEMBER( pc8401a_state::io_rom_data_r ) |
| 261 | 261 | { |
| 262 | | UINT8 *iorom = memregion("iorom")->base(); |
| 263 | | |
| 264 | 262 | //logerror("I/O ROM read from %05x\n", m_io_addr); |
| 265 | 263 | |
| 266 | | return iorom[m_io_addr]; |
| 264 | return m_io_rom->base()[m_io_addr]; |
| 267 | 265 | } |
| 268 | 266 | |
| 269 | 267 | WRITE8_MEMBER( pc8401a_state::io_rom_addr_w ) |
| r20582 | r20583 | |
| 343 | 341 | static ADDRESS_MAP_START( pc8500_io, AS_IO, 8, pc8401a_state ) |
| 344 | 342 | ADDRESS_MAP_UNMAP_HIGH |
| 345 | 343 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 346 | | AM_RANGE(0x00, 0x00) AM_READ_PORT("KEY0") |
| 347 | | AM_RANGE(0x01, 0x01) AM_READ_PORT("KEY1") |
| 348 | | AM_RANGE(0x02, 0x02) AM_READ_PORT("KEY2") |
| 349 | | AM_RANGE(0x03, 0x03) AM_READ_PORT("KEY3") |
| 350 | | AM_RANGE(0x04, 0x04) AM_READ_PORT("KEY4") |
| 351 | | AM_RANGE(0x05, 0x05) AM_READ_PORT("KEY5") |
| 352 | | AM_RANGE(0x06, 0x06) AM_READ_PORT("KEY6") |
| 353 | | AM_RANGE(0x07, 0x07) AM_READ_PORT("KEY7") |
| 354 | | AM_RANGE(0x08, 0x08) AM_READ_PORT("KEY8") |
| 355 | | AM_RANGE(0x09, 0x09) AM_READ_PORT("KEY9") |
| 344 | AM_RANGE(0x00, 0x00) AM_READ_PORT("Y0") |
| 345 | AM_RANGE(0x01, 0x01) AM_READ_PORT("Y1") |
| 346 | AM_RANGE(0x02, 0x02) AM_READ_PORT("Y2") |
| 347 | AM_RANGE(0x03, 0x03) AM_READ_PORT("Y3") |
| 348 | AM_RANGE(0x04, 0x04) AM_READ_PORT("Y4") |
| 349 | AM_RANGE(0x05, 0x05) AM_READ_PORT("Y5") |
| 350 | AM_RANGE(0x06, 0x06) AM_READ_PORT("Y6") |
| 351 | AM_RANGE(0x07, 0x07) AM_READ_PORT("Y7") |
| 352 | AM_RANGE(0x08, 0x08) AM_READ_PORT("Y8") |
| 353 | AM_RANGE(0x09, 0x09) AM_READ_PORT("Y9") |
| 356 | 354 | AM_RANGE(0x10, 0x10) AM_WRITE(rtc_cmd_w) |
| 357 | 355 | AM_RANGE(0x20, 0x20) AM_DEVREADWRITE(I8251_TAG, i8251_device, data_r, data_w) |
| 358 | 356 | AM_RANGE(0x21, 0x21) AM_DEVREADWRITE(I8251_TAG, i8251_device, status_r, control_w) |
| r20582 | r20583 | |
| 380 | 378 | /* Input Ports */ |
| 381 | 379 | |
| 382 | 380 | static INPUT_PORTS_START( pc8401a ) |
| 383 | | PORT_START("KEY0") |
| 381 | PORT_START("Y0") |
| 384 | 382 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("STOP")// PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 385 | 383 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 386 | 384 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| r20582 | r20583 | |
| 390 | 388 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 391 | 389 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) |
| 392 | 390 | |
| 393 | | PORT_START("KEY1") |
| 391 | PORT_START("Y1") |
| 394 | 392 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 395 | 393 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 396 | 394 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| r20582 | r20583 | |
| 400 | 398 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 401 | 399 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 402 | 400 | |
| 403 | | PORT_START("KEY2") |
| 401 | PORT_START("Y2") |
| 404 | 402 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 405 | 403 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 406 | 404 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| r20582 | r20583 | |
| 410 | 408 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 411 | 409 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 412 | 410 | |
| 413 | | PORT_START("KEY3") |
| 411 | PORT_START("Y3") |
| 414 | 412 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 415 | 413 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 416 | 414 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| r20582 | r20583 | |
| 420 | 418 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 421 | 419 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 422 | 420 | |
| 423 | | PORT_START("KEY4") |
| 421 | PORT_START("Y4") |
| 424 | 422 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('*') |
| 425 | 423 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('*') |
| 426 | 424 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('*') |
| r20582 | r20583 | |
| 430 | 428 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 431 | 429 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 432 | 430 | |
| 433 | | PORT_START("KEY5") |
| 431 | PORT_START("Y5") |
| 434 | 432 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('*') |
| 435 | 433 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('*') |
| 436 | 434 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('*') |
| r20582 | r20583 | |
| 440 | 438 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('*') |
| 441 | 439 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('*') |
| 442 | 440 | |
| 443 | | PORT_START("KEY6") |
| 441 | PORT_START("Y6") |
| 444 | 442 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('*') |
| 445 | 443 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('*') |
| 446 | 444 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('*') |
| r20582 | r20583 | |
| 450 | 448 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('*') |
| 451 | 449 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') |
| 452 | 450 | |
| 453 | | PORT_START("KEY7") |
| 451 | PORT_START("Y7") |
| 454 | 452 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 455 | 453 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) // ^I |
| 456 | 454 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) |
| r20582 | r20583 | |
| 460 | 458 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 461 | 459 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) // ^C |
| 462 | 460 | |
| 463 | | PORT_START("KEY8") |
| 461 | PORT_START("Y8") |
| 464 | 462 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 465 | 463 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) |
| 466 | 464 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) |
| r20582 | r20583 | |
| 470 | 468 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 471 | 469 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 472 | 470 | |
| 473 | | PORT_START("KEY9") |
| 471 | PORT_START("Y9") |
| 474 | 472 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) |
| 475 | 473 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) |
| 476 | 474 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) |
| r20582 | r20583 | |
| 489 | 487 | m_rtc->cs_w(1); |
| 490 | 488 | |
| 491 | 489 | /* allocate CRT video RAM */ |
| 492 | | m_crt_ram = auto_alloc_array(machine(), UINT8, PC8401A_CRT_VIDEORAM_SIZE); |
| 490 | m_crt_ram.allocate(PC8401A_CRT_VIDEORAM_SIZE); |
| 493 | 491 | |
| 494 | 492 | UINT8 *ram = m_ram->pointer(); |
| 495 | 493 | |
| 496 | 494 | /* set up A0/A1 memory banking */ |
| 497 | | membank("bank1")->configure_entries(0, 4, memregion(Z80_TAG)->base(), 0x8000); |
| 495 | membank("bank1")->configure_entries(0, 4, m_rom->base(), 0x8000); |
| 498 | 496 | membank("bank1")->configure_entries(4, 2, ram, 0x8000); |
| 499 | 497 | membank("bank1")->set_entry(0); |
| 500 | 498 | |
| r20582 | r20583 | |
| 515 | 513 | bankswitch(0); |
| 516 | 514 | |
| 517 | 515 | /* register for state saving */ |
| 518 | | save_pointer(NAME(m_crt_ram), PC8401A_CRT_VIDEORAM_SIZE); |
| 519 | 516 | save_item(NAME(m_mmr)); |
| 520 | 517 | save_item(NAME(m_io_addr)); |
| 521 | 518 | } |
trunk/src/mess/drivers/mc1000.c
| r20582 | r20583 | |
| 164 | 164 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) /* = '0' */ |
| 165 | 165 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 166 | 166 | |
| 167 | | PORT_START("ROW0") |
| 167 | PORT_START("Y0") |
| 168 | 168 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('@') |
| 169 | 169 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 170 | 170 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| r20582 | r20583 | |
| 173 | 173 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 174 | 174 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 175 | 175 | |
| 176 | | PORT_START("ROW1") |
| 176 | PORT_START("Y1") |
| 177 | 177 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 178 | 178 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 179 | 179 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| r20582 | r20583 | |
| 182 | 182 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 183 | 183 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 184 | 184 | |
| 185 | | PORT_START("ROW2") |
| 185 | PORT_START("Y2") |
| 186 | 186 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 187 | 187 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 188 | 188 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| r20582 | r20583 | |
| 191 | 191 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 192 | 192 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 193 | 193 | |
| 194 | | PORT_START("ROW3") |
| 194 | PORT_START("Y3") |
| 195 | 195 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 196 | 196 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 197 | 197 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| r20582 | r20583 | |
| 200 | 200 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 201 | 201 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 202 | 202 | |
| 203 | | PORT_START("ROW4") |
| 203 | PORT_START("Y4") |
| 204 | 204 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 205 | 205 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 206 | 206 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| r20582 | r20583 | |
| 209 | 209 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 210 | 210 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 211 | 211 | |
| 212 | | PORT_START("ROW5") |
| 212 | PORT_START("Y5") |
| 213 | 213 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| 214 | 214 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') |
| 215 | 215 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('U') |
| r20582 | r20583 | |
| 218 | 218 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 219 | 219 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 220 | 220 | |
| 221 | | PORT_START("ROW6") |
| 221 | PORT_START("Y6") |
| 222 | 222 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 223 | 223 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 224 | 224 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| r20582 | r20583 | |
| 227 | 227 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 228 | 228 | PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 229 | 229 | |
| 230 | | PORT_START("ROW7") |
| 230 | PORT_START("Y7") |
| 231 | 231 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 232 | 232 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 233 | 233 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| r20582 | r20583 | |
| 287 | 287 | |
| 288 | 288 | if (!BIT(m_keylatch, 0)) |
| 289 | 289 | { |
| 290 | | data &= ioport("ROW0")->read(); |
| 291 | | if (ioport("JOYBKEYMAP")->read()) data &= ioport("JOYB")->read(); |
| 290 | data &= m_y0->read(); |
| 291 | if (m_joybkeymap->read()) data &= m_joyb->read(); |
| 292 | 292 | } |
| 293 | 293 | if (!BIT(m_keylatch, 1)) |
| 294 | 294 | { |
| 295 | | data &= ioport("ROW1")->read(); |
| 296 | | if (ioport("JOYAKEYMAP")->read()) data &= ioport("JOYA")->read(); |
| 295 | data &= m_y1->read(); |
| 296 | if (m_joyakeymap->read()) data &= m_joya->read(); |
| 297 | 297 | } |
| 298 | | if (!BIT(m_keylatch, 2)) data &= ioport("ROW2")->read(); |
| 299 | | if (!BIT(m_keylatch, 3)) data &= ioport("ROW3")->read(); |
| 300 | | if (!BIT(m_keylatch, 4)) data &= ioport("ROW4")->read(); |
| 301 | | if (!BIT(m_keylatch, 5)) data &= ioport("ROW5")->read(); |
| 302 | | if (!BIT(m_keylatch, 6)) data &= ioport("ROW6")->read(); |
| 303 | | if (!BIT(m_keylatch, 7)) data &= ioport("ROW7")->read(); |
| 298 | if (!BIT(m_keylatch, 2)) data &= m_y2->read(); |
| 299 | if (!BIT(m_keylatch, 3)) data &= m_y3->read(); |
| 300 | if (!BIT(m_keylatch, 4)) data &= m_y4->read(); |
| 301 | if (!BIT(m_keylatch, 5)) data &= m_y5->read(); |
| 302 | if (!BIT(m_keylatch, 6)) data &= m_y6->read(); |
| 303 | if (!BIT(m_keylatch, 7)) data &= m_y7->read(); |
| 304 | 304 | |
| 305 | | data = (ioport("MODIFIERS")->read() & 0xc0) | (data & 0x3f); |
| 305 | data = (m_modifiers->read() & 0xc0) | (data & 0x3f); |
| 306 | 306 | |
| 307 | 307 | if (m_cassette->input() < +0.0) data &= 0x7f; |
| 308 | 308 | |
| r20582 | r20583 | |
| 326 | 326 | address_space &program = m_maincpu->space(AS_PROGRAM); |
| 327 | 327 | |
| 328 | 328 | /* setup memory banking */ |
| 329 | | UINT8 *rom = memregion(Z80_TAG)->base(); |
| 329 | UINT8 *rom = m_rom->base(); |
| 330 | 330 | |
| 331 | 331 | program.install_readwrite_bank(0x0000, 0x1fff, "bank1"); |
| 332 | 332 | membank("bank1")->configure_entry(0, rom); |
| r20582 | r20583 | |
| 496 | 496 | |
| 497 | 497 | DRIVER_INIT_MEMBER(mc1000_state,mc1000) |
| 498 | 498 | { |
| 499 | | machine().device(Z80_TAG)->memory().space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(mc1000_state::mc1000_direct_update_handler), this)); |
| 499 | m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(mc1000_state::mc1000_direct_update_handler), this)); |
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | /* System Drivers */ |
trunk/src/mess/drivers/atarist.c
| r20582 | r20583 | |
| 428 | 428 | |
| 429 | 429 | */ |
| 430 | 430 | |
| 431 | | UINT8 x = ioport("IKBD_MOUSEX")->read_safe(0x00); |
| 432 | | UINT8 y = ioport("IKBD_MOUSEY")->read_safe(0x00); |
| 431 | UINT8 x = m_mousex->read_safe(0x00); |
| 432 | UINT8 y = m_mousey->read_safe(0x00); |
| 433 | 433 | |
| 434 | 434 | if (m_ikbd_mouse_pc == 0) |
| 435 | 435 | { |
| r20582 | r20583 | |
| 509 | 509 | UINT8 data = 0xff; |
| 510 | 510 | |
| 511 | 511 | // keyboard data |
| 512 | | if (!BIT(m_ikbd_keylatch, 1)) data &= ioport("P31")->read(); |
| 513 | | if (!BIT(m_ikbd_keylatch, 2)) data &= ioport("P32")->read(); |
| 514 | | if (!BIT(m_ikbd_keylatch, 3)) data &= ioport("P33")->read(); |
| 515 | | if (!BIT(m_ikbd_keylatch, 4)) data &= ioport("P34")->read(); |
| 516 | | if (!BIT(m_ikbd_keylatch, 5)) data &= ioport("P35")->read(); |
| 517 | | if (!BIT(m_ikbd_keylatch, 6)) data &= ioport("P36")->read(); |
| 518 | | if (!BIT(m_ikbd_keylatch, 7)) data &= ioport("P37")->read(); |
| 519 | | if (!BIT(m_ikbd_keylatch, 8)) data &= ioport("P40")->read(); |
| 520 | | if (!BIT(m_ikbd_keylatch, 9)) data &= ioport("P41")->read(); |
| 521 | | if (!BIT(m_ikbd_keylatch, 10)) data &= ioport("P42")->read(); |
| 522 | | if (!BIT(m_ikbd_keylatch, 11)) data &= ioport("P43")->read(); |
| 523 | | if (!BIT(m_ikbd_keylatch, 12)) data &= ioport("P44")->read(); |
| 524 | | if (!BIT(m_ikbd_keylatch, 13)) data &= ioport("P45")->read(); |
| 525 | | if (!BIT(m_ikbd_keylatch, 14)) data &= ioport("P46")->read(); |
| 526 | | if (!BIT(m_ikbd_keylatch, 15)) data &= ioport("P47")->read(); |
| 512 | if (!BIT(m_ikbd_keylatch, 1)) data &= m_p31->read(); |
| 513 | if (!BIT(m_ikbd_keylatch, 2)) data &= m_p32->read(); |
| 514 | if (!BIT(m_ikbd_keylatch, 3)) data &= m_p33->read(); |
| 515 | if (!BIT(m_ikbd_keylatch, 4)) data &= m_p34->read(); |
| 516 | if (!BIT(m_ikbd_keylatch, 5)) data &= m_p35->read(); |
| 517 | if (!BIT(m_ikbd_keylatch, 6)) data &= m_p36->read(); |
| 518 | if (!BIT(m_ikbd_keylatch, 7)) data &= m_p37->read(); |
| 519 | if (!BIT(m_ikbd_keylatch, 8)) data &= m_p40->read(); |
| 520 | if (!BIT(m_ikbd_keylatch, 9)) data &= m_p41->read(); |
| 521 | if (!BIT(m_ikbd_keylatch, 10)) data &= m_p42->read(); |
| 522 | if (!BIT(m_ikbd_keylatch, 11)) data &= m_p43->read(); |
| 523 | if (!BIT(m_ikbd_keylatch, 12)) data &= m_p44->read(); |
| 524 | if (!BIT(m_ikbd_keylatch, 13)) data &= m_p45->read(); |
| 525 | if (!BIT(m_ikbd_keylatch, 14)) data &= m_p46->read(); |
| 526 | if (!BIT(m_ikbd_keylatch, 15)) data &= m_p47->read(); |
| 527 | 527 | |
| 528 | 528 | return data; |
| 529 | 529 | } |
| r20582 | r20583 | |
| 547 | 547 | |
| 548 | 548 | */ |
| 549 | 549 | |
| 550 | | UINT8 data = ioport("IKBD_JOY1")->read_safe(0xff) & 0x06; |
| 550 | UINT8 data = m_joy1->read_safe(0xff) & 0x06; |
| 551 | 551 | |
| 552 | 552 | // serial receive |
| 553 | 553 | data |= m_ikbd_tx << 3; |
| r20582 | r20583 | |
| 634 | 634 | |
| 635 | 635 | if (m_ikbd_joy) return 0xff; |
| 636 | 636 | |
| 637 | | UINT8 data = ioport("IKBD_JOY0")->read_safe(0xff); |
| 637 | UINT8 data = m_joy0->read_safe(0xff); |
| 638 | 638 | |
| 639 | | if ((ioport("config")->read() & 0x01) == 0) |
| 639 | if ((m_config->read() & 0x01) == 0) |
| 640 | 640 | { |
| 641 | 641 | data = (data & 0xf0) | m_ikbd_mouse; |
| 642 | 642 | } |
| r20582 | r20583 | |
| 726 | 726 | { |
| 727 | 727 | if (m_dmasnd_samples == 0) |
| 728 | 728 | { |
| 729 | | UINT8 *RAM = machine().device<ram_device>(RAM_TAG)->pointer(); |
| 729 | UINT8 *RAM = m_ram->pointer(); |
| 730 | 730 | |
| 731 | 731 | for (int i = 0; i < 8; i++) |
| 732 | 732 | { |
| r20582 | r20583 | |
| 1137 | 1137 | |
| 1138 | 1138 | */ |
| 1139 | 1139 | |
| 1140 | | return (ioport("SW400")->read() << 8) | 0xff; |
| 1140 | return (m_sw400->read() << 8) | 0xff; |
| 1141 | 1141 | } |
| 1142 | 1142 | |
| 1143 | 1143 | |
| r20582 | r20583 | |
| 1919 | 1919 | // ring indicator |
| 1920 | 1920 | |
| 1921 | 1921 | // monochrome monitor detect |
| 1922 | | data |= ioport("config")->read() & 0x80; |
| 1922 | data |= m_config->read() & 0x80; |
| 1923 | 1923 | |
| 1924 | 1924 | return data; |
| 1925 | 1925 | } |
| r20582 | r20583 | |
| 1989 | 1989 | // ring indicator |
| 1990 | 1990 | |
| 1991 | 1991 | // monochrome monitor detect, DMA sound active |
| 1992 | | data |= (ioport("config")->read() & 0x80) ^ (m_dmasnd_active << 7); |
| 1992 | data |= (m_config->read() & 0x80) ^ (m_dmasnd_active << 7); |
| 1993 | 1993 | |
| 1994 | 1994 | return data; |
| 1995 | 1995 | } |
trunk/src/mess/drivers/sg1000.c
| r20582 | r20583 | |
| 517 | 517 | |
| 518 | 518 | WRITE_LINE_MEMBER(sg1000_state::sg1000_vdp_interrupt) |
| 519 | 519 | { |
| 520 | | machine().device(Z80_TAG)->execute().set_input_line(INPUT_LINE_IRQ0, state); |
| 520 | m_maincpu->set_input_line(INPUT_LINE_IRQ0, state); |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | static TMS9928A_INTERFACE(sg1000_tms9918a_interface) |
| r20582 | r20583 | |
| 546 | 546 | PA7 Keyboard input |
| 547 | 547 | */ |
| 548 | 548 | |
| 549 | | static const char *const keynames[] = { "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7" }; |
| 549 | ioport_port *ports[8] = { m_pa0, m_pa1, m_pa2, m_pa3, m_pa4, m_pa5, m_pa6, m_pa7 }; |
| 550 | 550 | |
| 551 | | return ioport(keynames[m_keylatch])->read(); |
| 551 | return ports[m_keylatch]->read(); |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | READ8_MEMBER( sc3000_state::ppi_pb_r ) |
| r20582 | r20583 | |
| 566 | 566 | PB7 Cassette tape input |
| 567 | 567 | */ |
| 568 | 568 | |
| 569 | | static const char *const keynames[] = { "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7" }; |
| 569 | ioport_port *ports[8] = { m_pb0, m_pb1, m_pb2, m_pb3, m_pb4, m_pb5, m_pb6, m_pb7 }; |
| 570 | 570 | |
| 571 | 571 | /* keyboard */ |
| 572 | | UINT8 data = ioport(keynames[m_keylatch])->read(); |
| 572 | UINT8 data = ports[m_keylatch]->read(); |
| 573 | 573 | |
| 574 | 574 | /* cartridge contact */ |
| 575 | 575 | data |= 0x10; |
| r20582 | r20583 | |
| 578 | 578 | data |= 0x60; |
| 579 | 579 | |
| 580 | 580 | /* tape input */ |
| 581 | | if ((m_cassette)->input() > +0.0) data |= 0x80; |
| 581 | if (m_cassette->input() > +0.0) data |= 0x80; |
| 582 | 582 | |
| 583 | 583 | return data; |
| 584 | 584 | } |
| r20582 | r20583 | |
| 647 | 647 | case 40 * 1024: |
| 648 | 648 | program.install_read_bank(0x8000, 0x9fff, "bank1"); |
| 649 | 649 | program.unmap_write(0x8000, 0x9fff); |
| 650 | | membank("bank1")->configure_entry(0, memregion(Z80_TAG)->base() + 0x8000); |
| 650 | membank("bank1")->configure_entry(0, m_rom->base() + 0x8000); |
| 651 | 651 | membank("bank1")->set_entry(0); |
| 652 | 652 | break; |
| 653 | 653 | |
| 654 | 654 | case 48 * 1024: |
| 655 | 655 | program.install_read_bank(0x8000, 0xbfff, "bank1"); |
| 656 | 656 | program.unmap_write(0x8000, 0xbfff); |
| 657 | | membank("bank1")->configure_entry(0, memregion(Z80_TAG)->base() + 0x8000); |
| 657 | membank("bank1")->configure_entry(0, m_rom->base() + 0x8000); |
| 658 | 658 | membank("bank1")->set_entry(0); |
| 659 | 659 | break; |
| 660 | 660 | |
| r20582 | r20583 | |
| 682 | 682 | { |
| 683 | 683 | running_machine &machine = image.device().machine(); |
| 684 | 684 | sg1000_state *state = machine.driver_data<sg1000_state>(); |
| 685 | | address_space &program = machine.device(Z80_TAG)->memory().space(AS_PROGRAM); |
| 686 | | UINT8 *ptr = state->memregion(Z80_TAG)->base(); |
| 685 | address_space &program = state->m_maincpu->space(AS_PROGRAM); |
| 686 | UINT8 *ptr = state->m_rom->base(); |
| 687 | 687 | UINT32 ram_size = 0x400; |
| 688 | 688 | bool install_2000_ram = false; |
| 689 | 689 | UINT32 size; |
| r20582 | r20583 | |
| 797 | 797 | running_machine &machine = image.device().machine(); |
| 798 | 798 | sg1000_state *state = machine.driver_data<sg1000_state>(); |
| 799 | 799 | UINT32 size; |
| 800 | | UINT8 *ptr = state->memregion(Z80_TAG)->base(); |
| 800 | UINT8 *ptr = state->m_rom->base(); |
| 801 | 801 | |
| 802 | 802 | if (image.software_entry() == NULL) |
| 803 | 803 | { |
| r20582 | r20583 | |
| 853 | 853 | { |
| 854 | 854 | running_machine &machine = image.device().machine(); |
| 855 | 855 | sc3000_state *state = machine.driver_data<sc3000_state>(); |
| 856 | | UINT8 *ptr = state->memregion(Z80_TAG)->base(); |
| 856 | UINT8 *ptr = state->m_rom->base(); |
| 857 | 857 | UINT32 size; |
| 858 | 858 | |
| 859 | 859 | if (image.software_entry() == NULL) |
| r20582 | r20583 | |
| 986 | 986 | |
| 987 | 987 | TIMER_CALLBACK_MEMBER(sg1000_state::lightgun_tick) |
| 988 | 988 | { |
| 989 | | UINT8 *rom = machine().root_device().memregion(Z80_TAG)->base(); |
| 989 | UINT8 *rom = m_rom->base(); |
| 990 | 990 | |
| 991 | 991 | if (IS_CARTRIDGE_TV_DRAW(rom)) |
| 992 | 992 | { |
| r20582 | r20583 | |
| 1035 | 1035 | void sf7000_state::machine_start() |
| 1036 | 1036 | { |
| 1037 | 1037 | /* configure memory banking */ |
| 1038 | | membank("bank1")->configure_entry(0, memregion(Z80_TAG)->base()); |
| 1038 | membank("bank1")->configure_entry(0, m_rom->base()); |
| 1039 | 1039 | membank("bank1")->configure_entry(1, m_ram->pointer()); |
| 1040 | 1040 | membank("bank2")->configure_entry(0, m_ram->pointer()); |
| 1041 | 1041 | |
trunk/src/mess/drivers/crvision.c
| r20582 | r20583 | |
| 380 | 380 | -------------------------------------------------*/ |
| 381 | 381 | |
| 382 | 382 | static INPUT_PORTS_START( manager ) |
| 383 | | PORT_START("ROW0") |
| 383 | PORT_START("Y0") |
| 384 | 384 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 385 | 385 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 386 | 386 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| r20582 | r20583 | |
| 390 | 390 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') |
| 391 | 391 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') |
| 392 | 392 | |
| 393 | | PORT_START("ROW1") |
| 393 | PORT_START("Y1") |
| 394 | 394 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 395 | 395 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 396 | 396 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC3\x84 \xC3\xA4") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00C4) PORT_CHAR(0x00E4) |
| r20582 | r20583 | |
| 400 | 400 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') |
| 401 | 401 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z') |
| 402 | 402 | |
| 403 | | PORT_START("ROW2") |
| 403 | PORT_START("Y2") |
| 404 | 404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') |
| 405 | 405 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 406 | 406 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| r20582 | r20583 | |
| 410 | 410 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) |
| 411 | 411 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 412 | 412 | |
| 413 | | PORT_START("ROW3") |
| 413 | PORT_START("Y3") |
| 414 | 414 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') |
| 415 | 415 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') |
| 416 | 416 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC3\x96 \xC3\xB6") PORT_CODE(KEYCODE_COLON) PORT_CHAR(0x00D6) PORT_CHAR(0x00F6) |
| r20582 | r20583 | |
| 420 | 420 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') |
| 421 | 421 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') |
| 422 | 422 | |
| 423 | | PORT_START("ROW4") |
| 423 | PORT_START("Y4") |
| 424 | 424 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 425 | 425 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 426 | 426 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| r20582 | r20583 | |
| 430 | 430 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') |
| 431 | 431 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') |
| 432 | 432 | |
| 433 | | PORT_START("ROW5") |
| 433 | PORT_START("Y5") |
| 434 | 434 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') |
| 435 | 435 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 436 | 436 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') |
| r20582 | r20583 | |
| 440 | 440 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') |
| 441 | 441 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') |
| 442 | 442 | |
| 443 | | PORT_START("ROW6") |
| 443 | PORT_START("Y6") |
| 444 | 444 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 445 | 445 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') |
| 446 | 446 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') |
| r20582 | r20583 | |
| 450 | 450 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') |
| 451 | 451 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') |
| 452 | 452 | |
| 453 | | PORT_START("ROW7") |
| 453 | PORT_START("Y7") |
| 454 | 454 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') |
| 455 | 455 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') |
| 456 | 456 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| r20582 | r20583 | |
| 643 | 643 | |
| 644 | 644 | UINT8 data = 0xff; |
| 645 | 645 | |
| 646 | | if (!BIT(m_keylatch, 0)) data &= ioport("ROW0")->read(); |
| 647 | | if (!BIT(m_keylatch, 1)) data &= ioport("ROW1")->read(); |
| 648 | | if (!BIT(m_keylatch, 2)) data &= ioport("ROW2")->read(); |
| 649 | | if (!BIT(m_keylatch, 3)) data &= ioport("ROW3")->read(); |
| 650 | | if (!BIT(m_keylatch, 4)) data &= ioport("ROW4")->read(); |
| 651 | | if (!BIT(m_keylatch, 5)) data &= ioport("ROW5")->read(); |
| 652 | | if (!BIT(m_keylatch, 6)) data &= ioport("ROW6")->read(); |
| 653 | | if (!BIT(m_keylatch, 7)) data &= ioport("ROW7")->read(); |
| 646 | if (!BIT(m_keylatch, 0)) data &= m_y0->read(); |
| 647 | if (!BIT(m_keylatch, 1)) data &= m_y1->read(); |
| 648 | if (!BIT(m_keylatch, 2)) data &= m_y2->read(); |
| 649 | if (!BIT(m_keylatch, 3)) data &= m_y3->read(); |
| 650 | if (!BIT(m_keylatch, 4)) data &= m_y4->read(); |
| 651 | if (!BIT(m_keylatch, 5)) data &= m_y5->read(); |
| 652 | if (!BIT(m_keylatch, 6)) data &= m_y6->read(); |
| 653 | if (!BIT(m_keylatch, 7)) data &= m_y7->read(); |
| 654 | 654 | |
| 655 | 655 | return data; |
| 656 | 656 | } |
| r20582 | r20583 | |
| 675 | 675 | { |
| 676 | 676 | UINT8 data = 0xff; |
| 677 | 677 | |
| 678 | | if (!BIT(m_joylatch, 0)) data &= ioport("JOY0")->read(); |
| 679 | | if (!BIT(m_joylatch, 1)) data &= ioport("JOY1")->read(); |
| 680 | | if (!BIT(m_joylatch, 2)) data &= ioport("JOY2")->read(); |
| 681 | | if (!BIT(m_joylatch, 3)) data &= ioport("JOY3")->read(); |
| 678 | if (!BIT(m_joylatch, 0)) data &= m_joy0->read(); |
| 679 | if (!BIT(m_joylatch, 1)) data &= m_joy1->read(); |
| 680 | if (!BIT(m_joylatch, 2)) data &= m_joy2->read(); |
| 681 | if (!BIT(m_joylatch, 3)) data &= m_joy3->read(); |
| 682 | 682 | |
| 683 | 683 | return data; |
| 684 | 684 | } |
| r20582 | r20583 | |
| 776 | 776 | }; |
| 777 | 777 | |
| 778 | 778 | /*------------------------------------------------- |
| 779 | | floppy_interface lasr2001_floppy_interface |
| 780 | | -------------------------------------------------*/ |
| 781 | | |
| 782 | | static const floppy_interface lasr2001_floppy_interface = |
| 783 | | { |
| 784 | | DEVCB_NULL, |
| 785 | | DEVCB_NULL, |
| 786 | | DEVCB_NULL, |
| 787 | | DEVCB_NULL, |
| 788 | | DEVCB_NULL, |
| 789 | | FLOPPY_STANDARD_5_25_SSDD, |
| 790 | | LEGACY_FLOPPY_OPTIONS_NAME(default), |
| 791 | | NULL, |
| 792 | | NULL |
| 793 | | }; |
| 794 | | |
| 795 | | /*------------------------------------------------- |
| 796 | 779 | centronics_interface lasr2001_centronics_intf |
| 797 | 780 | -------------------------------------------------*/ |
| 798 | 781 | |
| r20582 | r20583 | |
| 853 | 836 | running_machine &machine = image.device().machine(); |
| 854 | 837 | crvision_state *state = machine.driver_data<crvision_state>(); |
| 855 | 838 | UINT8 *mem = state->memregion(M6502_TAG)->base(); |
| 856 | | address_space &program = machine.device(M6502_TAG)->memory().space(AS_PROGRAM); |
| 839 | address_space &program = state->m_maincpu->space(AS_PROGRAM); |
| 857 | 840 | |
| 858 | 841 | if (image.software_entry() == NULL) |
| 859 | 842 | { |
| r20582 | r20583 | |
| 945 | 928 | return IMAGE_INIT_FAIL; |
| 946 | 929 | } |
| 947 | 930 | |
| 948 | | state->membank("bank1")->configure_entry(0, mem + 0x8000); |
| 949 | | state->membank("bank1")->set_entry(0); |
| 931 | state->membank(BANK_ROM1)->configure_entry(0, mem + 0x8000); |
| 932 | state->membank(BANK_ROM1)->set_entry(0); |
| 950 | 933 | |
| 951 | | state->membank("bank2")->configure_entry(0, mem + 0x4000); |
| 952 | | state->membank("bank2")->set_entry(0); |
| 934 | state->membank(BANK_ROM2)->configure_entry(0, mem + 0x4000); |
| 935 | state->membank(BANK_ROM2)->set_entry(0); |
| 953 | 936 | |
| 954 | 937 | auto_free(machine, temp_copy); |
| 955 | 938 | |
| r20582 | r20583 | |
| 1033 | 1016 | // devices |
| 1034 | 1017 | MCFG_PIA6821_ADD(PIA6821_TAG, lasr2001_pia_intf) |
| 1035 | 1018 | MCFG_CASSETTE_ADD(CASSETTE_TAG, lasr2001_cassette_interface) |
| 1036 | | MCFG_LEGACY_FLOPPY_DRIVE_ADD(FLOPPY_0, lasr2001_floppy_interface) |
| 1037 | 1019 | MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, lasr2001_centronics_intf) |
| 1038 | 1020 | |
| 1039 | 1021 | // video hardware |
trunk/src/mess/drivers/newbrain.c
| r20582 | r20583 | |
| 87 | 87 | case 0: |
| 88 | 88 | /* ROM */ |
| 89 | 89 | memory_install_rom_helper(program, bank_name, bank_start, bank_end); |
| 90 | | membank(bank_name)->configure_entry(0, memregion("eim")->base() + eim_bank_start); |
| 90 | membank(bank_name)->configure_entry(0, m_eim_rom->base() + eim_bank_start); |
| 91 | 91 | break; |
| 92 | 92 | |
| 93 | 93 | case 2: |
| r20582 | r20583 | |
| 119 | 119 | { |
| 120 | 120 | /* all banks point to ROM at 0xe000 */ |
| 121 | 121 | memory_install_rom_helper(program, bank_name, bank_start, bank_end); |
| 122 | | membank(bank_name)->configure_entry(0, memregion(Z80_TAG)->base() + 0xe000); |
| 122 | membank(bank_name)->configure_entry(0, m_rom->base() + 0xe000); |
| 123 | 123 | } |
| 124 | 124 | else |
| 125 | 125 | { |
| 126 | | membank(bank_name)->configure_entry(0, memregion(Z80_TAG)->base() + bank_start); |
| 126 | membank(bank_name)->configure_entry(0, m_rom->base() + bank_start); |
| 127 | 127 | |
| 128 | 128 | if (bank < 5) |
| 129 | 129 | { |
| r20582 | r20583 | |
| 133 | 133 | else if (bank == 5) |
| 134 | 134 | { |
| 135 | 135 | /* 0x8000-0x9fff */ |
| 136 | | if (machine().root_device().memregion("eim")->base()) |
| 136 | if (m_eim_rom->base()) |
| 137 | 137 | { |
| 138 | 138 | /* expansion interface ROM */ |
| 139 | 139 | memory_install_rom_helper(program, bank_name, bank_start, bank_end); |
| 140 | | membank(bank_name)->configure_entry(0, memregion("eim")->base() + 0x4000); |
| 140 | membank(bank_name)->configure_entry(0, m_eim_rom->base() + 0x4000); |
| 141 | 141 | } |
| 142 | 142 | else |
| 143 | 143 | { |
| 144 | 144 | /* mirror of 0xa000-0xbfff */ |
| 145 | | if (machine().root_device().memregion(Z80_TAG)->base()[0xa001] == 0) |
| 145 | if (m_rom->base()[0xa001] == 0) |
| 146 | 146 | { |
| 147 | 147 | /* unmapped on the M model */ |
| 148 | 148 | memory_install_unmapped(program, bank_name, bank_start, bank_end); |
| r20582 | r20583 | |
| 153 | 153 | memory_install_rom_helper(program, bank_name, bank_start, bank_end); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | | membank(bank_name)->configure_entry(0, memregion(Z80_TAG)->base() + 0xa000); |
| 156 | membank(bank_name)->configure_entry(0, m_rom->base() + 0xa000); |
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | else if (bank == 6) |
| 160 | 160 | { |
| 161 | 161 | /* 0xa000-0xbfff */ |
| 162 | | if (machine().root_device().memregion(Z80_TAG)->base()[0xa001] == 0) |
| 162 | if (m_rom->base()[0xa001] == 0) |
| 163 | 163 | { |
| 164 | 164 | /* unmapped on the M model */ |
| 165 | 165 | memory_install_unmapped(program, bank_name, bank_start, bank_end); |
| r20582 | r20583 | |
| 443 | 443 | |
| 444 | 444 | */ |
| 445 | 445 | |
| 446 | | static const char *const keynames[] = { |
| 447 | | "D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7", |
| 448 | | "D8", "D9", "D10", "D11", "D12", "D13", "D14", "D15" |
| 449 | | }; |
| 446 | ioport_port* ports[16] = { m_y0, m_y1, m_y2, m_y3, m_y4, m_y5, m_y6, m_y7, |
| 447 | m_y8, m_y9, m_y10, m_y11, m_y12, m_y13, m_y14, m_y15 }; |
| 450 | 448 | |
| 451 | 449 | /* keyboard row reset */ |
| 452 | 450 | |
| r20582 | r20583 | |
| 473 | 471 | m_keylatch = 0; |
| 474 | 472 | } |
| 475 | 473 | |
| 476 | | m_keydata = ioport(keynames[m_keylatch])->read(); |
| 474 | m_keydata = ports[m_keylatch]->read(); |
| 477 | 475 | |
| 478 | 476 | output_set_digit_value(m_keylatch, m_segment_data[m_keylatch]); |
| 479 | 477 | } |
| r20582 | r20583 | |
| 1057 | 1055 | /* Input Ports */ |
| 1058 | 1056 | |
| 1059 | 1057 | static INPUT_PORTS_START( newbrain ) |
| 1060 | | PORT_START("D0") |
| 1058 | PORT_START("Y0") |
| 1061 | 1059 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1062 | 1060 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("STOP") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) |
| 1063 | 1061 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1064 | 1062 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1065 | 1063 | |
| 1066 | | PORT_START("D1") |
| 1064 | PORT_START("Y1") |
| 1067 | 1065 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 1068 | 1066 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 1069 | 1067 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 1070 | 1068 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 1071 | 1069 | |
| 1072 | | PORT_START("D2") |
| 1070 | PORT_START("Y2") |
| 1073 | 1071 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 1074 | 1072 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 1075 | 1073 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 1076 | 1074 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 1077 | 1075 | |
| 1078 | | PORT_START("D3") |
| 1076 | PORT_START("Y3") |
| 1079 | 1077 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 1080 | 1078 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 1081 | 1079 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 1082 | 1080 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 1083 | 1081 | |
| 1084 | | PORT_START("D4") |
| 1082 | PORT_START("Y4") |
| 1085 | 1083 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 1086 | 1084 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 1087 | 1085 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 1088 | 1086 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 1089 | 1087 | |
| 1090 | | PORT_START("D5") |
| 1088 | PORT_START("Y5") |
| 1091 | 1089 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 1092 | 1090 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('(') PORT_CHAR('[') |
| 1093 | 1091 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 1094 | 1092 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 1095 | 1093 | |
| 1096 | | PORT_START("D6") |
| 1094 | PORT_START("Y6") |
| 1097 | 1095 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 1098 | 1096 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(')') PORT_CHAR(']') |
| 1099 | 1097 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 1100 | 1098 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 1101 | 1099 | |
| 1102 | | PORT_START("D7") |
| 1100 | PORT_START("Y7") |
| 1103 | 1101 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') |
| 1104 | 1102 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("* \xC2\xA3") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('*') PORT_CHAR(0x00A3) |
| 1105 | 1103 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 1106 | 1104 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 1107 | 1105 | |
| 1108 | | PORT_START("D8") |
| 1106 | PORT_START("Y8") |
| 1109 | 1107 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| 1110 | 1108 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("VIDEO TEXT") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(RALT)) // Vd |
| 1111 | 1109 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 1112 | 1110 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| 1113 | 1111 | |
| 1114 | | PORT_START("D9") |
| 1112 | PORT_START("Y9") |
| 1115 | 1113 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 1116 | 1114 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 1117 | 1115 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') |
| 1118 | 1116 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 1119 | 1117 | |
| 1120 | | PORT_START("D10") |
| 1118 | PORT_START("Y10") |
| 1121 | 1119 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| 1122 | 1120 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('@') |
| 1123 | 1121 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 1124 | 1122 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 1125 | 1123 | |
| 1126 | | PORT_START("D11") |
| 1124 | PORT_START("Y11") |
| 1127 | 1125 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 1128 | 1126 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('-') PORT_CHAR('\\') |
| 1129 | 1127 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 1130 | 1128 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 1131 | 1129 | |
| 1132 | | PORT_START("D12") |
| 1130 | PORT_START("Y12") |
| 1133 | 1131 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 1134 | 1132 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('+') PORT_CHAR('^') |
| 1135 | 1133 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 1136 | 1134 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("INSERT") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 1137 | 1135 | |
| 1138 | | PORT_START("D13") |
| 1136 | PORT_START("Y13") |
| 1139 | 1137 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 1140 | 1138 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("NEW LINE") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) // NL |
| 1141 | 1139 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 1142 | 1140 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 1143 | 1141 | |
| 1144 | | PORT_START("D14") |
| 1142 | PORT_START("Y14") |
| 1145 | 1143 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 1146 | 1144 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 1147 | 1145 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 1148 | 1146 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HOME") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) // CH |
| 1149 | 1147 | |
| 1150 | | PORT_START("D15") |
| 1148 | PORT_START("Y15") |
| 1151 | 1149 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // SH |
| 1152 | 1150 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("GRAPHICS") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) // GR |
| 1153 | 1151 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("REPEAT") // RPT |
trunk/src/mess/drivers/kyocera.c
| r20582 | r20583 | |
| 65 | 65 | |
| 66 | 66 | /* Read/Write Handlers */ |
| 67 | 67 | |
| 68 | | static UINT8 read_keyboard(running_machine &machine, UINT16 keylatch) |
| 69 | | { |
| 70 | | UINT8 data = 0xff; |
| 71 | | |
| 72 | | if (!BIT(keylatch, 0)) data &= machine.root_device().ioport("KEY0")->read(); |
| 73 | | if (!BIT(keylatch, 1)) data &= machine.root_device().ioport("KEY1")->read(); |
| 74 | | if (!BIT(keylatch, 2)) data &= machine.root_device().ioport("KEY2")->read(); |
| 75 | | if (!BIT(keylatch, 3)) data &= machine.root_device().ioport("KEY3")->read(); |
| 76 | | if (!BIT(keylatch, 4)) data &= machine.root_device().ioport("KEY4")->read(); |
| 77 | | if (!BIT(keylatch, 5)) data &= machine.root_device().ioport("KEY5")->read(); |
| 78 | | if (!BIT(keylatch, 6)) data &= machine.root_device().ioport("KEY6")->read(); |
| 79 | | if (!BIT(keylatch, 7)) data &= machine.root_device().ioport("KEY7")->read(); |
| 80 | | if (!BIT(keylatch, 8)) data &= machine.root_device().ioport("KEY8")->read(); |
| 81 | | |
| 82 | | return data; |
| 83 | | } |
| 84 | | |
| 85 | 68 | READ8_MEMBER( pc8201_state::bank_r ) |
| 86 | 69 | { |
| 87 | 70 | /* |
| r20582 | r20583 | |
| 274 | 257 | data |= 0x20; |
| 275 | 258 | |
| 276 | 259 | // low power sensor |
| 277 | | data |= BIT(ioport("BATTERY")->read(), 0) << 7; |
| 260 | data |= BIT(m_battery->read(), 0) << 7; |
| 278 | 261 | |
| 279 | 262 | return data; |
| 280 | 263 | } |
| r20582 | r20583 | |
| 316 | 299 | data |= 0x20; |
| 317 | 300 | |
| 318 | 301 | // low power sensor |
| 319 | | data |= BIT(ioport("BATTERY")->read(), 0) << 7; |
| 302 | data |= BIT(m_battery->read(), 0) << 7; |
| 320 | 303 | |
| 321 | 304 | return data; |
| 322 | 305 | } |
| r20582 | r20583 | |
| 391 | 374 | |
| 392 | 375 | if (m_rom_sel) |
| 393 | 376 | { |
| 394 | | data = memregion("option")->base()[m_rom_addr & 0x1ffff]; |
| 377 | data = m_option->base()[m_rom_addr & 0x1ffff]; |
| 395 | 378 | } |
| 396 | 379 | |
| 397 | 380 | return data; |
| r20582 | r20583 | |
| 449 | 432 | |
| 450 | 433 | READ8_MEMBER( kc85_state::keyboard_r ) |
| 451 | 434 | { |
| 452 | | return read_keyboard(machine(), m_keylatch); |
| 435 | UINT8 data = 0xff; |
| 436 | |
| 437 | if (!BIT(m_keylatch, 0)) data &= m_y0->read(); |
| 438 | if (!BIT(m_keylatch, 1)) data &= m_y1->read(); |
| 439 | if (!BIT(m_keylatch, 2)) data &= m_y2->read(); |
| 440 | if (!BIT(m_keylatch, 3)) data &= m_y3->read(); |
| 441 | if (!BIT(m_keylatch, 4)) data &= m_y4->read(); |
| 442 | if (!BIT(m_keylatch, 5)) data &= m_y5->read(); |
| 443 | if (!BIT(m_keylatch, 6)) data &= m_y6->read(); |
| 444 | if (!BIT(m_keylatch, 7)) data &= m_y7->read(); |
| 445 | if (!BIT(m_keylatch, 8)) data &= m_y8->read(); |
| 446 | |
| 447 | return data; |
| 453 | 448 | } |
| 454 | 449 | |
| 455 | 450 | void tandy200_state::bankswitch(UINT8 data) |
| r20582 | r20583 | |
| 497 | 492 | |
| 498 | 493 | READ8_MEMBER( tandy200_state::stbk_r ) |
| 499 | 494 | { |
| 500 | | return read_keyboard(machine(), m_keylatch); |
| 495 | UINT8 data = 0xff; |
| 496 | |
| 497 | if (!BIT(m_keylatch, 0)) data &= m_y0->read(); |
| 498 | if (!BIT(m_keylatch, 1)) data &= m_y1->read(); |
| 499 | if (!BIT(m_keylatch, 2)) data &= m_y2->read(); |
| 500 | if (!BIT(m_keylatch, 3)) data &= m_y3->read(); |
| 501 | if (!BIT(m_keylatch, 4)) data &= m_y4->read(); |
| 502 | if (!BIT(m_keylatch, 5)) data &= m_y5->read(); |
| 503 | if (!BIT(m_keylatch, 6)) data &= m_y6->read(); |
| 504 | if (!BIT(m_keylatch, 7)) data &= m_y7->read(); |
| 505 | if (!BIT(m_keylatch, 8)) data &= m_y8->read(); |
| 506 | |
| 507 | return data; |
| 501 | 508 | } |
| 502 | 509 | |
| 503 | 510 | WRITE8_MEMBER( tandy200_state::stbk_w ) |
| r20582 | r20583 | |
| 627 | 634 | /* Input Ports */ |
| 628 | 635 | |
| 629 | 636 | static INPUT_PORTS_START( kc85 ) |
| 630 | | PORT_START("KEY0") |
| 637 | PORT_START("Y0") |
| 631 | 638 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 632 | 639 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 633 | 640 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| r20582 | r20583 | |
| 637 | 644 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') |
| 638 | 645 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| 639 | 646 | |
| 640 | | PORT_START("KEY1") |
| 647 | PORT_START("Y1") |
| 641 | 648 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 642 | 649 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 643 | 650 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| r20582 | r20583 | |
| 647 | 654 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 648 | 655 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 649 | 656 | |
| 650 | | PORT_START("KEY2") |
| 657 | PORT_START("Y2") |
| 651 | 658 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 652 | 659 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') |
| 653 | 660 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| r20582 | r20583 | |
| 657 | 664 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 658 | 665 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 659 | 666 | |
| 660 | | PORT_START("KEY3") |
| 667 | PORT_START("Y3") |
| 661 | 668 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 662 | 669 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 663 | 670 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| r20582 | r20583 | |
| 667 | 674 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 668 | 675 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| 669 | 676 | |
| 670 | | PORT_START("KEY4") |
| 677 | PORT_START("Y4") |
| 671 | 678 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') |
| 672 | 679 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') |
| 673 | 680 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') |
| r20582 | r20583 | |
| 677 | 684 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') |
| 678 | 685 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 679 | 686 | |
| 680 | | PORT_START("KEY5") |
| 687 | PORT_START("Y5") |
| 681 | 688 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 682 | 689 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 683 | 690 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| r20582 | r20583 | |
| 687 | 694 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') |
| 688 | 695 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') |
| 689 | 696 | |
| 690 | | PORT_START("KEY6") |
| 697 | PORT_START("Y6") |
| 691 | 698 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 692 | 699 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PRINT") PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) |
| 693 | 700 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LABEL") PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) |
| r20582 | r20583 | |
| 697 | 704 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DEL BKSP") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 698 | 705 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 699 | 706 | |
| 700 | | PORT_START("KEY7") |
| 707 | PORT_START("Y7") |
| 701 | 708 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) |
| 702 | 709 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) |
| 703 | 710 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) |
| r20582 | r20583 | |
| 707 | 714 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 708 | 715 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 709 | 716 | |
| 710 | | PORT_START("KEY8") |
| 717 | PORT_START("Y8") |
| 711 | 718 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PAUSE BREAK") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) |
| 712 | 719 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 713 | 720 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| r20582 | r20583 | |
| 726 | 733 | static INPUT_PORTS_START( pc8201a ) |
| 727 | 734 | PORT_INCLUDE( kc85 ) |
| 728 | 735 | |
| 729 | | PORT_MODIFY("KEY3") |
| 736 | PORT_MODIFY("Y3") |
| 730 | 737 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(']') PORT_CHAR('}') |
| 731 | 738 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 732 | 739 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| r20582 | r20583 | |
| 734 | 741 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('\\') PORT_CHAR('|') |
| 735 | 742 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('^') |
| 736 | 743 | |
| 737 | | PORT_MODIFY("KEY4") |
| 744 | PORT_MODIFY("Y4") |
| 738 | 745 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 739 | 746 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 740 | 747 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 741 | 748 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 742 | 749 | |
| 743 | | PORT_MODIFY("KEY5") |
| 750 | PORT_MODIFY("Y5") |
| 744 | 751 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PAST INS") PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) |
| 745 | 752 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 746 | 753 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RALT) PORT_CHAR('[') PORT_CHAR('{') |
| r20582 | r20583 | |
| 750 | 757 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') |
| 751 | 758 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 752 | 759 | |
| 753 | | PORT_MODIFY("KEY6") |
| 760 | PORT_MODIFY("Y6") |
| 754 | 761 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) |
| 755 | 762 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x92|") PORT_CODE(KEYCODE_TAB) |
| 756 | 763 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| r20582 | r20583 | |
| 759 | 766 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 760 | 767 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DEL BKSP") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 761 | 768 | |
| 762 | | PORT_MODIFY("KEY7") |
| 769 | PORT_MODIFY("Y7") |
| 763 | 770 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("STOP") PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) |
| 764 | 771 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 765 | 772 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r20582 | r20583 | |
| 769 | 776 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("f.2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 770 | 777 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("f.1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 771 | 778 | |
| 772 | | PORT_MODIFY("KEY8") |
| 779 | PORT_MODIFY("Y8") |
| 773 | 780 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 774 | 781 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 775 | 782 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) |
| r20582 | r20583 | |
| 778 | 785 | INPUT_PORTS_END |
| 779 | 786 | |
| 780 | 787 | static INPUT_PORTS_START( olivm10 ) |
| 781 | | PORT_START("KEY0") |
| 788 | PORT_START("Y0") |
| 782 | 789 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 783 | 790 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 784 | 791 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| r20582 | r20583 | |
| 788 | 795 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 789 | 796 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 790 | 797 | |
| 791 | | PORT_START("KEY1") |
| 798 | PORT_START("Y1") |
| 792 | 799 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') |
| 793 | 800 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 794 | 801 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('_') |
| r20582 | r20583 | |
| 798 | 805 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 799 | 806 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 800 | 807 | |
| 801 | | PORT_START("KEY2") |
| 808 | PORT_START("Y2") |
| 802 | 809 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 803 | 810 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 804 | 811 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| r20582 | r20583 | |
| 808 | 815 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') |
| 809 | 816 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') |
| 810 | 817 | |
| 811 | | PORT_START("KEY3") |
| 818 | PORT_START("Y3") |
| 812 | 819 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') |
| 813 | 820 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 814 | 821 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') |
| r20582 | r20583 | |
| 818 | 825 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('|') |
| 819 | 826 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 820 | 827 | |
| 821 | | PORT_START("KEY4") |
| 828 | PORT_START("Y4") |
| 822 | 829 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 823 | 830 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| 824 | 831 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| r20582 | r20583 | |
| 828 | 835 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 829 | 836 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| 830 | 837 | |
| 831 | | PORT_START("KEY5") |
| 838 | PORT_START("Y5") |
| 832 | 839 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 833 | 840 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 834 | 841 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') |
| r20582 | r20583 | |
| 838 | 845 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 839 | 846 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') |
| 840 | 847 | |
| 841 | | PORT_START("KEY6") |
| 848 | PORT_START("Y6") |
| 842 | 849 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PASTE") PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) |
| 843 | 850 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 844 | 851 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x92|") PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') |
| r20582 | r20583 | |
| 848 | 855 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 849 | 856 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 850 | 857 | |
| 851 | | PORT_START("KEY7") |
| 858 | PORT_START("Y7") |
| 852 | 859 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F8") PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) |
| 853 | 860 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) |
| 854 | 861 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) |
| r20582 | r20583 | |
| 858 | 865 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 859 | 866 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) |
| 860 | 867 | |
| 861 | | PORT_START("KEY8") |
| 868 | PORT_START("Y8") |
| 862 | 869 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("PAUSE BREAK") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) |
| 863 | 870 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_TOGGLE |
| 864 | 871 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("NUM") PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(RALT)) |
| r20582 | r20583 | |
| 1136 | 1143 | /* configure ROM banking */ |
| 1137 | 1144 | program.install_read_bank(0x0000, 0x7fff, "bank1"); |
| 1138 | 1145 | program.unmap_write(0x0000, 0x7fff); |
| 1139 | | membank("bank1")->configure_entry(0, memregion(I8085_TAG)->base()); |
| 1140 | | membank("bank1")->configure_entry(1, memregion("option")->base()); |
| 1146 | membank("bank1")->configure_entry(0, m_rom->base()); |
| 1147 | membank("bank1")->configure_entry(1, m_option->base()); |
| 1141 | 1148 | membank("bank1")->set_entry(0); |
| 1142 | 1149 | |
| 1143 | 1150 | /* configure RAM banking */ |
| r20582 | r20583 | |
| 1172 | 1179 | m_rtc->oe_w(1); |
| 1173 | 1180 | |
| 1174 | 1181 | /* configure ROM banking */ |
| 1175 | | membank("bank1")->configure_entry(0, memregion(I8085_TAG)->base()); |
| 1176 | | membank("bank1")->configure_entry(1, memregion("option")->base()); |
| 1182 | membank("bank1")->configure_entry(0, m_rom->base()); |
| 1183 | membank("bank1")->configure_entry(1, m_option->base()); |
| 1177 | 1184 | membank("bank1")->configure_entries(2, 2, ram + 0x8000, 0x8000); |
| 1178 | 1185 | membank("bank1")->set_entry(0); |
| 1179 | 1186 | |
| r20582 | r20583 | |
| 1203 | 1210 | /* configure ROM banking */ |
| 1204 | 1211 | program.install_read_bank(0x0000, 0x7fff, "bank1"); |
| 1205 | 1212 | program.unmap_write(0x0000, 0x7fff); |
| 1206 | | membank("bank1")->configure_entry(0, memregion(I8085_TAG)->base()); |
| 1207 | | membank("bank1")->configure_entry(1, memregion("option")->base()); |
| 1213 | membank("bank1")->configure_entry(0, m_rom->base()); |
| 1214 | membank("bank1")->configure_entry(1, m_option->base()); |
| 1208 | 1215 | membank("bank1")->set_entry(0); |
| 1209 | 1216 | |
| 1210 | 1217 | /* configure RAM banking */ |
| r20582 | r20583 | |
| 1243 | 1250 | void tandy200_state::machine_start() |
| 1244 | 1251 | { |
| 1245 | 1252 | /* configure ROM banking */ |
| 1246 | | membank("bank1")->configure_entry(0, memregion(I8085_TAG)->base()); |
| 1247 | | membank("bank1")->configure_entry(1, memregion(I8085_TAG)->base() + 0x10000); |
| 1248 | | membank("bank1")->configure_entry(2, memregion("option")->base()); |
| 1253 | membank("bank1")->configure_entry(0, m_rom->base()); |
| 1254 | membank("bank1")->configure_entry(1, m_rom->base() + 0x10000); |
| 1255 | membank("bank1")->configure_entry(2, m_option->base()); |
| 1249 | 1256 | membank("bank1")->set_entry(0); |
| 1250 | 1257 | |
| 1251 | 1258 | /* configure RAM banking */ |
trunk/src/mess/drivers/tiki100.c
| r20582 | r20583 | |
| 94 | 94 | |
| 95 | 95 | READ8_MEMBER( tiki100_state::keyboard_r ) |
| 96 | 96 | { |
| 97 | | static const char *const keynames[] = { "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9", "ROW10", "ROW11", "ROW12" }; |
| 98 | | UINT8 data = ioport(keynames[m_keylatch])->read(); |
| 97 | ioport_port *ports[12] = { m_y1, m_y2, m_y3, m_y4, m_y5, m_y6, m_y7, m_y8, m_y9, m_y10, m_y11, m_y12 }; |
| 98 | UINT8 data = ports[m_keylatch]->read(); |
| 99 | 99 | |
| 100 | 100 | m_keylatch++; |
| 101 | 101 | |
| r20582 | r20583 | |
| 251 | 251 | 12 | HJEM | H?YRE | 2 (num) | 3 (num) | ENTER | | | | |
| 252 | 252 | ----+---------+---------+---------+---------+---------+---------+---------+---------+ |
| 253 | 253 | */ |
| 254 | | PORT_START("ROW1") |
| 254 | PORT_START("Y1") |
| 255 | 255 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) |
| 256 | 256 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 257 | 257 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BRYTT") PORT_CODE(KEYCODE_ESC) |
| r20582 | r20583 | |
| 261 | 261 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SLETT") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 262 | 262 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 263 | 263 | |
| 264 | | PORT_START("ROW2") |
| 264 | PORT_START("Y2") |
| 265 | 265 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("GRAFIKK") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) |
| 266 | 266 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 267 | 267 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ANGRE") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) |
| r20582 | r20583 | |
| 271 | 271 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 272 | 272 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) |
| 273 | 273 | |
| 274 | | PORT_START("ROW3") |
| 274 | PORT_START("Y3") |
| 275 | 275 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 276 | 276 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') |
| 277 | 277 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') |
| r20582 | r20583 | |
| 281 | 281 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') |
| 282 | 282 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') |
| 283 | 283 | |
| 284 | | PORT_START("ROW4") |
| 284 | PORT_START("Y4") |
| 285 | 285 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 286 | 286 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') |
| 287 | 287 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') |
| r20582 | r20583 | |
| 291 | 291 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') |
| 292 | 292 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') |
| 293 | 293 | |
| 294 | | PORT_START("ROW5") |
| 294 | PORT_START("Y5") |
| 295 | 295 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 296 | 296 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') |
| 297 | 297 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') |
| r20582 | r20583 | |
| 301 | 301 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') |
| 302 | 302 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') |
| 303 | 303 | |
| 304 | | PORT_START("ROW6") |
| 304 | PORT_START("Y6") |
| 305 | 305 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 306 | 306 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') |
| 307 | 307 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') |
| r20582 | r20583 | |
| 311 | 311 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') |
| 312 | 312 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') |
| 313 | 313 | |
| 314 | | PORT_START("ROW7") |
| 314 | PORT_START("Y7") |
| 315 | 315 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') |
| 316 | 316 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') |
| 317 | 317 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC3\xB8 \xC3\x98") PORT_CODE(KEYCODE_COLON) PORT_CHAR(0x00f8) PORT_CHAR(0x00d8) |
| r20582 | r20583 | |
| 321 | 321 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC3\xA6 \xC3\x86") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00e6) PORT_CHAR(0x00c6) |
| 322 | 322 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HJELP") |
| 323 | 323 | |
| 324 | | PORT_START("ROW8") |
| 324 | PORT_START("Y8") |
| 325 | 325 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('@') PORT_CHAR('`') |
| 326 | 326 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('^') PORT_CHAR('|') |
| 327 | 327 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\'') PORT_CHAR('*') |
| r20582 | r20583 | |
| 331 | 331 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) |
| 332 | 332 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SIDEOPP") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(PGUP)) |
| 333 | 333 | |
| 334 | | PORT_START("ROW9") |
| 334 | PORT_START("Y9") |
| 335 | 335 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) |
| 336 | 336 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) |
| 337 | 337 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) |
| r20582 | r20583 | |
| 341 | 341 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("VTAB") |
| 342 | 342 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_DOWN) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 343 | 343 | |
| 344 | | PORT_START("ROW10") |
| 344 | PORT_START("Y10") |
| 345 | 345 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad +") PORT_CODE(KEYCODE_PLUS_PAD) |
| 346 | 346 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad -") PORT_CODE(KEYCODE_MINUS_PAD) |
| 347 | 347 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad *") PORT_CODE(KEYCODE_ASTERISK) |
| r20582 | r20583 | |
| 351 | 351 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad %") |
| 352 | 352 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad =") |
| 353 | 353 | |
| 354 | | PORT_START("ROW11") |
| 354 | PORT_START("Y11") |
| 355 | 355 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) |
| 356 | 356 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD) |
| 357 | 357 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) |
| r20582 | r20583 | |
| 361 | 361 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD) |
| 362 | 362 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 363 | 363 | |
| 364 | | PORT_START("ROW12") |
| 364 | PORT_START("Y12") |
| 365 | 365 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HJEM") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) |
| 366 | 366 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 367 | 367 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) |
| r20582 | r20583 | |
| 552 | 552 | /* setup memory banking */ |
| 553 | 553 | UINT8 *ram = m_ram->pointer(); |
| 554 | 554 | |
| 555 | | membank("bank1")->configure_entry(BANK_ROM, memregion(Z80_TAG)->base()); |
| 555 | membank("bank1")->configure_entry(BANK_ROM, m_rom->base()); |
| 556 | 556 | membank("bank1")->configure_entry(BANK_RAM, ram); |
| 557 | 557 | membank("bank1")->configure_entry(BANK_VIDEO_RAM, m_video_ram); |
| 558 | 558 | |
trunk/src/mess/drivers/c64.c
| r20582 | r20583 | |
| 8 | 8 | - IRQ (WRONG $DC0D) |
| 9 | 9 | - NMI (WRONG $DD0D) |
| 10 | 10 | - some CIA tests |
| 11 | | - 64C PLA dump |
| 11 | - PDC Clipper (C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer) |
| 12 | - Tesa 6240 (modified SX64 with label printer) |
| 12 | 13 | |
| 13 | 14 | */ |
| 14 | 15 | |
| r20582 | r20583 | |
| 121 | 122 | } |
| 122 | 123 | if (!basic) |
| 123 | 124 | { |
| 124 | | data = m_basic[offset & 0x1fff]; |
| 125 | if (m_basic != NULL) |
| 126 | { |
| 127 | data = m_basic->base()[offset & 0x1fff]; |
| 128 | } |
| 129 | else |
| 130 | { |
| 131 | data = m_kernal->base()[offset & 0x1fff]; |
| 132 | } |
| 125 | 133 | } |
| 126 | 134 | if (!kernal) |
| 127 | 135 | { |
| 128 | | data = m_kernal[offset & 0x1fff]; |
| 136 | if (m_basic != NULL) |
| 137 | { |
| 138 | data = m_kernal->base()[offset & 0x1fff]; |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | data = m_kernal->base()[0x2000 | (offset & 0x1fff)]; |
| 143 | } |
| 129 | 144 | } |
| 130 | 145 | if (!charom) |
| 131 | 146 | { |
| r20582 | r20583 | |
| 278 | 293 | offs_t va = offset; |
| 279 | 294 | |
| 280 | 295 | // A15/A14 are not connected to VIC so they are floating |
| 281 | | offset |= 0xc000; |
| 296 | //offset |= 0xc000; |
| 282 | 297 | |
| 283 | 298 | return read_memory(space, offset, va, aec, ba); |
| 284 | 299 | } |
| r20582 | r20583 | |
| 894 | 909 | m_cassette->motor_w(BIT(data, 5)); |
| 895 | 910 | } |
| 896 | 911 | |
| 912 | |
| 897 | 913 | //------------------------------------------------- |
| 898 | 914 | // M6510_INTERFACE( sx64_cpu_intf ) |
| 899 | 915 | //------------------------------------------------- |
| r20582 | r20583 | |
| 937 | 953 | m_charen = BIT(data, 2); |
| 938 | 954 | } |
| 939 | 955 | |
| 956 | |
| 940 | 957 | //------------------------------------------------- |
| 941 | 958 | // M6510_INTERFACE( c64gs_cpu_intf ) |
| 942 | 959 | //------------------------------------------------- |
| r20582 | r20583 | |
| 980 | 997 | m_charen = BIT(data, 2); |
| 981 | 998 | } |
| 982 | 999 | |
| 1000 | |
| 983 | 1001 | //------------------------------------------------- |
| 984 | 1002 | // PET_DATASSETTE_PORT_INTERFACE( datassette_intf ) |
| 985 | 1003 | //------------------------------------------------- |
| r20582 | r20583 | |
| 1101 | 1119 | |
| 1102 | 1120 | void c64_state::machine_start() |
| 1103 | 1121 | { |
| 1104 | | // find memory regions |
| 1105 | | m_basic = memregion("basic")->base(); |
| 1106 | | m_kernal = memregion("kernal")->base(); |
| 1107 | | |
| 1108 | 1122 | // allocate memory |
| 1109 | 1123 | m_color_ram.allocate(0x400); |
| 1110 | 1124 | |
| r20582 | r20583 | |
| 1135 | 1149 | |
| 1136 | 1150 | |
| 1137 | 1151 | //------------------------------------------------- |
| 1138 | | // MACHINE_START( c64c ) |
| 1139 | | //------------------------------------------------- |
| 1140 | | |
| 1141 | | void c64c_state::machine_start() |
| 1142 | | { |
| 1143 | | c64_state::machine_start(); |
| 1144 | | |
| 1145 | | // find memory regions |
| 1146 | | m_basic = memregion(M6510_TAG)->base(); |
| 1147 | | m_kernal = memregion(M6510_TAG)->base() + 0x2000; |
| 1148 | | } |
| 1149 | | |
| 1150 | | |
| 1151 | | //------------------------------------------------- |
| 1152 | | // MACHINE_START( c64gs ) |
| 1153 | | //------------------------------------------------- |
| 1154 | | |
| 1155 | | void c64gs_state::machine_start() |
| 1156 | | { |
| 1157 | | c64c_state::machine_start(); |
| 1158 | | } |
| 1159 | | |
| 1160 | | |
| 1161 | | //------------------------------------------------- |
| 1162 | 1152 | // MACHINE_RESET( c64 ) |
| 1163 | 1153 | //------------------------------------------------- |
| 1164 | 1154 | |
| r20582 | r20583 | |
| 1210 | 1200 | MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, datassette_intf, cbm_datassette_devices, "c1530", NULL) |
| 1211 | 1201 | MCFG_CBM_IEC_ADD(iec_intf, "c1541") |
| 1212 | 1202 | MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL, NULL) |
| 1213 | | MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL, NULL) |
| 1203 | MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy", NULL) |
| 1214 | 1204 | MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, VIC6567_CLOCK, expansion_intf, c64_expansion_cards, NULL, NULL) |
| 1215 | 1205 | MCFG_C64_USER_PORT_ADD(C64_USER_PORT_TAG, user_intf, c64_user_port_cards, NULL, NULL) |
| 1216 | 1206 | |
| r20582 | r20583 | |
| 1625 | 1615 | //------------------------------------------------- |
| 1626 | 1616 | |
| 1627 | 1617 | ROM_START( c64c ) |
| 1628 | | ROM_REGION( 0x4000, M6510_TAG, 0 ) |
| 1618 | ROM_REGION( 0x4000, "kernal", 0 ) |
| 1629 | 1619 | ROM_LOAD( "251913-01.u4", 0x0000, 0x4000, CRC(0010ec31) SHA1(765372a0e16cbb0adf23a07b80f6b682b39fbf88) ) |
| 1630 | 1620 | |
| 1631 | 1621 | ROM_REGION( 0x1000, "charom", 0 ) |
| r20582 | r20583 | |
| 1655 | 1645 | //------------------------------------------------- |
| 1656 | 1646 | |
| 1657 | 1647 | ROM_START( c64c_se ) |
| 1658 | | ROM_REGION( 0x4000, M6510_TAG, 0 ) |
| 1648 | ROM_REGION( 0x4000, "kernal", 0 ) |
| 1659 | 1649 | ROM_LOAD( "325182-01.u4", 0x0000, 0x4000, CRC(2aff27d3) SHA1(267654823c4fdf2167050f41faa118218d2569ce) ) // 128/64 FI |
| 1660 | 1650 | |
| 1661 | 1651 | ROM_REGION( 0x1000, "charom", 0 ) |
| r20582 | r20583 | |
| 1671 | 1661 | //------------------------------------------------- |
| 1672 | 1662 | |
| 1673 | 1663 | ROM_START( c64gs ) |
| 1674 | | ROM_REGION( 0x4000, M6510_TAG, 0 ) |
| 1664 | ROM_REGION( 0x4000, "kernal", 0 ) |
| 1675 | 1665 | ROM_LOAD( "390852-01.u4", 0x0000, 0x4000, CRC(b0a9c2da) SHA1(21940ef5f1bfe67d7537164f7ca130a1095b067a) ) |
| 1676 | 1666 | |
| 1677 | 1667 | ROM_REGION( 0x1000, "charom", 0 ) |
| r20582 | r20583 | |
| 1698 | 1688 | COMP( 1984, sx64p, c64, 0, pal_sx, c64, driver_device, 0, "Commodore Business Machines", "SX-64 / Executive 64 (PAL)", GAME_SUPPORTS_SAVE ) |
| 1699 | 1689 | COMP( 1984, vip64, c64, 0, pal_sx, c64sw, driver_device, 0, "Commodore Business Machines", "VIP-64 (Sweden/Finland)", GAME_SUPPORTS_SAVE ) |
| 1700 | 1690 | COMP( 1984, dx64, c64, 0, ntsc_dx, c64, driver_device, 0, "Commodore Business Machines", "DX-64 (NTSC)", GAME_SUPPORTS_SAVE ) |
| 1701 | | //COMP(1983, clipper, c64, 0, c64pal, clipper, XXX_CLASS, c64pal, "PDC", "Clipper", GAME_NOT_WORKING) // C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer |
| 1702 | | //COMP(1983, tesa6240, c64, 0, c64pal, c64, XXX_CLASS, c64pal, "Tesa", "6240", GAME_NOT_WORKING) // modified SX64 with label printer |
| 1703 | 1691 | COMP( 1986, c64c, c64, 0, ntsc_c, c64, driver_device, 0, "Commodore Business Machines", "Commodore 64C (NTSC)", GAME_SUPPORTS_SAVE ) |
| 1704 | 1692 | COMP( 1986, c64cp, c64, 0, pal_c, c64, driver_device, 0, "Commodore Business Machines", "Commodore 64C (PAL)", GAME_SUPPORTS_SAVE ) |
| 1705 | 1693 | COMP( 1986, c64c_se,c64, 0, pal_c, c64sw, driver_device, 0, "Commodore Business Machines", "Commodore 64C (Sweden/Finland)", GAME_SUPPORTS_SAVE ) |
trunk/src/mess/drivers/cosmicos.c
| r20582 | r20583 | |
| 79 | 79 | |
| 80 | 80 | READ8_MEMBER( cosmicos_state::hex_keyboard_r ) |
| 81 | 81 | { |
| 82 | | static const char *const keynames[] = { "ROW1", "ROW2", "ROW3", "ROW4" }; |
| 82 | ioport_port *ports[4] = { m_y1, m_y2, m_y3, m_y4 }; |
| 83 | 83 | UINT8 data = 0; |
| 84 | 84 | int i; |
| 85 | 85 | |
| r20582 | r20583 | |
| 87 | 87 | { |
| 88 | 88 | if (BIT(m_keylatch, i)) |
| 89 | 89 | { |
| 90 | | UINT8 keydata = ioport(keynames[i])->read(); |
| 90 | UINT8 keydata = ports[i]->read(); |
| 91 | 91 | |
| 92 | 92 | if (BIT(keydata, 0)) data |= 0x01; |
| 93 | 93 | if (BIT(keydata, 1)) data |= 0x02; |
| r20582 | r20583 | |
| 159 | 159 | |
| 160 | 160 | INPUT_CHANGED_MEMBER( cosmicos_state::data ) |
| 161 | 161 | { |
| 162 | | UINT8 data = ioport("DATA")->read(); |
| 162 | UINT8 data = m_io_data->read(); |
| 163 | 163 | int i; |
| 164 | 164 | |
| 165 | 165 | for (i = 0; i < 8; i++) |
| r20582 | r20583 | |
| 308 | 308 | PORT_BIT( 0x080, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_NAME("Memory Protect") PORT_CHANGED_MEMBER(DEVICE_SELF, cosmicos_state, memory_protect, 0) PORT_TOGGLE |
| 309 | 309 | PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_NAME("Memory Disable") PORT_CHANGED_MEMBER(DEVICE_SELF, cosmicos_state, memory_disable, 0) PORT_TOGGLE |
| 310 | 310 | |
| 311 | | PORT_START("ROW1") |
| 311 | PORT_START("Y1") |
| 312 | 312 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 313 | 313 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 314 | 314 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 315 | 315 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 316 | 316 | |
| 317 | | PORT_START("ROW2") |
| 317 | PORT_START("Y2") |
| 318 | 318 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 319 | 319 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 320 | 320 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 321 | 321 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 322 | 322 | |
| 323 | | PORT_START("ROW3") |
| 323 | PORT_START("Y3") |
| 324 | 324 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 325 | 325 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 326 | 326 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 327 | 327 | PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 328 | 328 | |
| 329 | | PORT_START("ROW4") |
| 329 | PORT_START("Y4") |
| 330 | 330 | PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 331 | 331 | PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 332 | 332 | PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| r20582 | r20583 | |
| 395 | 395 | |
| 396 | 396 | READ_LINE_MEMBER( cosmicos_state::ef1_r ) |
| 397 | 397 | { |
| 398 | | UINT8 special = ioport("SPECIAL")->read(); |
| 398 | UINT8 special = m_special->read(); |
| 399 | 399 | |
| 400 | 400 | return BIT(special, 0); |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | READ_LINE_MEMBER( cosmicos_state::ef2_r ) |
| 404 | 404 | { |
| 405 | | UINT8 special = ioport("SPECIAL")->read(); |
| 405 | UINT8 special = m_special->read(); |
| 406 | 406 | int casin = (m_cassette)->input() < 0.0; |
| 407 | 407 | |
| 408 | 408 | output_set_led_value(LED_CASSETTE, casin); |
| r20582 | r20583 | |
| 412 | 412 | |
| 413 | 413 | READ_LINE_MEMBER( cosmicos_state::ef3_r ) |
| 414 | 414 | { |
| 415 | | UINT8 special = ioport("SPECIAL")->read(); |
| 415 | UINT8 special = m_special->read(); |
| 416 | 416 | |
| 417 | 417 | return BIT(special, 2) | BIT(special, 3); |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | READ_LINE_MEMBER( cosmicos_state::ef4_r ) |
| 421 | 421 | { |
| 422 | | return BIT(ioport("BUTTONS")->read(), 0); |
| 422 | return BIT(m_buttons->read(), 0); |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | static COSMAC_SC_WRITE( cosmicos_sc_w ) |
| r20582 | r20583 | |
| 528 | 528 | |
| 529 | 529 | static QUICKLOAD_LOAD( cosmicos ) |
| 530 | 530 | { |
| 531 | | UINT8 *ptr = image.device().machine().root_device().memregion(CDP1802_TAG)->base(); |
| 531 | cosmicos_state *state = image.device().machine().driver_data<cosmicos_state>(); |
| 532 | UINT8 *ptr = state->m_rom->base(); |
| 532 | 533 | int size = image.length(); |
| 533 | 534 | |
| 534 | 535 | /* load image to RAM */ |
| r20582 | r20583 | |
| 609 | 610 | if (m_boot) |
| 610 | 611 | { |
| 611 | 612 | /* force A6 and A7 high */ |
| 612 | | direct.explicit_configure(0x0000, 0xffff, 0x3f3f, memregion(CDP1802_TAG)->base() + 0xc0); |
| 613 | direct.explicit_configure(0x0000, 0xffff, 0x3f3f, m_rom->base() + 0xc0); |
| 613 | 614 | return ~0; |
| 614 | 615 | } |
| 615 | 616 | |
| r20582 | r20583 | |
| 618 | 619 | |
| 619 | 620 | DRIVER_INIT_MEMBER(cosmicos_state,cosmicos) |
| 620 | 621 | { |
| 621 | | address_space &program = machine().device(CDP1802_TAG)->memory().space(AS_PROGRAM); |
| 622 | | |
| 623 | | program.set_direct_update_handler(direct_update_delegate(FUNC(cosmicos_state::cosmicos_direct_update_handler), this)); |
| 622 | m_maincpu->space(AS_PROGRAM).set_direct_update_handler(direct_update_delegate(FUNC(cosmicos_state::cosmicos_direct_update_handler), this)); |
| 624 | 623 | } |
| 625 | 624 | |
| 626 | 625 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |