Initial Reset Vector not a valid opcode?
Moderator: Moderators
Initial Reset Vector not a valid opcode?
When I load a rom into memory, I mirror it to fit into the whole Cartridge space as per usual. The reset vector at $FFFC points to $9EC7 which is value 0x2B. As far as I can tell this is not a valid opcode. Can someone help me with this? (Btw the rom is Donkey Kong).
Re: Initial Reset Vector not a valid opcode?
You're interpreting the bytes in the wrong order - the reset vector points to $C79E, not $9EC7.
The 6502, like x86 CPUs, uses little endian encoding.
The 6502, like x86 CPUs, uses little endian encoding.
Re: Initial Reset Vector not a valid opcode?
I completely forgot, lol. Thanks!Sour wrote:You're interpreting the bytes in the wrong order - the reset vector points to $C79E, not $9EC7.
The 6502, like x86 CPUs, uses little endian encoding.
Re: Initial Reset Vector not a valid opcode?
the opcode is 78 now. is that still valid? I'm not entirely sure.
Re: Initial Reset Vector not a valid opcode?
If you mean $78, that's SEI, the first instruction in 99.9% of all 6502 programs, so yeah, it's valid.
Re: Initial Reset Vector not a valid opcode?
I think I just now understood what the opcode matrix on the wiki means. I found another table that just lists values and their opcodes, and I realize that the table columns are just offsets from the rows, and the opcode is the row+column added together. Sorry, this is my first time doing emulation of this scale so I'm learning as I go along.