Welcome, Guest. Please login or register.

Author Topic: Need help on this: Reading directly from a file or handler...  (Read 3210 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Quote
I want to be able to chose the place on the buffer I want.

ACTION_READ is given address to read the data to. If the handler itself buffers something in memory, you don't know that.

Quote
But what I'd really want is to manipulate the data anywhere in that handler's buffer directly or copy it directly to the CPU registers without having to copy it to other memory location again before processing it.

Not possible without hacking. The handler itself is a blackbox you access thru well defined interface (dospackets, dos.library uses doscpakets internally).

If you want to use asyncron I/O, I suggest you look into asyncio.library.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Need help on this: Reading directly from a file or handler...
« Reply #1 on: August 25, 2004, 04:59:41 PM »
Quote
I'm pretty sure the ramdisk also uses the Amiga filesystem doesn't it ?

What do you mean? Does it use dospacket interface? Yes, all filesystems do. Does it use FastFileSystem? No. Ramdisk uses custom filesystem (ram-handler) and it uses no exec device (such has scsi.device or ramdrive.device).

Quote
If so I'll be able to configure the external program I'm using (Digicam) to save to the ramdisk

If the program saves to a file, and you can configure it to save to any path, why not?

Quote
and then hack into the filesystem directly.

Do what exactly?
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Need help on this: Reading directly from a file or handler...
« Reply #2 on: August 26, 2004, 01:18:54 PM »
Quote
I couldn't find information on the DevCD about the the way the ram-handler lays out data into memory though.

It's quite obvious: The internal memory layout is implementation specific stuff, and it can change from version to version. You don't know how the handler stores the data internally! Remember that filesystem is a blackbox that you *only* can access thru defined API, that is dospackets.

Quote
I just want to be able to copy the data directly to the CPU registers to avoid the overhead of having to copy it somewhere in memory first as is the case if I use DOS functions wich use the ACTION_READ packet anyway (I think).

You can't do this. Read above.

Quote
No direct data modifications though. After I copy it to the CPU registers it would be placed somewhere else if necessary, after the checking I want to do with it.

No excuse. Since you don't know how the data is stored in memory, you can't peek it directly.