Drivers for the MNT ZZ9000 graphics and ARM coprocessor card for classic Amigas.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

77 lines
1.8 KiB

  1. /*
  2. devinit.c
  3. (C) 2018 Henryk Richter <henryk.richter@gmx.net>
  4. initialization structures and data
  5. */
  6. #include <proto/exec.h>
  7. #include <proto/utility.h>
  8. #include <proto/dos.h>
  9. #include <dos/dostags.h>
  10. #include <utility/tagitem.h>
  11. #include <exec/lists.h>
  12. #ifdef HAVE_VERSION_H
  13. #include "version.h"
  14. #endif
  15. #include "device.h"
  16. #include "macros.h"
  17. #include <exec/initializers.h>
  18. #define xstr(a) str(a)
  19. #define str(a) #a
  20. #ifndef DEVICEEXTRA
  21. #define DEVICEEXTRA
  22. #endif
  23. static const char _DeviceVersionString[] = "$VER: " xstr(DEVICENAME) " " xstr(DEVICEVERSION) "." xstr(DEVICEREVISION) xstr(DEVICEEXTRA) " (" xstr(DEVICEDATE) ")";
  24. const char *DeviceVersionString = (const char *)_DeviceVersionString;
  25. const char DeviceName[] = xstr(DEVICENAME);
  26. const APTR DeviceFunctions[] = {
  27. (APTR) DevOpen,
  28. (APTR) DevClose,
  29. (APTR) DevExpunge,
  30. (APTR) LibNull,
  31. (APTR) DevBeginIO,
  32. (APTR) DevAbortIO,
  33. (APTR) -1
  34. };
  35. #define WORDINIT(_a_) UWORD _a_ ##W1; UWORD _a_ ##W2; UWORD _a_ ##ARG;
  36. #define LONGINIT(_a_) UBYTE _a_ ##A1; UBYTE _a_ ##A2; ULONG _a_ ##ARG;
  37. struct DeviceInitData
  38. {
  39. WORDINIT(w1)
  40. LONGINIT(l1)
  41. WORDINIT(w2)
  42. WORDINIT(w3)
  43. WORDINIT(w4)
  44. LONGINIT(l2)
  45. ULONG end_initlist;
  46. } DeviceInitializers =
  47. {
  48. INITBYTE( STRUCTOFFSET( Node, ln_Type), NT_DEVICE),
  49. 0x80, (UBYTE) ((LONG)STRUCTOFFSET( Node, ln_Name)), (ULONG) &DeviceName[0],
  50. INITBYTE( STRUCTOFFSET(Library,lib_Flags), LIBF_SUMUSED|LIBF_CHANGED ),
  51. INITWORD( STRUCTOFFSET(Library,lib_Version), DEVICEVERSION ),
  52. INITWORD( STRUCTOFFSET(Library,lib_Revision), DEVICEREVISION ),
  53. 0x80, (UBYTE) ((LONG)STRUCTOFFSET(Library,lib_IdString)), (ULONG) &_DeviceVersionString[6],
  54. (ULONG) 0
  55. };
  56. const APTR DeviceInitTab[] = {
  57. (APTR) sizeof( DEVBASETYPE ),
  58. (APTR) &DeviceFunctions,
  59. (APTR) &DeviceInitializers,
  60. (APTR) DevInit
  61. };