Direct Page register when using dp addressing modes

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
urbanspr1nter
Posts: 39
Joined: Thu Aug 16, 2012 7:55 pm

Direct Page register when using dp addressing modes

Post by urbanspr1nter »

This might be a stupid question-- but I am trying to write an 65816 emulator and at the moment I have a few doubts on this: should the direct page register be modified when operating in any sort of direct page addressing mode? Say for instance we have:

Code: Select all

AND ($10, X)
The direct page register is something arbitrary like $01 right now... When after forming the indirect address, should the direct page register be modified to be the offset after the operation? Or does it stay the same?

Thanks!
lidnariq
Posts: 11430
Joined: Sun Apr 13, 2008 11:12 am

Re: Direct Page register when using dp addressing modes

Post by lidnariq »

The only instructions that change the D register are TAD=TCD and PLD. Anything else is equivalent to a temporary copy.
urbanspr1nter
Posts: 39
Joined: Thu Aug 16, 2012 7:55 pm

Re: Direct Page register when using dp addressing modes

Post by urbanspr1nter »

Thank you sir!!! :D
Post Reply