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 2017-10-26 13:20:49

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Syntax error in RGBDS/ibmpc1?

Hey! I've only just started messing around with RGBDS. Two include files that I see mentioned in almost every RGBDS example on the web are "hardware.inc" and "ibmpc1.inc". I've found multiple versions of "hardware.inc", or similar collections of useful stuff, but is there one hardware "library" like this that most people use? I saw some tutorials referring to devrs.com's version, but I couldn't find it on that website.

I'm having trouble with "ibmpc1.inc" though. The only version I've really found so far is this one, is that the one everyone uses? I get a syntax error when trying to use it. When loading the entire character set (originally when trying to assemble this Hello World example, for context), I get the following error:

Code:

ERROR:  hello_world.asm(35) -> chr_IBMPC1(1877) :
        syntax error
rgbasm: Assembly aborted in pass 1 (1 errors)!

I can't see anything wrong at line 1877 of "ibmpc1.inc", it's just in the middle of $C8. What am I missing here?

Last edited by tobiasvl (2017-10-28 14:41:08)


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

#2 2017-10-26 23:49:56

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

Re: Syntax error in RGBDS/ibmpc1?

Which version of RGBDS are you using?


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

Offline

 

#3 2017-10-27 06:42:51

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Re: Syntax error in RGBDS/ibmpc1?

Yeah, that's a relevant question. I'm using 0.2.5, which came with my package manager. I will compile my own 0.3.3 binary instead. I couldn't find a changelog, do you know if a relevant bug has been fixed?

Edit: I don't seem to be able to build 0.3.3 either… https://github.com/rednex/rgbds/issues/207

Last edited by tobiasvl (2017-10-27 07:04:45)


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

#4 2017-10-27 13:42:57

tmk
Member
Registered: 2017-05-01
Posts: 24

Re: Syntax error in RGBDS/ibmpc1?

Why not use your own font? Preferably something better than PC ugliness. smile I've uploaded simple hello world example if you need it. As for that include file, I've never used it and I don't think I will.

Last edited by tmk (2017-10-27 13:43:45)

Offline

 

#5 2017-10-27 16:43:31

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Re: Syntax error in RGBDS/ibmpc1?

Well, sure, but if I make my own font it'd be useful to know if the reason this file fails is that the macro is too long or something... I can't see anything wrong with it, so it'd be nice to know what the matter is so I learn.


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

#6 2017-10-27 17:31:45

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

Re: Syntax error in RGBDS/ibmpc1?

I cannot reproduce this, although that's on the Windows build of 0.2.5. What arguments are you giving rgbasm and rgblink?


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

Offline

 

#7 2017-10-28 06:38:16

tmk
Member
Registered: 2017-05-01
Posts: 24

Re: Syntax error in RGBDS/ibmpc1?

Macro does work.

Code:

rgbasm.exe -v -ohw.o hello-world.asm

Assembling hello-world.asm
Pass 1...
Pass 2...
Success! 3321 lines in 0.01 seconds (16604999 lines/minute)

However I can't tell you which version it is - there's no such info in windows binaries I've used. The only hint would be creation time - June 2nd, 2016.

Offline

 

#8 2017-10-28 13:59:27

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Re: Syntax error in RGBDS/ibmpc1?

There were no versions released in 2016, but yours is probably even older than mine, since v0.2.5 (which I have) was released March 18th, 2017 and v0.2.4 was released July 30th, 2015. Incidentally, v0.2.5 also added the -V flag to see the version number. In contrast, the latest version, v0.3.3, was released September 16th, 2017. https://github.com/rednex/rgbds/releases

Anyway, I managed to build rgbasm 0.3.3 now (but still not rgblink), and the issue persists there. I also built several old versions of it to see if it was a regression, but it doesn't seem like it. If you used the exact same ibmpc1.inc file as I did (https://github.com/jeremyherbert/gb-sna … ibmpc1.inc), then I have no idea what's going on.

Last edited by tobiasvl (2017-10-28 14:15:34)


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

#9 2017-10-28 15:15:24

tmk
Member
Registered: 2017-05-01
Posts: 24

Re: Syntax error in RGBDS/ibmpc1?

So it's 0.2.4, modified time stamp is exactly July 30th, 2015, not sure why other two are 2016. Hm, maybe your copy of ibmpc1.inc is somehow fux0red?

Code:

ibmpc1.inc
CRC-32: 2b12cf29
SHA-1: ad0adb58404d05115ac60f0ed4ef9d4946762097
SHA-256: 6ac8d0328e1d382d58923f4ab38b2047f4335a994ae3a11564cb10d77a17ade9
SHA-512: a46f955bdaf1ebdbdd5d3656cafc48e0754d475b13957ab3f7181d9e9d374170406c9d1ae7fc1dfb574bd7e96a53e78874e9416ffe85d48345e3f9dabe721e50

Offline

 

#10 2017-10-28 20:51:53

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

Re: Syntax error in RGBDS/ibmpc1?

Tobias, could you upload a full copy of the project causing this problem, including all code files as they are on your disk, and build script/make file?


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

Offline

 

#11 2017-11-04 07:55:55

tobiasvl
Member
From: Norway
Registered: 2017-10-19
Posts: 26

Re: Syntax error in RGBDS/ibmpc1?

Hey, I did indeed manage to fix it, either by redownloading the file or rebuilding rgbds/rgblink 2.5. I'm not sure exactly what happened, but it works now. Sorry for the noise.


Discord: tobiasvl#6844 | GitHub: tobiasvl

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson