Re: [cc65] how to... c program for NES

From: Groepaz <groepaz1gmx.net>
Date: 2004-09-07 02:17:51
On Tuesday 07 September 2004 02:12, Arlo wrote:
> plouf@in.gr wrote:
> 
> >it is possible with cc65 at his current state and how ?
> >which commands support from the c libs ? (all ?)
> >  
> >
> 
> I was also interested in this, but searching the list brought only 
> fragmented information.
> 
> I currently understand some NES programming in assembler, but I enjoy 
> programming logic much more in C. I realize that I would have to build 
> up my own libraries in assembler, and I'm fine with that....
> 
> What NES-specific cc65 information would one need to know to begin 
> compiling to a .NES format file?

look at nes.cfg ... it defines the layout for a simple cartridge with
no mappers (and a INES header). you may want to work from there to
make your own for more advanced carts. (mind you, cc65 doesnt support
banked memory).

for a quick test, compiling something like

#include <conio.h>

int main (void)
{
	clrscr();
	cprintf("hello world");
	while(1)
	{
	}
}

with -t nes should do the trick and produce a working cart image.

you can also look at the stuff i posted some days ago, there is
a little tetris clone that uses the conio lib for output and joystick
lib for input .. this should work just fine on nes.

gpz

ps: if you know the nes already and want to code something "serious"
_for the nes_ then resist the temptation of using conio and all that -
make your own nes specific routines :)
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Sep 7 02:26:44 2004

This archive was generated by hypermail 2.1.8 : 2004-09-07 02:26:53 CEST