cactusmanhitler

BBGAMES FOOLPROOF GUIDE

Jul 27th, 2020 (edited)
6,808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.24 KB | None | 0 0
  1. THE BBGAMES GUIDE FOR TOTAL RETARDS AND THE TECHNOLOGICALLY ILLITERATE
  2.  
  3. This is a guide for Windows 10 users who know nothing about this. I also knew nothing about this, so I put together this guide based on some simple infographics floating around /v/ and the like. This goes more into depth about what we're doing. If you have any suggestions or criticism, let me know at cactusman@hitler.rocks
  4.  
  5. _____________________________________________________________________________________________________________________________________
  6.  
  7. So, you wanna look at bbgames? Essentially, you need 2 tools to view files in the archive. A hex editor, and DLViewer. However, a prerequisite to being able to even open those files is running CVS. CVS checks out your bbgames repository, and essentially removes garbage data to turn unusable files into usable ones. Before we even run CVS, however, we need to extract the archive, and before we do THAT, we need to enable case-sensitivity in a folder, and before we do THAT, we need to enable WSL. That might have been a lot, so let's make this simple.
  8.  
  9. Step 1. Enable WSL. (This allows you to run the command that enables case-sensitivity in a folder.)
  10.  
  11. Step 2. Enable case-sensitivity in a new folder you will extract bbgames in. (This allows Windows to discriminate between files on the basis of capitalization, i.e. "JASON.exe" and "jason.exe" are now different files, whereas before, they would be treated the same.)
  12.  
  13. Step 3. Extract bbgames in the folder you enabled case-sensitivity in. (Self-explanatory. This will allow us to run CVS. The files in bbgames are unreadable without CVS.)
  14.  
  15. Step 4. Download CVS, and move the "cvs.exe" file to a new folder on the root of your C:\ drive. (That new folder on your C:\ drive will become the destination for the "translated" files that were previously unreadable. CVS will essentially take the gibberish data, "translate" it, and put a copy of the "translated" data into the folder you just made.)
  16.  
  17. Step 5. Locate the filepath to the "depot" folder, and copy the address.
  18.  
  19. Step 6. Open CMD, and cd (Change Directory) to the directory where you put "cvs.exe". (This will be whatever folder you made on your C:\ drive to put CVS in. If you made a folder named "CVSFolder", you would enter this command, without quotations: "cd C:\CVSFolder")
  20.  
  21. Step 7. Run CVS with the filepath to the "depot" folder you copied in step 5.
  22.  
  23. [EXPANDED]
  24.  
  25. So right now, our goal is to extract the bbgames folder. Simple enough, right? Nope. There's a problem we need to work out.
  26.  
  27. Windows does not discriminate against capitalization on filenames. Say you have a file named "JACOB.png" and "jacob.png". Windows will see these as the same file, and will want to overwrite one if you put them in the same folder. The bbgames repository contains quite a few of those files, so we need to find a way to enable case-sensitivity in the folder bbgames is placed in.
  28.  
  29. To enable case-sensitivity, we will need to enable WSL. This allows us to enable case-sensitivity in the folder we will extract bbgames in, and then we can finally extract bbgames and move on. Let's get to it.
  30.  
  31. First thing's first, we need to enable WSL. This will be simple. Open Powershell as administrator by right-clicking on the Windows button start menu thing. then, type in the following, without quotation marks:
  32.  
  33. "Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux"
  34.  
  35. Hit enter. This will restart your computer. You are now ready to enable case-sensitivity in the folder bbgames will go in.
  36.  
  37. Now, we won't be enabling case-sensitivity for your entire Windows system, only a selected folder. We will make a folder for this purpose. Make a new folder anywhere and name it anything. For example, I'll put it on my desktop, and name the folder "BBGAMESFOLDER". The folder is now located in C:\Users\[usernamehere]\Desktop\BBGAMESFOLDER. That is the folder's address, or file path. We will need to know the file path for the next step.
  38.  
  39. Now, we are ready to enable case-sensitivity for our new folder. Run Powershell as admin again. Type in, without quotations: "fsutil.exe file setCaseSensitiveInfo C:\[pathtofolder] enable" Replace [pathtofolder] with the file path to the folder we just made. In this case, the file path is "C:\Users\[usernamehere]\Desktop\BBGAMESFOLDER", so the command, in this case, would look like this, without quotations:
  40.  
  41. "fsutil.exe file setCaseSensitiveInfo C:\Users\[usernamehere]\Desktop\BBGAMESFOLDER enable"
  42.  
  43. Press enter. You have now set case-sensitivity in that folder, and are now ready to extract bbgames.
  44.  
  45. Now, move the bbgames archive file to the folder we made, in this case, "BBGAMESFOLDER". Right click it, and select "Extract to bbgames\". This will create a new folder for bbgames to extract into. However, it will still extract correctly as case-sensitive, because we are still extracting it in the "master" folder we enabled case-sensitivity in. All it is doing is creating an extra sub-folder, which is not necessary, but is a little more organized. Now we have that stuff out of the way, sit back and relax, the extraction may take a while.
  46.  
  47. While we wait for it to extract, let's work on some CVS stuff.
  48.  
  49. Before we download CVS, let's make a new folder in the root our C:\ drive. For example, I'll make one and name it "CVSFolder". This is where our CVS executable file will go. We will run it from there. Once we get done running it, the "translated" contents of bbgames will appear in this folder as well. Essentially, "CVSFolder" will house a duplicate of bbgames once we run CVS. This duplicate, however, will be in a readable file system. This is why we run CVS. CVS will take garbage data from the original bbgames repository, delete it, and turn the rest of the data into something we can look at. Note, you will still have the "garbage data" bbgames repository after we run CVS, so if something goes wrong (which it shouldn't), you can retry.
  50.  
  51. Let's set case-sensitivity on our new "CVSFolder" folder for good measure. Run Powershell as admin again. Type in, without quotations:
  52.  
  53. "fsutil.exe file setCaseSensitiveInfo C:\[nameofcvsfolder] enable"
  54.  
  55. Replace "[nameofcvsfolder]" with the name of the CVS folder we just made. In this case, that would be C:\CVSFolder. So, our command will look like this, without quotations:
  56.  
  57. "fsutil.exe file setCaseSensitiveInfo C:\CVSFolder enable"
  58.  
  59. Press enter. You have now enabled case-sensitivity on our CVS folder, where the "translated" contents of bbgames will be extracted.
  60.  
  61. Now, let's download CVS. Download it, and extract the executable (named "cvs.exe") to the folder, "CVSFolder", which we just made. The file path of this will be "C:\CVSFolder", without quotations. Now we're getting started. In the Windows search bar, search for CMD, right click, and run it as administrator. Now we will change directories with the "cd" command. In this case, we will cd to our "CVSFolder". We do this by typing, without quotations:
  62.  
  63. "cd C:\CVSFolder"
  64.  
  65. You have now changed the directory. We're almost done, but we need to do a couple things before we start CVS. Let's put this aside for a moment. Leave the terminal as it is for now.
  66.  
  67. We need to locate the file path to the "depot" folder in bbgames. Find where you extracted bbgames. Again, in this case, it's located in C:\Users\[usernamehere]\Desktop\BBGAMESFOLDER, so the folder is simply on my desktop. Now, go through the folder until you reach a folder named "depot". Click into this folder as well, and stop. You will see a bunch of other folders. From here, we need to copy the address, or file path of the "depot" folder.
  68.  
  69. If everything worked correctly, in this case, the file path for the "depot" folder should be C:\Users\[usernamehere]\Desktop\BBGAMESFOLDER\bbgames\d1\routefree\bbgames\depot. This varies depending on where you put the "BBGAMESFOLDER" folder, but in this case, that's our file path to the "depot" folder. Whatever your file path is, you can copy it to your clipboard by right clicking the address bar looking thing at the top of file explorer that shows your current file path. Right click it, and select "Copy address as text". You now have the address to the "depot" folder ready to go. From here, we're set.
  70.  
  71. Let's go back to our terminal now. We have already changed the directory, so now, we will input one final command, and CVS will work its magic. Enter, without quotations:
  72.  
  73. "cvs -d C:\[pathtodepotfolder] checkout -kb ."
  74.  
  75. Replace [pathtodepot] with the path to the "depot" folder in bbgames. In this case, it would be, without quotations:
  76.  
  77. "cvs -d C:\Users\[usernamehere]\Desktop\BBGAMESFOLDER\bbgames\d1\routefree\bbgames\depot checkout -kb ."
  78.  
  79. Once we have entered this command correctly, press enter. You've now completed the hardest part. At this point, our terminal will begin to comb through a fuckload of files. This is basically CVS running through EVERY SINGLE FILE on your bbgames repository. This may take an hour or two. Go get some coffee or jack off, it'll be a while.
  80.  
  81. VIEWING FILES WITH DLVIEWER (EVERYTHING BELOW HERE IS A ROUGH DRAFT AND YOU PROBABLY SHOULDN'T LISTEN TO IT RIGHT NOW)
  82. _______________________________________________________________________________________________________________________________________
  83.  
  84. DLViewer is a tool some faggot on twitter made to look at files in a repository. Specifically, to look at files for the N64's Ocarina of Time. We'll be using Ocarina's filepath as an example on how to use it. I'll simplify the steps necessary to do so. My knowledge of repository viewing essentially ends here, so don't expect much of a detailed explanation like I gave above. TCRF and Obscuregamers are good resources for that if you have questions, and I'm sure some of the guys on /vr/ have some experience too if you can catch them on a Gigaleak thread.
  85.  
  86. Anyway, here's what we're doing.
  87.  
  88. Assuming your repository has already been checked out with CVS, let's begin. First, you'll want to find the specified folder. As an example, we will be viewing the z_ocarina folder. You should now know where this is, as I introduced you to navigating filepaths earlier, but if you need me to hold your hand, I will reluctantly do so. We'll go into the folder you created on the root of your C:\ drive. In this case, I named mine CVSFolder, so I'd be going into that, and then navigating the z_ocarina, and then the "data" folder inside of it. So, the filepath, in this case, would look like this, without quotations:
  89.  
  90. "C:\CVSFolder\z_ocarina\data
  91.  
  92. This is the folder that contains most of the data relating to models and maps, and this is the stuff we can view with DLViewer. (I'll be creating a guide for looking at textures from z_ocarina and the Mario 64 folder as soon as I understand the basics of how to do so, but for now we'll stick with the models and maps.) For reference, I created another pastebin of every single model in the folder as viewed with DLViewer under standard hex editing rules (and a few that were tweaked), so check it out [Shameless plug: https://pastebin.com/cnsZ9PNG].
  93.  
  94. Anyway, let's get to work. I've been rambling on and on about this, but it's actually quite simple when you follow the rules. Most of it should be standard, but you might come across a few examples where you have to bend the rules a bit and think outside of the box if you want them to load properly in the viewer. I'll try to explain to the best of my ability how I got those things to work after I explain these basic steps. Anyway, let's get on with it. The basic steps are as followed, and I will elaborate after that.
  95.  
  96. To do this, we will need a hexadecimal editor and DLViewer. I will supply both links as part of this guide.
  97. DLViewer is a specialized tool for this purpose. HxD is just a hex editor, but it's the one I've been using and it works pretty well for me and everyone else on the threads. To download DLViewer, got to [link] and download it, then extract it into its own folder. To download HxD
  98.  
  99. 1. Download DLViewer, extract, and make sure its in its own folder.
  100.  
  101. 2. Find the object/map you want to view from z_ocarina\data and copy it.
  102.  
  103. 3. Paste the object/map into DLViewer's dedicated folder.
  104.  
  105. 4. Right click the object/map and select "open with...", and then choose HxD to open the file
  106.  
  107. 5. Edit a certain amount of numbers out, and save the file. (Try removing the first 0x7C bytes[up to but not including], then play with it if it doesn't work.)
  108.  
  109. 4. Drag the new, modified object/map onto the DLViewer executable (or just open DLViewer, makes no difference because you'll still have to type the filename).
  110.  
  111. 5. Load segments, by typing, without quotations: "loadseg 0x00 [filename]"
  112.  
  113. 6. Find display lists, by typing, without quotations: "finddlists 0x00"
  114.  
  115. 7. Magic.
  116.  
  117. ______________________________
  118. RANDOM TWITTER INFO/QUOTES I'LL DISSECT LATER
  119.  
  120. "Full instructions if the map still won't load:
  121.  
  122. Remove CVS header (stops at 0x7F before ELF)
  123. Remove 7C bytes
  124. Search > Replace
  125. @@ with @, replace all
  126. Go to the start of the file
  127. Search for E700000000
  128. If it's misaligned, add 00 bytes to the start to fix it"
  129.  
  130. "Can you elaborate the portion regarding misaligned E700000000. How can one identify if it is "misaligned"? This seems to be the last part I am stuck on"
  131.  
  132. "Sorry, just woke up.
  133. If the E7 is misaligned, like the image on the left, add a zero byte(s) to the start of the file to align it, like the image on the right."
Add Comment
Please, Sign In to add comment