update makefile
This commit is contained in:
@@ -70,6 +70,11 @@ dolphin:
|
||||
floors:
|
||||
$(MAKE) -C src/samples/floors all clean
|
||||
|
||||
rebuild-engine:
|
||||
$(MAKE) -C src/engine && make && make EE_CXXFLAGS="-DNDEBUG $(EE_CXXFLAGS)"
|
||||
|
||||
rebuild-dbg-engine:
|
||||
$(MAKE) -C src/engine && make && make
|
||||
# %.vcl: %.vclpp
|
||||
# $(EE_VCLPP) $< $@
|
||||
|
||||
|
||||
+59
-24
@@ -1,6 +1,7 @@
|
||||
# Installation tutorial
|
||||
|
||||
This tutorial will show you, how to:
|
||||
|
||||
- Setup your WSL machine for PS2DEV
|
||||
- Install entire PS2DEV+Tyra environment
|
||||
- Setup VSCode with Intelisense
|
||||
@@ -9,11 +10,12 @@ This tutorial will show you, how to:
|
||||
So let's get started!
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## VSCode and WSL
|
||||
- Install VSCode from
|
||||
https://code.visualstudio.com/
|
||||
|
||||
- Install VSCode fromhttps://code.visualstudio.com/
|
||||
- Install WSL
|
||||
https://docs.microsoft.com/en-us/windows/wsl/install-win10
|
||||
`Info: Please choose Ubuntu-20.04`
|
||||
@@ -22,22 +24,28 @@ Open `cmd.exe` and type:
|
||||
`ubuntu2004 config --default-user root`
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Ubuntu configuration and PS2DEV+Tyra
|
||||
- Open WSL terminal (Windows search -> wsl)
|
||||
`Info: Be sure that are you logged as a root!`
|
||||
|
||||
- Open WSL terminal (Windows search -> wsl)`Info: Be sure that are you logged as a root!`
|
||||
- Type these commands
|
||||
|
||||
```
|
||||
apt-get update && apt-get upgrade -y
|
||||
apt-get install -y build-essential make texinfo cmake bison flex gettext libgmp3-dev libmpfr-dev libmpc-dev libz-dev wget patch
|
||||
```
|
||||
|
||||
- Configure git (replace your name and email)
|
||||
|
||||
```
|
||||
git config --global user.email "your@email.com"
|
||||
git config --global user.name "Your Name"
|
||||
```
|
||||
|
||||
- Create directories
|
||||
|
||||
```
|
||||
mkdir /ps2dev
|
||||
mkdir /ps2dev/built
|
||||
@@ -45,12 +53,16 @@ mkdir /ps2dev/source
|
||||
mkdir /repos
|
||||
mkdir /repos/tyra
|
||||
```
|
||||
|
||||
- Clone repos
|
||||
|
||||
```
|
||||
git clone https://github.com/ps2dev/ps2dev.git /ps2dev/source/
|
||||
git clone https://github.com/h4570/tyra.git /repos/tyra/
|
||||
```
|
||||
|
||||
- Open bashrc via `nano ~/.bashrc` and add these lines at the end of file. Be sure that they are 1:1, so don't add additional spaces!
|
||||
|
||||
```
|
||||
export PS2DEV=/ps2dev/built
|
||||
export PS2SDK=$PS2DEV/ps2sdk
|
||||
@@ -61,27 +73,30 @@ export TYRA=/repos/tyra
|
||||
export WSL_MAKE_WINDOWS=\\\\\\\\wsl\$\$\\\\Ubuntu-20.04
|
||||
export WSL_LINUX_PCSX2=/mnt/c/Program\\\ Files\\\ \\\(x86\\\)/PCSX2
|
||||
```
|
||||
|
||||
- Refresh env variables via -> `. ~/.bashrc`
|
||||
- Close wsl terminal
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Mapping WSL directories to your Windows machine
|
||||
- Open cmd and type `wsl.exe --list`
|
||||
`Info: Remember your distribution name from this list. My is "Ubuntu-20.04"`
|
||||
|
||||
- Open cmd and type `wsl.exe --list``Info: Remember your distribution name from this list. My is "Ubuntu-20.04"`
|
||||
- Click at the windows logo on your keyboard, type "This PC" and open
|
||||
- At the upper menu click "Map disk drive"
|
||||
`Info: Replace my name with your WSL name!`
|
||||
- At the upper menu click "Map disk drive"`Info: Replace my name with your WSL name!`
|
||||
- Folder: \\\\wsl$\\Ubuntu-20.04
|
||||
- Click OK
|
||||
|
||||
`Info: You will have now new disk on your PC, this is the WSL filesystem.`
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Configuring VSCode
|
||||
|
||||
- Open VSCode
|
||||
- Install extension "Remote - WSL"
|
||||
- Install extension "C/C++"
|
||||
@@ -93,10 +108,13 @@ export WSL_LINUX_PCSX2=/mnt/c/Program\\\ Files\\\ \\\(x86\\\)/PCSX2
|
||||
`Info: New terminal should appear. This is the same WSL terminal :)`
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## PS2DEV installation
|
||||
|
||||
- In VSCode's WSL terminal type:
|
||||
|
||||
```
|
||||
cd /ps2dev/source
|
||||
unset ZLIB
|
||||
@@ -105,42 +123,49 @@ unset LIBJPEG
|
||||
unset LIBPNG
|
||||
./build-all.sh
|
||||
```
|
||||
|
||||
`Info: This can take some time...`
|
||||
|
||||
- And open again .bashrc via `nano ~/.bashrc` and add these lines at the end of file.
|
||||
|
||||
```
|
||||
export ZLIB=${PS2SDK}/ports
|
||||
export LIBTIFF=${PS2SDK}/ports
|
||||
export LIBJPEG=${PS2SDK}/ports
|
||||
export LIBPNG=${PS2SDK}/ports
|
||||
```
|
||||
|
||||
- Refresh env variables via `. ~/.bashrc`
|
||||
|
||||
### !!! Please don't forgot to remove/refresh these 4 exports when you will want to update PS2DEV (./build-all.sh), because there is circular dependency between these libs and gsKit which is included in PS2DEV !!!
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Build Tyra
|
||||
|
||||
- Just hit make all on the root of tyra folder or you can go via `cd /src/engine` and hit `make all` there.
|
||||
- Go to one of the samples via `cd /repos/tyra/src/samples/floors`
|
||||
- Build debug version: `make rebuild-dbg-engine`
|
||||
`Info: If you want to build final version in future, type make rebuild-engine `
|
||||
- Build debug version: `make rebuild-dbg-engine Info: If you want to build final version in future, type make rebuild-engine `
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Install & configure PCSX2
|
||||
- Download & install PCSX2 from (1.6+ version)
|
||||
https://pcsx2.net/
|
||||
- Extract bios files from
|
||||
https://romsmania.cc/bios/pcsx2-playstation-2-bios-3
|
||||
to
|
||||
`C:\Users%USERNAME%\Documents\PCSX2\bios`
|
||||
|
||||
- Download & install PCSX2 from (1.6+ version)https://pcsx2.net/
|
||||
- Extract bios files fromhttps://romsmania.cc/bios/pcsx2-playstation-2-bios-3to `C:\Users%USERNAME%\Documents\PCSX2\bios`
|
||||
- Close `PCSX2` if you have opened!
|
||||
- Open `C:\Users\hasto\Documents\PCSX2\inis\PCSX2_vm.ini` in notepad
|
||||
|
||||
```
|
||||
HostFs=enabled
|
||||
```
|
||||
|
||||
- Open PCSX2 and map pad to your keyboard, for example:
|
||||
|
||||
```
|
||||
WASD = Left joy
|
||||
Arrows = Right joy
|
||||
@@ -149,45 +174,49 @@ Circle = C
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Run one of the samples
|
||||
|
||||
- Add assets for "floors" sample
|
||||
- Download assets from
|
||||
https://github.com/h4570/tyra/tree/master/src/samples/floors
|
||||
- Download assets fromhttps://github.com/h4570/tyra/tree/master/src/samples/floors
|
||||
- Windows: Open your WSL folder (This PC -> WSL folder)
|
||||
- Extract assets to /repos/tyra/src/samples/floors/bin/ (create bin folder if not exists)
|
||||
- Compile sample via `make`
|
||||
`Info: Elf file should be produced in /bin`
|
||||
- Compile sample via `make``Info: Elf file should be produced in /bin`
|
||||
- Run sample in PSX2 via `make run-pcsx2`
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## How to code?
|
||||
|
||||
Do some changes in your sample and just type `make clean all run-pcsx2` in your sample folder.
|
||||
You can create your own sample, by just copying cube folder.
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Setup Intelisense
|
||||
|
||||
- Download
|
||||
http://apgcglz.cluster028.hosting.ovh.net/tyra/intellisense.zip
|
||||
- Unpack `.vscode` folder to WSL's `/repos/tyra/`
|
||||
`Info: This configuration is set for cube sample, but you can change it in tasks.json file`
|
||||
- Downloadhttp://apgcglz.cluster028.hosting.ovh.net/tyra/intellisense.zip
|
||||
- Unpack `.vscode` folder to WSL's `/repos/tyra/Info: This configuration is set for cube sample, but you can change it in tasks.json file`
|
||||
|
||||
---
|
||||
|
||||
<br/>
|
||||
|
||||
## Advanced: Compiling VU1 programs
|
||||
|
||||
`Info: Based on https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520`
|
||||
|
||||
- Download VCL
|
||||
http://lukasz.dk/files/vcl.1.4.beta7.x86.tgz
|
||||
- Rename `vcl_14beta7_x86` binary to `vcl`
|
||||
- Put `vcl` to WSL's `/usr/bin`
|
||||
|
||||
```
|
||||
apt-get install qemu qemu-user-static binfmt-support
|
||||
update-binfmts --install i386 /usr/bin/qemu-i386-static --magic '\x7fELF\x01\x01\x01\x03\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x01\x00\x00\x00' --mask '\xff\xff\xff\xff\xff\xff\xff\xfc\xff\xff\xff\xff\xff\xff\xff\xff\xf8\xff\xff\xff\xff\xff\xff\xff'
|
||||
@@ -196,13 +225,18 @@ apt-get update
|
||||
apt-get install libstdc++5:i386
|
||||
chmod 755 /usr/bin/vcl
|
||||
```
|
||||
|
||||
`Info: In Ubuntu 18.04 I was obligated to install lib32ncurses5 also`
|
||||
|
||||
- Add this line to `~/.bashrc`
|
||||
|
||||
```
|
||||
service binfmt-support start &>/dev/null
|
||||
```
|
||||
|
||||
- Uncomment `.vsm`/`.vcl` recipe from Tyra's engine `Makefile`
|
||||
- Download & install VCL preprocessor
|
||||
|
||||
```
|
||||
mkdir temp && cd temp
|
||||
git clone https://github.com/glampert/vclpp .
|
||||
@@ -211,4 +245,5 @@ cp vclpp /usr/bin/
|
||||
chmod 755 /usr/bin/vclpp
|
||||
cd .. && rm -rf ./temp
|
||||
```
|
||||
|
||||
- Uncomment `.vclpp`/`.vcl` recipe from Tyra's engine `Makefile`
|
||||
|
||||
Reference in New Issue
Block a user