src/mess/drivers/pc98.c
| r8912 | r8913 | |
| 636 | 636 | // (and many more...) |
| 637 | 637 | ADDRESS_MAP_END |
| 638 | 638 | |
| 639 | | static ADDRESS_MAP_START( pc9821_mem, ADDRESS_SPACE_PROGRAM, 32) |
| 640 | | AM_RANGE(0x00000000, 0x0001ffff) AM_ROM |
| 639 | static ADDRESS_MAP_START( pc9821_io, ADDRESS_SPACE_IO, 32) |
| 640 | AM_RANGE(0x0000, 0x001f) AM_READWRITE8(port_00_r,port_00_w,0xffffffff) // pic8259 (even ports) / dma (odd ports) |
| 641 | // AM_RANGE(0x0020, 0x0020) rtc |
| 642 | // AM_RANGE(0x0022, 0x0022) |
| 643 | AM_RANGE(0x0030, 0x0037) AM_READWRITE8(sys_port_r,sys_port_w,0xffffffff) // rs232c (even ports) / system ppi8255 (odd ports) |
| 644 | AM_RANGE(0x0040, 0x0047) AM_READWRITE8(sio_port_r,sio_port_w,0xffffffff) // printer ppi8255 (even ports) / keyboard (odd ports) |
| 645 | AM_RANGE(0x0060, 0x0063) AM_READWRITE8(port_60_r,port_60_w,0xffffffff) // uPD7220 status & fifo (R) / param & cmd (W) master (even ports) |
| 646 | // AM_RANGE(0x0064, 0x0064) V-SYNC related write |
| 647 | // AM_RANGE(0x0068, 0x0068) Flip-Flop 1 r/w |
| 648 | // AM_RANGE(0x006a, 0x006a) Flip-Flop 2 r/w |
| 649 | // AM_RANGE(0x006e, 0x006e) Flip-Flop 3 r/w |
| 650 | // AM_RANGE(0x0070, 0x0070) crtc registers |
| 651 | // AM_RANGE(0x0072, 0x0072) |
| 652 | // AM_RANGE(0x0074, 0x0074) |
| 653 | // AM_RANGE(0x0076, 0x0076) |
| 654 | // AM_RANGE(0x0078, 0x0078) |
| 655 | // AM_RANGE(0x007a, 0x007a) |
| 656 | // AM_RANGE(0x007c, 0x007c) GRCG mode write |
| 657 | // AM_RANGE(0x007e, 0x007e) GRCG tile write |
| 658 | AM_RANGE(0x0070, 0x007f) AM_READWRITE8(port_70_r,port_70_w,0xffffffff) // crtc regs (even ports) / pit8253 (odd ports) |
| 659 | AM_RANGE(0x00a0, 0x00a3) AM_READWRITE8(port_a0_r,port_a0_w,0xffffffff) // uPD7220 status & fifo (R) / param & cmd (W) slave (even ports) |
| 660 | // AM_RANGE(0x00e0, 0x00ef) DMA |
| 661 | AM_RANGE(0x00f0, 0x00ff) AM_READWRITE8(port_f0_r,port_f0_w,0xffffffff) |
| 662 | AM_RANGE(0x043c, 0x043f) AM_WRITE8(ems_sel_w,0xffffffff) |
| 663 | AM_RANGE(0x0460, 0x0463) AM_READWRITE8(wram_sel_r,wram_sel_w,0xffffffff) |
| 664 | AM_RANGE(0x7fd8, 0x7fdf) AM_READ8(pc98_mouse_r,0xffffffff) |
| 665 | |
| 666 | // (and many more...) |
| 641 | 667 | ADDRESS_MAP_END |
| 642 | 668 | |
| 643 | 669 | /* Input ports */ |
| r8912 | r8913 | |
| 678 | 704 | rom_bank = 1; |
| 679 | 705 | } |
| 680 | 706 | |
| 681 | | static MACHINE_RESET(pc9821) |
| 682 | | { |
| 683 | | UINT8 *ROM = memory_region(machine, "cpudata"); |
| 684 | | cpu_set_irq_callback(machine->device("maincpu"), irq_callback); |
| 685 | | |
| 686 | | cputag_set_input_line(machine, "maincpu", INPUT_LINE_A20, 0); |
| 687 | | |
| 688 | | gate_a20 = 0; |
| 689 | | cpu_set_reg(machine->device("maincpu"), I386_EIP, 0xffff0+0x10000); |
| 690 | | |
| 691 | | memory_set_bankptr(machine, "bank1", &ROM[0x20000]); |
| 692 | | |
| 693 | | wram_bank = 0; |
| 694 | | rom_bank = 1; |
| 695 | | } |
| 696 | | |
| 697 | 707 | /************************************************************* |
| 698 | 708 | * |
| 699 | 709 | * pic8259 configuration |
| r8912 | r8913 | |
| 716 | 726 | DEVCB_DEVICE_LINE("pic8259_master", pic8259_ir2_w) |
| 717 | 727 | }; |
| 718 | 728 | |
| 719 | | static VIDEO_START( pc9821 ) |
| 720 | | { |
| 721 | | } |
| 722 | | |
| 723 | | static VIDEO_UPDATE( pc9821 ) |
| 724 | | { |
| 725 | | return 0; |
| 726 | | } |
| 727 | | |
| 728 | 729 | static const gfx_layout charset_8x8 = |
| 729 | 730 | { |
| 730 | 731 | 8,8, |
| r8912 | r8913 | |
| 989 | 990 | MACHINE_DRIVER_END |
| 990 | 991 | |
| 991 | 992 | static MACHINE_DRIVER_START( pc9821 ) |
| 992 | | /* basic machine hardware */ |
| 993 | | MDRV_CPU_ADD("maincpu", I486, 25000000) |
| 994 | | MDRV_CPU_PROGRAM_MAP(pc9821_mem) |
| 993 | MDRV_IMPORT_FROM( pc9801 ) |
| 995 | 994 | |
| 996 | | MDRV_MACHINE_RESET(pc9821) |
| 997 | | |
| 998 | | /* video hardware */ |
| 999 | | MDRV_SCREEN_ADD("screen", RASTER) |
| 1000 | | MDRV_SCREEN_REFRESH_RATE(50) |
| 1001 | | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 1002 | | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 1003 | | MDRV_SCREEN_SIZE(640, 480) |
| 1004 | | MDRV_SCREEN_VISIBLE_AREA(0, 640-1, 0, 200-1) |
| 1005 | | MDRV_PALETTE_LENGTH(2) |
| 1006 | | MDRV_PALETTE_INIT(black_and_white) |
| 1007 | | |
| 1008 | | MDRV_VIDEO_START(pc9821) |
| 1009 | | MDRV_VIDEO_UPDATE(pc9821) |
| 995 | MDRV_CPU_REPLACE("maincpu", I486, 25000000) |
| 996 | MDRV_CPU_PROGRAM_MAP(pc9801_mem) |
| 997 | MDRV_CPU_IO_MAP(pc9821_io) |
| 1010 | 998 | MACHINE_DRIVER_END |
| 1011 | 999 | |
| 1012 | 1000 | |
| r8912 | r8913 | |
| 1051 | 1039 | |
| 1052 | 1040 | static DRIVER_INIT( pc9801 ) |
| 1053 | 1041 | { |
| 1042 | #if 0 |
| 1054 | 1043 | UINT8 *ROM = memory_region(machine, "cpudata"); |
| 1055 | 1044 | |
| 1056 | 1045 | /* patch unimplemented opcodes verr / verw */ |
| r8912 | r8913 | |
| 1105 | 1094 | /* patch ROM checksum */ |
| 1106 | 1095 | ROM[0xf8595 & 0x3ffff] = 0x90; |
| 1107 | 1096 | ROM[0xf8596 & 0x3ffff] = 0x90; |
| 1097 | #endif |
| 1108 | 1098 | } |
| 1109 | 1099 | |
| 1110 | 1100 | |