Did you ever see the Matrix and wonder just how all of those green characters of weird computer code flowing across the screen corresponded to what was represented on the screen inside the matrix?
Well, today I came across a tool on the BERG blog, which shows this correlation very well with real computer code:
ICU64 is a real-time debugger for Commodore 64 emulators. On the right is an emulator program emulating a virtual C64 machine. This virtual machine is running an old C64 game. On the left is ICU64 displaying the memory registers of the virtual C64 machine.
Tom Armitage on the aforementioned BERG blog does well to describe what’s going on:
To begin with, you can see the registers being filled and decompressed to in real time; then, you can see the ripple as all the registers empty and are refilled. And then, as the game in question loads, you can see registers being read directly corresponding to sprite animation. What from a distance appears to be green and yellow dots can be zoomed right into â?? the individual values of each register being made clear. Itâ??s a long video, but the first minute or two makes the part I liked clear: a useful (and surprisingly beautiful) visualisation of computer memory. It helps that the computer in question has a memory small enough that it can reasonably be displayed on a modern screen.
Seeing how the individual memory registers of the C64 as it runs the game, you can get an idea of how the individual bytes all play a part in presenting the game. And as the video progresses, you get an understanding of how you can change individual bytes and thus change the game – in realtime. This is pretty much what Neo does in the Matrix films: He hacks the code of the Matrix on the fly to give himself superhuman powers such as the ability to fly or fight, thereby breaking the programmed laws of the game.
It is a beautiful visualisation of the relationship between the physical computer (the registers on the disk) and the information we see displayed on our screen.