APPLE-1 KEYBOARD EMULATOR CABLE PLANS

6 posts / 0 new
Last post
Offline
Last seen: 1 day 3 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 222
APPLE-1 KEYBOARD EMULATOR CABLE PLANS

 

 

Dear Apple-1 builders:

 

Bringing up many Apple-1 builds in the past eight months, I found it helpful to have a keyboard emulator cable in lieu of a real keyboard. The emulator may have an auto-typing feature so you don't need to type in the same diagnostics programs again and again and again. 

 

I finally have found the time to put together instructions / plans on how to make such a keyboard emulator cable. I have built two based on these plans to a) snap photos and b) prove the plan has no bugs.

 

This is the keyboard emulator cable in action:

 

 

Here is the downside: I'm an old retired guy and I use old and ancient retired hardware and software. The plans come with the keyboard emulator software source code but it compiles under Microsoft C7.00 and runs under DOS. You also need a notebook computer (or a laptop) or similar of no later than 1990s vintage, because you need a standard DB-25 printer port into which the emulator cable plugs in. I have no doubt that some smart people lurking here on this forum could take these informations and make versions that run under Linux or even on the Raspberry Pi, which would be great. 

If you do so, please post the results here in this thread.

And, all the attached stuff is placed in the public domain, so you can do with it as you wish !

 

 

Offline
Last seen: 12 hours 35 min ago
Joined: Dec 17 2020 - 09:16
Posts: 10
Hi UncleBernie. I just found

Hi UncleBernie. I just found this in the older threads of this nice forum. That's really great! Thanks for sharing. I will definitely try this out at some point once my replica is working stable.

Is there a limit on the amount of text automatically typing in? Can this software maybe being used like a macro, i.e. for entering multiple commands for simulating the operation of the Apple-1? If so I can imagine to use this kind of setup for displaying an Apple-1 "in action" in a museum or on an auction...

Or just for fun on my next party with friends... ;-)

Offline
Last seen: 1 month 2 weeks ago
Joined: Jan 30 2021 - 11:55
Posts: 23
Indeed this is a great

Indeed this is a great project! I will try it for sure, when i done with my replica build.

 

Thank you!

Offline
Last seen: 1 day 3 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 222
About the Auto-Typing feature ...

... it is not limited. If you press F3 on the notebook (or whatever), you get a prompt and then you can enter a filename.

This file then is opened and "auto - typed" into the Apple-1. The speed adjustment must be done such that the Apple-1 does not lose characters (the Apple-1 screen output rate is only 16.6ms per character, and the Wozmon may want to output more than one character for each keystroke).  Speed adjustment is quite simple, it's one constant in the source code.

The software could be easily expanded to include macros. And, of course, it could type anything you want, if you change the code accordingly, which is easy, because it's C. You could make it auto-type anything you want. I still use it for both machine language and BASIC programs (and for auto-typing the BASIC interpreter into the machine).

Museums could use this technique to keep the Apple-1 busy so people could see how BASIC programs are entered and run etc.

But then, I think, you might want to add a sort of "Wait" character into the code, which just waits for a while (i.e. 0.5 second).

The Apple-1 keyboard does not have all ASCII characters, so any of the unsupported ones could be used to trigger a wait period, where no characters are auto-typed to the Apple-1, so it can catch up, i.e. when you run BASIC games, you need to wait until the slow BASIC is ready to ask for the next user input. All this is not very difficult, because real humans typing would also ponder a while before they make a move and hit a key. So just throw in some of these "WAIT" characters and you could even mimic irregular typing rhythm of real humans.

That would be fun !

If there would be more feedback on this thread, I possibly would write a Linux version of this program. It is easy to do but the direct hardware access needs a few added lines of code and then proper setup of the binary (it must run with root permissions).

I can do that but I think it may be a bit beyond the skill level of Linux newbies. This is why I posted the more primitive and user friendly DOS version first. The beauty of DOS (as primitive as it is) is that you can access hardware ports without much effort to get permissions from the OS. In DOS, there are no such permissions needed and anything goes.

 

 

 

Offline
Last seen: 15 hours 43 min ago
Joined: Sep 27 2021 - 06:36
Posts: 6
Turbo-feature

@UncleBernie In another thread you mentioned that you added  a "Turbo" feature for the auto-type function... Is this feature included in the source and executable linked above?

Offline
Last seen: 1 day 3 hours ago
Joined: Apr 1 2020 - 16:46
Posts: 222
About the 'turbo-type' feature of my keyboard emulator:

In post #5, Crud3 wrote:

 

"@UncleBernie In another thread you mentioned that you added  a "Turbo" feature for the auto-type function... Is this feature included in the source and executable linked above?"

 

Uncle Bernie answers: 

 

No, sorry, I've never updated the downloads on this thread. But you can have the source code, of course. Just send me  a PM.

 

Here is some more info on how this 'auto-typing' and 'turbo-typing' works:

 

Both methods just generate automatic keystrokes to the Apple-1, and the data is coming out of a normal text file stored on the host system, character by character.

 

There is only one caveat: you may need to adjust the speed of the auto-typing slow enough so it does not overrun the Apple-1's capability to accept the keystrokes. I once had plans to provide the (open source) software with some control character sequences to set the speed (i.e. \s<number>) or do do a wait (i.e. \w<number>). But it seems nobody used this keyboard emulator it so why should I do this extra work ? For my own use I don't need these additions. It was in discussion for a while because a small private computer museum in Germany contemplated to show a "running" Apple-1 and then they  could have used the autotyping to demonstrate the Wozmon, load games, let the computer 'play' the game, etc.  This is much better, I think, than having a keyboard the visitor can type on by himself. Because this will not get him anywhere and most will walk away frustrated in disgust, which would leave a false impression on the Apple-1.  So some "automatic demo" looked like a great idea.

 

What I have added since the posted version is automatic calibration of the timing loops to the particular  host system (still DOS) and a "turbo" mode that loads kilobytes in mere seconds. This is again based on auto-type files which however issue WozMon commands to initialize the stack, load the ''turbo-type" loader, start this 'turbo' loader and then pump in the data at blazing speed (in this case only limited by the screen output speed on the host system as it runs a protocol there).

 

I have a tool running under Linux which turns 6502 binary files into such 'turbo' load files, fully automatic, and it includes a CRC checksummer so you know that the load was correct ... normally it will auto start but if the CRC was wrong, it won't and just return to the Wozmon.

 

In terms of effective bytes/sec this 'turbo-type' system is faster than my floppy disk controller which is as fast as the Disk-II !

 

I have lots and lots of such goodies but since my RQLT always is at a premium, I only have finished them just to the point that I can use them myself and they do what I want them to do for me. So there is no documentation, and the user interface is terribly primitive, and there are no user friendly features of any kind. Also, I've never figured out how I could replace obsolete download files on top of these Applefritter threads with updated versions. 

 

If you still are interested, shoot me a personal message on my builder's gmail account and I will send you the newest source code and the exe for DOS. I still use the C7.00 compiler I bought around Y1990. It's one of the few Microsoft products that not a POS. Alone the thousands of pages of handbooks it came with are absolutely awesome. Allegedly, Microsoft used this compiler to develop the Windows OS of that time. It's a great compiler that never failed me, unlike many others that were around at the time. I remember one issue with heap management so I had to write my own library to replace their malloc() and free() but otherwise there were no problems I ran into. It is a robust compiler.

 

I typically write my C code such that it will work with DOS and with Linux but in this case there is no Linux version yet. It is a bit tricky to do bit-banging on the parallel printer port using Linux. On older versions you had to put your functions into the kernel and do a kernel compile run (hours), load, crash, rinse and repeat. Allegedly nowadays you can do this with a user program BUT you need to use the suid flag to run the executable in superuser mode. Not exactly safe ! At the moment I have no machine running Linux which still has a parallel printer port. A few months ago the hard disk died on that Y2000 vintage tower and this took the 2002 vintage Linux with it, and none of the newer versions I tried would want to run on this old hardware. It's an AMD Athlon based machine and somehow they must have lost the skills to make code that works for that, I think. The irony is that almost  all the various Linuxes I tried to install  (some hang during installation) appear to properly understand the machine's configuration, do a install, can be booted from the installation, and they almost work, but never good enough to compile a simple "Hello, Word !". Some people call this technical progress.  I call it 'Idiocracy'. It seems that nowadays, getting Linux to run on any legacy machine (and even on some modern machines) is a total hit-and-miss exercise. Sometimes it installs fine and works, no complaints, but if it does not work, it is so frustrating and such a bad time thief that it ain't "free software" in the sense of "free" = cheap, and if this trend continues, then Linux will be utterly useless soon, on any machine. Which is sad because people will then turn back to proprietary operating systems made by greedy corporations, which are not open sourced, and spy on you, and send everything you type (your work) to the corporation, which is theft of IP, and maybe to the Gestapo, too, and all this is great evil in general we better should avoid.

Log in or register to post comments