WIP 0.9.44.1

This commit is contained in:
zeromus 2020-04-06 00:54:55 -04:00
parent 976d728df3
commit ff835a4185
7 changed files with 49 additions and 31 deletions

View File

@ -3,6 +3,7 @@
[OK] psx/CDC : removed stub for Command_Sync (WHY?)
[OK] psx/psx : fixed bug (SPU-related: clarified read order by turning into two statements)
[NO] psx/psx : StateAction bugfix
0.9.36.5 -> 0.9.37-UNSTABLE
(General improvements and state fixups)
(bios hash check at loadstate time added)
@ -30,9 +31,11 @@
[??] psx/psx : SCEE/SCEA/SCEI SCEx stuff changed (???)
[!!] psx/psx : LoadEXE/PSF1 changes (TODO - need these)
[OK] psx/spu* : register renames and misc bugfixes
0.9.37-UNSTABLE -> 0.9.37.1
[NO] psx/cpu : fix some savestate problem with ReadAbsorbDummy, seems alarming but maybe was just backwards compatibility
[OK] psx/spu : clamp some sound output presumably messed up by prior reverb changes
0.9.37.1 -> 0.9.38-UNSTABLE
(major CDIF changes)
(simplefifo refactored)
@ -64,10 +67,13 @@
[OK] psx/psx : DMACycleSteal stuff
[NO] psx/psx : CalcRegion_By_SYSTEMCNF and TestMagicCD updated
[NO] psx/psx : DiscSanityChecks added (add feature later maybe)
0.9.38-UNSTABLE -> 0.9.38.1
[NO] psx/psx : DiscSanityChecks fix (OK if we used this feature)
0.9.38.1 -> 0.9.38.2
[OK] psx/gpu_polygon : Fixes to poly rasterizing
0.9.38.2 -> 0.9.38.4
[OK] psx/cdc : Change to fundamental sector reading for tomb raider
[OK] psx/cpu : Elaborate debug poke capabilities
@ -75,12 +81,15 @@
[OK] psx/gpu : Alter mouse coordinate translation
[OK] psx/gpu : Alter texcache invalidation, TPage and DrawMode commands
[OK] psx/psx : Elaborate debug poke capabilities
0.9.38.4 -> 0.9.38.5
[OK] psx/cdc : substantial changes to disc swapping and seek retries
[OK] psx/gpu : change to comments
[OK] psx/memcard : change to debug output
0.9.38.4 -> 0.9.38.6
[OK] psx/gpu & gpu_sprite : Fixed GPU emulation timing bugs that caused graphical glitches in "Mr. Driller G".
0.9.38.5 -> 0.9.38.7
[OK] psx/cpu : Revisions to exception handling
[OK] psx/cpu : Many revisions and cleanups to branch and exception handling in opcode implementations
@ -89,6 +98,7 @@
[OK] psx/psx : Cleanup
[OK] psx/timer : Major functional changes
[NO] psx/timer : Added loadstate sanity checks
0.9.38.7 -> 0.9.39-unstable
[OK] psx/cdc : "Fantastic Pinball Kyutenkai" enable; add MDFN_COLD
[OK] psx/cpu : various improvements
@ -108,9 +118,11 @@
[OK] psx/sio : (c)
[OK] psx/spu : (c), comments, inline
[OK] psx/timer : (c), comments
0.9.39-unstable -> 0.9.39-1
[NO] mednafen : just org stuff
[??] cdrom/ccd : something about track AA
0.9.39-1 -> 0.9.39-2
[NO] drivers/main : nothing useful
[NO] mednafen : nothing useful
@ -121,6 +133,7 @@
[OK] psx/mdec : PixelBufferReadOffset fixes
[OK] psx/psx : event_time initial value
[OK] psx/spu : loadstate sanity, decided to accept it here
0.9.39-2 -> 0.9.41
[OK] math_ops : major revisions
[NO] mednafen : nothing useful, but check interlace init
@ -130,9 +143,18 @@
[NO] psx/input/dualshocK : AMCT stuff
[NO] psx/psx : render parameters stuff
[OK] tests : pasted over and whittled down
0.9.41 -> 0.9.42
[OK] tests : some 64bit casting tests
0.9.42 -> 0.9.43
[OK] psx/frontio : (c), UpdateOutput() [not needed]
[OK] psx/input/dualshock : (c), analog state change [TEST]
[ok] psx/psx : (c), UpdateOutput() [not needed]
[OK] psx/psx : (c), UpdateOutput() [not needed]
0.9.43 -> 0.9.44.1
[OK] psx/cdc : add const
[NO] psx/debug : not used file
[OK] psx/dis : add const
[OK] psx/dma : update GPU api. NOTE: found biz bug here.
[OK] psx/frontio : add cold

View File

@ -2465,7 +2465,7 @@ int32 PS_CDC::Command_0x1d(const int arg_count, const uint8 *args)
return(0);
}
PS_CDC::CDC_CTEntry PS_CDC::Commands[0x20] =
const PS_CDC::CDC_CTEntry PS_CDC::Commands[0x20] =
{
{ /* 0x00, */ 0, 0, NULL, NULL, NULL },
{ /* 0x01, */ 0, 0, "GetStat", &PS_CDC::Command_GetStat, NULL },

View File

@ -240,7 +240,7 @@ class PS_CDC
void PreSeekHack(int32 target);
void ReadBase(void);
static CDC_CTEntry Commands[0x20];
static const CDC_CTEntry Commands[0x20];
int32 Command_GetStat(const int arg_count, const uint8 *args);
int32 Command_Setloc(const int arg_count, const uint8 *args);

View File

@ -2,7 +2,7 @@
/* Mednafen Sony PS1 Emulation Module */
/******************************************************************************/
/* dis.cpp:
** Copyright (C) 2011-2016 Mednafen Team
** Copyright (C) 2011-2017 Mednafen Team
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License
@ -144,7 +144,7 @@ struct OpEntry
#define MK_GTE(mnemonic, format, func) { MASK_OP | (0x1U << 25) | MASK_FUNC, (0x1U << 25) | (0x12U << 26) | func, mnemonic, format }
static OpEntry ops[] =
static const OpEntry ops[] =
{
MK_OP("nop", "", 0, 0, MASK_RT | MASK_RD | MASK_SA),
@ -345,7 +345,7 @@ EW_EXPORT s32 shock_Util_DisassembleMIPS(u32 PC, u32 instr, void* outbuf, s32 bu
"SZ0", "SZ1", "SZ2", "SZ3", "RGB0", "RGB1", "RGB2", "RES1", "MAC0", "MAC1", "MAC2", "MAC3", "IRGB", "ORGB", "LZCS", "LZCR"
};
OpEntry *op = ops;
const OpEntry *op = ops;
while(op->mnemonic)
{

View File

@ -143,7 +143,7 @@ static INLINE bool ChCan(const unsigned ch, const uint32 CRModeCache)
case CH_GPU:
if(CRModeCache & 0x1)
return(GPU->DMACanWrite());
return(GPU_DMACanWrite());
else
return(true);
@ -206,7 +206,7 @@ static void RecalcHalt(void)
if((DMACH[1].WordCounter || (DMACH[1].ChanControl & (1 << 24))) && (DMACH[1].ChanControl & 0x200) && (DMACH[1].WordCounter || MDEC_DMACanRead()))
Halt = true;
if((DMACH[2].WordCounter || (DMACH[2].ChanControl & (1 << 24))) && (DMACH[2].ChanControl & 0x200) && ((DMACH[2].ChanControl & 0x1) && (DMACH[2].WordCounter || GPU->DMACanWrite())))
if((DMACH[2].WordCounter || (DMACH[2].ChanControl & (1 << 24))) && (DMACH[2].ChanControl & 0x200) && ((DMACH[2].ChanControl & 0x1) && (DMACH[2].WordCounter || GPU_DMACanWrite())))
Halt = true;
if((DMACH[3].WordCounter || (DMACH[3].ChanControl & (1 << 24))) && !(DMACH[3].ChanControl & 0x100))
@ -259,16 +259,12 @@ static INLINE void ChRW(const unsigned ch, const uint32 CRModeCache, uint32 *V,
*V = MDEC_DMARead(offset);
break;
case CH_GPU:
if(CRModeCache & 0x1)
{
if(DMACH[CH_GPU].ChanControl == 0x01000401)
GpuFrameForLag = true;
GPU->WriteDMA(*V);
}
else
*V = GPU->ReadDMA();
break;
case CH_GPU:
if(CRModeCache & 0x1)
GPU->WriteDMA(*V);
else
*V = GPU->ReadDMA();
break;
case CH_CDC:
// 0x1f801018 affects CDC DMA timing.
@ -579,13 +575,13 @@ static INLINE int32 CalcNextEvent(int32 next_event)
return(next_event);
}
pscpu_timestamp_t DMA_Update(const pscpu_timestamp_t timestamp)
MDFN_FASTCALL pscpu_timestamp_t DMA_Update(const pscpu_timestamp_t timestamp)
{
// uint32 dc = (DMAControl >> (ch * 4)) & 0xF;
int32 clocks = timestamp - lastts;
lastts = timestamp;
GPU->Update(timestamp);
GPU_Update(timestamp);
MDEC_Run(clocks);
RunChannel(timestamp, clocks, 0);
@ -626,7 +622,7 @@ static void CheckLinkedList(uint32 addr)
}
#endif
void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V)
MDFN_FASTCALL void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V)
{
int ch = (A & 0x7F) >> 4;
@ -687,7 +683,7 @@ void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V)
RunChannel(timestamp, 1, ch);
DMACH[ch].ClockCounter = 0;
#endif
PSX_WARNING("[DMA] Forced stop for channel %d -- scanline=%d", ch, GPU->GetScanlineNum());
PSX_WARNING("[DMA] Forced stop for channel %d -- scanline=%d", ch, GPU_GetScanlineNum());
//MDFN_DispMessage("[DMA] Forced stop for channel %d", ch);
}
@ -699,7 +695,7 @@ void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V)
if(!(OldCC & (1 << 24)) && (V & (1 << 24)))
{
//if(ch == 0 || ch == 1)
// PSX_WARNING("[DMA] Started DMA for channel=%d --- CHCR=0x%08x --- BCR=0x%08x --- scanline=%d", ch, DMACH[ch].ChanControl, DMACH[ch].BlockControl, GPU->GetScanlineNum());
// PSX_WARNING("[DMA] Started DMA for channel=%d --- CHCR=0x%08x --- BCR=0x%08x --- scanline=%d", ch, DMACH[ch].ChanControl, DMACH[ch].BlockControl, GPU_GetScanlineNum());
DMACH[ch].WordCounter = 0;
DMACH[ch].ClockCounter = 0;
@ -723,7 +719,7 @@ void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V)
PSX_SetEventNT(PSX_EVENT_DMA, timestamp + CalcNextEvent(0x10000000));
}
uint32 DMA_Read(const pscpu_timestamp_t timestamp, uint32 A)
MDFN_FASTCALL uint32 DMA_Read(const pscpu_timestamp_t timestamp, uint32 A)
{
int ch = (A & 0x7F) >> 4;
uint32 ret = 0;

View File

@ -25,9 +25,9 @@
namespace MDFN_IEN_PSX
{
pscpu_timestamp_t DMA_Update(const pscpu_timestamp_t timestamp);
void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V);
uint32 DMA_Read(const pscpu_timestamp_t timestamp, uint32 A);
MDFN_FASTCALL pscpu_timestamp_t DMA_Update(const pscpu_timestamp_t timestamp);
MDFN_FASTCALL void DMA_Write(const pscpu_timestamp_t timestamp, uint32 A, uint32 V);
MDFN_FASTCALL uint32 DMA_Read(const pscpu_timestamp_t timestamp, uint32 A);
void DMA_ResetTS(void);

View File

@ -31,10 +31,10 @@ class InputDevice
{
public:
InputDevice();
virtual ~InputDevice();
virtual void Power(void);
InputDevice() MDFN_COLD;
virtual ~InputDevice() MDFN_COLD;
virtual void Power(void) MDFN_COLD;
virtual void UpdateInput(const void *data);
virtual void SyncState(bool isReader, EW::NewState *ns) {}