Page 1 of 2
GB/C Dev Environment?
Posted: Thu Dec 01, 2011 12:31 am
by Fatboy
I've been looking into GB/C development for the past few months. I tried jumping straight into to Z80 ASM but realized I needed a better understanding of processors in general to really learn ASM. So, I read two books detailing microprocessors and I am now going through a book on Z80. I'm also studying
http://nocash.emubase.de/pandocs.htm
But my question is, what do I need to set up a development environment for a large Gameboy project? I have linux and windows based machines. Any suggestions on assemblers, graphics programs, ect. I'm also looking to eventually get my project working on the actual hardware.
If anybody could point me in the right direction that would be great. (GBC-Specific info is preferred).
Thanks (:
Posted: Thu Dec 01, 2011 5:18 am
by mic_
But my question is, what do I need to set up a development environment for a large Gameboy project? I have linux and windows based machines. Any suggestions on assemblers, graphics programs, ect.
I use WLA-DX for assembling/linking. I know some people doesn't like it, but I think it works fine for my needs.
For graphics I don't really have anything. I wrote my own tool for converting image files to tile data suitable for the monochrome Gameboy, but I haven't put it online yet. I haven't looked into GBC stuff yet, apart from writing a GB/GBC emulator a couple of years ago.
For music I have
my own tool. There are probably many others, some of which are likely to be better.
I'm also looking to eventually get my project working on the actual hardware.
http://store.kitsch-bent.com/product/usb-64m-smart-card
For general hardware info, pandocs (which you had already found) is a great resource.
Posted: Thu Dec 01, 2011 7:59 am
by Dwedit
For graphics, try YY-CHR. It's a romhacking tool, but it's also good for original development. You can either draw your graphics in there, or copy-paste images from the clipboard, as long as they are indexed color images created by a suitable paint program, and have dimensions that are multiples of 8.
Posted: Thu Dec 01, 2011 9:15 am
by Fatboy
Thanks guys. WLA-DX is pretty much what I was looking for, and for the most part it seems it can what I want it to. I'll check out YY-CHR. Appreciate the feedback (:
Posted: Thu Dec 01, 2011 2:24 pm
by Fatboy
What about GBDK, is that just for programming in C. Know if it's any good? Thanks
Posted: Thu Dec 01, 2011 2:50 pm
by Hamtaro126
Fatboy wrote:What about GBDK, is that just for programming in C. Know if it's any good? Thanks
GBDK has never been updated since 2008, but there is Z88DK for C programs, If there is no GB/C Setup for Z88DK, you may build one for it.
Posted: Thu Dec 01, 2011 10:33 pm
by mic_
Hamtaro126 wrote:Fatboy wrote:What about GBDK, is that just for programming in C. Know if it's any good? Thanks
GBDK has never been updated since 2008, but there is Z88DK for C programs, If there is no GB/C Setup for Z88DK, you may build one for it.
There's also SDCC, which has GB-Z80 support. But I don't know if it comes with any libraries for the GB. It produces better code than Z88DK though, at least when I compared them for the Z80 back in february/march.
Posted: Fri Dec 02, 2011 2:30 pm
by adam_smasher
Honestly, I doubt any compiler is able to generate efficient enough code for anything beyond simple demos. The GBZ80 is a pretty lousy processor (much less powerful than a real Z80), and its design isn't exactly amenable to C's abstractions.
Posted: Thu Dec 08, 2011 9:45 am
by Fatboy
I've got another question, and I think the answer is easy but I couldn't find any help through google.
Once I've written my program and saved it as a .asm file how do I make a .gbc rom image?
http://www.smspower.org/maxim/HowToProgram/SettingItUp
This link shows how to set up context to use F9 to compile .sms image files. But he uses a batch file that he wrote himself and it only works to create master systems roms.
Anybody know of anything like this for the gameboy?
Thanks.
Posted: Thu Dec 08, 2011 11:43 am
by mic_
wla-gb -o foo.asm foo.o
wlalink -b foo.link foo.gbc
Posted: Thu Dec 08, 2011 12:00 pm
by Fatboy
Awesome, do I just throw those into command prompt, or do I need to create a batch file? Thanks by the way
Posted: Thu Dec 08, 2011 1:02 pm
by mic_
You don't need to create a batch file, though it can be convenient to have one.
You'll need to create the .link file though, which should contain:
Posted: Thu Dec 08, 2011 5:13 pm
by Fatboy
Apparently I haven't learned as much as I thought I had, is there any sort of tutorial on using wla-dx for gameboy development?
Posted: Thu Dec 08, 2011 11:12 pm
by mic_
I'm not aware of any tutorials, bu there's the wla-dx
manual.
As for code examples, I have some (for the monochrome Gameboy):
here and
here (in demo\gbc).
Re:
Posted: Tue Dec 11, 2012 10:19 pm
by psc
mic_ wrote:You don't need to create a batch file, though it can be convenient to have one.
You'll need to create the .link file though, which should contain:
So, what is the purpose of the link file? Can you compile/assemble the ASM file without the link file?
Could you do something like this:
"
wla-gb nameofassemblyfile.asm nameoffinalgbfile.gb
"
?