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 2014-09-13 15:42:51

nitrofurano
New member
Registered: 2014-09-13
Posts: 2

targeting Gameboy from Boriel's ZX-Basic Compiler (unsuccessful... :S)

Hi everyone!
I'm trying to start coding for Gameboy, but i'm using Boriel’s ZX-Basic Compiler instead
At https://docs.google.com/file/d/0B7Iw8X7 … GFzOERmTUU you find the sources, the .asm file that might be helpful for debugging, and the resulting .gb file
I'm using this cross-compiler, by default developed for targeting ZX-Spectrum, but i was successfully using it for MSX, Master System, Game Gear, ColecoVision, GX4000, Aquarius, etc. (you can find something at http://www.boriel.com/wiki/en/index.php … R_HARDWARE ) - so i guess i can use it for coding stuff for Gameboy as well! smile
Please let me know what you all think, and what might be wrong on what i have there for Gameboy - my idea is to help Boriel’s ZX-Basic Compiler targeting Gameboy as well! thanks! smile

Offline

 

#2 2014-09-13 16:39:07

nitro2k01
Administrator
Registered: 2008-02-22
Posts: 249

Re: targeting Gameboy from Boriel's ZX-Basic Compiler (unsuccessful... :S)

Gameboy is not actually a Z80 CPU. It's a Sharp LR35902, which is more similar to Intel 8080 than Z80. In particular, this means, no shadow register and no index register, among other things. The code would likely need a bit of a rewrite to work.

You may want to refer to Pan Docs or the opcode map. You may also wish to check out RGBDS (an assembler) or GB-BASIC.


Blog: Gameboy Genius
"A journey of a thousand miles begins with one small step"
Old Chinese Proverb

Offline

 

#3 2014-09-13 18:15:46

nitrofurano
New member
Registered: 2014-09-13
Posts: 2

Re: targeting Gameboy from Boriel's ZX-Basic Compiler (unsuccessful... :S)

nitro2k01 wrote:

Gameboy is not actually a Z80 CPU. It's a Sharp LR35902, which is more similar to Intel 8080 than Z80. In particular, this means, no shadow register and no index register, among other things. The code would likely need a bit of a rewrite to work.

You may want to refer to Pan Docs or the opcode map. You may also wish to check out RGBDS (an assembler) or GB-BASIC.

no index register, and Boriel’s ZX-Basic Compiler uses it a lot... :S
thanks! smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson