FU Logo
  • Startseite
  • Kontakt
  • Impressum
  • Home
  • Listenauswahl
  • Anleitungen

Re: [linux-minidisc] First patch for write support on HiMD available

<-- thread -->
<-- date -->
  • From: manner.moe@gmx.de
  • To: "Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>
  • Date: Mon, 14 Mar 2011 20:56:17 +0100
  • Cc: linux-minidisc@lists.fu-berlin.de
  • Reply-to: manner.moe@gmx.de
  • Subject: Re: [linux-minidisc] First patch for write support on HiMD available

>----- Originale Nachricht -----
>Hello,

>after several months of hacking and frustrations, Mårten has finally published his
>first patch to libhimd to provide write support for MP3s onto HiMDs.

First, thanks for the great work.

>Please test this code as much as you can, especially on real hardware and
>make suggestions and bug reports. We count on you!

O.K., i made some tests on 32bit Windows XP using my RH1 and a blank 74min 
minidisc initialized with SonicStage.

First of all I noticed that SonicStage cannot use the disc because it is not 
initialized with SonicStage, my RH1 doesn´t recognized the new track and 
QHimdTransfer cannot find the new track, too 
Only himddump seems to find the track.

The reason ist that the play order table inside trkidxXX.hma file (at 0x100) 
is not updated.

After fixing this the RH1 and QHiMDTransfer can find the track but my RH1 
cannot play it (errormessage "cannot play").
QHiMDTransfer can upload it again, this works fine.

So, i downloaded the same file with SonicStage and compared it´s entries in 
the trkidx file:

from SonicStage downoad:
0x8050:  00 00 00 00 00 00 00 00 00 01 00 03 00 04 00 00 
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
              01 03 00 B0 00 01 00 01 01 E2 10 01 D9 10 00 00 
              01 0F 50 00 00 04 00 00 00 52 E4 26 C3 6E F4 A8 
              2F 29 8C 25 00 00 00 00 00 00 00 00 01 00 40 00
0x30010: 00 00 00 00 00 00 00 00 00 00 01 D9 00 0D 00 00

from himddump download
0x8050:  60 20 00 00 00 01 00 12 00 01 00 00 00 00 01 00 
              87 4C 4F 70 00 00 00 00 00 00 00 00 00 00 00 00 
              01 03 00 00 00 01 00 01 01 E2 00 00 00 00 00 00 
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
              00 00 00 00 60 20 00 00 60 20 00 00 00 00 00 00
0x30010: 87 4C 4F 70 00 00 00 00 00 00 01 D8 00 1D 00 00

I made some more changes to let them look similar.
- leave trackkey and fragmentkey clear (zero)
- set ekbnum to zero
- insert random number generated contentid
- insert codec specific information (mp3 file dependent)
- insert DRM information (magical bitfields: Lt, Dest, Xcc, Cc)
- insert "SMPA" string and low 32bit of contentid in audio block footer

Most of my changes are just dirty hacks, but this this should work for 
debugging.

Now it looks like this:
0x8050:  60 20 00 00 00 00 00 00 00 01 00 00 00 00 01 00 
              00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
              01 03 00 B0 00 01 00 01 01 E2 10 01 D9 10 00 00 
              02 03 00 00 4C 3B 6F E8 0D EF BA 33 2D 44 8F 80 
              EF 5C 37 E6 60 20 00 00 60 20 00 00 01 00 40 00
0x30010: 00 00 00 00 00 00 00 00 00 00 01 D8 00 1D 00 00

not fixed yet:
- SonicStage seems to need more frames for the same track (maybe it converts 
the file into another sample rate ?)
- dos_settime seems not to work correctly (only on windows?)
- links to string table (title, artist, album) are not set correctly?
  title is stored at index 01 (0x40010) of string table but is shown as 
"unknown title" in himddump, artist and album are not set.
- RH1 cannot play this track anyway and SonicStage cannot use the disc.

The "cannot play" error message of my RH1 should only appear for incorrect 
DRM rights or incompatible mp3 encoding as far as i know.
The codec of my test file is MPEG1 Layer3, stereo, 128kb/s@44k1Hz, can anyone 
please give me the correct codec specific information to set in the track 
info?  

One more bug is in using the correct trkidx file when downloading a track to 
a disc that is not blanc.
I tested this on a disc with the current index 2 (atdata02.hma, 
mclist012.hma, trkidx02.hma).
After download the new trackinfo is stored in trkidx01.hma, trkidx02.hma is 
unchanged and a new temporary file trkidx.tmp is stored.
Maybe it´s better to just change the contents of the current trkidx file 
instead of scanning for tif files (mp3 only).
For future use (atrac download), which needs update of the current index, 
just change the contents of the backup trkidx file and rename it.
I think these files have fix sectors on the disc (not confirmed), so storing 
or moving of files could make the disc unreadable for himd recorders and 
SonicStage.
I tested this at the beginning of our project.
I moved all the files in HMDHIFI folder to my harddisc and restored it.
The disc was unreadable by all my recorders (audio file error) and 
SonicStage, i left the files unchanged.

You can find my changes in the attached modified patch.

Thomas

Attachment: 0001-Changing-mp3-transfer-routines.patch
Description: Binary data

<-- thread -->
<-- date -->
  • linux-minidisc - March 2011 - Archives indexes sorted by:
    [ thread ] [ subject ] [ author ] [ date ]
  • Complete archive of the linux-minidisc mailing list
  • More info on this list...

Hilfe

  • FAQ
  • Dienstbeschreibung
  • ZEDAT Beratung
  • postmaster@lists.fu-berlin.de

Service-Navigation

  • Startseite
  • Listenauswahl

Einrichtung Mailingliste

  • ZEDAT-Portal
  • Mailinglisten Portal