Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

Ads

#1 2017-03-19 00:18:52

Alexander the bat
Member
Registered: 2017-03-19
Posts: 31

New to Programming the Gameboy/Color

I've tried everything to get the GBDK To work and I even wanted to set it up Via ReactOS a clone of Windows NT and use that as a Dev VM but never worked but I did found a ASM called RGBDS a mac build but not sure if that needs setting up too....I could learn the basics of the asm for the gameboy and make many Gameboy/color games, so how I can get started and build a game of my own?

I'm wondering if a simple Sudoku game is possible on such of a tiny screen as I want to have many puzzles one can do for fun and have save progress of how many they solved or want to come back to.

I've got the Mac build from https://38leinad.wordpress.com/2012/03/ … -mac-os-x/ - this is RGBDS built on Mac.

So where I can start getting the process to get programmin' in ASM and build many games?

Offline

 

#2 2017-03-19 09:13:44

gbjosh
Member
From: KY
Registered: 2016-06-15
Posts: 51

Re: New to Programming the Gameboy/Color

I have seen this tutorial linked quite a bit: https://avivace.ovh/apps/gbdev/salvage/ … ce%5d.html

Be sure to use the search function on the forums for assembly information as there are a few threads like yours with a ton of useful links.

Offline

 

#3 2017-03-19 13:25:37

svendahlstrand
Member
Registered: 2016-12-07
Posts: 17
Website

Re: New to Programming the Gameboy/Color

If you still want to develop using C, take a look at gbdk-n. It's an effort to modernize gbdk to work with the latest versions of sdcc (the compiler). If you are on macOS, and have homebrew installed, it's easy to get everything installed. Open the terminal and run:

Code:

 brew install svendahlstrand/tap/gbdk-n

Then create a source file hello.c:

Code:

#include <gb/gb.h>
#include <gb/drawing.h>

int main() {
  gprint("Hello, world!");

  return 0;
}

Finally, compile, link and make ROM:

Code:

gbdk-n-compile.sh hello.c
gbdk-n-link.sh hello.rel -o hello.ihx
gbdk-n-make-rom.sh hello.ihx hello.gb

Now you should have a hello.gb ROM file to fire up in your favorite emulator. I'm using SameBoy.

Last edited by svendahlstrand (2017-03-19 13:27:48)

Offline

 

#4 2017-03-19 15:04:51

Alexander the bat
Member
Registered: 2017-03-19
Posts: 31

Re: New to Programming the Gameboy/Color

svendahlstrand wrote:

If you still want to develop using C, take a look at gbdk-n. It's an effort to modernize gbdk to work with the latest versions of sdcc (the compiler). If you are on macOS, and have homebrew installed, it's easy to get everything installed. Open the terminal and run:

Code:

 brew install svendahlstrand/tap/gbdk-n

Then create a source file hello.c:

Code:

#include <gb/gb.h>
#include <gb/drawing.h>

int main() {
  gprint("Hello, world!");

  return 0;
}

Finally, compile, link and make ROM:

Code:

gbdk-n-compile.sh hello.c
gbdk-n-link.sh hello.rel -o hello.ihx
gbdk-n-make-rom.sh hello.ihx hello.gb

Now you should have a hello.gb ROM file to fire up in your favorite emulator. I'm using SameBoy.

how I input a C code to tell KIGB to know it's a universal Black Cart - nintendo states that the Black carts are the Gameboy Color Combo based carts that has both Gameboy Mode and Color Mode.

I'm not sure I do have homebrew working or I have it if there was another way to setup the GBDK-N

Offline

 

#5 2017-03-19 16:38:51

svendahlstrand
Member
Registered: 2016-12-07
Posts: 17
Website

Re: New to Programming the Gameboy/Color

For Game Boy Color support you should take a look at cgb.h and a tutorial like GBDK Color Tutorial.

If you don't want to go the easy way and use homebrew you have to install manually. Install sdcc and then download  and compile gbdk-n.

Offline

 

#6 2017-03-19 16:59:07

Alexander the bat
Member
Registered: 2017-03-19
Posts: 31

Re: New to Programming the Gameboy/Color

Got it - it's taking a long time but I'll just let it all go until it's all finished - how I can tell if it's all installed and working?

Update: It's now installed and ready to go now I just need the C programming tutorials to make my own games now!

Last edited by Alexander the bat (2017-03-19 18:09:05)

Offline

 

#7 2017-03-31 00:42:42

Tag365
Member
Registered: 2016-06-01
Posts: 44

Re: New to Programming the Gameboy/Color

GBDK-n does not support the ROM Bank system so your code will only be able to access data from the first 32 kilobytes of ROM data.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson