Re: [cc65] NES support in cc65

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-02-20 22:52:22


Hi!

On Thu, Feb 20, 2003 at 04:30:40PM -0500, Memblers wrote:
> I'd like to see cc65 be able to compile a program for NES, so would adding NES
> support for conio.h be a good place to start?

Part of conio is quite low level. While not all functions may be useful on the
NES, starting with a small subset would probably be ok.

> Where could I download an example of
> a conio implementation for another platform?

Just download the source package. It contains - among other things - the
complete sources for all the library functions.

> I'm looking at the cc65 function reference, bgcolor for example.  "The function will set
> a new background text color. It returns the old (current) background color.".  Where
> from does the assembly routine get the value?  Is it simply in the accumulator?

Unfortunately, there is no really good reference on how to write assembly
routines that interface with C. doc/internal.txt may be a starting point, but
apart from that I would suggest looking at code generated by the compiler, and
at existing sources for library subroutines written in assembler. If you have
any further questions, just ask. But please make sure you've read the docs and
looked at the existing sources. Writing assembly subroutines that may be
called by C is not too difficult, many people have managed to do it by just
looking at the existing code.

> I can write assembly subroutines that will surely work on an NES, but since I don't
> know C I would need some input from someone else to know what routines would be
> most useful.  In other words, I can't do this completely on my own, so if anyone is
> interested in helping in any way, please say so.

I don't know the NES, but I can help with general cc65 information as needed.

> I'm already working on a collection of NES-specific subroutines and macros, which I'll
> at least release on my own website (http://nesdev.parodius.com/).  But having C
> support would be a nice bonus.

Having C support is probably not adeaquate for writing fancy games, but it
would make it easier for beginners to get at least some code running.

A long time ago, someone already said that he had C programs on the NES
running. Maybe you can team up.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-02-20 22:52:32 CET