summaryrefslogtreecommitdiff
path: root/Source/DSPSpy
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2022-06-01 21:42:33 -0700
committerPokechu22 <Pokechu022@gmail.com>2022-06-01 21:55:56 -0700
commit00a5f99b6bb4ecc6823037c4dbeab80398ab5c34 (patch)
tree8758c6abeeca62375f9858fb41a4e6e865254ae8 /Source/DSPSpy
parent70bf89fa59e3bd48633677374ca26124d36ff7e5 (diff)
DSPSpy: Fix incomplete result dumps
The current code expects new mail almost immediately after the last map was sent for it to be saved properly. However, I have a test program that ends up looping for 32768 iterations before it sends more mail; this resulted in an incomplete result dump. I've changed it to wait a frame between checking for mail, which solves that issue. This does slow down dumping, but the end speed matches the speed at which the UI updates the registers so this isn't a big deal (the UI waits a frame between mail normally). (Theoretically, it could take even longer for dumping to finish, so this is not a perfect solution. However, for tests that take that long to run, it would be better to save the existing results instead of re-running the test and saving that; that'd be something to do with later improvements.)
Diffstat (limited to 'Source/DSPSpy')
-rw-r--r--Source/DSPSpy/main_spy.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/DSPSpy/main_spy.cpp b/Source/DSPSpy/main_spy.cpp
index 57cbb625a3..89cf2d3ed7 100644
--- a/Source/DSPSpy/main_spy.cpp
+++ b/Source/DSPSpy/main_spy.cpp
@@ -474,11 +474,13 @@ void dump_all_ucodes(bool fastmode)
real_dsp.Reset();
- VIDEO_WaitVSync();
// Loop over handling mail until we've stopped stepping
// dsp_steps-3 compensates for mails to setup the ucode
for (int steps_cache = dsp_steps - 3; steps_cache <= dsp_steps; steps_cache++)
+ {
+ VIDEO_WaitVSync();
handle_dsp_mail();
+ }
VIDEO_WaitVSync();
sprintf(filename, "sd:/dsp_dump_all.bin");