Tries to detect the device referenced by filename.
First two "\" are skipped if present.
returns -1: if len( filename ) <= 3
returns 1: storage mem (fls0)
returns 2: SD-card (crd0)
returns -1: else
The SDK function Bfile_OpenFile calls 0x042C with
mode2 = 0. mode2 always should be used and set to 0. Possibly
it's of
significance in future implementations of 0x042C.
SDK Bfile_CloseFile directly calls 0x042D when
HANDLE & 0x0F000000 <> 0.
This is true with fls0- or crd0-handles.
0x042D must not be used to close a main memory handle!
returns 0 if successful
returns -5 if the handle is invalid
media_id is either {'\\','\\','f','l','s','0',0}
or {'\\','\\','c','r','d','0',0}.
returns -5, if media_id cannot be recognized,
else returns zero.
0x042E cannot be used to read the main memory freespace!
With the GII-2 models
freespace is an two element int-array: int freespace[2] (int64). The free
space is returned in freespace[1]. This call is not
compatible any more.
SDK Bfile_GetFileSize directly calls 0x042F when
HANDLE & 0x0F000000 <> 0.
This is true with fls0- or crd0-handles.
0x042F must not be used to get the filesize of a main memory handle!
SDK Bfile_ReadFile directly calls 0x0432 when HANDLE
& 0x0F000000 <> 0
This is true with fls0- or crd0-handles.
0x0432 must not be used to read from a main memory handle!
Creates either a file or a directory.
The SDK function Bfile_CreateFile calls 0x0434 with size pointing to
the required file size and mode = 1.
The SDK function Bfile_CreateDirectory calls 0x0434 with size = nil
and mode = 5.
0x0457:
void Bfile_StrToName_ncpy( unsigned short*dest, const unsigned char*source,
int n );
Copies a string to a
Bfile-name. If the length of source
is below n, dest
is padded. If source is
terminated by 0xFF dest is padded
with 0xFFFF else 0x0000!
(29.09.2012 12:58:00)