Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Any tips for running mame off a CF card?  (Read 1569 times)

0 Members and 1 Guest are viewing this topic.

quarterback

  • King Of The Night Time World!
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3089
  • Last login:February 26, 2025, 12:22:43 pm
Any tips for running mame off a CF card?
« on: October 06, 2006, 04:14:15 pm »
I have a 2gig CF card lying around and I picked up an IDE adapter for it.  I have read about people running mame off of these instead of a hard drive and, since my cocktail cab gets so hot anyway, I've been thinking about it.

The biggest concern seems to be the longevity of the card under heavy write/re-write use.   Somebody said that they disabled the high-score recording abilities of mame just to avoid this aspect.

Should this be a big concern?   How would I go about disabling all writing to the card?

Also, I'm running Win98, so I'd have to disable the caching of files (virtual memory or whatever they call it) as well if I wanted to avoid the card being written to.  Would this cause problems with windows?

Anything else I might want to know before trying something like this?
Thanks
No crap, don't put your kids in a real fridge.
-- Chad Tower

daywane

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2570
  • Last login:December 26, 2024, 11:02:08 am
  • GRRRR!
Re: Any tips for running mame off a CF card?
« Reply #1 on: October 06, 2006, 04:51:08 pm »
I only have XP running on all my PC's hooked up at this moment, so I could be wrong
but can you not just right click on the drive and tag it read only?

Never used IDE adaptor. My bios on my mother board let me boot to other drives.
My card readers show my CPF cards as drives. I did boot off it just for the fun of it once (linux) did nothing more with it , I just tried it for the fun of it

I see no problems doing what you want.
I do not even see a problem with the constant wrighting to the drive?
I have some older cards that I have used for pics and PC file all the time.
formated 100's of times ( my Kodak will not see the XP format but XP sees the Kodak format)

I have 7 to 8 PC's hooked up all the time.... I use CP flash to transfer files all the time
Keep us posted on your plans.... I would like to fallow up on it  :cheers:

ahofle

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4544
  • Last login:August 30, 2023, 05:10:22 pm
    • Arcade Ambience Project
Re: Any tips for running mame off a CF card?
« Reply #2 on: October 06, 2006, 05:27:23 pm »
Yeah, personally I'd just leave the writes enabled and back all the files up on a DVD in case it dies.  By the time you've reached 10,000 to 1,000,000 writes and the card fails, 40 gig flash cards will be $29.95 at Circuit City.  ;D

http://en.wikipedia.org/wiki/Wear_levelling

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:April 16, 2025, 04:09:53 pm
  • Cunning like the Fox.
    • Mods'n'Mods
Re: Any tips for running mame off a CF card?
« Reply #3 on: October 06, 2006, 06:06:19 pm »
Personally, I'd run Dos - with something like gamelauncher.

DOS won't write anything to the CF card, it will boot in a couple of seconds (literally) making it a perfect combo for a CF card as an IDE device. So the only writing to the card will be hi-scores, which will be fine for decades.

The problem with the re-writes is in windows, particualry XP - estimates vary from 6 months to 2 years on a standard CF card depending on how much you hack XP to lock it down.

NB if you are a dab hand with linux, you can mount the boot volume as read-only for the same effect as DOS.

In windows - you can not set your system drive to be read-only.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Any tips for running mame off a CF card?
« Reply #4 on: October 06, 2006, 11:35:00 pm »
If the card does wear leveling (high end ones do, low end ones generally don't), you pretty much don't need to worry.  Even at the maximum erase/write cycle speed the card can sustain, it would take years (often 10s) to wear out a CF card.  Flash is a lot more durable than most people believe.  For reference, somebody calculated that if you were to erase/write the original 16MB Compaq iPAQ as fast as you could with the writes spread out evenly, it would take about 12 years to reach the guaranteed minimum number of erase cycles.  If you did it on only a single sector, it would still take a month or so.  This is cycling things as fast as absolutely possible, hardly a normal use pattern.

Even cards that don't do wear leveling will often start remapping sectors after they hit a certain erase count, effectively doing some poor man's form of wear leveling.  Usually this doesn't result in data loss.

If the card doesn't even do that, your filesystem should have some form of bad sector handling.  You'll lose some data (one file, probably) if you do manage to wear it out (highly unlikely unless you're using it for a swap file or similar), but still not too bad.

Unless MAME is constantly writing the high score files out and you leave the game running 24/7, you probably don't need to worry.  Remember that reading flash does not cause any wear at all.  I've had Linux based SBC systems running off CF cards for a couple years using it like a normal system (including log files, though there is no swap partiton) and haven't had a problem, though I am using good CF cards.

quarterback

  • King Of The Night Time World!
  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3089
  • Last login:February 26, 2025, 12:22:43 pm
Re: Any tips for running mame off a CF card?
« Reply #5 on: October 07, 2006, 11:01:05 am »
Thanks for all the replies.

I was not aware of the concept of "wear levelling", so that's great to know.  With the minimal amount of writing/re-writing and having it spread across the CF card, I think I'd be fine.  And if I get rid of/minimize the amount of Win98/OS file caching, then even better.

The main question on that front would be whether or not my Kingston Elite Pro CF card does any wear levelling at all.  A quick search indicates that their Elite Pro 8GB card uses it.  I'll just have to see but, if it does, then I think the 10,000 to 100,000 cycle estimate, when written across the card, will take care of me until 40GB CF cards are free at Circuit City :)

Silver's probably right in suggesting DOS.  I'd contemplated it, but I just don't like the available front ends for DOS (at least, the ones I've seen) I like using MameWah.  So, unless this eats a hole in my CF card in a month or so, it looks like I'll at least give it a shot using Win98.

Thanks y'all



No crap, don't put your kids in a real fridge.
-- Chad Tower

jhanson

  • Guest
  • Trade Count: (0)
Re: Any tips for running mame off a CF card?
« Reply #6 on: October 08, 2006, 06:16:19 pm »
I'm not sure that wear leveling applies when you're using a CF card with an IDE adapter.  The reason is that the PC sees it as a normal IDE drive, and writes to it like a normal IDE drive.  I could be wrong, but I wouldn't count on the wear leveling in that usage scenario.

One way to save on writes, is to setup a RAM drive and direct the high score files and the CWSDPMI caching to it.  You can always have a shutdown procedure that copies the high score files back to the drive at the end if you really want to save your scores.

lloydcom

  • Guest
  • Trade Count: (0)
Re: Any tips for running mame off a CF card?
« Reply #7 on: October 08, 2006, 06:50:42 pm »
I have a 128MB CF card and a 1 Gb card that go into my 365x Thinkpads to reduce the weight and power consumption.  These old laptops are great for firewalls, test rigs, domain controllers or even for a bartop.  Looking at the recent Project entry someone had the same idea.

My CFs are connected via PCMCIA cards and I have Windows 98SE on a 50MB footprint, with a ramdrive of 16mb for swap and it zooms at warp speed.  Writes are near minimal and booting is very quick.

All with Mame and the 80's roms, Nes and related Emus fit with Windows on a 128MB CF card I bought for
« Last Edit: October 08, 2006, 06:53:45 pm by lloydcom »

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
Re: Any tips for running mame off a CF card?
« Reply #8 on: October 08, 2006, 09:50:47 pm »
The wear leveling is applied by the controller inside the CF card, if it is done.  The "real CF" interface and IDE compatibility mode should not affect this for a properly made CF card.  Again see the issue with crappy CF cards.

Wear leveling is not done in software on modern CF cards.  Old CF cards that presented themselves as linear flash (similar to old PCMCIA memory cards) did require that you perform wear leveling in software if you wanted it, but they are a very different beast than modern cards.  Windows/Linux won't even see such cards as standard hard drives (you'd need the MTD interface stuff in Linux, and Windows needs special drivers), and they won't work in an IDE<->CF adapter.