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 2019-03-06 03:19:18

zeropagebyte
Member
Registered: 2019-02-22
Posts: 32

Are there ways to make a gb file without compiling it?

This sounds a bit strange but can you compile it by just converting ascii characters or hex?

Offline

 

#2 2019-03-06 12:47:23

DonaldHays
Member
From: Seattle
Registered: 2016-08-01
Posts: 36
Website

Re: Are there ways to make a gb file without compiling it?

Technically speaking, yes, you could build a GB file by manually setting bytes in a hex editor. You would need to have documents like the header format and the bytes that instructions assemble to, and you would need to do copious math by hand to work out things like jump target addresses. It would be extraordinarily tedious and error-prone.

Judging by your post history, I'm guessing you're exploring this direction because you're struggling to get RGBDS working and are looking for alternatives? If so, I highly recommend continuing to work on trying to get up and running with RGBDS. If you're struggling with how to use command line tools, I recommend finding tutorials on operating command lines in general, so that you would be well-equipped to use any command line tool, and would be able to figure out how to use RGBDS using knowledge you already have, instead of needing to have specific commands provided to you. Additionally, since using something like a makefile or shell scripts rapidly becomes highly useful when programming with a workflow that involves the command line, having a general knowledge of it becomes even more useful.

Offline

 

#3 2019-03-07 10:53:51

zeropagebyte
Member
Registered: 2019-02-22
Posts: 32

Re: Are there ways to make a gb file without compiling it?

DonaldHays wrote:

Technically speaking, yes, you could build a GB file by manually setting bytes in a hex editor. You would need to have documents like the header format and the bytes that instructions assemble to, and you would need to do copious math by hand to work out things like jump target addresses. It would be extraordinarily tedious and error-prone.

Judging by your post history, I'm guessing you're exploring this direction because you're struggling to get RGBDS working and are looking for alternatives? If so, I highly recommend continuing to work on trying to get up and running with RGBDS. If you're struggling with how to use command line tools, I recommend finding tutorials on operating command lines in general, so that you would be well-equipped to use any command line tool, and would be able to figure out how to use RGBDS using knowledge you already have, instead of needing to have specific commands provided to you. Additionally, since using something like a makefile or shell scripts rapidly becomes highly useful when programming with a workflow that involves the command line, having a general knowledge of it becomes even more useful.

I can't find a video on how to set it up.

Offline

 

#4 2019-03-07 12:52:23

Robbi_Blechdose
Member
Registered: 2017-12-10
Posts: 29

Re: Are there ways to make a gb file without compiling it?

Just copy the executables somewhere and use them. Dead simple, which is why no video for setting it up exists.

Offline

 

#5 2019-03-07 13:17:08

ISSOtm
Member
From: Somewhere in Echo RAM
Registered: 2017-04-18
Posts: 160
Website

Re: Are there ways to make a gb file without compiling it?

Setting up RGBDS on Linux: `cd` into its directory, `make` then `sudo make install`
On Windows: grab the release EXEs, put them somewhere on your PATH or next to the project being compiled. Though on Windows it's kind of a nightmare.


The French Lord Of Laziness.
Legend of Zelda and Undertale fan, I also tend to break Pokémon R/B/Y a little too much.

Twitter | Me on GCL | Discord : ISSOtm#9015 | Skype : isso.tm (I don't login anymore)

Offline

 

#6 2019-03-07 13:35:02

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

Re: Are there ways to make a gb file without compiling it?

ISSOtm wrote:

Setting up RGBDS on Linux: `cd` into its directory, `make` then `sudo make install`
On Windows: grab the release EXEs, put them somewhere on your PATH or next to the project being compiled. Though on Windows it's kind of a nightmare.

If you're having trouble using RGBDS (after following the above) ISSOtm has a nice step by step tutorial here: https://eldred.fr/gb-asm-tutorial/hello-world.html (look under Action!)

Offline

 

#7 2019-04-03 11:07:42

zeropagebyte
Member
Registered: 2019-02-22
Posts: 32

Re: Are there ways to make a gb file without compiling it?

gbjosh wrote:

ISSOtm wrote:

Setting up RGBDS on Linux: `cd` into its directory, `make` then `sudo make install`
On Windows: grab the release EXEs, put them somewhere on your PATH or next to the project being compiled. Though on Windows it's kind of a nightmare.

If you're having trouble using RGBDS (after following the above) ISSOtm has a nice step by step tutorial here: https://eldred.fr/gb-asm-tutorial/hello-world.html (look under Action!)

So, could I put it in my C:\ directory?

Last edited by zeropagebyte (2019-04-03 11:09:14)

Offline

 

#8 2019-04-03 21:18:12

DevEd
New member
Registered: 2015-11-04
Posts: 9

Re: Are there ways to make a gb file without compiling it?

It's generally a bad idea to put executable files in the root directory of your hard drive. The best way to go about it would be as follows:

1. Create a folder in your C:\ directory named "gbdev" (should be located at C:\gbdev)
2. Put the RGBDS binaries (rgbasm, rgblink, rgbgfx, rgbfix, and any associated DLL files) in the folder you just created.
3. Open a command prompt and run the following command to add the folder to your PATH environment variable:

Code:

setx path "%path%; C:\gbdev"

After you've done this, RGBDS should be set up and ready to go.


You know, the DevSound guy.

Offline

 

#9 2019-04-04 11:21:07

zeropagebyte
Member
Registered: 2019-02-22
Posts: 32

Re: Are there ways to make a gb file without compiling it?

DevEd wrote:

It's generally a bad idea to put executable files in the root directory of your hard drive. The best way to go about it would be as follows:

1. Create a folder in your C:\ directory named "gbdev" (should be located at C:\gbdev)
2. Put the RGBDS binaries (rgbasm, rgblink, rgbgfx, rgbfix, and any associated DLL files) in the folder you just created.
3. Open a command prompt and run the following command to add the folder to your PATH environment variable:

Code:

setx path "%path%; C:\gbdev"

After you've done this, RGBDS should be set up and ready to go.

What command is for compiling .asm files?

Last edited by zeropagebyte (2019-04-04 11:21:48)

Offline

 

#10 2019-04-05 07:17:52

ISSOtm
Member
From: Somewhere in Echo RAM
Registered: 2017-04-18
Posts: 160
Website

Re: Are there ways to make a gb file without compiling it?

rgbasm to compile them into .o files, rgblink to turn all .o files into a ROM, rgbfix to patch the ROM with a header.

Example of a set of commands to compile a game:

Code:

rgbasm [flags...] -o obj/home.o src/home.asm
rgbasm [flags...] -o obj/engine.o src/home.asm
rgbasm [flags...] -o obj/memory.o src/memory.asm
rgbasm [flags...] -o obj/battle.o src/battle.asm

rgblink [flags...] [-m bin/rom.map] [-n bin/rom.sym] -o bin/rom.gb obj/home.o obj/engine.o obj/memory.o obj/battle.o

rgbfix -v [flags...] bin/rom.gb

A more complex and flexible setup, involving a Makefile, can be found on my GitHub.


The French Lord Of Laziness.
Legend of Zelda and Undertale fan, I also tend to break Pokémon R/B/Y a little too much.

Twitter | Me on GCL | Discord : ISSOtm#9015 | Skype : isso.tm (I don't login anymore)

Offline

 

#11 2019-04-05 08:37:32

zeropagebyte
Member
Registered: 2019-02-22
Posts: 32

Re: Are there ways to make a gb file without compiling it?

ISSOtm wrote:

rgbasm to compile them into .o files, rgblink to turn all .o files into a ROM, rgbfix to patch the ROM with a header.

Example of a set of commands to compile a game:

Code:

rgbasm [flags...] -o obj/home.o src/home.asm
rgbasm [flags...] -o obj/engine.o src/home.asm
rgbasm [flags...] -o obj/memory.o src/memory.asm
rgbasm [flags...] -o obj/battle.o src/battle.asm

rgblink [flags...] [-m bin/rom.map] [-n bin/rom.sym] -o bin/rom.gb obj/home.o obj/engine.o obj/memory.o obj/battle.o

rgbfix -v [flags...] bin/rom.gb

A more complex and flexible setup, involving a Makefile, can be found on my GitHub.

I get an error saying "Code generation before SECTION directive".

Offline

 

#12 2019-04-07 13:22:08

ISSOtm
Member
From: Somewhere in Echo RAM
Registered: 2017-04-18
Posts: 160
Website

Re: Are there ways to make a gb file without compiling it?

You must define code in SECTIONs. Please read the man pages, especially this one


The French Lord Of Laziness.
Legend of Zelda and Undertale fan, I also tend to break Pokémon R/B/Y a little too much.

Twitter | Me on GCL | Discord : ISSOtm#9015 | Skype : isso.tm (I don't login anymore)

Offline

 

#13 2019-05-04 07:46:47

zeropagebyte
Member
Registered: 2019-02-22
Posts: 32

Re: Are there ways to make a gb file without compiling it?

ISSOtm wrote:

You must define code in SECTIONs. Please read the man pages, especially this one

I checked gameboy code and I saw the ROM name. So, I could use a HEXADECIMAL to ASCII converter.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson