src/mess/drivers/pc8801.c
| r10062 | r10063 | |
| 11 | 11 | - dipswitches are WRONG |
| 12 | 12 | - implement proper i8214 routing, also add irq latch mechanism. |
| 13 | 13 | - below notes states that plain PC-8801 doesn't have a disk CPU, but the BIOS clearly checks the floppy ports. Wrong info? |
| 14 | - joystick / mouse support; |
| 14 | 15 | - cursor is 8 x 10, not 8 x 8 as current implementation. |
| 15 | 16 | |
| 16 | 17 | Notes: |
| r10062 | r10063 | |
| 111 | 112 | static UINT32 bankr[5],bankw[5]; |
| 112 | 113 | static UINT8 i8255_0_pc,i8255_1_pc; |
| 113 | 114 | static UINT8 fdc_irq_opcode; |
| 114 | | static UINT8 ext_rom_bank,gfx_ctrl,vram_sel,misc_ctrl; |
| 115 | static UINT8 ext_rom_bank,gfx_ctrl,vram_sel,misc_ctrl,device_ctrl_data; |
| 115 | 116 | static UINT8 vrtc_irq_mask,sound_irq_mask; |
| 116 | 117 | static UINT8 window_offset_bank; |
| 117 | 118 | static UINT8 layer_mask; |
| r10062 | r10063 | |
| 431 | 432 | return (vrtc << 5) | 0xc0; |
| 432 | 433 | } |
| 433 | 434 | |
| 435 | static WRITE8_HANDLER( pc8801_ctrl_w ) |
| 436 | { |
| 437 | /* |
| 438 | x--- ---- beeper (mirror?) |
| 439 | -x-- ---- mouse latch (JOP1, routes on OPN sound port A) |
| 440 | --x- ---- beeper |
| 441 | --- |
| 442 | */ |
| 443 | |
| 444 | /* TODO: this might actually be two beepers */ |
| 445 | if(((device_ctrl_data & 0x20) == 0x00) && ((data & 0x20) == 0x20)) |
| 446 | beep_set_state(space->machine->device("beeper"),1); |
| 447 | |
| 448 | if(((device_ctrl_data & 0x80) == 0x00) && ((data & 0x80) == 0x80)) |
| 449 | beep_set_state(space->machine->device("beeper"),1); |
| 450 | |
| 451 | if(((device_ctrl_data & 0x20) == 0x20) && ((data & 0x20) == 0x00)) |
| 452 | beep_set_state(space->machine->device("beeper"),0); |
| 453 | |
| 454 | if(((device_ctrl_data & 0x80) == 0x80) && ((data & 0x80) == 0x00)) |
| 455 | beep_set_state(space->machine->device("beeper"),0); |
| 456 | |
| 457 | device_ctrl_data = data; |
| 458 | } |
| 459 | |
| 434 | 460 | static READ8_HANDLER( pc8801_ext_rom_bank_r ) |
| 435 | 461 | { |
| 436 | 462 | return ext_rom_bank; |
| r10062 | r10063 | |
| 603 | 629 | AM_RANGE(0x31, 0x31) AM_READ_PORT("DSW2") AM_WRITE(pc8801_gfx_ctrl_w) |
| 604 | 630 | AM_RANGE(0x32, 0x32) AM_READWRITE(pc8801_misc_ctrl_r, pc8801_misc_ctrl_w) |
| 605 | 631 | // AM_RANGE(0x34, 0x35) AM_WRITE(pc88sr_alu) |
| 606 | | AM_RANGE(0x40, 0x40) AM_READ(pc8801_ctrl_r) //, pc88sr_outport_40) |
| 632 | AM_RANGE(0x40, 0x40) AM_READWRITE(pc8801_ctrl_r, pc8801_ctrl_w) |
| 607 | 633 | AM_RANGE(0x44, 0x45) AM_DEVREADWRITE("ym2203", ym2203_r,ym2203_w) |
| 608 | 634 | // AM_RANGE(0x46, 0x47) AM_NOP /* OPNA extra port */ |
| 609 | 635 | AM_RANGE(0x50, 0x50) AM_READWRITE(pc8801_crtc_param_r, pc88_crtc_param_w) |
| r10062 | r10063 | |
| 1107 | 1133 | crtc.param_count = 0; |
| 1108 | 1134 | crtc.cmd = 0; |
| 1109 | 1135 | } |
| 1136 | |
| 1137 | beep_set_frequency(machine->device("beeper"),2400); |
| 1138 | beep_set_state(machine->device("beeper"),0); |
| 1110 | 1139 | } |
| 1111 | 1140 | |
| 1112 | 1141 | static PALETTE_INIT( pc8801 ) |
| r10062 | r10063 | |
| 1180 | 1209 | MCFG_SOUND_CONFIG(pc88_ym2203_intf) |
| 1181 | 1210 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25) |
| 1182 | 1211 | |
| 1183 | | MCFG_SOUND_ADD("beep", BEEP, 0) |
| 1212 | MCFG_SOUND_ADD("beeper", BEEP, 0) |
| 1184 | 1213 | MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) |
| 1185 | 1214 | MACHINE_CONFIG_END |
| 1186 | 1215 | |