change callback code; get rid of several calls to DOSBOX_RunMachine()
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2677
This commit is contained in:
parent
fcd1a96808
commit
6215071ebc
8 changed files with 527 additions and 328 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: callback.h,v 1.17 2006-04-22 15:25:44 c2woody Exp $ */
|
||||
/* $Id: callback.h,v 1.18 2006-07-24 19:06:55 c2woody Exp $ */
|
||||
|
||||
#ifndef DOSBOX_CALLBACK_H
|
||||
#define DOSBOX_CALLBACK_H
|
||||
|
@ -28,22 +28,29 @@
|
|||
typedef Bitu (*CallBack_Handler)(void);
|
||||
extern CallBack_Handler CallBack_Handlers[];
|
||||
|
||||
enum { CB_RETN,CB_RETF,CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,CB_HOOKABLE };
|
||||
enum { CB_RETN,CB_RETF,CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,
|
||||
CB_IRQ0,CB_IRQ1,CB_IRQ9,CB_IRQ12,CB_IRQ12_RET,CB_IRQ6_PCJR,
|
||||
CB_INT29,CB_INT16,CB_HOOKABLE,CB_TDE_IRET,CB_IPXESR,CB_IPXESR_RET };
|
||||
|
||||
#define CB_MAX 144
|
||||
#define CB_MAX 128
|
||||
#define CB_SIZE 32
|
||||
#define CB_SEG 0xF100
|
||||
#define CB_BASE (CB_SEG << 4)
|
||||
|
||||
enum {
|
||||
CBRET_NONE=0,CBRET_STOP=1
|
||||
};
|
||||
|
||||
extern Bit8u lastint;
|
||||
|
||||
INLINE RealPt CALLBACK_RealPointer(Bitu callback) {
|
||||
return RealMake(CB_SEG,callback << 4);
|
||||
return RealMake(CB_SEG,callback*CB_SIZE);
|
||||
}
|
||||
INLINE PhysPt CALLBACK_PhysPointer(Bitu callback) {
|
||||
return PhysMake(CB_SEG,callback << 4);
|
||||
return PhysMake(CB_SEG,callback*CB_SIZE);
|
||||
}
|
||||
|
||||
INLINE PhysPt CALLBACK_GetBase(void) {
|
||||
return CB_SEG << 4;
|
||||
}
|
||||
|
||||
Bitu CALLBACK_Allocate();
|
||||
|
@ -54,7 +61,7 @@ void CALLBACK_Idle(void);
|
|||
void CALLBACK_RunRealInt(Bit8u intnum);
|
||||
void CALLBACK_RunRealFar(Bit16u seg,Bit16u off);
|
||||
|
||||
bool CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,const char* description=0);
|
||||
bool CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,const char* descr);
|
||||
Bitu CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,PhysPt addr,const char* descr);
|
||||
|
||||
const char* CALLBACK_GetDescription(Bitu callback);
|
||||
|
@ -85,7 +92,7 @@ public:
|
|||
//Only allocate a callback number
|
||||
void Allocate(CallBack_Handler handler,const char* description=0);
|
||||
Bit16u Get_callback(){return m_callback;}
|
||||
RealPt Get_RealPointer(){ return RealMake(CB_SEG,m_callback << 4);}
|
||||
RealPt Get_RealPointer(){ return CALLBACK_RealPointer(m_callback);}
|
||||
void Set_RealVec(Bit8u vec);
|
||||
};
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue