Page 1 of 1

Flash Datapack Temporarily Read Only

Posted: Thu Apr 04, 2024 1:24 pm
by amenjet
I've been testing one of my 512K flash datapacks in my LZ and something strange just happened. I attempted to update a record in the MAIN file and it reported that the datapack was read only. This is odd as I update it a lot. I repeated the update and the same thing happened. I switched off and on and the update was performed correctly, no sign of it being a read only pack.

Is this documented behaviour? I'm not aware of this, but I never had any flash packs back in the 90s when I used an organiser. There is a read only bit in the header, but obviously that isn't permanently set. Maybe a bit error in the RAM copy of theheader?

Re: Flash Datapack Temporarily Read Only

Posted: Thu Apr 04, 2024 1:57 pm
by Daren
I had a “READ ONLY” message appear on a new 512k flash Datapak, I just reflashed it and it has been fine since, only used it to save a notepad file so far though.

Edit: I should add prior to reflashing it was already formatted and showing up fine in another organiser.

Re: Flash Datapack Temporarily Read Only

Posted: Thu Apr 04, 2024 5:32 pm
by Zenerdiode
As you will know, Andrew, all Flashpaks will show Read Only until the driver is booted in. Did you inadvertently plug the FP in without a dev boot? Or anything in your fiddling that may have corrupted the Devices area of memory? When you switched off and on, did you double-On thus booting the driver?

As an aside, if I use Lostgallifreyan’s Org-Link to Read Pack x: and then later use that image to Make Pack x:, OL formats the Flashpak and duly builds it. However the Flashpak remains Read Only. I have not checked the header on pack or memory mirror yet to see what’s going on. Checking the image on Jaap’s site shows the binary for the Flashpak driver etc. is there at the start of the Flashpak, the bits for Flashpak and Bootable are correctly set; and boot address is correct at $0019 where the code resides.

Re: Flash Datapack Temporarily Read Only

Posted: Thu Apr 04, 2024 6:51 pm
by amenjet
Zenerdiode wrote: Thu Apr 04, 2024 5:32 pm As you will know, Andrew, all Flashpaks will show Read Only until the driver is booted in. Did you inadvertently plug the FP in without a dev boot? Or anything in your fiddling that may have corrupted the Devices area of memory? When you switched off and on, did you double-On thus booting the driver?

As an aside, if I use Lostgallifreyan’s Org-Link to Read Pack x: and then later use that image to Make Pack x:, OL formats the Flashpak and duly builds it. However the Flashpak remains Read Only. I have not checked the header on pack or memory mirror yet to see what’s going on. Checking the image on Jaap’s site shows the binary for the Flashpak driver etc. is there at the start of the Flashpak, the bits for Flashpak and Bootable are correctly set; and boot address is correct at $0019 where the code resides.
Hmm, I didn't know that but it makes sense. When I saw the message the pack had not been unplugged so the driver should have been loaded. maybe for some reason it was unloaded and that is why the message appeared. I don't think it was a flashpack problem, more likely something in the organiser.

Re: Flash Datapack Temporarily Read Only

Posted: Sat Apr 06, 2024 6:35 pm
by Daren
Talking of READ ONLY - how do you set a pak to it? Is it only applicable to flash paks or can eprom paks be set to read only too? I’m guessing it must be a hidden away (machine code) function as there is no mention of it in the manual, probably for good reason as I guess that it was only envisaged as being useful to developers perhaps?

Re: Flash Datapack Temporarily Read Only

Posted: Sat Apr 06, 2024 9:31 pm
by amenjet
Daren wrote: Sat Apr 06, 2024 6:35 pm Talking of READ ONLY - how do you set a pak to it? Is it only applicable to flash paks or can eprom paks be set to read only too? I’m guessing it must be a hidden away (machine code) function as there is no mention of it in the manual, probably for good reason as I guess that it was only envisaged as being useful to developers perhaps?
The obvious way for this to happen is for bit 3 in the ID byte to be cleared. This is a major thing to fiddle with and not recommended, really. It could go badly wrong. On a flash pack the bit can be written as needed, the same holds for a RAM pack. An EPROM pack, though, once write protected then that's it, the bit can't be set again without a full erase.

Flash Datapack Temporarily Read Only

Posted: Sun Apr 07, 2024 1:49 pm
by Martin
Hi all

I think you chaps have got this sorted.. I'll just add a couple of thoughts..

Flash Pack becomming 'READ ONLY' is a flash driver issue. If you check my reply to David (here) the boot code can get corrupted by the 'shunting'

Add or Remove pack header information - easiest way is to use Jaaps OPK editor and [Save Pack As] be careful it overwrites files with same name.. of course you will have to MAKE this OPK on an unsized Datapak

Martin

Re: Flash Datapack Temporarily Read Only

Posted: Mon Apr 08, 2024 10:46 am
by Daren
Thanks Martin - possibly a good idea to have a thread dedicated to paks? Pak Faq? :lol: