/***************************************************************************
* NAME: HANDLE.C
** COPYRIGHT:
** "Copyright (c) 1992, by FORTE
**
** "This software is furnished under a license and may be used,
** copied, or disclosed only in accordance with the terms of such
** license and with the inclusion of the above copyright notice.
** This software or any other copies thereof may not be provided or
** otherwise made available to any other person. No title to and
** ownership of the software is hereby transfered."
****************************************************************************
* CREATION DATE: 11/18/92
*--------------------------------------------------------------------------*
* VERSION DATE NAME DESCRIPTION
*> 1.0 12/08/92 Original
***************************************************************************/
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include "forte.h"
#include "gf1proto.h"
/* internal include files */
#include "gf1hware.h"
#include "dma.h"
#include "irq.h"
#include "gf1os.h"
extern ULTRA_DATA _gf1_data;
PFV
UltraDramTcHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.dram_dma_tc_func;
_gf1_data.dram_dma_tc_func = handler;
return(old_handler);
}
PFV
UltraMidiXmitHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.midi_xmit_func;
_gf1_data.midi_xmit_func = handler;
return(old_handler);
}
PFV
UltraMidiRecvHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.midi_recv_func;
_gf1_data.midi_recv_func = handler;
return(old_handler);
}
PFV
UltraTimer1Handler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.timer1_func;
_gf1_data.timer1_func = handler;
return(old_handler);
}
PFV
UltraTimer2Handler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.timer2_func;
_gf1_data.timer2_func = handler;
return(old_handler);
}
PFV
UltraWaveHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.wavetable_func;
_gf1_data.wavetable_func = handler;
return(old_handler);
}
PFV
UltraVolumeHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.volume_func;
_gf1_data.volume_func = handler;
return(old_handler);
}
PFV
UltraRecordHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.record_dma_tc_func;
_gf1_data.record_dma_tc_func = handler;
return(old_handler);
}
PFV
UltraAuxHandler(PFV handler)
{
PFV old_handler;
old_handler = _gf1_data.aux_irq_func;
_gf1_data.aux_irq_func = handler;
return(old_handler);
}