As I try to get started understanding the Jupiter Lander code, I am immediately having newbie issues, so I hope someone can give me a hint about what I should try. Part of the problem is that I've ordered the Vic PRG but it is still in the mail, and another part is that I haven't touched 6502 code in two decades.
I am able to run the Recomment disassembler under Cygwin, but I think I'm making it misassemble rather than disassemble. When it loads Jupiter Lander.prg, here is the start of the output:
Code: Select all
.word $A000
; *** text follows ***
*=$A000
; A000: Illegal instruction.
A000 .byte $1F, $A0, $09, $A0, $41, $30, $C3, $C2 ;_ i a0CB
A008 .byte $CD, $68, $A8, $68, $AA, $68, $40 ;MH(H*H@
A00F xA00F .byte $03, $1C, $17, $2E, $00, $FD, $00, $00 ;c\w.....
Code: Select all
00 a0 1f a0 09 a0 41 30 c3 c2 cd 68 a8 68 aa 68
But then Recomment sees the very first instruction as an illegal machine code. And looking at the 6502 machine code chart here http://ericclever.com/6500/ I am unable to disassemble by hand as well.
If the A0 (fourth byte) is the first instruction (because bytes are reversed), that's an immediate LDY, which would be fine except that the sixth byte is an A0 as well, and I can't think why there'd be two immedate LDY's in a row. So that seems like barking up the wrong tree.
On the other hand (if bytes are not reversed), if the 1F is to be the first instruction, it doesn't appear in the chart, so it would seem to be an illegal machine code. And I take it that is the same conclusion Recomment is coming to.
So I think one or more of my assumptions must be wrong. Are bytes really in "reversed" order? Is the third/fourth byte really supposed to be the first instruction, or is there some special address that a cartridge boots to besides the code at the load address?
I am also unable to load and run the Jupter Lander.prg in VICE, can anyone help explain how to do that? That would probably shed a lot of light.
Thanks for any help! I'm sure I am just being dense.
Brad