Saturday, December 27, 2014

Pre RetroChallenge Spending Spree

Macintosh Floppy Emu
Hakko FX888D
Original AirPort Card
To satiate my excitement for the upcoming RetroChallenge, I have resorted to buying stuff for my computers. The idea of my 400k floppy disk drive grinding away every time the web server had a hit concerned me, so I reserved a Macintosh Floppy Emu floppy and hard disk drive emulator for vintage Macs. A new batch is expected mid January.

While browsing around that website, I noticed a review for a Bus Pirate interface. I remember seeing these on hackaday a while ago, but I didn't realize you could buy them on ebay now. So, I got one.

Since I need to do some soldering on the original Macintosh, I decided that the dollar store soldering iron wasn't good enough, so I splurged on a Hakko FX888D-23BY Digital Soldering Station.

I bought a $3 Airport card for my G4, just for the heck of it.

Because my Inside Macintosh book made for some interesting reading, I bought the Apple publication Designing Cards and Drivers for the Macintosh Family.

RetroChallenge, please come quickly before I spend all of my Christmas money!

Sunday, December 21, 2014

Retro Prep Problems

Macintosh analog board connection cable
The analog board connection cable.

Macintosh analog board connector solder joint
The top and bottom large solder joints are suspect.
I had some free time this weekend to make sure all the retro Macs were working before the start of Retrochallenge 2015/01. The G4 booted up as expected (I use it semi-regularly). The SE booted up as expected (it has proven very reliable). The original Macintosh booted up, but there was no video. I could tell it was limited to a video problem because clicking the mouse around would cause some disk activity.

I opened the computer up to investigate, but I didn't see anything obvious. I started it up while open (DANGER!) and noticed that slight pressure on the analog board connection cable would cause the video to come back temporarily.

I looked closer and noticed a questionable solder joint which seems to correspond to video out, according to this Macintosh Schematic (J7, pin 1, VIDOUT).

I'm not sure I will have time to fix it before January, but it looks like it might be an easy fix.

Tuesday, December 16, 2014

RetroChallenge preparation

I recovered from the hard drive crash pretty well. I was able to make a disk image of the slowly dying drive, which I restored onto a newer drive. Fortunately, it retained all of my licensing information for the Adobe Creative Suite I have installed. I don't think the Adobe CS2 registration servers work anymore, so that would have been a real pain.

The Dual processor PowerMac G4 with Mac OS X Tiger is a real joy to work on, even though it is now 15 years old. The user interface is far more appealing than OS X Yosemite, and compiling programs proved quite snappy. The Mac OS 9 compatibility mode is nearly flawless. Plus, parts are dirt cheap for the old G3 and G4 towers.

On that note, I just received a new (to me) Belkin F5U220 USB 2.0 card to replace the old USB 1.0 card which temporarily replaced the OrangeMicro USB Firewire card that would crash on wake with the G4. It works great, and only $10.

No more excuses to not backup my drives!

Monday, December 15, 2014

Early Christmas gift: Fire in the Valley

Early christmas gift from a thrift-shopper friend. First edition!

Monday, December 8, 2014

Hard Drive crash!

I have already had a major setback for the RetroChallenge. While getting things organized, my hard drive started clicking and slowing down. Unfortunately, I backed up the wrong drive. By the time I figured out which drive was making the noise, it was too late to backup.
I ended up putting it in the freezer for a while and had a few error free minutes to get the most important stuff off. After tightening up the screws on the top and sending it in and out of the freezer, it seems to have shaped up considerably though, but it is running very slowly. I am now backing up the entire disk which, by the progress indicator, will take several days. So, at least there is some hope.

Tuesday, December 2, 2014

Retrochallenge 2015/01 Entry

Retrochallenge is back!
I seem to be able to get more done during the Winter Warm up than the Summer Challenge, so I am feeling ambitious. I still want to get a web server working on my Mac 128K, so that is my primary goal.  I have renewed my interest in working on my 1991 Nissan, and interfacing with the ECU using the Nissan CONSULT protocol.  It is a JECS microprocessor which is either a Motorola 6802 or Hitachi 6303 equivalent. It isn't the typical retro computer, but it seems to qualify.

Thursday, July 31, 2014

Slow End

Between work, vacation, having my car stolen, recovering it myself (long story) and working on my new (to me) car, I haven't done anything on my RetroChallenge entry. Total retro Macintosh failure.

I did spend some time working on the car I bought, specifically the computer and sensor system. It is 1990 Infiniti Q45, so its computer system technically qualifies as retro, I guess. The previous owner had put a piece of black tape over the diagnostic information display to hide the "STOP LAMP INOPERATIVE" error. Unfortunately, that was one of the most minor abuses that he put this car through. Anyway, a few minutes of soldering on the stop lamp sensor to fix some damaged solder joints, and I was greeted with "OK"!

It actually took less time to fix the sensor than to open up the dash and get the black tape off!

So that's it. I compiled the new lwip code, made an application, but never tested it, and made my old car computer say "OK".

Sunday, July 6, 2014

Slow Start

Between 4th of July, World Cup, and the British Grand Prix, I haven't spent much time on my RetroChallenge project. I spent way more time reading about other people's projects than working on my own! I did manage to compile the latest lwip sources and the lwip httpserver into an application, but I haven't tested it yet. The MPW build option to use unix #include paths worked perfectly.  I wish I had know about it last time around, as it would have saved me some time.
SetDirectory "{MPW}Maclwip2:lwip-contrib-ppp-new:ports:mac:"; BuildProgram ElWhip # 2:50:02 PM ----- Build of ElWhip. # 2:50:02 PM ----- Analyzing dependencies. # 2:50:02 PM ----- Executing build commands.   SC [...]   Link -o ElWhip [...] ## Link: Warning: File was not needed for link: (Error 52) :::apps:httpserver_raw:fsdata.c.t.o   Rez -rd -o ElWhip ElWhip.r -append   DeRez "Mac OS 9:MPW:Libraries:Libraries:SERD" -only SERD   Rez -o ElWhip -append # 2:51:51 PM ----- Done. ElWhip The warning about the file not needed for link is troubling because that is where the html for the web server is stored. I will test it all out tonight.

Monday, June 30, 2014

Making an lwip web server

Looks pretty easy:
although the nonstandard file system seems weird.

Both the lwip core and the ppp-new branch have been updated since January, so I will try to update them first. Also, I will try to use the MPW compiler flag for using Unix paths.  I had no idea this existed when I ported the code in January. Hopefully, this will make my implementation standard enough to include in the lwip contributions branch.

Also, I did some research on how I can test the web server with 128K of memory (rather than the 512K my computer was upgraded to).  It looks like I can just solder a jumper to disable one of the RAM address lines, making it 128K.

Thursday, June 26, 2014

Spending Spree, part 3

Since I was never able to get the ethernet card working on my Mac SE during the last Retrochallenge, I decided I need a better way to transfer files than a serial terminal and ZModem. So, I bought an internal Zip drive on ebay. Adding it to the G4 was cheap and easy.  I am still using an old SCSI Zip drive to boot my Mac SE and my Mac SE/30. These drives are great, and I have never had any data corruption, even after long periods of storage.

Saturday, June 21, 2014

Spending Spree, part 2

Earlier this year, I took a chance on buying one of these poorly documented Chinese BOLUTEK RS232 / Bluetooth modules. I followed these instructions, and to my surprise, it worked great for a basic wireless serial terminal between my G4 (with USB Bluetooth adapter) and Mac SE. Hopefully, I can use it to establish a wireless PPP link to my Macintosh 128k. First, I need to re-solder my broken RS422 to RS232 adapter, though. Wireless internet, here I come!

Oh, and the Fanny Mac arrived already. It fits and works great!

Wednesday, June 18, 2014

Spending Spree

Just bought a fan on eBay for the Mac. I figured that if I will be leaving it on for 24 hrs a day for a month, this is a necessary purchase. The fans for these Macs are expensive on eBay, especially the "Kensington System Saver". Fortunately, I found this "Fanny Mac" on sale.

Tuesday, June 17, 2014

RetroChallenge 2014SC Intro

I won't have all of July to work on the RC 2014 SC, so I will try to keep it manageable. Building off of my RetroChallenge 2014 Winter Warmup Project, I will compile a web server for the original Macintosh 128K. I may need a few hardware upgrades (like a fan) to keep this going. In the unlikely event I have some extra time, I will get soldering on my Standalone Apple IIe Disk Emulator.

Saturday, March 15, 2014

Standalone AII-SPI-DSK

I started work on a Standalone Apple II Disk emulator based on my previous AII-SPI-DSK which used the FTDI UM232H.  Check it out on Hackaday Projects.

Tuesday, February 18, 2014

Hello 1985!

ebay order just arrived:
Inside Macintosh Vols I, III, III
Inside Macintosh Vols I, II, III. $75 new, $4 used!

Saturday, February 1, 2014

RC2014WW Wrap-up

ElWhip on 512K Macintosh running System 2.0 and Finder 1.1g
ElWhip on 512K Macintosh running System 2.0 and Finder 1.1g
ElWhip application and basic instructions are available for download!  Unfortunately, I didn't have enough time to add any really useful functionality.  A web server would be relatively easy to add and would give the application some real purpose.  All it does is respond to pings and run a telnet echo server.  Also, I'm not totally sure it will run on a real Macintosh 128K, since I found out that I don't have one.  I included a really stripped-down version that will probably run in less than 96K of available memory.
This was a fun exercise, and it is my very first classic Macintosh application.  If anyone gets it running or needs some tips, leave a comment!
I will try to take some time tomorrow to get a final video posted.  Until then, take some time  to check out the other RetroChallenge entries.

Friday, January 31, 2014

Last Minute Changes

My menu and window drawing problems turned out to be a bug that was only revealing itself on the virtual Mini vMac Macintosh 128k. I'm not sure what it was, but it disappeared when I spent some time cleaning up the Mac specific code last night. So, the menus and dialogs all work. I need to do some final testing tonight and I will get a download available!

Monday, January 27, 2014

Fighting with MPW

ElWhip application with empty menus on 64K ROMs
I spent Saturday trying to get lwip to load on a virtual 128K with 64K ROMs. I think I managed it by building a program with no user interface or feedback at all. I can't test it though because Mini vMac doesn't link to a real serial port or tty. Anyway, with a limited user interface on the 128K, I can run PPP and ICMP (eg: ping), but not TCP. I set it up so it will load as much as it can, then provide an error if it cant load the next module/protocol (rather than a hard crash).
I spent the rest of the weekend trying to get a simple interface programmed for the application. Unfortunately, MPW versions 3.0 to 3.5 do not seem to be able to generate menubar or window resources that a Macintosh with 68K ROMs can use. The menus are there, but they just show up as white blocks (see screen shot above). I don't think I can figure out a solution in time, but at least command-q actually quits the application now. Good enough.
Mini vMac has been great for testing just to make sure the program basically works. I will spend the last few days testing on my real Macs and getting a download together with all of the required licensing info for PPP and lwip.

Saturday, January 25, 2014

Happy Birthday Macintosh!

30 years old and still no TCP/IP. I think I am getting close, but there is a lot of code to trace through to make sure I segment everything properly and load everything in the right order to keep the memory footprint low, and avoid segmentation of the memory. I have reserved a few hours this weekend to work on this, so hopefully I will make some progress.

Monday, January 20, 2014

Too Big!

Sorry, a system error occurred. (Restart) (-Resume-)

Uh, oh. I wanted to make sure my lwIP application would work on a real 128K Macintosh (I discovered mine was upgraded to 512K), and none of my old Macs have just 128K RAM. So, I recompiled Mini vMac to be a 128K Macintosh, rather than the default Macintosh Plus. After it starts PPP, it gives a system error ID=15. This is a segment loader error, which probably means it is out of RAM trying to load the lwIP core.
In better news, I eliminated most of the debug messages so I don't have to hit the enter key so many times to dismiss the debug dialog boxes.

Saturday, January 18, 2014

Success and Video Update

Got it! Hitting the enter key rather than clicking the mouse on the dialog boxes makes the connection. That's either a timing or mouse port serial interrupt issue. Oddly, the return key doesn't do anything. I have TCP/IP networking on my original (modified) Macintosh! I think the memory use is low enough, it should work on a real 128K Macintosh. Is it pronounced "El whip" or "l.w. I.P."? I like the Mexican flair of El Whip! (Actually, it's pronounced "lightweight IP" - boring…)

Old System Success, and Old Hardware Fail

Macintosh -192 error: resource not found
My lwip application seems to run fine on System 2.0 and Finder 1.1g on the Macintosh SE. That's great because that is probably about the maximum system version that the Mac 128K can run. Unfortunately, the Mac 128K gives the above error when opening the serial port.

Wednesday, January 15, 2014

Pre-System 7 software from MPW 3.5

lwip PPP IP address dialog in Macintosh System 6.0.8
lwip PPP IP address in System 6.0.8
I spent way too long the last couple of nights trying to get MPW to build an application that could be run on pre-System 7 (even System 6.0.8). I tried using MPW 3.1 (System 6 only) and MPW 3.5 (System 7.1 - Mac OS 9) in different ways to get it to work. Here were all of my attempts and results:

Monday, January 13, 2014

Detour - RetroChallenge 2014SC ?

I saw this Apple II prototyping card on ebay tonight and HAD to buy two. These haven't been available for a while. I resorted to buying an IBM XT prototype card in the past which is bigger but has the same trace spacing on the slot connector. I have never gotten around to actually making an Apple II card though. This looks perfect for some future project.

Sunday, January 12, 2014

MakeFile Overhaul

Tonight, I investigated how to fix the issue of the Main code segment being too large for a normal build/link without using --model far which may be causing compatibility problems. There is a #pragma segment segname directive that I thought could work to break up the segments. However, every function needs a directive before it to put it in a segment! That would require way too many code edits. After some research, I found out that MPW's compiler will also take a -seg segname option to assign the object code to the specified segment name. This is the way to specify a segment for an entire source file.
After reading a bit of Building and Managing Programs in MPW, I realized my Makefile is not using any of the complex features available in MPW. So, I incorporated some path constants and Directory Based Dependency Rules, and eliminated a lot of the hard-coded paths and dependencies in my make file.
I figured out that the key to using Directory Based Dependency Rules and code segments in the Makefile is to add a modified extension to the list of object files you want to put in a separate code segment. Then, add a new default build rule for that extension. Code segments are way easy now! I can now remove the --model far option which seems like it might be incompatible with older Macintosh System versions. The main segment with the PPP interface comes in about 31K and the rest of lwip is just 28K, each fitting nicely in a code segment.
Here is an example section of an MPW Makefile (new extension in yellow and segment name option in blue): ObjFiles-68K = "{SrcDir}ip_frag.c.o" ∂ "{NetISrc}etharp.c.n.o" ### Default Rules ### {NetISrc} ƒ {NetISrc} {PPPISrc} {SrcDir} ƒ {CoreSrc} {IPV4Src} {APISrc} .c.o ƒ .c {•MondoBuild•} {C} {depDir}{default}.c -o {targDir}{default}.c.o {COptions} .c.n.o ƒ .c {•MondoBuild•} {C} {depDir}{default}.c -o {targDir}{default}.c.n.o {COptions} -seg NetIf

Wednesday, January 8, 2014

Motorola 68000 uses 32 bit addressing. Don't forget it!

Fixed the not enough space for new header size error.
For some reason, I thought the 68K processor was 16-bit, so I told lwip a pointer uses 16 bits in the cc.h header file. (It has a 16 bit data bus, 24-bit external address bus, but is 32 bits internally.) Now, you would think I would have figured this out after using 32-bit addressing to get past the previous link error. Or, maybe I would have looked at the lwip cc.h for the coldfire processor, which is a 68K at heart. Or, maybe I would have read the Apple SC/SCpp Reference more thoroughly the first time around. Anyway, MPW for 68K uses 32 bit pointers.
Quick fix to the code:
typedef u32_t mem_ptr_t;
And... no assertion errors at run-time! It still isn't completing the PPP negotiation, but it is trying so hard: PowerMac-G4 pppd[777] <notice>: pppd 2.4.2 (Apple version 233-0-8) started by epooch, uid 0 PowerMac-G4 pppd[777] <notice>: Connect: ppp0 <--> /dev/cu.usbserial PowerMac-G4 pppd[777] <error>: Received bad configure-ack: 02 06 00 00 00 00 05 06 bf 68 ca 18 07 02 08 02 PowerMac-G4 pppd[777] <warning>: IPCP: timeout sending Config-Requests; PowerMac-G4 pppd[777] <warning>: acscp: timeout sending Config-Requests; PowerMac-G4 pppd[777] <notice>: Connection terminated.

Saturday, January 4, 2014

Killing Bugs

MacPaint on Macintosh System 2.0
ZTerm on System 7.1

Click "Read more" for details...

Friday, January 3, 2014

Link Error with PPP

I realize that posts about porting code must horribly boring to read. However, the boring details will hopefully help someone who attempts some similar feat of folly. As a result, I will try to post a picture or two of a Macintosh or Mac GUI element that summarizes my progress. The details of which can be read by clicking the "Read more >>" link at the bottom of the post. First installment:
16-bit addressing can only reach 32K of code.

32-bit addressing can access many more K of code!

Thursday, January 2, 2014

Sibling Rivalry

Macintosh SE harassing sad Macintosh 128k for lack of internet connectivity…

Wednesday, January 1, 2014

Importing and Porting

The ppp-new branch of lwip is available for download here: lwip-ppp-new.tar.gz . Of course, I couldn't find the zip download at first, so I had to download git, compile and install it, then check-out the ppp-new branch of lwip. Oh well, now I have git installed.

In 2006, according to my old makefile, I tried to port lwip to the Mac OS, but I had no luck. I did a lot of hand editing of source code files to convert them to Mac paths and line-feeds. So this time, I took a few hours to write a short MPW Script to fix the line-feeds and paths of all of the source files at once.

I just realized the MPW compiler has an option -includes unix which solves the path issue. Oh well, at least I don't have to worry about the line-feeds.

So the lwip code is Macified, I just need to set up the architecture specific options and write a program to use it. I have a feeling I will have a lot more "Oh well"s in my future.