Category Archives: creativity

Restore an old Mac

In 1995-1996 I ran a Macintosh GUI BBS on a computer I rescued from the trash. The Macintosh SE/30 was prized for its ability as a server, and at one point mine had four external SCSI drives attached to it, two Hayes Accura V.92 14.4K Modems, and the 40MB built-in drive running System 7. With the RAM maxed out to 8MB and an external monitor card, this build was a top notch machine of its day. If you’re going to restore an old 16bit PC, why not make it the last of the V8 interceptors.

Before I get too far, let me declare that this is not a “how to”. There are far more traveled forums than the comment section of planetkris, and there are many hundreds of articles, and thousands of different things to try to get your retro hardware working. Only one of which will be covered here.

In a box, in a bin, in the last three houses my parents have owned, and saved from a flood, was a couple of my old Macintosh Computers. I think I have mentioned that I would pay to ship these out to me over a dozen times in last 10 years. I have a significant pile of keyboards, mice, cables, and adapters that go along with them. In October of 2018 they arrived in the back of the car that my parents took on their post-retirement cross country trip.

Yes, of course “leaking capacitors.” 15 years of electrolytic goop has been corroding the motherboard. I powered it on anyway just to see what I had gotten myself into, and it actually booted off a floppy that I made on my Windows 10 desktop. The fact that I was able to do THAT MUCH was particularly amazing considering the hardware/software emulation chain that was taking place: Windows 10 driver to access emulated floppy over USB writing bits from a 1990’s .img file using a 32bit Macintosh floppy conversion software on a 64bit multi-core machine. I wasn’t remotely running this on a VM desktop at the time – FYI.

Restoration VS. Nostalgia: I did NOT want this build to turn into a Raspberry Pi attached to a 7″ LCD monitor grafted into the case. I get why people do that, but it’s not at all true to the design of the machine, and it really cheapens the feeling one gets when they see an old computer they used in High School or College with the side hacked open and USB hubs sticking out. I looked into driving the original monitor with a Pi, and it has been done, but emulating hardware in Linux is not something I have any experience with. I decided that I would at least replace the spinny disk with an SD card (SCSI2SD). This alone would make the computer 10 times faster, and I could run real software on a real Macintosh from 1989.

I also experimented with powering the motherboard separate from the monitor. This would allow me to turn the original high voltage power supply off and “save it” should I want to fool around with keeping this machine on the internet or running a terminal, etc. That brushless fan – while still working great – is louder than my dishwasher.

I’m going to keep a Raspberry Pi OUT of the case. My plan is to connect to the Mac over 56K BPS serial with a modem cable connected to an external Pi. Use actual Macintosh terminal / BBS software to do fun and interesting internet stuff. The Pi will negotiate all the Ethernet and TCP/IP Internet heavy lifting. They DO make an Ethernet board for this machine, but I really (really, really) want to keep my external monitor board in there.


RestOBrite
: Removing the nasty orange color is pretty easy with SoCal sun and some Hydrogen Peroxide. I tested my method on my older SE first, and then did a carefully controlled amount of whitening to the SE/30. I think I found the balance between “this is still a 20 year old computer” and “bleach all the old things”. There are 1000 formulas for this on the net. I used Oxyclean and “off-the-shelf brown bottle from CVS” hydrogen peroxide.

Once the replacement capacitors arrived, I had to clean the motherboard in the garage sink with soap and water. It’s a little surreal dunking a motherboard into soapy water, but yes, this is the method. A mac bomb error code had cropped up after this and I went back and cleaned again. Now the caps were never going to be a problem, but the damage they caused to the SCSI chip was worse than I thought.

Not Booting: So, what’s wrong with your computer that won’t see a SCSI emulator SD card loaded with an image from some website? How about that 50 pin cable that’s older than your first car. Is the bus terminated correctly? Did that .img file copy okay with the USB loader? Did you assign the right address? I want to give a shout out to “David and Steve’s Blog” who really detailed the process of setting up SCSI2SD.

eBay spares: There are people in other countries that make their living removing old chips off old boards to keep in old boxes. I was able to procure an old NCR SCSI controller chip. I also decided that it would be best for my soldering skills that I socket this chip. The pads on at least 3 of the leads were damaged or missing once I de-soldered, and testing goes a hell of a lot easier if you can remove the chip to fix the traces under it. *thumbnail for scale

Trace twice, solder three times, trace again. This controller has 44 pins. I found that 3 of them were causing problems. Luckily only this chip was damaged. One trace I found before I de-soldered, the second and third one were right next to each other, but used connections that travel under the chip. I broke a fourth trace trying to fix the third, but I knew I was making progress when my SCSI HDD light came on and stayed on. My blind configuration of SCSI2SD worked and I was overjoyed when it FINALLY JUST BOOTED!


The one thing that I love about this machine, is that it does something that we only started taking for granted maybe 5-6 years ago. It drives two monitors, and extends the desktop, IN COLOR. Moving your mouse off of the built in screen with a window of icons over to a second monitor is still delightful. The fact that it was able to do this in 1989 is spectacular. This is not emulation, this is a 1989 video card directly driving an LCD monitor from the 21st century.

I enjoyed the process and encourage my fellow hardware hackers to enjoy restoring some old computer that you thought would never work again. Test your maker, hardware, software, and troubleshooting skills!

Easier, Better, Arduino IMU Head Tracker

mainI’ve recently been immersed in a space sim called Elite:Dangerous. (It’s in Gamma and will be out shortly 12/16/2014.) I play with a small casual group that’s not about to build a ship cockpit in our living rooms or all splurge for a dev kit VR Oculus Rift. Some of us have played Elite on the Oculus and the first thing you miss is “head look”. The game is designed for it, and once you use it dog-fighting in an asteroid field, watching your enemy turn sharp high above you while you cut power and rotate at the same time whilst avoiding giant floating rocks, you don’t want to give it up. This is one of those games (much like a flight simulator) that takes 30 minutes just to map your controller(s).

My brother linked me to a UK group that was doing head tracking with an Arduino (SparkFun Pro Micro) and a Gyroscope / Accelerometer (MPU-6050) over at edtracker.org.uk, “Can you build this?” he asked.

“I can build a better one.” and you can too.

  • No drift – Use hardware that incorporates a magnetometer (compass)
    (The new edtracker 9150 version uses a magnetometer to remove drift)
  • No calibration GUI – Place flat on table when powering on
  • No PCB – Four connections. SCL, SDA, +5, GND

Here’s what makes up the easier better IMU head tracker:

The first thing I noticed was the drift problem. The EDTracker guys have since put out a second version with magnetometer compensation, but they didn’t have it from the start and the hardware difference is around $6. I picked an IMU hardware package that has a great tested library for it. The calibration and angle calculation built into the Pololu libraries – specifically the code from Michael Baker Pololu_Open_IMU (Inertial Measurement Unit) as it uses the Madgwick algorithm is particularly brilliant. It outputs pitch, yaw, and roll angles. Watch a video of the Madgwick algorithm in action.

joy_cplI knew from past experience that the Teensy 2.0 can emulate many types of USB devices right out of the bag. “Joystick.X(value);” was simple to integrate and the device needs no emulation software or additional CPU to work. It just shows up in joy.cpl as a Joystick. You wouldn’t think that an Arduino could handle complex Euler angles and lots of float math on its own, but it has no problem. With the Teensy Joystick, the X,Y, and Z can be directly mapped 0 – 1023.

Lastly there are PCB boards being built for this, and  I’m really not sure why. These are not PCB’s with components on them like an ATMEGA32U4’s and the 9 Degree of Freedom hardware already built in. These are PCB’s just to connect a 9-DOF board with an Arduino. This is all of 4 connections, and the two pins on the Teensy 2.0 are D0 (SCL) & D1 (SDA) and they line up fine on both the Adafruit and Pololu breakouts for an above mount setup.

2pins_2wires
Yes, I cover the Teensy reset button. The PJRS software has a great auto-loader and you just don’t need it. You also don’t need a fancy PCB – two pins will do.

With the hardware finalized, I mounted it in a small box with a dab of hot glue and a cut-out for  the mini-usb. Here’s the test:

For the head tracking code I used Fscale to scale map the angles to the joystick. This is the part where you amplify a tiny amount of head movement into a larger amount of in-game head-look movement.  I settled on a 50° angle for pitch and roll, and an 80° angle for left and right (yaw). You’re more than welcome to try a different scale by changing the low and high Fscale numbers (-25 & 25 = 50° of movement translates into -90° & 90° of game movement) Everything else is directly from Michael Baker mikeshub/Pololu_Open_IMU. Such a tiny amount of code here is from me that I don’t even want credit for it. 😛 I’m just a lowly hardware guy that can smash out some C#. Example:

if (pitch < 0){pitch = fscale(-25, 0, 0, 512, pitch,0);} else {pitch = fscale(0, 25, 512, 1023, pitch,0);}
Joystick.Y(pitch);

Here’s a list of what you will need for software:

The device calibrates when it it powered on, make sure it’s flat and motionless. After that it takes an initial heading reading and starts to blink. 20 more seconds of being on, and that heading is locked in. I commented out all of the serial outputs and zip tied it to my headset:


Results: After playing for 3 hours I had zero drift. It stays pointed at the direction of your monitor forever. I considered adding a curve to the scaling to provide a “dead zone”, but the game has a dead zone setting built-in and I’d rather just output 100% and let the game / user control the settings. I also mapped the roll axis and one could use it to fire the roll thrusters in the game. For ~$45 you now have a cool little IMU that you can experiment with!

finished

Update: If you would like to configure it to work with Opentrack (supports TrackIR games), you will need to map the axis 1:1 with the joystick output and then set all your curves and config up in Opentrack.

fscale(-90, 0, 0, 512, your_axis,0)
fscale(0, 90, 512, 1023, your_axis,0)

Update 1/16/2016: Uploaded code and working with Grégory Paul over on hackaday.io
https://hackaday.io/project/8952-elite-dangerous-headtracker

WordSequence For KeePass 2 = XKCD Passwords

If you’re not familiar at all with the title, click here to check out the fabulous comic in question.

“Lolz” right? Well I completely agree with it – and I’m finding that my passwords are getting longer and longer and you really have no hope of remembering them. Take at look at this monster: !J$?e04uGh=eDP (89 Bits) You have no choice but to store this in a program like KeePass, never actually look at it, and hope that your password database stays backed up. 🙁

Password enforcement has gotten better, and worse at exactly the same rate. Here’s an example excerpt from Cal Poly’s password document. (This was discovered when my sister in-law tried 15 times to make a password that she could actually remember for her access):

Passwords must contain at least one character from three of the following lists:
1. Uppercase Alphabetic (A‐Z) 2. Numbers (0‐9) 3. Lower case Alphabetic (a‐z) 4. These Special Characters are allowed: ! $ % & , ( ) * + ‐ . / ; : < = > ? [ \ ] ^ _ { | } ~ These special characters are not permitted: # " @ and the space character

Passwords must not contain any of the following:
1. Your previous passwords used within the last two (2) years 2. Passwords less than 16 characters must not contain any of the following: a. Any words of three or more characters, including non‐English words b. Any groups of three or more characters of the same character type c. Any names, person, places, or things found in a common dictionary d. Any of your names (first, middle, last), any current Cal Poly username e. Repetitive characters (sequences)

The second part ensures that no password can be easily memorized. This string has to be written down. Once it’s written down, the whole reason for having passwords fails everyone, and after staring at the logic for 5 minutes I came up with something like this: 50Fu40Yo (42 Bits)

If you network admins are listening, you need to get over trying to corner users into crazy strings of letters and numbers. Dictionary words are easy to guess, but strings of dictionary words with random characters in there are just as good, if not infinitely better for users to actually remember. Lets look at this example: Wool+BladeFriction5 (105 Bits) A brute force attack is just going to go through every possible character in every possible position, and there’s 19 of them. Now for our ‘easy to remember’ Cal Poly password, the length is only 8 because I would never actually want to make it more then the minimum. Do you want a short useless password that gets written down? Or a long somewhat complex one that is memorized?

The challenge is to make a complex password that is easy to remember. The password should also satisfy usual requirements for length, capitalization, and numbers or uncommon characters. Here’s what I use:
KeePass 2 & WordSequence

Search the web and drop a couple thousand words (I used nouns and prepositions) into the window. I came up with some common substitutions (like @ for a, etc. – ‘b@ke m0re p1e’) and created complex easier to remember passwords like: Cheese4TigerDinner! (88 Bits) Most normal websites would accept this as a excellent password for the length and the special characters, and most humans could remember the phrase: Cheese for tiger dinner!

How to find and organize gmail lost archived items.

Since we started the 21st century, I use the week between Christmas and New Year’s Day to clean house digitally. A synchronization of clocks, time servers, updates, firmware, and yearly maintenance with all things containing zeros and ones. The deleting of old emails, spam, and the archival of a picture folder entitled “2011.”

This year I stumbled on an interesting thing that gmail doesn’t do. It won’t show you mail that doesn’t have a label. Any mail that you “archived” to get off your in-box, without any categorization, dropped into this pit mixed with thousands of other labeled emails. Looking for these orphaned emails would involve looking through hundreds of pages of “All Mail.” I archived them for a reason (to go through them one day) otherwise I would have deleted them. Little did I know that finding these orphans would prove to be a challenge.

“Why do I need to see those old archived emails? If I ever need anything I’ll search for it and find it. “ – you might say.
The answer is the same as why you need a photo album and still like pawing through SkyMall. We are nostalgic creatures and sometimes (at least once a year) like to reflect on the past. Plus, a full catalog of information can result in more discovery. I’ll give two examples: 1. After rescuing my archived items I found a webcam picture of my dad with a cast on his arm. I barely remembered he broke it and seeing this picture gave me the memories back. 2. Listing out every sub-domain for UCI one day resulted in passport.uci.edu – weird way to find out that the University had its own passport office 1/4 mile from your house and you didn’t need to trek all over Orange County for mini-pictures and wait in a Post Office queue. I never thought either of these things existed and certainly wouldn’t have searched for them.

Gmail ninjas know about the Gmail advanced search options, but even here it specifically states: “There isn’t a search operator for unlabeled messages” Further searches looking for a fix resulted in a cobbled-together list of all your labels with a minus sign in front to indicate “anything not labeled this or that or etc.” Example: -(label:Subscriptions OR label:Ebay OR label:Rally OR label:Receipts) For some of you that never adopted labels, or only use 3 of them, this is great and might just work! For the rest of us, I noticed that after typing 6 or so of them into the search box and tried lables that had “Two Words” or “funky-ch@ract3rs/” search started to break. I think that nested labels makes this worse, but I stopped the experiment as I currently use 20+ labels.

In order to find your (labeled items archived in-box stuff orphaned never) you’re going to have to make the LIAISON pledge:

I {insert name here} promise to never blindly press the gmail archive button. I promise to make sure that 1 or 2 labels have been attached by filter or by my own key-press AND furthermore I promise to guard the secrets and ways of the Gmail ninja, never using my powers for evil.

Alright ninjas…
Add the ZZZ label

  • Start by making a new label. Something that you can search for in the future like “ZZZ”.
  • You will repeat the next steps many times as you go through all your labeled email.
  • START: View all of the mail in one label and click on the check-box in the upper left to select all mail.
  • At the top of the mail items a message will appear:
  • All 100 conversations on this page are selected. Select all ### conversations in “{your label}”
  • Click the link and now all the mail in that label is selected (be careful here)
  • Choose to add the ZZZ label to you messages:

  • Google with respond with a message. Feel free to click OK.
  • Find the rest of your  labels and tag them with ZZZ. It took me 5 minutes and you’ll never have to do it again.
  • If you still have labeled email to tag with ZZZ goto START
  • See that wasn’t so bad. 😀 Unless you have like 500 labels. 😐
  • If you do have more than 100 labels, I suggest 43 Folders.
  • Done!

Now you can use this magical search string:

-label:zzz -from:me -is:chat -in:inbox

Go ahead and paste that into your email search box. This means: Show me everything that IS NOT labeled ZZZ, that IS NOT from me, IS NOT a chat, and IS NOT already in the inbox. Since you tagged all the email you know about with ZZZ, items orphaned with no labels were not tagged. Your long lost archived items will appear! I had about 150 items that I selected and placed back into the inbox for me to go through in the next couple days.

What’s next?

  • Delete the ZZZ label now that you have no further use for it.
  • Never blindly hit the archive button again. You promised! 🙂
  • Get Google to make a search parameter for “label = null”
  • Enjoy your discovered conversations from the last few years!

Have a happy and prosperous New Year!

Make a Google Earth Fly-Over Video!

I organize a stage rally in Ridgecrest, California called the High Desert Trails. For the last three years we have run on a six mile road on private property. In order to grow the event we needed to find more roads. Stepping up to public roads means more insurance, permits, and logistics (more stuff). None of which we can afford if competitors think it’s still a small rally. Competitors (like myself) are often skeptical of new roads. It usually takes a couple of years before ‘everyone’ in the rally community knows what the roads are like at [rally name here]. How do you get rally drivers excited about an event with new roads today?

Google Earth! Imagine what it was like 10 years ago, before publicly available satellite imagery was a mouse click away. Rally Masters would spend hours driving around looking for roads. Even with updated topographic maps, you still have to get out there and check out what it actually looks like. Early in 2003 I spent some time looking for roads in New Hampshire and the topo maps don’t tell you about the flooded marsh, the rocky boulder filled road, or the intersection that home owners just piled dirt and brush on, so that neighborhood kids would stop using the route.

With Google Earth we were able to see what shape the roads were in, and we got an idea of how wide they were and if they were blocked, gated, etc. This reduced the number of ‘road scouting trips’ to a handful. We were even able to scout the route we had decided on when we got back to check for anything we had missed. The ability to see this kind of road detail is a game changer. “I’ve seen it from space.” is now a part of my vernacular.

It was only natural that I wanted my competitors to see it from space as well. I actually prefer this to coordinates, as I don’t want to reveal the exact route until the day of the event. For those rally folks reading this, I’m sure my methods can be re-produced and you could ‘discover’ the area outside of Ridgecrest that we’ll be using for the event. You are also aware of the pre-event testing rules, and the jeopardy to the event should you decide to do any pre-running. 🙂

How was it done?
* You’ll need a copy of Google Earth.
* You’ll need a screen capture program called CamStudio.
* Both of these programs are free!

Setup your view under Google Earth Options: Tools – Options – 3D View. Click ‘Show Terrain’ under ‘Terrain Quality’ and crank the slider to the max for detail. You’ll also need to edit the options for ‘Touring’ under Google Earth Options. Some of these options for recording refer to the Pro version of Google Earth which will make these videos in much higher res. A full version of Google Earth Pro is around $300. Highly recommended for a business or commercial venture. (but you can do just about the same thing for free with Cam Studio *cough) A good place to start is by setting the options to match what I have below. You’ll want to tweak your angles and heights continually to get the shot your looking for.

Go to the area of the map you want to make a movie of. Start by creating a path. A new window will pop up called ‘Google Earth New Path’. I suggest you change the name from ‘Untitled’. When you LEFT click on the map a point will appear. RIGHT click if you made a mistake. Use the controls in the top right to move around to your next point. Hit OK on the ‘Google Earth New Path’ window when you’re done. You can click on the path to add more later as well as changing the color and thickness of the line. You’ll want to hide this when you actually record your movie. This interface took me some time to get used to (especially in 3 dimensions) so be patient with it.

In CamStudio you’ll want to setup the video options to capture a ‘Fixed Region’ (I used 320 X 240). When you hit record a window will appear, place it over the Google Earth window as shown. Start the tour by clicking the “Start Tour” button: Record your shot and hit ‘Stop’ on CamStudio. You will be prompted to save your video.

For the rest of it I edited a group of videos and different shots with plain old Windows Movie Maker. Added a little royalty free music and uploaded to YouTube. As far a the rally is concerned, my first reactions were something like: “Woah! Helicopter? Oh Wait… this is awesome!” It will no doubt get peoples attention and hopefully we’ll get tons of competitors out to the High Desert Trails Rally on April 9th, 2011.