You are not logged in.
Lost Password?

All Posts (Greg Stevens)




#31
Re: gccVB optimization options and assembly code
Posted on: 2014/3/22 16:23
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
For all of us using VBDE I think we need to revisit the optimization errors received when adding -O to the gcc compiler options. This last coding competition taught me something extremely important. The old compiler (Which at least DanB is still using) works with the -O compiler option. IT MAKES A HUGE DIFFERENCE in code performance. The options I found and added in this post don't even begin to touch the performance of the old compiler with -O. I compiled my wireframe library using the old compiler (v2.95) and my code instantly ran 4-5 TIMES faster than running my code using the assembly versions of my functions on the compiler packaged with VBDE.

Unfortunately I'm a linux geek and compiling on my system isn't going to benefit too many people other than myself.

I tried once to compile gcc using patches that I found on this site from other posts but have never been successful. There's always something that comes up that I have no idea how to fix. (Of course I'm a total amateur at C and C++ so that's not really saying much).

Thanks to Thunderstruck for compiling DanB's zpace racers and pointing out on the forum that it ran much slower than DanB's demo. That little nugget directed me to try my code on the old compiler which I had never tried before.

For now, I'll be switching back to the old compiler version because I can basically eliminate all of my assembly routines and code directly in C since the performance difference is not noticable when using the -O or compiling with my assembly version functions.
Top

Topic | Forum


#32
Re: [ENTRY] Game Boy Emulator
Posted on: 2014/3/18 16:23
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
Congrats. Im still speechless :)
Top

Topic | Forum


#33
Re: [ENTRY] Wireframe Library
Posted on: 2014/3/2 14:39
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
So Thunderstruck just pointed out to me something I forgot to mention to anybody attempting to use the Library. By default the C code versions of the functions are compiled. You will see that this works but is slow compared to my demo. Inside the functions are #ifndef __ASM_CODE statements so I toggled the compiling of the assembly version by using a defined variable. To define the variable you just need to add -D__ASM_CODE to your gcc command inside your makefile. This will define __ASM_CODE and cause the ifndef statements to compile the assembly versions of the functions instead. I did this for two reasons. 1 to prove that the assembly versions of the functions were indeed faster and 2 I find it easier to write a new function in C and then convert it to assembly after I'm sure the function works.

Also, and this one is a little embarassing, I used a global camera variable for most of the functions. I mistakenly left the define of that variable inside my GameFunctions.h instead of putting it inside the G3d.h. So if you're going to start a new project from scratch just add
camera cam;
to G3d.h somewhere and you should be good to go.

Thanks for trying it out and catching that Thunderstruck :)

I'm posting my makefile as well along with the ObjFileParser I wrote in java to import 3d Wavefront OBJ files.

The syntax to use the ObjFileParser is (from a command prompt)
java -jar ObjFileParser 50 3 filename.obj > output.h
The 50 is a scaling factor and can be anything > 0.
The 3 is the fixed point scale factor and should be 3 if your using my library as is.
This writes to standard out so > output.h will put the output into a file.

Attach file:


zip makefile.zip Size: 0.51 KB; Hits: 228
zip ObjFileParser.zip Size: 3.88 KB; Hits: 231
Edited by Greg Stevens on 2014/3/2 14:57
Edited by Greg Stevens on 2014/3/2 15:07
Top

Topic | Forum


#34
Re: [ENTRY] Game Boy Emulator
Posted on: 2014/3/1 1:33
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
I ran it in mednafen with zelda and it seems to be working fine. I'm still speechless.
It seemed to run fine using the following command.
rominjector.exe gbemu.vb LegendOfZelda.gb
It seemed to pad it to 1024k automatically. I can't try it on actual hardware though so I won't be much help for that.
Top

Topic | Forum


#35
Re: [ENTRY] Game Boy Emulator
Posted on: 2014/3/1 0:16
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
I'm freaken speechless......
Top

Topic | Forum


#36
Re: [ENTRY] Deathchase
Posted on: 2014/3/1 0:02
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
This is really cool. My first attempt I died shortly after starting level two. :) Apparently I've spent too much time coding and not enough time playing. Nice work guys.
Top

Topic | Forum


#37
Re: [ENTRY] 3D Crosswords
Posted on: 2014/2/28 23:35
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
Nice job. Very clever. I like the 3D words idea as well. I don't think I would have thought of that.
Top

Topic | Forum


#38
Re: [ENTRY] Mario Combat
Posted on: 2014/2/28 23:31
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
Seriously nice work. Music is great, sound effects great, graphics great. I just beat it on mednafen. I can't wait to play it on actual hardware.
Top

Topic | Forum


#39
Re: [ENTRY] Flappy Cheep Cheep
Posted on: 2014/2/28 23:28
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
$&^#% I can't make it past 12. Apparently I suck at these types of games. Very cool game.
Top

Topic | Forum


#40
Re: [ENTRY] Zpace Racers
Posted on: 2014/2/28 1:25
Nintendoid!
Joined 2012/8/5
USA
117 Posts
CoderLong Time User (7 Years) PVBCC 2013 3rd
Very cool. Great work.
Top

Topic | Forum