mirror of
https://github.com/holub/mame
synced 2025-05-09 15:51:48 +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 );
|
||||
int Get_AR(int base, int R);
|
||||
int Get_DR(int base, int R);
|
||||
int Get_RR(int base, int R);
|
||||
void Compute_EG(SCSP_SLOT *slot);
|
||||
int EG_Update(SCSP_SLOT *slot);
|
||||
uint32_t Step(SCSP_SLOT *slot);
|
||||
|
@ -61,7 +61,7 @@ static int32_t UNPACK(uint16_t val)
|
||||
void SCSPDSP::Init()
|
||||
{
|
||||
std::memset(this, 0, sizeof(*this));
|
||||
RBL = 0x8000;
|
||||
RBL = (8*1024); // Initial RBL is 0
|
||||
Stopped = true;
|
||||
}
|
||||
|
||||
@ -80,8 +80,6 @@ void SCSPDSP::Step()
|
||||
#endif
|
||||
|
||||
int32_t ACC = 0; //26 bit
|
||||
int32_t SHIFTED = 0; //24 bit
|
||||
int32_t Y = 0; //13 bit
|
||||
int32_t MEMVAL = 0;
|
||||
int32_t FRC_REG = 0; //13 bit
|
||||
int32_t Y_REG = 0; //24 bit
|
||||
@ -210,6 +208,7 @@ void SCSPDSP::Step()
|
||||
//X |= 0xFF000000;
|
||||
}
|
||||
|
||||
int32_t Y = 0; //13 bit
|
||||
if (YSEL == 0)
|
||||
Y = FRC_REG;
|
||||
else if (YSEL == 1)
|
||||
@ -223,6 +222,7 @@ void SCSPDSP::Step()
|
||||
Y_REG = INPUTS;
|
||||
|
||||
//Shifter
|
||||
int32_t SHIFTED = 0; //24 bit
|
||||
if (SHIFT == 0)
|
||||
SHIFTED = std::max<int32_t>(std::min<int32_t>(ACC, 0x007FFFFF), -0x00800000);
|
||||
else if (SHIFT == 1)
|
||||
@ -236,7 +236,7 @@ void SCSPDSP::Step()
|
||||
//if (SHIFTED & 0x00800000)
|
||||
//SHIFTED |= 0xFF000000;
|
||||
}
|
||||
else if(SHIFT==3)
|
||||
else if (SHIFT == 3)
|
||||
{
|
||||
SHIFTED = ACC;
|
||||
SHIFTED <<= 8;
|
||||
|
Loading…
Reference in New Issue
Block a user