Previous 15994 Revisions Next

r10063 Sunday 16th January, 2011 at 21:10:55 UTC by Angelo Salese
[PC-8801]: Added buzzer sound
[src/mess/drivers]pc8801.c

src/mess/drivers/pc8801.c
r10062r10063
1111   - dipswitches are WRONG
1212   - implement proper i8214 routing, also add irq latch mechanism.
1313   - 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;
1415   - cursor is 8 x 10, not 8 x 8 as current implementation.
1516
1617   Notes:
r10062r10063
111112static UINT32 bankr[5],bankw[5];
112113static UINT8 i8255_0_pc,i8255_1_pc;
113114static UINT8 fdc_irq_opcode;
114static UINT8 ext_rom_bank,gfx_ctrl,vram_sel,misc_ctrl;
115static UINT8 ext_rom_bank,gfx_ctrl,vram_sel,misc_ctrl,device_ctrl_data;
115116static UINT8 vrtc_irq_mask,sound_irq_mask;
116117static UINT8 window_offset_bank;
117118static UINT8 layer_mask;
r10062r10063
431432   return (vrtc << 5) | 0xc0;
432433}
433434
435static 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
434460static READ8_HANDLER( pc8801_ext_rom_bank_r )
435461{
436462   return ext_rom_bank;
r10062r10063
603629   AM_RANGE(0x31, 0x31) AM_READ_PORT("DSW2") AM_WRITE(pc8801_gfx_ctrl_w)
604630   AM_RANGE(0x32, 0x32) AM_READWRITE(pc8801_misc_ctrl_r, pc8801_misc_ctrl_w)
605631//   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)
607633   AM_RANGE(0x44, 0x45) AM_DEVREADWRITE("ym2203", ym2203_r,ym2203_w)
608634//  AM_RANGE(0x46, 0x47) AM_NOP                                     /* OPNA extra port */
609635   AM_RANGE(0x50, 0x50) AM_READWRITE(pc8801_crtc_param_r, pc88_crtc_param_w)
r10062r10063
11071133      crtc.param_count = 0;
11081134      crtc.cmd = 0;
11091135   }
1136
1137   beep_set_frequency(machine->device("beeper"),2400);
1138   beep_set_state(machine->device("beeper"),0);
11101139}
11111140
11121141static PALETTE_INIT( pc8801 )
r10062r10063
11801209   MCFG_SOUND_CONFIG(pc88_ym2203_intf)
11811210   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
11821211
1183   MCFG_SOUND_ADD("beep", BEEP, 0)
1212   MCFG_SOUND_ADD("beeper", BEEP, 0)
11841213   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10)
11851214MACHINE_CONFIG_END
11861215

Previous 15994 Revisions Next


© 1998-2018 The MESS Team