Jump to content
Sign in to follow this  

C64 visual debugger [ICU64]

Recommended Posts

Εν αναμονή του ICU64 visual debugger για τους C64/128.

Ο ICU64 visual debugger είναι εκπληκτικός, κάνει visualizations της πρόσβασης στη μνήμη και των memory-mapped devices όπως το video και το sound chip. Δείτε στο βιντεάκι πως δουλεύει:



Επίσης υπάρχει και ένα με το Boulder Dash εν δράση:



απλά εκπληκτικό!

Edited by Aardvark
yt tags

Share this post

Link to post
Share on other sites
Interview with “Mathfigure”

Creator of the Commodore 64 hacking tool ICU64



Q. Please introduce yourself to our readers.


Hello, I'm Mathfigure, the creator of the Commodore 64 hacking tool ICU64. I am a Physicist from Greece, and was born in 1976.


Q. How did you first start with computers and what are your earliest memories?


As far as I remember myself my favourite "toy" was the hammer (the absolute disassembly tool). I always want to see inside the devices, to see how they work; but soon this interest proved too expensive (even later, when I discover the screwdriver!) So I changed my hobby and started to become an athlete.


I first heard about computers in 1986. I asked my big brother what it (a computer) is; and he told me about a machine that looks like TV but also has a typewriter attached, via which you could give commands for what you wanted to see on the screen. I was fascinated by this idea: a machine that I could order! So in January 1988, after begging our parents daily for about 18 months (I think this is a record!), the first computer arrived at my home: a Commodore 128D. Since then I stuck with computers.


I started to play with commands for graphics and thus I slowly started to program. I familiarized myself with the Cartesian Coordinates and some other aspects of Analytic Geometry before I learnt anything about Algebra and Geometry. In parallel there was also a Commodore 64, embedded to the C128, capable to running thousands of games! And I always wanted to beat a game within two ways: to finish it and to hack it. I have made innumerable resets between the C64 mode and the C128 mode trying to hack some games with the embedded debugger of the C128. Briefly, the C128 gave me a scientific view of the computer that led me finally to university, but the C64 was the machine that I always wanted to hack and that led me to the ICU64 project.


Q. For the people who haven't see it or heard of it can you tell our readers about ICU64 for FRODO, what are the main functions you can do with the software?


The project tries to manipulate the C64 as a whole (hardware and software) using the full power of the PC. The ICU64 is aimed to be a comprehensive tool for the most demanding user of the C64:the hacker. Its aim is to provide real-time visualizations for every internal component of the C64, as well as other combined visualizations that would make clearer the operation of the hardware and the intention of its software.


To achieve this, the software runs in conjunction with a modified version of the C64 emulator FRODO that I call Frodo Redpill. The Frodo Redpill provides access from outside to almost every bit and every event that exists and occurs inside the C64 virtual machine. Currently, the main feature of the ICU64 is a handy view of the address space as a bitmap which shows the contents of the memory and every access that is performed by the CPU and the VIC-II. When a byte is accessed, a corresponding pixel is colorized: red if written, green if read and blue if executed (as you can imagine combinations occur fast and often). You can zoom out to see the whole memory and easily distinguish data and code, or zoom in down to the details where you can see the values of the individual bytes as hexadecimal numbers, or zoom further to see the addresses of the bytes and the machine language mnemonics, or even further to see the address of the code which accessed last that particular byte. Also, you can edit the values of the bytes at any time. All these functions are in real-time while the C64 is running any software you like. This "memory view" is highly dynamic and interactive, so it may sound complex, but is really easy and intuitive to use.


Q. So you can see every memory access colour coded in the emulator of the Commodore 64 and change the bytes manually, what other features does the software have?


There is a "graphics view" where the contents of the RAM are decoded in 4 main ways that the video chip (VIC-II) supports: sprites, bitmaps, charsets and text screens. This view is also editable. For example, you can draw on the screen and change the stage of a game on the fly, giving an immediate way for cheats. Other features are: the "display window" that emulates the C64 display and shows the VIC state for each raster line; a simple visualization of the SID state; a CPU instruction logger which tracks the executed instructions only once, so you can locate event handlers; and a "raster view" which is cycle-exact and visualizes the activity of the VIC. At any time, there is also the possibility to pause the virtual machine and trace it step-by-step, where the "step" may be: a frame, a raster line, a cycle, or a CPU instruction. Most of these features have lame implementation or they have only few functions but they will improve with time.


Q. How long did this software take to program?


Well, I don't count the hours. Usually I work on the project for a couple of weeks then test it for some days with several games and demos, and then I work again after several months. In the middle time I work on other projects (unrelated to C64). My first attempt to start the project was in 2000 but it was hopeless. In Nov 2006, and after working for 10 days, I had a stable version for the VICE and the CCS64 emulators, with the memory view (only the RAM), the graphics view (only the sprites), and the display window. The RAM view was a 256x256 gray scale bitmap and there was a red highlight for every byte when its value changed. No zoom and no memory accesses, nevertheless it was amazing, so I spend a lot of time watching many games and demos under this view. Realizing the potential, I start to prepare the Frodo version. Next year, several features were added (only for Frodo), and in Dec 2007 the program took form, in May 2009, it was shown to the public as a preview. During the summer some features were removed (as they were though too lame) and some others were added, before the first public release on Sep 2009.


Q. Do you have any other features you would like to add?


Many, and really I don't know what to add first:


visualization of the CPU, VIC-II, SID, CIA1 and CIA2;

unification of the memory view and the graphics view in a handy matrix editor;



auto memory map;

several different color schemes of the memory;

customizable display;

more featured "raster view";

more flexible instruction logger;

snapshot manager;

parallel executions on the same emulator;

parallel synchronization of multiple emulators.


Be aware that some of these are just ideas, others are closer to implementation, and toward time other ideas may appear. Off course all these need a lot of time and with my rate so far I don't know how long will they take.


Q. So who would best utilize this software and who did you think about when designing the software?


Initially it was created for personal use only, but after the public demo and its acceptance, I decided to spread it as far as possible. The target user is the C64 hacker and my effort is to make his life easier. And since the hacker is the user who wants the most, everybody else should be pleased too (i.e. developers, self-learners, gamers). I would be happy if this tool could be utilized as a "gamer-to-hacker converter" since a gamer sees only the tip of the iceberg when playing a game and ignores how the game works (the big part). On the other hand, this software is not for engineers as it visualizes only the logical operation of the computer.


Q. Do you have a Blog or Twitter page people can follow?


I have a blog (http://icu64.blogspot.com ) where I post anything new that is related to the project (not much so far) the blog contains links to download the files needed to run the software. I'm also on YouTube (http://www.youtube.com/mathfigure ) where I have upload some previews of the software in action.


Q. How is the software beta tested for errors?


I test the software myself looking for major bugs. Minor bugs may be fixed even after the release. If the same bug remains from one release to another, then it should be reported from the users, because probably I haven't noticed it.


Q. What software did you use to produce the software?


I use the C# of Microsoft Visual Studio where ICU64 is written and the C++ where Frodo Redpill is written. Also, I use the Wolfram Mathematica to test new features, or to do more advanced operations, during reverse engineering of a game, for example.


Q. What do you need to run the software and is the software publicly available?


The software it is free available from my blog. The requirements are: a PC that runs Windows XP or better, equipment with a mouse that has a handy wheel for easy pan & zoom. In the case of Windows XP, the Microsoft .NET Framework 2.0 or better must also be installed. There are two version of ICU64: the Frodo version which needs the Frodo v4.1 emulator, and the VICE version (with limited features) which needs the WinVICE v2.1 emulator.


Q. Why implement this for Frodo first rather than any other emulator


Building a prototype you want to concentrate more on what to do and not on how to do it. So you want anything around your project to be helpful and not a barrier. It was between Frodo and VICE. Frodo has elegant source code, and comes with an excellent article about the VIC-II from the creator of Frodo, Christian Bauer. Between the article and the emulator one could see a one-on-one map of "what" and "how". Thus the VIC article serves as a very good documentation for the source code making it even easier to understand. Though the VICE emulator was superior, its source code wasn't easy to read and sooner or later would stop my project. Actually I started to work with VICE but soon return to Frodo.


Q. If our readers have suggestions to add extra features would you be open to their ideas?


Any idea is welcome (preferably ideas about unifications, generalizations, or extensions).


Q. Would you release the source code as freeware or similar?


I would like to, but first I must get it well formed and perfected because currently the code is a mess.


Q. Do you have any other Commodore related projects you would be prepared to tell our readers about?


ICU64 is meant to be an all-in-one project, at least for me and anything I develop around C64. I can't imagine a tool for the C64 that couldn't embed with ICU64. One of the major goals of this project is to give to the user the full control over the machine which means, by definition, that he shouldn't need any other tool (off course it's still far from this).


Q. For a system considered DEAD, why do you think there is so much interest in the Commodore 64 and for that matter "RETRO" computing in general?


Nostalgia is the major reason why most users use a retro system periodically. Yet, the hackers have another reason as well: they are trying to get the maximum from the minimum (a hacker's principle). The C64 demo scene is full of creative hackers who still squeeze the C64 trying to extract the whole potential of this machine, and surprising they still continue to impress us. The best demo I have seen (Edge of Disgrace) is released in 2008! So, the C64 is actually LIVE. And there are a lot of people that try with their way to keep it like this (the fate of C64 is on the hands of its users).


On the other hand, compare the C64 with the PC. Which is more "pretty"? The components of the C64 are chosen carefully to provide the maximum potential with the minimum cost. Have you opened a PC to see how much unnecessary complexity and redundancy exists there? So, the MODERN machine is "ugly" and this is another reason why the hobbyists who want to study a computer as a machine would prefer a "pretty" RETRO one. Note also that the emulation combines the RETRO with the MODERN, and my project moves toward this direction.


Q. Do you think emulation will ever become so perfect we don't need to keep preserving the "REAL" machines anymore?


Absolutely! It is known that a computer can simulate the operation of another computer. The fact that the current emulators have some weakness is due to the lack of detailed specifications and the need to be hosted on powerful and flexible real machines. Besides, a "real machine" is an implementation of a design which describes an "ideal machine". And a "virtual machine" is just another implementation of the same design. Which implementation could be closer to the "ideal"? On the other hand, if it so important for someone to touch the thing, I believe that in few years it will be possible to "print" the parts and assemble a real C64, at home!


Q. Do you have any comments you would like to add?


I want to thank all the guys who with their comments helped me to stay concentrated on the program during the last summer, so it can now be made available to all. I hope that the program will serve as a good gym for the mind for anyone trying to figure out how computer software actually works. Also, I hope that this project will inspire more developers to create similar tools, since there is a big unexploited potential here.


Q. Thanks for working on such a great piece of software.


I'm happy that you like it.


Q. For anyone curious or in need of a demo look at these

I think when our readers see what the software can do it won't leave many without that WOW factor this is the greatest thing I have seen in a long time, I couldn't begin to think how you wrote such piece of code have you had any negative comments?


Indeed, there is lots of “WOW” under the demo video, wherever posted. However, there are some negative comments about the background music (as a kind of noise) and the song (because it is a little aggressive). Yet, this is the music on the ending titles of "The Matrix", and due to the obvious parallelism between the program and the movie, this was the only choice that I had (besides that I like it!).


Q. I see you have quoted something about "everything is numbers". I guess most things can be explained with mathematics, the way trees form, flowers, snow etc can EVERYTHING be expressed as a number or formula?


OUR mathematics is applicable everywhere human logic exists and in the cases where the human logic is vanished or banished (e.g. love) then we can't do anything about. However, this question touches the philosophy of science so prepare for a dive.


First, the “everything is numbers” was a philosophical thesis of Pythagoreans (over 2500 years ago). In the virtual world of a digital computer EVERYTHING is numbers (you can see it with any debugger). As a physicist, I think the same thing for the real world. So far all our efforts were to try to guess the laws of the universe using our classic mathematics and by doing many physical experiments. But, could we just see the REAL CODE of the universe (like Neo in the Matrix)? The Quantum Computers use the nature as a mathematical library, with ignorance about HOW she does her math. But can we see HER math? We could debug a quantum computer but that would violate fundamental principles of quantum mechanics. Yet, maybe there is a chance if we could build a “Quantum Meta-Machine” (a kind of quantum emulator on a quantum computer) and then watch its operation with the hope that this way we could cheat the nature. We must just believe in a more powerful principle that says: "nothing is impossible".


Q. I guess I know why you use the handle "mathfigure".


I guess you guessed right!

Απο την συνεντευξη του Mathfigure στο 37ο τευχος του Commodore Free Magazine

http://www.commodorefree.com/issues.html (@Wally)

Edited by Nemo
  • Like 1

Share this post

Link to post
Share on other sites

Νεα εκδοση ICU64


ΙCU64 for Frodo Redpill v0.1.5 - Released

Eventually, after 3 years, a new version of ICU64 is ready for download. Several bugs and issues have fixed, additional functionality and features have added. Note however, that this version is not the one that I was working on the last years (i.e. v0.2). This is only an update of the initial release, where I have paste as much code as I could from v0.2 without corrupting the functionality. My goal is to make the raster view equally significant with the memory (matrix) view, so the development is being continued...



Share this post

Link to post
Share on other sites

Φοβερό πρόγραμμα και να σκεφτείτε ότι...


...δεν είχα πάρει χαμπάρι αυτό το θέμα, μέχρι τώρα!


Πολύ εύστοχο το μουσικό χαλί του 1ου βίντεο, το προγραμματάκι είναι έτσι κι αλλιώς, πραγματική "The Matrix" φάση!

Share this post

Link to post
Share on other sites
ICU64 for VICE 2.3 v0.1.2 - Released




An update of the ICU64 for the VICE emulator is available for download (you also need the VICE 2.3 emulator). There are no new features, only better functionality. My goal is to inject the REDPILL into the VICE, so more features could be supported in the future. I'm working on it...

(see the included readme file for instructions)


Note for programmers:

This time I modified the VICE source code to fix the bank issues of the memmap feature (the mod is here).

>>>>> http://icu64.blogspot.gr/2012/10/icu64-for-vice-23-v012-released.html





Some data monitoring and stuff that i came across whilst coding my little demo-something for the c64 along the way of my revisit of the assembly language.


Tune: "The Pharma" © aGe2.1 (p) battlecommand.org


Tools used: CBMPRGStudio by A. Jordison ; ICU64 for VICE by mathfigure; VICE 64

Edited by Nemo

Share this post

Link to post
Share on other sites


The creation of memory maps gets easier with this release.


New features in the memory view:


BASIC program layout

Load or type a BASIC program and hit ctrl-L in the memory view to watch the memory map of its code. After RUN, you have to press ctrl-L periodically to update that map, because a running BASIC program updates the layout of the data area (which is located after the code area) as it meets new variables for the first time. Enable the text view (ctrl-A) to get a more meaningful view (or type LIST in the emulator but this is like cheating!)


Data Classification (Order In Chaos)

The data classification view colorize the memory in a chaotic still consistent way. Using only your pattern recognition abilities you can organize the data even if you don't understand their meaning!

So far, watching the internals of the C64 in action may was something, yet you may have this feeling: "wow! I see everything
but still I understand almost nothing
". Well, the new feature lets the CPU to interpret to us the meaning of the data using a color language. And no, you don't have to learn another color code, since these colors are meaningless this time (it's just a meaningless 'alphabet'). What's important is their patterns (i.e. the 'words' and 'phrases' that they form). These patterns are not the usual data patterns (as in the grayscale view), they are event patterns arranged in space that highlight the internal data structures as being used by the code (who always knows their meaning, and this is where we rely).

In particular, this visualization is based on 'what code access what data', and actually it's a simple hash function of the "last access" address that located in the upper left corner on every cell (visible in deep zoom). So, actually, this information was always there in a numerical/textual form, proper only for serial/boring reading. By translating this information into colors, patterns emerge (from chaos!) that can recognized immediately by the human brain in a parallel way, and organized manually. This view it's especially useful to find large internal structures like arrays or lists of data, and analyze their entries down to their most individual parts.


Map Editing

Some new functions that will help you with your memory maps:

Enter / Shift-Enter : Split / Join line

Backspace / Shift-Backspace : Move line Left / Right

(the above operations never overwrite non empty cells)

Delete / Shift-Delete : Delete cell / line

right click / Insert : Pick cell / Put cell++

F2 : Rename cell (change address)

Note that the editing functions are minimal yet, and they are line oriented. If you want to move blocks around you must export the map and use some spreadsheet application.


Drag 'n' Drop

If you drop a .txt file in the memory view, it will open as a memory map. Any other file will be imported as a .prg file (i.e. will be loaded in the RAM at the location that the first two bytes specify). Btw, the Frodo Redpill window accepts .fss files (Frodo snapshots).


Press F1 on every window (even in the main menu) to see more functions.


Μετα απο πολυ καιρο εχουμε κατι καινουριο απο τον Mathfigure

icon_arrow.gifICU64 for Frodo Redpill v0.1.6 - Released

Edited by Nemo

Share this post

Link to post
Share on other sites



Κι ενώ


"In a couple of months v0.1.7 for frodo will be available."


το ICU64 v0.1.7 for Frodo είναι προ των πυλών,





το ICU64 και ο Mathfigure απoκτά ανταγωνισμό και δυνατό μάλιστα από τον Marcin (Slajerek)Skoczylaw (a.k.a. Matt Gray Tracker ) [ATTACH=CONFIG]n1044143[/ATTACH]





C64 Debugger is Commodore 64 and 1541 Drive code and memory debugger that works in real time

It is for quick prototyping on Commodore 64 machine and its internals.

C64 Debugger embeds VICE v2.4 C64SC emulation engine created by The VICE Team.

This is a standalone binary and no VICE files are needed to run this.


I've been working on this over last weekends and I think finally it is mature enough to be released to the public for the first time



C64 Debugger V0.5 διαθέσιμο για Win/Lin/Mac .





Ο ανταγωνισμός πάντως είναι προς όφελος των "καταναλωτών".


Edited by Nemo
  • Like 1

Share this post

Link to post
Share on other sites

VICE 3.0


ΒΤW το τελευταιο επισημο port στο RetroPie εχει βασανισει πολλους αδαεις χρηστες.

  • Like 1

Share this post

Link to post
Share on other sites

-I'm rewriting redpill from scratch at github.com/mathfigure.


- My aim is to support multiple emulators this time.


- An initial version of frodo-redpill is already up, vice-redpill will be next , and even more will follow.


-The platform is mainly linux and/or windows.


-And to be honest, i don't know how it will evolve (as plugin or something else).


>>> https://github.com/mathfigure




Υ.Γ. ενώ περιμένουμε την νέα έκδοση του πλέον αντίπαλου δέους του ,του C64 Debugger v0.60


που θα είναι διαθέσιμο στο Silesia 8 demo party (2017/06/23)




Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...