4 Original GPL release version 4.12
5 Copyright 1993-2000 Jonathan Potter
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 All users of Directory Opus 4 (including versions distributed
22 under the GPL) are entitled to upgrade to the latest version of
23 Directory Opus version 5 at a reduced price. Please see
24 http://www.gpsoft.com.au for more information.
26 The release of Directory Opus 4 under the GPL in NO WAY affects
27 the existing commercial status of Directory Opus 5.
33 #include <proto/inovamusic.h>
35 #include <proto/ahi.h>
36 #include <workbench/icon.h>
38 #ifndef SAMPLETYPE_Stereo
39 #define SAMPLETYPE_Stereo SVX_STEREO
42 #define RAWKEY_ESC 0x45
46 static struct DOpusRemember
*audio_key
; /* Memory key for 8SVX player */
48 static struct MsgPort
*audio_port
[2]; /* 8SVX Sound player Ports */
50 static struct IOAudio
*audio_req1
[2]; /* Audio IO Request block #1 */
51 static struct IOAudio
*audio_req2
[2]; /* Audio IO Request block #2 */
53 static UBYTE
*audiodata
; /* Audio data to play */
54 static ULONG audio_size
; /* Size of audio data */
56 struct Library
*AHIBase
;
57 static struct MsgPort
*AHImp
;
58 static struct AHIRequest
*AHIio
;
59 static BYTE AHIDevice
= -1;
60 static struct AHIAudioCtrl
*actrl
;
64 int showpic(fullname
,np
)
71 if (checkexec(fullname
) && checkisfont(fullname
,buf
))
72 return((showfont(buf
,atoi(BaseName(fullname
)),np
)));
75 if (a
>5 && Stricmp(&fullname
[a
-5],".info")==0) {
76 if ((res
=readicon(fullname
,np
))==0) return(1);
82 dostatustext(globstring
[STR_NO_CHIP_FOR_ICON
]);
88 if (!(res
=LoadPic(fullname
))) doerror(-1);
89 else if (res
==IFFERR_NOTILBM
) dostatustext(globstring
[STR_FILE_NOT_ILBM
]);
90 else if (res
==IFFERR_BADIFF
) dostatustext(globstring
[STR_ERROR_IN_IFF
]);
91 else if (res
==IFFERR_NOMEMORY
) dostatustext(globstring
[STR_NO_CHIP_FOR_PICTURE
]);
92 else if (res
==IFFERR_BADMODE
) dostatustext(globstring
[STR_SCREEN_MODE_UNAVAILABLE
]);
93 else if (res
==IFFERR_NOSCREEN
) dostatustext(globstring
[STR_UNABLE_TO_OPEN_WINDOW
]);
94 if (res
==-1) return(-1);
95 else if (!res
|| res
<-1) return(0);
99 int checkisfont(pathname
,fontname
)
100 char *pathname
,*fontname
;
103 char fontsize
[36],fontpath
[256],*ptr
;
105 strcpy(fontpath
,pathname
);
106 if ((ptr
=BaseName(fontpath
))) {
107 strcpy(fontsize
,ptr
);
109 if ((ptr
=BaseName(fontpath
))) {
111 if (!(_isdigit(fontsize
[a
]))) break;
114 strcat(fontpath
,".font");
115 if (CheckExist(fontpath
,NULL
)) {
116 strcpy(fontname
,fontpath
);
125 int readicon(name
,np
)
129 struct DiskObject
*dobj
;
131 struct Image
*icon_image
[2];
133 int fred
,ret
,width
,height
,x
,y
,x1
,y1
,imagenum
,depth
;
135 if (!IconBase
) return(0);
137 name
[(strlen(name
)-5)]=0;
138 if (IconBase
->lib_Version
>= 44) dobj
=GetIconTags(name
, ICONGETA_Screen
, NULL
, ICONGETA_GenerateImageMasks
, FALSE
, TAG_END
);
139 else dobj
=GetDiskObject(name
);
141 if (dobj
== NULL
) return(-2);
143 gad
=&(dobj
->do_Gadget
);
145 if (IconBase
->lib_Version
>= 44)
147 icon_image
[0]=(struct Image
*)1;
152 icon_image
[0]=(struct Image
*)gad
->GadgetRender
;
153 depth
=icon_image
[0]->Depth
;
154 D(bug("icon depth: %ld\n",icon_image
[0]->Depth
));
155 // if (depth>4) depth=4;
157 if (!icon_image
[0] || !(setupfontdisplay(depth
,coltab
))) {
158 FreeDiskObject(dobj
);
161 if (IconBase
->lib_Version
>= 44)
165 // IconControl(dobj,ICONCTRLA_IsPaletteMapped,&isPMicon,TAG_END);
166 LoadRGB4(&fontscreen
->ViewPort
,coltab
,256);
167 LayoutIconA(dobj
,fontscreen
,NULL
);
168 LoadRGB4(&fontscreen
->ViewPort
,nullpalette
,256);
169 icon_image
[0]=(struct Image
*)(gad
->GadgetRender
);
172 if (gad
->Flags
&GADGHIMAGE
) icon_image
[1]=(struct Image
*)gad
->SelectRender
;
173 else icon_image
[1]=icon_image
[0];
175 for (x
=0;x
<2;x
++) icon_image
[x
]->NextImage
=NULL
;
179 ScreenToFront(fontscreen
);
180 ActivateWindow(fontwindow
);
182 width
=fontscreen
->Width
;
183 height
=fontscreen
->Height
;
185 DrawImage(fontwindow
->RPort
,icon_image
[0],
186 ((width
-icon_image
[0]->Width
)/2),
187 ((height
-icon_image
[0]->Height
)/2));
189 FadeRGB4(fontscreen
,coltab
,(1<<depth
),1,config
->fadetime
);
190 show_global_icon
=dobj
;
191 show_global_icon_name
=BaseName(name
);
194 if ((fred
=WaitForMouseClick(2,fontwindow
))==-2) {
196 x
=(width
-icon_image
[imagenum
]->Width
)/2;
197 y
=(height
-icon_image
[imagenum
]->Height
)/2;
198 x1
=x
+icon_image
[imagenum
]->Width
;
199 y1
=y
+icon_image
[imagenum
]->Height
;
200 DrawImage(fontwindow
->RPort
,icon_image
[imagenum
],x
,y
);
201 drawrecaround(fontwindow
->RPort
,/*0,0,*/x
,y
,x1
,y1
,width
,height
);
204 if (fred
==0 || fred
==-3) ret
=TRUE
;
209 show_global_icon
=NULL
;
210 if (fred
!=-3) FadeRGB4(fontscreen
,coltab
,(1<<depth
),-1,config
->fadetime
);
211 //cleanicon: // HUX - this label is unused
212 FreeDiskObject(dobj
);
213 cleanup_fontdisplay();
217 void drawrecaround(r
,/*l,t,*/x
,y
,x1
,y1
,width
,height
)
219 int /*l,t,*/x
,y
,x1
,y1
,width
,height
;
223 o
=GetAPen(r
); SetAPen(r
,0);
224 if (x
>0) RectFill(r
,/*l*/0,/*t*/0,/*l+*/x
-1,/*t+*/height
-1);
225 if (x1
< /*l+*/width
) RectFill(r
,/*l+*/x1
,/*t*/0,/*l+*/width
-1,/*t+*/height
-1);
226 if (y
>0) RectFill(r
,/*l*/0,/*t*/0,/*l+*/width
-1,/*t+*/y
-1);
227 if (y1
< /*t+*/height
) RectFill(r
,/*l*/0,/*t+*/y1
,/*l+*/width
-1,/*t+*/height
-1);
231 /******************************************************************************
232 **** OpenAHI ******************************************************************
233 ******************************************************************************/
235 /* Open the device for low-level usage */
239 if((AHImp
= CreateMsgPort())) {
240 if((AHIio
= (struct AHIRequest
*)CreateIORequest(AHImp
,sizeof(struct AHIRequest
)))) {
241 AHIio
->ahir_Version
= 4;
242 if(!(AHIDevice
= OpenDevice(AHINAME
, AHI_NO_UNIT
,(struct IORequest
*) AHIio
,0))) {
243 AHIBase
= (struct Library
*) AHIio
->ahir_Std
.io_Device
;
252 /******************************************************************************
253 **** CloseAHI *****************************************************************
254 ******************************************************************************/
256 /* Close the device */
260 AHI_FreeAudio(actrl
);
262 if(! AHIDevice
) CloseDevice((struct IORequest
*)AHIio
);
264 DeleteIORequest((struct IORequest
*)AHIio
);
266 DeleteMsgPort(AHImp
);
274 ULONG
AHISoundFunc(void);
276 struct EmulLibEntry GATE_AHISoundFunc
= { TRAP_LIB
, 0, (void (*)(void))AHISoundFunc
};
278 ULONG
AHISoundFunc(void)
280 struct AHIAudioCtrl
*actrl
= (struct AHIAudioCtrl
*)REG_A2
;
281 struct AHISoundMessage
*smsg
= (struct AHISoundMessage
*)REG_A1
;
283 __saveds ULONG
AHISoundFunc(
284 register struct AHIAudioCtrl
*actrl
__asm("a2"),
285 register struct AHISoundMessage
*smsg
__asm("a1"))
288 if (AHIloops
) // Will it work for stereo sounds too?
290 AHI_SetSound(smsg
->ahism_Channel
,AHI_NOSOUND
,0,0,actrl
,0);
291 Signal(actrl
->ahiac_UserData
,1L<<AHIsignal
);
294 //D(bug("AHISoundFunc() called\n"));
298 static struct Hook AHISoundHook
;
300 int doplay8svx(fname
,loop
)
304 struct VoiceHeader
*vhdr
=NULL
;
306 ULONG size
,class,rsize
,chan
=0,pan
=Unity
/2,waitbits
,sigs
;
308 char *psample
,*ry
,*compressbuf
;
309 ChunkHeader
*p8chunk
;
310 int a
,b
,stereo
,*vxcheck
,finish
,playsize
;
311 struct IOAudio
*audioptr
[2];
316 audio_req1[a]=audio_req2[a]=NULL;
320 status_flags
&=~STATUS_AUDIOLED
;
322 if ((a
=readfile(fname
,(char **)&audiodata
,(int *)&audio_size
))) {
323 if (a
==-1) return(0);
326 vxcheck
=(int *)audiodata
;
327 if (audio_size
<12 || vxcheck
[0]!=ID_FORM
|| vxcheck
[2]!=ID_8SVX
) { // Raw data
329 psample
=p8data
=audiodata
;
331 else { // 8SVX sample
334 while (p8data
<audiodata
+vxcheck
[1]) {
335 p8chunk
=(ChunkHeader
*)p8data
;
336 p8data
+=sizeof(ChunkHeader
);
337 switch (p8chunk
->ckID
) {
339 vhdr
=(struct VoiceHeader
*)p8data
;
343 size
=p8chunk
->ckSize
;
346 chan
= *((ULONG
*)p8data
);
349 pan
= *((ULONG
*)p8data
);
352 p8data
+=p8chunk
->ckSize
;
353 if (p8chunk
->ckSize
&1) ++p8data
;
357 if (size
>vxcheck
[1]) {
362 if (vhdr
->vh_Compression
==CMP_FIBDELTA
) {
364 if (!(compressbuf
=LAllocRemember(&audio_key
,size
*2,MEMF_ANY
))) return(-2);
365 DUnpack(psample
+2,size
,compressbuf
,psample
[1]);
366 psample
=compressbuf
; size
*=2;
370 if (chan
==SAMPLETYPE_Stereo
) {
378 D(bug("Trying to play through AHI\n"));
381 D(bug("AHI opened\n"));
383 AHISoundHook
.h_Entry
= &GATE_AHISoundFunc
;
385 AHISoundHook
.h_Entry
= AHISoundFunc
;
387 if ((actrl
= AHI_AllocAudio(AHIA_AudioID
, AHI_DEFAULT_ID
,
388 AHIA_MixFreq
, AHI_DEFAULT_FREQ
,
389 AHIA_Channels
, stereo
?2:1,
390 AHIA_Sounds
, stereo
?2:1,
391 loop
?TAG_IGNORE
:AHIA_SoundFunc
, (IPTR
)&AHISoundHook
,
392 AHIA_UserData
, FindTask(NULL
),
395 struct AHISampleInfo sample
= { AHIST_M8S
, psample
, size
/*/ AHI_SampleFrameSize(AHIST_M8S)*/ };
398 D(bug("AHI_AllocAudio() succeeded\n"));
399 snd0
= AHI_LoadSound(0, AHIST_SAMPLE
, &sample
, actrl
);
402 sample
.ahisi_Address
= psample
+stereo
;
403 snd1
= AHI_LoadSound(1, AHIST_SAMPLE
, &sample
, actrl
);
405 D(bug("LoadSound(0)=%ld, LoadSound(1)=%ld\n",snd0
,snd1
));
406 if ((snd0
!= AHI_NOSOUND
) && (snd1
!= AHI_NOSOUND
))
408 if ((AHIsignal
=AllocSignal(-1))!=-1)
410 struct TagItem ahitags2
[] =
412 { AHIP_BeginChannel
, 1 },
413 { AHIP_Freq
, vhdr
?vhdr
->vh_SamplesPerSec
:10000 },
414 { AHIP_Vol
, vhdr
?vhdr
->vh_Volume
:Unity
},
417 { AHIP_EndChannel
, 0 },
421 AHI_ControlAudio(actrl
, AHIC_Play
, TRUE
, TAG_END
);
424 AHIP_BeginChannel
, 0,
425 AHIP_Freq
, vhdr
?vhdr
->vh_SamplesPerSec
:10000,
426 AHIP_Vol
, vhdr
?vhdr
->vh_Volume
:Unity
,
427 AHIP_Pan
, stereo
?Unity
:pan
,
429 AHIP_EndChannel
, NULL
,
430 stereo
?TAG_MORE
:TAG_END
, (IPTR
)ahitags2
);
431 D(bug("Playing through AHI\n"));
443 static UBYTE audiochannels
[2][4]={{8+1,1,8,4},{4+2,2,4,8}};
445 D(bug("Trying to play through audio.device\n"));
447 if (!(audio_req1
[a
]=LAllocRemember(&audio_key
,sizeof(struct IOAudio
),MEMF_CLEAR
)) ||
448 !(audio_req2
[a
]=LAllocRemember(&audio_key
,sizeof(struct IOAudio
),MEMF_CLEAR
)) ||
449 !(audio_port
[a
]=LCreatePort(NULL
,0))) return(-2);
453 audio_req1
[a
]->ioa_Request
.io_Message
.mn_ReplyPort
=audio_port
[a
];
454 audio_req1
[a
]->ioa_Request
.io_Message
.mn_Node
.ln_Pri
=75;
455 audio_req1
[a
]->ioa_Data
=audiochannels
[a
];
456 audio_req1
[a
]->ioa_Length
=sizeof(audiochannels
[a
]);
457 if (OpenDevice("audio.device",0,(struct IORequest
*)audio_req1
[a
],0)) return(-6);
460 playsize
=(size
<25600)?size
:25600;
462 if (!(playdata
[a
]=LAllocRemember(&audio_key
,playsize
,MEMF_CHIP
)))
467 audio_req1
[a
]->ioa_Request
.io_Command
=CMD_WRITE
;
468 audio_req1
[a
]->ioa_Request
.io_Flags
=ADIOF_PERVOL
;
469 audio_req1
[a
]->ioa_Volume
=64*(a
?Unity
-pan
:pan
)/Unity
;
470 audio_req1
[a
]->ioa_Period
=data_colorclock
/(vhdr
?vhdr
->vh_SamplesPerSec
:10000);
471 audio_req1
[a
]->ioa_Cycles
=1;
472 CopyMem((char *)audio_req1
[a
],(char *)audio_req2
[a
],sizeof(struct IOAudio
));
473 audio_req1
[a
]->ioa_Data
=(UBYTE
*)playdata
[a
];
474 audio_req2
[a
]->ioa_Data
=(UBYTE
*)playdata
[a
]+playsize
/2/*12800*/;
475 audioptr
[a
]=audio_req2
[a
];
479 if (config
->viewbits
&VIEWBITS_FILTEROFF
) {
480 if (filteroff()) status_flags
|=STATUS_AUDIOLED
;
481 else status_flags
&=~STATUS_AUDIOLED
;
484 waitbits
= 1<<Window
->UserPort
->mp_SigBit
;
485 if (actrl
== NULL
) waitbits
|= 1<<audio_port
[0]->mp_SigBit
| 1<<audio_port
[1]->mp_SigBit
;
486 else if (!loop
) waitbits
|= 1<<AHIsignal
;
489 for (a=0;a<2;a++) CopyMem(psample+(a*stereo),(char *)playdata[a],playsize);
492 audio_req1[b]->ioa_Length=size;
493 BeginIO((struct IORequest *)audio_req1[b]);
498 while (getintuimsg()) {
499 class=IMsg->Class; code=IMsg->Code;
500 ReplyMsg((struct Message *)IMsg);
501 if (class==IDCMP_MOUSEBUTTONS) {
502 if (code==SELECTDOWN) return(1);
503 else if (code==MENUDOWN) return(-1);
505 else if (class==IDCMP_RAWKEY) {
506 if (code==RAWKEY_ESC) return(-1);
507 else if (code==RAWKEY_Q || code==RAWKEY_X) return(1);
510 for (b=0;b<2;b++) if (GetMsg(audio_port[b])) ++a;
513 if (!loop) return(1);
527 CopyMem(psample
+(a
*stereo
),(char *)playdata
[a
],playsize
);
528 // CopyMem((char *)audio_req1[a],(char *)audio_req2[a],sizeof(struct IOAudio));
529 // audio_req1[a]->ioa_Data=(UBYTE *)playdata[a];
530 // audio_req2[a]->ioa_Data=(UBYTE *)playdata[a]+12800;
531 audio_req1
[a
]->ioa_Length
=audio_req2
[a
]->ioa_Length
=playsize
/2/*12800*/;
532 audioptr
[a
]=audio_req2
[a
];
535 size
-=playsize
/*25600*/;
536 for (a
=0;a
<2;a
++) BeginIO((struct IORequest
*)audio_req1
[a
]);
537 for (a
=0;a
<2;a
++) BeginIO((struct IORequest
*)audio_req2
[a
]);
541 sigs
= Wait(waitbits
);
542 while (getintuimsg()) {
543 class=IMsg
->Class
; code
=IMsg
->Code
;
544 ReplyMsg((struct Message
*)IMsg
);
545 if (class==IDCMP_MOUSEBUTTONS
) {
546 if (code
==SELECTDOWN
) return(1);
547 else if (code
==MENUDOWN
) return(-1);
549 else if (class==IDCMP_RAWKEY
) {
550 if (code
==RAWKEY_ESC
) return(-1);
551 else if (code
==RAWKEY_Q
|| code
==RAWKEY_X
) return(1);
556 if (GetMsg(audio_port
[b
]) && !(a
&(1<<b
))) {
558 if (audioptr
[b
]==audio_req1
[b
]) audioptr
[b
]=audio_req2
[b
];
559 else audioptr
[b
]=audio_req1
[b
];
560 audioptr
[b
]->ioa_Length
=(size
<(playsize
/2/*12800*/)?size
:(playsize
/2)/*12800*/);
561 CopyMem(psample
+(b
*stereo
),(char *)audioptr
[b
]->ioa_Data
,audioptr
[b
]->ioa_Length
);
575 size
-=audioptr
[0]->ioa_Length
;
576 psample
+=playsize
/2/*12800*/;
577 for (b
=0;b
<2;b
++) BeginIO((struct IORequest
*)audioptr
[b
]);
582 else if (sigs
& (1<<AHIsignal
))
584 //D(bug("AHIsignal received\n"));
588 if (!loop
) return(1);
599 AHI_ControlAudio(actrl
, AHIC_Play
, FALSE
, TAG_DONE
);
600 FreeSignal(AHIsignal
);
606 if (audio_req2
[a
] && audio_req2
[a
]->ioa_Request
.io_Device
) {
607 audio_req2
[a
]->ioa_Request
.io_Command
=CMD_FLUSH
;
608 DoIO((struct IORequest
*)audio_req2
[a
]);
610 if (audio_req1
[a
] && audio_req1
[a
]->ioa_Request
.io_Device
) {
611 audio_req1
[a
]->ioa_Request
.io_Command
=CMD_FLUSH
;
612 DoIO((struct IORequest
*)audio_req1
[a
]);
613 CloseDevice((struct IORequest
*)audio_req1
[a
]);
620 while (GetMsg(audio_port
[a
]));
621 LDeletePort(audio_port
[a
]);
626 if (audiodata
&& audio_size
) FreeVec(audiodata
);
627 LFreeRemember(&audio_key
);
629 if (status_flags
&STATUS_AUDIOLED
) {
631 status_flags
&=~STATUS_AUDIOLED
;
635 void handle8svxerror(res
)
639 case 0: doerror(-1); break;
640 case -2: doerror(ERROR_NO_FREE_STORE
); break;
642 case -4: dostatustext(globstring
[STR_ERROR_IN_IFF
]); break;
643 case -6: dostatustext(globstring
[STR_CANT_ALLOCATE_AUDIO
]); break;
651 struct IOAudio audio
;
652 static UBYTE achannels
[8]={1+2,1+4,2+8,4+8,1,2,4,8};
655 D(bug("beepwave at %lx\n",beepwave
));
658 D(bug("Trying to play through AHI\n"));
661 D(bug("AHI opened\n"));
662 if ((actrl
= AHI_AllocAudio(AHIA_AudioID
, AHI_DEFAULT_ID
,
663 AHIA_MixFreq
, AHI_DEFAULT_FREQ
,
668 struct AHISampleInfo sample
= { AHIST_M8S
, beepwave
, 16 };
670 D(bug("AHI_AllocAudio() succeeded\n"));
671 if (AHI_LoadSound(0, AHIST_SAMPLE
, &sample
, actrl
) != AHI_NOSOUND
)
673 D(bug("Playing through AHI\n"));
674 AHI_ControlAudio(actrl
, AHIC_Play
, TRUE
, TAG_END
);
679 AHIP_BeginChannel
, 0,
680 AHIP_Freq
, (a
%2)?6000:9000,
684 AHIP_EndChannel
, NULL
,
689 AHI_ControlAudio(actrl
, AHIC_Play
, FALSE
, TAG_DONE
);
701 D(bug("Trying to play through audio.device\n"));
702 audio
.ioa_Request
.io_Message
.mn_ReplyPort
=general_port
;
703 audio
.ioa_Request
.io_Message
.mn_Node
.ln_Pri
=90;
704 audio
.ioa_Data
=achannels
;
705 audio
.ioa_Length
=sizeof(achannels
);
706 if (OpenDevice("audio.device",0,(struct IORequest
*)&audio
,0)==0) {
707 audio
.ioa_Request
.io_Command
=CMD_WRITE
;
708 audio
.ioa_Request
.io_Flags
=ADIOF_PERVOL
;
710 audio
.ioa_Data
=(UBYTE
*)beepwave
;
715 audio
.ioa_Period
=(a
%2)?600:400;
716 BeginIO((struct IORequest
*)&audio
);
717 WaitIO((struct IORequest
*)&audio
);
720 CloseDevice((struct IORequest
*)&audio
);
722 else dostatustext(globstring
[STR_CANT_ALLOCATE_AUDIO
]);
724 else DisplayBeep(NULL
);
733 if ((a
=PlayModule(name
,1))) {
735 case ML_NOMEM
: doerror(ERROR_NO_FREE_STORE
); break;
737 dostatustext(globstring
[STR_NOT_ST_MOD
]);
739 case ML_NOMOD
: doerror(ERROR_OBJECT_NOT_FOUND
); break;
753 int check_is_module(name
)
761 if (a
>0 && a
<100) return(1);
767 static char codetodelta
[16]={-34,-21,-13,-8,-5,-3,-2,-1,0,1,2,3,5,8,13,21};
769 char DUnpack(source
,n
,dest
,x
)
778 for (i
=0;i
<lim
;++i
) {
788 int EnvoyPacket(device
,action
,action2
,data
,buffer
)
790 ULONG action
,action2
;
794 struct MsgPort
*handler
;
797 if (!(handler
=(struct MsgPort
*)DeviceProc(device
))) return(-1);
800 args
[1]=(ULONG
)buffer
;
801 if (!(SendPacket(handler
,action
,args
,2))) {
802 if (action2
) return(!(SendPacket(handler
,action2
,args
,2)));
808 int filteroff(void) //_filteroff: ;int
810 char *filter_register
= (char *)0xBFE001L
;
812 if( (*filter_register
) & 2 ) // btst.b #1,$bfe001
814 return(0); //alreadyon:
817 (*filter_register
) |= 2; // bset.b #1,$bfe001
818 return(1); // moveq.l #1,d0
822 void filteron(void) //_filteron: ;void
824 char *filter_register
= (char *)0xBFE001L
;
826 (*filter_register
) &= (~2); // bclr.b #1,$bfe001