src/mess/machine/ti85.c
| r4961 | r4962 | |
| 20 | 20 | { |
| 21 | 21 | TI_NOT_INITIALIZED, |
| 22 | 22 | TI_81, |
| 23 | TI_82, |
| 23 | 24 | TI_85, |
| 24 | 25 | TI_86 |
| 25 | 26 | }; |
| r4961 | r4962 | |
| 62 | 63 | static UINT8 ti85_red_out = 0x00; |
| 63 | 64 | static UINT8 ti85_white_out = 0x00; |
| 64 | 65 | |
| 66 | static UINT8 ti82_video_mode; |
| 67 | static UINT8 ti82_video_x; |
| 68 | static UINT8 ti82_video_y; |
| 69 | static UINT8 ti82_video_dir; |
| 70 | static UINT8 ti82_video_scroll; |
| 71 | static UINT8 ti82_video_bit; |
| 72 | static UINT8 ti82_video_col; |
| 73 | UINT8 ti82_video_buffer[0x300]; |
| 74 | |
| 65 | 75 | enum |
| 66 | 76 | { |
| 67 | 77 | TI85_SEND_STOP, |
| r4961 | r4962 | |
| 205 | 215 | memory_set_bankptr(machine, 2, mem + 0x014000); |
| 206 | 216 | } |
| 207 | 217 | |
| 218 | MACHINE_START( ti82 ) |
| 219 | { |
| 220 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 221 | UINT8 *mem = memory_region(machine, "maincpu"); |
| 222 | |
| 223 | ti85_timer_interrupt_mask = 0; |
| 224 | ti85_timer_interrupt_status = 0; |
| 225 | ti85_ON_interrupt_mask = 0; |
| 226 | ti85_ON_interrupt_status = 0; |
| 227 | ti85_ON_pressed = 0; |
| 228 | ti85_memory_page_0x4000 = 0; |
| 229 | ti85_LCD_status = 0; |
| 230 | ti85_LCD_mask = 0; |
| 231 | ti85_power_mode = 0; |
| 232 | ti85_keypad_mask = 0; |
| 233 | ti85_video_buffer_width = 0; |
| 234 | ti85_interrupt_speed = 0; |
| 235 | ti85_port4_bit0 = 0; |
| 236 | ti82_video_mode = 0; |
| 237 | ti82_video_x = 0; |
| 238 | ti82_video_y = 0; |
| 239 | ti82_video_dir = 0; |
| 240 | ti82_video_scroll = 0; |
| 241 | ti82_video_bit = 0; |
| 242 | ti82_video_col = 0; |
| 243 | memset(ti82_video_buffer, 0x00, 0x300); |
| 244 | |
| 245 | if (ti_calculator_model == TI_82) |
| 246 | memset(mem+0x8000, 0, sizeof(unsigned char)*0x8000); |
| 247 | |
| 248 | ti_calculator_model = TI_82; |
| 249 | |
| 250 | timer_pulse(machine, ATTOTIME_IN_HZ(200), NULL, 0, ti85_timer_callback); |
| 251 | |
| 252 | memory_install_write8_handler(space, 0x0000, 0x3fff, 0, 0, SMH_UNMAP); |
| 253 | memory_install_write8_handler(space, 0x4000, 0x7fff, 0, 0, SMH_UNMAP); |
| 254 | memory_set_bankptr(machine, 1, mem + 0x010000); |
| 255 | memory_set_bankptr(machine, 2, mem + 0x014000); |
| 256 | |
| 257 | add_reset_callback(machine, ti85_reset_serial); |
| 258 | add_exit_callback(machine, ti85_free_serial_data_memory); |
| 259 | } |
| 260 | |
| 208 | 261 | MACHINE_START( ti85 ) |
| 209 | 262 | { |
| 210 | 263 | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| r4961 | r4962 | |
| 360 | 413 | | ti85_PCR; |
| 361 | 414 | } |
| 362 | 415 | |
| 416 | READ8_HANDLER ( ti82_port_0002_r ) |
| 417 | { |
| 418 | return ti85_memory_page_0x4000; |
| 419 | } |
| 420 | |
| 421 | READ8_HANDLER ( ti82_port_0010_r ) |
| 422 | { |
| 423 | return 0x00; |
| 424 | } |
| 425 | |
| 426 | READ8_HANDLER ( ti82_port_0011_r ) |
| 427 | { |
| 428 | UINT8* ti82_video; |
| 429 | UINT8 ti82_port11; |
| 430 | |
| 431 | if(ti82_video_dir == 4) |
| 432 | ++ti82_video_y; |
| 433 | if(ti82_video_dir == 5) |
| 434 | --ti82_video_y; |
| 435 | if(ti82_video_dir == 6) |
| 436 | ++ti82_video_x; |
| 437 | if(ti82_video_dir == 7) |
| 438 | --ti82_video_x; |
| 439 | |
| 440 | if(ti82_video_mode) |
| 441 | ti82_port11 = ti82_video_buffer[(12*ti82_video_y)+ti82_video_x]; |
| 442 | else |
| 443 | { |
| 444 | ti82_video_col = ti82_video_x * 6; |
| 445 | ti82_video_bit = ti82_video_col & 7; |
| 446 | ti82_video = &ti82_video_buffer[(ti82_video_y*12)+(ti82_video_col>>3)]; |
| 447 | ti82_port11 = ((((*ti82_video)<<8)+ti82_video[1])>>(10-ti82_video_bit)); |
| 448 | } |
| 449 | |
| 450 | if(ti82_video_dir == 4) |
| 451 | ti82_video_y-=2; |
| 452 | if(ti82_video_dir == 5) |
| 453 | ti82_video_y+=2; |
| 454 | if(ti82_video_dir == 6) |
| 455 | ti82_video_x-=2; |
| 456 | if(ti82_video_dir == 7) |
| 457 | ti82_video_x+=2; |
| 458 | |
| 459 | ti82_video_x &= 15; |
| 460 | ti82_video_y &= 63; |
| 461 | |
| 462 | return ti82_port11; |
| 463 | } |
| 464 | |
| 363 | 465 | READ8_HANDLER ( ti86_port_0005_r ) |
| 364 | 466 | { |
| 365 | 467 | return ti85_memory_page_0x4000; |
| r4961 | r4962 | |
| 439 | 541 | update_ti86_memory(space->machine); |
| 440 | 542 | } |
| 441 | 543 | |
| 442 | | |
| 443 | | /* NVRAM functions */ |
| 444 | | NVRAM_HANDLER( ti81 ) |
| 544 | WRITE8_HANDLER ( ti82_port_0002_w ) |
| 445 | 545 | { |
| 446 | | UINT8 *mem = memory_region(machine, "maincpu"); |
| 546 | ti85_memory_page_0x4000 = (data & 0x07); |
| 547 | update_ti85_memory(space->machine); |
| 548 | } |
| 447 | 549 | |
| 448 | | if (read_or_write) |
| 449 | | mame_fwrite(file, mem+0x8000, sizeof(unsigned char)*0x8000); |
| 450 | | else |
| 451 | | { |
| 452 | | if (file) |
| 453 | | { |
| 454 | | mame_fread(file, mem+0x8000, sizeof(unsigned char)*0x8000); |
| 455 | | cpu_set_reg(cputag_get_cpu(machine, "maincpu"), Z80_PC,0x0239); |
| 456 | | } |
| 457 | | else |
| 458 | | memset(mem+0x8000, 0, sizeof(unsigned char)*0x8000); |
| 459 | | } |
| 550 | WRITE8_HANDLER ( ti82_port_0010_w) |
| 551 | { |
| 552 | if (data == 0x00 || data == 0x01) |
| 553 | ti82_video_mode = data; |
| 554 | if (data >= 0x04 && data <= 0x07) |
| 555 | ti82_video_dir = data; |
| 556 | if (data >= 0x20 && data <= 0x30) |
| 557 | ti82_video_x = data - 0x20; |
| 558 | if (data >= 0x40 && data <= 0x7F) |
| 559 | ti82_video_scroll = data - 0x40; |
| 560 | if (data >= 0x80 && data <= 0xBF) |
| 561 | ti82_video_y = data - 0x80; |
| 562 | if (data >= 0xD8) |
| 563 | ti85_LCD_contrast = data - 0xD8; |
| 460 | 564 | } |
| 461 | 565 | |
| 462 | | NVRAM_HANDLER( ti85 ) |
| 566 | WRITE8_HANDLER ( ti82_port_0011_w ) |
| 463 | 567 | { |
| 464 | | UINT8 *mem = memory_region(machine, "maincpu"); |
| 465 | | |
| 466 | | if (read_or_write) |
| 467 | | mame_fwrite(file, mem+0x8000, sizeof(unsigned char)*0x8000); |
| 568 | UINT8* ti82_video; |
| 569 | |
| 570 | if(ti82_video_mode) |
| 571 | ti82_video_buffer[(12*ti82_video_y)+ti82_video_x] = data; |
| 468 | 572 | else |
| 469 | 573 | { |
| 470 | | if (file) |
| 471 | | { |
| 472 | | mame_fread(file, mem+0x8000, sizeof(unsigned char)*0x8000); |
| 473 | | cpu_set_reg(cputag_get_cpu(machine, "maincpu"), Z80_PC,0x0b5f); |
| 474 | | } |
| 475 | | else |
| 476 | | memset(mem+0x8000, 0, sizeof(unsigned char)*0x8000); |
| 574 | data = data<<0x02; |
| 575 | ti82_video_col = ti82_video_x * 6; |
| 576 | ti82_video_bit = ti82_video_col & 0x07; |
| 577 | ti82_video = &ti82_video_buffer[(ti82_video_y*12)+(ti82_video_col>>3)]; |
| 578 | *ti82_video = (*ti82_video & ~(0xFC>>ti82_video_bit)) | (data>>ti82_video_bit); |
| 579 | if(ti82_video_bit>0x02) |
| 580 | ti82_video[1] = (ti82_video[1] & ~(0xFC<<(8-ti82_video_bit))) | (data<<(8-ti82_video_bit)); |
| 477 | 581 | } |
| 582 | |
| 583 | if(ti82_video_dir == 0x04) |
| 584 | --ti82_video_y; |
| 585 | if(ti82_video_dir == 0x05) |
| 586 | ++ti82_video_y; |
| 587 | if(ti82_video_dir == 0x06) |
| 588 | --ti82_video_x; |
| 589 | if(ti82_video_dir == 0x07) |
| 590 | ++ti82_video_x; |
| 591 | |
| 592 | ti82_video_x &= 15; |
| 593 | ti82_video_y &= 63; |
| 478 | 594 | } |
| 479 | 595 | |
| 596 | /* NVRAM functions */ |
| 480 | 597 | NVRAM_HANDLER( ti86 ) |
| 481 | 598 | { |
| 482 | 599 | if (read_or_write) |
src/mess/drivers/ti85.c
| r4961 | r4962 | |
| 80 | 80 | 0000-7fff ROM |
| 81 | 81 | 8000-ffff RAM (?) |
| 82 | 82 | |
| 83 | TI-82 memory map |
| 84 | |
| 85 | CPU: Z80 6MHz |
| 86 | 0000-3fff ROM 0 |
| 87 | 4000-7fff ROM 1-7 (switched) |
| 88 | 8000-ffff RAM |
| 89 | |
| 83 | 90 | TI-85 memory map |
| 84 | 91 | |
| 85 | 92 | CPU: Z80 6MHz |
| r4961 | r4962 | |
| 110 | 117 | 6: |
| 111 | 118 | 7: ? |
| 112 | 119 | |
| 120 | TI-82 ports: |
| 121 | 0: Video buffer offset (write only) |
| 122 | 1: Keypad |
| 123 | 2: Memory page |
| 124 | 3: ON status, LCD power |
| 125 | 4: Video buffer width, interrupt control (write only) |
| 126 | 10: Controll port for the display controller |
| 127 | 11: Data port for the display controller |
| 128 | |
| 113 | 129 | TI-85 ports: |
| 114 | 130 | 0: Video buffer offset (write only) |
| 115 | 131 | 1: Keypad |
| r4961 | r4962 | |
| 163 | 179 | AM_RANGE(0x0007, 0x0007) AM_READWRITE( ti85_port_0007_r, ti85_port_0007_w ) |
| 164 | 180 | ADDRESS_MAP_END |
| 165 | 181 | |
| 182 | static ADDRESS_MAP_START( ti82_io, ADDRESS_SPACE_IO, 8) |
| 183 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 184 | AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w ) |
| 185 | AM_RANGE(0x0001, 0x0001) AM_READWRITE( ti85_port_0001_r, ti85_port_0001_w ) |
| 186 | AM_RANGE(0x0002, 0x0002) AM_READWRITE( ti82_port_0002_r, ti82_port_0002_w ) |
| 187 | AM_RANGE(0x0003, 0x0003) AM_READWRITE( ti85_port_0003_r, ti85_port_0003_w ) |
| 188 | AM_RANGE(0x0004, 0x0004) AM_READWRITE( ti85_port_0004_r, ti85_port_0004_w ) |
| 189 | AM_RANGE(0x0010, 0x0010) AM_READWRITE( ti82_port_0010_r, ti82_port_0010_w ) |
| 190 | AM_RANGE(0x0011, 0x0011) AM_READWRITE( ti82_port_0011_r, ti82_port_0011_w ) |
| 191 | ADDRESS_MAP_END |
| 192 | |
| 166 | 193 | static ADDRESS_MAP_START( ti86_io, ADDRESS_SPACE_IO, 8) |
| 167 | 194 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 168 | 195 | AM_RANGE(0x0000, 0x0000) AM_READWRITE( ti85_port_0000_r, ti85_port_0000_w ) |
| r4961 | r4962 | |
| 180 | 207 | static ADDRESS_MAP_START( ti81_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 181 | 208 | AM_RANGE(0x0000, 0x3fff) AM_READWRITE( SMH_BANK(1), SMH_BANK(3) ) |
| 182 | 209 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE( SMH_BANK(2), SMH_BANK(4) ) |
| 183 | | AM_RANGE(0x8000, 0xffff) AM_RAM |
| 210 | AM_RANGE(0x8000, 0xffff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 184 | 211 | ADDRESS_MAP_END |
| 185 | 212 | |
| 186 | 213 | static ADDRESS_MAP_START( ti85_mem , ADDRESS_SPACE_PROGRAM, 8) |
| 187 | 214 | AM_RANGE(0x0000, 0x3fff) AM_READWRITE( SMH_BANK(1), SMH_BANK(3) ) |
| 188 | 215 | AM_RANGE(0x4000, 0x7fff) AM_READWRITE( SMH_BANK(2), SMH_BANK(4) ) |
| 189 | | AM_RANGE(0x8000, 0xffff) AM_RAM |
| 216 | AM_RANGE(0x8000, 0xffff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size) |
| 190 | 217 | ADDRESS_MAP_END |
| 191 | 218 | |
| 192 | 219 | static ADDRESS_MAP_START( ti86_mem , ADDRESS_SPACE_PROGRAM, 8) |
| r4961 | r4962 | |
| 326 | 353 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Screen dump request") PORT_CODE(KEYCODE_S) |
| 327 | 354 | INPUT_PORTS_END |
| 328 | 355 | |
| 356 | static INPUT_PORTS_START (ti82) |
| 357 | PORT_START("BIT0") /* bit 0 */ |
| 358 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 359 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) |
| 360 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(-)") PORT_CODE(KEYCODE_M) |
| 361 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 362 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 363 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_F5) |
| 364 | PORT_START("BIT1") /* bit 1 */ |
| 365 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 366 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("+") PORT_CODE(KEYCODE_EQUALS) |
| 367 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 368 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 369 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 370 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("STORE") PORT_CODE(KEYCODE_TAB) |
| 371 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TRACE") PORT_CODE(KEYCODE_F4) |
| 372 | PORT_START("BIT2") /* bit 2 */ |
| 373 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 374 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 375 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 376 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 377 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 378 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LN") PORT_CODE(KEYCODE_COMMA) |
| 379 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ZOOM") PORT_CODE(KEYCODE_F3) |
| 380 | PORT_START("BIT3") /* bit 3 */ |
| 381 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 382 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("*") PORT_CODE(KEYCODE_L) |
| 383 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 384 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 385 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 386 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LOG") PORT_CODE(KEYCODE_COLON) |
| 387 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("WINDOW") PORT_CODE(KEYCODE_F2) |
| 388 | PORT_START("BIT4") /* bit 4 */ |
| 389 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) // |
| 390 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(")") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 391 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(") PORT_CODE(KEYCODE_OPENBRACE) |
| 392 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_END)// |
| 393 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("^2") PORT_CODE(KEYCODE_BACKSLASH) |
| 394 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Y=") PORT_CODE(KEYCODE_F1) |
| 395 | PORT_START("BIT5") /* bit 5 */ |
| 396 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_P) |
| 397 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("TAN") PORT_CODE(KEYCODE_PGUP) |
| 398 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("COS") PORT_CODE(KEYCODE_HOME) |
| 399 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SIN") PORT_CODE(KEYCODE_INSERT) |
| 400 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("^-1") PORT_CODE(KEYCODE_QUOTE) |
| 401 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("2nd") PORT_CODE(KEYCODE_LALT) |
| 402 | PORT_START("BIT6") /* bit 6 */ |
| 403 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_PGDN) |
| 404 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("VARS") PORT_CODE(KEYCODE_F9) |
| 405 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("PRGM") PORT_CODE(KEYCODE_F8) |
| 406 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MATRX") PORT_CODE(KEYCODE_F7) |
| 407 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MATH") PORT_CODE(KEYCODE_F6) |
| 408 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("MODE") PORT_CODE(KEYCODE_ESC) |
| 409 | PORT_START("BIT7") /* bit 7 */ |
| 410 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("STAT") PORT_CODE(KEYCODE_TILDE) |
| 411 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("x-VAR") PORT_CODE(KEYCODE_LCONTROL) |
| 412 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ALPHA") PORT_CODE(KEYCODE_CAPSLOCK) |
| 413 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) |
| 414 | PORT_START("ON") /* ON */ |
| 415 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON/OFF") PORT_CODE(KEYCODE_Q) |
| 416 | PORT_START("SERIAL") /* receive data from calculator */ |
| 417 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Receive data") PORT_CODE(KEYCODE_R) |
| 418 | PORT_START("DUMP") /* screen dump requesting */ |
| 419 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Screen dump request") PORT_CODE(KEYCODE_S) |
| 420 | INPUT_PORTS_END |
| 329 | 421 | |
| 330 | 422 | /* machine definition */ |
| 331 | 423 | static MACHINE_DRIVER_START( ti81 ) |
| r4961 | r4962 | |
| 350 | 442 | MDRV_VIDEO_START( ti85 ) |
| 351 | 443 | MDRV_VIDEO_UPDATE( ti85 ) |
| 352 | 444 | |
| 353 | | MDRV_NVRAM_HANDLER( ti81 ) |
| 445 | MDRV_NVRAM_HANDLER(generic_0fill) |
| 354 | 446 | MACHINE_DRIVER_END |
| 355 | 447 | |
| 356 | 448 | |
| r4961 | r4962 | |
| 370 | 462 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 371 | 463 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) |
| 372 | 464 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 373 | | |
| 374 | | MDRV_NVRAM_HANDLER( ti85 ) |
| 375 | 465 | MACHINE_DRIVER_END |
| 376 | 466 | |
| 377 | 467 | |
| r4961 | r4962 | |
| 381 | 471 | MACHINE_DRIVER_END |
| 382 | 472 | |
| 383 | 473 | |
| 474 | static MACHINE_DRIVER_START( ti82 ) |
| 475 | MDRV_IMPORT_FROM( ti81 ) |
| 476 | MDRV_CPU_REPLACE("maincpu", Z80, 6000000) /* 6 MHz */ |
| 477 | MDRV_CPU_PROGRAM_MAP(ti85_mem) |
| 478 | MDRV_CPU_IO_MAP(ti82_io) |
| 479 | |
| 480 | MDRV_MACHINE_START( ti82 ) |
| 481 | MDRV_VIDEO_UPDATE( ti82 ) |
| 482 | MACHINE_DRIVER_END |
| 483 | |
| 484 | |
| 384 | 485 | static MACHINE_DRIVER_START( ti86 ) |
| 385 | 486 | MDRV_IMPORT_FROM( ti85 ) |
| 386 | 487 | MDRV_CPU_MODIFY("maincpu") |
| r4961 | r4962 | |
| 579 | 680 | COMP( 1988, ti73, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-73", GAME_NOT_WORKING ) |
| 580 | 681 | COMP( 1990, ti81, 0, 0, ti81, ti81, 0, NULL, "Texas Instruments", "TI-81", 0 ) |
| 581 | 682 | COMP( 1992, ti85, 0, 0, ti85d, ti85, 0, ti85, "Texas Instruments", "TI-85", 0 ) |
| 582 | | COMP( 1993, ti82, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-82", GAME_NOT_WORKING ) |
| 583 | | COMP( 1996, ti83, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83", GAME_NOT_WORKING ) |
| 683 | COMP( 1993, ti82, 0, 0, ti82, ti82, 0, NULL, "Texas Instruments", "TI-82", 0 ) |
| 684 | COMP( 1996, ti83, 0, 0, ti82, ti82, 0, NULL, "Texas Instruments", "TI-83", GAME_NOT_WORKING ) |
| 584 | 685 | COMP( 1997, ti86, 0, 0, ti86d, ti85, 0, ti86, "Texas Instruments", "TI-86", 0 ) |
| 585 | 686 | COMP( 1999, ti83p, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus", GAME_NOT_WORKING ) |
| 586 | 687 | COMP( 2001, ti83pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-83 Plus Silver Edition", GAME_NOT_WORKING ) |
| 587 | 688 | //COMP( 2004, ti84p, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-84 Plus", GAME_NOT_WORKING ) |
| 588 | 689 | COMP( 2004, ti84pse, 0, 0, ti85, ti85, 0, NULL, "Texas Instruments", "TI-84 Plus Silver Edition", GAME_NOT_WORKING ) |
| 589 | 690 | |
| 691 | |