6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 12, 2024 7:13 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Jan 31, 2023 6:01 pm 
Offline

Joined: Mon Jan 09, 2023 9:33 pm
Posts: 23
Any ideas for use of Flash memories as reliable storage for 6502 small systems ?
Not as system ROM but as mapped devices.
No complex file system requests, just read, copy, write, erase, in pages of blocks, with 512, 1k or 4k bytes.
Just to preserve informations.

I tried to search the list but many links are lost.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 31, 2023 6:07 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
Honestly if that's what you want, you're probably best off using an SD card, because the complexity of wear-levelling is transparently handled for you by the SD Card's internal controller. You can use an SD card as a raw block storage if you want, you don't have to have a file system on it. Though they can be a bit fiddly to set up and will be slower to access than a Flash...

If the SD card doesn't work for you, I would recommend an FRAM. It basically has the same properties as RAM, including write speed and (almost) infinite write cycle life so you don't need to worry about wear levelling, but it is non-volatile like Flash is. The only real downside is its quite expensive per unit of memory - if you need lots of storage an FRAM probably isn't the answer...

Therefore, if you really need to use some kind of EEPROM/Flash, and you want it to be 'reliable' in the long-term allowing for arbitrary overwriting: you'll need to implement a wear levelling scheme of some kind. There are filesystems (YAFFS is one that springs to mind, but there are others) which do this inherently as part of their design - you could look at how they do it for inspiration, even if your actual implementation is simpler.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Last edited by Alarm Siren on Tue Jan 31, 2023 7:09 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 31, 2023 6:56 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8180
Location: Midwestern USA
Alarm Siren wrote:
There are filesystems (ReiserFS and YAFFS are the two that spring to mind, but there are others) which do this inherently as part of their design - you could look at how they do it for inspiration, even if your actual implementation is simpler.

Hmm...I seem to recall that ReiserFS was not recommended for use on solid state storage devices. Also, ReiserFS is no longer supported by NameSys (I couldn’t even find a reference to it on the NameSys website) and is scheduled to be deleted from the Linux kernel base.

At one time, I used ResierFS on my Linux boxes. Eventually, I switched everything to ext3, which ended up to be a better-performing filesystem.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 31, 2023 7:11 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
BigDumbDinosaur wrote:
Hmm...I seem to recall that ReiserFS was not recommended for use on solid state storage devices.


Quite right, I had misremembered, thank you for pointing it out. I cannot remember the correct name of the other one so I've just removed mention of it from my post entirely.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 31, 2023 7:38 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
agsb, how much storage space do you want?  Up to 128KB, you might like the 8-pin 24xx I²C serial EEPROMs.  For larger amounts like 8MB (I haven't looked at how high they go now), and pages/sectors/etc., the 8-pin 26VFxxx SPI flash memories are nice.  On the front page of my site, I offer tiny modules conforming to the I2C-6 and SPI-10 connector "standards" we devised on this forum.  I'm not pushing this as a business, only making available to others the things I've made for myself.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 31, 2023 8:38 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
Another suitable storage is CF disk. CF is parallel interface, so it can also serve as a boot ROM with a minimal amount of logic. You don’t need a file system to access CF, it is just bunch of addressable 512-byte sectors with automatic wear leveling function built in. With gigabyte CF readily available, you don’t need to be efficient about file storage—no big deal if every file is 64KB. If you put the operating system on the CF disk, you can change your mind with different OS for every new CF disk.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 01, 2023 10:15 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1411
Location: Scotland
agsb wrote:
Any ideas for use of Flash memories as reliable storage for 6502 small systems ?
Not as system ROM but as mapped devices.
No complex file system requests, just read, copy, write, erase, in pages of blocks, with 512, 1k or 4k bytes.
Just to preserve informations.

I tried to search the list but many links are lost.


There is an ATmega device which runs FORTH which uses small (8-pin) SPI Flash chips for storage and while I was interested in the basic unit for a while, I've not looked for a long time, however I didn't see any issues with the SPI Flash device and I did consider it for my own use in my Ruby project, but opted for SD cards (although I'm really not sure why, now!) SD has a very similar SPI interface although a slightly more complex command-set.

I do use the internal flash in the ATmega in my Ruby system too - (4KB on the MCU I'm using) but it does have limited writes (1000s not millions, and this has been tested by others) but for occasional use it's been fine for me.

But once you can read/write (say) 512 byte blocks then you can do anything. FAT, etc.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 01, 2023 6:38 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 684
Location: Potsdam, DE
FRAM is fun to use and dead simple to implement (though you have to watch out that some chips can't be used if the ~CS line is permanently low) but it turned out that it's zillion year life - I think they quote in the 10^9 hours - is reduced to about nine days at 150C. Which is where I was designing a file system to run... Flash lasted much longer. I needed to run for at least a fortnight and couldn't guarantee it with FRAM.

The nice thing about oil drilling machines is that there's so much money sloshing about (I was quoted rentals for the robot of half a million bucks a week) that it's quite feasible to throw the electronics away after one run and extracting the data. It's a truly horrible environment for anything: electronics that had to work from -60C to +150C minimum, vibrations of 10,000g, and heavy handed riggers stomping around the place and jumping on things.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 01, 2023 7:01 pm 
Offline

Joined: Wed Nov 11, 2020 10:42 pm
Posts: 96
Location: Kelowna Canada
Hi Perhaps have a look at this page and see if that would be of some help. viewtopic.php?f=6&t=7473


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: