1 #ifndef HIDD_SM502GFXCLASS_H
2 #define HIDD_SM502GFXCLASS_H
5 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
8 Desc: Some SM502Gfx useful data.
12 #include <exec/interrupts.h>
13 #include <exec/semaphores.h>
14 #include <exec/memory.h>
15 #include <exec/nodes.h>
16 #include <exec/types.h>
21 #define CLID_Hidd_SM502Gfx "hidd.gfx.sm502"
25 struct Interrupt ResetInterrupt
;
28 #define ATTRBASES_NUM 6
30 struct SM502Gfx_staticdata
32 OOP_Class
*basebm
; /* baseclass for CreateObject */
34 OOP_Class
*sm502gfxclass
;
36 OOP_Object
*sm502gfxhidd
;
37 OOP_Object
*visible
; /* Currently visible bitmap */
38 struct SM502_HWData data
;
39 struct SignalSemaphore framebufferlock
;
40 struct SignalSemaphore HW_acc
;
41 OOP_AttrBase attrBases
[ATTRBASES_NUM
];
46 struct Library library
;
47 struct SM502Gfx_staticdata vsd
;
50 #define LOCK_FRAMEBUFFER(xsd) ObtainSemaphore(&xsd->framebufferlock)
51 #define UNLOCK_FRAMEBUFFER(xsd) ReleaseSemaphore(&xsd->framebufferlock)
53 #define XSD(cl) (&((struct SM502GfxBase *)cl->UserData)->vsd)
55 #undef HiddChunkyBMAttrBase
56 #undef HiddBitMapAttrBase
57 #undef HiddGfxAttrBase
58 #undef HiddPixFmtAttrBase
59 #undef HiddSyncAttrBase
62 /* These must stay in the same order as interfaces[] array in sm502gfx_init.c */
63 #define HiddChunkyBMAttrBase XSD(cl)->attrBases[0]
64 #define HiddBitMapAttrBase XSD(cl)->attrBases[1]
65 #define HiddGfxAttrBase XSD(cl)->attrBases[2]
66 #define HiddPixFmtAttrBase XSD(cl)->attrBases[3]
67 #define HiddSyncAttrBase XSD(cl)->attrBases[4]
68 #define HiddAttrBase XSD(cl)->attrBases[5]
70 #endif /* HIDD_SM502GFXCLASS_H */