TBC-5000 USB stick format
AW: TBC-5000 USB stick format
Never mind my question, i forgot to use off64_t on one place so it didn't work out. I fixed that and now it works !
- FireBird
- Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
- Beiträge: 28923
- Registriert: Fr 9. Dez 2005, 09:59
- Receivertyp: SRP-2401CI+ TFIR
vu+ Duo 4k - Wohnort: Wien
AW: TBC-5000 USB stick format
Strange, because the firmware doesn't use 64-bit vars and therefore you shoudln't need either. But if it is working...
AW: TBC-5000 USB stick format
I think the problem is that i have to access the device at byte level, so some clusters start at a position higher than 4GB and are out of range for a 32 bits variable.
- FireBird
- Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
- Beiträge: 28923
- Registriert: Fr 9. Dez 2005, 09:59
- Receivertyp: SRP-2401CI+ TFIR
vu+ Duo 4k - Wohnort: Wien
AW: TBC-5000 USB stick format
Oops, I've mixed up the 2GB and the 2TB limits. Of course, you need 64 bits to address the right sector.
AW: TBC-5000 USB stick format
Everything works pretty good so far, i got my recordings in separate files, but i have to fine-tune the last cluster a bit. I'm now just copying the complete last cluster which is more than i actually need.
After that i'll try to build a FUSE interface so i can access it like a normal filesystem and just copy/play files directly from there.
After that i'll try to build a FUSE interface so i can access it like a normal filesystem and just copy/play files directly from there.
AW: TBC-5000 USB stick format
I'm now trying to calculate the file size and i'm not sure about one detail:
The directory information give me:
1) Number of clusters
2) Number of unused sectors in the last cluster in bytes
3) Number of used bytes in the last sector
The first 2 are pretty straight forward i think:
( the number of clusters * number of sectos per cluster * number of bytes per sector ) - number of unused sectors in the last cluster
Should give a good result.
Now the number of unused bytes in the last sector comes in I thought:
Result of calculation so far - number of bytes per sector + number of used bytes in last sector
I guess this would be ok, but my files all seem to have 0 of the number of used bytes in the last sector. Now, should i still substract the number of bytes per sector or not ?
I've hexdump'ed the rec files i have to see if i can see a common indication for the end of the file but i couldn't find one.
The directory information give me:
1) Number of clusters
2) Number of unused sectors in the last cluster in bytes
3) Number of used bytes in the last sector
The first 2 are pretty straight forward i think:
( the number of clusters * number of sectos per cluster * number of bytes per sector ) - number of unused sectors in the last cluster
Should give a good result.
Now the number of unused bytes in the last sector comes in I thought:
Result of calculation so far - number of bytes per sector + number of used bytes in last sector
I guess this would be ok, but my files all seem to have 0 of the number of used bytes in the last sector. Now, should i still substract the number of bytes per sector or not ?
I've hexdump'ed the rec files i have to see if i can see a common indication for the end of the file but i couldn't find one.
- FireBird
- Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
- Beiträge: 28923
- Registriert: Fr 9. Dez 2005, 09:59
- Receivertyp: SRP-2401CI+ TFIR
vu+ Duo 4k - Wohnort: Wien
AW: TBC-5000 USB stick format
IIRC, the last field has been added to the structure when TAPs have been invented and it was necessary to address files which are smaller than a sector. So if you just want to transfer recs, you can ignore it. A recording will not always end at a sector boundary and the remaining bytes will contain random junk but that usually doesn’t bother.
AW: TBC-5000 USB stick format
Ok, thanks.
In that case i'll keep it as i have now: If the "number of bytes of the last sector" is greater than 0 i substract the number of bytes per sector and add that number, if it's zero i ignore it.
That more of less completes my proof-of-concept and now i can start building the real filesystem interface.
In that case i'll keep it as i have now: If the "number of bytes of the last sector" is greater than 0 i substract the number of bytes per sector and add that number, if it's zero i ignore it.
That more of less completes my proof-of-concept and now i can start building the real filesystem interface.
AW: TBC-5000 USB stick format
A short update:
I got it working !
The files on my USB stick are now presented as a real filesystem and i can play files directly from there. I need to do some more testing and clean up the code a bit, but as far as i can see it's usable
Is anyone here interested to test it ?
I got it working !
The files on my USB stick are now presented as a real filesystem and i can play files directly from there. I need to do some more testing and clean up the code a bit, but as far as i can see it's usable
Is anyone here interested to test it ?
- Twilight
- Zauberküchencheflehrling mit extra Butter
- Beiträge: 64898
- Registriert: Fr 9. Dez 2005, 09:17
- Receivertyp: 1 x SRP 2100(TMS) TFIR und .1 x SRP 2410 M
- Wohnort: Wien Umgebung
AW: TBC-5000 USB stick format
Good work!
Twilight
Twilight