Welcome, Guest. Please login or register.

Author Topic: Writing data on expansion connector in C  (Read 2550 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Writing data on expansion connector in C
« on: January 20, 2009, 12:09:45 AM »
There is no direct access.

Basically Zorro HW initializes and then the resources will be available to the OS via normal OS functions.

There are some low level functions such as expansion.library FindConfigDev() and WriteExpansionByte(), though. Even these only poke the HW in a very controllable and transparent way.

If you want to connect your own device you must implement Zorro2 for it. Refer to the Amiga Hardware Reference Manual, Appendix G, "AUTOCONFIG (TM)".
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Writing data on expansion connector in C
« Reply #1 on: January 20, 2009, 06:35:57 AM »
Quote
A quick view of it makes it look fairly complicated -- I was hoping to implement something more simple. Hrrmm..

For something simple you could look into serial, parallel or clockport (though A500 needs a clockport adapter for that).
Quote
When you say normal OS functions, can you be more specific and give me examples?

AllocMem/FreeMem to acccess memory for example. exec device drivers to access block devices, such as SCSI controllers.

There is typically some "firmware" software that initializes the zorro hardware, but even this get the I/O addresses dynamically, rather than banging some fixed addresses. Zorro isn't some simple fixed I/O addresses you can bang. The whole point of Zorro is to be dynamic and allow all sorts of configurations and make it work automagically (plug'n'play over decade before microsoft brought it to PC).

That being said, it is not impossible. A500IDE is one example:

http://www.amiga.org/gallery/index.php?n=953=7
http://www.amiga.org/gallery/index.php?n=946=7
http://www.amiga.org/gallery/index.php?n=954=7

Or another build:
http://www.amiga.org/gallery/index.php?n=2528=7
http://www.amiga.org/gallery/index.php?n=2529=7

Schematics, pcb design and ide.device driver software with sources:
http://aminet.net/package/docs/hard/a500ide

This particular device is quite hacky however, for example the driver is built to access the fixed address for the AT registers. It works only because the unit is the only Zorro device plugged in. But if you assume this things get slightly easier. Such design isn't "proper" Zorro2 however.