TBC-5000 USB stick format

Spezielle Fragen zur DVB-T Version
pa4wdh
Vielfrager
Vielfrager
Beiträge: 17
Registriert: Fr 21. Dez 2012, 16:55

AW: TBC-5000 USB stick format

#21

Beitrag von pa4wdh » Mo 24. Dez 2012, 13:01

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 ! :)

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
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

#22

Beitrag von FireBird » Mo 24. Dez 2012, 13:02

Strange, because the firmware doesn't use 64-bit vars and therefore you shoudln't need either. But if it is working... :)

pa4wdh
Vielfrager
Vielfrager
Beiträge: 17
Registriert: Fr 21. Dez 2012, 16:55

AW: TBC-5000 USB stick format

#23

Beitrag von pa4wdh » Mo 24. Dez 2012, 13:13

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.

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
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

#24

Beitrag von FireBird » Mo 24. Dez 2012, 13:18

Oops, I've mixed up the 2GB and the 2TB limits. Of course, you need 64 bits to address the right sector.

pa4wdh
Vielfrager
Vielfrager
Beiträge: 17
Registriert: Fr 21. Dez 2012, 16:55

AW: TBC-5000 USB stick format

#25

Beitrag von pa4wdh » Mo 24. Dez 2012, 13:23

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.

pa4wdh
Vielfrager
Vielfrager
Beiträge: 17
Registriert: Fr 21. Dez 2012, 16:55

AW: TBC-5000 USB stick format

#26

Beitrag von pa4wdh » So 30. Dez 2012, 12:14

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.

Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
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

#27

Beitrag von FireBird » So 30. Dez 2012, 13:04

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.

pa4wdh
Vielfrager
Vielfrager
Beiträge: 17
Registriert: Fr 21. Dez 2012, 16:55

AW: TBC-5000 USB stick format

#28

Beitrag von pa4wdh » So 30. Dez 2012, 18:49

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.

pa4wdh
Vielfrager
Vielfrager
Beiträge: 17
Registriert: Fr 21. Dez 2012, 16:55

AW: TBC-5000 USB stick format

#29

Beitrag von pa4wdh » Sa 5. Jan 2013, 12:58

A short update:
I got it working ! :hello:
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 ?

Benutzeravatar
Twilight
Zauberküchencheflehrling mit extra Butter
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

#30

Beitrag von Twilight » So 6. Jan 2013, 12:47

Good work! :respekt:

Twilight

Antworten

Zurück zu „TF5000PVRt - Terrestrischer Empfang“