My set up:
OS X 10.11.6 El Capitan
Xcode 7.3.1 installed - to get command line tools
FileZilla 3.20 - to transfer files to my Vita
HenKAKU installed on a Vita with 3.60 OFW. Get at henkaku.xyz
Most tasks will be completed with terminal.
Just press the cmd key and start typing the word terminal to find it. Then press enter or click it.
Tip: when typing long names in terminal just press the tab key after a few characters to auto complete the name up to the last common character.
1. Getting the prebuilt toolchain:
Download the tarball file (a tar ball is a .tar.bz2 file) for the appropriate system (win/osx/linux/etc). The newest is at the top. Nightly means it is the newest and was built at the end of the day - can be more prone to bugs/risk:
https://bintray.com/package/files/vitas ... &tab=files
So grab the 45,000,000~ sized one, not the 400~ sized one! We will assume this file is located in ~/Downloads/ for now.
2. Now we need to make a working directory and install the toolchain. So go to your terminal window and type:
mkdir ~/a1build/
cp ~/Downloads/vitasdk-mac-nightly-c86e2b4b45bd9cad07abbbcb208519b0357a639a.tar.bz2 ~/a1build/
cd ~/a1build/
tar xjf ~/a1build/vitasdk-mac-nightly-c86e2b4b45bd9cad07abbbcb208519b0357a639a.tar.bz2
What did these 4 commands do?
mkdir makes a directory at the location you specify. The "~" is a shortcut for your home directory. Your home directory is your usernames folder. I named the folder a1build so that it appears at the top of the list for me. You can name it what ever you'd like
cp ~/Downloads... ~/a1build/ is the copy command. It copies the file from the Downloads folder to the a1build folder in your home directory.
cd ~/a1build/ changes your directory in the terminal to the location you specify.
tar xjf ~/a1build........tar.bz2 You can think of this as unpacking the tarball file in the current directory in terminal.
You should now have this folder structure:
~/a1build/gcc-arm-vita-eabi-4_9-2016q3
3. Environmental variables
Now we need to define some environmental variables. This will help tie things together
In terminal type:
open ~/.profile
A text like file, possible blank, should open
Add these two lines to the bottom
export VITASDK=$HOME/a1build/gcc-arm-vita-eabi-4_9-2016q3/
PATH=$HOME/a1build/gcc-arm-vita-eabi-4_9-2016q3/bin:$PATH
Make sure that the "/a1build/gcc-arm-vita-eabi-#_#-####q#/" portions are the same as the folder structure at the end of part 2. The #'s may change for you and the name of the a1build folder is the same as you chose.
Save this file. Now we need to "re login" on terminal. So simply quit terminal with CMD+Q then reopen it.
Lets check to see if it all worked. In terminal type:
/Users/YOUR USER NAME HERE/a1build/gcc-arm-vita-eabi-4_9-2016q3/bin/arm-vita-eabi-gcc-4.9.3 --version
You should get an output similar to this:
arm-vita-eabi-gcc-4.9.3 (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288]
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Also test this command in terminal.
echo $PATH
The output should be something like:
/Users/YOUR USER NAME HERE/a1build/gcc-arm-vita-eabi-4_9-2016q3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Good job if you've made it this far!
4. Lets build some sample code!
Download the samples from https://github.com/vitasdk/samples.git and extract to ~/samples/.
Inside is a hello_cpp_world and a hello_world folder. There are also two shell script files, .sh.
clean.sh is run to delete the built code from the two hello world folders. So be careful when running it.
build.sh compiles the main.cpp and main.c files located in the folders. (These are two separate projects/programs but they were bundled together in this github location)
To run the build.sh script simply navigate to its folder in terminal: you can move up a directory by using "cd .." too.
cd ~/samples/
Then run the script by typing:
./build.sh
The two folders should have a .elf, .velf, and a .o file if the build succeeded.
We need to convert the .VELF file to .bin with the following command
Note: some included build.sh scripts may have converted the .velf file to eboot.bin.
Navigate into the .velf folder...
vita-make-fself nameOfYourHomebrewHere.velf eboot.bin
or append the filename of the .velf like so:
vita-make-self ~/samples/nameOfYourHomebrewHere.velf eboot.bin
5. param.sfo file generation (This file may have been generated depending on the sample project you downloaded. Here is the manual way.)
This file tells the vita about the app and is required.
Use this command to generate it:
vita-mksfoex -s TITLE_ID=XXXX00001 "nameOfYourHomebrewHere" output/param.sfo
XXXX00001 must be 8 characters where the X's can be any letters you choose.
5. Preparation of the template:
Download the vitadoom.vpk file at https://github.com/xyzz/Vita_Doom/relea ... tadoom.vpk
.vpk is the install file that the vita reads. Change the extension to .zip and unzip.
Delete the eboot.bin file inside and delete the param.sfo file in the sce_sys folder
Place the eboot.bin and the param.sfo files that you generated into the folder places of the old ones you just deleted. Rename the folder to what you used as nameOfYourHomebrewHere. Now .zip the folder. Just right click the folder in OS X and say compress and rename the .zip to .vpk
6. Omg it's FileZilla.
Go on your vita and turn on wifi and open molecularShell. Press select.
In FileZilla connect to the IP:port shown on the Vita.
In OS X:
Left side is your mac and right side is your Vita
Expand the "/" folder on the Vita side, expand the "ux0:" folder, scroll to Homebrew folder. Drag and drop the nameOfYourHomebrewHere.vpk file into the Homebrew folder. Wait for it to complete.
Press O on your Vita and expand the ux0: folder, then expand the Homebrew folder. Press X to open the install on your Vita. Press X again to install. Wait.
Now go to the Vita bubble screen to find your app.
Success!
Advertising