I've been following GamingMonsters's gbdk Gameboy Dev tutorial (it's rad! https://www.youtube.com/playlist?list=PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo).
Was doing this for my own reference, but thought I may as well flesh out & share I'm on MacOS, so have put together anywhere I've had to do something different, I'm up to Session 10, so will update if anything further comes along as we progress.
Quick heads up, before you run anything here make sure you know what it's doing, this all worked fine and dandy for me, but I'm not making any promises!
Only Windows & Linux versions are available at Sourceforge.
A Mac version is available on github, however I had real trouble getting it to compile, fortunately, a pre-compiled version is available.
- Download gdbk-mac here Source: https://www.gbdkjs.com/docs/installation/.
- Unzip, and stick it wherever you like (I recommend
/opt/gbdk/
). - Tell the OS where you've installed gbdk, open a terminal and run
export GBDKDIR=/path/to/gbdk/
swapping out/path/to/gbdk/
with the wherever you've chosen to put gbdk.
The make.bat
file is Windows specific, instead we have the lovely makefile
.
- Instead of
make.bat
createmakefile
- Inside your
makefile
you'll want:
all:
/path/to/gbdk/bin/lcc -Wa-l -Wl-m -Wl-j -c -o main.o main.c
/path/to/gbdk/bin/lcc -Wa-l -Wl-m -Wl-j -o main.gb main.o
Be sure to swap out /path/to/gbdk/ with wherever you've put gbdk
3. When you want to compile your code, in terminal run make
, be sure you're in the same directory as the makefile.
Note we've removed -DUSE_SFR_FOR_REG
from our commands, I'm unsure what this does (let me know if you know!), we're possibly using a different version of gbdk that is used in the tutorial, and this was preventing compiling code.
BGB is not available for Mac, Sameboy is, and shares many of BGB's nice dev tools.
https://sameboy.github.io/downloads/
Unfortunately Gameboy Tile Designer is Windows only, and I had trouble finding an alternative. Fortunately it runs brilliantly in Wine.
To get running in Wine:
- Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Use Homebrew to install xquartz:
brew cask install xquartz
- Use Homebrew to install Wine:
brew install wine
- Download Gameboy Tile Designer
- In terminal, launch Gameboy Tile Designer
wine /path/to/GBTD/GBTD.exe
, make sure to swap out that path for wherever you have downloaded to.
(Source)[https://www.davidbaumgold.com/tutorials/wine-mac/]
This is exactly the same as getting the Tile Designer running in part 2, so take a look there!
brew install wine says it cant find it!