Add Python script for generating normal AR codes
parent
4dffb91abf
commit
326c5f50e4
|
@ -186,6 +186,20 @@ Size = (ADDRESS >> 25) AND 0x03
|
|||
|
||||
usually, size 0 = 8-bit, size 1 = 16-bit, size 2 = 32-bit. For some codes, Size 3 = Floating point single precision.
|
||||
|
||||
#### Code Generation Python Script
|
||||
|
||||
You can use the below Python code (requires Python 3.6 or higher) to quickly generate an address for a normal Action Replay code.
|
||||
|
||||
```
|
||||
typeVal = int(input("Enter Type Number: "))
|
||||
subtypeVal = int(input("Enter Subtype Number: "))
|
||||
sizeVal = int(input("Enter Size Number: "))
|
||||
address = int(input("Enter memory address without base 0x8000000 value in format `0x1234567`: "), 16)
|
||||
|
||||
result = ((subtypeVal) << 30) + ((typeVal) << 27) + ((sizeVal) << 25) + address
|
||||
print('{0:0{1}X}'.format(result, 8))
|
||||
```
|
||||
|
||||
### Type 0
|
||||
|
||||
#### Subtype 0 – RAM write and fill (can be called "00", "01" and "02")
|
||||
|
|
Loading…
Reference in New Issue