[Coco] MAME FDC Issue that can cause corruption
David Ladd
davidwladd at gmail.com
Thu Aug 3 01:05:22 EDT 2017
Barry,
Thank you for the update.
I currently downloaded the current MAME repo updates which included a fix
from one of the MAME devs.
I am currently in the process of testing this build on my system right
now. Though my personal build of MAME is focused on just MESS and even
that is focused even further down to just the coco12.cpp, coco3.cpp, and
dragon.cpp drivers.
All of my original testing before was done using both the official 32bit
and 64bit Windows binaries when I made my videos to show there was a
problem originally.
Also would you be willing to add your DIFF that you made as a file
attachment? It would make it easier to download/extract for use from the
CLI when using git.
I was going through some git docs and found this example:
git apply yourcoworkers.diff
So I figure in the future having diff files and using the git command will
make it easier to test changes.
+-----------------------------------------------------------------------+
| David Ladd a.k.a. PacoOtaktay a.k.a. Drencor |
| YouTube: http://www.youtube.com/user/PacoOtaktay |
| YouTube Gaming Live: https://gaming.youtube.com/user/PacoOtaktay/live |
| Websites: http://dwladd.com & http://www.theterrorzone.com |
| G+: https://plus.google.com/113262444659438038657 |
| G+: https://plus.google.com/+DavidLaddPacoOtaktay |
| |
| Do you have your CoCo 3 yet? |
+-----------------------------------------------------------------------+
On Wed, Aug 2, 2017 at 9:16 PM, Barry Nelson <barry.nelson at amobiledevice.com
> wrote:
> > David Ladd davidwladd at gmail.com <mailto:coco%40maltedmedia.com
> ?Subject=Re%3A%20%5BCoco%5D%20MAME%20FDC%20Issue%20that%
> 20can%20cause%20corruption&In-Reply-To=%3CCAHW2jkC32VP4p6706RUKjkJjwKs
> LFWaptgwKGSyF5ud2rn685Q%40mail.gmail.com%3E>
> > Wed Aug 2 19:57:59 EDT 2017
> >
> > Ciaran,
> >
> > I applied your patch to my local sources of MAME and built it.
> >
> > I loaded disk basic with the same setup in Disk Basic and had no issues.
> >
> > I then decided to try my OS-9 environment that I had originally found
> this
> > issue with before. I ran my stuff and both drive 0 and drive 1 were
> being
> > banged away on for roughly 15 minutes without it crashing. Where before
> > this fix OS-9 or NitrOS-9 would crash within seconds.
> >
> > So thank you Ciaran for finding a workable fix for this.
>
> I have updated my compiled version of MacMAME on Google Drive to fix this
> serious data corruption issue. Hopefully Tim Linder can post this updated
> binary to www.macmess.org <http://www.macmess.org/> soon as well. Right
> now it is available here:
>
> https://drive.google.com/file/d/0B8RnV5G0TZFZbDBFZXhQQWhKTHc/
> view?usp=sharing <https://drive.google.com/file/d/
> 0B8RnV5G0TZFZbDBFZXhQQWhKTHc/view?usp=sharing>
>
> I also added the ability to select single or double sided double density
> drives as well as MAME’s current default of quad density drives and added a
> bunch of comments to explain the code. The patch I applied is below…
>
> --- src/devices/bus/coco/coco_fdc.cpp 2017-08-02 01:36:40.000000000
> -0400
> +++ src/devices/bus/coco/coco_fdc.cpp 2017-08-02 22:13:09.000000000
> -0400
> @@ -118,6 +118,8 @@
> FLOPPY_FORMATS_END
>
> static SLOT_INTERFACE_START( coco_fdc_floppies )
> + SLOT_INTERFACE("ssdd", FLOPPY_525_SSDD)
> + SLOT_INTERFACE("dsdd", FLOPPY_525_DD)
> SLOT_INTERFACE("qd", FLOPPY_525_QD)
> SLOT_INTERFACE_END
>
> @@ -130,7 +132,7 @@
> MCFG_FLOPPY_DRIVE_SOUND(true)
> MCFG_FLOPPY_DRIVE_ADD(WD_TAG ":1", coco_fdc_floppies, "qd",
> coco_fdc_device_base::floppy_formats)
> MCFG_FLOPPY_DRIVE_SOUND(true)
> - MCFG_FLOPPY_DRIVE_ADD(WD_TAG ":2", coco_fdc_floppies, nullptr,
> coco_fdc_device_base::floppy_formats)
> + MCFG_FLOPPY_DRIVE_ADD(WD_TAG ":2", coco_fdc_floppies, "qd",
> coco_fdc_device_base::floppy_formats)
> MCFG_FLOPPY_DRIVE_SOUND(true)
> MCFG_FLOPPY_DRIVE_ADD(WD_TAG ":3", coco_fdc_floppies, nullptr,
> coco_fdc_device_base::floppy_formats)
> MCFG_FLOPPY_DRIVE_SOUND(true)
> @@ -273,25 +275,32 @@
> else if (data & 0x40)
> drive = 3;
>
> + // Enable/disable the motor line for all drives since it is common
> + // to all drives.
> for (int i = 0; i < 4; i++)
> {
> floppy_image_device *floppy = m_floppies[i]->get_device();
> if (floppy)
> - floppy->mon_w(((i == drive) && (data & 0x08)) ?
> CLEAR_LINE : ASSERT_LINE);
> + floppy->mon_w((data & 0x08) ? CLEAR_LINE :
> ASSERT_LINE);
> }
>
> + // Determine the value of the head (side) select line.
> head = ((data & 0x40) && (drive != 3)) ? 1 : 0;
>
> + // Update the floppy controller register
> set_dskreg(data);
>
> update_lines();
>
> + // Select the floppy drive that is active.
> floppy_image_device *selected_floppy =
> m_floppies[drive]->get_device();
> m_wd17xx->set_floppy(selected_floppy);
>
> + // Apply the side select value.
> if (selected_floppy)
> selected_floppy->ss_w(head);
>
> + // Set the density
> m_wd17xx->dden_w(!BIT(dskreg(), 5));
> }
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list