mirror of
https://github.com/libretro/Play-.git
synced 2024-12-03 15:01:10 +00:00
Add some timer related constants.
This commit is contained in:
parent
e9a6f17ab8
commit
d507c7df9d
@ -30,18 +30,18 @@ void CTimer::Count(unsigned int ticks)
|
||||
uint32 nextCount = timer.nCOUNT;
|
||||
|
||||
uint32 divider = 1;
|
||||
switch(timer.nMODE & 0x03)
|
||||
switch(timer.nMODE & MODE_CLOCK_SELECT)
|
||||
{
|
||||
case 0x00:
|
||||
case MODE_CLOCK_SELECT_BUSCLOCK:
|
||||
divider = 1;
|
||||
break;
|
||||
case 0x01:
|
||||
case MODE_CLOCK_SELECT_BUSCLOCK16:
|
||||
divider = 16;
|
||||
break;
|
||||
case 0x02:
|
||||
case MODE_CLOCK_SELECT_BUSCLOCK256:
|
||||
divider = 256;
|
||||
break;
|
||||
case 0x03:
|
||||
case MODE_CLOCK_SELECT_EXTERNAL:
|
||||
divider = 9437; // PAL
|
||||
break;
|
||||
}
|
||||
|
@ -10,6 +10,13 @@ class CTimer
|
||||
public:
|
||||
enum
|
||||
{
|
||||
MODE_CLOCK_SELECT = 0x003,
|
||||
|
||||
MODE_CLOCK_SELECT_BUSCLOCK = 0x000,
|
||||
MODE_CLOCK_SELECT_BUSCLOCK16 = 0x001,
|
||||
MODE_CLOCK_SELECT_BUSCLOCK256 = 0x002,
|
||||
MODE_CLOCK_SELECT_EXTERNAL = 0x003,
|
||||
|
||||
MODE_GATE_ENABLE = 0x004,
|
||||
|
||||
MODE_GATE_SELECT = 0x008,
|
||||
@ -28,6 +35,11 @@ public:
|
||||
MODE_OVERFLOW_FLAG = 0x800,
|
||||
};
|
||||
|
||||
enum REGISTER
|
||||
{
|
||||
T3_MODE = 0x10001810,
|
||||
};
|
||||
|
||||
CTimer(CINTC&);
|
||||
virtual ~CTimer() = default;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user