mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
work on 'vblank on line start' problem, var changes, mask defines
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@408 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
95dc5c5e5e
commit
602133e1c6
27 changed files with 359 additions and 945 deletions
|
@ -101,7 +101,7 @@ PICO_INTERNAL int PicoCdSaveState(void *file)
|
|||
unsigned char buff[0x60];
|
||||
void *ym2612_regs = YM2612GetRegs();
|
||||
|
||||
areaWrite("PicoSMCD", 1, 8, file);
|
||||
areaWrite("PicoSEXT", 1, 8, file);
|
||||
areaWrite(&PicoVer, 1, 4, file);
|
||||
|
||||
memset(buff, 0, sizeof(buff));
|
||||
|
@ -124,7 +124,7 @@ PICO_INTERNAL int PicoCdSaveState(void *file)
|
|||
if (PicoOpt&1)
|
||||
CHECKED_WRITE(CHUNK_FM, 0x200+4, ym2612_regs);
|
||||
|
||||
if (PicoMCD & 1)
|
||||
if (PicoAHW & PAHW_MCD)
|
||||
{
|
||||
Pico_mcd->m.audio_offset = mp3_get_offset();
|
||||
memset(buff, 0, sizeof(buff));
|
||||
|
@ -197,7 +197,8 @@ PICO_INTERNAL int PicoCdLoadState(void *file)
|
|||
|
||||
g_read_offs = 0;
|
||||
CHECKED_READ(8, buff);
|
||||
if (strncmp((char *)buff, "PicoSMCD", 8)) R_ERROR_RETURN("bad header");
|
||||
if (strncmp((char *)buff, "PicoSMCD", 8) && strncmp((char *)buff, "PicoSEXT", 8))
|
||||
R_ERROR_RETURN("bad header");
|
||||
CHECKED_READ(4, &ver);
|
||||
|
||||
while (!areaEof(file))
|
||||
|
@ -205,7 +206,7 @@ PICO_INTERNAL int PicoCdLoadState(void *file)
|
|||
CHECKED_READ(1, buff);
|
||||
CHECKED_READ(4, &len);
|
||||
if (len < 0 || len > 1024*512) R_ERROR_RETURN("bad length");
|
||||
if (buff[0] > CHUNK_FM && buff[0] <= CHUNK_MISC_CD && !(PicoMCD & 1))
|
||||
if (buff[0] > CHUNK_FM && buff[0] <= CHUNK_MISC_CD && !(PicoAHW & PAHW_MCD))
|
||||
R_ERROR_RETURN("cd chunk in non CD state?");
|
||||
|
||||
switch (buff[0])
|
||||
|
@ -269,7 +270,7 @@ PICO_INTERNAL int PicoCdLoadState(void *file)
|
|||
breakswitch:;
|
||||
}
|
||||
|
||||
if (PicoMCD & 1)
|
||||
if (PicoAHW & PAHW_MCD)
|
||||
{
|
||||
/* after load events */
|
||||
if (Pico_mcd->s68k_regs[3]&4) // 1M mode?
|
||||
|
@ -296,7 +297,8 @@ int PicoCdLoadStateGfx(void *file)
|
|||
|
||||
g_read_offs = 0;
|
||||
CHECKED_READ(8, buff);
|
||||
if (strncmp(buff, "PicoSMCD", 8)) R_ERROR_RETURN("bad header");
|
||||
if (strncmp((char *)buff, "PicoSMCD", 8) && strncmp((char *)buff, "PicoSEXT", 8))
|
||||
R_ERROR_RETURN("bad header");
|
||||
CHECKED_READ(4, &ver);
|
||||
|
||||
while (!areaEof(file) && found < 4)
|
||||
|
@ -304,7 +306,7 @@ int PicoCdLoadStateGfx(void *file)
|
|||
CHECKED_READ(1, buff);
|
||||
CHECKED_READ(4, &len);
|
||||
if (len < 0 || len > 1024*512) R_ERROR_RETURN("bad length");
|
||||
if (buff[0] > CHUNK_FM && buff[0] <= CHUNK_MISC_CD && !(PicoMCD & 1))
|
||||
if (buff[0] > CHUNK_FM && buff[0] <= CHUNK_MISC_CD && !(PicoAHW & PAHW_MCD))
|
||||
R_ERROR_RETURN("cd chunk in non CD state?");
|
||||
|
||||
switch (buff[0])
|
||||
|
|
|
@ -77,7 +77,7 @@ PICO_INTERNAL int PicoResetMCD(void)
|
|||
#endif
|
||||
|
||||
// use SRam.data for RAM cart
|
||||
if (PicoOpt&0x8000) {
|
||||
if (PicoOpt&POPT_EN_MCD_RAMCART) {
|
||||
if (SRam.data == NULL)
|
||||
SRam.data = calloc(1, 0x12000);
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ static __inline void getSamples(int y)
|
|||
|
||||
PICO_INTERNAL int PicoFrameMCD(void)
|
||||
{
|
||||
if(!(PicoOpt&0x10))
|
||||
if (!(PicoOpt&POPT_ALT_RENDERER))
|
||||
PicoFrameStart();
|
||||
|
||||
PicoFrameHints();
|
||||
|
|
|
@ -312,7 +312,7 @@ PICO_INTERNAL void gfx_cd_update(void)
|
|||
_rot_comp.Float_Part &= 0xffff;
|
||||
_rot_comp.Float_Part += _rot_comp.Draw_Speed;
|
||||
|
||||
if (PicoOpt & 0x1000) // scale/rot enabled
|
||||
if (PicoOpt & POPT_EN_MCD_GFX)
|
||||
{
|
||||
unsigned int func = _rot_comp.Function;
|
||||
unsigned int H_Dot = _rot_comp.Reg_62 & 0x1ff;
|
||||
|
@ -447,7 +447,7 @@ PICO_INTERNAL void DmaSlowCell(unsigned int source, unsigned int a, int len, uns
|
|||
// AutoIncrement
|
||||
a=(u16)(a+inc);
|
||||
}
|
||||
rendstatus|=0x10;
|
||||
rendstatus |= PDRAW_SPRITES_MOVED;
|
||||
break;
|
||||
|
||||
case 3: // cram
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue