Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: NES Emulator: Where does the instruction pointer start in a ROM? Reply to this message
Posted byBart T.
Posted on02/01/08 02:57 AM



>I understand how it works and why it uses the MAKEWORD macro. the address it starts from is a 16bit address,

An address is an address. Whether you're reading bytes (8 bits) or words (16 bits), the address points to the same data, it's just that for 16-bit reads, you're fetching two bytes: one from the current address and another from the next byte. Since this is a little endian architecture, the first byte read from the base address is the least significant byte (LSB, or low byte) and the next one is the most significant byte (MSB), the high byte (bits 16-8.)


>Also, In this scenario, it will return an address in the
>PRGRomBank2 right?

The way you've written the code, yes. When it sees the address C000, it appears that the memory handler accesses it from there.


----
Bart

-
Entire Thread
Subject  Posted byPosted On
*NES Emulator: Where does the instruction pointer start in a ROM?  klipseracer01/26/08 01:44 PM
.*Re: NES Emulator: Where does the instruction pointer start in a ROM?  Bart T.01/26/08 05:09 PM
..*Re: NES Emulator: Where does the instruction pointer start in a ROM?  klipseracer02/01/08 00:24 AM
....Re: NES Emulator: Where does the instruction pointer start in a ROM?  Bart T.02/01/08 02:57 AM