Page 1 of 1
cc65 or p65
Posted: Mon Jan 15, 2007 8:38 pm
by mattmatteh
thought i would start working on some demo games. i have searched through the older post to see what the differences are but still not sure what i should start with.
i just downloaded and tried cc65. but didnt get too far
Code: Select all
matt@thing ~/nes/cc65-2.11.0/samples $ make hello
Unresolved external `_cgetc' referenced in:
hello.s(25)
ld65: Error: 1 unresolved external(s) found - cannot create output file
make: *** [hello] Error 1
i thought i read that make files could be used with cc65, is that correct ? could make files be used with p65?
i was looking at trying to make some test roms like blargg has. blargg, what do you use to build your roms ?
thanks
matt
Posted: Mon Jan 15, 2007 8:58 pm
by tepples
_cgetc is usually the name of a subroutine that reads the keyboard. The NES has no keyboard. (One was available for the Japanese Famicom but was not produced for any other market.) Therefore, _cgetc is unimplemented, and you'll need to customize the Hello World example not to call it.
Posted: Mon Jan 15, 2007 9:42 pm
by blargg
I looked at cc65 and it was pretty nifty to have it generate 6502 code from C code, but the efficiency left a lot to be desired. I'd stick with 6502 asm or something like Grandtheftendo's high-level language (site seems to be down). Currently I'm still using a 6502 assembler I wrote a few years ago, but I'm slowly switching over to ca65 since it's got some nice features and it's good to be using an assembler that other people here use.
Posted: Tue Jan 16, 2007 10:13 am
by Bregalad
but the efficiency left a lot to be desired.
Unless you write a game like
Romance of the Three Kingdoms or like
Maniac Mansion
Posted: Wed Jan 17, 2007 6:38 am
by commodorejohn
There's a 65816 C compiler that was created for WiNGS on the Commodore 64 (with SuperCPU,) and there's also HuC, which produces 65C02 assembler from C code; could either of these be adapted to be a better straight 6502 C compiler than cc65? (I'd also be surprised if there wasn't a commercial 6502 C compiler on one of the myriad 6502-based systems back in the day, although I don't know where to find one or how the efficiency would compare.)
Of course, assembler's still going to be the way to go with regards to pure efficiency, but a lot of newbies might find NES development easier to get into with a (relatively) high-level language like C.
Posted: Wed Jan 17, 2007 11:09 am
by kyuusaku
Here is a list of the best known free and commercial compilers:
http://www.npsnet.com/danf/cbm/cross-development.html#C