1
0
Fork 0

Changed event and ticker handlers.

Removed the micro timers.


Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1657
This commit is contained in:
Sjoerd van der Berg 2004-02-07 18:37:16 +00:00
parent 3001a346b2
commit 44464a2a53
9 changed files with 51 additions and 97 deletions

View file

@ -26,7 +26,7 @@ extern Bits CPU_CycleLeft;
extern Bits CPU_CycleMax;
typedef void (PIC_EOIHandler) (void);
typedef void (* PIC_EventHandler)(void);
typedef void (* PIC_EventHandler)(Bitu val);
#define PIC_MAXIRQ 15
@ -59,7 +59,7 @@ void PIC_RegisterIRQ(Bitu irq,PIC_EOIHandler handler,char * name);
void PIC_FreeIRQ(Bitu irq);
bool PIC_RunQueue(void);
void PIC_AddEvent(PIC_EventHandler handler,Bitu delay);
void PIC_AddEvent(PIC_EventHandler handler,Bitu delay,Bitu val=0);
void PIC_RemoveEvents(PIC_EventHandler handler);

View file

@ -25,19 +25,11 @@
#define GetTicks() SDL_GetTicks()
typedef void (*TIMER_TickHandler)(Bitu ticks);
typedef void (*TIMER_MicroHandler)(void);
typedef void TIMER_Block;
typedef void (*TIMER_TickHandler)(void);
/* Register a function that gets called everytime if 1 or more ticks pass */
TIMER_Block * TIMER_RegisterTickHandler(TIMER_TickHandler handler);
/* Register a function to be called every x microseconds */
TIMER_Block * TIMER_RegisterMicroHandler(TIMER_MicroHandler handler,Bitu micro);
/* Set the microseconds value to a new value */
void TIMER_SetNewMicro(TIMER_Block * block,Bitu micro);
void TIMER_AddTickHandler(TIMER_TickHandler handler);
void TIMER_DelTickHandler(TIMER_TickHandler handler);
/* This will add 1 milliscond to all timers */
void TIMER_AddTick(void);

View file

@ -94,7 +94,6 @@ typedef struct {
bool drawing;
Bitu width;
Bitu height;
Bitu pitch;
Bitu blocks;
Bitu panning;
Bitu address;
@ -296,7 +295,7 @@ typedef struct {
void VGA_SetMode(VGAModes mode);
void VGA_SetupHandlers(void);
void VGA_StartResize(void);
void VGA_SetupDrawing(void);
void VGA_SetupDrawing(Bitu val);
/* Some DAC/Attribute functions */
void VGA_DAC_CombineColor(Bit8u attr,Bit8u pal);