Adding ncurses into Qemu!

Text mode.. text mode..

Text mode.. text mode..

One thing that’s always bugged me about the Qemu 1.0 and higher is that they don’t print anything to the Win32 console.  So you have to go digging around in stdout.txt or stderr.txt .  Very annoying.  And of course Windows users can’t have the nice ‘curses’ text mode interface.  Or can they?

While I was re-updating the 4.4LiteBSD MIPS Qemu package, I turned off the normal SDLmain so that it now acts like a console binary, meaning that stdout/stdin now function properly.  So if Qemu had a problem, you can see it!

And while I was in the source, I thought why not see how hard it is to manually turn on curses?  It’s a quick one liner to config-host.mak (since it’s not detecting) then updating everywhere it has <curses.h> hard coded to use <ncurses.h> …. I guess I could have made a symlink, but whatever.  It links and more importantly I can run text mode MS-DOS in text mode!

To activate simply use the -curses flag.

Rest assured that SDL is still in there as well.  But now you can see error messages like this:

C:\qemu>qemu-system-i386.exe -L pc-bios -m 16 -soundhw sb16
dsound: Could not initialize DirectSoundCapture
dsound: Reason: No sound driver is available for use, or the given GUID is not a valid DirectSound device ID

So now you know there may or maynot be issues… In this case, I don’t care about recording audio, so it doesn’t matter.

I’ve updated the existing files on my server, so simply re-download.  Otherwise for new people my i386 only package (~4MB) is here:

qemu-2.4.0.1_win32-x86_x86_64.7z

And the ‘full system’ package (~22MB) is here:

qemu-2.4.0.1_win32-all.7z

For the two of three people who like this kind of thing..

8 thoughts on “Adding ncurses into Qemu!

    • I edited this thing like a dozen times, and wordpress keeps either undoing the URL’s alltogether or setting them to the same.. I had stuff to do so really no choice..

    • Kind of what I was hoping…. 🙂 I’ve just been so damned busy. About all Ive had time to do is modify some make files, and walk away and see if I get an exe every few hours.. lol not the best way to get things done… as I write this on the train to work. sigh.

    • Yep, I just checked! It does run on Qemu but there is some issue with the default video emulation. I have an actual S3 ROM somewhere, I used to patch into Qemu, the CL-GD542x I may have to try that.

      But yes, adding -curses does get a working text display. It boots up, and I can run the C compiler and everything!

Leave a Reply