Disk emulation in RAM

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7870
    Vamadofr
    Participant

    Hello, may I add a little suggestion: is it possible to add “physical” drive emulation in RAM?
    Similar to how *.img drives are handled, but with data in memory.

    It’s not so important for desktops, but should be useful for mobile devices, as they have much more degradable flash memory.

    And, if it’s possible, it could be handful to:
    – optionally load data from *.img files on startup;
    – preserve data during reboots;
    – optionally save data to disk image file on shutdown.

    The commands could be like this:

    “rammount a -t floppy”
    Create floppy drive in RAM on startup, then do what is needed – format it, make bootable or whatever – and, since “-save” is not defined, during shutdown ask to save RAM image to file or not.

    “rammount c -t hdd -fs fat -size 512,63,16,520 -load /sdcard/images/w95_256mb.img -save -”
    Create 256 Mb ram drive, load it from image file and don’t save any changes on shutdown (to test some Windows program and leave system untouched).

    “rammount d -t hdd -fs fat -size 512,63,16,520 -save /sdcard/images/w95_256mb.img”
    Create unformatted disk D, then install Windows, for example, and save ram drive on shutdown.

    Unlike with DOS ramdrive.sys, such “real” drive:
    – will not use dos memory;
    – will be available without any memory drivers;
    – probably can be much larger than dos ramdisk;
    – can keep data between several reboots;
    – probably will be more compatible with different programs.

    #7907
    Vamadofr
    Participant

    Just to note: DosBox-X seems to be able to create disks in RAM.
    https://github.com/joncampbell123/dosbox-x/…/bios_disk.h#L222
    I didn’t try it, though.

    Anyway, thanks for the program! ?

    #7909
    admin
    Keymaster

    I can check it deeper, maybe it is os specific. But, what is the advantage in comparison if is stored in ram instead sd? I mean, it loads only img files to memory or all on disk mounted by “mount c: path”?

    #7913
    Vamadofr
    Participant

    I did not try the DosBox-X, it’s for Windows, and there is currently a problem with my PC… So I don’t know how RAM disks work there.

    The advantage is that there will be no multiple data overwrites on SD, until finally RAM image will be saved to disk.

    Come to think of it, maybe it’s not needed much for games. And Magic DosBox is aimed for games, of course.
    And it seems to be difficult to implement, so maybe the result doesn’t worth the efforts.
    That was just a suggestion, don’t pay too much attention to it. 🙂

    The only *game* I know that constantly writes data to disk is “The Legend of Kyrandia” series – when it plays voices, it stores temporary *.voc files on HDD.

    Such “hardware” RAM disks should be more useful for complete PC emulators, like Limbo, when installing heavy things – Windows etc.
    So maybe it’s not really needed for gaming emulator.
    Sorry for taking too much of your attention, and thanks again for nice program! ?

    #7914
    admin
    Keymaster

    If it can work only with img files then I dont see any big advantage. However, if it can work with “mount c: path” command then it will be very useful if google will start blocking direct access to storage. It was announced since android 11, but they kicked it to android 12. I hope they will drop it completely.

    #7926
    Vamadofr
    Participant

    The struggle continues. 🙂
    Played with Magic DosBox little more and found out that it supports up to 512 Mb of EMS memory, cool!
    Since I didn’t give up with that “RAM drive” idea, I decided to mount ordinary ram-disk software, and figured out that all RAM disks hang in DosBox.

    I tried DOS RAM disks from several developers:

    – MS Ramdrive from MS-DOS 6.22 (DosBox doesn’t support config.sys commands, but it is possible to load drivers from command line):
    1st, you need to add available device letters with “LastDrive” utility: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=411
    2nd, load RAMDRIVE.SYS with “DevLoad” utility: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=3868

    – ReSizeable RAMDisk: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=3867

    – XMSDisk: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=399

    – RDISK: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=4554

    – LVDisk: http://old-dos.ru/index.php?page=files&mode=files&do=show&id=433

    (Listed all them here in case you’ll want to test them).
    They all work in full DOS environment, but hang in DosBox, no matter if I try to use XMS or EMS memory.

    So, now the question is: is it possible to add support for software RAM disks in Magic DosBox?

    #9794
    piduca
    Participant

    I know, two years have passed. But I am on the same boat as the topic’s author (native ram disk feature on magicbox).
    Did developers implement it?

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.