Thursday, October 12, 2017

DSKalyzer doubts

Hmm,I have been playing with DSKalyzer, and as great and as powerful as it appears to be for organizing your disk images, I don't think it can create a new one. That is sort of important for making a clean build for a new program. AppleCommander can do that nicely though. I may just stick with AppleCommander in my a2bdp Apple 2 build/deployment pipeline for now. It will make my project a little easier, too.

Tuesday, October 10, 2017

Some AII-SPI-USB problems resolved

I was having some serious issues getting my AII-SPI-USB command line tool (for transferring disk images to the UM232H) working on my newer MacBook. I tried rebuilding it, then rebuilding libftdi, and libusb, and libmpsse. I finally got things working and Xcode asked me to update my build settings. Then, of course, nothing would work again. The primary problem was "duplicate symbol" errors that were suddenly popping up. Some edits to libmpsse, and some changes to my code, and I finally was able to re-build it. I think I should staticly link the libraries I need for the tool, since most users won't have the will power to compile libftdi, or libusb to use it.

I need a new name for the program too. AII-SPI-USB is not a very posixy name for a command line tool. Maybe a2usbdsk.

It's ironic that one of the benefits of programming for retro computers is that the hardware or operating systems almost never change. Do it once, and it works forever! Not so for modern hardware, even the modern hardware interacting with the retro computer.

More AII-SPI-DSK problems

Found my AII-SPI-DSK adapter on the breadboard. Unfortunately, the counter was harvested off of it for some other project. Now I need to track down a 74LS161 ic...

Monday, October 9, 2017

AII-SPI-DSK problems

I downloaded my AII-SPI-DSK program and tried to get it running without success. First FTDI library version errors, then a file not found error. I need to get the adapter out and try again. Unfortunately, it is packed away since I am moving this month. But I think I should be able to dig it out today.

Saturday, October 7, 2017

Trying Existing Virtual Build Pipeline

To get started building an Apple II program, I used some existing resources to make sure my installation of cc65 compiler is configured correctly. Two resources: The BLONDIEHACKS web site conveniently provides an example Apple II build Xcode project to start from. Unfortunately, I had some build errors. The solution is to edit the example's Makefile to specify cc65 assembly configuration: @PATH=$(PATH):/usr/local/bin; $(CL65) -t apple2enh -C apple2enh-asm.cfg -l$(PGM).lst --start-addr $(ADDR) $(PGM).s

Yay! Seizure inducing flashing X's in Virtual II Apple II emulator (the example code is really supposed to do that).

So, the example build process now works with an emulator. Now to incorporate DSKalyzer and a real Apple II.

A2BP .011

Minor update. It is pretty cool to watch this thing run from a clean install. Lots of scrolling text!
  • adds help, clean
  • sets apple2 as the default system for cc65 samples
  • more variables
make is very picky about white spaces. If you copy from browser, it may convert the tabs to multiple spaces. I will set up a download link, once I am happy with everything. # # Makefile # A2BP .011 # # This downloads and installs the pieces for the A2BP # toolchain, build pipeline, and deployment pipeline # for the Apple II on OSX. # # Created by Eric Pooch on 10/05/17. # https://apple-crapple.blogspot.com # # Usage: # make all # sudo make install # PGM=a2bp help : $(info Instructions: Place makefile in a folder with no spaces in path.) $(info then type:) $(info make all) $(info [packages will be downloaded, expanded, and compiled]) $(info sudo make install) $(info [packages will be installed, overwriting existing]) $(PGM) : cc65 dskalyzer USB_AII_Disk_Emulator install-$(PGM) : cc65 dskalyzer USB_AII_Disk_Emulator make --directory=cc65 install MAKE="make PREFIX=/usr/local SYS=apple2" ditto dskalyzer /usr/local/bin/ ditto USB_AII_Disk_Emulator/AII-SPI-DSK /usr/local/bin/ USB_AII_Disk_Emulator.tgz : curl -L -O https://sites.google.com/site/maclcdproc/downloads/USB_AII_Disk_Emulator.tgz USB_AII_Disk_Emulator : USB_AII_Disk_Emulator.tgz tar zxvf USB_AII_Disk_Emulator.tgz dskalyzer-macos-amd64.zip : curl -L -O https://github.com/paleotronic/dskalyzer/releases/download/v0.1.3/dskalyzer-macos-amd64.zip dskalyzer : dskalyzer-macos-amd64.zip tar zxvf dskalyzer-macos-amd64.zip # dskalyzer is older than the archive, so update touch dskalyzer cc65 : git clone https://github.com/cc65/cc65.git make all --directory=cc65 all: $(PGM) install: install-$(PGM) clean: rm -rf cc65 rm -f dskalyzer-macos-amd64.zip rm -f dskalyzer rm -f LICENSE rm -f *md rm -f USB_AII_Disk_Emulator.tgz rm -rf USB_AII_Disk_Emulator So, now that I built my build/deployment environment. It's time to write a program!

Friday, October 6, 2017

A2BP - The OSX to Apple II build and deployment pipeline

I spent some time last night getting all of the pieces assembled for my OSX to Apple II toolchain and build / deployment pipeline ("A2BP"). The plan is to cross-compile using Xcode and cc65, send to disk image using dskalyzer, then load the disk image and transfer to the Apple II using my USB_AII_Disk_Emulator. ANSI C code to running on Apple II hardware with the press of a button! My initial thought was to create a makefile for my first "Hello World" program. But I thought it would be helpful to create a make file for A2BP first. I'm sure that I am grossly abusing make with this thing, but it is pretty helpful. So, here is my first shot at it, after the break:

Tuesday, October 3, 2017

RetroChallenge 2017/10 Entry

I have so many projects in my head, but I haven't had any time to work on them lately. I have a lot of IRL stuff going on, so I want to keep my RetroChallenge entry very simple. I have wanted to get the 6502 cross-assembler cc65 up and running on my MacBook so I can do some Apple II programming in ANSI C. But, I would really like to get a great build pipe-line up and running before I really start programming. BlondieHacks has a good build pipeline that I can use as a starting point. But I want to make some modifications to better suit my needs: This should allow me to test any software on real hardware as part of the makefile build process. So, goals are:
  1. Set up automatic build and deployment pipeline from Mac OSX to real Apple II hardware.
  2. "Hello World" on Apple II

Monday, July 31, 2017

Disk II Drive to USB Adapter

My CJMCU FT232H Module arrived today! Less than $10 for a FTDI FT232H break-out board / USB to SPI adapter. Really excited as it makes my AII-SPI-DSK even cheaper. In addition, I started thinking about an adapter that will allow me to rip Apple II disks right from a Disk II 5.25" drive! I haven't tested anything yet, but it should be fairly easy to implement. It is basically backwards data flow from my previous adapter.

Monday, November 7, 2016

RetroChallenge Epilogue and Apparent Success

After Review of my plan and schematics, I noticed a small error in the Eagle schematic I posted earlier.
  1. Pin 11 of the socket must be connected high (or to pin 12, or to a soft switch to enable video scanning on row E of RAM).
  2. Pin 11 of IC F2 must be disconnected and that line (not the IC pin) must be connected to ground instead (See my hand-drawn schematic).
I figured out problem 1 first. But when I booted I received half of a startup beep repeatedly, like it was stuck. It took a while until I realized I forgot Problem 2 since it was only on my older schematic. I used an IC socket and connected pin 11 and 12 and raised the IC leg. This is important as it decodes whether the Apple II is in RAM or I/O mode. The computer was stuck with no access to I/O or ROM (or simultaneous access to RAM and I/O or ROM).
F2 IC with pin 11 sticking out in a socket with pin 11, 12 connected It boots!

It seems to have worked! The computer shows the APPLE ][ greeting just as expected. I need to connect a keyboard and a disk controller card to test it all out and verify that all 48K is being accessed.

So, I now have an Apple II with 48K of 4164 DRAM in just one bank of RAM. Now for 64K. Or 128K...

2 banks of RAM installed for future 128K modifications


Tuesday, November 1, 2016

Final Push and Failure

I ran jumpers wires on the back of the Apple II+ logic board to route the various signals I needed (PHI_0, AX, A14&A15) to the J1 socket area. Fortunately since only half of J1 is used by the Apple II+, I can use the unused pins of that socket to route my signals through to the new circuit I am adding.

Here is my circuit diagram:

and the adapter board:

Warning - I don't know if this works yet.

After I ran the wires, I started trying to solder a tiny adapter board to translate the 74LS257 signal locations to the new 74LS153 IC. That was taking too much time for something that might not work at all, so I put the circuit on a bread board. Here it is:

Unfortunately, this did not work. I suspect that the dip jumper cable may be too long and adding some capacitance or delay. Or, the RAM timing may have been thrown off by the internal logic of the new IC. My Apple II+ is not booting and is in a similar state to when the RAM was in the wrong row. I'm sure I would have figured this out, but Halloween took priority.

Better news is that my Apple IIb is in a pretty final state. I think I will start buying supplies to actually build it.

Until next time, RetroChallenge!

Saturday, October 29, 2016

Apple II+ 64K RAM Refresh and Addressing

I managed to add my modifications back to the Apple II logic board to get the 4164 RAM enabled. It seems to be working! However, I want to address all 64K of the RAM, not just 16K. To do that, I need to refresh the extra RAM rows, multiplex the RAM row and column address for the new RAM address pin, and make sure that row C of RAM stays enabled instead of selecting row C, D, or E. See the detailed plan of attack by clicking below.

Friday, October 28, 2016

Troubleshooting Frustrations

I spent a number of hours last night and tonight trying to figure out why my modified Apple II+ was not beeping, and instead showing a screen full of question marks (or sometimes a white screen) on start-up, even after I added a row of 4264 DRAM. I swapped all of the ICs back and forth with my functioning Apple II+ and still had the same problem. At that point, I realized that I should have done some basic testing before I modified the logic board. I removed my modifications, and still had the same problem.

I found out that I could get very similar symptoms on my working Apple II+ if I removed the F2 74LS139 decoder, which selects which RAM bank to use. So I started checking continuity on my non-working board. I discovered that here wasn't continuity between the low bank selection line and the row that I had my RAM in. I thought I had found a major fault in the board. Then it hit me. The apple II+ rows are labeled A through K, and start with A on the bottom ROW. I had put my RAM in row E (the high address bank), instead of row C (the low address bank). I moved the RAM chips and after swapping out a bad chip, BEEP, and APPLE ][ at the top of the screen.

I felt so dumb. Hours wasted. So now I'm re-doing my modifications. Still time for some progress tonight. At least it's working. That logic board has't been fully functional in probably 30 years.

Tuesday, October 25, 2016

Apple II+ RAM Replacement - Power

Replacing the RAM in my Apple II+ has become a bit of a project in and of itself. Sure I could just buy some 4116 (16K bit) DRAM, but that's not very exciting, and its not an upgrade. So, Instead, I have been figuring out how I can use 4264 (64K bit) DRAM in its place. There are a lot of considerations that need to be made including power, refresh circuit, and addressing the new RAM. The descriptions below are for an RFI Revision 01 board, and may be different for other revisions. Click below to see the details of re-routing the RAM power lines and my preliminary results.

Sunday, October 23, 2016

Apple II+ Logic Board Repairs

Here are the two Apple II+ logic boards that I have for repair. They were mostly stripped of integrated circuit chips, and even have some ports and connectors that were de-soldered to repair other boards (back in the 1980's).

I chose to repair the board on the left due to the missing D6 RAM socket on the other board and a possible damaged trace under the F8 ROM.

I swapped the power connector and added a missing audio jack. These are still available on eBay as "panel mount mono jack":

A word of caution. I have found that the solder on these old boards has the potential to make you feel sick and hung-over. Drink some milk before you solder and work in a very well-ventilated area.

I was able to replace most of the missing IC on the board from the box of spares I had, and from the other board. I have no idea if they work, so that will probably require a lot of troubleshooting.

The only IC I could not replace from old pulls was the one labeled "9334" in the J14 position. Fortunately, this IC can be replaced by a 74LS259, which I had on hand from my early experiments with my SPI based Disk II emulator.

Finally, I did not want to have to troubleshoot with old, possibly bad RAM, so I have some 64K 4264 DRAM chips on hand to see if I can replace the original 16K 4116 chips. This will require some modifications to the logic board (due to the different power requirements and slightly different pinouts), which I hope I can complete before the end of RetroChallenge.

Sunday, October 16, 2016

Apple IIb Model

Added power supply and logic board texture. Color change to be Apple II+ olive-beige rather than Lisa tan-beige.

Saturday, October 15, 2016

Feet and Boots!

The parts donor Apple II+ I am trying to repair is really a mess. Even the rubber feet were harvested for another computer. Fortunately, I found some decent rubber feet on eBay. I bought two packs of 12 20mmx20mmx8mm and it is a great replacement part for Disk II and Apple II feet.

Regarding my other project, I was pretty scared to connect the repaired IIGS Upgrade board to a power supply, half expecting everything to start smoking. It boots! First time in about 15 years:
IIGS Upgrade board and composite video IIGS Upgrade board and RGB video
Composite video worksand RGB works!

Apple ][b Refinements

Coming along nicely. I used a more period appropriate keyboard layout, and I think it improved the over-all aesthetics. That's the kind of keyboard I would be using anyway. I am thinking, I might make this an Apple ][b -> IIGS upgrade, since the IIGS logic board is looking so good. I could also use the internals of an AppleColor RGB monitor that I have for the IIGS.

Thursday, October 13, 2016

Apple IIGS Repairs

Here are the fruits of my labor for the past two weeks. I had already attempted to repair this Apple IIGS Upgrade board, after a battery explosion did a lot of damage to the board and chassis. However, I wasn't really satisfied with how it was working out. I purchased some copper tape, and I am impressed at the way it worked to replace the traces. Much flatter and smoother, like it should be. A couple of resistors replaced and I tinned it all. Then, a lot of continuity testing. I bought some UV cure solder mask and after some time in the sunshine and under a UV light, it looks pretty good. Not perfect, but considering the terrible damage inflicted on this board, I am impressed!
Trace repairs and new SMT resistors in R193 and R14 locations.

Trace repairs and new battery holder.

Copper Tape, UV cure Solder Mask, and a weird spatula thing.

The Hakko soldering iron definitely made this possible. I am afraid to hook up the power supply though...

Tuesday, October 11, 2016

Some Progress, Some Distraction

I spent some time last week working on a Google Sketchup rendition of my hypothetical Apple IIb. The idea is to solve some of the problems with the Apple II+ as a incremental update. It is clear from the Apple II+ design that some of these fixes were deliberately removed from the design late in the process, possibly to keep cost down and possibly because the Apple III was on the horizon. For instance, the odd keyboard decoder arrangement and missing switch clearly contemplated lowercase and a keypad, but the final design did not include either. Here are my specs:
  • 80 columns. This is difficult without a full terminal card, which was how most Apple II+s were upgraded.
  • Upper/lower case keyboard. Shouldn't be too hard, other than a new character ROM.
  • Separate keyboard with numeric keypad. This didn't catch on until after the Apple III, but it should be a relatively easy addition.
  • Integrated disk drives.
  • Integrated monitor. I'm indifferent here. Although I really think the Tandy TRS-80 Model III and Apple Lisa are some of the best looking retro computers.
  • Two serial ports, and a parallel port. This just requires a few expansion cards.
So, mostly a standardized, well equipped, Apple II+ with a few conveniences we have come to expect. Here is my first rendering with elements borrowed from Lisa I and Apple IIe Google Sketchups:
So, that's the progress. The distraction is work on my Apple IIGS Upgrade. Rather than take on another project (Apple II+ logic board), I decided to dive head first into fixing the IIGS. After replacing some of my previous repairs with copper tape, and a lot of soldering, it looks pretty good. The solder mask is curing under UV light, so I will have pictures tomorrow.