Main Index Routine Index Memory Index


Welcome to this RapidLok6 handbook. RapidLok is a copy protection for diskette games on the Commodore C64 back in the 1980s and early 1990s. There exist several versions of RapidLok, counted from v1 to v7. In the first tutorial "Microprose Pirates 1987 C64 - Getting a clean image" (which is now included here) we completely removed RapidLok6 from the game, but with RapidLok the fastloader was also gone. This is no problem in WinVice as we only have to enable "Warp mode" while the game loads files (Alt+W). The created D64 images can also be written back to a 1541 disk to play the game on the real C64 - but without the fastloader. This handbook also describes the "other side" of RapidLok6 inside the 1541 drive. It is shown how working G64 images can be created to play Pirates in WinVice as well as on the real C64 after remastering a 1541 disk - both with active RapidLok fastloader. This G64 images can be used to completely walk through the analysis of the first tutorial which was limited as we had only partially working D64 images there. Furthermore the G64 images can be used to get the clean image in the first tutorial: we can run the filecopy completely in WinVice, so we only need a single 1541 drive connected to the Windows PC (for creating the G64 files) and no longer a C64! Keep in mind that "True drive emulation" must be enabled in WinVice when dealing with RapidLok protected G64 files. See "WinVice Configuration" for an example WinVice configuration to run Microprose Pirates from the supplied G64 images. The RapidLok6 drive code analysis starts here with the entry point at $07B0 (routine $07B0). When you start your original Pirates game by loading the autostart file "TITLE", the 1541 operating system browses the Directory sectors on Track 18 until it finds the entry for this file. The first Directory sector (Track 18 Sector 0) contains the BAM and is cached in the $0700-$07FF buffer. All Directory entries of protected files point to Track 18 Sector 18 which is the RapidLok part for the C64 (C64-client). When this gets transferred to the C64 and executed it sends two commands to the 1541. Both are cached in the "Buffer for command string", starting at $0200 for each command. So the second will overwrite $0200-$0205 of the first one (which was already executed then). First is the "M-W" containing the $0206 routine and the [$C6-$C9] parameters, second the "M-E" command to execute $07B0. Remember that "strange looking garbage" at $165B0-$165FF in Figure #1 of the first tutorial? It's the code located in the first Directory sector (Track 18 Sector 0) which is currently cached in the $07xx buffer) and that is now getting executed by the "M-E" command. This is our entry point. You may now follow the commented path of execution starting at the $07B0 routine. I have included an overview of the RapidLok and DOS formatted tracks 1-35, a short analysis of the Track 36 Key Sector, code differences between RapidLok 5, 6 and 7, and guides to patch and bugfix the G64 images to play the game in WinVice and on the C64 (with experimental remaster instructions). In the first version v1.00 of this handbook Sync length checks and track alignment were left enabled. These patches were depending on correctly arranged G64 images by "nibtools", a manual Track 36 length fix and WinVice's correct handling. This did not seem to be a problem until a (RapidLok5) G64 image was found where this arrangement had failed (Hardball - file "19"). Slight differences in the code between RapidLok 5 and 6 are responsible for this, so no problem for RapidLok6. However.. There's a set of new patches now that completely disables the whole RapidLok6 protection while keeping the fastloader active (this patches work for RapidLok 5 and 7 as well!). If you simply want to play Microprose Pirates in WinVice, simply apply the new patches to your G64 images and everything is working - or use the supplied ready-for-playing G64 images. The differences between the RapidLok 5, 6 and 7 drive codes are also listed now. I added a list for each RapidLok version with known protected software titles (check out the RapidLok 5 list for interesting statements from Accolade concerning different versions of RapidLok and the game "Psi-5 Trading Company"). RapidLok disks come around with predefined TV standard, you can't run them on a C64 with a different TV standard: I added a section for each RapidLok version 5, 6 and 7 on how to change the predefined TV standard. There may be problems with remastered disks. So if you simply want a working Microprose Pirates game and don't care about a fastloader, I strongly suggest you read the first tutorial "Microprose Pirates 1987 C64 - Getting a clean image" to get rid of the whole RapidLok6. Those D64 images will work without problems on your original C64. I hope you enjoy this handbook. I happily receive unmodified nib-file dumps (with the logfiles!) of your original Pirates game. There are different versions of the game and I don't have all of them. Greetings BanGuiBob