Closed rlnilsen closed 3 years ago
You shouldn't need to change nes.mk
for something like this. In the normal makefile you can have override CAFLAGS += --cpu 6502X
and the sets of flags should be combined together. There's quite a few compatibility issues unofficial opcodes exposes (I have no clue what emulators emulate them correctly); I wonder if it might be better to opt-in to it in the main makefile. On the other hand, nes.mk knows it is for NES and you still have to use one of the opcodes in an actual .s file for it to be a problem.
Thoughts?
Of the two options I would vote for keeping it in nes.mk
. But: I did not see the .setcpu "6502x"
command until just now. That is perhaps the best way, using it only in the .s files that need it.
I did not see the .setcpu "6502x" command until just now. That is perhaps the best way, using it only in the .s files that need it.
Oh, yes. That is much better. I'll go ahead and close this, but if there's trouble I'd be fine considering it again.
I completely agree with closing this.
I would just like to briefly explain myself:
The first thing I looked for was a ca65 command to set the cpu mode. There are however two completely different commands for this: .setcpu
and .p
. I happened to find the .p
command first, which unfortunately does not support enabling unofficial opcodes. I didn't consider that there could be a second command for the same thing, and went with the command line argument instead. I guess the .p
commands are for backcompat or something.
So thats why I ended up needlessly bothering you.
So thats why I ended up needlessly bothering you.
Nah. I'm not bothered. I'm happy this stuff is useful to you and you're willing to send changes when something can be improved.
https://wiki.nesdev.com/w/index.php/Programming_with_unofficial_opcodes https://cc65.github.io/doc/ca65.html#ss4.3