A Method of Encrypting Jaguar CDs

It does float! And doesn't get soggy in milk! :)

Moderator: a31chris

Post Reply
User avatar
Saturn
3DO ZERO USER
Posts: 142
Joined: Wed Jul 23, 2014 2:16 pm

A Method of Encrypting Jaguar CDs

Post by Saturn » Mon Sep 29, 2014 5:36 pm

Hi,
I collected, compiled and tested this info with flawless results. Yesterday, I burned up to 30 disks-yielding 15 encrypted, usable game CDs. I'm posting what I have so hopefully others can benefit from this (overly) detailed, step-by-step info. Props and credit to Matthias, Jagware and Reboot for the info & tools! While there are alternatives to complete the encryption process a lot faster than the method I've detailed here, this way is a lot more fun IMHO :D
Once everything is set up, it can be done in 8 minutes from start to finish 8)
**************************************************************************************
Websites:
Step by step to your own encrypted Jaguar CD
How to encrypt a Jaguar CD
Matthias Domin homepage
JiFFI download
DOE CB (Alternative to clip.exe for copying text to the clipboard. Put cb.exe and main.c in "CD Tutorial files (updated ver)")
***************************Just the steps:***************************
Convert the file to BJL w/ JiFFI and change the file extension to BIN
Move the game file to the "CD Tutorial files (updated ver)" folder
Edit "(Step2)(a).bat" w/ the game file's name in 3 places, quick save and run it
Run "(Step2)(b).bat"
Put a blank CD-R in the burner
Run "scanbus.bat"
Edit "(Step3)burnunen.bat" w/ the device numbers and game file name (in one place)
Quick save and run it
Test the unencrypted game disk using a bypass method
Swap the 'BJL CD-encryption disk' into the Jag CD and power it up
Open HyperTerminal-File-Open-Jag Transfer.ht-Transfer-Receive File...
Set a destination folder
Set 'Use receiving protocol:' to Xmodem
Click the 'Receive' button
Paste Filename of: cd_hash.dat THEN STOP!
When prompted swap the CD in the Jag w/ the burnt one
Press Pause and IMMEDIATELY click OK to confirm the "cd_hash.dat" file name.
After completion of transfer, move "cd_hash.dat to folder
Run "(Step4)PADCD.bat"
Put a blank CD in the burner
Edit "(Step5)burnenc.bat" w/ the device numbers and game file name (in one place)
Quick save and run it
Play the game
************************************************************************************
The directory structure of my setup:
The following files are in a folder named "CD Tutorial files (updated ver)." They are the default contents and are able to return to only these afterward, if desired by running Xcleanup.bat. *Contents of batch/text files at bottom*
!Instructions.txt
(Step2)(a).bat
(Step2)(b).bat
(Step3)burnunen.bat
(Step4)PADCD.bat
(Step5)burnenc.bat
cb.exe
CDEN16.ABS
cdrecord.exe
cygwin1.dll
hyperterm.bat
hypertrm.dll (copy this into the folder from original location)
hypertrm.exe (copy this into the folder from original location)
l.bat
main.c
MAKETRK.EXE
PADCD.COM
PM_DUMMY.DAT
scanbus.bat
Text.txt
Trk_2b.raw
warning.wav
Xcleanup.bat (this is the only Read Only file in the folder)
***************************The detailed description***************************
http://www.mdgames.de/jaguarcd/CreatingJaguarCDs.html
Step 1, Define the CD-layout:
-To ensure the (.ABS, .COF, etc.) file is a usable, header-less Binary, convert it to BJL format with JiFFI, then manually change it's file extension from BJL to BIN. (Doesn't matter if it was already header-less, the conversion with JiFFI won't hurt a thing and may save a coaster)
*Note the load and run address(es) in the name of the converted file*
-Make sure the game's filename doesn't exceed 8 characters (before the BIN file extension) as this will create problems later when the software automatically shortens it.
-Add the single ".BIN" game file to "CD Tutorial files (updated ver)" folder per the example provided in "1. Step by step to your own encrypted Jaguar CD"
************************************************************************************
Step 2, Collect and convert the track-files:
-To create the Boot Track, the easiest way is to edit the contents of "(Step2)(a).bat" to reflect the name of the single .BIN file being used, "Whatever.BIN" ex:
MAKETRK -b4000 -z Whatever.BIN

PADCD +100000 Whatever.T00 Whatever.RAW
-Quick save and double click it to create the necessary files.
*WHATEVER.RAW and WHATEVER.T00 will be created*

-To create the Dummy Track, the easiest way is to double click "(Step2)(b).bat" & it'll create the necessary files.
Here's the text in (Step2)(b).bat:
MAKETRK -z -t1 -mTRAK PM_DUMMY.DAT

PADCD +100000 PM_DUMMY.T01 PM_DUMMY.RAW
*PM_DUMMY.RAW and PM_DUMMY.T01 will be created*
************************************************************************************
Step 3, Burn the unencrypted CD:
The easiest way to determine what the burner drive's numbers are is to double click "scanbus.bat." (It HAS to be in the same folder as cdrecord.exe & cygwin1.dll)

*Alternatively:
*-Click Start-Run and type: cmd
*-Paste the path to the folder followed by: cdrecord -scanbus.
*ex:
*C:\Users\Cylon10\Desktop\JagCD Creator package 09-25-14\CD Tutorial Files\cdrecord -scanbus

-Determine the number of your CD burning device. (ex, my Laptop= 0,1,0 - my XP Desktop= 1,1,0)
-Edit 'your burner specific' info into the included "(Step3)burnunen.bat" file along with the file name (one place for the name) to use and quick save it. ie, WHATEVER.RAW. (It HAS to end w/ the .RAW file extension)

example of "(Step3)burnunen.bat":
cdrecord -speed=1 -dev=0,1,0 -pad -tao -audio -multi warning.wav
cdrecord -speed=1 -dev=0,1,0 -pad -tao -audio hv.raw pm_dummy.raw trk_2b.raw

After replacing with the current file:
cdrecord -speed=1 -dev=0,1,0 -pad -tao -audio -multi warning.wav
cdrecord -speed=1 -dev=0,1,0 -pad -tao -audio WHATEVER.RAW pm_dummy.raw trk_2b.raw

-Place a blank CD-R into the burner.
-Double click "(Step3)burnunen.bat" to start recording.
NOTE: (Step3)burnunen.bat includes the "-tao" (track at once) switch which is necessary in newer versions of cdrecord
*The cmd window with the cdrecord info will disappear when all operations are complete and will conveniently copy "cd_hash.dat" to the clipboard for use in Step 4*
************************************************************************************
Step 4, Encrypt the CD:
Go to http://www.mdgames.de/jag_eng.htm and about halfway down the page, download and burn to disk one of the "BJL-version of the CD-encryption program" files. There's a .CDI and Nero version.

**Before placing the 'BJL CD-encryption disk' in the Jag CD, setup the following:
-(Preferrably) on a Windows XP machine connect the adapter to an RS232 serial port. The J.U.G.S. device is confirmed working on U.S. Jaguars. Matthias' pinout has not worked for me as the U.S. and European Jaguars apparently have different signaling.

*For J.U.G.S. pinout, these adapters work using the same color code:
http://www.amazon.com/gp/product/B008NC ... UTF8&psc=1
*Color code is: red=1, black=2, yellow=3, green=5
*A more comprehensive description here: http://atariage.com/forums/topic/229118 ... ?p=3071346

*For Matthias' pinout, these adapters utilize the same color code (incompatible for me thus far in the U.S.):
http://www.amazon.com/gp/product/B008NC ... UTF8&psc=1
*Color code is: yellow=2, black=3, red=5
*Matthias' pinout:
http://www.mdgames.de/jaguarcd/cdencryption.htm

-Connect a Jaglink Cable (or any "4 terminal" telephone line) to the RJ11 side of the adapter.
-Connect the other end of the (telephone) line to a Jaglink (or compatible RS232 supporting device) that's connected to a Jaguar.

Copy the two HyperTerminal files from their locations in XP to "CD Tutorial files (updated ver)." (the working folder)
C:\Program Files\Windows NT\hypertrm.exe
C:\WINODWS\system32\hypertrm.dll

When you're ready to test an actual file after setting all this up, it should open automatically after the cmd window of "(Step3)burnunen.bat" closes, with data copied to the clipboard.

(Should work in Windows 7 or above. If not, copy the included "hypertrm.exe" & "hypertrm.dll" files from the Apps folder to a location on your computer and open hyperterm.exe from there)

-Either way, use the info detailed below to configure it:

*-Open and configure Hyperterminal in Windows XP:
*Start-All Programs-Accessories-Communications-HyperTerminal
*Setup a new connection (use File-New Connection, if not prompted) with these settings:
*Name: Jag Transfer (or whatever name you prefer)
*Choose icon (if applicable)
*In the "Connect To" box click the drop window next to "Connect using:" at the bottom and select COM1 (or the appropriate choice for your setup)
*Click OK
*In "Port Settings" box change "Bits per second:" to 115200
*Data bits: 8
*Parity: None
*Stop bits: 1
*Change "Flow Control:" to None
*Click Apply
*Click OK
*(With HyperTerminal open onscreen and "Jag Transfer" as the current connection,) click File-Properties.
*Click the "Settings" tab and ensure the following (from top to bottom of dialog box) are ticked/enabled:
*Function, arrow, and ctrl keys act as: Terminal Keys (already set as default)
*Backspace key sends: Ctrl+H (already set as default)
*Emulation: TTY (has to be adjusted)
*Telnet terminal: TELETYPE-33 (already set as default)
*Backscroll buffer lines: 10 (has to be adjusted)

*-Click the "ASCII Setup..." button at the bottom of the Settings dialog box and double check *the settings. The default are correct (if the below matches):
*ASCII Sending:
*Send line ends with line feeds: unticked
*Echo typed characters locally: unticked
*Line delay: 0 milliseconds.
*Character delay: 0 milliseconds.

*ASCII Receiving:
*Append line feeds to incoming line ends: unticked
*Force incoming data to 7-bit ASCII: unticked
*Wrap lines that exceed terminal width: ticked
*-Click OK
*-Click OK

(Alternatively, download & install teraterm-4.84.exe. See bottom of article for configuration)

-Open HyperTerminal
-Click File-Open and select 'Jag Transfer.ht'
-Click Transfer-Receive File...
-Set a destination folder (I use C:/1)
-Set 'Use receiving protocol:' to Xmodem
-Click the 'Receive' button
***IMPORTANT!***
-Paste (data automatically copied to clipboard after Step 3) or type in a Filename of:
cd_hash.dat THEN STOP!!!!!

**Once the above settings are verified and the name's entered in the Save filename dialog box, place the 'BJL CD-encryption disk' into the Jaguar CD unit and power up the Jaguar.
-When prompted, remove the 'BJL CD-encryption disk' and replace the newly burned unencrypted game disk.
*The Jaguar will read the contents, prepare Xmodem transfer and the side borders of the screen will turn green.
***IMPORTANT!***
-Press Pause on the Jaguar controller and IMMEDIATELY click OK to confirm the "cd_hash.dat" file name.
-After however long it takes to transfer the data, the Hyperterminal transfer info screen will automatically disappear and the characters "Transmission finished!" will appear in the original HyperTerminal window.
-Close HyperTerminal (or run through the process again to compare file sizes)
-Navigate to the folder you saved "cd_hash.dat" to and move it into the 'CD Tutorial Files (updated ver)' folder.
-Double click "(Step4)PADCD.bat" to pad the file to the right size (no need to edit if you used the name "cd_hash.dat")
*TRK_2.RAW will be created*

-Test the unencrypted version of the game using a bypass method
************************************************************************************
Step 5, Burn the encrypted CD:
-Put a blank CD in the burner
-Edit the "(Step5)burnenc.bat" file with the info (name/drive) for the current game file & setup. (One place for the name)
ex; The original text from Matthias' example at http://www.mdgames.de/jaguarcd/cdencryption.htm is:
cdrecord -speed=2 -dev=0,0,0 -pad -audio -multi warning.wav
cdrecord -speed=2 -dev=0,0,0 -pad -audio bootprg.raw mainprg.raw trk_2.raw

The new info would be:
cdrecord -speed=2 -dev=0,1,0 -pad -tao -audio -multi warning.wav
cdrecord -speed=2 -dev=0,1,0 -pad -tao -audio WHATEVER.RAW pm_dummy.raw trk_2.raw

-Click the "(Step5)burnenc.bat" file to write to the CD
-When the black cmd window for cdrecord clears, eject the disk and play it on the Jaguar CD.

*To automatically remove custom files and return the "CD Tutorial files (updated ver)" folder to its default state, the cmd window will prompt, "Are you sure you want to delete your files? [Y/N]"
Choosing Yes or clicking the X to close the window will delete, choosing No will cancel.
If you choose No and later find you want to restore the folder to default, double click "Xcleanup.bat."

Please bear in mind, TeraTerm functionality has not been 100% tested/configured!
*TeraTerm configuration:
Open TeraTerm
Tick "Serial" (changing from the default TCP/IP) and choose the COM Port to use.
Click OK
Click Setup at the top of the black window
Click Serial Port from the list
Change Baud rate to 115200
Data: 8 bit
Parity: none
Stop: 1
Flow control: none
Transmit delay: 0 msec/char 0 msec/line

To receive the file, click File-Transfer-XMODEM-Receive
Navigate to the file and move it to the working folder.
************************************************************************************
Contents of batch/text files in "CD Tutorial files (updated ver)" folder:
!Instructions.txt
all of the above

(Step2)(a).bat (edit for every new project)
MAKETRK -b4000 -z Whatever.bin

PADCD +100000 Whatever.T00 Whatever.RAW

(Step2)(b).bat (no editing needed)
MAKETRK -z -t1 -mTRAK PM_DUMMY.DAT

PADCD +100000 PM_DUMMY.T01 PM_DUMMY.RAW

(Step3)burnunen.bat (edit for every new project)
cdrecord -speed=1 -dev=1,1,0 -pad -tao -audio -multi warning.wav
cdrecord -speed=1 -dev=1,1,0 -pad -tao -audio Whatever.RAW pm_dummy.raw trk_2b.raw
cls
call hyperterm.bat
type Text.txt | cb

(Step4)PADCD.bat (no editing needed if file name cd_hash.dat is used)
PADCD -2 *100002 CD_HASH.DAT TRK_2.RAW

(Step5)burnenc.bat (edit for every new project)
cdrecord -speed=1 -dev=1,1,0 -pad -tao -audio -multi warning.wav
cdrecord -speed=1 -dev=1,1,0 -pad -tao -audio Whatever.raw pm_dummy.raw trk_2.raw
cls
call Xcleanup.bat

hyperterm.bat (no edit)
start hypertrm.exe

l.bat (no edit)
jag_lo -n -8 -b 0x100000 cden16.abs

scanbus.bat (no edit)
cdrecord -scanbus
pause

Text.txt (no edit)
cd_hash.dat

Xcleanup.bat (Set as Read Only-no edit)
@ECHO OFF

:choice
set /P c=Are you sure you want to delete your files? [Y/N]
if /I "%c%" EQU "Y" goto :gone
if /I "%c%" EQU "N" goto :close
goto :choice

:close
exit
:gone
mkdir temp
move !Instructions.txt temp
move (Step2)(a).bat temp
move (Step2)(b).bat temp
move (Step3)burnunen.bat temp
move (Step4)PADCD.bat temp
move (Step5)burnenc.bat temp
move cb.exe temp
move CDEN16.ABS temp
move cdrecord.exe temp
move cygwin1.dll temp
move hyperterm.bat temp
move hypertrm.dll temp
move hypertrm.exe temp
move l.bat temp
move main.c temp
move MAKETRK.EXE temp
move PADCD.COM temp
move PM_DUMMY.DAT temp
move scanbus.bat temp
move Text.txt temp
move Trk_2b.raw temp
move warning.wav temp
erase *.* /Q
move temp\* .
rmdir temp

Post Reply