Author |
Topic: File conversion (Read 1508 times) |
|
nitwit
Guest
|
 |
File conversion
« Thread started on: Apr 25th, 2010, 09:43am » |
|
I tried to use FCONVERT.BBC but it doesn't seem to work properly.
It's a data file (I have lots) in VirtualAcorn called LODATA,ffd. It's only 8 KB (one of the small ones). It only partially converts in that some of the right-hand data does appear.
Whats going wrong?
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: File conversion
« Reply #1 on: Apr 25th, 2010, 5:54pm » |
|
on Apr 25th, 2010, 09:43am, Guest-nitwit wrote:I tried to use FCONVERT.BBC but it doesn't seem to work properly. Whats going wrong? |
|
A fully automated conversion from 'Acorn-format' to 'Russell-format' data files isn't possible, and there are several circumstances when FCONVERT.BBC won't work. A common reason is that the data file is designed to be read using a mixture of INPUT# and BGET# (or GET$#). Other possibilities are that the file contains strings incorporating the CR (CHR$13) character, or floating-point values that are out-of-range.
Another thing to bear in mind is that even if FCONVERT has worked 'correctly' the sizes of the records may be different from the original file, so random access won't work using the same values of PTR#.
In all such cases you must either write your own conversion utility, or alternatively modify the program which reads the file so that it understands the original file contents (which is always possible).
The Acorn data file format is particularly strange (for example strings are written backwards!) so there was no way I was going to adopt it for my versions of BBC BASIC. BBC BASIC (Z80), BBC BASIC (86) and BBC BASIC for Windows all use the same data file format.
Richard.
|
« Last Edit: Apr 25th, 2010, 5:57pm by admin » |
Logged
|
|
|
|
nitwit
Guest
|
 |
Re: File conversion
« Reply #2 on: May 4th, 2010, 2:38pm » |
|
Disappointing but I understand. I will convert my data files to your format. Sadly no-one has come up with a ready made solution. VirtualAcorn is to my mind the natural step between a 'real' RISC OS machine and 'Windows'.
The method is slightly tricky. The VA file is called eg LODATA,ffd. (If you 'look' in Notepad you will see it is backwards with 2 extra characters and presumably a control character. Print it out and it looks OK ). Copy this somewhere safe and change the name to LODATA.DFS. Run that through FCONVERT.BBC and call it LODATA.DAT. 'Look' in Notepad and it seems OK but its not! Printing it out shows extra blank lines at start of the file. Load it into an array (I 'fiddled' the program I am working on) and save it excluding the unwanted lines to say LOODATA.DAT. Job done!
|
|
Logged
|
|
|
|
|