log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Code GCC produces that makes you cry #12684 (Prog:39)
- Rougol November 2024 meeting on monday (News:)
- Announcing the TIB 2024 Advent Calendar (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
- RISC OS London Show Report 2024 (News:1)
- RISC OS London Show 2024 - pictures (News:2)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Wimpslot/RAMdisc
 
  Wimpslot/RAMdisc
  WILLA (11:16 4/1/2019)
  nunfetishist (11:27 4/1/2019)
    WILLA (11:50 4/1/2019)
      arawnsley (11:53 4/1/2019)
        WILLA (14:49 4/1/2019)
      nunfetishist (13:13 4/1/2019)
  CJE (11:31 4/1/2019)
    arawnsley (11:48 4/1/2019)
 
Peter Wilson Message #124423, posted by WILLA at 11:16, 4/1/2019
Member
Posts: 3
Hello,
I've been chugging along without any issues using Risc PCs since the early 90s. However as a data file has become bigger and bigger I've now got memory issues.

I have 3 solutions:
1) for some reason the maximum wimpslot I can create is 28640k. How can this be increased? I have 15912k free.
2) load the data file into a RAMdisc. Can I then access the data as if normal memory? If so how do I get the start address?
3) somehow make the data file smaller

I'm hoping someone can help me with either 1) or 2).

I'm using Risc OS 3.7.

Thanks.
  ^[ Log in to reply ]
 
Rob Kendrick Message #124424, posted by nunfetishist at 11:27, 4/1/2019, in reply to message #124423
nunfetishist
Today's phish is trout a la creme.

Posts: 524
I have 3 solutions:
1) for some reason the maximum wimpslot I can create is 28640k. How can this be increased? I have 15912k free.
No. This is a limitation of the 26 bit program counter. The only way this could be increased is to move to a 32 bit OS (such as RISC OS 5), but that will come with a lot of compatibility issues with your current software.
2) load the data file into a RAMdisc. Can I then access the data as if normal memory? If so how do I get the start address?
If the software supports this, yes, but I strongly doubt it. What software are you using? Is there a newer version that can use a dynamic area instead of the WIMP slot for the data?
  ^[ Log in to reply ]
 
Chris Evans Message #124425, posted by CJE at 11:31, 4/1/2019, in reply to message #124423
CJE Micros chap
Posts: 228
1. That is the limit until you get to RISC OS 5
2. You'd have to address it as a file which would be much much slower.
3. What type of file and data is it.

May be it's time to upgrade to a RaspberryRO lite or better!
  ^[ Log in to reply ]
 
Andrew Rawnsley Message #124426, posted by arawnsley at 11:48, 4/1/2019, in reply to message #124425
R-Comp chap
Posts: 600
Although the above postings are broadly correct, it *is* possible to go a bit further with the RiscPC (although in all honesty, I'd recommend OS 4 as a miniumum - 3.70 has some annoying bugs/omissions and RISC OS 4 is much the better choice).

Firstly, whilst wimpslots are limited to 28 MB, I believe Dynamic Areas can be much larger. This is how programs like Photodesk, ImageMaster and others get past the 28MB limitation.

If you're writing your own code, look at using DAs to solve the issue. If you're using a pre-made application, it'd be useful to know what the program is - some (eg. Impression) can be coaxed into using DAs instead of wimpslot and vice-versa.

There were even programs that allowed "larger than RAM" data files using virtual memory (albeit slowly). Clares' Virtualize springs to mind.

Secondly, I *think* you can go beyond 28MB RAM disc via Memphis (aka MemFS), if you can find it. This is a dynamic RAM disc, which can grow and save contents etc. However, it doesn't solve your initial problem of accessing the large files.

The final comment is that once files get large, they need a corresponding amount of CPU grunt to handle/process, and ideally disc IO. This is where you'd be better served by a newer machine.

As Chris says, there are cheap Raspberry Pi based offerings, although these lack a bit in disc-IO, so wouldn't be my first choice for large file handling. I'd look for something with native SATA for SSD etc, which are typically 10x faster for disc operations. Examples include our mini.m / ARMX6 and the Titanium board, or Chris' IGEP system.


[Edited by arawnsley at 11:50, 4/1/2019]
  ^[ Log in to reply ]
 
Peter Wilson Message #124427, posted by WILLA at 11:50, 4/1/2019, in reply to message #124424
Member
Posts: 3
Thanks for the quick replies.

It's my own code. It was originally written before I even had a hard disc! I did have a go at upgrading the OS a long time ago but there were too many issues and it's a lot of code.

The data is just a text file. Changing the format isn't an option.

If it's not possible to load the file into memory outside the wimpslot and access it from the software then I'll have to eek out some memory from other areas.
  ^[ Log in to reply ]
 
Andrew Rawnsley Message #124428, posted by arawnsley at 11:53, 4/1/2019, in reply to message #124427
R-Comp chap
Posts: 600
Since it is your own code, it *should* be possible to load it into a dynamic area. Of course, you'll need to look into the PRMs for more info on that - the 3.50 supplement I believe.

Also, you may find the ROOL forums more helpful if you need assistance with that, as there are some very experienced coders on there with much experience of DAs etc (although some post here too). It's a more active forum, which may help when you're coding.
  ^[ Log in to reply ]
 
Rob Kendrick Message #124429, posted by nunfetishist at 13:13, 4/1/2019, in reply to message #124427
nunfetishist
Today's phish is trout a la creme.

Posts: 524
It's my own code. It was originally written before I even had a hard disc! I did have a go at upgrading the OS a long time ago but there were too many issues and it's a lot of code.

The data is just a text file. Changing the format isn't an option.

If it's not possible to load the file into memory outside the wimpslot and access it from the software then I'll have to eek out some memory from other areas.
Change your program to use https://www.riscosopen.org/wiki/documentation/show/OS_DynamicArea to allocate the memory for your data (code must remain in a WIMP slot). Dynamic areas exist beyond 28MB so can only be used for data when running the CPU in 26 bit mode.

Alternatively, if your input is just plain text, would it be possible to rewrite your program such that it processes the file line-by-line, such that it does not need loading into memory?

It is at times like this I wish RISC OS had mmap().
  ^[ Log in to reply ]
 
Peter Wilson Message #124430, posted by WILLA at 14:49, 4/1/2019, in reply to message #124428
Member
Posts: 3
Thanks Andrew.

DynamicArea was the way to go. Dug out the old PRMs and it was pretty straightforward.

Should get me through to either re-coding everything or retirement whichever is sooner.
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Wimpslot/RAMdisc