Please enable JavaScript to display the menu.

ysflight.com

FM TOWNS 32kB FRAM memory card schematic and PCBs:
https://github.com/captainys/FM/tree/master/TOWNS/KiCAD/FRAMCard
Towns OS app for writing IPL to the memory card:
https://github.com/captainys/FM/tree/master/TOWNS/IPL/TOWNSOS Or, if you have a computer with a PCMCIA slot, and are able to write image directly, you can write ICMIMAGE.BIN in the following URL. https://github.com/captainys/FM/tree/master/TOWNS/IPL/DISKIMG

2022/03/29

FM TOWNS Rescue IPL for IC Memory Card. I have successfully developed rescue IPLs that can boot FM TOWNS models except 1st, 2nd, 3rd gen, and 386SX models, from external SCSI CD drive, even if the internal CD and FD drives are all dead. Even if the floppy-disk drive is alive, it is getting difficult to format a disk in 1232KB format. In such situation, you can format a floppy disk by booting into Towns OS from external SCSI CD drive. The significance is no modification to the FM TOWNS hardware. I am able to make some modifications if necessary, but majority of the hobbyist who is interested in maintaining retro hardware are not that skilled. I personally am thinking the rescue IPL was very successful in keeping aging FM TOWNS computers alive.

But, still it does not save all FM TOWNS models. Due to the special boot process, rescue IPL won't help 386SX machines. Why? 386SX models just test-reads the boot sector, and if it finds "IPL4", then it uses a boot code stored in the system ROM to continue the boot process. It does not use the IPL in the disk. So, rescue IPL has no hope in 386SX models, including Marty. But, what about 1st, 2nd, and 3rd gen TOWNS models? There was a hope, which was IC Memory Card slot, that most of the Towns users probably hadn't even noticed it was there. This IC Memory Card later was called PCMCIA. PCMCIA was very popular among laptops around year 2000. TOWNS's IC Memory Card only supports very early version of PCMCIA specification. So, it would be difficult to support general-purpose PCMCIA device. Nonetheless, TOWNS is able to boot from IC Memory Card. I was able to confirm with my FM Towns emulator Tsugaru that the system ROM will read IPL sector from the IC Memory Card and jump to the IPL if keyword "IPL4" is found.

However, it is virtually impossible to find a IC Memory Card (aka SRAM card). I once gave up on making rescue IPL for IC Memory Card. But, a Tsugaru user who also owned a working FM TOWNS hardware reported that he had working IC Memory Cards in FM TOWNS BBS. So, I made an IPL for IC Memory Card, and he kindly tested and confirmed TOWNS could boot from IC Memory Card.

I got more serous about the rescue IPL for IC Memory Card. If I am able to fabricate an IC Memory Card with my rescue IPL, it will save 1st, 2nd, and 3rd gen FM TOWNS models. (1st Gen requires SCSI board, which is very hard to find though). One of the problems was I needed to be able to make a memory card that lasts without battery. IC Memory Card was also called as SRAM card. It retained the contents by a backup battery. If the battery depletes, the memory contents are lost. Once the memory contents are lost, somehow IPL needs to be written to the memory after replacing the battery. But, if you cannot start TOWNS, then how can you write IPL to the memory card? It makes a chicken and egg situation. It was not good for preservation. Then, I somehow need to fabricate a memory card with a non-volatile memory. To fabricate a card, I needed a connector. Last time I searched for a connector, I could not find one, but somehow, I found one.

I can find a connector and SRAM chips for testing. Then, what circuit I need to implement? One person in FM TOWNS Discord suggested to look at open-source NeoGeo memory card NeoMemCard2. NeoGeo was using the same memory card. And, this schematic implied that I needed a straight-forward connection of address and data busses to the memory chip.

Still there was unknowns. FM TOWNS maps IC Memory Card to physical memory C2000000h if it was JEIDA4 compliant, or C0000000h if the card was JEIDA3 or older. Analysis with the emulator told that the system ROM reads from JEIDA3 memory during initial boot process. Then, how can I tell TOWNS that the card was JEIDA3? PCMCIA specification does not tell any pins for identifying what standard the card supports. Also PCMCIA connector has 16-bit data bus and 26-bit address bus. Does the memory have 16-bit (2 bytes) for each address, in which case one card can hold up to 128MB? Or, does it have 8-bit (1 byte) for each address and simply 2 bytes that correspond to two addresses can be accessed at once?

More clue came from the user who tested the rescue IPL with his memory card. Turned out, if TOWNS identifies the card is JEIDA4, it maps first 16MB to both C0000000h and C2000000h anyway. I was exposing to one of the two address spaces in Tsugaru, that's why I thought TOWNS was only bootable from JEIDA3, but actually doesn't matter. Also, one byte per one address. He had a memory card of a software package called Assist Pack, which was sold for FM-R. The Assist Pack card only supported 16-bit access from even address. So, when it was red from an odd address, it was returning FFh always. FM TOWNS BIOS (IO.SYS) reads 4-bytes at a time from the memory card. Which implies that there is a logic between the CPU and the card. Also, it always reads from an even address, therefore if I only need to support TOWNS, I won't have to be worried about 8-bit access from an odd address.

I decided to make a prototype with SRAMs. I ordered a PCMCIA connector from Digikey.

But, after placing an order, I was reading the data sheet, and it told the board thickness needs to be 0.4 to 0.5mm. What? Digikey was posting the following drawing. In the image, 91 pixels for 2.7mm. Then, pin separation must be 29 pixels, 0.86mm.

I always use OSH Park for making PCBs. I can choose from 1.6mm, 0.8mm, or 0.2mm thickness. I didn't want to use a twice expensive flexible 0.2mm PCB. But, 0.8mm won't fit between the pins. I needed to bend pins. But, I needed to do so keeping pins parallel. I thought about the process, and I first bent all pins outward by using a thin copper plate. Then, I put a 1mm-diameter metal wire between two rows of pins and used a vise to bend pins inward.

The process looks to be successful. The image below shows after the surgery and the original. This is for prototype anyway. I am going to attach it to the PCMCIA extender card. I won't have to be worried about the connector detached from the PCB and left inside of my TOWNS slot. Anyway I'm going to use 28-DIP SRAMs. It won't go into the PCMCIA slot anyway.

By the way, almost always a better product is found after placing an order. Mouser sells this PCMCIA connector with notches to prevent wrong orientation. I also ordered some to prepare for the final version.

The schematic and PCB design of the prototype is as follows. I am waiting for the PCB to come. Then, I'll experiment with my TOWNS.

2022/04/09

PCB has arrived. This PCMCIA connector was my first experience of surface mount, but it worked out well.


Surface mount after soldering two pins

However, I realized I ordered wrong SRAM chips! I was assuming it to be the same size as i8251, but it was thinner!


Wrong Size!

So, I put ICs on a soldereless breadboard, and I wired all the pins to the sockets.


I have tested no short circuit with my multimeter and connected it to my FM TOWNS II MX. Powered On! No smoke coming out! At least it didn't fry my TOWNS nor the SRAM ICs!


I used a program for writing directly to the physical address and wrote AUTOEXEC.BAT to my SRAM. Then I dumped the memory with another test program. Looks like data was written correctly. But, when reading first a few bytes are ok, but the data gets corrupted after 12 bytes or so.

Why did I think it was correctly written? If I dumped from C0000000H, I saw correct data up to C000000CH or so. But, if I dumped from C0000010H, I again see first a few bytes correct. Therefore, data is there, but it is failing to read.

Was it because I connected SRAM ICs with wires? Are wires picking up noise? If so, shouldn't the write operation fail as well? Is my SRAM ICs too slow for 486DX 66MHz? I modified my dump program so that it wait after each read. Then, I saw all correct bytes in the dump.

If SRAMs were too slow, if I set TOWNS in "Compatible Mode" (or SLOW mode), it slows down to 386DX 16MHz equivalent. Actually, at SLOW mode, I couldn't read any bytes correctly at all. All bytes were broken. But, still data was written correctly. If I write to the SRAM in SLOW mode, and change to FAST mode, then I was able to read all bytes correctly (with wait after each read).

By the way, reset button didn't clear the data in my SRAM. I didn't need the backup battery for testing IPL.

Then, I remembered that I ordered two more SRAM chips just in case. I opened the envelope, and those ICs were correct size! I replaced my ICs. It looked much cleaner.


This time, reading and writing looked ok. My writing program was adding extra 3 bytes after every 256 bytes, but it was an easy fix. I confirmed I was able to write and read back AUTOEXEC.BAT, I tested my IPL for IC Memory Card. Towns boot from IC Memory Card by pressing and holding I,C, and M keys and pressing reset button. (Can be done in power-on as well.) Does it start my IPL?

Not really. Was it really writing the binary correctly? I wrote a program for comparing the data in my SRAM and the file. It told that some bytes were broken. Especially when I wrote continuous 00Hs, somewhere bit 6 is flipped to 1, making it 40H.

But, this time, reading was ok. I only needed to write correctly. I modified my program so that it waits a little bit after each write. With this change, my verification program told the data was written and read correctly. How about this time?

No luck. For some reason, the contents are broken when reading during the boot process. Sometimes the binary completely is broken, or sometimes it at least can print the first message. But, the first message was supposed to be "IC MEMORY CARD BOOT", which was broken like "IC MEMORY CAR@ BOKT" or "IC IEMORY CARD BOOT". Looked like bit 3 of 4N+2 byte tended to be flipping.


Broken Initial Message

Was it a bad memory chip? I swapped U1 and U2, it changed the way the data was broken, but still broken. Not likely to be a bad IC.

How is it broken? I also wrote a special IPL just for testing how the bytes are broken. It showed that most likely bit 3 of 2N+2th byte got broken, but other bytes can be broken, too. I wished I had a space to deploy my logic analyzer.

One thing I was concerned was pull-up resistors for back-up battery. This is for pulling up ~CE1 and ~CE2 when the SRAM card is removed from the computer, in which case by keeping ~CE1 and ~CE2 high, the memory contents of the SRAM will kept no change. I saw somewhere the typical pull-up resistor is 4.7K ohms, so I just picked up my 4.7K ohm resistor, but one of the Panasonic SRAM card data sheet was telling ~CE1 and ~CE2 were pulled up with 20K ohms resistors. Was it too small?

I made a hypothesis that because of too small pull-up resistors, ~CE1 and ~CE2 may not be turn clearly low. I just removed them and tried. It shouldn't do anything unless I use a backup battery.

Actually it made the situation worse. Strange thing was the data was read correctly if I was comparing with the file (while TOWNS was accessing SCSI2SD and the SRAM card alternately). If I just took memory dump, the contents were broken.

Pull-up resistors were doing something. But, still I couldn't tell if 4.7K ohms was appropriate.

Luckily, I have a few really dependable friends. So, this time I asked him. Immediately he suggested to check the voltage applied to the ICs. I have tested it while write- and read-testing. It was 4.5V. I was expecting more like 4.7V, but he said 4.5V should be ok. But, if I kept my multimeter connected, and pressed the reset button. Surprise! The voltage dropped to 3.6V, and stayed at 3.6V until it starts boot sequence. It didn't necessarily mean the voltage was staying 3.6V. It could have been fluctuating, but my multimeter must have been showing average voltage. 3.6V was too low for 5V logic. That must be why it could not boot.

It was a test SRAM module anyway. I didn't need a backup battery. I just shorted D1. Removed D2, R1 and R2. I just made it 32KB SRAM. I wrote my IPL and then reset with I,C,M keys held down. Then....



SUCCESS!!!! I was able to boot "The Visitor" from IC-Memory Card IPL!!!!

So, it was my bad choice of diodes. Actually I was just guessing it should be 0.3V or so. Was it really so? I just picked one of my diodes in my box, BAW27. I used it for my IR Emitter, in which I assumed the voltage drop was about 0.3V. Of course, it depends on how much current flowing through the diode. In SRAM card, it depends on how much current ICs eat. Datasheet of my SRAM IC told it can be up to 150mA or so, two ICs can eat 300mA. 300mA! I was not expecting SRAM chips eat that much current. Always something new to learn. If 300mA flowing through BAW27, the datasheet suggested, the voltage drop would be between 1V to 1.25V. It explains. I should have been more careful :-P

It was a big success toward IC Memory Card or PCMCIA Memory Card for Towns that can boot 1st, 2nd, and 3rd generation models. I am going to make the final version with FRAMs. Access speed of FRAMs are not that fast, but many PCMCIA Memory Card datasheet was suggesting the access speed can be as slow as a typical FRAM chip, and there is no pin for synchronization. So, I assume that TOWNS must be really conservatively reading/writing the IC Memory Card. Probably FRAMs are good enough. Anyway I'll experiment and see.

Below is the successful 32KB SRAM module connected to my PCMCIA extender.


2022/05/03

Presbyopia vs. Surface Mount

Finally! PCB, parts, etc. arrived. The last time, prototype SRAM card had only one surface mount, PCMCIA connector. But, I wanted to put this prototype inside the memory-card slot. So, everything was surface mount. Very small resistors, capacitors, and ICs, all I had to solder surface mount. Much more difficult than the last SRAM card prototype.


PCB

Comparison with NeoGeo memory card

I am not that old to have hands constantly shaking, but the problem was my eyes. My far vision didn't change since I was like 10 years old. I have no problem see far-flying airplanes. But, near-vision is getting difficult. My eye doctor gives reading glasses, but I didn't feel it was too helpful. So, this time, I used a pinhole glasses. You can google for one. It is a black plastic glass with small holes. The mechanism is same as a pinhole camera, or a camera with high F-stop. By reducing the aperture, you can gain focus depth in return. But, I was skeptical until I really wore it. My friend gave one to me because he didn't need it any more. I tried it on, and I was amazed. Isn't it better than reading glasses?

So I tried surface mount with this pinhole glasses.

Before beginning, my PCMCIA connector (I ordered a better one from mouser) was assuming 1.6mm PCB, but to assure it fits in FM TOWNS's memory-card slot, I made 0.8mm PCB. I had to narrow the space between front and back pins. For this purpose, I used an expired credit card. A credit card is a hard plastic, but easy to cut with a knife. I cut it so that to about the width of the row of the pins, and pushed front-side pins down to back-side pins. It successfully bent pins and narrowed the gap between pins.

Then, I applied some spare solder on some pads.

Then I put my pinhole glasses on, and temporary-fixed ICs.

Looks like I did it. THen I fixed all other parts, and finally the connector. The problem was how to fix it straight. My PCB was 0.8mm. My PCMCIA connector slot was for 1.6mm PCB. This time, I was able to utilize my expired credit card again. The credit card, happened to be 0.8mm thick. So, I cut thin pieces, and inserted to my PCMCIA connector together with the PCB. This filled the gap, and kept my PCB straight to the connector.

Done!

I checked with my multimeter that GND and +5V are not directly connected. Then, I put it on my PCMCIA extender, and connected to my FM TOWNS 2MX.

Power On!

I guess I chose a wrong LED. Too bright! Later I realized I chose a LED for lighting. I should have chosen one for indication. I like bright LED. It doesn't get hot. I'm fine.

Then I went down to the command mode, and used my memory card writer program, and verified it was successful. I was also able to boot from memory-card IPL. Then once turned the power off. If it forgets the contents, it's a failure. I need a non-volatile memory. I powered my FM TOWNS on with I,C,M keys held down. Success! FM TOWNS boot from my memory-card IPL! Battle of Presbyopia vs. surface mount ended with the Presbyopia's victory!

This boot screen was a re-take, but it is successful boot from the FRAM card.

Then I put the card inside the slot, and started. My LEDs were so bright that the light was visible from outside. But, I'm fine as long as it doesn't get hot.

I have confirmed the card fits in the memory-card slot. Actually I still was able to insert a credit card on top of the FRAM card in the slot. Which means 1.6mm PCB is good, too.

Lastly, I inserted the FRAM card in FM TOWNS 2F, and confirmed FM TOWNS 2F (2nd generation) is bootable from the FRAM card. Its slot also had a enough space to insert a credit card with the FRAM card. 1.6mm PCB should work.

But, one of the two cards I made didn't fit in the slot of 2F. I tried to use UV-hardening plastic to cover pins, but I guess I made it too thick. I need to be careful about the back-side of the PCB.

The 1st, 2nd, and 3rd generation FM TOWNS cannot boot directly from external SCSI CD Drive. So, until this success, those models had pretty much no option to start if the floppy disk drives, and internal CD drive were broken. However, with this FRAM card, those early generation models can boot from external CD drive (1st gen model needs a SCSI card). It should save many surviving FM Towns units.

Comments are welcome.  Send E-Mail to: 

Back to http://www.ysflight.com