The wiki says:
Shouldn't it be possible write to the PPU as the very first thing you do as the program starts up, then wait for the PPU to stabilize and read the supposedly illegal written values?
For instance:
If the emulator works according to the Wiki, the $A0 value should in fact not be written to $2010 at all, because the PPU ignores the $2006 writes. That would of course mean the above code will detect emulators that allow writing to the PPU immediately, am I correct?
If this is the case, very few emulators seems to disallow writing to the PPU immediately.
Of course you have to take into account that the PPU might already have been stabilized at the beginning of the program (Reset?).
Any thoughts/picking?
Quote:
Most emulators allow the program to twiddle PPU registers immediately, while the NES PPU ignores most writes for the first frame after a reset.
Quote:
Writes to the following registers are ignored if earlier than ~29658 CPU clocks after reset: $2000, $2001, $2005, $2006. The other registers work immediately: $2002, $2003, $2004, $2007, $4014.
Shouldn't it be possible write to the PPU as the very first thing you do as the program starts up, then wait for the PPU to stabilize and read the supposedly illegal written values?
For instance:
Code:
Start:
lda #$20
sta $2006
lda #$10
sta $2006
lda #$A0
sta $2007
waitVBlank1:
lda $2002
bpl waitVBlank1
waitVBlank2:
lda $2002
bpl waitVBlank2
lda #$20
sta $2006
lda #$10
sta $2006
lda $2007
lda $2007
cmp #$A0
beq Detected.Emulator
lda #$20
sta $2006
lda #$10
sta $2006
lda #$A0
sta $2007
waitVBlank1:
lda $2002
bpl waitVBlank1
waitVBlank2:
lda $2002
bpl waitVBlank2
lda #$20
sta $2006
lda #$10
sta $2006
lda $2007
lda $2007
cmp #$A0
beq Detected.Emulator
If the emulator works according to the Wiki, the $A0 value should in fact not be written to $2010 at all, because the PPU ignores the $2006 writes. That would of course mean the above code will detect emulators that allow writing to the PPU immediately, am I correct?
If this is the case, very few emulators seems to disallow writing to the PPU immediately.
Of course you have to take into account that the PPU might already have been stabilized at the beginning of the program (Reset?).
Any thoughts/picking?