Difficulty of programming different systems
Moderator: Moderators
Difficulty of programming different systems
Hi everybody,
How does the difficulty of programming the NES compare to other systems? I've gathered the impression that the difficulty of systems is generally in line with when they were introduced, i.e. the Atari 2600 is more difficult to program than an NES, and the modern systems are relatively easy to develop for (mostly because they can be programmed with high-level languages). Is this generally the case? If I'm interested primarily in programming the NES would I do better to start learning with the SNES, or would it be about the same? Where would the Game Boy or GBA fall? Thanks in advance...
How does the difficulty of programming the NES compare to other systems? I've gathered the impression that the difficulty of systems is generally in line with when they were introduced, i.e. the Atari 2600 is more difficult to program than an NES, and the modern systems are relatively easy to develop for (mostly because they can be programmed with high-level languages). Is this generally the case? If I'm interested primarily in programming the NES would I do better to start learning with the SNES, or would it be about the same? Where would the Game Boy or GBA fall? Thanks in advance...
SNES is probably harder than the NES. For one thing, if you're making "Hello World", you can't even make it ding without writing a second program for the sound CPU. Instead, you have to clear all the graphics registers and print "Hello World" to the screen.
If you want the path of absolute least resistance to get started in homebrew, and you already know C or C++ on Windows or another platform, I'd wholeheartedly recommend the GBA. It's much more tolerant of messy code than some of the older systems are. For instance, if you write to VRAM outside of vertical blanking time, you don't get a severely corrupted screen. Instead, you get minor momentary tearing and that's it.
This is hello world on a GBA:
If you want the path of absolute least resistance to get started in homebrew, and you already know C or C++ on Windows or another platform, I'd wholeheartedly recommend the GBA. It's much more tolerant of messy code than some of the older systems are. For instance, if you write to VRAM outside of vertical blanking time, you don't get a severely corrupted screen. Instead, you get minor momentary tearing and that's it.
This is hello world on a GBA:
Code: Select all
#include <gba.h>
#include <stdio.h>
int frame = 0;
void nmiHandler() {
frame++;
}
int main(void) {
// install nmi handler
irqInit();
irqSet(IRQ_VBLANK, nmiHandler);
irqEnable(IRQ_VBLANK);
// set up CHR RAM, graphics registers, and C stdout
// for a simple text mode
consoleInit( 0 , 4 , 0, NULL , 0 , 15);
// set palette
BG_COLORS[0]=RGB5(0, 0, 23);
BG_COLORS[241]=RGB5(31,31,31);
// turn the screen on. Notice that the GBA doesn't
// give a sh-- whether we're in vblank or not.
SetMode(MODE_0 | BG0_ON);
// ansi escape sequence to set print co-ordinates
// /x1b[line;columnH
puts("\x1b[10;10HHello World!");
while (1) {
VBlankIntrWait();
scanKeys();
}
}
I've programmed for:
NES
SNES
Atari 2600 (a little)
PC (slightly)
The NES is definitely the easiest to work with, out of those. I don't know about high-level languages. There is a C compiler for 6502, I imagine it's more the libraries that you had in mind though - and the NES libraries are kinda crappy.
For writing a program in assembly from scratch, I think NES is by far the easiest of those. I imagine the old Gameboy would be pretty similar.
NES
SNES
Atari 2600 (a little)
PC (slightly)
The NES is definitely the easiest to work with, out of those. I don't know about high-level languages. There is a C compiler for 6502, I imagine it's more the libraries that you had in mind though - and the NES libraries are kinda crappy.
For writing a program in assembly from scratch, I think NES is by far the easiest of those. I imagine the old Gameboy would be pretty similar.
From what I have seen for asm programming:
Atari - hard to program, good hardware docs, very good tutorials, some sample code
NES - medium difficulty, good hardware docs, bad tutorials, very little sample code
SNES - hard difficulty, very few hardware docs, no tutorials, good intro sample code
For higher level languages absolutely go with GBA. There really isn't anything but asm for the others. If you are sticking with asm then NES is the easiest but still not basic.
Atari - hard to program, good hardware docs, very good tutorials, some sample code
NES - medium difficulty, good hardware docs, bad tutorials, very little sample code
SNES - hard difficulty, very few hardware docs, no tutorials, good intro sample code
For higher level languages absolutely go with GBA. There really isn't anything but asm for the others. If you are sticking with asm then NES is the easiest but still not basic.
Don't get me wrong, but this is *exactly* what is wrong with sample code for the NES: most of it is written by people who are just starting, and therefore don't usually write reliable code.
Maybe tepples is write... the ones who need sample code could say exactly what kind of thing they'd find helpful, and then people who actually know what they are doing would write reliable code.
Maybe tepples is write... the ones who need sample code could say exactly what kind of thing they'd find helpful, and then people who actually know what they are doing would write reliable code.
I would like to see very simple but complete programs, like hello world, a ball bouncing, simple scrolling example, etc. These would have no optimizations so what is happening is more clear. Even the wiki sample code like the gamepad code is beyond a beginner. In the 10 minutes that I looked at SNES programming it was easy to find a hello world and scrolling demo written by some guy who I now can't remember. Would be nice to have completed examples like that instead of just code snippets.tepples wrote: What sample code would you like to see?
bunnyboy, take a look at the thread "Working on ca65 examples" where I solicited feedback on examples along the lines of what you describe. I agree that optimizations have no place in code aimed at beginners.