Monday, March 21, 2016

Apple IIe RAM diagnosis

I have an old, un-enhanced Apple IIe that that would give me errors while trying to load disks, like: UNABLE TO LOAD PRODOS or NO BUFFERS AVAILABLE . Now that I know a lot more about the Apple IIe (and electronics in general) than when I put it in mothballs, I tried my hand at fixing the problem again.

I recently leaned that by holding down the closed (filled) apple, while turning on the un-enhanced Apple IIe, it will do a self diagnosis. Here were the results:
RAM: F13 F12 F11 F10 F9 F8 F7 F6
This indicates that every built-in RAM chip was bad. I didn't quite believe this could be true, so I tried replacing some of the ICs around the RAM... to no effect. So, I splurged on an ebay auction for a set of "MICRON MT4264-10 64K 100NS DRAM". I replaced all of the RAM chips, and my un-enhanced Apple IIe sprang to life for the first time in 25 years! As it turned out, only 2 of the RAM chips were bad, but they both failed in a way that would cause the self-diagnosis to report that all of the RAM was bad. Anyway, based on my machine having 2 chips that failed in the same way, I think it must be a relatively common problem.

Now all this thing needs is a "V" key and a replacement key switch. I think the V key is around here somewhere...

Monday, February 22, 2016

Apple II Development

I am pretty amazed at the current rate of development of new Apple ][ conveniences and devices. It is worthwhile to look up from a project to see what others are doing every once in a while.

VGA adapters for the Apple IIc and IIGS seem to be hot right now.

The Nishida Radio Disk II adapters are gaining more and more features, including a nice looking web interface!

Big Mess O' Wires had added Apple II support to the Floppy Emu Disk Emulator.

It's impressive to have a microcontroller with more power than the Apple II strapped on the back of it. Although it does feel like cheating sometimes...

I merely managed to find a switch that perfectly fits the Apple II keyboard encoder for enabling lowercase once the character ROM is updated. It is labeled "ONLEDA MTS-202" and is a knock-off of some old high-quality switch, I'm sure. Good ebay search terms : Right DPDT toggle switch. Just take note of how the pins are oriented to make sure you get the right ones. I'm putting mine away for a rainy day.

A new style of Apple II prototyping card popped up on ebay too. Had to buy one.

Saturday, February 13, 2016

USR-WIFI232 and ADTPro Continued...

I really wanted the standard ADTPro Ethernet connection to work properly so that I don't have to start the ADTPro Server from the command line. Unfortunately, that connection type adds a byte to the start of the ADT packet indicating the packet number. That seems appropriate for the UDP protocol that is used, but that one byte confuses the Apple II client enough that it immediately reports an error. Commenting-out the code that adds the packet number byte allowed me to get everything working, at the expense of out-of-order packets not getting re-ordered. Not a great solution, but it is more convenient now. Really, ADTPro Server just needs a decent interface for its SerialIP mode.

Full details on the ADTPro Support Forum.

I really like this USR-WIFI232 compared to an Apple II ethernet card. It is compatible with anything that uses the Apple SSC card, has a nice web interface for configuring it, and includes WiFi, at a little over 1/2 the price. Unfortunately, the user guide can be a bit hard to decipher.

Tuesday, February 9, 2016

USR-WIFI232 and ADTPro

Based on my testing, the USR-WIFI232 appears to work fairly well with ADTPro giving yet another option for disk transfers. However, you have to set ADTPro to use Virtual Serial over IP (localhost mode). Open the ADTPro.properties file that gets created (using a text editor, such as TextEdit) and enter the IP address and Port number of your USR-232-WIFI. Quit ADTPro, run it again, and it will connect! I set my USR-WIFI232 device to use the following UART setting from the web interface: 9600,8,None,1,Enable,Disable,Disable, and set complimentary settings on the Super Serial Card (<ctrl-a>14B). ADTPro seems to like 8 data bits, which prevents you from using the USR-WIFI232 AT commands.

I used the ADT Serial Pacing setting of "Pacing: 1000" to get a reliable connection for bootstrapping. I don't think the speed settings are tested with a TCP connection to a real Apple //e.

Once the bootstrapping is successful and ADTPro is running, it was necessary to change the UART settings of the USR-WIFI232 via the web interface to: 19200,8,None,1,Enable,Disable,Disable, as ADTPro only runs at higher speeds.

Uart Setting
Baudrate
Data Bits
Parity
Stop
CTSRTS
485 mode
Baudrate adaptive (RFC2117)

Set the CONFI(G) in ADTPro to 19200 Baud Rate as well. After that was completed, I was able to transfer directory data, and a disk with ADTPro on it!

If the bootstrapped ADTPro gives an error INSERT SYSTEM DISK AND RESTART -ERR -1 when you restart your USR-WIFI232 (due to the hardware handshake, I think), just hit <ctrl>-<reset>, then type 800G<enter> to restart ADTPro.

Monday, February 1, 2016

Final RC2016/01 Thoughts

After some testing, I figured out that the reason I have to run everything at 300 baud has more to do with the screen redraw and processing speed of the Apple //e than the serial card. It's interesting that the Apple SSC manual derisively mentions that "Some printers are slow and do not provide a printer busy, or handshake signal to the Apple II." It provides a setting to delay after a Carriage Return for the printer to move back across the page. This is very similar to what is happening to the Apple //e which loses the first few characters after a line feedscreen scroll. I am sure there is an address on the SSC that can temporarily lower CTS to tell the remote system to wait until the redraw is complete. Anyway, there is plenty of work for a future RetroChallenge. BTW, the server is back up and running again, as it was down for testing most of the day. If you can't access it try later, as I am probably using the Apple //e for something else!

In the mean time, I have a slow server and a new way to communicate with the Apple //e. I also have a nice color monitor, and I have a little more insight into Steve Jobs. Finally, I have a few more project ideas (KIM-//e, more Apple on the web stuff) for future retro challenges. RC2016/01 complete!

Sunday, January 31, 2016

Truly Wireless Now

In a quest to make my Apple //e truly wireless, I did some soldering this morning to create a cable to go directly from the Apple Super Serial Card to the USR-WIFI232. This allowed me to get rid of the bulky DB-25->DB-9 adapter, and a short DB-9 cable to go from the adapter to the USR-WIFI232 (see photos).  Then, I used double-stick tape to mount the USR-WIFI232 on top of the Apple //e power supply. The Apple //e already has a pop-out that fits the antenna and power supply cord fairly well. The result is an internal WIFI adapter! I suppose I could get the power for the adapter from the Apple power supply, but I'd rather not run the risk.

I really like this set-up as connecting to the Apple over serial cables always meant finding the right cables and adapters, or a null modem. They would inevitably get unplugged for another project or to move the computer.

There is a lot of potential for this configuration for transferring disk images with ADTPro. I have to use 300 baud for the Apple BASIC interpreter to keep up, but it looks like higher baud rates will work in the terminal mode of the SSC, or with a compiled program. Come to think of it, you could even have a web page on the Apple //e that accepted disk image uploads.

This is a simple, and inexpensive ($40 on ebay) alternative to some of the other Apple Ethernet products out there. Some people have done similar things with a Raspberry Pi, but, again, this is pretty much plug and play and includes WIFI.

Having made two web servers out of old Apples, I am finding that it would be a lot more interesting to make a web browser. That will probably be a future project.

Saturday, January 30, 2016

Apple //e Webserver Running!

I have my Apple //e BASIC web server running!... sort of. Try it out. Be gentle and patient, it's only 300 BAUD!: http://162.232.186.125:8899

Code after the break.. Update: minor change in code to allow OPTIONS method

Minor DOS Disaster

Last night, I was putting the final touches on my Applesoft BASIC HTTP parser to act as a webserver when I had a pretty big set-back. I was getting pretty good working in DOS 3.3 and saving my BASIC programs regularly. I previously saved a small BASIC program to initialize the settings on the Apple SSC to communicate with the USR-WIF232. That way, I could just run the program and all of the settings would be restored after a <ctrl>-<reset>. Unfortunately, I named it INITSSC. The DOS command to initialize a disk is INIT. (I'm sure you can see where this is going.) Anyway, instead of typing RUN INITSSC I mistakenly just typed INITSSC (following the UNIX convention), and as I was keying back to correct my mistake, I accidentally hit the <Enter> key. WHAMO! Disk grinding and spinning, no response from the keyboard... It took me a few minutes to figure out what had just happened. My disk was initialized with no DOS on it. So I lost my programs, and I can't even run DOS, and that was the only floppy I have available.

The good news is that I was experimenting with dumping out the BASIC listing of my web server program as part of my webpage. So, I have all but a few lines in my terminal program's buffer. I just have to copy and paste it back to the Apple IIe and work around not having a usable disk.

Wednesday, January 27, 2016

More WIFI Details...

So, this USR-WIFI232 runs a TCP/IP server on port 8899. That allows me to telnet to the IP address and just start typing as if I were at the computer: ]LIST LIST 10 PRINT "hello" 20 PRINT "writing this from the internet" ]RUN RUN hello writing this from the internet ]

I just need to figure out how to open up my router to let the world in! ... And write a web server in BASIC...

WIFI enabled!

I took the day off from work, so I had a chance to get some real RetroChallenge work done!

It took a while to figure out that the USR-WIFI232 needs a null modem adapter to connect to a normal computer (but not to the Apple IIe in Terminal mode). I did not see that documented anywhere. Once I figured that out, I played around with the converter on my MacBook and my good ol' Macintosh G3. Some well-hidden tips:

  1. Use a null modem to connect
  2. type +++ to set the terminal mode. the module will respond with a
  3. type a and the module responds with +ok
  4. type AT+H for a list of commands.

I have struggled for a while to get my Apple IIe to connect to anything but my Macintosh G3, running ZTerm. This problem was apparent when I was unable to communicate between my Apple IIe and the USR-WIFI232 device. Oddly, I noticed that anything I typed was being echoed by the USR-WIFI232, but it would not respond to the Apple IIe. In fact, I was able to connect my Apple IIe, the G3 and the USR-WIFI232, at the same time, and view a complete transaction between the G3 and the USR-WIFI232 from the Apple IIe, but it would still not communicate with the USR-WIFI232!

I played around with the settings and discovered that the problem is that the (just mine?) Apple IIe Super Serial Card (SSC) does not seem to communicate correctly in the 8 Data, 1 Stop, 0 Parity mode. I had enabled the "No Extended Characters (strip hi bit)" setting in ZTerm which fixed the problem, but only for ZTerm. I think the Apple IIe was sending data with the high-bit enabled, which being echoed by the USR-WIFI232, then the Apple IIe would strip the high-bit making it look OK, even though the characters were junk.

Anyway, 7 Data, 1 Stop, 0 Parity mode works correctly. So, to enable this setting on the Apple IIe, enter <ctrl-A> and then at the APPLE SSC: prompt, enter: 1D . For the USR-WIFI232, enter: AT+UART=9600,7,1,None,NFC, then AT+Z. Once I did that, I was able to send and receive commands between the Apple IIe and the USR-WIFI232! I am losing a little bit of data from the USR-WIFI232 at speeds greater than 300 Baud though.

Using the Terminal mode of the SSC, I could send various AT commands to the USR-WIFI232, but I couldn't really do much with it other than PING or scan for WIFI networks. Then, I discovered the built-in web socket webpage. This allowed me to send data through the webpage to the Apple IIe! When I exited the SSC terminal mode, I could send commands to AppleSoft BASIC, and I even ran a little program.