Adding Code

I recently bought some cheap Premium DVD-Rs, the same type i had used previously with succes(no coaster etc.). This batch however is from a different manufacturer(AML) I have never heard of them nor does the LiteOn 411S firmware recognize it. I am able to burn just fine @ 2x, but the media is rated @4x. Is there any way of adding the media code in order to make the burner burn these discs @ their rated speed?

Not that I know of. The code was recently added to the latest 851S and 812S FWs, so it will probably be in the latest 411S when it gets released.

Thats good to hear, thanks

hopefully they will release it soon…its so slow…

AML’s doing pretty good on my 812s
here is my scan:p


Originally posted by code65536
Not that I know of. The code was recently added to the latest 851S and 812S FWs, so it will probably be in the latest 411S when it gets released.

Who cares about adding codes? Why don’t you just add a provision in your speedhacking program to substitute one media code for another? :stuck_out_tongue:

Originally posted by Bicster
Who cares about adding codes? Why don’t you just add a provision in your speedhacking program to substitute one media code for another? :stuck_out_tongue:

Because I don’t know if modifying the firmware like that would work. There are a lot of things about the firmware that I don’t know understand (one of these days, I’m going to disassemble it and really poke at it, but not yet), and I don’t know if the drive will like you doing something like that. Since I don’t have any AML media or any other unrecognized media, I am unable to test it out to see if it would even work at all.

Now, if someone who knows how to manually edit the media code table and who also happens to have unrecognized media would like to test out the possibility of something like this working, I won’t mind hearing the results. :slight_smile:

Denis,

Why don’t you back up your firmware and try this with a hex editor? We can step you through it if you need help, or if you send me a firmware .BIN and the correct ID for your media, I’ll do it myself and send the firmware back to you.

Code - I understand your concerns but I bet it will work unless there is a hash table or something like that. I doubt they went to the effort of using a hash; that would involve an extra step during the firmware assembly process. I’m betting that they just dump them all in there. However, I could very well be wrong – one of the codes moved in the US0A -> US0F update.

Nevertheless, it is a harmless thing to test. Old “official” firmware can always be flashed back to the drive.

If Denis doesn’t want to test it, I’ll volunteer to bugger my drive by replacing all the media codes with bogus stuff and move the code for my media to a new location. Unfortunately, FedEx decided my workplace was closed today and didn’t deliver my drive. (Liars!) I guess I won’t be having as much fun burning DVD’s this weekend as I’d hoped for. :frowning:

Originally posted by Bicster
Nevertheless, it is a harmless thing to test. Old “official” firmware can always be flashed back to the drive.

That is true. :slight_smile: If you do try it out, let me know how it goes.

Originally posted by Bicster
[B]Denis,

Why don’t you back up your firmware and try this with a hex editor? We can step you through it if you need help, or if you send me a firmware .BIN and the correct ID for your media, I’ll do it myself and send the firmware back to you.

Code - I understand your concerns but I bet it will work unless there is a hash table or something like that. I doubt they went to the effort of using a hash; that would involve an extra step during the firmware assembly process. I’m betting that they just dump them all in there. However, I could very well be wrong – one of the codes moved in the US0A -> US0F update.

Nevertheless, it is a harmless thing to test. Old “official” firmware can always be flashed back to the drive.

If Denis doesn’t want to test it, I’ll volunteer to bugger my drive by replacing all the media codes with bogus stuff and move the code for my media to a new location. Unfortunately, FedEx decided my workplace was closed today and didn’t deliver my drive. (Liars!) I guess I won’t be having as much fun burning DVD’s this weekend as I’d hoped for. :frowning: [/B]

Ill be happy to do it. Just PM you’r e-mail adress and i’ll send you the stuff when i get back from work today. I’m using this 411s as 811s with the Zebra mod v4. So i’ll send you the media code(what program to use? DVDinfo??) and the firmware in bin format.

Originally posted by Denis
Ill be happy to do it. Just PM you’r e-mail adress and i’ll send you the stuff when i get back from work today. I’m using this 411s as 811s with the Zebra mod v4. So i’ll send you the media code(what program to use? DVDinfo??) and the firmware in bin format.

No need to send firmwares around. If you’re willing to try this out… (be warned, this is experimental, this might not work… but as Bicster said, barring any mistakes in the process, this shouldn’t cause any harm)

Anyway…

  1. You will need a Perl interpreter. Easiest way to get one is to download my speedhacker, as it includes a Perl interpreter (perl.exe)
  2. Extract from your drive a .BIN of your FW. Name this file “IN.BIN” and place it in the same directory where you unzipped the speedhacker (i.e., same directory as perl.exe)
  3. Create a new file in the same directory where you have perl.exe and IN.BIN. Name the file something like “AMLTEST.BAT”… copy the following lines into this file:

@echo off

perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endOfPerl

#!perl

$NULL2 = chr(0x00) x 2;

open file, "IN.BIN";
binmode file;
$data = join("", <file>);
close file;

if ($data =~ s/AN31\x00/AML$NULL2/)
{
	print "Patched.
";
	open file, ">OUT.BIN";
	binmode file;
	print file $data;
	close file;
}
else { print "Not patched.
"; }

__END__

:endOfPerl

  1. do this from the command prompt… running it by double-clicking on the .bat file might not always work, because of how Windows handles file paths from explorer vs. from command line… run the .BAT file that you just created… if successful, it should print out “Patched.” and write a new file named “OUT.BIN” (creative name, huh?)
  2. Load “OUT.BIN” with LtnFW or some other flasher.

What all this does: this code removes the AN31 media code from your firmware and places the AML media code in the slot once occupied by the AN31 media code.

After loading the FW, pop in the AML media, and see if it’s recognized as AML media… and of course, let us know how it went.

Unless you understand Perl well and know what you’re doing, do NOT edit my code above! The code above is a very quick hack, and if it’s edited incorrectly, it could potentially produce output firmwares that are invalid.

I did change media code using a Hex editor in order to use this AML media at 4x speed with GS0A on my 451@851.

I have replaced the first -R media code “PVC001001” with “AML” and also hacked the speed code from “02” ->“06”.

It works.:slight_smile:

Originally posted by code65536
[B]No need to send firmwares around. If you’re willing to try this out… (be warned, this is experimental, this might not work… but as Bicster said, barring any mistakes in the process, this shouldn’t cause any harm)

Anyway…

  1. You will need a Perl interpreter. Easiest way to get one is to download my speedhacker, as it includes a Perl interpreter (perl.exe)
  2. Extract from your drive a .BIN of your FW. Name this file “IN.BIN” and place it in the same directory where you unzipped the speedhacker (i.e., same directory as perl.exe)
  3. Create a new file in the same directory where you have perl.exe and IN.BIN. Name the file something like “AMLTEST.BAT”… copy the following lines into this file:

@echo off

perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endOfPerl

#!perl

$NULL2 = chr(0x00) x 2;

open file, "IN.BIN";
binmode file;
$data = join("", <file>);
close file;

if ($data =~ s/AN31\x00/AML$NULL2/)
{
	print "Patched.
";
	open file, ">OUT.BIN";
	binmode file;
	print file $data;
	close file;
}
else { print "Not patched.
"; }

__END__

:endOfPerl


4) *do this from the command prompt... running it by double-clicking on the .bat file might not always work, because of how Windows handles file paths from explorer vs. from command line*... run the .BAT file that you just created... if successful, it should print out "Patched." and write a new file named "OUT.BIN" (creative name, huh?)
5) Load "OUT.BIN" with LtnFW or some other flasher.

What all this does: this code removes the AN31 media code from your firmware and places the AML media code in the slot once occupied by the AN31 media code.

After loading the FW, pop in the AML media, and see if it's recognized as AML media... and of course, let us know how it went.

[b]Unless you understand Perl well and know what you're doing, do NOT edit my code above!  The code above is a very quick hack, and if it's edited incorrectly, it could potentially produce output firmwares that are invalid.[/b] [/B]

Worked like a charm. burning now @ 4x with my AML, will report back on the success of this burn

Originally posted by Denis
Worked like a charm. burning now @ 4x with my AML, will report back on the success of this burn

Oh. Hmm. So Bicster was right–it really is as easy as just swapping out some media codes. Maybe I’ll add a “media code rename” feature to my next version… :wink:

I’m not as stupid as my avatar looks :stuck_out_tongue:

I’m glad it works! Woohoo!

Originally posted by code65536
Oh. Hmm. So Bicster was right–it really is as easy as just swapping out some media codes. Maybe I’ll add a “media code rename” feature to my next version… :wink:

That might be a good feature, anyways the burn was a complete success, it works as it should

@Bicster

Hehe. It was a good suggestion. :slight_smile:

@Denis

I’m curious about these new AML discs. Any chance you could post a KProbe scan of it?

Originally posted by code65536
Oh. Hmm. So Bicster was right–it really is as easy as just swapping out some media codes.
Well, it it easy to replace the media code, but it it not so easy to find the best write strategy.
For each entry in the main media table there are entries in several tables stored right behind the main table which represent the optimal write strategy for each single media supported by the firmware.
It is quite obvious that the write strategy you take over when replacing the media name will not be perfect for your media.
To improve the burning quality you should try several burning strategies by replacing different media names and compare the kprobe scan results to find the best solution for your unsupported media.

Originally posted by ala42
Well, it it easy to replace the media code, but it it not so easy to find the best write strategy.
For each entry in the main media table there are entries in several tables stored right behind the main table which represent the optimal write strategy for each single media supported by the firmware.
It is quite obvious that the write strategy you take over when replacing the media name will not be perfect for your media.
To improve the burning quality you should try several burning strategies by replacing different media names and compare the kprobe scan results to find the best solution for your unsupported media.

Gotcha. Thanks.

*edit: Hmm. I suppose one solution to this would be to look at the write strategy table under US0F or GS0F (since they support the AML code), see what strat is being used, and then either modify the write strat in the FW that you’re patching or use that write strat to find a good “host” code

Originally posted by code65536
I suppose one solution to this would be to look at the write strategy table under US0F or GS0F (since they support the AML code), see what strat is being used, and then either modify the write strat in the FW that you’re patching or use that write strat to find a good “host” code
Right :slight_smile: I had a look at these tables a while ago. For +R and +RW media there were 8 tables each, so you have to be a bit careful …