Tuesday, May 10, 2011

Diff and Patch a file in Linux

Yesterday i ran into an Problem, i needed to Burn an DVD+R DL and the file i needed to burn was at 300Mbytes and an DVD+R DL got a capacity of 8,4 Gbytes. So i used the standard GROWISOFS command to start a normal Burn i selected the file and i told me the following weird message:


growisofs: :( more than 50% of space will be *wasted*!
                      go use single layer disc for this!


My mind was, what the hack ?! Linux is Open Source but i never thought it is  ecofriendly, so tried a few commands but no way, it wont let me burn a DVD when about 50% of space will be wasted ...


 A search later i found an PATCH to apply to get rid of this problem. As follows this is the patch file needed to apply on the original growisofs_mmc.cpp before compiling the whole program.

T

--- growisofs_mmc.cpp.orig      Mon Dec 28 02:58:51 2009
+++ growisofs_mmc.cpp   Mon Dec 28 03:00:12 2009
@@ -1622,11 +1622,6 @@ static void plus_r_dl_split (Scsi_Command &cmd,off64_t
     blocks = size/2048;
     blocks += 15, blocks &= ~15;

-    if (blocks <= split)
-       fprintf (stderr,":-( more than 50%% of space will be *wasted*!\n"
-                       "    use single layer media for this recording\n"),
-       exit (FATAL_START(EMEDIUMTYPE));
-
     blocks /= 16;
     blocks += 1;
     blocks /= 2;
@@ -2059,10 +2054,6 @@ pwrite64_t poor_mans_setup (void *fd,off64_t leadout)
                layer_size |= dvd_10[4+14]<<8,
                layer_size |= dvd_10[4+15];

-               if (data_size <= layer_size)
-                   fprintf (stderr,":-( more than 50%% of space will be *wasted*!\n"
-                                   "    use single layer media for this recording\n"),
-                   exit(FATAL_START(EMEDIUMTYPE));
            }
            if (is_dao && leadout)
                minus_r_reserve_track(cmd,leadout);


So to apply this simple patch file to our  growisofs_mmc.cpp we need to use the Program "patch" or "diff"
first i will guide you trough this patch file.

First Part:
--- growisofs_mmc.cpp.orig      Mon Dec 28 02:58:51 2009
+++ growisofs_mmc.cpp   Mon Dec 28 03:00:12 2009 

@@ -1622,11 +1622,6 @@ static void plus_r_dl_split (Scsi_Command &cmd,off64_t 

is the Description and some Info for the file itself, called lines of context...

Part Two:
the lines with an - in front of them are going to be deleted, the others are going to be changed.


So long we apply this patch with ->
patch growisofs_mmc.cpp < patch.txt
 
And voila this sould be the mesasge you'll get:
 
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- growisofs_mmc.cpp Sun Feb 26 19:35:43 2006
|+++ growisofs_mmc.cpp Sun Feb 26 19:35:14 2006
--------------------------
Patching file patchtest using Plan A...
Hunk #1 succeeded at 2.
done 

The Google Patch :)


 No im able to waste Disks on my linux machine :D

Monday, May 9, 2011

XBOX 360, and some wasted brute disks!

My Xbox 360 an very old Model of it, i bought it in July 2006, it was the first Model with an Heat Pipe and also the new Hitachi DVD Drive, this version doesnt tend to get overheated and destroy itself :D so it runs and runs and runs till now.


The only Problem im facing right now is, my console needs around 15 Minutes to get warm before i can play any game. This means i insert an DVD and then i sit and press the A-Button on my wireless controller to let the drive eject and close again, yeah around 50 Times then it starts Reading the DVD and voila game is up and running.
After this treatment every game runs within the first 3 Tries the whole day, till i let my XBOX cool down around an hour or so.

Yesterday i thought PORTAL II is available for 360 and i thought, i must have it! Go and Buy!
But the Problem, Sunday no store got opened for me, so a called a friend of mine and i knew he bought it alredy ;) so i started over to him and asked if i can borrow the game.
Answer was no, cause he told me i never take care of this game and he newly bought it and dont want it to get wasted to fast by a person like mine. Uhm alright i said. Lets ->

So i flushed out of my pants an fresh Verbatim Dual DVD Layer brute and told hmi okay let me do a Backup and i take both games with me at home but i only will play the backup so your game will not be harmed! 
about an hour later i got a fresh Backup and an Original of Portal II 

Back home i tried to play the Backup - but then - my XBOX told me DVD Video ready to play.

I clicked Play a thousand times but it wasnt able to play that game, so i backed the original Up again and again and an fourth time again. And i wasnt able to figure out why it wouldnt work...

I backup the game using IMGBURN in Windows, but no Luck.
growisofs -speed=2 -dvd-compat -Z -use-the-force-luke=dao -use-the-force-luke=break:1913760 /dev/{{laufwerksname}}={{isoname}}.iso

I Used the Force of Luke with Linux but nothing else happened.
My last try was an APPLE Mac with OSX 10.3, no way to get an DUAL LAYER BREAK at the Point given for XBOX 360 games, so an OSX user would never have the chance to burn an 360 game in any way. I loughed myself a bit in this sad situation when the apple users began to talk about VDPC with WIN and DARWIN :)


Long Story short.
I lastly figured out why the game would not work on my console... So i have to tell you if you got the same Problem... Download this file here Activate_iso.rar and burn it like you would burn any game for Microsoft X360 i prefered IMG BURN on windows, cause there are some Special settings that should be done ...
After burning this 250 MB Image to an dual layer dvd you can insert it into your Xbox 360 and let it loud about 1 Minute after that put your Backupped game into your DVD Drive and voila :D it would load the game, no need of burning it 4 or 5 times ;)

use this settings for IMGBURN:

if you didnt got it right now and need further infos, i please you continue reading here -> WELL DONE
very well written article and some additional infos more than are written here, for trouble shooting you can also ask.


GOOD LUCK