Previous 15994 Revisions Next

r4341 Tuesday 24th February, 2009 at 11:27:56 UTC by Phill Harvey-Smith
Fix of regression in Dragon Alpha caused by recent cart port changes.
Most significant, is that the FDC is internal to the Alpha, not on the
cart port.
[src/mess/drivers]coco.c
[src/mess/includes]coco.h
[src/mess/machine]coco.c

src/mess/includes/coco.h
r4340r4341
6262
6363
6464/*----------- defined in machine/coco.c -----------*/
65extern const wd17xx_interface dgnalpha_wd17xx_interface;
6566extern const sam6883_interface coco_sam_intf;
6667extern const sam6883_interface coco3_sam_intf;
6768extern UINT8 coco3_gimereg[16];
src/mess/machine/coco.c
r4340r4341
12211221
12221222WRITE8_HANDLER ( dgnalpha_psg_porta_write )
12231223{
1224   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd179x");
1224   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd2797");
12251225   /* Bits 0..3 are the drive select lines for the internal floppy interface */
12261226   /* Bit 4 is the motor on, in the real hardware these are inverted on their way to the drive */
12271227   /* Bits 5,6,7 are connected to /DDEN, ENP and 5/8 on the WD2797 */
r4340r4341
15881588
15891589static WRITE8_HANDLER( dgnalpha_pia2_pa_w )
15901590{
1591   const device_config *ay8910 = devtag_get_device(space->machine, SOUND, "ay8910");
1591   const device_config *ay8912 = devtag_get_device(space->machine, SOUND, "ay8912");
15921592   int   bc_flags;      /* BCDDIR/BC1, as connected to PIA2 port a bits 0 and 1 */
15931593
15941594   /* If bit 2 of the pia2 ddra is 1 then this pin is an output so use it */
r4340r4341
16091609      case 0x00   :       /* Inactive, do nothing */
16101610         break;
16111611      case 0x01   :       /* Write to selected port */
1612         ay8910_data_w(ay8910, 0, pia_get_output_b(2));
1612         ay8910_data_w(ay8912, 0, pia_get_output_b(2));
16131613         break;
16141614      case 0x02   :       /* Read from selected port */
1615         pia_set_input_b(2, ay8910_r(ay8910, 0));
1615         pia_set_input_b(2, ay8910_r(ay8912, 0));
16161616         break;
16171617      case 0x03   :      /* Select port to write to */
1618         ay8910_address_w(ay8910, 0, pia_get_output_b(2));
1618         ay8910_address_w(ay8912, 0, pia_get_output_b(2));
16191619         break;
16201620   }
16211621}
r4340r4341
16421642/* Dragon Alpha onboard FDC */
16431643/********************************************************************************************/
16441644
1645static WD17XX_CALLBACK( dgnalpha_fdc_callback )
1645//static
1646WD17XX_CALLBACK( dgnalpha_fdc_callback )
16461647{
16471648   /* The NMI line on the alphaAlpha is gated through IC16 (early PLD), and is gated by pia2 CA2  */
16481649   /* The DRQ line goes through pia2 cb1, in exactly the same way as DRQ from DragonDos does */
r4340r4341
16781679/* The Dragon Alpha hardware reverses the order of the WD2797 registers */
16791680READ8_HANDLER(wd2797_r)
16801681{
1681   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd179x");
1682   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd2797");
16821683   int result = 0;
16831684
16841685   switch(offset & 0x03)
r4340r4341
17041705
17051706WRITE8_HANDLER(wd2797_w)
17061707{
1707   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd179x");
1708   const device_config *fdc = devtag_get_device(space->machine, WD179X, "wd2797");
17081709    switch(offset & 0x3)
17091710   {
17101711      case 0:
r4340r4341
28182819   dgnalpha_just_reset=1;
28192820}
28202821
2821static const wd17xx_interface dgnalpha_wd17xx_interface = {
2822const wd17xx_interface dgnalpha_wd17xx_interface = {
28222823   dgnalpha_fdc_callback,
28232824   NULL
28242825};
src/mess/drivers/coco.c
r4340r4341
809809   MDRV_SOUND_CONFIG(ay8912_interface)
810810   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
811811
812   /* onboard fdc */
813   MDRV_WD179X_ADD("wd2797", dgnalpha_wd17xx_interface)
814
812815   /* printer */
813816   MDRV_PRINTER_ADD("printer")
814817
r4340r4341
11001103   ROM_LOAD(           "alpha_bt.rom",    0x2000,  0x2000, CRC(c3dab585) SHA1(4a5851aa66eb426e9bb0bba196f1e02d48156068))
11011104   ROM_LOAD(           "alpha_ba.rom",    0x8000,  0x4000, CRC(84f68bf9) SHA1(1983b4fb398e3dd9668d424c666c5a0b3f1e2b69))
11021105
1103   ROM_REGION(0x4000,"coco_cartslot:cart",0)
1106   //ROM_REGION(0x4000,"coco_cartslot:cart",0)
1107   ROM_REGION(0x4000,"cart",0)
11041108   ROM_FILL( 0x0000, 0x4000, 0x00 )
1109   ROM_CART_LOAD("coco_cartslot:cart", 0x0000, 0x4000, ROM_OPTIONAL | ROM_MIRROR)
11051110ROM_END
11061111
11071112ROM_START(coco)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team