Disks detected as write-protected most of the time...

HxC Floppy Emulator on MSX and compatible support
Post Reply
Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Disks detected as write-protected most of the time...

Post by Wild Penquin » Sat Jun 01, 2013 2:27 pm

Hi!

My HxC Floppy emulator used to work OK, when I got it. But, after some firmware update, I've had the problem that most of the time the disks are detected as write-protected. Are the known firmware issues like this (see details below...)?

I'm not sure on which firmware version I was when it used to work, but I could try to downgrade. Currently I have the newest (1.7.2.0). At least 1.7.1.6 had this issue too.

More details: Usually, when I try to write, I get the write-protected error (in MSX-DOS, or MSX-BASIC) and nothing is written, of course. Only RA is blinking in the LCD (no WA). Changing the disk image has no effect - however, if I take the SD-card out, and put it back in - the previously selected disk image is re-selected and mounted (in the emulator). Then it just *might* be in the write-enabled state, there seems to be around 1/4 to 1/10 probability of this happening. If it is, I can write to my hearts content on the currently selected disk image, but as soon as I change the disk image, the forced write-protection is back. Changing the disk image wont remove the write protection (ever), as described above for re-insertion (until I change the disk image).

Needless to say, this makes using the floppy emulator really annoying (in case I want to write to my disk images, that is!).

I have tested:
  • My MCC card write protection switch. Many times, believe me.
  • Also different MCC cards. All have the same issue
  • Re-partitioning and re-formatting the SD card - to FAT32, FAT16 - nothing seems to help
  • Inspecting the SDcard emulator for damage. Can't find any (though I wouldn't rule out hardware issue
The fact that it used to work before a firmware update, and the fact that re-inserting the SD card gives write access sometimes (until disk image is changed) makes me think this is a firmware issue?

Maybe this has something to do with the way my SD cards are formatted? I have no Windows, only Linux and a MAC (OS X). All my SD cards have been re-partitioned at some point, there's no cards in "stock" partition state (or Microsoft operating system state) - or, I can't confirm that. I've tried to make the partitions via fdisk as compatible as possible.

Hope you can help me!

Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Re: Disks detected as write-protected most of the time...

Post by Wild Penquin » Sat Jun 01, 2013 3:22 pm

I need to do some more testing, but it seems that the switch detecting the write protection notch on my HxC SDCard Floppy emulator's SDcard slot is worn / defective. The malfunction just happened to appear after a firmware upgrade.

I need to do some more testing to confirm this... it would help a little, if someone could confirm - which pins (on the HxC floppy emulator, revision C) should be shorted when a SD card with write protection set to "Write enabled / unlocked" is inserted (as opposed to when it is in the "Write protected / Lock" position)?

Jeff
Site Admin
Posts: 5565
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Disks detected as write-protected most of the time...

Post by Jeff » Sat Jun 01, 2013 8:15 pm

This is maybe a floppy cable problem...

Have you tried the emulator on another system ?

EDIT : I will send you an firmware with the Write protect SD Card check disabled AND with the new format support !
Please try the New format support ;)

Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Re: Disks detected as write-protected most of the time...

Post by Wild Penquin » Sun Jun 02, 2013 6:38 pm

Hi,

I can write without problems with the firmware with the write protection check disabled. So must be the swtich in the socket indeed...

I didn't test the new format yet - what's the gain?

tour
Posts: 7
Joined: Sat Feb 22, 2014 10:38 pm

Re: Disks detected as write-protected most of the time...

Post by tour » Sun Mar 15, 2015 5:05 pm

No pay - no gain :)

Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Re: Disks detected as write-protected most of the time...

Post by Wild Penquin » Thu Nov 19, 2015 8:12 pm

Hi again,

With newer firmware - the problem is back (because write protection is enabled, as it shuold). I'd really try to get this working, so I've tried some troubleshooting:
  1. It seems my floppy cable is working (as expected, as your firmware "fixed" it - with a problem in the cable, the modified firmware should not have worked). Just to make sure, I checked and pin 28 connects to pin6 of the large IC on the emulator.
  2. I also tested the write protection switch on the SD card slot with a multimeter, and it seems to work, too: pins 12 & 11 get shorted when a card is inserted (and don't get shorted if the WR switch is on on the SD card). I did this repeatedly to rule out a mechanical problem on the SDcard slot.
  3. However, I've checked the connections from the pins, and compared to the schematic. I assume there is a mistake in the schematic (the other alternative being, my PCB has a manufacturing error, which I find unlikely) - the connections on my PCB are:
    • the SDCard slot pin 12 (SD_WRPROT) is connected to pin 9 of the PIC18F4620
    • the SDCard slot pin 10 (SD_CD) is connected to pin 1 of the PIC18F4620
In the schematic, these should be connected vice versa!

Assuming there is a mistake in the schematic - do you have any ideas what else I could do to troubleshoot?

Thanks!

Jeff
Site Admin
Posts: 5565
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Disks detected as write-protected most of the time...

Post by Jeff » Mon Nov 23, 2015 9:23 am

The write protect menu still there into the latest firmware version. Just set it.

Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Re: Disks detected as write-protected most of the time...

Post by Wild Penquin » Wed Nov 25, 2015 8:13 pm

Hi Jeff,

It never occured to me to look for such an option! Still, I must be missing something obvious, since I can't seem to be able to find it, at lest not on the PC(Win/Linux) software - do you mean the HxC Floppy emulator managers SD card settings, or the menu on the emulator itself? (I'm running on Linux, and I have compiled version 2.1.1.0 from SVN (actually via Arch Linux AUR), and looked in 2.0.26.0 with wine, too).

Anyways, my NMS2855 is currently under maintanance for other reasons (and I've had other duties so I've been busy) so I can not test the mulator currently. But I will test any ideas you have later and report here!

Thanks for your reply!

p.s. I noticed there's a chip tune(s) in the Windows version about dialog, which is nice - but no chip tunes in Linux version :twisted:

Jeff
Site Admin
Posts: 5565
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Disks detected as write-protected most of the time...

Post by Jeff » Sun Nov 29, 2015 6:22 pm

Im talking about the menu on the device itself.

Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Re: Disks detected as write-protected most of the time...

Post by Wild Penquin » Wed Dec 02, 2015 6:49 pm

Hi,

As I needed to disassemble the MSX for other reasons, I also got the emulator out, and re-seated the PIC. Now, all disk images seem to be writeable (at least for the short while I've been testing / using). So, maybe the IC had come loose?

In case this problem re-surfaces, well then I don't know what to do. I can not find the write protection menu you mention anywhere on the device menu. (Maybe we're having a bit of miscommunication here? Note: I'm using the first-gen (non-SLIM) SD card emulator.) I've looked in the user manual [p. 16-17], and in the menu I can acces by holding down the menu button on the device. Also, no mention in the HXCSDFE_CFG specification, either (I'd reckon a write protection option must be stored somewhere). In case it should really be there, can you be more specific how to enter it? Or is there some documentation I have missed?

(only way I can find for switching write protection, is from the SD card itself. But I already stated I had tested the HW switch on the socket quite thoroughly).

However, for the time being the emulator seems to be working again!

Thanks!

P.s. Also, it is certainly possible in theory there was some carbage left under the PCB shorting something in it, but I'd think I would have noticed it, since that's exactly what I had in mind and wanted to rule out.

AW99
Posts: 31
Joined: Fri Jun 12, 2015 8:37 pm

Re: Disks detected as write-protected most of the time...

Post by AW99 » Tue Dec 08, 2015 3:20 am

Don`t know if it can help here on a MSX, but i made this experience.

I can remember, that i had a similar problem on my Amiga-500, when i changed from a 16GB SD-Card to a 64GB SDXC-Card back in the time and copied all my Diskimages over to the new card. Then at once all my Diskimages was permanently write-protected and i could not save to the Diskimages. But when i put the 64GB-Card in the PC and look at the images, then they were not write-protected, so the problem must be the size of the 64GB SD-Card or the type of the SD-Card, because such big cards are SDXC-cards and little different.

To solve this problem, i went into the HxC LCD-Menue and change the write-protection setting to "WR enabled". Like JEFF wrote above. This helped and i could write again to all diskimages without a problem. Only little disadvantage now is, that it`s not possible, to writeprotect a diskimage now, because all diskimages now are permanently write enabled. But for me this is not a problem. I don`t need any Diskimage writeprotected on the SD-Card, because i have a copy of the whole SD-Card on another SD-Card and can replace any file when i want.

By the way - it is not possible to format 64GB-SDXC-cards in FAT32-format with any normal formatting-tool. This only works until 32GB-cards. Therefore i used the program "FAT32 FORMAT", which is available for DOS and WINDOWS, for the 64GB-Card and it worked to format the card in FAT32. This card then works without a problem in my HxC, except this little write-protecting issue.

Wild Penquin
Posts: 10
Joined: Sun Sep 18, 2011 3:23 pm

Re: Disks detected as write-protected most of the time...

Post by Wild Penquin » Tue Mar 08, 2016 7:53 pm

Hi aw99,

Thanks for your input!

I actually finally found the Write Protect option. I somehow have missed it before indeed! What causes a little bit on confusion, is the fact that to enter the menu, no SDcard must be inserted. I need to go there so seldom that I had forgotten this (and what is supposed to be in the menu).

Also, your note about the µSD card types may have something to do with my issue. I may have chanded the µSD card previously, but I don't remember fore sure, since it has been quite a while. I will try to remember it if this issue re-surfaces.

(as for formatting, I use Linux which is very versatile in this regard; I can partition the card as I like - or no partitioning at all - and create any FAT(12/16/32) limited only by the FS capabilities/specifications)

Post Reply