FWIW, you're going to get
crap performance on the GB if you code in C.. and you're not going to be able to do any fancy raster tricks (since they're all based on timed writes to regs, and if you're compiling code you can't really time anything).
Compiled code just is too slow for those old school video game targets.
You're really better off just learning gb-z80. It isn't that hard, and you'll have much more control over what your game does... and it'll be faster.
As for your problem....
1 2 3 4
|
unsigned char i=0; // <- i is an unsigned char
// unsigned chars have a range of 0-255
//...
while(i < 256){ // <- this will ALWAYS be true, because i's maximum value is 255
|
EDIT:
Actually that wouldn't explain the problem you're seeing. The only thing I can think of that would is a shoddy/buggy printf() implementation, which wouldn't at all surprise me. printf is extremely complex and doing it all in in gb-z80 would be nuts.
EDIT 2:
You could try casting. I don't know if that would help...
|
printf("%d = %c\n", (int)i, (int)i);
|
If that works, then it's a problem with how parameters are passed to functions (they should be automatically upgraded to int, AFAIK)... in which case you'll probably have bigger problems with this compiler later.