trunk/src/mess/drivers/pc9801.c
| r19456 | r19457 | |
| 29 | 29 | - Dies on ARTIC check; |
| 30 | 30 | - Presumably one ROM is undumped? |
| 31 | 31 | |
| 32 | | floppy issues TODO (certain fail, even with a stock F version) |
| 33 | | - Bokosuka Wars (perhaps not 2hd?) |
| 32 | floppy issues TODO (certain fail) |
| 33 | - Bokosuka Wars |
| 34 | 34 | - Dokkin Minako Sensei (2dd image) |
| 35 | 35 | |
| 36 | 36 | List of per-game TODO: |
| 37 | | - 4D Boxing: tries to format User Disk; |
| 37 | - 4D Boxing: inputs are unresponsive |
| 38 | 38 | - 4D Driving: accesses some undefined ports (guess that it accesses the low part of them with word opcodes ...) |
| 39 | | - Absolutely Mahjong: Epson splash screen doesn't appear at all, why? |
| 40 | | - Brandish 2: has some annoying strips at the main menu, also no selection seems to work; |
| 39 | - Absolutely Mahjong: Kanji data doesn't appear at the Epson logo. Transitions are too fast. |
| 40 | - Brandish 2: Intro needs some window masking effects; |
| 41 | 41 | - Dragon Buster: missing bitplanes for the PCG, slight issue with window masking; |
| 42 | 42 | - Far Side Moon: doesn't detect neither mouse nor sound board; |
| 43 | 43 | - First Queen: has broken text display; |
| r19456 | r19457 | |
| 397 | 397 | DECLARE_WRITE8_MEMBER(pc9801_gvram_w); |
| 398 | 398 | DECLARE_READ8_MEMBER(pc9801_mouse_r); |
| 399 | 399 | DECLARE_WRITE8_MEMBER(pc9801_mouse_w); |
| 400 | DECLARE_WRITE8_MEMBER(pc9801rs_mouse_freq_w); |
| 400 | 401 | inline UINT8 m_pc9801rs_grcg_r(UINT32 offset,int vbank); |
| 401 | 402 | inline void m_pc9801rs_grcg_w(UINT32 offset,int vbank,UINT8 data); |
| 402 | 403 | DECLARE_READ8_MEMBER(pc9801_opn_r); |
| r19456 | r19457 | |
| 542 | 543 | UINT8 control; |
| 543 | 544 | UINT8 lx; |
| 544 | 545 | UINT8 ly; |
| 546 | UINT8 freq_reg; |
| 547 | UINT8 freq_index; |
| 545 | 548 | }m_mouse; |
| 546 | 549 | TIMER_DEVICE_CALLBACK_MEMBER( mouse_irq_cb ); |
| 547 | 550 | |
| r19456 | r19457 | |
| 553 | 556 | |
| 554 | 557 | |
| 555 | 558 | |
| 559 | #define ATTRSEL_REG 0 |
| 556 | 560 | #define WIDTH40_REG 2 |
| 557 | 561 | #define FONTSEL_REG 3 |
| 558 | 562 | #define INTERLACE_REG 4 |
| r19456 | r19457 | |
| 708 | 712 | v_line = attr & 0x10; |
| 709 | 713 | color = (attr & 0xe0) >> 5; |
| 710 | 714 | |
| 715 | if(state->m_video_ff[ATTRSEL_REG]) |
| 716 | v_line = 0; |
| 717 | |
| 711 | 718 | for(yi=0;yi<lr;yi++) |
| 712 | 719 | { |
| 713 | 720 | for(xi=0;xi<8;xi++) |
| r19456 | r19457 | |
| 1077 | 1084 | } |
| 1078 | 1085 | |
| 1079 | 1086 | |
| 1080 | | if(1) |
| 1087 | if(0) |
| 1081 | 1088 | { |
| 1082 | 1089 | static const char *const video_ff_regnames[] = |
| 1083 | 1090 | { |
| r19456 | r19457 | |
| 1096 | 1103 | } |
| 1097 | 1104 | else // odd |
| 1098 | 1105 | { |
| 1099 | | printf("Write to undefined port [%02x] <- %02x\n",offset+0x68,data); |
| 1106 | //printf("Write to undefined port [%02x] <- %02x\n",offset+0x68,data); |
| 1100 | 1107 | } |
| 1101 | 1108 | } |
| 1102 | 1109 | |
| r19456 | r19457 | |
| 1130 | 1137 | { |
| 1131 | 1138 | if(offset < 0x08) |
| 1132 | 1139 | pit8253_w(machine().device("pit8253"), space, (offset & 6) >> 1, data); |
| 1133 | | else |
| 1134 | | printf("Write to undefined port [%02x] <- %02x\n",offset+0x70,data); |
| 1140 | //else |
| 1141 | // printf("Write to undefined port [%02x] <- %02x\n",offset+0x70,data); |
| 1135 | 1142 | } |
| 1136 | 1143 | } |
| 1137 | 1144 | |
| r19456 | r19457 | |
| 1289 | 1296 | } |
| 1290 | 1297 | } |
| 1291 | 1298 | |
| 1292 | | printf("Write to undefined port [%02x] <- %02x\n",offset+0xa0,data); |
| 1299 | //printf("Write to undefined port [%02x] <- %02x\n",offset+0xa0,data); |
| 1293 | 1300 | } |
| 1294 | 1301 | } |
| 1295 | 1302 | |
| r19456 | r19457 | |
| 1925 | 1932 | m_access_ctrl = data; |
| 1926 | 1933 | } |
| 1927 | 1934 | |
| 1935 | WRITE8_MEMBER( pc9801_state::pc9801rs_mouse_freq_w ) |
| 1936 | { |
| 1937 | /* TODO: bit 3 used */ |
| 1938 | if(offset == 3) |
| 1939 | { |
| 1940 | m_mouse.freq_reg = data & 3; |
| 1941 | m_mouse.freq_index = 0; |
| 1942 | } |
| 1943 | } |
| 1944 | |
| 1928 | 1945 | static ADDRESS_MAP_START( pc9801rs_map, AS_PROGRAM, 32, pc9801_state ) |
| 1929 | 1946 | AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE8(pc9801rs_memory_r,pc9801rs_memory_w,0xffffffff) |
| 1930 | 1947 | ADDRESS_MAP_END |
| r19456 | r19457 | |
| 1949 | 1966 | AM_RANGE(0x0438, 0x043b) AM_READWRITE8(pc9801rs_access_ctrl_r,pc9801rs_access_ctrl_w,0xffffffff) |
| 1950 | 1967 | AM_RANGE(0x043c, 0x043f) AM_WRITE8(pc9801rs_bank_w, 0xffffffff) //ROM/RAM bank |
| 1951 | 1968 | AM_RANGE(0x7fd8, 0x7fdf) AM_READWRITE8(pc9801_mouse_r, pc9801_mouse_w, 0xffffffff) // <undefined> / mouse ppi8255 ports |
| 1969 | AM_RANGE(0xbfd8, 0xbfdf) AM_WRITE8(pc9801rs_mouse_freq_w, 0xffffffff) |
| 1952 | 1970 | ADDRESS_MAP_END |
| 1953 | 1971 | |
| 1954 | 1972 | READ8_MEMBER(pc9801_state::pc980ux_memory_r) |
| r19456 | r19457 | |
| 2716 | 2734 | |
| 2717 | 2735 | PORT_START("MOUSE_B") |
| 2718 | 2736 | PORT_BIT(0x1f, IP_ACTIVE_HIGH, IPT_UNUSED ) |
| 2719 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_BUTTON3) PORT_CODE(MOUSECODE_BUTTON3) PORT_NAME("Mouse Middle Button") |
| 2737 | /* TODO: Brandish 2 apparently needs both bits 7 & 5 to be active, to enter into a main menu sub-item. */ |
| 2738 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED )// PORT_CODE(MOUSECODE_BUTTON3) PORT_NAME("Mouse Middle Button") |
| 2720 | 2739 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_CODE(MOUSECODE_BUTTON2) PORT_NAME("Mouse Right Button") |
| 2721 | 2740 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_CODE(MOUSECODE_BUTTON1) PORT_NAME("Mouse Left Button") |
| 2722 | 2741 | |
| r19456 | r19457 | |
| 3328 | 3347 | |
| 3329 | 3348 | m_nmi_ff = 0; |
| 3330 | 3349 | m_mouse.control = 0xff; |
| 3350 | m_mouse.freq_reg = 0; |
| 3351 | m_mouse.freq_index = 0; |
| 3331 | 3352 | } |
| 3332 | 3353 | |
| 3333 | 3354 | MACHINE_RESET_MEMBER(pc9801_state,pc9801f) |
| r19456 | r19457 | |
| 3438 | 3459 | { |
| 3439 | 3460 | if((m_mouse.control & 0x10) == 0) |
| 3440 | 3461 | { |
| 3441 | | pic8259_ir5_w(machine().device("pic8259_slave"), 0); |
| 3442 | | pic8259_ir5_w(machine().device("pic8259_slave"), 1); |
| 3462 | m_mouse.freq_index ++; |
| 3463 | |
| 3464 | // printf("%02x\n",m_mouse.freq_index); |
| 3465 | if(m_mouse.freq_index > m_mouse.freq_reg) |
| 3466 | { |
| 3467 | // printf("irq %02x\n",m_mouse.freq_reg); |
| 3468 | m_mouse.freq_index = 0; |
| 3469 | pic8259_ir5_w(machine().device("pic8259_slave"), 0); |
| 3470 | pic8259_ir5_w(machine().device("pic8259_slave"), 1); |
| 3471 | } |
| 3443 | 3472 | } |
| 3444 | 3473 | } |
| 3445 | 3474 | |