Windows 98 Wrist Watch

img_20170220_004918
Eat your heart out, Casio.

OK. Wow.

First off, thank you!

I didn’t think this project would get much attention but its gone crazy!

Thought I’d make a little follow up video to show where I work, ‘my lab’, and a teaser of upcoming projects – enjoy.

There is now a more detailed guide to building your own Windows 98 Wrist Watch over at Hackster.io!

Also Check out my upcoming project – Robo Skull!

img_20170305_155349

Why.

windows_9x_bsod
Why not?

Key goals summary:

  1. Emulate Windows 98 on a Raspberry Pi.
  2. Make it wrist-wearable.

I have always had somewhat of a soft-spot for Windows 98, despite it driving me insane back in the day on my old Pentium II system with 64mb RAM and using some god awful on-board graphics.

But these days I don’t HAVE to suffer it as my only source of computing; which, somehow makes me want to go back and use it – I’ve built my own dream Windows 98 PC that I like to fire up every now and then and I love it.

I also love emulation, the idea of running an operating system on virtual hardware? That’s awesome. It’s like the Matrix, or something. On top of this I love wearable/small tech and nowadays I have the ability to make things like this. So I thought, wouldn’t it be ridiculous and awesome to have Windows 98 on my wrist?

IMG_20170223_214305.jpg
Nostalgia… or dread?

Let’s do this.

Components.exe.

I see the blue screen.

I’ve done a few projects with Raspberry Pi’s and TFT screens that use the GPIO now so the hardware side was relatively painless, knock together a Pi A+, whack on the TFT and put the base of the case on the bottom and some screws and spacers in between to keep the TFT screen on nicely.

Check this tutorial for adding an on/off switch to the Powerboost 500.

Go here for installation of the TFT Hat.

And here for framebuffer copy – this will copy whatever the GPU renders to the PiTFT so that QEMU will display on it as it would on a normal screen (without this I have found that QEMU when run will just try to run through the HDMI instead of the PiTFT).

Bit of Sugru and some Tape on the back to strap in the battery and Powerboost:

img_20170223_230508
Mmmm Blue LED.

Emulate emulate emulate.

So here comes the complex part.

QEMU is the weapon of choice here.

I broke out my copy of Windows 98 and followed this chaps guide to get the .img file needed for the emulator, copied it over to my Pi (into ‘/home/pi’ for ease of access).

Don’t worry about the Youtube video in the post above, that is for an older version of Raspbian, now Jessie has QEMU available and easily obtainable by typing:

sudo apt-get update && sudo apt-get install qemu -y

Time to test it. Navigate to ‘/home/pi’ and run:

qemu-system-i386 -localtime -cpu 486 -m 96 -hda win98.img

QEMU should pop up and begin launching Windows 98, when its loaded have a click around and then shut it down as you would a normal 98 machine.

When QEMU has shut off it’s time to apply…

Finishing touches.

Now we want a way to turn it off using one of the buttons on the TFT – we don’t want unclean shutdowns causing SD Card Corruption.

Thanks to this chap for the buttons python code, which is:

#!
import time
import RPi.GPIO as GPIO
import subprocess

cmd = “/bin/bash -l -c ‘echo $USER'”

# tell the GPIO module that we want to use the
# chip’s pin numbering scheme
GPIO.setmode(GPIO.BCM)

# setup pin 23 as an input
GPIO.setup(16,GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(13,GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(12,GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(6,GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(5,GPIO.IN, pull_up_down=GPIO.PUD_UP)

try:
while True:
if not GPIO.input(16):
# do
subprocess.call(“”, shell=True)
if not GPIO.input(13):
# do
subprocess.call(“”, shell=True)
if not GPIO.input(12):
# do
subprocess.call(“”, shell=True)
if not GPIO.input(6):
# do
subprocess.call(“”, shell=True)
if not GPIO.input(5):
# do
subprocess.call(“sudo shutdown -h now”, shell=True)
time.sleep(0.1)

except KeyboardInterrupt:
GPIO.cleanup()

Of course this can be edited to do whatever you want – or use the other buttons for things.

Chuck this into the ‘/home/pi’ directory as ‘buttons.py’.

Next up, a .sh file for running the QEMU launch commands:

qemu-system-i386 -localtime -cpu 486 -m 96 -hda win98.img

Save this as ‘qemu_win98_launch.sh’ and chuck it into ‘/home/pi’

Now these just need to be run on boot so put the following into ‘/etc/rc.local’ just before ‘exit’, the fbcp command is to run the framebuffer copy software installed above on start.

/usr/local/bin/fbcp &

python /home/pi/buttons.py &

./home/pi/qemu_win98_launch.sh

Now at this point it should be possible to reboot the Pi and unplug it from the monitor.

After FOREVER loading it will eventually load up Windows 98 and be ‘usable’, its super slow.

Just hit the configured button to shut it off, for me its the 5th button from the left (as per the button.py code above). This will uncleanly shut off Windows in QEMU, but will shut off Raspbian nicely; on next boot Windows 98 may try and run scandisk though.

The finished product.

Service Pack 1.

I’ve found the touchscreen is a bit off – I am not sure if this is because of QEMU or due to calibration required on the PiTFT configuration side of things – I’ll look into this at some point.

Since its so damn slow I went back into the Pi, exited QEMU and ran:

raspi-config

To notch up a bit of an overclock to 800mhz – however; do this at your own risk, I can’t take responsibility for hardware failures, overheating, battery drain, reduced life of hardware or anything else strange that may occur from overclocking a Pi.

I’m tempted to put the other buttons to use and have them launch different versions of Windows – 95, ME, XP. Would be fun to have the ability to launch them all (non-concurrently). Although I imagine XP will run even worse than 98.

 

 

mozilla-announces-end-of-support-for-firefox-on-windows-xp-and-vista-511294-2
Oh man.

Also, just to confirm my Reddit ID – I am indeed Lord_of_Bone

Leave a comment