summaryrefslogtreecommitdiff
path: root/Documentation/GameExec.doc
blob: e9818bfa72e559cfef4d46e0f00e8fec5237fed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
GAME EXEC - The ultimate Amiga operating system for game development
---------

Version 4.4, 16-Apr-92

© 1987-92 Christian A. Weber, Christian B. Haller, René Straub, Roman Werner



   *** Erlaubte Einträge in MyExecBase:

	APTR	meb_SuperStackUpper	; SuperStack am Anfang (READ ONLY!)
	WORD	meb_AttnFlags		; Kopie von ExecBase->AttnFlags
	WORD	meb_SystemBplcon0	; Kopie von gfxbase->system_bplcon0
	BYTE	meb_VBlankFrequency	; Kopie von ExecBase->VBlankFrequency
	BYTE	meb_expad2

	BYTE	meb_ActualKey		; RawKeyCode
	BYTE	meb_ActualQualifiers	; Qualifier-Bits, (BitNr=KeyCode-$60)
	BYTE	meb_ActualASCIIKey	; ASCII-Code
	BYTE	meb_CheatFlag		; >0 falls Cheat mode on

	STRUCT	meb_BobList,lh_SIZEOF	; für die Bobroutine
	APTR	meb_TripleScreen	; für die Bobroutine
	WORD	meb_SignalSet		; für die Bobroutine

	LONG	meb_UserData1		; Frei für den User, am Anfang 0
	LONG	meb_UserData2		; Frei für den User, am Anfang 0

	STRUCT	meb_exreserved,6	; + pad auf LONG, NICHT benutzen!

   *** Level 3 Interrupt-Vektoren, zum Patchen oder 0 reinschreiben

	UWORD	meb_VBLIntPad
	UWORD	meb_VBLIntJump
	APTR	meb_VBLIntVector

	UWORD	meb_CopperIntPad
	UWORD	meb_CopperIntJump
	APTR	meb_CopperIntVector

   *** Cia-Interrupt-Vektoren, zum Patchen oder 0 reinschreiben

	APTR	meb_CiaATimerAVector
	APTR	meb_CiaATimerBVector
	APTR	meb_CiaAAlarmVector
	APTR	meb_CiaASerialVector
	APTR	meb_CiaAFlagVector

	APTR	meb_CiaBTimerAVector
	APTR	meb_CiaBTimerBVector
	APTR	meb_CiaBAlarmVector
	APTR	meb_CiaBSerialVector
	APTR	meb_CiaBFlagVector


   *** System-Funktionen (use at your own risk!)

	ULONG		meb_SecretMagic	; PRIVAT
	FUNCTION	InitExec	; (ExecEvent)		(CRP)
	FUNCTION	ColdReboot	; ()			()
	FUNCTION	InitChipMem	; (Address,Size)	(A0/D0)
	FUNCTION	InitFastMem	; (Address,Size)	(A0/D0)
	FUNCTION	InitDisk	; (Product)		(D0)
	FUNCTION	InitKey		; ()			()
	FUNCTION	SetCache	; (NewCacheBits)	(D0)

   *** Debug-Funktionen

	FUNCTION	Debug		; ()			()

   *** Speicherverwaltung

	FUNCTION	AllocMem	; (Amount)		(D0)
	FUNCTION	AllocClearMem	; (Amount)		(D0)
	FUNCTION	AllocFastMem	; (Amount)		(D0)
	FUNCTION	AllocFastClearMem ;(Amount)		(D0)
	FUNCTION	FreeMem		; (Address)		(A1)
	FUNCTION	AvailMem	; ()			()
	FUNCTION	AvailFastMem	; ()			()
	FUNCTION	CheckMem	; ()			()
	FUNCTION	CopyMem		; (Src,Dest,Len)	(A0/A1/D0)
	FUNCTION	CopyMemQuick	; (Src,Dest,Len)	(A0/A1/D0)
	FUNCTION	ClearMem	; (Address,Len)		(A0/D0)

   *** Semaphoren

	FUNCTION	Disable		; ()			()
	FUNCTION	Enable		; ()			()
	FUNCTION	OwnBlitter	; ()			()
	FUNCTION	DisownBlitter	; ()			()

   *** Listenverwaltung

	FUNCTION	NewList		; (List)		(A0)
	FUNCTION	Enqueue		; (List,Node)		(A0/A1)
	FUNCTION	Remove		; (Node)		(A1)
	FUNCTION	AddHead		; (List,Node)		(A0/A1)
	FUNCTION	AddTail		; (List,Node)		(A0/A1)
	FUNCTION	RemHead		; (List)		(A0)

   *** Tastatur

	FUNCTION	GetKey		; ()			()
	FUNCTION	WaitKey		; ()			()
	FUNCTION	FlushKeyBuf	; ()			()
	FUNCTION	SetMap		; (KeyMap oder 0)	(A0)
	FUNCTION	SetResetHandler	; (Handler)		(A0)
	FUNCTION	SetCheatText	; (RawKeyCodes)		(A0)

   *** Ausgabe

	FUNCTION	RawDoFmt	; (wie normal :-))	(...)
	FUNCTION	RawPrintf	; (Stack)		(...)
	FUNCTION	PlayCDTrack	; (TrackNumber)		(D0)
	FUNCTION	WaitCDTrack	; (nüt)			()

   *** Zufall

	FUNCTION	Randomize	; (Value1,Value2)	(D0/D1)
	FUNCTION	Random		; (Limit)		(D0)

   *** Disk-Routinen

	FUNCTION	SetNoDiskHandler ;(Routine)		(A0)
	FUNCTION	ReadFile	; (Name,Address)	(D0/A0)
	FUNCTION	WriteFile	; (Name,Address)	(D0/A0)
	FUNCTION	LoadFile	; (Name)		(D0)
	FUNCTION	LoadFastFile	; (Name)		(D0)
	FUNCTION	LoadSeg		; (Name)		(D0)
	FUNCTION	UnLoadSeg	; (Segment)		(A1)
	FUNCTION	BufReadFile	; (Name,Address		(D0/A0)
	FUNCTION	BufLoadFile	; (Name)		(D0)
	FUNCTION	DeleteFileNode	; (Name)		(D0)
	FUNCTION	DeleteFileList	; ()			()
	FUNCTION	SendPacket	; (Packet)		(A0)

   *** Bob-Routinen

	FUNCTION	WaitBlit	; (Custom)		(A5)
	FUNCTION	InitDrawBob	; (BitMap)		(A0)
	FUNCTION	AddBob		; (NewBob)		(A1)
	FUNCTION	RemBob		; (Bob)			(A0)
	FUNCTION	RemAllBobs	; ()			()
	FUNCTION	RestoreBobList	; (BitMap)		(A1)
	FUNCTION	DrawBobList	; (BitMap)		(A1)
	FUNCTION	RestoreOneBob	; (Bob,BitMap)		(A0/A1)
	FUNCTION	DrawOneBob	; (Bob,BitMap)		(A0/A1)
	FUNCTION	AnimateOneBob	; (Bob)			(A0)
	FUNCTION	MoveOneBob	; (Bob)			(A0)
	FUNCTION	TestPoint	; (X,Y)			(D0/D1)
	FUNCTION	SetMovePrg	; (Bob,MPrg,Speed,Step) (A0/A1/D0/D1)
	FUNCTION	SetAnimPrg	; (Bob,APrg,Speed)      (A0/A1/D0)
	FUNCTION	SetGlobalClip	; (X,Y)			(D0/D1)
	FUNCTION	HandleCollision	; ()			()
	FUNCTION	CollOneBob	; (Bob)			(A0)
	FUNCTION	FlashBob	; (Bob,Time,Color)	(A0/D0/D1)
	FUNCTION	GetBobData	; (Bob)			(A0)->A2