Register To Post



 Bottom   Previous Topic   Next Topic

#1
The GoSub thread (was: ".C into .VB")
Posted on: 2009/4/9 17:31
PVB Elite
Joined 2008/4/26
USA
526 Posts
CoderContributorLong Time User (5 Years)Top10 PosterHOTY09 3rdPVBCC 2010 Entry
How do I turn a C file into something to run in a Virtual Boy emulator? I was fiddling around with Notepad making a C file and I downloaded gccvb and VIDE, but I can't find anything that would do this?
Edited by VirtualChris on 2009/7/18 7:32
Top

#2
Re: .C into .VB
Posted on: 2009/4/9 19:52
PVB Elite
Joined 2008/4/26
USA
526 Posts
CoderContributorLong Time User (5 Years)Top10 PosterHOTY09 3rdPVBCC 2010 Entry
So I get gccvb up and running and i try to make a .vb file out of the sample provided, and I get this.
Open in new window

Anyone have any idea what this means and how to fix it?
Top

#3
Re: .C into .VB
Posted on: 2009/4/9 23:48
Administrator
Joined 2000/1/8
Germany
2110 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (13 Years) 80+ Game Ratings
Some more information would be useful. Which gccVB version are you using? Looks like the very first release? This error means, that a function (aka macro) "OBJ_YSET" is called in the code, which does not exist. As it seems, the macro in the libgccvb library in that release is still named "OBJ_SET_Y", which was later renamed tp "OBJ_YSET" as it is called in the sample code. So just change that line in the source and see if it works then.

BTW, could you attach images to forum posts? Uploading them to our server is important for future reference. If you just link and then someday delete the image from your server, the thread will be impossible to follow. It's also easier than uloading somewhere else. ;)
Top

#4
Re: .C into .VB
Posted on: 2009/4/10 0:00
PVB Elite
Joined 2008/4/26
USA
526 Posts
CoderContributorLong Time User (5 Years)Top10 PosterHOTY09 3rdPVBCC 2010 Entry
I don't know what version of gccvb i'm using, as the read-me file that came with it doesn't say. It makes a reference to v810 patches, if that helps. Anyway, I changed what you said and this is what i got.

Attach file:



png  huh2vb.PNG (15.61 KB)
768_49de6ff91e285.png 666X335 px
Top

#5
Re: .C into .VB
Posted on: 2009/4/10 0:19
Administrator
Joined 2000/1/8
Germany
2110 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (13 Years) 80+ Game Ratings
Huh? Don't know what that means. But you should try a different approach and try to compile my Programming Introductory Demo. It is meant specially for beginners, and is very well commented and verified to compile fine in the second release of gccVB (gccVB CVS 06-20-05), probably the first one will work as well.
Top

#6
Re: .C into .VB
Posted on: 2009/4/10 0:56
PVB Elite
Joined 2008/4/26
USA
526 Posts
CoderContributorLong Time User (5 Years)Top10 PosterHOTY09 3rdPVBCC 2010 Entry
Oops, my bad. I typed in "samples" instead of "examples." Now that I did it right, I get back this error:

Something about parse errors sound much better than FATAL! ;)

Attach file:



png  huhvb3.PNG (13.41 KB)
768_49de7cd4ed73e.png 669X338 px
Top

#7
Re: .C into .VB
Posted on: 2009/4/10 1:09
Administrator
Joined 2000/1/8
Germany
2110 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (13 Years) 80+ Game Ratings
Yep, that looks much better. Now you only got a typo somewhere around line 117. See if you can find it or post those lines here, lines 116 - 118.
Top

#8
Re: .C into .VB
Posted on: 2009/4/10 2:04
PVB Elite
Joined 2008/4/26
USA
526 Posts
CoderContributorLong Time User (5 Years)Top10 PosterHOTY09 3rdPVBCC 2010 Entry
Success! Well, sort of. It compiles OK, but I made 20 characters and it only displays the first 9. I figure it has something to do with it only handling the 9 characters in "HELLO, WORLD!", the c file I modified to make all but 5 letters appear. I want it to read like the alphabet. How can I get all 20 characters to appear?

Attach file:


c hello3.c Size: 4.51 KB; Hits: 154
Top

#9
Re: .C into .VB
Posted on: 2009/4/10 4:53
PVB Elite
Joined 2008/4/26
USA
526 Posts
CoderContributorLong Time User (5 Years)Top10 PosterHOTY09 3rdPVBCC 2010 Entry
After a few hours and tons of tinkering, I made this, what i hope to be an intro to an actual game.

Attach file:


c gosub.c Size: 6.96 KB; Hits: 154
vb gosub.VB Size: 64.00 KB; Hits: 145
Top

#10
Re: .C into .VB
Posted on: 2009/4/10 5:05
Administrator
Joined 2000/1/8
Germany
2110 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (13 Years) 80+ Game Ratings
Nice! But you don't need to use objects to have text on the screen, that's way to complicated. Create an ASCII conform font set in vide, export to font.h, include font.h in your source ('include "font.h";', as with libgccvb), and either use a BGMap with text created in VIDE (as shown in the attached image), or, much better, use the vbPrint() or vbTextOut() functions, which dynamically alter BGMaps to place Chars from your font set. Both can be found in "misc.h" of libgccvb.

Attach file:



png  font.png (11.29 KB)
1_49deb6999585d.png 677X331 px
Top

 Top   Previous Topic   Next Topic


Register To Post

You are not logged in.
Lost Password?
Register Resend Activation