Assembling Gameboy z80 Assembly

Jazzmarazz

New member
Joined
Nov 7, 2011
Posts
240
Country
United States
Region
Michigan
I am learning gbz80 ASM and am having trouble assembly any code. I am trying to follow the syllabus of a college that taught the Gameboy Assembly, but I cannot proceed.

I am using RGBDS to assemble a simple "Hello-World" but it will not. Here is the error:




In other news, I am using Windows 7 Ultimate x64 which is probably the problem, but I am sure we can work around that.

I need to start writing code for the cartridge that I am developing on my blog.
http://jazz-disassemblies.blogspot.com/


Help me out guys and gals! It is for a good cause.
 
make sure your "command prompt" is run as administrator,

win 7 wont let programs write to the desktop area etc without this.

try moving your code to "c:\rgbds" or 2nd drive and try again.
 
Sadly, a great character and expert on this very subject, Jeff Frohwein passed away back when the Gameboy Color was around.

His website lingers on the internet, although sadly many of the links are missing.

http://www.devrs.com/

Were it still around today, this would be the ideal resource for learning to program the Nintendo Gameboy.

As it stands, it could potentially help you a fair bit.
 
Last edited:
Assembler can be quite daunting at first glance even thought they have less commands like

LD (load register)
Add (maths of adding)
Sub (maths of take away)
Comp (that like if commands of comparing I think)
Jump (that one is bit like goto commands to whatever label is)
inc (this one where you increase it)
dec (this one is reduce it)

So I guess I know tiny bit of Assembler :)
 
Hi,

Firstly, you are safe to read and write files to your desktop in Windows, so no need to move the directory.

Secondly, the first error message looks strange. It looks like it is trying to call up a command prompt, and as you're using windows 7, it is no longer called "command".

If assemble is a batch file, you may want to look at "assemble.bat" to see what it is trying to do, and possibly replace "command" with "cmd". Putting it on here may help resolve the first error.

I would suspect the second error is due to an output file being in the wrong location, again, viewing the assemble.bat file may help. It appears to have compiled, and is now calling for an application "rgbfix". It is this that cannot find the output files.


I am learning gbz80 ASM and am having trouble assembly any code. I am trying to follow the syllabus of a college that taught the Gameboy Assembly, but I cannot proceed.

I am using RGBDS to assemble a simple "Hello-World" but it will not. Here is the error:




In other news, I am using Windows 7 Ultimate x64 which is probably the problem, but I am sure we can work around that.

I need to start writing code for the cartridge that I am developing on my blog.
http://jazz-disassemblies.blogspot.com/


Help me out guys and gals! It is for a good cause.
 
Sadly, a great character and expert on this very subject, Jeff Frohwein passed away back when the Gameboy Color was around.

His website lingers on the internet, although sadly many of the links are missing.

http://www.devrs.com/

Were it still around today, this would be the ideal resource for learning to program the Nintendo Gameboy.

As it stands, it could potentially help you a fair bit.
I have heard of the name and read through much of that site, but you are right that much is missing...I am trying to follow the Syllabus of a 2008 College course that taught gameboy assembly. I will eventually branch out once that is no longer of use.

Assembler can be quite daunting at first glance even thought they have less commands like

LD (load register)
Add (maths of adding)
Sub (maths of take away)
Comp (that like if commands of comparing I think)
Jump (that one is bit like goto commands to whatever label is)
inc (this one where you increase it)
dec (this one is reduce it)

So I guess I know tiny bit of Assembler :)
I am familiar with Assembly becuase I took two courses at Uni on the Motorola 68hc12. This is what turned me on to ASM. Since I was an IT major, I programmed in many languages but ALWAYS prefer the low-level languages over all.
Hi,

Firstly, you are safe to read and write files to your desktop in Windows, so no need to move the directory.

Secondly, the first error message looks strange. It looks like it is trying to call up a command prompt, and as you're using windows 7, it is no longer called "command".

If assemble is a batch file, you may want to look at "assemble.bat" to see what it is trying to do, and possibly replace "command" with "cmd". Putting it on here may help resolve the first error.

I would suspect the second error is due to an output file being in the wrong location, again, viewing the assemble.bat file may help. It appears to have compiled, and is now calling for an application "rgbfix". It is this that cannot find the output files.
Ok, thanks. I will have a look at the Assemble.bat

Code:
@echo off
REM SIMPLE COMMAND.COM SCRIPT TO ASSEMBLE GAMEBOY FILES
REM REQUIRES MAKELNK.BAT
REM JOHN HARRISON
REM UPDATED 2008-01-28

if exist %1.gb del %1.gb
REM IF THERE ARE SETTINGS WHICH NEED TO BE DONE ONLY ONCE, PUT THEM BELOW
rem if not %ASSEMBLE%1 == 1 goto begin
rem path=%path%;c:\gameboy\assembler\
rem doskey UNNECESSARY ON DESKTOP --- DOSKEY ALREADY INSTALLED
rem set dir=c:\gameboy\curren~1\
command /c makelnk %1 > %1.lnk

:begin
set assemble=1
echo assembling...
rgbasm95 -o%1.obj %1.asm
if errorlevel 1 goto end
echo linking...
xlink95 -mmap %1.lnk
if errorlevel 1 goto end
echo fixing...
rgbfix95 -v %1

:end
rem del *.obj
The code is very short, but I do see a "command". I will change it now.


HAHAH! THATS IT! Thank you so much! I was going to make ZERO progress until I got around that. (y)(y)(y)
 

Attachments

  • allworking.jpg
    allworking.jpg
    90.6 KB · Views: 0
Back
Top Bottom