jp48 wrote:
Well, still problems, the program compiles with two warnings, below:
Code:
ld65: Warning: nes-nrom.cfg(45): Segment `HEADER' does not exist
ld65: Warning: nes-nrom.cfg(45): Segment `DPCM' does not exist
It still produces ROM file but neither FCEU nor mednafen do open it.
I used nes-nrom.cfg, removed the three lines you mentioned and ensured that I link knes.lib:
Code:
cl65 -t nes -C nes-nrom.cfg -o snd1.nes snd1.c knes.lib
(and few combinations of other flags for cl65).
The template would be wonderful, don't be too "ankara" for yourself, this is version 0.1, at some point it makes things easier.
Bleh, I'm completely out of touch with this stuff. I forgot how non-generic that config file was.
Yeah, you can remove the DPCM segment, or add "optional = yes" to it. You also should change "-t nes" to "-t none" since you're specifying a linker config. Aaaand you also need to specify the iNES header: copy header.c and header.h over from demo/ directory and compile+link header.c in. I should probably add a macro to knes.h to allow specifying the header in an easier way...
So here's the command line that should work after that:
Code:
cl65 -t none -C nes-nrom.cfg -o snd1.nes snd1.c header.c knes.lib
Quote:
(and by "ankara" I don't mean any cities, just a Finnish word from Kitee to Tampere).
Heh heh... I don't think I am, I'm just surprised how much I've forgotten about this already.
Btw, here's the correct replacement for the symbols line in the config:
Code:
symbols {
__STACKSIZE__: type = weak, value = $0200;
}
We'll see what I forgot about this time...