Jump to content
IGNORED

Gameboy programming?


Opry99er

Recommended Posts

Has anyone done any Gameboy programming? I believe it's a variant on Z80 assembly but I am having alot of difficulty finding and good solid datasheets or info. Anyone?

 

I programmed a few games for it. We used RGBASM for assembly and NO$GMB for debugging. Anywhere you find those tools, you'll find good docs on the GB's custom Z80. That was ten years ago though, so there is probably a new generation of tools. Martine Korth, the author of NO$GMB, was helpful to us when we had problems.

 

IIRC the GB's Z80 was missing the extended registers like AF' but it had new instructions like LD A,[HL+] which auto-incremented HL after loading from it.

Link to comment
Share on other sites

  • 3 weeks later...

Thanks guys--- I'm toying with the idea of doing a game for the GB... I don't know Z80 assembly, but I hear there is a C subset that compiles into the proper object code--- it's an interesting idea. :)

 

The GB-Z80 isn't exactly a z80 ( T cycles are always 4 master cycles or bus cycles, which is why you'll see GBC/GB rated as both 8mhz/4mhz and 2mhz/1mhz). It's missing a few instructions, but gained a few DMA functions. The memory layout (cpu logical address range) is custom to the GB design as well. And there's bank switching hardware (for ram and rom). I'd say you'd need a specific GB C compiler or modify the source code if someone else. I don't particularly remember a C compiler for it BITD, but I could be wrong.

 

Here's the best thing that helped me out back in 1999/2000 when I did some GB/C coding: http://www.pcedev.net/GBZ80/GBCribSheet000129.pdf . This is the last one he released. Every system should have a cribsheet like that :)

Edited by malducci
Link to comment
Share on other sites

  • 2 months later...

I've developed a few games for GB. It's been awhile. The CPU is an 8080 not a Z80. I used sdcc as well as assembly. The no cash emulator/debugger wasn't to bad. He made some custom opcodes so you may print to a window. That allows for some decent 'print' or trace debugging. I have some good library code somewhere. I wrote a sprite 'system's etc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...