unregistered wrote:I can't do that
Sure you can! It says try just that
first because it lets you see for yourself whether dec/inc really will cause a break. If it does work for that, the problem is your condition. (That must be why it wasn't breaking for inc/dec, but why take my word for it?) It's part of a process. Always break the thing not working as expected to the smallest possible piece.
Ok... well, I gather this is the central point of your post... but, I disagree because - well, I haven't experienced a problem with this condition... it breaks every time valid_left becomes less than visible_left (valid_left and visible_left come from tepples at the bottom of page 69)... the condition is $2F < $30... and it works... every time valid_left becomes less than visible_left, it breaks. So maybe your theory only applies to == and != conditions... or maybe I still am not understanding what you said.
I have no information about valid_left and visible_left or how you're using them, but what I stated is provably true. Try this:
Break on writes $80. Condition: $80 == #08
Code: Select all
reset:
;Intialization junk. Or not! Shouldn't matter just for this test.
lda #$00
sta $80;It may break here
lda #$08
sta $80;It will never break here
infiniteloop:
inc $00;This allows you to see whether it has broken or not with the hex editor.
;if you see the value spinning, it hasn't broken.
jmp infiniteloop
IRQ:
NMI:
rti
.org $FFFA
.dw NMI
.dw reset
.dw IRQ
Now try this small change:
Code: Select all
lda #$08
sta $80;It will never break here
;Add these following two lines
lda #$42
sta $80;It will always break here
infiniteloop:
inc $00;This allows you to see whether it has broken or not with the hex editor.
;if you see the value spinning, it hasn't broken.
jmp infiniteloop
I did try this exact code on FCEUX 2.2.2, and it works exactly as stated. This is what I mean by it will only pick up the second write. It's made zero in the beginning. Then it is changed to #$08, the value you are actually checking for. This is the first write. This write is not broken on. Only a write when the variable ALREADY HAS the value you're checking for will be detected with that particular method.
the condition is $2F < $30... and it works... every time valid_left becomes less than visible_left, it breaks.
I can write some code where it doesn't break when valid_left is less than visible_left. Or at least, doesn't break like I think you're expecting it to.
Break on writes $2F
Condition: $2F < $30
Try this:
Code: Select all
lda #$80
sta $30
sta $2F;won't break because they're equal.
lda #$00
sta $2F;0 < 128, but it won't break here for the reason I stated.
lda #$FF
sta $2F;It would break here, though.
Now try this condition on the same code:
Break on writes $2F
Condition: A < $30
That condition will break when I think you'd want it to.
So if you haven't experienced a problem, it's either that I'm misunderstanding what you're expecting from these breakpoints, or the breaks you're getting are actually not the writes that are making the changes you're looking for.