It is currently Tue Dec 12, 2017 5:02 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: SNES in C
PostPosted: Tue Apr 05, 2016 3:32 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1866
Location: DIGDUG
Just as a thought experiment...

I've been trying to think of a useful, practical way to use cc65 to program an SNES game.

I think, the most reasonable solution would be to write a large amount of ASM library functions that you can call from the C code.

My concern is how the C code will work with multiple banks. You would presumably have to compile each bank separately, so you can be sure that the C library is accessible to each bank. Right?

Again, theoretically.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: SNES in C
PostPosted: Tue Apr 05, 2016 4:08 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6510
Location: Seattle
A few thoughts:

* If you can fit your entire C-language engine into the first bank, you could store data in other banks. Using DMA even lets you leave the 65816 in emulation mode...

* Does cc65 cleverly put data in the RODATA segment and code in the CODE segment? So that K≠B?

* How does cc65's generated code (targeting the 65c02) compare to the results of devkitsnes's tcc+optimore+816opt ?


Top
 Profile  
 
 Post subject: Re: SNES in C
PostPosted: Tue Apr 05, 2016 4:44 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1866
Location: DIGDUG
I haven't used devkitsnes, so ...?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: SNES in C
PostPosted: Wed Apr 06, 2016 11:26 am 
Offline

Joined: Tue Jul 01, 2014 3:30 am
Posts: 34
There is something called pvsneslib, a library to program snes using C. But it looks like it is not being updated any more.


Top
 Profile  
 
 Post subject: Re: SNES in C
PostPosted: Wed Apr 06, 2016 5:16 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1866
Location: DIGDUG
Nevermind. I think I'm going to stick with ASM (ca65)

(And not any time soon, since I've got too many other projects to do first).

(Edited)

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: HihiDanni and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group