签到天数: 2006 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
4 S; l/ X; @/ @$ G% jConditional Breakpoints5 _ U, ?! S/ @5 u5 A
+ r: {* U/ [ y3 cBreakpoints may also have a conditional statement that causes them to execute only if that statement evaluates to true. The conditional breakpoint grammar has this form:3 n- w5 b4 I$ s# Z+ b- \% J
: h6 x; O( |5 Q& s
Connect -> Compare { ('||' | '&&') Compare } ; p- T& e+ b+ d+ [% H
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
$ H8 k' x3 t+ N nSum -> Product { ('+' | '-') Product } ; H" O5 h6 i: {
Product -> Primitive { ('*' | '/') Primitive }
7 S+ _. m$ T5 d7 w4 _0 N* E) ~Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' ) L* d, Q$ h5 p% w7 L, E
Number -> '#' [0123456789ABCDEF]*
6 f6 U8 B1 c1 J& C- W0 vAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
0 z' W" k {5 `; m6 uRegister -> 'A' | 'X' | 'Y' | 'P' ) D6 G1 P- I1 m9 O, j1 P$ ^. \/ ]
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
/ B9 T& O4 \8 b7 A5 w+ n3 mPC Bank -> 'K'
6 G2 S% }0 a0 m" z8 [+ DData Bank -> 'T'
. U* E' M1 @) S5 e" C( L6 X: o. E0 I1 H" I' B* X" F4 J) K
The parser is very strict. All numbers are hexadecimal. Always prefix a number with # for an immediate value, or $ for a memory address. If a memory address needs to be calculated use $[] with the calculation inside the brackets.
* J0 C2 n* J6 B+ _" ]# ]& O/ g
# A+ o& D0 v0 K- Y* b) SRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
# V* @4 c- B' ~+ G/ R1 o- l; s* m5 w" I! W6 c2 q& W
Flags evaluate to 1 if set, 0 if clear.
" Z9 [9 j I: B, S" G, ]2 [& t# P& T6 {+ Z- Z# q* P3 \) K
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.9 P c; b$ h, t3 C" O
6 ~! O+ w' {0 KExample conditions:; `* G+ ]: Z8 O0 J7 X$ M" I: @
& Q4 S2 l+ H$ r4 D
Break only if register A is less than value at memory address $0005:
8 B5 N% M9 o" Y/ C, j. l; [9 ^, u! P5 a4 o: }& G! l, Q% {4 j) D
A < $0005
Q% m) {# O& [+ F
# u/ p4 l0 j9 W& CBreak only if the value at the indirect address is not equal to FF:. {0 B. I$ K: z, L
0 X# E+ T. W1 u* G#FF != $[$10+($11*#100)]
+ N1 G) M6 _: n' t- J. ?
! z5 M: P" z3 iBreak only if flag N is clear or A is not equal to 00:1 x" P7 t% _$ u
* R4 i+ \6 ` b% j& [/ s4 D(N==#0 || A!=#0)! d3 W) n5 W$ j% @$ R
9 R, u% ?$ }% w: p
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
- [( c* W' `( k+ b8 N# j* D
. b. U0 d) v+ z) e* f0 Z: iT==#2 4 K' |( L+ @# b9 I; `3 v7 m
) I5 S% |: I- M$ m9 h以上内容来自fceux自带的帮助文档说明 |
|