• Please review our updated Terms and Rules here

Learning how to make a .sys drivers for EMS card

alejack12001

Experienced Member
Joined
Jul 26, 2020
Messages
417
Location
Fredericksburg, VA
I have a need to learn how to develop a driver for an EMS LIM card that doesn't have documentation and/or support software. I have an another EMS LIM card that has the driver, which I am using as a sample driver. In addition, I have executed the sample driver on the undocumented EMS LIM card. It works but the initialization procedure is looking in the wrong location for the memory chip addresses. I have looked at the structure of the sample driver using an editor called Atom and have seen the binary characters along with straight text and use; for example "DEVICE=@ES:BX" followed by use of $CX, $BX, and $DX used in open text within the sample. The arrangement of the say $BX characters suggest that the period languages such as C or Basic or Pascal or assembly could have been used to make the sample driver. There must be some procedure or methodology used to create these drivers. I would like to learn how to do this or have the members of the forum give me their impressions.
 
Considering the only thing that turns up outside the short thread on this forum (which seemed to be unresolved) when you google for this card is some pictures from an old for-sale listing for one programming one is going to be a little bit of a slog that's going to have to start with dissecting the hardware. Without a manual to even say what the switch settings are we don't even know what I/O ports to bang on.

A note about the Lo-Tech card, which is apparently a close clone of an old BOCA card: the hardware on this card is simple to the point of brain-death. There are a pair of old dual-ported register chips called 74LS670s on the card; these supply essentially *four bytes* of memory that have the special property of being written through one set of lines and read through a completely separate set. These four bytes of memory present themselves at four contiguous I/O addresses (Usually 0x260 with the lo-tech card), and each byte stored in them represents the top 8 bits of a 22 bit address space: the other 14 bits are the 16kbyte memory space represented by each EMS frame. That is literally all there is to the hardware. Because of the "dual-ported"-ness of the hardware these memory addresses can only be *written*. Trying to read the I/O addresses will produce no hint that there's even anything there. So actually *detecting* one of these cards in software is kind of non-trivial.

All the driver does to map a 16k page of the RAM on the card into an EMS page is write a single byte directly to the associated port address. So, for instance, imagine the switches that set the 64k EMS frame address are set so it starts at 0xE0000. The four pages and their I/O ports will thus map out as:

0xE0000 = 0x260
0xE4000 = 0x261
0xE8000 = 0x262
0xEC000 = 0x263

Let's pretend your card works exactly the same way; maybe a bad assumption, but whatever, but you don't know where either the EMS page frame is or what the port address for the registers is. I guess you could try sticking the card in a PC with a bare minimum config (to reduce the chances of a hardware conflict) and scanning upper memory for RAM; Checkit could do this for you easily, with no driver loaded. It's possible some will show up, it depends on if the card explicitly clears its hardware registers or if they come up in some random state. If some does then, great, you have a lead on where the EMS frame lives. If nothing shows up then life is harder, but whatever. The next step is to use whatever language you want to try writing something to your suspected page frame area (or a candidate page frame area if you have no leads), writing a number to an I/O port you *suspect* could be the address of the register that controls that frame, and then checking that area you just wrote to see if the contents changed. If the hardware were really like a lo-tech with enough systematic banging you should be able to figure it out.

All I can say about your chances there is there's a photo on Worthpoint that suggests this card may in fact use a pair of 74LS670's for "something". That at least implies it's a "dumb" EMS 3.2 level card with a single simple register set instead of a hardware EMS 4.0 card, which you probably would not have a snowflake's chance of figuring out just pounding randomly on it.
 
... To get an idea of how simple the mapping *can* be I wrote a really brain dead not-a-driver thing to convert 64k of memory on a lo-tech compatible card into an upper memory block. Here's BASIC code that would do exactly what that driver does in assembly:

10 iobase=&h260
20 For x=0 to 3
30 out iobase+x,x
40 next x

Literally this just stuffs the numbers 0 through 3 into the four I/O addresses corresponding to the page frames. After running this if I do this:

def seg=&hE000
poke 0,69

then peeking that same address:

print peek(0)

will return the value I put into it because there will be RAM there. If I change that page to a different one:

out &h260,1

Then peeking there will return something else. Even more fun:

def seg=&hE000
out &h260,0
out &h261,0

poke 0,123
print peek(&h4000)
poke &h4000, 69
print peek(0)

I'll let you work out why those peeks to a different location than the poke return the same number after that pair of OUT commands.

Again, if your card is *this* simple then maybe you have a fair chance of working it out well enough you could patch the ltemms.sys driver for it.
 
First of all, let me thank all who responded to this issue regarding the development of drivers for LIM EMS cards. Chuck(G), I am sorry to say that the link you suggested doesn't seem to work; the /res/ seem to bomb out.

Yes, I know and acquired a Lo Tek card, but, found out from Eudimorphodon that the design was quite a bit different than the Boca or IBM RAMBANK cards of the 1980's. So, when the opportunity arose that I could find a similar type card to Boca or RAMBANK card then I would hop on to it. I did, however, the Memo 20000Xt card is suppose to be a clone of the IBM RAMBANK PC. I found a couple of ad's for the Memo, which projected itself as the affordable alternative to the IBM RAMBANK card. In addition, at the following website: https://www.atarimagazines.com/compu...ion_Boards.php I found the Memo 2000X listed along with a listed manufacturer DFI or Diamond Flower Electric Instruments out of West Sacramento, CA. Of course, the company doesn't exist any more and I don't know if they were bought out by another company or just died away. Included with this post are two pictures: one is the Memo chips picture as shown in "Memo Chips.jpg" while the other is a listing of the chips and what they are according to what was found on the web from different dealers who are still selling these chips; "Memo chips definded.jpg". Note there is no manufacturer or FCC label on this card.

As I said, there is no known documentation on the web or print form and software for the Memo card. AD articles found on Google from sources such as PC Compute seem to point the Memo card to be a clone of the IBM PC/XT RAMBANK card. I have found AT users manual on the web for the AT-RAMBANK as an undeclared pdf that is not labeled by any manufacturer. The manual is written with the usual FCC declaration and enough covets to keep the buyer from determining who manufactured the manual and referring the buyer to the dealer to correct any problems that might arise. The interest in the manual was for me the addressing array seemed to match the first four switches of the Memo card. A table shows addresses that start at 208h and end at 2FAh. The table shows the 258h that I am using as 2 & 4 on with 1 & 3 off. So, yes it may be prudent to try the first four switches to see if all being turned on are addressing 208h as stated in the table. I'll leave the remaingin switches alone for now.Memo Chips.jpg - Click image for larger version  Name:	Memo Chips.jpg Views:	0 Size:	150.9 KB ID:	1225260Memo chips definded_1.jpg - Click image for larger version  Name:	Memo chips definded_1.jpg Views:	0 Size:	223.5 KB ID:	1225261

I need to point out that the Memo card is residing in another AT&T 6300 with its reversed addressing that was pointed out to me some time ago. The original Boca XT card that I have is addressed at 208h with E000h and seems to work fine in my first 6300. The current 6300 machine has addresses assigned at C800h for the MFM hard drive using 320h and D800h is the Lo Tek XT-CF card that works at 300h. I'll try the Checkit to see if it see the expanded memory. However, I don't think it will see it without the driver in place.

I have a Boca AT users manual paperback coming. I know there is a Boca XT manual and have picture of it; but I didn't see it for sale or pdf for it. Also I have an IBM RAMBANK PC users manual coming, paperback. Since this Memo is a clone of the IBM then maybe this manual will shed some light on the Memo and correct the addressing.
 
Don't know what's wrong with your browser (I'm running FF ESR under Buster), but here's the text file zip-ed up. It's the spec that I used when writing my EMS driver--it's essentially the standard.
 

Attachments

  • limems40.zip
    50.6 KB · Views: 8
Thank you, Chuck(G) for the download. My Firefox will no allow any http websites pass. So as yours, I try it on my Raspberry Pi which is using Chrome which has similar response to Firefox on laptop. I did go to the primary website but couldn’t find the file. I tried entering the address manually and sort of got problems with /res/. I appreciate you sending this to me, however.
 
Yes, I know and acquired a Lo Tek card, but, found out from Eudimorphodon that the design was quite a bit different than the Boca or IBM RAMBANK cards of the 1980's.

I think you may have somewhat misunderstood that exchange. (This thread?) The point I was making about the Lo-Tech card was that despite it having an "EMS 4.0"-compliant driver in terms of hardware it's actually a bare minimal EMS 3 hardware feature set; EMS 4.0 has a lot of optional features and from that thread the one you wanted was the ability of the card to arbitrarily remap memory pages into empty spaces in upper memory. (Or even in the conventional memory area, if the motherboard is set up not to conflict.) It seems like you may have interpreted what I said to mean that "all" 80's EMS cards implemented those features? Because that's very much not the case. Many, if not most, EMS cards from that era are just simple pagers, no hardware mapping. The blunt fact is that the market window for those cards was pretty small: it was only two or three years (if that?) after the LIM/EMS 4.0 standard was official that 386 prices dropped low enough to make investing in an expensive RAM card for your XT or 286 sort of pointless.

This card you bought frankly looks like it's just as "dumb" as the Lo-tech card, or the specific BOCARAM card it's a close copy of. Like I said, the only "register memory" I see on that thing is the pair of 74LS670s, which gives you four 8 bit page registers, exactly the same register capacity as the Lo-Tech. (The lo-tech uses four 74LS/HCT573s instead of the 670's but they accomplish exactly the same task.) I don't see anything on this card that suggests it supports extended pageframes or conventional remapping. So my deep suspicion is that even if you spent the effort resurrecting a driver for this it's not going to do what you wanted.

If you want a card that actually does EMS 4.x in hardware you're going to want to look for a namebrand thing, not a knockoff. I'm not even going to try to make a recommendation myself because I've never owned a full, actual, EMS 4.0 card with working page registers, and my understanding is that only a rare few cards actually had them and even within them the feature set wasn't completely consistent from manufacturer to manufacturer.
 
Thank you, Chuck(G) for the download. My Firefox will no allow any http websites pass. So as yours, I try it on my Raspberry Pi which is using Chrome which has similar response to Firefox on laptop. I did go to the primary website but couldn’t find the file. I tried entering the address manually and sort of got problems with /res/. I appreciate you sending this to me, however.

I suspect that it's more of a Windows thing. I'm Linux and can even fetch the text file from the command line using wget().
 
I haven't abandoned this post. I have been reading everything that was suggested by Eudomorphodon and Check(G). In the mean time, I received a book that was authored probably in the 1980's on a RAMBANK called "RAMBANK Memory Expansion Board Users Manual." It's one of the gray books that were prevalent from small company's during the 1980's and 90's. The title page of the book has RAMBANK as a trademark of Diamond Fowler Instrument Co. (U.s.A) Inc. Notice that the DFI doesn't refer to Diamond Flower Instrument but to Diamond Fowler Instrument Co.

In the book, there is a description of the LIM EMS. The 2MB MEMO card is displayed with the switch settings. The first four switches address a range of addresses 218h to 2A8h. I have left mine at 258h. Switches 5-7 address how much conventional memory that exists on the motherboard from 64K to 640K. The last switch sets the size of the RAM chips that are on the card as being either 64 KB off or 256 KB on. Book software lists the following:

1. initial.sys - Is a character device driver. The initial.sys sets up the software driver for EMS LIM specification. The specification version is not addressed.

2. ramdisk.com - An electronic disk emulator, which uses the expanded memory (above 640K) as a disk buffer. Four RAMdisks are supported to help the user access data or execute programs faster.

3. ramhelp.com - Is a utility that lists the ramdisk and ramdiska operations menu. The operations options and types are described in detail.

4. pspool.com - Is a program that uses a portion of conventional memory (below 640k) as a print buffer and enables the PC to perform other tasks even while printing. The users print output data is queued in a predefined area of memory and printed using the PC system interrupt.

5. pspoola.com - Is similar to pspool.com with the exception that the program uses EMS (above 640k) as print buffer as was descfibed in pspool.com.

6. ramconf.com - I s a program that displays the current RAMBANK and PC memory status message.

7. banktest.com - Is a program that tests the RAMBANK's page segment.

The seller of the book had the software disk, but sold it before the book. So, the software for the 2000Xt is out there just have to be patent to see if it surfaces. I did acquire DFI Memo 2000At from oldskoolers.org website. The At version is similar and different as it does address the EMSLIM 4.0 specification in a sys file. However, that sys file doesn't work with the 2000 Xt as it looks for switch settings that don't exist on the 2000Xt board. So, I am at an impasse. Suggestions?
 
Without knowing the functioning of the various LSI components on the board, you'll pretty much out of luck, unless you can find the manufacturer's driver.
 
Back
Top