•   Notifications
  • Welcome to our forums

    Join us now to get access to all our awesome features. Once registered and logged in, you will be able to create topics, post replies, give reputation to your fellow members, get your own private messenger, and so, so much more.

    + Reply to Thread + Post New Thread
    Results 1 to 5 of 5

    Thread: Make 1 : 1 Copies of UT 2003
  • Share This Thread!
    • Share on Facebook
    1. #1

      Make 1 : 1 Copies of UT 2003

      I find this and is very good.
      Thnks to Khaine

      ---------------------------------------------------------------------------------------
      If you have a legit copy of UT2K3, then could you try and make a copy using this code.

      I cannot take any credit for this, it was all CD Freaks Expert blackcheck, from the cdfreaks board.




      code:--------------------------------------------------------------------------------
      /* twinpeak.cpp */


      #include
      #include



      HANDLE hImgFile = INVALID_HANDLE_VALUE, hSubFile = INVALID_HANDLE_VALUE;

      DWORD dwImgFileSize, dwSubFileSize;
      DWORD dwSectorCount;

      DWORD* dwSectorTable = NULL;



      void Exit()
      {
      // clean up stuff
      if(hImgFile != INVALID_HANDLE_VALUE) CloseHandle(hImgFile);
      if(hSubFile != INVALID_HANDLE_VALUE) CloseHandle(hSubFile);
      if (dwSectorTable != NULL) delete dwSectorTable;
      ExitProcess(0);
      }

      bool OpenImageFile(char * szFileName)
      {
      char szName[256];

      // construct file name
      lstrcpy(szName, szFileName);
      lstrcat(szName,".img");

      // open the file
      hImgFile= CreateFile(szName, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);

      if(hImgFile==INVALID_HANDLE_VALUE) {
      printf("cannot open input file: \n");
      return false;
      }

      // get the filesize;
      dwImgFileSize = GetFileSize(hImgFile,0);

      return true;
      }

      bool OpenSubFile(char * szFileName)
      {
      char szName[256];

      // construct file name
      lstrcpy(szName, szFileName);
      lstrcat(szName,".sub");

      // open the file
      hSubFile= CreateFile(szName, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL);

      if(hSubFile==INVALID_HANDLE_VALUE) {
      printf("cannot open subchannel file: \n");
      return false;
      }

      // get the filesize;
      dwSubFileSize = GetFileSize(hSubFile,0);

      return true;
      }

      void CreateTwinSectorList()
      {
      dwSectorTable = new DWORD[dwSectorCount];
      if(dwSectorTable == NULL) Exit();

      for(DWORD dwCount=0; dwCount < dwSectorCount; dwCount++) {
      dwSectorTable[dwCount]=1;
      }
      }

      void InsertTwinSectors(int nRangeStart, int nRangeEnd, int nTwinCount, int nStep)
      {
      int nRangeLength = nRangeEnd - nRangeStart;

      for(int nCount=nRangeStart; nCount < nRangeStart+nRangeLength; nCount+= nStep) {
      dwSectorTable[nCount] += nTwinCount;
      }
      }

      void ShowInfo()
      {
      DWORD dwNewSectors = 0;

      // get new sector count
      for(DWORD dwCount=0; dwCount < dwSectorCount; dwCount++) {
      dwNewSectors += dwSectorTable[dwCount];
      }

      printf("Original sector count: %d",dwSectorCount);
      printf(" (%d) mb\n",dwSectorCount/512);

      printf("New sector count: %d",dwNewSectors);
      printf(" (%d) mb\n",dwNewSectors/512);
      }

      void WriteNewImgFile()
      {
      HANDLE hFile;
      DWORD dwSize = 2352;
      BYTE aData[3000];

      DWORD dwStarCounter = 0;

      printf("\nNow writing image file:");

      // try to open the file
      hFile= CreateFile("patched.img",GENERIC_READ | GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL);
      if(hFile==INVALID_HANDLE_VALUE) {
      printf("\nerror: cannot write new image file");
      Exit();
      }

      // write the new file with twin sectors
      for(DWORD dwCount = 0;dwCount if( ReadFile(hImgFile, aData, dwSize, &dwSize, 0) == 0 ) {
      printf("\nerror: cannot read image file");
      Exit();
      }

      for(DWORD dwRepeat = 0; dwRepeat < dwSectorTable[dwCount] ;dwRepeat++) {
      if( WriteFile(hFile, aData, dwSize, &dwSize, 0) == 0) {
      printf("\nerror: cannot write image file");
      Exit();
      }
      }

      // update funky stars
      dwStarCounter++;
      if(dwStarCounter == dwSectorCount/10) {
      printf("*");
      dwStarCounter=0;
      }
      }


      CloseHandle(hFile);
      }

      void WriteNewSubFile()
      {
      HANDLE hFile;
      DWORD dwSize = 96;
      BYTE aData[3000];

      DWORD dwStarCounter = 0;

      printf("\nNow writing subchannel file: ");

      // try to open the file
      hFile= CreateFile("patched.sub",GENERIC_READ | GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL);
      if(hFile==INVALID_HANDLE_VALUE) {
      printf("\nerror: cannot write new subchannel file");
      Exit();
      }

      // write the new file with twin sectors
      for(DWORD dwCount = 0;dwCount if( ReadFile(hSubFile, aData, dwSize, &dwSize, 0) == 0 ) {
      printf("\nerror: cannot read subchannel file");
      Exit();
      }
      for(DWORD dwRepeat = 0; dwRepeat < dwSectorTable[dwCount] ;dwRepeat++) {
      if( WriteFile(hFile, aData, dwSize, &dwSize, 0)== 0 ) {
      printf("\nerror: cannot write subchannel file");
      Exit();
      }
      }

      // update funky stars
      dwStarCounter++;
      if(dwStarCounter == dwSectorCount/10) {
      printf("*");
      dwStarCounter=0;
      }
      }


      CloseHandle(hFile);
      }


      void main(int nArgs, char *szArgs[])
      {
      printf("TwinPeak v0.1\n\n");

      // check command line
      if(nArgs < 2) {
      printf("\nusage: twinpeak \n");
      Exit();
      }

      // open image file
      if(!OpenImageFile(szArgs[1])) {
      Exit();
      }

      // open subchannel file
      if(!OpenSubFile(szArgs[1])) {
      Exit();
      }

      // check sector count
      dwSectorCount = dwImgFileSize / 2352;
      if(dwSectorCount*2352 != dwImgFileSize) {
      printf("\nerror: image file size is no multiple of 2352\n");
      Exit();
      }

      // check subchannel size
      if(dwSectorCount*96 != dwSubFileSize) {
      printf("\nerror: subchannel file does not match image file\n");
      Exit();
      }

      // initialize list
      CreateTwinSectorList();

      /* check out the mds file
      of UT2003 german to see
      where to put twin sectors */

      InsertTwinSectors( 1700, 2300, 1, 6);
      InsertTwinSectors( 3600, 4900, 1, 6);
      InsertTwinSectors( 5500, 6600, 1, 6);
      InsertTwinSectors( 6900, 7400, 1, 6);
      InsertTwinSectors( 8300, 8800, 1, 6);
      InsertTwinSectors( 9100, 9600, 1, 6);
      InsertTwinSectors( 10100, 10600, 1, 6);
      InsertTwinSectors( 10800, 11400, 1, 6);
      InsertTwinSectors( 12600, 13100, 1, 6);
      InsertTwinSectors( 13400, 14500, 1, 6);
      InsertTwinSectors( 15500, 16100, 1, 6);
      InsertTwinSectors( 16200, 16800, 1, 6);
      InsertTwinSectors( 17500, 18600, 1, 6);
      InsertTwinSectors( 19000, 19600, 1, 6);
      InsertTwinSectors( 19900, 20400, 1, 6);
      InsertTwinSectors( 20600, 21000, 1, 6);
      InsertTwinSectors( 21600, 22100, 1, 6);
      InsertTwinSectors( 23400, 23900, 1, 6);
      InsertTwinSectors( 24400, 25400, 1, 6);
      InsertTwinSectors( 26000, 26800, 1, 6);
      InsertTwinSectors( 27100, 27600, 1, 6);
      InsertTwinSectors( 28200, 29400, 1, 6);
      InsertTwinSectors( 29600, 30000, 1, 6);
      InsertTwinSectors( 30600, 31200, 1, 6);
      InsertTwinSectors( 31800, 33600, 1, 6);
      InsertTwinSectors( 33800, 34400, 1, 6);

      // show some details
      ShowInfo();

      // write new files
      WriteNewImgFile();
      WriteNewSubFile();

      printf("\ndone.");
      Exit();
      }

      --------------------------------------------------------------------------------


      This means that secureROM 4 is not uncopyable !!!!!
      From the GREECE the best place for vacation

      PLAYSTATION PS2 WITH MESSIAH 2
      XBOX WITH DEVIL & 30 GB HDD & DVD ROM PIONEER 117
      PIONEER 105 fw 1.0
      PLEXTOR 24X10X40
      -------------------------------------------
      http://users.compulink.gr/villasg//default.htm

    2. #2
      Join Date
      Sep 2001
      Location
      Canada
      Posts
      7,823
      Hmmm..yeah looks more complicated than need be.Blindwrite and Alcohol are having success with new Securom versions.

    3. #3
      Twinpeak is already compiled & a recent release has even implemented a gui, serch for this around the net.

    4. #4
      Join Date
      May 2002
      Location
      Liandri Central Core
      Posts
      71
      Woody's right
      Take the eaysier way
      In the time i only read this, blindwrite could have made a copy

    5. #5
      Join Date
      Nov 2001
      Location
      ciudad de los ángeles
      Posts
      4,407
      Links to TwinPeak are OK to give...

      http://kickme.to/blackcheck

      However, as mentioned afore...latest BlindWrite will do it and the next CloneCD (beta testing now) will do it as well.
      Eyes are a Window to the Soul (16th century proverb)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    Powered by vBulletin™ Version 4.0.3 Copyright © 2012 vBulletin Solutions, Inc. All rights