thefox wrote:Posted version 0.1.1 in the website (see first post) to fix problems which were discussed in this thread. In other words it now works with the latest dev version of CC65...
Hi thefox,
I've tried with the latest version (snapshot from 2011-07-18), but cannot get it to work, I always get this:
Then delete knes.lib and all .o files and run make.
EDIT: Actually there's also other problem. You changed "cp" to "copy" in the Makefile, so you need to change the forward slash to backward slash or it won't work properly. Change to: copy original\nes.lib knes.lib
Then delete knes.lib and all .o files and run make.
EDIT: Actually there's also other problem. You changed "cp" to "copy" in the Makefile, so you need to change the forward slash to backward slash or it won't work properly. Change to: copy original\nes.lib knes.lib
Yep, I already had replaced the nes.lib, and had to change cp to copy as it was not being recognized (I'm compiling on Windows).
But yeah, changing to a backward slash solved it, was able to make knes.lib and also to rebuild the demo project, it loaded fine in FCEUX 2.1.5. Thanks!
qbradq wrote:Could we put together some sort of optimization guide for your C code? For instance, I've noticed that this code: ... results in a subroutine call with a *lot* of pointer math, whereas this code: ... does not.
Does this happen with or without optimization switches (or both)?
1) -Cl switch to make local variables static
2) #pragma bss-name/data-name to set the bss-/data-segment to zeropage
3) __fastcall__ calling convention for faster parameter passing
4) -Oirs
5) Avoid interleaved data
Great! That helps a lot Shiru, thanks! So the name of the label needs to be preceded by an underscore for C to be able to see it? And I don't need to back anything up (like registers)?
I'll play around with this a bit when I get to sprite mazing. I might not even need to do this.
I'll download your source code for Alter Ego and see what I can learn from it.
- Fixed to work with latest version of CC65, also included Win32 build of that specific version in the package
- Converted library subroutines to 6502 assembly
- OAM, nametables, CHR-RAM, etc are cleared in the init routine
- Updated demo project etc to use "THE" Makefile
- Added a demo of using MUSE (a music/sound library) from a C project
- Added an (almost) empty project template example
- Other small changes