mirror of
https://github.com/holub/mame
synced 2025-05-11 08:38:47 +03:00
Merge pull request #4362 from cam900/scsp_minor
scsp.cpp : Minor updates
This commit is contained in:
commit
57a0782136
File diff suppressed because it is too large
Load Diff
@ -173,7 +173,6 @@ private:
|
|||||||
TIMER_CALLBACK_MEMBER( timerC_cb );
|
TIMER_CALLBACK_MEMBER( timerC_cb );
|
||||||
int Get_AR(int base, int R);
|
int Get_AR(int base, int R);
|
||||||
int Get_DR(int base, int R);
|
int Get_DR(int base, int R);
|
||||||
int Get_RR(int base, int R);
|
|
||||||
void Compute_EG(SCSP_SLOT *slot);
|
void Compute_EG(SCSP_SLOT *slot);
|
||||||
int EG_Update(SCSP_SLOT *slot);
|
int EG_Update(SCSP_SLOT *slot);
|
||||||
uint32_t Step(SCSP_SLOT *slot);
|
uint32_t Step(SCSP_SLOT *slot);
|
||||||
|
@ -61,7 +61,7 @@ static int32_t UNPACK(uint16_t val)
|
|||||||
void SCSPDSP::Init()
|
void SCSPDSP::Init()
|
||||||
{
|
{
|
||||||
std::memset(this, 0, sizeof(*this));
|
std::memset(this, 0, sizeof(*this));
|
||||||
RBL = 0x8000;
|
RBL = (8*1024); // Initial RBL is 0
|
||||||
Stopped = true;
|
Stopped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,8 +80,6 @@ void SCSPDSP::Step()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t ACC = 0; //26 bit
|
int32_t ACC = 0; //26 bit
|
||||||
int32_t SHIFTED = 0; //24 bit
|
|
||||||
int32_t Y = 0; //13 bit
|
|
||||||
int32_t MEMVAL = 0;
|
int32_t MEMVAL = 0;
|
||||||
int32_t FRC_REG = 0; //13 bit
|
int32_t FRC_REG = 0; //13 bit
|
||||||
int32_t Y_REG = 0; //24 bit
|
int32_t Y_REG = 0; //24 bit
|
||||||
@ -210,6 +208,7 @@ void SCSPDSP::Step()
|
|||||||
//X |= 0xFF000000;
|
//X |= 0xFF000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t Y = 0; //13 bit
|
||||||
if (YSEL == 0)
|
if (YSEL == 0)
|
||||||
Y = FRC_REG;
|
Y = FRC_REG;
|
||||||
else if (YSEL == 1)
|
else if (YSEL == 1)
|
||||||
@ -223,6 +222,7 @@ void SCSPDSP::Step()
|
|||||||
Y_REG = INPUTS;
|
Y_REG = INPUTS;
|
||||||
|
|
||||||
//Shifter
|
//Shifter
|
||||||
|
int32_t SHIFTED = 0; //24 bit
|
||||||
if (SHIFT == 0)
|
if (SHIFT == 0)
|
||||||
SHIFTED = std::max<int32_t>(std::min<int32_t>(ACC, 0x007FFFFF), -0x00800000);
|
SHIFTED = std::max<int32_t>(std::min<int32_t>(ACC, 0x007FFFFF), -0x00800000);
|
||||||
else if (SHIFT == 1)
|
else if (SHIFT == 1)
|
||||||
@ -236,7 +236,7 @@ void SCSPDSP::Step()
|
|||||||
//if (SHIFTED & 0x00800000)
|
//if (SHIFTED & 0x00800000)
|
||||||
//SHIFTED |= 0xFF000000;
|
//SHIFTED |= 0xFF000000;
|
||||||
}
|
}
|
||||||
else if(SHIFT==3)
|
else if (SHIFT == 3)
|
||||||
{
|
{
|
||||||
SHIFTED = ACC;
|
SHIFTED = ACC;
|
||||||
SHIFTED <<= 8;
|
SHIFTED <<= 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user