Original Post

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.

7 Replies

C is good. 🙂

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

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 😛

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

Not that I don’t believe you, but, how do you know they were all written in C? Just curious…

As for an optimizing compiler, has anyone compared the binaries of code compiled with different optimizing settings in gccvb(-O2 vs. -O3 etc)?

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

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.

 

Write a reply

You must be logged in to reply to this topic.