[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VSDRIVE stand alone host (no pc) thread



OK 

I have been banging my head again the desk for nearly a week and still have a issue reading directories in prodos ... root works fine but that's not the point.

if I use the math from the original GS only version, who's code is written in VC++, and I go into a directory, I get a garbled prefix name, and either a single garbled file name, or an empty directory listing.

for reference, the position is calculated as ...

512*command[1]+131072*command[2], // bytes to move pointer

If I do it the ADTpro style

  if(input[1] >= 0) HI = input[1];
  else HI = 256 + input[1];
  
  if(input[2] >= 0) LO = input[2];
  else LO = 256 + input[2];
  
  word block = (HI * 256) + LO;
  file.seekSet(block);

it tosses up a I/O ERROR, but if I change 

word block = (HI * 256) + LO;

to

word block = (HI * 512) + LO;

I get the root directory perfectly, I get a sub directory with the right number of files, but the names/data are still all garbled up!

I can then eject the SD card, drag n drop the exact same file on my computer and it works perfectly from ADTpro. and its freaking annyoing as this big pain in the butt is holding up most of the rest of the project.

Any help or insight from the authors is most welcome

Thanks