Posts

Showing posts with the label AppleIISd

AppleIISd V1.2.2 - Silly bugfixes and an improved flasher application

 Thanks to the fact that I could (luckily) continue working through the past year, I haven't had much time at all to do work on the AppleIISd and people have been nagging me to support non-65C02 models as well. In fact, when working from home, I wasn't in the mood to do work on personal projects at all when I've been doing professional work in the same room on the same computer the whole day long. In a brief moment of being inspired, I managed to find a bug that's been haunting me since I introduced the new SMD board design (see my last post on the AppleIISd). The problem was that despite the manufacturers claim for having a power-up write protection, the first byte of the now soldered EEPROM would be erased frequently causing the card to stop working. My manufacturing partner and I did hundreds of On/Off switching tests, monitoring power and data lines. We didn't find anything that would lead us to a solution. I reviewed the VHDL for the CPLD over and over again an...

Prebuilt AppleIISD V1.2.1 finally available

Image
I haven't posted for a very long time now, but I'm up and well during those strange days (future readers just google the year 2020 😷). The even better news is that since last year I teamed up with Jens who persuaded me to make a new batch of AppleIISD cards, as reported in my previous  post . The cards are available preassembled for 59€ excl. shipping. We are trying to get a website online where you can buy the cards. Meanwhile, you can contact me at the  Applefritter Forum . I still have not found a solution to the EEPROM problem erasing the first byte every now and then. That is why there still is a jumper to enable writing to the chip. However, this needs to be changed only when changing the card's firmware. I am very pleased with this feature as it gives the user a chance to upgrade to a newer firmware version without the need of an EPROM burner. It has been a huge help in development, too when you don't have to extract the chip every minute to burn a new vers...

Prototypes for the new AppleIISd hardware V1.2

Image
A couple of days ago, the prototypes for the new hardware version 1.2 of the AppleIISd arrived. As you may tell, I made a few changes from the original design: the CPLD and the EEPROM are now SMD components, the programming connector for the CPLD is a component-less Tag-Connect, the 3.3V converter was changed and the pullup resistors are now an array. I am quite happy with the design, but I will have to change a few things for the final version, but that is what prototypes are for! The pin header for CPLD programming will be reintroduced but not equipped next to the Tag-Connect, necessary adapters are not really cheap. The slot connector will have longer pads. The third thing I still have to figure out is the following: about every tenth time the machine is switched on, the first byte of the EEPROM gets erased and I still have not quite figured out why. I am not sure if this happens on power-up or power-down. Adding pullups on the /OE and /WE lines helped to reduce the error to ab...

Firmware flasher for the AppleIISd

Image
The last year has been surreal. With 80 shows of 'The Hunchback of Notre Dame' 🎵 and four other projects I very well may say that I have never sung so much in my life. Now that the run of the musical is over, I have had a little more time to return to retro computing. A little while ago a guy from the Applefritter forum contacted me and asked if I were interested in making another batch of the AppleIISD. I said yes but I wanted to make some changes, first. One thing I thought of right from the start was the ability to update the card's firmware within the computer and without having to remove the EPROM, erase it and burn it. At first, I thought of using a battery-backed SRAM chip, but that did not work for some reason and the two I had had dead batteries despite having been sold as 'new'. However, for development, I was using an EEPROM anyway, so I decided on using one instead. I don't know why I did not have the idea before. Maybe, I was under the impres...

Version V1.2 for the AppleIISd released

It took a little longer than expected, but I have just released the version 1.2 for the AppleIISd! As mentioned in my last post I had the nasty issue that booting GS/OS crashed when AppleShare was loaded. I have not found out completely why, but I seem to have solved the problem.  I posted my problem over at the comp.sys.apple2.programmer group and drew the interest of Apple IIgs legend Antoine Vignau. He was kind enough to go through my code, told me a few tricks and found the bug, eventually. The image is available for download on my repository:  GitHub

The AppleIISd gets smart

It seems impossible that almost exactly six month have passed since my last blog entry and contribution to my AppleIISd project! On the start of the new year I joined the choir of a professional production of Disney's The Hunchback of Notre Dame and was busy rehearsing all of January and February. Since then I have had a show at least twice a week. 🎵 In March and April I was busy moving flats and had been unpacking and rearranging stuff. I have only had time to get back to the Apple II in the last couple of weekends. However, I tried up a Smartport driver implementation for the AppleIISd using the very little information that is available:  The name Smartport stands for both hardware and software. The hardware part is what most Apple II users are familiar with: it manifests itself as the disk port on the IIc, IIc+ and the IIgs. It is capable of talking to dumb 5.25" drives as the UniDisk and the DuoDisk, as well as both intelligent and unintelligent 3.5" drive...

How to prepare SD cards for the AppleIISd

Image
Here is how to prepare SD cards for use with my AppleIISd. Please be aware, that the AppleIISd does not use the FAT format like other SD or CF storage solutions does, it uses the ProDOS format directly. This means that you can not simply take a ProDOS image and drop it to the card in the Windows Explorer, it has to be written using CiderPress. 1. Open CiderPress in Admin mode (Right-click on Icon, "Open as Administrator"). 2. Select "Volume copier" from the icon bar or select "Tools -> Volume copier (open volume)" from the menu. 3. Make sure that "Open as read-only" is deselected. Select the SD card's logical volume from the list. Triple check  that you have selected the correct volume and don't come crying when your PC has only a ProDOS volume left to boot 😉 4. When you open an SD card for the first time like this it might show an MS-DOS volume with SD card's size. This gives you an opportunity to check  again! Select...

Shipping the AppleIISd kits

Image
My small run of 20 AppleIISd kits is already sold out. It sold "like sliced bread", as we say in Germany. In the last few days I felt like I had my own little manufacture. All parts and packaging had arrived and I packed them to ship in 14 little packages. They will be on their way to Europe, America and Australia tomorrow. I'd like to thank everyone who trusted me and hope you will have fun with the card. Happy holidays for all of you 🎄 I know I wont be bored in the next few weeks as I am already working on integrating the Smartport protocol into the firmware to support more than two partitions. So stay tuned for updates!  

AppleIISd PCBs have arrived

Image
The guys (and gals?) on the Applefritter forum have persuaded me to do a small run of AppleIISd kits. Today, the 20 PCBs arrived from China and they do look fine. As I have changed only one connection from Version 1.0 to 1.1, I may safely assume that the boards work. I have to admit I was surprised that so many of you were interested in my small exercise. The kits are already sold out! I just corrected a small bug in the firmware that kept SD V2 cards with less than 2GB from working. Now the kits are ready to ship. With a little luck, they could arrive in time to put them under the xmas tree 🎄

IIgs breaktrough

Image
Last night I had a major breakthrough for my SD card interface! Not only does it work, it boots GS/OS on the Apple IIgs! 🎉 Switching the source code from Merlin-8 on the IIe to CC65 in Visual Studio and using an EEPROM sped up my development cycle quite a bit. This wasn't a fix for the issues, of course, but it helped. As usual, there were a lot of small things involved and I have learned some lessons. First lesson: the disk status function uses the X- and Y-registers as return values. However, when you load these registers with the return values and then insert a function call that does not only save these registers but uses them for slot addressing, it will crash. There simply isn't a slot number 255 in the Apple II 😉 Second lesson: SDHC cards use block addressing, not byte addressing. Some weeks ago, my 512 MB card died and I replaced it with an 8 GB card. I knew before that it was initialized correctly, so I assumed it worked as well. The problem was b...

Some errors are better

It has been quite a long time since I had some spare time to work on my still-not-working SD card interface for the Apple II. After rewriting almost all of the VHDL code for the card's CPLD it still would not boot and most of the time crashed with a more ore less garbled message of "Unable to load ProDOS". The fact that this message is shown at all means that at least the first block of the volume is loaded and executed. But the messed up message indicates an issue in the transmission either from card to CPLD or from CPLD to the computer. I checked the data coming from the card and it seems fine. Thanks to Protek over at the Applefritter forum, I found a step into the right direction. He built a card from my design and uses a quite old version of my sources, that was sort of working. He swapped the 74HCT type bus transceiver for a 74LS type and instantly got better results. I tried the same and got better results, too. Well sort of. The "Unable to load ProDOS...

More minor successes

I've been rearranging the VHDL code a lot and it had a positive impact on timing not only in simulation, but on the real hardware, too. The problems with the EPROM 'disappearing' in the middle of the code execution seem to have gone. Also, I rearranged the assembly code for a (hopefully) more efficient driver. I wrote a test routine that writes a 512 byte block to the card, reads it back and compares the two . The test shows that data is written correctly to the card, but is not read back correctly, sometimes. I think it may have to do with the timing (again) how data is read from the Spi bus into the CPLD. That is about the only thing from the original design, I have not touched. It would surprise me, though, if the was nothing to improve...

Minor success

The Apple Super Serial Card uses address line A11 to switch the card's ROM to always to the same page ($700), when any part of the $C000 - $C7FF space is accessed. An access to $C800 - $CEFF is mapped to $000 - $600. This takes place in the first part of the CPU cycle, when the address bus becomes valid, so the ROM has enough time to react. Why hadn't I thought of that myself? I mean, the guys at Apple only did that 40 years ago. But I am just a software engineer, to my own defense. As soon as I got home yesterday, I made the modifications necessary to support the new address decoding for the EPROM. This required only the change of one line of VHDL code and the connection of A11 to a CPLD pin. I repurposed the unused /IRQ pin for that. Now I can access all pages of the ROM again!

Operation successful ...

... patient dead. Or at least in a coma. 😒 I spent all of last week fixing the timing problems I described in my last blog. I cross checked the timing constraints for the different Apple II models and combined them to form a worst case scenario. This includes the long time the II+ takes to establish a valid address and the short data hold time of the IIgs. To verify that timings were by the book, I learned how to write VHDL testbenches (how have I lived without them?). The simulation showed me some flaws but I corrected them and now everything is fine. I even wrote a driver test that writes a block of data, reads it back and checks for errors. However, one thing I did not realize was that 27xx type EPROMs are relatively slow. They take up to 450ns to output data after the address is valid. The select signals that activate the ROM and forward the address bus are valid for 500ns. With my timing redesign, the signal is cut off by about 70ns at the beginning to avoid bus figh...

Clocks

Apart from being one of the most obnoxious people I ever met, my professor for digital circuit design at university told us some things that stay in the back of the mind. 👨🏻‍🎓 One of those things was that, in a digital design, you should always make signals that are asynchronous to the system clock synchronously. Usually this applies to signals like pushbuttons or from other devices that are separate. In case of the Apple II peripheral bus there are both synchronous and asynchronous signals. Unfortunately, this is not really clear in the simplified bus timing diagram that appeared for example in the II+ manual. 7M, Q3, Phi0 and Phi1 are really synchronous as they are devided from the 14MHz main clock. In my CPLD design for the AppleIISd card I used 7M as clock, because it is the fastest clock that is available on all slots. The three select signals, /DEV_SEL, /IO_SEL and /IO_STB are related to Phi0/1 but are slightly late due to propagation delay...

Verschlimmbessern

I guess verschlimmbessern is one of those German words most non-native speakers have not heard about. It's in the Duden , so it's an official word. *lecturemode* Actually, it is an oxymoron, two words that are opposite of each other combined in one. The prefix ver- indicates that something is changing. The two words are verbessern , to make something better and verschlimmern , to make something worse. So, verschli mmbessern means making a thing worse by trying to make it better. *lecturemodeoff* Two or three weeks ago the board worked pretty well, so I said I would have the 20 prototypes of my AppleIISd board ready by now. Unfortunately I don't. By trying to add features like a flag for initialization and support for multiple partitions I made things worse and I don't have a working board yet. The trouble is that I can boot the board about every third time on the IIe. It either hangs at the ProDOS bootscreen, says "Unable to load ProDOS" or doe...

AppleIISd

Image
For the past few month I have been developing a storage solution for the Apple II that, to my knowledge, hasn't been done before. A SD card as a hard-drive replacement. It is nearly finished and has (hopefully) only minor issues left to fix. I admit, this doesn't sound neither groundbreaking, nor highly complex, but that is not the goal I am aiming for. I wanted to build something for the Apple II for quite some time, because that is what this computer was originally aimed at. It also gave me the chance to learn more about the hardware and internal parts of ProDOS. Finally I wanted to have a cheap mass storage, that may be assembled quite easily from parts that are not too complicated. Of course, there are already lots of devices that have an sd card and you can choose a floppy image like the or are feature stuffed, but i wanted it to be as simple as possible: ProDOS may access the card directly and boot support shall be provided. Luckily, I remembered André Fachat's  S...