Hi, I have been playing around a bit with Visual 2c02 to figure out timing and behavior for OAM-addr and encountered something that seems strange to me.
From the information on the wiki:
This does not entirely match the behavior that i observe in Visual 2c02, the behavior is almost the same but instead of copying the 8 bytes starting at OAMADDR & 0xF8 to OAM[0-7] the destination is instead OAM[0x20-0x27], so it is offset by 0x20 bytes.
No matter where OAMADDR is pointing at start of rendering the destination is always 0x20-0x27. It also seems that all 8 bytes are copied within one cycle, if rendering is active the bytes are copied at the first cycle of the pre-render line, and if pre-render has already started the same clock as rendering is turned on in register $2001.
Has anybody else observed this? It seems strange to med that OAM[0x20-0x27] would always be overwritten. Since if one would write 0x00 to $2003, then transfer all sprites using DMA, the bytes in 0x20-0x27 would become duplicates of 0x00-0x07. Maybe something is wrong in the simulator causing the destination address to become offset by 0x20 bytes incorrectly?
From the information on the wiki:
Quote:
It is also the case that if OAMADDR is not less than eight when rendering starts, the eight bytes starting at OAMADDR & 0xF8 are copied to the first eight bytes of OAM;
This does not entirely match the behavior that i observe in Visual 2c02, the behavior is almost the same but instead of copying the 8 bytes starting at OAMADDR & 0xF8 to OAM[0-7] the destination is instead OAM[0x20-0x27], so it is offset by 0x20 bytes.
No matter where OAMADDR is pointing at start of rendering the destination is always 0x20-0x27. It also seems that all 8 bytes are copied within one cycle, if rendering is active the bytes are copied at the first cycle of the pre-render line, and if pre-render has already started the same clock as rendering is turned on in register $2001.
Has anybody else observed this? It seems strange to med that OAM[0x20-0x27] would always be overwritten. Since if one would write 0x00 to $2003, then transfer all sprites using DMA, the bytes in 0x20-0x27 would become duplicates of 0x00-0x07. Maybe something is wrong in the simulator causing the destination address to become offset by 0x20 bytes incorrectly?