![]() |
|
||||||
|
|
||||||
MAC OS SUPPORT FOR DEVELOPERS1. IntroductionWe realize the enormous popularity of the Apple's products, and have created software support for our USB2ISA family of products and USB2PCMCIA product under Mac OS X operating system.The software support contains of core install binaries and the developer's support files. We are providing a basic API (application programming interface) set for developers allowing building of applications that can access i/o ports and physical memory areas. An additional api set is available in our SDKBUS kit allowing for ISA cards mounted on our USB2ISA family of products and PCMCIA card mounted on the USB2PCMCIA product. We have geared our Mac OS X product release specifically for developers and programmers, who can take the source code of a specific ISA or PCMCIA card , and make it working with our USB2ISA / USB2PCMCIA products. Our initial release is for Apple computers based on Intel processors - running Mac OS X, as well as x86 based computers - running OpenDarwin, the open source build of Mac OS X, available on www.opendarwin.org. 2. Where is the source code?We have developed an independent USB2 host and device support. Originally developed under Windows operating systems and ported for Linux, it is currently working under Mac OS X operating system.We do not share our source code with developers or users - it is our company proprietary and confidential code. We are providing instead an easy to use interface to our products , together with samples. The current Mac OS X kernels contain USB2 EHCI host support. Our USB2 host support can co-exist with the built in Mac OS X USB2 host support. If needed, you can add an USB2 host controller - as a PCI card to a desktop computer, or a PCMCIA card to a notebook computer, and use this controller specifically for the USB2ISA family of products and USB2PCMCIA product. 3. Core binaries useThe Mac OS X release files are packed in a single .zip file. The file name includes our release number - for ex. macosx-2-0-3.zip. Every time any of the files are updated, the release number is increased to reflect the change.You can copy the .zip file to a disk, unpack/unzip, and copy the files to a folder on your MAC OS x system. Our core binaries contain 1 driver - 'arstech.kext' , and two applications - arsenum : The binaries have been built and tested for 32bit / i386 type processors , including the 32bit families of - 3.1 loading our driver3.1.1 loading under Mac OS X -For loading under Mac OS X - Please start first the 'Terminal' utility. There is a little script file which helps with loading of the driver - arsinit.bat . Please run it from a command line in 'Terminal' like -./arsinit.bat The different commands in the above script will require the 'root' password. Please type it when prompted. 3.1.2 loading under Open Darwin -The same script file as above, which helps with loading of the driver - arsinit.bat, can be run from a command line like -./arsinit.bat Please type, if prompted, the 'root' password. The driver is the same one for Open Darwin and Mac OS X (Intel) environments. 3.2. ARS Technologies enumerator3.2.1. Finding the correct binaryThe Mac OS X and Open Darwin environments have different file formats and we provide one 'arsenum' for each environment.The Mac OS X 'arsenum' is in the main folder, and the Open Darwin 'arsenum' is in the 'opendarwin' subfolder of this main folder. An attempt to run the 'arsenum' from one environment on the other one , will bring the message - "Exec format error. Binary file not executable." 3.2.2. Enumerator useYou can load the enumerator on command line as - ./arsenumIf needed, please change the mode of arsenum to allow execution - chmod u+x arsenum The program scans and reports the computer system's i/o and memory spaces. When first run the program shows the number of USB2 EHCI hosts found, and if there are more than one, asks for a selection of which one will be used with our USB2ISA / USB2PCMCIA products. The selection is stored and the next time the program is run, there is no selection prompt. To select another host - choose 'd' on the main command selection, re-run the program and make another selection. When an USB2ISA / USB2PCMCIA product is connected / disconnected there is text messages. When inserted, the enumerator reports the type of the card - USB2ISA or USB2PCMCIA, the usb port where it was connected. A scanning of the hardware resources is performed and the found i/o ports, and physical memory areas are reported. The scanning of the hardware resources is not ideal, and some hidden ports / memory areas may not be recognized or reported. The main command prompt of the enumerator contains a selection of commands for manual read/write of i/o & physical memory spaces. Please use for an initial check / test of the ISA / PCMCIA cards - manual reading/writing of/to the detected resources. Next, a developer of an application, based on our API set, for an ISA or PCMCIA card can run the application. The enumerator - 'arsenum' has to be running, in order to use the above application and the ISA or PCMCIA card. 4. Developer's support4.1 Basic API setHere is the commands list :Standard commands used by application for direct access to i/o ports - Standard commands used by application for direct access to physical memory - - Where i/o port read/write - port range 0-ffff (64 kB space) physical memory read/write - address range 0-fffff (1mB space) !!! Note1: In order to read/write meaningful values , the ARSTech enumerator should be running , the USB2ISA / USB2PCMCIA card needs to be connected and recognized by the enumerator , and the mounted ISA / PCMCIA card need to actually have the i/o port or the physical memory area being accessed. !!! Note2: Please note the calling convention of the api set - outb/outw , writeb/writew commands. The first parameter in our api set is the address of the port or physical memory , compared to other operating systems where the address is the second parameter. Please replace if needed, as for ex. - #define outb(a, b) out8(b, a) !!! Note3: An additional API set is available in our SDKBUS kit allowing the additional possibilities of - for ISA cards mounted on our USB2ISA family of products and PCMCIA card mounted on the USB2PCMCIA product. 4.2 Samples for using our API setThere are 2 samples located in 'sample-st' and 'sample-dyn' directories, showing reading of sector 1 - partition table of a hard disk , connected to an ISA I/O card mounted on USB2ISA - the type that has one floppy , one ide controllers , 2 serial and one parallel ports . The disk needs to be connected and powered on.In addition the ARSTech enumerator should be running, the USB2ISA / USB2PCMCIA card needs to be connected and recognized by the enumerator, and the mounted ISA / PCMCIA card need to actually have the i/o port or the physical memory area being accessed. To build the samples you can run the script file - ./mk.bat The api set in 'sample-st' is obtained from our archive (or static library) file - libars1.a . You will need to link with this archive for every new project you are building. The api set in 'sample-dyn' is obtained from the dynamic library file - arsusb1.so. You will need to place this file in a common directory, for ex. in '/usr/lib' . 5. Developing new and porting existing softwareApple Computer provides an excellent support for developers, they can find extensive information online on - http://developer.apple.com.In general, for accessing hardware Apple provides the IOKit which is a collection of interfaces, each for a particular device group - like for USB, PCI, FireWire, PC Card, etc. The way of getting access to the actual hardware resources is quite complex, with a developer having to deal with - We are providing a very easy and straightforward way of dealing with hardware - similar to the way used in the BSD family of operating systems, or Linux operating system. Our basic api set provided with the installation software, and the advanced api set - provided in sdkbus, allows quick building of simple command line / Terminal applications, as well as beautiful 'Carbon' and 'Cocoa' graphical applications. 6. Running DOS programs with USB2ISA / USB2PCMCIAYou can run DOS applications and drivers under Mac OS X using DOS emulators. One well-maintained and supported one is - DosBox available from http://dosbox.cjb.net.After downloading the source code and saving it, you need to identify, open and edit the files dealing with access to hardware resources - i/o ports, physical memory, irq and dma channels. Using the information provided above in ch4.1 - on our basic api set, and ch4.2 - on samples , you can modify the files, compile, and link with libars1.a for ex. Then you can run the enumerator, connect USB2ISA / USB2PCMCIA, run dosbox , run the DOS application and test. The above set-up can be used when the ISA or PCMCIA card you have has and uses only i/o ports, and / or physical memory area. If the card has IRQ channels, and/or DMA channels you will need the additional api set available in our SDKBUS product. |
Copyright © 2008 ARS Technologies, Inc All Rights Reserved Customer Login - Order Tracking - View Cart - Advanced Search - ARS Tech Product Update List - Warranty/Refund Policy - Privacy Policy - Terms of Use - Contact Us - SiteMap |