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.

Monday, January 25, 2016

Kim-IIe Requirement list

Notes for requirements for Kim-IIe card... (AIIe = Apple IIe). I am making updates to this as I think things out...
RequirementStrategyImplementation
Soft switch to enable KIM card Use AIIe /DEVSEL line to enable access to a set of soft switches at AIIe $C0nx. (n =slot+$10) Either a
  • 74ls74 flip flop (1 switch)
  • 74ls259 addressable latch (8 switch)
  • 74ls75 4-bit latch (4 switch)
Enabling the card replaces AIIe $0000-$1FFF with KIM Use U7 decoder to bring AIIE /INH line low when soft switch enabled Maybe a diode on /INH connected to U7 pin 0
FeatureStrategyImplementation
Make KIM Page 23 (MOS 6532) available to AIIe $Cnxx AIIe /IOSEL low enables KIM $1nxx, (without enabling /INH).
i.e: one of Kim Page 17-23 (in K4-K5) depending on the AIIe slot
Eg: card in slot 7 makes $17xx (page 23) available at AIIe $C7xx.
  1. /IOSEL activates U7 (pin 12?)
  2. XNOR A12 and U7/Q6 (otherwise, we would decode Kim $07xx)
  3. Jumper connecting U7 pin 7 (Q6) to (diode?) KIM DECEN
  4. Diode to prevent /INH from pulling low?
Decode $Cxxx-$Dxxx using a 74LS145 connected to Y6 on the main address decoder enabled by /IOSEL.
Connect outputs 0-3 to K4-K7, 4-7 to K0-K3 to make $11xx accessible at $C1xx
Make KIM K4-K5 available at $C800-$CFFF when appropriate. AIIe /IOSEL with /IOSTROBE is stored and enables KIM $1000-$17FF, mapped to $C800-$CFFF (without enabling /INH?).
CFFF RESETs /IOSTROBE store.
  1. /IOSTROBE with /IOSEL active sets 74ls74 flip-flop.
  2. Jumper connecting U7 pin 7 (Q6) to KIM DECEN.
  3. output of flip-flop activates 74LS145 added above.
  4. Another address decoder or 74LS133 resets flip-flop when CFFF is on the Address bus.
  5. UGH, too much stuff...
KIM access to soft switches Hmmm... Hmmm...

Saturday, January 23, 2016

Apple IIe Kim-1 Simulator?

Feeling moved by some of the KIM-1 RetroChallenge entries, I had a thought last weekend: could I design an Apple IIe expansion card that acted as a KIM-1 simulator? The card could contain the address decoding circuitry, KIM-1 ROMs, I/O, and some RAM. Then, the keys could be from the Apple IIe, or maybe an external keypad. The Apple IIe would supply most of the RAM and the 6502 processor (of course). Utilizing the Apple IIe's INHIBIT (/INH) circuit would allow me to disable the IIe RAM and ROM and supply my own from the KIM-1, with out any address conflicts. The idea is so simple, I am surprised it hasn't been tried before. Researching the idea, I came across some schematics for building a modern KIM-1:

After spending some time researching the various ICs and circuits, I noticed an error in the 6502.org schematic. There is no decoder chip to select which of the 6532 RIOT chips is active.

Upon further research, I found Zimmers.net FTP site, with an identical schematic but with a 74LS138 IC in position U9 However, upon further research on the 6532 RIOT there is still a problem. The 74LS138 decoder does not appear to create the appropriate signals to select the correct RIOT's onboard RAM, according to the 6532 RIOT datasheet and KIM-1 memory map (see end of full post for details). I searched around, and found a schematic for the Micro-Kim which corrects the problem with several NAND gates.

I wondered, 'Why decode the address lines just to NAND them back together in various ways'? I made chart of all of the addresses and the bit logic to encode them and I am fairly confident that the 6532 RIOTs can be properly addressed by:

  • using A6 and a new /A6 as the chip selects
  • inverting A7 to make a new /A7 as the RAM select
  • using K5 as the other chip select
  • using A8 as the high bit of the RAM Address (A6) so that we can address all of the RAM on both RIOTs

As a result, we get 2 RIOTs and 256K of addressable RAM with the same basic memory map of the KIM-1. We need a single 74LS04 IC to invert a few of the address signals (which we already need to invert A4, according to the above schematics), and there is no need for the 74LS138 decoder or the 74LS00 NAND IC used in the Micro-Kim.

I created a spreadsheet to list all of the address values and visualize the signals I need.

Friday, January 22, 2016

Watched Steve Jobs (movie)

I watched Steve Jobs, the movie tonight. It was pretty good. It focused on 3 big product launches, with everyone coming to Steve Jobs to wish him luck, reminisce, etc. It portrayed Steve Job's growth as a visionary / CEO (and human being) through large leaps in time, which made the changes all the more pronounced. The acting was quite good, especially from Kate Winslet (who I didn't even recognize at first). Seth Rogan made a more likable Steve Wozniak than the actor in Jobs. The exploration of Steve Job's relationship with John Sculley was much more interesting than the portrayal in Jobs too.

The acting really carried this movie. Not much focus on Apple technology or period settings. This movie could easily be a live play with its very few scene changes, focus on the actors, and 3 act structure. Anyway, not a movie for tech junkies, but very well acted and directed.

Thursday, January 21, 2016

Color Monitor!

I thought I would need to buy a monitor for the Apple IIe, but instead I just re-purposed my daughter's old TV. Finally, games in color, instead of a tiny green-screen! Original Mario Bros, here I come!

Friday, January 8, 2016

Watched Jobs (movie)

For my first RetroChallenge task, I found the movie "Jobs" on Netflix tonight, so rather than be productive, I watched all of it.

Ashton Kutcher was decent. Other than the original Apple, there was not much screen time for Apple technology. The period cars are great - 70's Volvos, Mercedes, Pintos, Camaros, Corvettes, Triumph TR-7.

It was interesting to see the portrayal of Steve Jobs' perfectionism and how unique his personality was in the computer industry. I was surprised at the cold portrayal of relationships between Jobs and Steve Wozniak and Jobs and CEO John Sculley. I think the general tone seemed to portray Jobs as a victim of getting his company stolen from him. Steve Jobs definitely seemed to mellow with age from poor team manager to brilliant CEO.

Not a great movie, but not bad. Worth watching for free on Netflix.

Wednesday, January 6, 2016

RetroChallenge 2016/01 Attempt

So, RetroChallenge 2015/07 was a total flop for me. All I managed to do was go to the beauty shop to find hydrogen peroxide for Retr0brite. I couldn't find what I needed and pretty much gave up on everything. But, January has always been a better month for me to do this. Just a few, very practical goals:

  • Get a color monitor for my Apple IIe
  • Watch and review Steve Jobs, and Jobs
  • Try again to hook up an RS232 WIFI device to an old Macintosh, or maybe the Apple IIe