Is PPU_DATA read slow?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
Dwedit
Posts: 4922
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Is PPU_DATA read slow?

Post by Dwedit »

If you look at a 6502 instruction chart, looking at the patterns and adjacent opcodes, you'd expect to see "STX abs,Y" at 0x9E. But it's not there.
Instead, you get an illegal instruction that is kind of like "STX abs,Y", except it *sometimes* stores a different value instead (it will AND the value stored with the high byte of the address, but not always). It's called "SHX abs,Y".
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: Is PPU_DATA read slow?

Post by calima »

...does that stand for SHit up X? :P
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Is PPU_DATA read slow?

Post by lidnariq »

Store H bitand X, but ... effectively, yes, the cuss words.
puppydrum64
Posts: 160
Joined: Sat Apr 24, 2021 7:25 am

Re: Is PPU_DATA read slow?

Post by puppydrum64 »

calima wrote: Sun May 23, 2021 12:23 am ...does that stand for SHit up X? :P
That seems to be something that happens in my code a lot. :P
Post Reply