Hey there. I'm somewhat new to the 6502/6510 scene as far as learning goes. I owned a Commodore 64 way back when, but used it for BASIC programming (nothing spectacular) and playing games. I am trying to write a C64 emulator of my own basically to prove to myself that I can do it and to learn more about the C64 system. I have some questions that are probably extremely easy to answer, but I need some clarity to get me heading in the right direction and understanding what I'm doing.
First, in my emulator, I have allocated 64k of memory to an array, and I can read in a commodore 64 file to the memory. My first question is, where does this get read into the memory at? I think it might be $8000, but I'd like some confirmation on this to reassure me. I was reading the Commodore 64 Progammers Reference Guide, and it has a memory map. It shows $8000 as the ROM. Is that where I load the C64 game file to, or should it go in RAM at another address?
Second, once the file's contents are loaded into memory, how do I know where the actual programs instructions start, i.e. opcodes? Does the game file have its own set of addresses where the coding is stored, and if so (which I think it must because I've seen disassembers that start a particular address) how do I find out this address. Also, if it does have its own address, I'm not sure I understand how it can have an its own address unless it is similar to giving a BASIC program line numbers before each line of code , in which case I'd rather call it a line number than an address(maybe that is what I should be doing anyway). So the next question would be, do all files start their opcodes at the same address, or am I dreaming of a perfect world now?
Well, as you can see, I need some guidance. I think I'm asking the right questions, and I have read all about the opcodes and I understand what I have read for the most part, and for what I am still unsure of I have the book to guide me through. Once I understand the above questions, I think I'll be able to make some good progress on coding the cpu in the emulator. thanks in advance to anyone and everyone who responds. i'll take links to websites too if there is good reading material there that I should read up on to get a better understanding of all of this. sorry for the long post!!
mArk
|
|