Difference between revisions of "ZGB Installation Tutorial"
(→Installation) |
(linux installation for ZGB so it won't get buried in the forums) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 20: | Line 20: | ||
*[http://www.devrs.com/gb/hmgd/gbtd.html Game Boy Tile Designer] on c:\gbdk\tools\gbtd22 | *[http://www.devrs.com/gb/hmgd/gbtd.html Game Boy Tile Designer] on c:\gbdk\tools\gbtd22 | ||
− | * | + | *The [https://github.com/Zal0/ZGB/archive/master.zip ZGB Official repository], anywhere but create an environment variable called ZGB_PATH pointing the common folder eg: c:\ZGB\common |
*[https://www.visualstudio.com/downloads/ Microsoft Visual Studio Community Edition] | *[https://www.visualstudio.com/downloads/ Microsoft Visual Studio Community Edition] | ||
The make that comes with msys doesn't print any error messages and that's why you need to download make for windows too. | The make that comes with msys doesn't print any error messages and that's why you need to download make for windows too. | ||
+ | |||
+ | == Installation on Linux == | ||
+ | |||
+ | These instructions were written for an [https://github.com/Zal0/ZGB/commit/87cde03188e3784a9cdb885a09ff2be3e7113fa1 older version] of ZGB, but should work in similar fashion for the more recent versions. | ||
+ | |||
+ | GBDK is based on a now ancient version of SDCC and in newer SDCC versions bank support (needed for binaries > 32kB) appears to be broken. However, it is possible to combine GBDK's linker with a more recent version of SDCC to get a less buggy binary and retain banking support [http://zalods.blogspot.com/2017/07/bitbitjam-4-velcro-sheep.html 1]. | ||
+ | |||
+ | 1. Get SDCC version 3.6.0 or 3.5.0, preferably [https://sourceforge.net/projects/sdcc/files/sdcc-linux-x86/3.6.0/ 3.6.0], but check your distro's default version first. | ||
+ | <blockquote>Newer versions 3.9.0 and 3.8.0 don't work with GBDK's linker out of the box.</blockquote> | ||
+ | |||
+ | 2. download [https://sourceforge.net/projects/gbdk/files/gbdk/2.96/ gbdk-2.96a-i586-pc-linux2.2.tar.gz] | ||
+ | |||
+ | unpack to /opt/gbdk (or any other directory of your choice) | ||
+ | |||
+ | Set GBDK_HOME="/opt/gbdk" | ||
+ | |||
+ | For Arch users there is also an [https://aur.archlinux.org/packages/gbdk/ AUR package]. | ||
+ | |||
+ | Zal0 recommends 2.95-3, but the Linux version of lcc seems to have a problem with Objectfile names that have more than 8 characters [http://gbdev.gg8.se/forums/viewtopic.php?id=597 2]. | ||
+ | |||
+ | 3. git clone ZGB & ZGB template | ||
+ | |||
+ | Set ZGB_PATH="/path/to/ZGB/common" | ||
+ | |||
+ | Modify SDCC and SDASGB in ''MakefileCommon'' to point to wherever you put the binaries for sdcc and sdasgb (from step 1). | ||
+ | |||
+ | (4. Change all #includes with \ to / (e.g in StateGame.c)) | ||
+ | |||
+ | 5. Then you can just use the makefiles to build the project: | ||
+ | Open up a terminal in ZGB/common/src/ and type make. | ||
+ | |||
+ | Then go to ZGB-template/src and type make. | ||
+ | |||
+ | This will then build the ROM and put it in ZGB-template/bin/ |
Latest revision as of 12:30, 11 July 2019
Introduction
ZGB is a gameboy engine devloped by Zal0
Installation
Download and install:
- gbdk (2.95-3 at the moment of writing this) on c:\gbdk
- msys anywhere but add the folder msys/bin to your Path environment var
- Make for Windows* on C:\gbdk\bin\make-3.81-bin
- BGB on c:\gbdk\bin
- mod2gbt on c:\gbdk\bin
- Game Boy Map Builder on c:\gbdk\tools\gbmb18
- Game Boy Tile Designer on c:\gbdk\tools\gbtd22
- The ZGB Official repository, anywhere but create an environment variable called ZGB_PATH pointing the common folder eg: c:\ZGB\common
The make that comes with msys doesn't print any error messages and that's why you need to download make for windows too.
Installation on Linux
These instructions were written for an older version of ZGB, but should work in similar fashion for the more recent versions.
GBDK is based on a now ancient version of SDCC and in newer SDCC versions bank support (needed for binaries > 32kB) appears to be broken. However, it is possible to combine GBDK's linker with a more recent version of SDCC to get a less buggy binary and retain banking support 1.
1. Get SDCC version 3.6.0 or 3.5.0, preferably 3.6.0, but check your distro's default version first.
Newer versions 3.9.0 and 3.8.0 don't work with GBDK's linker out of the box.
2. download gbdk-2.96a-i586-pc-linux2.2.tar.gz
unpack to /opt/gbdk (or any other directory of your choice)
Set GBDK_HOME="/opt/gbdk"
For Arch users there is also an AUR package.
Zal0 recommends 2.95-3, but the Linux version of lcc seems to have a problem with Objectfile names that have more than 8 characters 2.
3. git clone ZGB & ZGB template
Set ZGB_PATH="/path/to/ZGB/common"
Modify SDCC and SDASGB in MakefileCommon to point to wherever you put the binaries for sdcc and sdasgb (from step 1).
(4. Change all #includes with \ to / (e.g in StateGame.c))
5. Then you can just use the makefiles to build the project: Open up a terminal in ZGB/common/src/ and type make.
Then go to ZGB-template/src and type make.
This will then build the ROM and put it in ZGB-template/bin/