diff options
author | Lioncash <mathew1800@gmail.com> | 2015-01-30 19:24:19 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2015-01-30 19:32:03 +0100 |
commit | 09a66860e235242f4bcdf52f0cf71284fb35bfa8 (patch) | |
tree | 564c496932549bf8de83b9e199f0380cd5d6f2e1 /src/core/arm/interpreter/armsupp.cpp | |
parent | armdefs: Move some defines over to enums (diff) | |
download | yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.tar yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.tar.gz yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.tar.bz2 yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.tar.lz yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.tar.xz yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.tar.zst yuzu-09a66860e235242f4bcdf52f0cf71284fb35bfa8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/arm/interpreter/armsupp.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index e2626eefb..5a8f09b22 100644 --- a/src/core/arm/interpreter/armsupp.cpp +++ b/src/core/arm/interpreter/armsupp.cpp @@ -22,13 +22,6 @@ static ARMword ModeToBank (ARMword); -static void EnvokeList (ARMul_State *, unsigned int, unsigned int); - -struct EventNode { - /* An event list node. */ - unsigned (*func) (ARMul_State *); /* The function to call. */ - struct EventNode *next; -}; /* This routine returns the value of a register from a mode. */ @@ -1068,76 +1061,3 @@ ARMul_Align (ARMul_State* state, ARMword address, ARMword data) address = (address & 3) << 3; /* Get the word address. */ return ((data >> address) | (data << (32 - address))); /* rot right */ } - -/* This routine is used to call another routine after a certain number of - cycles have been executed. The first parameter is the number of cycles - delay before the function is called, the second argument is a pointer - to the function. A delay of zero doesn't work, just call the function. */ - -void -ARMul_ScheduleEvent (ARMul_State * state, unsigned int delay, - unsigned (*what) (ARMul_State *)) -{ - unsigned int when; - struct EventNode *event; - - if (state->EventSet++ == 0) - state->Now = ARMul_Time (state); - when = (state->Now + delay) % EVENTLISTSIZE; - event = (struct EventNode *) malloc (sizeof (struct EventNode)); - if (!event) { - printf ("SKYEYE:ARMul_ScheduleEvent: malloc event error\n"); - exit(-1); - //skyeye_exit (-1); - } - event->func = what; - event->next = *(state->EventPtr + when); - *(state->EventPtr + when) = event; -} - -/* This routine is called at the beginning of - every cycle, to envoke scheduled events. */ - -void -ARMul_EnvokeEvent (ARMul_State * state) -{ - static unsigned int then; - - then = state->Now; - state->Now = ARMul_Time (state) % EVENTLISTSIZE; - if (then < state->Now) - /* Schedule events. */ - EnvokeList (state, then, state->Now); - else if (then > state->Now) { - /* Need to wrap around the list. */ - EnvokeList (state, then, EVENTLISTSIZE - 1L); - EnvokeList (state, 0L, state->Now); - } -} - -/* Envokes all the entries in a range. */ - -static void -EnvokeList (ARMul_State * state, unsigned int from, unsigned int to) -{ - for (; from <= to; from++) { - struct EventNode *anevent; - - anevent = *(state->EventPtr + from); - while (anevent) { - (anevent->func) (state); - state->EventSet--; - anevent = anevent->next; - } - *(state->EventPtr + from) = NULL; - } -} - -/* This routine is returns the number of clock ticks since the last reset. */ - -unsigned int -ARMul_Time (ARMul_State * state) -{ - return (state->NumScycles + state->NumNcycles + - state->NumIcycles + state->NumCcycles + state->NumFcycles); -} |