Keyboard latency

January 29th, 2018 10:15 AM
by
Filed under Hacks & mods;
Comments Off on Keyboard latency

Having just started working at Automattic, I’m anticipating a future where I’ll spend even more time than ever sitting at a keyboard. Computers have been where I’ve spent most of my career, but they’ve always been interrupted by presentations, meetings, and the like. With even those now being done at a keyboard, I’m investigating ways to improve efficiency, such as switching to a DVORAK or Colemak layout.

Blogger and programmer Dan Luu recently identified another potential area of keyboard efficiency: latency. Regardless of the keyboard’s layout, the actual time between keypress and result can also vary among brands and models — and even eras.

Turns out keyboard latency is one area in which our Apple II computer excels. Writes Luu: “… computers from the 70s and 80s commonly have keypress-to-screen-update latencies in the 30ms to 50ms range out of the box, whereas modern computers are often in the 100ms to 200ms range when you press a key in a terminal.”

The author elaborates that modern keyboards themselves often have more, faster circuitry than an entire computer from the 1977 — yet, perhaps due to that simplicity, older keyboards are still faster:

consider that an Apple 2 has 3500 transistors running at 1MHz and an Atmel employee estimates that the core used in a number of high-end keyboards today has 80k transistors running at 16MHz. That’s 20x the transistors running at 16x the clock speed – keyboards are often more powerful than entire computers from the 70s and 80s! And yet, the median keyboard today adds as much latency as the entire end-to-end pipeline as a fast machine from the 70s.

Naturally, that led me to thinking that the best way to reduce my latency would be to replace my laptop’s inbuilt keyboard, or even its external USB or Bluetooth keyboard, with an Apple II keyboard — a connection made possible by Charles Mangin of Retroconnector’s keyboard shield. But, suspecting more steps between the keyboard and the computer would negate any improvement, I reached out to Charles for additional insight. He confirmed:

It would definitely add to the latency. The processor in the Arduino is running at 16mhz, and takes several cycles to register each switch state change. That is translated to the proper keypress, then it has to send that result as a USB signal, which takes more time. At best, it would be equivalent to a normal USB keyboard, but likely slower due to the Arduino overhead.

Alas, while the Apple II remains king of keyboard latency, that benefit is firmly tied to its classic architecture.

… The answer: replace my entire Automattic machine with an Apple II!

(Hat tip to mmphosis!)

An Arduino keyboard for the Apple II

November 20th, 2017 7:50 AM
by
Filed under Hacks & mods;
2 comments.

My first computer was an Apple IIe that my father purchased to help manage the family business. Given the wealth of games that were also available for the Apple II, it was inevitable that its use spread to his four sons. All was going well until one of us reached for a box of floppies on the shelf above the computer and dropped it on the keyboard, busting a keycap. My father angrily decreed his expensive business computer was henceforth off-limits to us kids — a restriction that I don’t recall lasting more than a week.

With the exception of that mishap, our keyboard always performed admirably, without failures or flaws. I don’t recall the Apple IIe showing any other signs of wear, tear, or distress in the five years we owned it.

The same can’t be said for Max Breedon, who recently unearthed his Epson AP-200 an Apple IIe clone he acquired from a pawn shop twenty years ago. The keyboard decoder chip, a C35224E, was non-functional — but that didn’t stop Breedon. After consulting Mike Willegal’s keyboard page and doing some testing of his own, Breedon put an Arduino on a daughterboard that connects the keyboard to the motherboard. His solution is actually better than the original, since it speeds data entry of program listings found on the Internet — something the clone’s manufacturers never anticipated:

[T]he Arduino can not only decode the keyboard but also you can upload text directly into the Apple as if you typed it in. This is achieved through serial communication from your PC to the Arduino: the Arduino is listening for serial data and any that it receives it converts into keypresses and pipes it into the Apple. This means that you can cut and paste basic programs directly off the internet and upload them into the apple as if you typed it in on the actual keyboard!

Arduino keyboard

That’s a neat trick! I’ve never used an Arduino, so I wouldn’t be able to duplicate this functionality — but it could be the underpinnings for a product I’d purchase for an official Apple II. There’s more technical information on Breedon’s website, should anyone else wish to investigate or re-create his work.

(Hat tip to John Baichtal)

Kickstarter brainstorming at KansasFest

July 23rd, 2012 9:54 AM
by
Filed under Happenings, Musings;
7 comments.

On Saturday, July 21, I gave a presentation at KansasFest 2012 about Kickstarter. I reviewed what the crowdfunding site is and how it works before presenting and analyzing examples of various campaigns. After reviewing successful projects (Double Fine, Leisure Suit Larry, Diaspora, TikTok, Pebble) and some unsuccessful or poorly designed ones (Rolling High, What’s Where in the Apple, MULE), I identified three qualities that lend themselves to meeting one’s crowdfunding goal: the fame, reputation, or track record of the artist (Jason Scott, Penny Arcade, Andrew Plotkin); a convincing pitch video (Huck Finn, Nataly Dawn) that doesn’t necessarily need to be expensive to produce; and attractive rewards (Pebble; Joulies).

Kickstarter logo

Due to both the previous session and my own running long, after we watched Kickstarter pitch videos and dissected their strengths and weaknesses, I didn’t have as much time as I’d like for my presentation’s interactive component: brainstorming Apple II projects to launch on Kickstarter. I started by asking the audience what products we’d like to see that would require a financial investment, then who in the community has the reputation to attract a funding audience, followed by what the reward levels for such a Kickstarter campaign would be. As with all brainstorming sessions, I wrote down every idea regardless of feasibility. We then conducted an informal poll to narrow the choices to those bolded in the below table.

ProjectsSponsorsRewardsDonation level
VGA cardKen GagneContributor credit on Web site$10
Bluetooth / Wi-Fi cardVince BrielAccess to contributor-only blog$25
Accelerator cardRich DreherUSB adapter$50
Ethernet cardTony DiazUSB adapter & name in manual$75
Magazine PDF archiveJames LittlejohnTwo USB adapters$90
Buy rights and inventory from ReactiveMicroWozLimited-edition model$150
System 7.0Apple II t-shirt$250
USB input device adapter10 adapters$450
Buy the copyright to somethingSilkscreen greet on the board$500
Spectrum Internet Suite (SIS) updateLunch with the designer$1000
Full-color Juiced.GS
Ad-free RCR
Open Apple merchandise
Retrocomputing video podcast
Mark Twain clone
KansasFest scholarship
Open-source programming language
Woz action figure (with 9 points of articulation)
KansasFest FOREVER

Note that the first two columns do not line up with each other or the other two columns, but the third and fourth columns line up with each other. Also, some reward levels (access to contributor-only blog) include the previous rewards, whereas others (two USB keyboard adapters) do not.

Of all the bolded projects, we deemed the USB adapter the most affordable and thus the most likely to be funded. The proposed adapter would not only work with keyboards, joysticks, and mice, but it would adapt them to multiple platforms: Apple II, Commodore 64, and more. As the Battle Chess Kickstarter campaign demonstrated, limiting your product to only one audience (in that case, Windows) diminishes your chances of getting funded: more potential customers equals more money, as evidenced by the success of many old franchises that are being revived for Windows, Mac, Linux, iOS, and Android.

A wide audience requires a creator with exposure and recognition beyond the Apple II community, for which reason I nominate Vince Briel. The inventory of Briel Computers, from the Replica 1 to the Micro-KIM to the ALTAIR 8800micro, appeal to retrocomputing hobbyists of many ages and interests, and Briel’s track record as a businessman, from shipping products to offering customer support, is unparalleled. Briel has the reputation that could get a Kickstarter project funded.

Briel was in the audience for this brainstorming session but did not actually drive this proposal. But if he were to accept it, I would be first in line to give him my money.

For more advice on how to run a successful Kickstarter campaign, check out Nelson De Witt’s A Kickstarter’s Guide free e-book and Tyler York’s "How to succeed on Kickstarter" blog post.

UPDATE (Oct 21, 2015):: Courtesy Kay Savetz, here is a video of my KansasFest session.

Keyboard navigation in a GUI world

August 4th, 2011 3:38 PM
by
Filed under Hacks & mods;
4 comments.

Computers have come a long way since the Apple II, with important improvements to both hardware and software. But along the way, a few valuable computing aspects were lost.

A recent ITworld.com story looks at features that lost the evolutionary war: "… there are some things they don’t do that the old, slow, often command-line-intead-of-GUI-oriented applications did." The first page of the story focuses on the losses associated with the transition from a command-line interface (CLI) to a graphical user interface (GUI). One consultant laments the loss of programmable function keys and other shortcuts that extended keyboards once offered. These features were never available to the Apple II user, but I can commiserate with the need for shortcuts that don’t require a pointing device.

My first six years as a Macintosh predominantly took the form of a laptop (a PowerBook 1400cs) with an external trackball (an ADB Kensington TurboMouse). That trackball had four buttons that could be programmed for a variety of custom functions, such as right-clicking or switching applications. My right hand rarely strayed from that device, as it was impossible to use Mac OS Classic without it.

After switching to Mac OS X on December 7, 2003, I began to rely less and less. I found this reinvention of the Macintosh operating system featured keyboard-based shortcuts that I’d previously used the TurboMouse for. Now, I could switch windows, applications, and more while keeping my hands on the keyboard. In this way, OS X is actually a bit more similar to the Apple II with which I grew up. Navigating Microsoft Word will never be as intuitive or efficient as using AppleWorks, but it’s a bit closer.

With all my Macs having always been portable, it’s important for such power to be inbuilt, though I imagine those with desktop computers might enjoy the options such a stable position brings. For example, Andrew Plotkin, in an interview with The Setup (the same site that previously interviewed Bert Kersey), recommended the Matias Tactile Pro 3 keyboard, saying, "If your typing doesn’t sound like a hailstorm on a tin roof, you’re not typing." (This is despite the keyboard being connected to a MacBook Pro; says Plotkin, "I essentially never move it — I’m not a laptop person at heart.")

As a former or current Apple II user, by what input device or method do you prefer to navigate your modern computer? Is there particular hardware you favor or recommend?

A USB keyboard for the Apple II? Not quite…

June 9th, 2011 11:08 AM
by
Filed under Hacks & mods;
1 comment.

There have been many attempts over the years to bring the USB interface to the Apple II. Most, such as the iDisk and even Vince Briel’s upcoming A2MP3 card, focus on the storage possibilities of the interface. But what about the variety of other peripherals modern computers have access to via USB? Even something as basic as a keyboard has eluded Apple II users.

Ironically, Andrew Filer’s approach goes in the completely opposite direction, turning the Apple II into a USB peripheral. His hack turns the Apple II Plus into a keyboard for a MacBook Pro. This hack is made possible by Keyduino, an application of the open-source electronics prototyping platform Arduino.

Apple II Plus as a USB keyboardAn Apple II Plus as a USB keyboard? Sacrilege!

Filer says it was “surprisingly easy”, but his brief blog post on the subject addresses few of the technical concerns he must’ve addressed to accomplish this feat. For example, KansasFest alumnus Rob, who first pointed me to this hack, asks, "How does he handle shift keys? Does he properly implement the game port shift key modifier?"

Regardless, it’s neat to see the variety of modern uses that are still to be found in classic hardware — even (or especially) if it’s not what we expected.

(Hat tip to Brian Benchoff)