Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 257963
Collapse All | Expand All

(-)zsnes_1_51/src/initc.c.fortify (-5 / +5 lines)
Lines 1464-1471 Link Here
1464
  clearmem2();
1464
  clearmem2();
1465
}
1465
}
1466
1466
1467
extern unsigned char BRRBuffer[32];
1467
extern unsigned char BRRBuffer[];
1468
extern unsigned char echoon0;
1468
extern unsigned char echoon0[];
1469
extern unsigned int PHdspsave;
1469
extern unsigned int PHdspsave;
1470
extern unsigned int PHdspsave2;
1470
extern unsigned int PHdspsave2;
1471
unsigned char echobuf[90000];
1471
unsigned char echobuf[90000];
Lines 1479-1485 Link Here
1479
  memset(vidmemch4, 0, 4096);
1479
  memset(vidmemch4, 0, 4096);
1480
  memset(vidmemch8, 0, 4096);
1480
  memset(vidmemch8, 0, 4096);
1481
  memset(BRRBuffer, 0, PHdspsave);
1481
  memset(BRRBuffer, 0, PHdspsave);
1482
  memset(&echoon0, 0, PHdspsave2);
1482
  memset(echoon0, 0, PHdspsave2);
1483
  memset(echobuf, 0, 90000);
1483
  memset(echobuf, 0, 90000);
1484
  memset(spcBuffera, 0, 65536*4+4096);
1484
  memset(spcBuffera, 0, 65536*4+4096);
1485
  memset(DSPMem, 0, 256);
1485
  memset(DSPMem, 0, 256);
Lines 1822-1828 Link Here
1822
1822
1823
extern unsigned int nmiprevaddrl, nmiprevaddrh, nmirept, nmiprevline, nmistatus;
1823
extern unsigned int nmiprevaddrl, nmiprevaddrh, nmirept, nmiprevline, nmistatus;
1824
extern unsigned char spcnumread, yesoutofmemory;
1824
extern unsigned char spcnumread, yesoutofmemory;
1825
extern unsigned char NextLineCache, sramsavedis, sndrot, regsbackup[3019];
1825
extern unsigned char NextLineCache, sramsavedis, sndrot[], regsbackup[3019];
1826
extern unsigned int Voice0Freq, Voice1Freq, Voice2Freq, Voice3Freq;
1826
extern unsigned int Voice0Freq, Voice1Freq, Voice2Freq, Voice3Freq;
1827
extern unsigned int Voice4Freq, Voice5Freq, Voice6Freq, Voice7Freq;
1827
extern unsigned int Voice4Freq, Voice5Freq, Voice6Freq, Voice7Freq;
1828
extern unsigned int dspPAdj;
1828
extern unsigned int dspPAdj;
Lines 2621-2627 Link Here
2621
    }
2621
    }
2622
2622
2623
    sramsavedis = 0;
2623
    sramsavedis = 0;
2624
    memcpy(&sndrot, regsbackup, 3019);
2624
    memcpy(sndrot, regsbackup, 3019);
2625
2625
2626
    if (yesoutofmemory) { asm_call(outofmemfix); }
2626
    if (yesoutofmemory) { asm_call(outofmemfix); }
2627
    asm_call(GUIDoReset);
2627
    asm_call(GUIDoReset);
(-)zsnes_1_51/src/zstate.c.fortify (-4 / +4 lines)
Lines 99-113 Link Here
99
  copy_func(buffer, &cycpbl, 4);
99
  copy_func(buffer, &cycpbl, 4);
100
  copy_func(buffer, &cycpblt, 4);
100
  copy_func(buffer, &cycpblt, 4);
101
  //SNES PPU Register status
101
  //SNES PPU Register status
102
  copy_func(buffer, &sndrot, 3019);
102
  copy_func(buffer, sndrot, 3019);
103
}
103
}
104
104
105
static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t))
105
static void copy_spc_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t))
106
{
106
{
107
  //SPC stuff, DSP stuff
107
  //SPC stuff, DSP stuff
108
  copy_func(buffer, SPCRAM, PHspcsave);
108
  copy_func(buffer, SPCRAM, PHspcsave);
109
  copy_func(buffer, &BRRBuffer, PHdspsave);
109
  copy_func(buffer, BRRBuffer, PHdspsave);
110
  copy_func(buffer, &DSPMem, sizeof(DSPMem));
110
  copy_func(buffer, DSPMem, sizeof(DSPMem));
111
}
111
}
112
112
113
static void copy_extra_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t))
113
static void copy_extra_data(unsigned char **buffer, void (*copy_func)(unsigned char **, void *, size_t))
Lines 156-162 Link Here
156
    /*
156
    /*
157
    if (buffer) //Rewind stuff
157
    if (buffer) //Rewind stuff
158
    {
158
    {
159
      copy_func(&buffer, &echoon0, PHdspsave2);
159
      copy_func(&buffer, echoon0, PHdspsave2);
160
    }
160
    }
161
    */
161
    */
162
  }
162
  }
(-)zsnes_1_51/src/gblvars.h.fortify (-3 / +3 lines)
Lines 33-41 Link Here
33
extern unsigned int SfxR0, *setaramdata, ramsize, *sram, nmiprevaddrh;
33
extern unsigned int SfxR0, *setaramdata, ramsize, *sram, nmiprevaddrh;
34
extern unsigned int tempesi, tempedi, tempedx, tempebp;
34
extern unsigned int tempesi, tempedi, tempedx, tempebp;
35
extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2;
35
extern unsigned int SPCMultA, PHnum2writespc7110reg, PHdspsave2;
36
extern unsigned char sndrot, SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea;
36
extern unsigned char sndrot[], SPCRAM[65472], DSPMem[256], SA1Status, *SA1RAMArea;
37
extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[32], *romdata;
37
extern unsigned char DSP1Enable, DSP1COp, prevoamptr, BRRBuffer[], *romdata;
38
extern unsigned char curcyc, echoon0, spcnumread, NextLineCache, HIRQNextExe;
38
extern unsigned char curcyc, echoon0[], spcnumread, NextLineCache, HIRQNextExe;
39
extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096];
39
extern unsigned char vidmemch4[4096], vidmemch8[4096], vidmemch2[4096];
40
40
41
extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, DSP4Enable, spcon;
41
extern bool C4Enable, SFXEnable, SA1Enable, SPC7110Enable, SETAEnable, DSP4Enable, spcon;

Return to bug 257963