src/mess/drivers/pc98.c
| r6188 | r6189 | |
| 300 | 300 | |
| 301 | 301 | static READ8_HANDLER( sys_port_r ) |
| 302 | 302 | { |
| 303 | if(cpu_get_pc(space->cpu) == 0xf9088) |
| 304 | return 0x18; //FIXME: kludge to get over a probable PPI bug. |
| 305 | |
| 303 | 306 | if(offset & 1) |
| 304 | 307 | return ppi8255_r(devtag_get_device(space->machine, "ppi8255_0"), (offset & 6) >> 1); |
| 305 | 308 | |
| r6188 | r6189 | |
| 450 | 453 | if(offset & 1) |
| 451 | 454 | { |
| 452 | 455 | logerror("pit port $70 R access %02x\n",offset >> 1); |
| 453 | | /* FIXME */ |
| 454 | 456 | return pit8253_r(devtag_get_device(space->machine, "pit8253"), (offset & 6) >> 1); |
| 455 | 457 | } |
| 456 | 458 | |
| r6188 | r6189 | |
| 474 | 476 | if(!(offset & 1)) |
| 475 | 477 | { |
| 476 | 478 | logerror("pic8259 port $00 R access %02x\n",offset >> 1); |
| 477 | | if((offset>>1) >= 4) |
| 478 | | return pic8259_r(devtag_get_device(space->machine, "pic8259_slave"), (offset & 2) >> 1); |
| 479 | | else |
| 480 | | return pic8259_r(devtag_get_device(space->machine, "pic8259_master"), (offset & 2) >> 1); |
| 479 | return pic8259_r(devtag_get_device(space->machine, (offset & 8) ? "pic8259_slave" : "pic8259_master"), (offset & 2) >> 1); |
| 481 | 480 | } |
| 482 | 481 | |
| 483 | 482 | //logerror("DMA port $00 R access %02x\n",offset >> 1); |
| r6188 | r6189 | |
| 489 | 488 | if(!(offset & 1)) |
| 490 | 489 | { |
| 491 | 490 | logerror("pic8259 port $00 W access %02x %02x\n",offset >> 1,data); |
| 492 | | if((offset>>1) >= 4) |
| 493 | | pic8259_w(devtag_get_device(space->machine, "pic8259_slave"), (offset & 2) >> 1, data); |
| 494 | | else |
| 495 | | pic8259_w(devtag_get_device(space->machine, "pic8259_master"), (offset & 2) >> 1, data); |
| 491 | pic8259_w(devtag_get_device(space->machine, (offset & 8) ? "pic8259_slave" : "pic8259_master"), (offset & 2) >> 1, data); |
| 496 | 492 | } |
| 497 | 493 | else |
| 498 | 494 | { |
| r6188 | r6189 | |
| 704 | 700 | return 0; |
| 705 | 701 | } |
| 706 | 702 | |
| 707 | | static const gfx_layout charset = |
| 703 | static const gfx_layout charset_8x8 = |
| 708 | 704 | { |
| 709 | 705 | 8,8, |
| 710 | | RGN_FRAC(1,1), |
| 706 | 256, |
| 711 | 707 | 1, |
| 712 | 708 | { 0 }, |
| 713 | 709 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| r6188 | r6189 | |
| 715 | 711 | 8*8 |
| 716 | 712 | }; |
| 717 | 713 | |
| 714 | static const gfx_layout charset_8x16 = |
| 715 | { |
| 716 | 8,16, |
| 717 | RGN_FRAC(1,1), |
| 718 | 1, |
| 719 | { 0 }, |
| 720 | { 0, 1, 2, 3, 4, 5, 6, 7 }, |
| 721 | { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 }, |
| 722 | 8*16 |
| 723 | }; |
| 724 | |
| 718 | 725 | static GFXDECODE_START( pc9801 ) |
| 719 | | GFXDECODE_ENTRY( "gfx1", 0x00000, charset, 0x000, 0x01 ) |
| 726 | GFXDECODE_ENTRY( "gfx1", 0x00000, charset_8x8, 0x000, 0x01 ) |
| 727 | GFXDECODE_ENTRY( "gfx1", 0x00800, charset_8x16, 0x000, 0x01 ) |
| 720 | 728 | GFXDECODE_END |
| 721 | 729 | |
| 722 | 730 | /* |
| r6188 | r6189 | |
| 735 | 743 | |
| 736 | 744 | tmp ^= 1; //<- actually related to the RTC somehow |
| 737 | 745 | //printf("PPI Port B read\n"); |
| 738 | | return 0xf8 | tmp; |
| 746 | return 0xf8 | tmp; //bit 2 seems used for error stuff (returns parity error or ems error on different spots), don't know the real use of it... |
| 739 | 747 | } |
| 740 | 748 | |
| 741 | 749 | static READ8_DEVICE_HANDLER( pc98_portc_r ) |