BizHawk/waterbox
Morilli 6f98be104a Update waterbox readme 2024-04-22 17:28:02 +02:00
..
ares64 add in fenv guards for ares64 2023-08-10 20:01:21 -07:00
bsnescore Fixed bsnes build (#3891) 2024-04-14 15:48:42 +02:00
emulibc rebuild bsnes, update link script / emulibc.h to work with clang-18 2024-04-14 12:57:18 -07:00
gpgx Update Genesis Plus GX Core (#3889) 2024-04-21 18:34:54 +03:00
libco Implement bsnes version 115 as a new core (#2740) 2021-05-14 20:06:13 -05:00
libcxx Add runtimes path to llvm dirs 2024-04-15 06:17:06 +02:00
libsnes Revamp Waterbox Setup (#3529) 2023-03-28 16:53:33 -07:00
llvm-project@c13b7485b8 Bump libcxx to 18.1.3 2024-04-14 19:01:34 -07:00
mame-arcade fix stackoverflows in mame with games using k001006_device (e.g. windheat) 2023-04-27 00:55:12 -07:00
melon add support for direct booting dsi titles (including dsiware) 2024-01-16 11:04:38 -08:00
musl@e7aec3b9ab Revamp Waterbox Setup (#3529) 2023-03-28 16:53:33 -07:00
nyma add method for setting the frontend time before game load... this will be needed for saturnus, as it may query time to set the initial rtc 2024-02-09 18:35:14 -08:00
picodrive fix picodrive's cram/vsram sizes 2023-05-18 19:29:42 -07:00
snes9x@825db67a62 Update snes9x to 1.62.3 (#3729) 2023-11-02 18:48:54 +03:00
tic80 Revamp Waterbox Setup (#3529) 2023-03-28 16:53:33 -07:00
uzem Revamp Waterbox Setup (#3529) 2023-03-28 16:53:33 -07:00
virtualjaguar (VirtualJaguar) swap user and interrupt stack pointers when going to supervisor mode for external interrupts, fixes Black ICE 2023-05-10 23:04:49 -07:00
waterboxhost waterboxhost: Add missing import, tests now run 2023-07-28 04:42:45 +10:00
.gitignore Add Waterbox core build dirs to .gitignore 2023-04-20 08:23:44 +10:00
Notes on Debugging.md Update notes on debugging 2021-04-09 20:59:22 -04:00
common.mak make sure wbx c++ files also have NDEBUG defined, fixes 1643bf0 2023-03-28 18:02:46 -07:00
linkscript.T Update Genesis Plus GX Core (#3889) 2024-04-21 18:34:54 +03:00
make-all-cores.sh split ares binaries for interpreter vs recompiler 2023-04-19 23:22:00 -07:00
readme.txt Update waterbox readme 2024-04-22 17:28:02 +02:00

readme.txt

This is the native side of the experimental "waterbox" project for bizhawk.
It consists of a modified musl libc, and build scripts to tie it all together.


1. Set up your platform.
	The prescribed possibilities are not exhaustive. Other platforms may work.
	Here are the supported alternatives:

	PREPARE A WIN10 WORKSTATION:
	Using the guidance at (https://docs.microsoft.com/en-us/windows/wsl/install):
	1. Install WSL2 with the Ubuntu distribution
	2. Clone the bizhawk repository. You can use it through /mnt or /home if you really like
	3. The waterbox toolchain has a choice between gcc and clang. Currently, clang is the preferred compiler due to its generally superior performance all around.
	3a. (Clang) Install build tools: sudo apt-get update && sudo apt-get install make cmake clang lld llvm zstd
	3b. (GCC) Install build tools: sudo apt-get update && sudo apt-get install make cmake gcc-13 g++-13 llvm zstd
	4. Note that currently, clang 16+ or gcc 13 is required to successfully build libcxx. Those requirements may change in the future.

	PREPARE A WIN10 VM:
	1. Make sure the VM has "yo dawg" virtualization enabled on the guest. For example in VMWare Workstation, "Virtualize Intel VT-X/EPT or AMD-V/RVI"
	2. Follow WIN10 Workstation preparation guide
	3. If you wish to clone bizhawk on your host system (slower but maybe more convenient), you can use a VMWare shared folder and: `sudo mount -t drvfs Z: /mnt/z -o rw,relatime,metadata,uid=1000,gid=1000` (WSL won't auto-mount the shared drive)

	PREPARE A LINUX WORKSTATION:
	1. Debian/Ubuntu based distros work fine with the WIN10 Workstation instructions (confirmed working with Debian 11). Other distros should be able provide the needed programs in their package managers. make, cmake, gcc/g++ or clang/clang++, ld or lld (lld is required for clang), gcc-ar/gcc-ranlib or llvm-ar/llvm-ranlib (which pair you choose doesn't matter), llvm-config, zstd.
	2. For older Debian/Ubuntu based distros, the package manager might not provide a recent enough compiler for the waterbox toolchain. In these cases, it is recommended to obtain clang and other llvm tools from llvm's apt repository: https://apt.llvm.org/

2. Clone bizhawk sources
	* Make sure git's core.autocrlf is set to false, as the alternatives cause git to modify the line endings in .sh-looking files which WILL break the build process, from the very first step.
	* This is NOT git's default. You will need to change it!! Go ahead and set it false globally permanently, since do you really want git modifying files?
	* Make sure you have initialized and updated the needed submodules in the waterbox directory, a listing of these is here:
		* waterbox/musl (required for the entire waterbox toolchain)
		* waterbox/ares64/ares/thirdparty/angrylion-rdp (required for ares64)
		* submodules/sameboy/libsameboy (required for new BSNES)
		* waterbox/mame-arcade/mame (required for MAME)
		* waterbox/melon/melonDS (required for melonDS)
		* waterbox/nyma/mednafen (required for all Nyma cores)
		* waterbox/snes9x (required for Snes9x)
	* waterbox/llvm-project is needed for the entire waterbox toolchain, but initializing and updating this is handled automatically by later scripts, so you do not need to do anything about this

3. Consider whether it is time to update your build environment (i.e. sudo apt-get upgrade). Build environment tools are generally best kept at the latest version, to ensure top performance for our users.

4. Build libraries.
	cd musl
	./wbox_configure.sh
	./wbox_build.sh
	cd ../emulibc
	make
	cd ../libco
	make
	cd ../libcxx
	./do-everything.sh
	cd ..

4a. At ./wbox_configure, you may need to specify the compiler used. By default, it will try to use clang without a version suffix. If this is not present, it falls on the user to specify a CC variable (e.g. `CC=gcc-12 ./wbox_configure`). This is the only stage which the build tool may need to be manually specified, all future steps will remember this specification and thus need no manual input.

4b. If errors happen in the libcxx part, it can be due to musl mismatching your current build environment. This happens when your build environment is updated; musl does not track its build dependencies correctly. do `make clean` on musl (and delete the non-checkedin directories just to be safe) and try again from the musl step.

5. Some additional preparation is required before all the cores can be built:
	cd nyma && ./build-and-install-zlib.sh

6. You are now ready to start building cores. Each supports `make` and `make install`, as well as `make debug` and `make install-debug` for local development.  From the root directory, the following should all be valid:
	cd ares64 && ./make-both.sh
	cd bsnescore && make install
	cd gpgx && make install
	cd libsnes && make install
	cd mame-arcade && make install
	cd melon && make install
	cd nyma && make -f faust.mak install
	cd nyma && make -f ngp.mak install
	cd nyma && make -f turbo.mak install
	cd nyma && make -f hyper.mak install
	cd nyma && make -f pcfx.mak install
	cd nyma && make -f ss.mak install
	cd nyma && make -f shock.mak install
	cd nyma && make -f vb.mak install
	cd picodrive && make install
	cd snes9x && make install
	cd tic80 && make install
	cd uzem && make install
	cd virtualjaguar && make install

Be aware MAME takes a very long while to build. Following suit, the provided make-all-cores.sh will only make MAME if INCLUDE_MAME is exported (e.g. `INCLUDE_MAME=1 ./make-all-cores.sh`).