签到天数: 1999 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点8 z0 Q* F0 x; l$ s) u. b! ~
Conditional Breakpoints
5 e' \$ j! K! V+ q
# s7 S9 f/ m Z/ n5 C. S, YBreakpoints 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:; B+ f: l9 R5 S# e, U% O/ ]- ]. F9 L
9 b7 p) w1 f2 _2 IConnect -> Compare { ('||' | '&&') Compare }
5 I b3 _) b! F3 mCompare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
1 L! b( g. q4 D( C USum -> Product { ('+' | '-') Product }
/ r# s2 P$ `/ B ?3 T1 MProduct -> Primitive { ('*' | '/') Primitive } 1 d) u2 \% o" {1 @: h: s/ P
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 4 V8 h5 }1 G$ F$ U
Number -> '#' [0123456789ABCDEF]*
8 i& C8 j. Z( h6 p0 b# O. `1 `Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' + u A1 y( M2 l. c g+ M
Register -> 'A' | 'X' | 'Y' | 'P' # @7 \) h* o3 O4 }" e3 _9 F
Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
( n$ s, w9 w8 ~1 v1 ?' FPC Bank -> 'K'
8 d6 y4 e' ^' \/ f3 xData Bank -> 'T' 0 y6 H3 X4 f% F% Y8 r5 X9 \
7 T4 Z2 ^% ]1 h: l+ `+ C4 [- zThe 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.
- H; d9 l' J# D
" M) s1 W% o6 M7 aRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
- S- Q5 N& @/ p# f5 M+ T# @
. P# J9 W- y. X2 G, M# {% lFlags evaluate to 1 if set, 0 if clear.
) t c% ]8 b3 w2 Q" N* B8 Z4 y6 e# v g- @
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations." F1 Y j' b. Q }3 [# o
S& E S& W9 A- d" z' [" m; x
Example conditions:$ ~% ? G4 Q5 p( h; T! Q; S" }$ W
, o* j+ T6 [+ T0 n% W# YBreak only if register A is less than value at memory address $0005:
! c+ o7 U4 i1 t1 p5 X
( ^/ O- f$ F# LA < $0005) T0 B* S0 M9 k7 W" O( ?* j \
+ J0 V% G! y7 C. g; p' q
Break only if the value at the indirect address is not equal to FF:
4 E: h+ s6 U) s; n, l1 W3 o+ \; Z d; U$ ?
#FF != $[$10+($11*#100)]
: H0 Q. |# e: Y8 T# f
* E8 ^# e* `6 T0 ZBreak only if flag N is clear or A is not equal to 00:: p% U+ R, Q# A6 A+ p: r
9 f" v0 r# ]7 C5 R) m(N==#0 || A!=#0)
* r% ~ ^, }$ v+ ~8 D$ k2 {% `2 Q2 l! B
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):, E5 V' S2 Z3 Q% E3 D
- x& c, W8 J0 |0 M" e8 R; f9 l4 W
T==#2 & e& u( n! H- f8 L5 k2 l
! ~2 m6 R' l( l7 W
以上内容来自fceux自带的帮助文档说明 |
|