It is currently Mon Oct 23, 2017 9:21 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: GB/C Dev Environment?
PostPosted: Thu Dec 01, 2011 12:31 am 
Offline

Joined: Thu Dec 01, 2011 12:23 am
Posts: 8
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 (:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2011 5:18 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
Quote:
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.

Quote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2011 7:59 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
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.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2011 9:15 am 
Offline

Joined: Thu Dec 01, 2011 12:23 am
Posts: 8
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 (:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2011 2:24 pm 
Offline

Joined: Thu Dec 01, 2011 12:23 am
Posts: 8
What about GBDK, is that just for programming in C. Know if it's any good? Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2011 2:50 pm 
Offline
User avatar

Joined: Thu Jan 19, 2006 5:08 pm
Posts: 744
Location: Shelton, Washington.
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.

_________________
AKA SmilyMZX/AtariHacker.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2011 10:33 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2011 2:30 pm 
Offline

Joined: Sun Mar 27, 2011 10:49 am
Posts: 192
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2011 9:45 am 
Offline

Joined: Thu Dec 01, 2011 12:23 am
Posts: 8
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2011 11:43 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
wla-gb -o foo.asm foo.o
wlalink -b foo.link foo.gbc


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2011 12:00 pm 
Offline

Joined: Thu Dec 01, 2011 12:23 am
Posts: 8
Awesome, do I just throw those into command prompt, or do I need to create a batch file? Thanks by the way


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2011 1:02 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
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:

Code:
[objects]
foo.o


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2011 5:13 pm 
Offline

Joined: Thu Dec 01, 2011 12:23 am
Posts: 8
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?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 08, 2011 11:12 pm 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 911
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).


Top
 Profile  
 
 Post subject: Re:
PostPosted: Tue Dec 11, 2012 10:19 pm 
Offline

Joined: Tue Dec 11, 2012 1:02 pm
Posts: 42
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:

Code:
[objects]
foo.o



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
"
?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group