mvk wrote:
barrym95838 wrote:
you should be aware that
VTL02C is more efficient than the VTL02B currently posted at your link.
Great! I believe my simple emulator is feature complete now with respect to addressing modes, instructions and flag behaviour. It's slightly over 1K, but still less than 1200 words. Decimal flag is emulated in the P register, but ignored by ADC/SBC. I believe that's the expected behaviour judging from this
visual6502 wiki page. Interestingly, I can't find any description about this specifically for the 6507 of the Atari 2600. My emulator is more a 6507 because there's no NMI/IRQ either. It still does have SEI/CLI/RTI.
I'l try wozmon first as a means to learn ca65, relocate its zero page variables and write and link the CHROUT/CHRGET routines. [Q: Is there a compile option where ca65 just spits out raw binary?] VTL02C will be after.
FYI, I got the VTL02B link through the
Code tab on this forum. Moderators may take notice.
You need to assemble then link as 2 steps:
Code:
ca65 --cpu 65c02 -l woz.lst woz.s -o woz.o
ld65 -t none -S 0xF000 -vm -m woz.map -o woz woz.o
ca65 outputs relocatable format (even if you have a .ORG in the source file), then ld65 takes this to prodice the final output file. The -S 0xF000 specifies the start address. The output file will be raw binary that you then need to load at the right address.
(you might not want the --cpu flag though - all that does is allow for the 65C02 opcodes).
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/