-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental support for injection #1
base: master
Are you sure you want to change the base?
Conversation
abortNow = True | ||
|
||
# Quit asap | ||
#abortNow = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work right now, because code won't run until we step through (so debug.html would not contain any results). We could set dma_put_addr
to the original v_dma_get_addr
to run this quickly and address this.
@@ -91,10 +94,11 @@ def recordPGRAPHMethod(xbox, method, data): | |||
#FIXME: Mabye in PGRAPH: 0x00400828 ? [modified by command] | |||
color_offset = data | |||
|
|||
if method == 0x17fc: | |||
if method == 0x17fc or method == 0x1D94: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate change (more code follows)
@@ -1,4 +1,4 @@ | |||
#!/usr/bin/env python3 -u | |||
#!/usr/bin/python3 -u |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate change. Not too happy about this tbh.
|
||
# Reconstruct the command word | ||
word = int(command_log_entry['method'],16) | ||
word |= int(command_log_entry['subchannel'],16) << 13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to use int(..., base=0)
(or provide it implicitly)
"data": [ | ||
"0x000000F0" | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
"method": "CLEAR_BUFFERS",
"data": [{
"COLOR_A": true,
"COLOR_R": true,
"COLOR_G": true,
"COLOR_B": true
}]
}
"non_increasing": false, | ||
"data": [ | ||
"0x00000000" | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
"method": "CLEAR_BUFFERS",
"data": [0]
}
"data": [ | ||
"0x00FF00FF" | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{
"method": "CLEAR_VALUE",
"data": ["0x00FF00FF"]
}
For the record:
In https://github.com/envytools/envytools/tree/master/rnn Integrating rnn looks kind of painful.
I'll probably reach out to the envytools folks to improve distribution of rnn / rnndb (why no setuptools?); also the quality of rnndb for NV2A (and NV20_3D - NV25_3D) is not where it should be. Something I'd also attempt to address in hopes we adopt envytool names for all Xbox tools later. |
Could be a useful format for binary data? However, with interleaved vertex attributes, this would cause like 16x memory usage which will be a problem. For testing it might be safer to assume that all data is rather tightly packed (meaning we don"t need a full 64MB RAM dump). We could also go more invasive and re-structure resources on a draw call. However, I"d like to avoid that if possible. This must be handled kind of special: {
"load": {
"file data": {
"size": 16, # Implicit len(data); only really matters when stride isn't 0?
"stride": 100, # Implicit 0
# Load from file
"data": "vertex_attrib_0.bin"
},
"direct data": {
# Direct data
"data": [
["0x00000000", 1.0, 2.0, 3.0],
["0x00000000", 4.0, 5.0, 6.0],
]
}
}
},
{
"unload": [ "unique identifier" ]
} |
We also have to solve the problem where the injection might start or stop in a bad state which might affect much more than pgraph. Say stopping between |
Can be ran using
reset && clear && XBOX=192.168.177.3 ./nv2a-trace.py clear.json
and should give something like:TODO: