Your Own Engineering Workstation, With Mame

There are some things that leave indelible impressions in your memory. One of those things, for me, was a technical presentation in 1980 I attended — by calling in a lot of favors — a presentation by HP at what is now the Stennis Space Center. I was a student and it took a few phone calls to wrangle an invite but I wound up in a state-of-the-art conference room with a bunch of NASA engineers watching HP tell us about all their latest and greatest. Not that I could afford any of it, mind you. What really caught my imagination that day was the HP9845C, a color graphics computer with a roughly $40,000 price tag. That was twice the average US salary for 1980. Now, of course, you have a much better computer — or, rather, you probably have several much better computers including your phone. But if you want to relive those days, you can actually recreate the HP9845C’s 1980-vintage graphics glory using, of all things, a game emulator.

The Machine

The HP9845C with a Colorful Soft Key Display

Keep in mind that the IBM PC was nearly two years away at this point and, even then, wouldn’t hold a candle to the HP9845C. Like many machines of its era, it ran BASIC natively — in fact, it used special microcode to run BASIC programs relatively quickly on its 16-bit 5.7 MHz CPU. The 560 x 455 pixel graphics system had its own CPU and you could max it out with a decadent 1.5 MB of RAM. (But not, alas, for $40,000 which got you — I think –128K or so.)

The widespread use of the computer mouse was still in the future, so the HP had that wonderful light pen. Mass storage was also no problem — there was a 217 kB tape drive and while earlier models had a second drive and a thermal printer optional, these were included in the color “C” model. Like HP calculators, you could slot in different ROMs for different purposes. There were other options such as a digitizer and even floppy discs.

The machines had a brief life, being superseded quickly by better computers. However, the computer managed to play a key role in making the 1983 movie Wargames and the predecessor, the HP9845B appeared on screen in Raise the Titanic.

According to the HP Museum, the 9845C wasn’t terribly reliable. The tape drives are generally victims of age after 40+ years, but the power supplies and memory also have their share of issues. Luckily, we are going to simulate our HP9845C, so we won’t have to deal with any of those problems.

One other cool feature of just about every HP computer from that era was the soft key system. These were typically built into the monitor or, sometimes, the keyboard and lined up with labels on the screen. So instead of remembering that F2 is the search command (or whatever), there would be a little label on the screen over the button that said “Search.” Great stuff!

MAME

When you think about simulating an old computer, you probably think of SimH. However, the HP machines were very graphical in nature, so the author of the HP9845C emulator made a different choice: MAME. You normally think of MAME as a video game emulator. However, if you want color graphics, ROM slots, and a light pen, MAME is a pretty good choice.

As you can see, you get a view of the 9845C monitor replete with soft keys and, if you enable it, even a light pen. You can load different images as ROMs and tapes. The only tricky part is the keyboard. The HP has a custom keyboard that works a bit different than a PC keyboard.

In particular, the HP computers were typically screen-oriented. So the Enter key was usually distinct from the key that told the computer you were ready for it to process. This leads to some interesting keyboard mappings.

Quick Start Guide

In fact, the page that has the most information about the emulator is a little hard to wade through, so this might help. First, you want to scroll down to the bottom and get the prebuilt emulators for Linux or Windows. You can build with MAME or use the stock versions — assuming your stock version has all the right options. But it is easier to just grab the prebuilt and they can coexist with other versions of MAME; even if you want to go a different route eventually, you probably should still start there.

The emulator is called 45c and, on Linux, I had to make it executable myself (chmod +x). Here is a typical command line:


./45c -magt1 tapes/demo1.hti -magt2 tapes/demo2.hti -ramsize 192k '-rom1 advprog' '-rom5 colorgfx' '-rom3 massd' '-rom4 strucprog' &

All of those tape and ROM files are in the distribution archive. You probably don’t need any of the ROMs, but I loaded them anyway. Add -window if you prefer not to run full screen. If you do that, you may also want to add -nounevenstretch and -nomax options to improve appearance.

If you want to try the lightpen, use the -lightgun -lightgun_device_mouse option to turn your mouse into a lightpen. Note this will grab your mouse and you may need to use Alt+Tab or some other method to switch away from the emulator.

The keyboard mappings are listed on the web page but here are a few that are handy to know:

  • Enter – Continue
  • Right Shift+Enter – Store
  • Numeric Enter (or Right Shift+Enter) – Execute
  • Escape – Stop
  • Right Shift+Home – Clear screen

So faced with the prompt, you can enter something like:


5*10-8

Then press the numeric enter key to see the result. So this being a BASIC computer, you can enter:


10 PRINT "HOWDY!"

Right? Well, yes, but then you need to press store (Right Shift+Enter)

If you have the tapes loaded as above (you can view the tape catalog with the CAT command), try this:

load "autost"
run
High tech graphics for 1980

Remember to use the numeric pad enter key after each line, not the normal enter key!

The king of the demos is the Space Shuttle graphic which was cutting edge in 1980. You could change various display and plot options using the soft keys.

Resources

Of course, the Space Shuttle is only fun for so long. There are many other demos on the same tape, but eventually you’ll want to play with something more interesting. The HP Museum has a good bit of software you can probably figure out how to load. You can’t download the software, but if you want to see what the state of gaming was on a $70,000 HP9845B in those days, [Terry Burlison] has some recollections and screen shots. You’ll also find tons of documents and other information on the main HP9845 site.

It would be really interesting if the emulator could drive an HP-IB card in the PC or a PI to drive all your old boat anchor test equipment. That might even let you connect a hard drive. Maybe.

19 thoughts on “Your Own Engineering Workstation, With Mame

    1. The -a and -b models were rock solid. They made some engineering changes in the -c that didn’t stand up well over the very long term, because the graphics stuff for the color terminal and the increased power budget again for the color terminal.
      I used one of these quite a bit, and they were really cool. They weren’t the expensive HP desktop computers, though. The 500 series were extremely expensive even by modern standards, and I think the US Navy was about the only real customer for them. 32 bit machines in 1981.

      1. I’m going to heavily amend my statement. I just went and looked at a vintage HP manual. This is for the HP 9826/36A, the successor family to the 9825/35/45, and in the manual it says specifically “Average Failure Rate: the HP 9826A is expected to experience an average failure rate of 50% per year.”
        !!!!!!!!
        So our idea of the legendary durability of HP equipment may be less that they were in fact durable and more that their competitors were just *terrible*.

        With all this said, we have an HP semiconductor parameter analyzer, that is similar to a 9826A in a box with a whole bunch of controllable four quadrant power supplies, that has been running 24/7 for thirteen years that I’ve been working here, and was made in 1983.

  1. As a long-time (20 years) MAME contributor, something that might be worth pointing out in the article, or at least approving as a comment down here (since my comments always seem to end up hung up in moderation for hours or days):

    “-nounevenstretch -nomax” will ensure that you get pixel-perfect results, but that it will also display at exactly 1:1 *pixel* resolution on whatever system you’re using. Depending on the system, this can be (and often is) rather different from the display aspect ratio. For example, the humble Pac-Man board had its standard 4:3 monitor rotated sideways for an aspect ratio of 3:4. However, its pixel aspect ratio in that orientation was 7:9. Pac-Man used non-square pixels, and so some amount of scaling is necessary to show it at the intended aspect ratio.

    If you’re on either Linux or Windows, a good bet would be to use”-video bgfx -bgfx_screen_chains unfiltered”, which will give you a completely point-filtered, but maximized, window in whatever window manager you use for output. This assumes that you have a slightly capable GPU, but that’s pretty much a given since MAME’s rendering pipeline doesn’t ask for any features beyond what was there in 2005 or so, which is supporting non-power-of-two-dimensioned textures.

    I believe the above settings will work just fine on macOS as well, as long as you follow the compile steps, available here – https://docs.mamedev.org/initialsetup/compilingmame.html#apple-macos

    At any rate, it’s great to see MAME getting more coverage for its incorporation of MESS back in 2015 or so. The merger was not terribly painful on a technical level, given that both projects relied on the same core. However, something else which occurred at the same time – a move towards 3-Clause-BSD licensing – ended up providing a fantastic historical example of exactly how to handle relicensing a massively open-source project.

  2. I remember repeatedly looking at Tectonics graphics terminal marketing wistfully.
    Dreaming of the day I could afford a display like that. (IIRC they were 1024×1024 greenscale)

    Nerd pron, never did fap to it. Lacked commitment.

    1. And that merely was the base line mode of the Tektronix 4010 – 4014 models.
      The maximum was 4096×4096 pels, if I’m not mistaken.
      These terminals even surpass current CAD/CAM displays in terms of clarity and smoothness. It’s all vectors, not pixels.

  3. Ah! I wrote the 9845 emulator, nice to see it covered here. You might also want to check my hp9825 emulator, now featuring a realistic artwork (https://github.com/fulivi/mame_tools/tree/master/hp/hp9825t_artwork)
    Also, you wondered if these emulated machines could be connected to real-world HPIB equipments. MAME has the ability to interact with external HPIB through a module I wrote. Communication happens through a TCP socket and it uses a simple protocol. It shouldn’t be too difficult to write a bridge utility to connect to a real hpib bus..

  4. I was hoping the article would discuss the CAD software available. Then a discussion on how useful emulating CAD software from the 1980’s would be. Not surprised that the most useful software mentioned was recreating old games.

    I think an article on creating an inexpensive Engineering Workstation in 2022 complete with CAD, SW IDE’s, EE Simulation/Schematic Capture/PCB Layout, Image/Video/Sound Editing, Finite Element Analysis, … would be really great.

    1. One of the funny things about the -45C was that in order to keep the monitor/computer cooler during heavy CAD usage they turned down the screen intensity, so if you walked through the IC layout area, there were all these 45’s with IC designs on the screens and cardboard boxes taped around the monitors to cut out light from the sides so people could see the screens better. It had a very 1890’s photography vibe to it.

  5. The screen softkeys were really nice to use. Something this series didn’t have but the 98×6 series did that I also loved was a rotary encoder wheel on/beside the keyboard. You could spin it to very rapidly traverse the stuff on the screen, so it made text editing fast. The x6’s didn’t have the softkeys on the monitor, though. I wish they’d combined the two: a 9845C’s body with a 9836’s keyboard. Well, and ditch the 45’s tape cassettes. It was cool that it had dual drives but those cassettes weren’t great to begin with and are unobtainable now. There’s a functional project to replace the same tape drive with an SDcard for the HP 80 series, but I don’t know if it would work in the 98×5 systems.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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