Gameboy Development
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Is there a gameboy dev software for mac?

3 posters

Go down

Is there a gameboy dev software for mac? Empty Is there a gameboy dev software for mac?

Post  Munchlax Fri Dec 07, 2012 10:51 pm

Is there a Gameboy dev software for mac?
it would be nice to know i there is one
it would like it o universal, ether way is cool.

thanks
-Munchlax Gameboy Is there a gameboy dev software for mac? 44612

Munchlax
Newbie

Posts : 2
Join date : 2012-12-02
Age : 26
Location : Changing

Back to top Go down

Is there a gameboy dev software for mac? Empty Re: Is there a gameboy dev software for mac?

Post  konsumer Sun Jan 20, 2013 7:20 am

I recently setup a GB dev environment. I don't know if this is ideal, but it worked on Mountain Lion for me.

Xcode: Download Xcode and the command-line tools. To get them go here. Search for "Command Line Tools", and pick the first one. Install that, and stuff should be all setup.

GBDK: I downloaded a pre-compiled version, and extracted to /opt/gbdk
RGBDS: I used rgbds-linux, and just ran make, seemed to work great. copied the whole folder into opt, so it was with the gbdk.
Emulator: I used visualboy advance. It doesn't have a debugger, but seems to run games ok. it associates with .gb and .gbc ROM files.
DOS tools: I got the wave tool and Advanced PCX2GB from dos-tools extract them to /opt/dos
Windows Tools: I installed Wine Bottler and got no$gmb (32bit version, without sound) and all the windows tools from Windows Tools to run, in a single prefix. This adds color image map/tile support, font support and more. no$gmb has a debugger, which is pretty rad, but I couldn't get the sound working. I bottled all the apps, so they have nice icons, and installed them all to one winebottler prefix, to save space. I am going to try out WineSkin, as I hear it has easier support of game-stuff (like sound, etc)
Editor: You should get something that syntax-highlights. I use Sublime Text 2, a great code editor. I also recommend installing the Package Control, then search for Sublime package named "nesasm".

Now, install DOSBox and add a mount command & tools to path in your autoexec. Do this by editng the bottom of  ~/Library/Preferences/DOSBox 0.73 Preferences to look like this:

Code:
@echo off
mount H /Users/YOU
mount D /opt/dos
set PATH=D:\;%PATH%
Replace "YOU" with your username. Now you have access to your home dir (H:) & dostools (in path, D:)

I keep my projects in ~/Documents/Projects. Here is how I make an image:

use gimp to make a PCX image 160x144 named in Documents/Projects/coolgame/logo.pcx
fire up dosbox

type these:
Code:
H:
cd Documents/Projects/coolgame
pcx2gb o d logo.pcx logo_tile.c logo_map.c
Looking at DOSBox Usage I think you could add stuff that works from command-line, directly, but I didn't bother (it's not super-common that I need to make images or whatever.)

Then, I made a directory with a Makefile that looks like this:

Code:
GBDK = /opt/gbdk
CC   = ${GBDK}/bin/lcc -Wa-l -Wl-m -Wl-j
RGB = /opt/rgbds/rgbfix

BINS   = mygame.gb

all:   $(BINS)

%.o:   %.c
   $(CC) -c -o $@ $<

%.s:   %.c
   $(CC) -S -o $@ $<

%.o:   %.s
   $(CC) -c -o $@ $<

%.gb:   %.o
   $(CC) -o $@ $<

%.gbc:   %.o
   $(CC) -o $@ $< && ${RGB} -vcs -l 0x33 -p 0 $@

clean:
   rm -f *.o *.lst *.map *.gb *.gbc *~ *.rel *.cdb *.ihx *.lnk *.sym *.asm
Make a file called mygame.c, that looks like this:

Code:
#include <gb/gb.h>
#include <stdio.h>

#include "logo_tile.c"
#include "logo_map.c"

void main() {
    // load logo
    set_bkg_data(0,255, tiledata);
    VBK_REG = 1;
    VBK_REG = 0;
    set_bkg_tiles(0,0,20,18, tilemap);
    SHOW_BKG;
    DISPLAY_ON;

    waitpad(J_START);

    printf(" \n\n\n\n\n\n\n\nYour game goes here.\n");
    waitpad(J_START);
}
Now, you can run "make", and it will compile  mygame.c to  mygame.gb. This is a basic boilerplate, you can do lots of other stuff, read docs on rgbfix for setting ROM title, etc.

It's also handy if you have a bunch of c files, you can run:

"make testsound.gb", and it will compile  testsound.c to  testsound.gb

type "open mygame.gb" to run it.


Last edited by konsumer on Fri Aug 16, 2013 12:15 pm; edited 1 time in total (Reason for editing : I can add links, now.)

konsumer
Newbie

Posts : 3
Join date : 2013-01-20

Back to top Go down

Is there a gameboy dev software for mac? Empty thanks so much konsumer

Post  Munchlax Thu Apr 11, 2013 3:48 pm

thanks soo munch, very helpful! Very Happy Gameboy Gameboy
thank so much you for taking time to write this!!!!

Munchlax
Newbie

Posts : 2
Join date : 2012-12-02
Age : 26
Location : Changing

Back to top Go down

Is there a gameboy dev software for mac? Empty Re: Is there a gameboy dev software for mac?

Post  konsumer Thu Apr 11, 2013 4:21 pm

No prob. Glad it was helpful. I wrote a slightly snarky blogpost about the same thing, which may be helpful. http://blog.jetboystudio.com/2013/02/01/gameboy-dev-environment.html

konsumer
Newbie

Posts : 3
Join date : 2013-01-20

Back to top Go down

Is there a gameboy dev software for mac? Empty Re: Is there a gameboy dev software for mac?

Post  soerena Fri Aug 16, 2013 9:24 am

konsumer wrote:

Basically "make" and "gcc" should be in your path.


Hi, thank you for this greatly detailed and well explained reply.
I think I'm almost there, although I have a few questions.

could you elaborate a bit on the quote above?
I think I got most of the other stuff done, but I'm not sure what you mean here.
Is make and gcc part of the command line tools? And which path are you referring to - the opt/gbdk/ ? and how do I get them to be in that path?

Regards
Søren

soerena
Newbie

Posts : 1
Join date : 2013-08-16

Back to top Go down

Is there a gameboy dev software for mac? Empty Re: Is there a gameboy dev software for mac?

Post  konsumer Fri Aug 16, 2013 11:54 am

Yep, The Xcode command-line tools include make & gcc, and put it in your path.

Download Xcode https://developer.apple.com/xcode/.

Next, go https://developer.apple.com/downloads/. Search for "Command Line Tools", and pick the first one. Install that, and stuff should be all setup.

I updated the instructions to include that, now that I can make links.

konsumer
Newbie

Posts : 3
Join date : 2013-01-20

Back to top Go down

Is there a gameboy dev software for mac? Empty Re: Is there a gameboy dev software for mac?

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum