Memory View Update
Sunday, May 23rd, 2010I did some work this weekend on optimising the rendering of the memory view and heat-map. I ended up combining them both into one control a while ago since they share a lot of code and access the same data. I also added some better test bed functionality to test out various parts of the control.
The top toolbar is from the test bed, I can click to modify random ranges of memory to test the different colours of the hex view or heat map. The last toolbar button turns on continuous random memory updates which shows off the heat map view better.
Red is read, green is write, and blue is a bank change. I sped the heat map up by clearing the view to black, and only rendering the bytes that have colour. It will slow down if a lot of stuff is happening but it’s tons faster for the test.
For the hex view, I now build up 4 strings for each line, one for each colour which signifies if its invalid (grey question marks), dirty (light grey), changed (red), or normal (black). Rather than naively rendering each byte separately it now only renders a max of 4 text draw calls per line. Magnitudes faster even in the worst case.
I also cleaned up some scrolling code, but I’m not having much luck getting the focus to do what I want. I’m going to figure it out for the editor part…