16 bit writes to 8 bit hardware registers

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Post Reply
Aphex
Snes9x White Belt
Posts: 2
Joined: Sat Jan 01, 2011 12:33 pm

16 bit writes to 8 bit hardware registers

Post by Aphex » Sat Jan 01, 2011 12:42 pm

Hi,

Could anyone answer this trivial question for me?

Let's say the snes's cpu is in native mode and all registers and memory accesses are set to 16 bits. How does an 8 bit hardware register respond to a 16 bit write? For example.

Code: Select all

LDA #$AABB
STA $2100
Would $2100 now simply contain $AA?

P.S I apologise if this forum is strictly for Snes9x development discussion

User avatar
BearOso
Official GTK/Linux Porter/Dev
Posts: 460
Joined: Tue Oct 02, 2007 12:50 am

Re: 16 bit writes to 8 bit hardware registers

Post by BearOso » Sun Jan 02, 2011 9:57 am

Aphex wrote:Hi,

Could anyone answer this trivial question for me?

Let's say the snes's cpu is in native mode and all registers and memory accesses are set to 16 bits. How does an 8 bit hardware register respond to a 16 bit write? For example.

Code: Select all

LDA #$AABB
STA $2100
Would $2100 now simply contain $AA?

P.S I apologise if this forum is strictly for Snes9x development discussion
I'm not a SNES programmer, but I'm fairly sure it writes across both $2100 and $2101. A better forum for this kind of topic would be byuu's ROM hacking board: http://board.byuu.org/viewforum.php?f=9

Aphex
Snes9x White Belt
Posts: 2
Joined: Sat Jan 01, 2011 12:33 pm

Re: 16 bit writes to 8 bit hardware registers

Post by Aphex » Sun Jan 02, 2011 11:35 am

Thanks, that makes sense actually. Also, byuu's forum does seem more relevent, thanks for the link.

Post Reply