You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
Assembly VS. C
Posted on: 2005/2/16 18:42
VB Gamer
Joined 2004/1/14
USA
18 Posts
Long Time User (15 Years)
I am curious as to what everyone here uses to program the VB with. Is anyone here a die-hard assembly user? Or is it C or nothing? Does anyone know what most commercial games were written with?

I'm kind of in the middle. I'm used to Assembly from programming atari 2600, but when I really enjoyed gccVB when I used it because it felt very very low level.
Top

#2
Re: Assembly VS. C
Posted on: 2005/2/17 0:09
VUE(xpert)
Joined 2003/7/27
Australia
267 Posts
CoderLong Time User (15 Years) DonatorApp Coder
C is good. :)


Besides, you can always use the asm(" "); command to put in any assembly you want to use.
Top

#3
Re: Assembly VS. C
Posted on: 2005/2/17 7:55
PVB Elite
Joined 2003/7/26
USA
1465 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
I'm with lameboy, but I do want to learn v810 asm, someday...

You're right about gccVB being very low-level. I love it! The VB is about the perfect compromise between power and simplicity.

I'm guessing most of the Nintendo games were written in asm, and some or all 3rd party ones were written in C. I especially think V. Lab was made with C
Top

#4
Re: Assembly VS. C
Posted on: 2005/2/18 22:06
Nintendoid!
Joined 2004/10/25
USA
100 Posts
CoderLong Time User (14 Years) App Coder
All of the comercial games use C, and you should to. The V810 was designed with compilers in mind (large register sets, many ways to optimize jums, etc) and it would be dificult to optimize your code to the same level that an optimizing C compiller can do it. I would save assembly for inner loops and critical sub sections only.

David Tucker
Top

#5
Re: Assembly VS. C
Posted on: 2005/2/19 0:17
PVB Elite
Joined 2003/7/26
USA
1465 Posts
PVBCC EntryCoderContributorSpecial AchievementTop10 PosterHOTY09 EntryLong Time User (15 Years) App Coder20+ Game RatingsPVBCC 2013 Entry
Not that I don't believe you, but, how do you know they were all written in C? Just curious...
Top

#6
Re: Assembly VS. C
Posted on: 2005/2/21 16:14
VB Gamer
Joined 2004/1/14
USA
18 Posts
Long Time User (15 Years)
As for an optimizing compiler, has anyone compared the binaries of code compiled with different optimizing settings in gccvb(-O2 vs. -O3 etc)?
Top

#7
Re: Assembly VS. C
Posted on: 2005/2/22 19:50
Nintendoid!
Joined 2004/10/25
USA
100 Posts
CoderLong Time User (14 Years) App Coder
They all have very distinctive loop and functoin call code that could only be generated by some sort of a compiler (or a realy fancy macro assembler, but thats only 1 step below c anyway).

Whats more interesting is that there are only about four 'engines' in use. Most of the games are based off of the same code set even across company boundarys. For example (obviously) 3D Tetris, Red Alarm, and V-Golf all use the same underlying rendering engin and interupt structure.

I have always wondered if the developers where very free with there code or if Nintendo had several dem o programs that everyone based there code off of.

David Tucker
Top

#8
Re: Assembly VS. C
Posted on: 2005/3/20 16:16
VB Gamer
Joined 2003/11/1
USA
46 Posts
CoderLong Time User (15 Years) App Coder
One interesting idea is that Nintendo may have provided an "operating system" with the VUE kits. Something like a standard library to provide the low level hardware routines. This would explain the similarities between the games.
VUE came with an assembler from Intelligent Systems named ISAS. It appears to be capable of "operators equivalent to those used in C language", so the assembler was probably pretty high-level for an assembler. For example, you could use a generic type of if-then-else pseudo instructions, rather than comparisons and branches.

Now personally, I don't mind how I program. Working with C and assembly are equally fine for me. The crt0 in gccvb was written in assembly, obviously. But most of the lib is written in C.
On a sort-of-related note, I did write a test ROM in both C and assembly at one point. The job of the ROM was to dynamically generate an instruction in RAM and execute it. After executing the instruction, the PSW would be read and returned to the ROM, where the flags would be printed to the screen. (Helped locate the CPU bug that killed Wario) All of the stuff that ran from RAM had to be written in assembly, as well as the "long jump" routine used to get the CPU into RAM. (I think this was included in the lib?)

So that's a pretty simple example of how I perfer to program; Use C at all times unless you need the performance gain (or special hardware access) provided by assembly.
Top

 Top   Previous Topic   Next Topic


Register To Post