Animated GIF’s from Qemu

I found this one recently… So the first thing is you need Qemu 0.10 or higher (probably not a problem), as it’ll save in ppm format no issues.  Then the fun expect program (Yay Linux subsystem), and of course Imagemagik.

Run Qemu so you can telnet to the command monitor:

i386-softmmu\qemu.exe -L pc-bios -hda c:\temp\127disk.img -monitor telnet:,server,nowait -hdb fat:\temp\dosb

I used this small program

set timeout -60
set capture 1
spawn telnet localhost
expect “(qemu)”
send “brake 1000\r”;
expect “(qemu)”
while { 1 == 1 } {
set fstring [format %04s $capture]
send “screendump /temp/$fstring.ppm\r”;
expect “(qemu)”
incr capture
sleep 3

and then to convert it into an animated gif:

d:\ImageMagick-7.0.7-18-Q16>convert -loop 0 -delay 100 \temp\*.ppm \temp\GHZ.gif

and behold:

Isn’t that great?

5 thoughts on “Animated GIF’s from Qemu”

  1. Noice! Anyway, decades ago I ve made a X screengrabber script for bochs to get illustrations for the aixps2-in-bochs.txt
    Yes, txt :P. Lossless pics had been grabbed, then uniq’d upon md5sums, and then optionally gif’ed some in other projects. But in this particular case, also wrote a png2txt for the two used video modes. the results are now history, see here:

    (a short but useful summary of this is here: )

    @neozeed: still no textmode grabbing? it would be handy instead of this workaround:

    For a bonus, I’ve saved my second ever hack from 1990: reversi.exe can be beaten in easiest mode with the same steps! Gif’d. Want some?

    1. I didn’t think about checking for differences programmatically. I actually cheated and increased the steps so I could manually copy in more of the same for some emphasis, like where I got shot in the back in the next post…. Lol

      I suppose this also opens up allowing various chess engines to play each other as well.. Sargon always did kill me, maybe pit battle chess against it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.