Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| dateiformat [24.04.2015 10:28] – [Die txt-Datei] martin | dateiformat [11.08.2021 10:15] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 50: | Zeile 50: | ||
| ====== Die png Datei ====== | ====== Die png Datei ====== | ||
| - | Ein png-Bild der Größe 140px × 193px. (???) | + | Ein png-Bild |
| ====== Die ouf Datei ====== | ====== Die ouf Datei ====== | ||
| Zeile 60: | Zeile 60: | ||
| | Index-Tabelle | n x 12 byte = n x 3 x 32 bit | | | Index-Tabelle | n x 12 byte = n x 3 x 32 bit | | ||
| | Padding || | | Padding || | ||
| - | | MP3 / Binärscode | + | | MP3 (incl. optionalem ID3-Tag ) / Binärcode |
| | Padding || | | Padding || | ||
| - | | MP3 / Binärscode | + | | MP3 (incl. optionalem ID3-Tag ) / Binärcode |
| | ... || | | ... || | ||
| - | | MP3 / Binärscode | + | | MP3 (incl. optionalem ID3-Tag ) / Binärcode |
| ===== Dateikopf ===== | ===== Dateikopf ===== | ||
| - | | 0 | Startposition der Index-Tabelle | 0x0068 | | + | | 0 (0x00) |
| - | | 4 | unbekannt | 2 | | + | | 4 (0x04) |
| - | | 8 | erste Ting-ID | 15001 (15000 gefunden; laut " | + | | 8 (0x08) |
| - | | 12 | letzte Ting-ID | | + | | 12 (0x0c) |
| - | | 16 | Anzahl der genutzten Ting-IDs | Entspricht nicht immer letzte Ting-ID – erste Ting-ID + 1 (???) | | + | | 16 (0x10) |
| - | | 20 | Buch-ID || | + | | 20 (0x14) |
| - | | 24 | unbekannt | Werte im Bereich 1 bis 20 gefunden (häufig gefunden: 2, 5, 7 und 11) | | + | | 24 (0x18) |
| - | | 28 | Erstellungszeitpunkt | + | | 28 (0x1c) | Erstellungszeitpunkt |
| - | | 32 | unbekannt | 0 | | + | | 32 (0x20) |
| - | | 36 | unbekannt | 0x0000ffff | | + | | 36 (0x24) |
| ===== Index-Tabelle ===== | ===== Index-Tabelle ===== | ||
| Zeile 92: | Zeile 92: | ||
| ===== Padding ===== | ===== Padding ===== | ||
| - | Die einzelnen Einträge (MP3 oder Binärcode) fangen immer an einer Adresse | + | Die einzelnen Einträge (MP3 oder Binärcode) fangen immer an einer Adresse |
| ===== Funktionen ===== | ===== Funktionen ===== | ||
| Zeile 105: | Zeile 105: | ||
| < | < | ||
| + | |||
| + | |||
| + | private static int getNextAddress(int x) { | ||
| + | x += 0x100 - (x & 0xff); | ||
| + | while(x % 0x200 != 0) { | ||
| + | x += 0x100; | ||
| + | } | ||
| + | return(x); | ||
| + | } | ||
| + | |||
| pos = 12 * <Anzahl der Eintrage im Index> + < | pos = 12 * <Anzahl der Eintrage im Index> + < | ||
| - | pos += (0x100 - (pos % 0x100)) % 0x100 | + | pos = getNextAddress(12 * <Anzahl der Einträge im Index> + < |
| - | while(<Die 12 (???) Bytes an der Stelle | + | while(!isMp3(<daten ab pos>) && !isScript(< |
| - | pos += 0x100; | + | pos += 0x200; |
| } | } | ||
| </ | </ | ||
| Zeile 132: | Zeile 142: | ||
| private static int getCodeFromPositionInFile(int position, int n) { | private static int getCodeFromPositionInFile(int position, int n) { | ||
| if(((position & 0xFF) != 0x0) | (n < 0)) { | if(((position & 0xFF) != 0x0) | (n < 0)) { | ||
| - | return(-1); | + | return -1; |
| } | } | ||
| n--; | n--; | ||
| Zeile 139: | Zeile 149: | ||
| int v = (b - E[k]) << 8; | int v = (b - E[k]) << 8; | ||
| if(getPositionInFileFromCode(v, | if(getPositionInFileFromCode(v, | ||
| - | return(v); | + | return v; |
| } | } | ||
| } | } | ||
| - | return(-1); | + | return -1; |
| } | } | ||
| Zeile 154: | Zeile 164: | ||
| public static int getPositionInFileFromCode(int code, int n) { | public static int getPositionInFileFromCode(int code, int n) { | ||
| if(((code & 0xFF) != 0x0) | (n < 0)) { | if(((code & 0xFF) != 0x0) | (n < 0)) { | ||
| - | return(-1); | + | return -1; |
| } | } | ||
| n--; | n--; | ||
| Zeile 162: | Zeile 172: | ||
| (((code >> 9) & 0x1) << 4); | (((code >> 9) & 0x1) << 4); | ||
| code -= n * 0x1A - E[c]; | code -= n * 0x1A - E[c]; | ||
| - | return(code << 8); | + | return code << 8; |
| } | } | ||
| </ | </ | ||
| + | |||