Commit 5928ccfc authored by GnoStiC's avatar GnoStiC

puae 2.3.1

parent bb1b7971
...@@ -2196,10 +2196,7 @@ STATIC_INLINE void record_sprite_1 (int sprxp, uae_u16 *buf, uae_u32 datab, int ...@@ -2196,10 +2196,7 @@ STATIC_INLINE void record_sprite_1 (int sprxp, uae_u16 *buf, uae_u32 datab, int
if ((sprxp >= sprite_minx && sprxp < sprite_maxx) || (bplcon3 & 2)) if ((sprxp >= sprite_minx && sprxp < sprite_maxx) || (bplcon3 & 2))
col = (datab & 3) << (2 * num); col = (datab & 3) << (2 * num);
#if 0
if (sprxp == sprite_minx || sprxp == sprite_maxx - 1)
col ^= (rand () << 16) | rand ();
#endif
if ((j & mask) == 0) { if ((j & mask) == 0) {
unsigned int tmp = (*buf) | col; unsigned int tmp = (*buf) | col;
*buf++ = tmp; *buf++ = tmp;
......
...@@ -3640,7 +3640,7 @@ void debug (void) ...@@ -3640,7 +3640,7 @@ void debug (void)
&& nr_units () == 0 && nr_units () == 0
#endif #endif
) { ) {
//savestate_capture (1); savestate_capture (1);
} }
for (i = 0; i < BREAKPOINT_TOTAL; i++) { for (i = 0; i < BREAKPOINT_TOTAL; i++) {
if (bpnodes[i].enabled) if (bpnodes[i].enabled)
......
...@@ -1138,8 +1138,8 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR ...@@ -1138,8 +1138,8 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
openwritefile (drv, 0); openwritefile (drv, 0);
drive_settype_id (drv); /* Set DD or HD drive */ drive_settype_id (drv); /* Set DD or HD drive */
drive_fill_bigbuf (drv, 1); drive_fill_bigbuf (drv, 1);
drv->mfmpos = rand (); drv->mfmpos = uaerand ();
drv->mfmpos |= (rand () << 16); drv->mfmpos |= (uaerand () << 16);
drv->mfmpos %= drv->tracklen; drv->mfmpos %= drv->tracklen;
drv->prevtracklen = 0; drv->prevtracklen = 0;
#ifdef DRIVESOUND #ifdef DRIVESOUND
...@@ -1151,10 +1151,10 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR ...@@ -1151,10 +1151,10 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
static void rand_shifter (void) static void rand_shifter (void)
{ {
unsigned int r = ((rand () >> 4) & 7) + 1; unsigned int r = ((uaerand () >> 4) & 7) + 1;
while (r-- > 0) { while (r-- > 0) {
word <<= 1; word <<= 1;
word |= (rand () & 0x1000) ? 1 : 0; word |= (uaerand () & 0x1000) ? 1 : 0;
bitoffset++; bitoffset++;
bitoffset &= 15; bitoffset &= 15;
} }
...@@ -2391,6 +2391,7 @@ static void DISK_check_change (void) ...@@ -2391,6 +2391,7 @@ static void DISK_check_change (void)
void DISK_vsync (void) void DISK_vsync (void)
{ {
unsigned int i; unsigned int i;
DISK_check_change (); DISK_check_change ();
for (i = 0; i < MAX_FLOPPY_DRIVES; i++) { for (i = 0; i < MAX_FLOPPY_DRIVES; i++) {
drive *drv = floppy + i; drive *drv = floppy + i;
......
...@@ -178,7 +178,7 @@ void dongle_potgo (uae_u16 val) ...@@ -178,7 +178,7 @@ void dongle_potgo (uae_u16 val)
case ITALY90: case ITALY90:
case LOGISTIX: case LOGISTIX:
case DAMESGRANDMAITRE: case DAMESGRANDMAITRE:
flag = (rand () & 7) - 3; flag = (uaerand () & 7) - 3;
break; break;
} }
......
...@@ -234,7 +234,6 @@ static uae_u32 REGPARAM2 expamem_bget (uaecptr addr) ...@@ -234,7 +234,6 @@ static uae_u32 REGPARAM2 expamem_bget (uaecptr addr)
#endif #endif
addr &= 0xFFFF; addr &= 0xFFFF;
b = expamem[addr]; b = expamem[addr];
//write_log ("%08x=%02X\n", addr, b);
return b; return b;
} }
...@@ -1168,7 +1167,7 @@ static void allocate_expamem (void) ...@@ -1168,7 +1167,7 @@ static void allocate_expamem (void)
z3fastmem_start = currprefs.z3fastmem_start; z3fastmem_start = currprefs.z3fastmem_start;
if (currprefs.z3chipmem_size) if (currprefs.z3chipmem_size)
z3fastmem_start += currprefs.z3chipmem_size + 16 * 1024 * 1024; z3fastmem_start += currprefs.z3chipmem_size + 16 * 1024 * 1024;
z3fastmem2_start = currprefs.z3fastmem_start + currprefs.z3fastmem_size; z3fastmem2_start = z3fastmem_start + currprefs.z3fastmem_size;
if (allocated_fastmem != currprefs.fastmem_size) { if (allocated_fastmem != currprefs.fastmem_size) {
free_fastmemory (); free_fastmemory ();
......
...@@ -1321,7 +1321,7 @@ static int handle_sectors_described_track (FDI *fdi) ...@@ -1321,7 +1321,7 @@ static int handle_sectors_described_track (FDI *fdi)
do { do {
fdi->track_type = *fdi->track_src++; fdi->track_type = *fdi->track_src++;
outlog ("%06.6X %06.6X %02.2X:",fdi->track_src - start_src + 0x200, fdi->out/8, fdi->track_type); outlog ("%06X %06X %02X:",fdi->track_src - start_src + 0x200, fdi->out/8, fdi->track_type);
oldout = fdi->out; oldout = fdi->out;
decode_sectors_described_track[fdi->track_type](fdi); decode_sectors_described_track[fdi->track_type](fdi);
outlog (" %d\n", fdi->out - oldout); outlog (" %d\n", fdi->out - oldout);
...@@ -1474,7 +1474,7 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3 ...@@ -1474,7 +1474,7 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
if (i >= pulses) if (i >= pulses)
i = 0; i = 0;
indx = idx[i]; indx = idx[i];
if (rand() <= (indx * RAND_MAX) / maxidx) { if (uaerand() <= (indx * RAND_MAX) / maxidx) {
pulse += avgp[i] - ref_pulse; pulse += avgp[i] - ref_pulse;
if (indx >= maxidx) if (indx >= maxidx)
ref_pulse = 0; ref_pulse = 0;
...@@ -1625,7 +1625,7 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3 ...@@ -1625,7 +1625,7 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
max_pulse = avg_pulse + (avgp[nexti] - minp[nexti]); max_pulse = avg_pulse + (avgp[nexti] - minp[nexti]);
if (min_pulse < ref_pulse) if (min_pulse < ref_pulse)
min_pulse = ref_pulse; min_pulse = ref_pulse;
randval = rand(); randval = uaerand();
if (randval < (RAND_MAX / 2)) { if (randval < (RAND_MAX / 2)) {
if (randval > (RAND_MAX / 4)) { if (randval > (RAND_MAX / 4)) {
if (randval <= (3 * RAND_MAX / 8)) if (randval <= (3 * RAND_MAX / 8))
...@@ -1656,11 +1656,11 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3 ...@@ -1656,11 +1656,11 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
ref_pulse = 0; ref_pulse = 0;
if (i == eodat) if (i == eodat)
outstep++; outstep++;
} else if ((unsigned int)rand () <= ((idx[i] * RAND_MAX) / maxidx)) { } else if (uaerand() <= ((idx[i] * RAND_MAX) / maxidx)) {
avg_pulse = avgp[i]; avg_pulse = avgp[i];
min_pulse = minp[i]; min_pulse = minp[i];
max_pulse = maxp[i]; max_pulse = maxp[i];
randval = rand(); randval = uaerand();
if (randval < (RAND_MAX / 2)) { if (randval < (RAND_MAX / 2)) {
if (randval > (RAND_MAX / 4)) { if (randval > (RAND_MAX / 4)) {
if (randval <= (3 * RAND_MAX / 8)) if (randval <= (3 * RAND_MAX / 8))
......
...@@ -1645,7 +1645,7 @@ uae_u8 *restore_fpu (uae_u8 *src) ...@@ -1645,7 +1645,7 @@ uae_u8 *restore_fpu (uae_u8 *src)
int i; int i;
uae_u32 flags; uae_u32 flags;
changed_prefs.fpu_model = currprefs.fpu_model = restore_u32(); changed_prefs.fpu_model = currprefs.fpu_model = restore_u32 ();
flags = restore_u32 (); flags = restore_u32 ();
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
uae_u32 w1 = restore_u32 (); uae_u32 w1 = restore_u32 ();
...@@ -1661,7 +1661,7 @@ uae_u8 *restore_fpu (uae_u8 *src) ...@@ -1661,7 +1661,7 @@ uae_u8 *restore_fpu (uae_u8 *src)
restore_u32(); restore_u32();
restore_u32(); restore_u32();
} }
write_log ("FPU=%d\n", currprefs.fpu_model); write_log ("FPU: %d\n", currprefs.fpu_model);
return src; return src;
} }
......
...@@ -111,7 +111,7 @@ uae_u32 uaesrand (uae_u32 seed) ...@@ -111,7 +111,7 @@ uae_u32 uaesrand (uae_u32 seed)
oldhcounter = -1; oldhcounter = -1;
randseed = seed; randseed = seed;
//randseed = 0x12345678; //randseed = 0x12345678;
//write_log (L"seed=%08x\n", randseed); //write_log ("seed=%08x\n", randseed);
return randseed; return randseed;
} }
uae_u32 uaerand (void) uae_u32 uaerand (void)
...@@ -121,7 +121,7 @@ uae_u32 uaerand (void) ...@@ -121,7 +121,7 @@ uae_u32 uaerand (void)
oldhcounter = hsync_counter; oldhcounter = hsync_counter;
} }
uae_u32 r = rand (); uae_u32 r = rand ();
//write_log (L"rand=%08x\n", r); //write_log ("rand=%08x\n", r);
return r; return r;
} }
uae_u32 uaerandgetseed (void) uae_u32 uaerandgetseed (void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment