Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: kamiga on January 19, 2009, 11:17:01 PM
-
How would one go about writing data on an A500's expansion connector in C? Are there some Write() routines that would clock a data buffer out of the port?
Or is it simply a matter of making sure the device that is attached to the expansion port is paying attention to the data bus at the right moment?
What libraries would be involved? Registers? Address ranges, etc?
Thanks!
Keith
-
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)".
-
Thanks for the quick and straight-forward answer.
I have the 3rd edition of AHRM, and it might be Appendix K, "Zorro Expansion Bus." It has a section, on page 431, entitled "AUTOCONFIG(TM)."
A quick view of it makes it look fairly complicated -- I was hoping to implement something more simple. Hrrmm..
When you say normal OS functions, can you be more specific and give me examples?
Thanks
-
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).
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.
-
Hahaha. I was just looking at A500IDE today for just this thing.
The idea behind looking at the expansion interface, over the other interfaces was speed. Serial is super slow, I think Parallel isn't too bad, and I honestly know little/nothing about the clockport.
Thanks for the links, though.
Keith
-
@kamiga
why do you want to write to the expansion slot ?