# --- DDR sample config file ---
#
# Lines should not be more than 350 characters long, file names not more than 256
# characters.
#
# Comments must be written with a leading '#'
# No extra spaces are allowed in config lines
# Different fields are separated by exactly one blank
#
# All number/address values are expected to be hexadecimal values without any 
# leading character.
# -----------------------------------------------------------------------------

# -- NOP out instructions -- 
# N <START ADDR> <END ADDR>
# <START ADDR> = Start program counter address for NOP'ing instructions (hex)
# <END ADDR>   = End program counter address for NOP'ing instructions (hex)
# <START ADDR> and <END ADDR> can be the same for NOP'ing one instr. 
# e.g. N 004012EE 004012F6
#N 0040115A 0040115A
#N 00401337 0040133A

# -- Patch EFLAG --
# T <EFLAG> <PC-ADDR>
# <EFLAG> = [CF, PF, AF, ZF, SF, DF, OF] 
# <PC-ADDR> = program counter address (hex) where to toggle the EFLAG before 
#             instruction gets executed e.g. jle 
# e.g. T SF 004012C4 #example comment
#T SF 004012BB
#T SF 004012FB #example comment

# -- Always skip function at <FUNC ADDR> when called --
# <FUNC ADDR> = Functions address which gets wrapped, call to func is skipped
# <RET VALUE> = set return value of wrapped function (NEED TO BE UNSINGED INT)
# C <FUNC ADDR (hex)> <UINT RET VALUE IN HEX>
# e.g. C 00401100 00000001
C 00401120 FFFFFFFF # = -1
C 00401150 FF

# -- Dump buffer to file --: 
# D <SIZE PC> <OP-SIZE> <BUFADDR PC> <OP-BUFADDR> <DUMP-PC> <FILENAME>
# <SIZE PC>    = program counter address where to get the size of the buffer
# <OP-SIZE>    = operant at <SIZE PC> to get the buffer size from
#                e.g. SP0 = (S)ource operant 0. Value is a (P)ointer.
#                     DV1 = (D)estination operant 1. Absolut (V)alue.  
# <BUFADDR PC> = program counter address where to get the buffer address
# <OP-BUFADDR> = operant at <BUFADDR PC> PC to get the buffer size from
# <DUMP-PC>    = program counter address where to finally dump the buffer
# <FILENAME>   = dump filename 
#
# All numbers/addresses are hexdecimal values without any leading character
#
# e.g. D 0040117E SP0 0040118B SP0 004011F9 dump1.bin
#D 004011B5 SP0 004011C2 SP0 00401230 dump1.bin
#D 004013A2 SP0 004013AF SP0 0040141D dump2.bin
#
# -- Run Trace --:
# start  end    max.instr  breakaddr lighttrace filename (the last in the list will be used)
L 4012BE 40130F 20000 na TRUE "C:\Users\Dex Dexter\Documents\test\test\buffertest_trace.json"
L 401335 4013CA 20000 na TRUE "C:\Users\Dex Dexter\Documents\test\test\buffertest_trace.json"
L 401411 40146E 20000 na TRUE "C:\Users\Dex Dexter\Documents\test\test\buffertest_trace.json"

# -- Patch binary with endless Loop at address --:
# loop-addr
B 40170C
