|
|
|
12-16-2014, 09:18 AM
|
#1
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
HELPER: memory display function
Here is a JS FX function that you may find useful. It displays the values stored in a segment of memory.
<< removed - better version below >>
Put the function code at the start of your @gfx section. Then call it from anywhere later in the @gfx section and move your mouse over the JS FX.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
Last edited by DarkStar; 09-28-2018 at 09:57 AM.
|
|
|
01-23-2015, 05:50 AM
|
#2
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
And a new version, displaying 2 different memory segments, and the display stops moving upwards when all the desired data is displayed:
Call the function using: display_memory (segmentA, segmentB, length, format); // the format can be for example 3.0 or 2.1 or 'A' (for ASCII characters)
// to view the data, move your mouse over the JS FX
[235 downloads]
See post #8 for the latest version
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
Last edited by DarkStar; 03-23-2021 at 05:23 AM.
|
|
|
01-23-2015, 09:11 AM
|
#3
|
Human being with feelings
Join Date: Oct 2013
Location: Seattle, WA
Posts: 876
|
Nice, thank you!
|
|
|
02-19-2015, 11:09 AM
|
#4
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
And now, an easy way to see some strings (especially past the first 64, and no need to go to the data list on the right-hand side):
// .... example of use
print_strings(100,20); // (first string slot, number of strings)
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
Last edited by DarkStar; 02-19-2015 at 11:25 AM.
|
|
|
02-19-2015, 02:00 PM
|
#5
|
Human being with feelings
Join Date: Jul 2014
Location: Là bas les huîtres (FR)
Posts: 424
|
Thanks a lot DarkStar, these are very helpful.
|
|
|
02-20-2015, 07:59 AM
|
#6
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
... and another trick:
I put the function calls all in the same place in the @gfx section (quite often at the very end):
Code:
zdiagnose == 4 ? print_strings(100,20); // (first string slot, number of strings)
zdiagnose == 2 ? display_memory(filtered_cname, filtered_param, 64, 3);
zdiagnose == 1 ? display_memory(map_cname, map_param, 64, 3);
zdiagnose == 3 ? display_memory(map_cname, map_mode, 64, 3);
Then when I want to examine some memory areas all I need to do is add, anywhere, for example: zdiagnose = 3; and, to turn it off: zdiagnose = 0;
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
09-27-2018, 02:20 AM
|
#7
|
Human being with feelings
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
|
Ha, I missed this one! Nice work.
|
|
|
03-23-2021, 05:21 AM
|
#8
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
... and this revision lets you name each memory area:
Code:
display_memory(note_ons, offsets, 64, 3, "Note Ons", "Offsets");
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
05-08-2021, 12:45 AM
|
#9
|
Human being with feelings
Join Date: Apr 2009
Posts: 4
|
This script is a godsend, but unfortunately this latest version does not work for me out of the box.
Function set_colour is nowhere to be found.
Am I just missing some includes?
Anyway, thanks a lot, really helpful!
|
|
|
05-08-2021, 05:44 AM
|
#10
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Oops,
Where you see lines like
Code:
set_colour(PALE_YELLOW);
// gfx_r =0.90; gfx_g =0.80; gfx_b =0.50;
change them to
Code:
// set_colour(PALE_YELLOW);
gfx_r =0.90; gfx_g =0.80; gfx_b =0.50;
or whatever colours you want to use
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 06:38 AM.
|