mirror of
https://github.com/libretro/PUAE.git
synced 2024-11-24 00:09:54 +00:00
puae 2.3.1
This commit is contained in:
parent
bb1b7971a8
commit
5928ccfc21
@ -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))
|
||||
col = (datab & 3) << (2 * num);
|
||||
#if 0
|
||||
if (sprxp == sprite_minx || sprxp == sprite_maxx - 1)
|
||||
col ^= (rand () << 16) | rand ();
|
||||
#endif
|
||||
|
||||
if ((j & mask) == 0) {
|
||||
unsigned int tmp = (*buf) | col;
|
||||
*buf++ = tmp;
|
||||
|
@ -3640,7 +3640,7 @@ void debug (void)
|
||||
&& nr_units () == 0
|
||||
#endif
|
||||
) {
|
||||
//savestate_capture (1);
|
||||
savestate_capture (1);
|
||||
}
|
||||
for (i = 0; i < BREAKPOINT_TOTAL; i++) {
|
||||
if (bpnodes[i].enabled)
|
||||
|
@ -1138,8 +1138,8 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
|
||||
openwritefile (drv, 0);
|
||||
drive_settype_id (drv); /* Set DD or HD drive */
|
||||
drive_fill_bigbuf (drv, 1);
|
||||
drv->mfmpos = rand ();
|
||||
drv->mfmpos |= (rand () << 16);
|
||||
drv->mfmpos = uaerand ();
|
||||
drv->mfmpos |= (uaerand () << 16);
|
||||
drv->mfmpos %= drv->tracklen;
|
||||
drv->prevtracklen = 0;
|
||||
#ifdef DRIVESOUND
|
||||
@ -1151,10 +1151,10 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR
|
||||
|
||||
static void rand_shifter (void)
|
||||
{
|
||||
unsigned int r = ((rand () >> 4) & 7) + 1;
|
||||
unsigned int r = ((uaerand () >> 4) & 7) + 1;
|
||||
while (r-- > 0) {
|
||||
word <<= 1;
|
||||
word |= (rand () & 0x1000) ? 1 : 0;
|
||||
word |= (uaerand () & 0x1000) ? 1 : 0;
|
||||
bitoffset++;
|
||||
bitoffset &= 15;
|
||||
}
|
||||
@ -2391,6 +2391,7 @@ static void DISK_check_change (void)
|
||||
void DISK_vsync (void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
DISK_check_change ();
|
||||
for (i = 0; i < MAX_FLOPPY_DRIVES; i++) {
|
||||
drive *drv = floppy + i;
|
||||
|
@ -178,7 +178,7 @@ void dongle_potgo (uae_u16 val)
|
||||
case ITALY90:
|
||||
case LOGISTIX:
|
||||
case DAMESGRANDMAITRE:
|
||||
flag = (rand () & 7) - 3;
|
||||
flag = (uaerand () & 7) - 3;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,6 @@ static uae_u32 REGPARAM2 expamem_bget (uaecptr addr)
|
||||
#endif
|
||||
addr &= 0xFFFF;
|
||||
b = expamem[addr];
|
||||
//write_log ("%08x=%02X\n", addr, b);
|
||||
return b;
|
||||
}
|
||||
|
||||
@ -1168,7 +1167,7 @@ static void allocate_expamem (void)
|
||||
z3fastmem_start = currprefs.z3fastmem_start;
|
||||
if (currprefs.z3chipmem_size)
|
||||
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) {
|
||||
free_fastmemory ();
|
||||
|
@ -39,7 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "zfile.h"
|
||||
/* ELSE */
|
||||
/* ELSE */
|
||||
//#include "types.h"
|
||||
|
||||
#include "fdi2raw.h"
|
||||
@ -525,7 +525,7 @@ static void s0b(FDI *fdi)
|
||||
i = 7;
|
||||
b = *fdi->track_src++;
|
||||
while (bits--) {
|
||||
bit_add (fdi, b & (1 << i));
|
||||
bit_add (fdi, b & (1 << i));
|
||||
i--;
|
||||
}
|
||||
}
|
||||
@ -746,7 +746,7 @@ static int amiga_check_track (FDI *fdi)
|
||||
if (chksum) {
|
||||
outlog ("sector %d data checksum error\n",trackoffs);
|
||||
ok = 0;
|
||||
} else if (sectable[trackoffs]) {
|
||||
} else if (sectable[trackoffs]) {
|
||||
outlog ("sector %d already found?\n", trackoffs);
|
||||
mbuf = mbuf2;
|
||||
} else {
|
||||
@ -767,7 +767,7 @@ static int amiga_check_track (FDI *fdi)
|
||||
return ok;
|
||||
}
|
||||
|
||||
static void amiga_data_raw (FDI *fdi, uae_u8 *secbuf, uae_u8 *crc, unsigned int len)
|
||||
static void amiga_data_raw (FDI *fdi, uae_u8 *secbuf, uae_u8 *crc, unsigned int len)
|
||||
{
|
||||
unsigned int i;
|
||||
uae_u8 crcbuf[4];
|
||||
@ -1321,13 +1321,13 @@ static int handle_sectors_described_track (FDI *fdi)
|
||||
|
||||
do {
|
||||
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;
|
||||
decode_sectors_described_track[fdi->track_type](fdi);
|
||||
outlog (" %d\n", fdi->out - oldout);
|
||||
oldout = fdi->out;
|
||||
if (fdi->out < 0 || fdi->err) {
|
||||
outlog ("\nin %d bytes, out %d bits\n", fdi->track_src - fdi->track_src_buffer, fdi->out);
|
||||
outlog ("\nin %d bytes, out %d bits\n", fdi->track_src - fdi->track_src_buffer, fdi->out);
|
||||
return -1;
|
||||
}
|
||||
if (fdi->track_src - fdi->track_src_buffer >= fdi->track_src_len) {
|
||||
@ -1375,8 +1375,8 @@ static void dumpstream(int track, uae_u8 *stream, int len)
|
||||
FILE *f;
|
||||
|
||||
sprintf (name, "track_%d.raw", track);
|
||||
f = fopen(name, "wb");
|
||||
fwrite (stream, 1, len * 4, f);
|
||||
f = fopen(name, "wb");
|
||||
fwrite (stream, 1, len * 4, f);
|
||||
fclose (f);
|
||||
#endif
|
||||
}
|
||||
@ -1474,7 +1474,7 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
|
||||
if (i >= pulses)
|
||||
i = 0;
|
||||
indx = idx[i];
|
||||
if (rand() <= (indx * RAND_MAX) / maxidx) {
|
||||
if (uaerand() <= (indx * RAND_MAX) / maxidx) {
|
||||
pulse += avgp[i] - ref_pulse;
|
||||
if (indx >= maxidx)
|
||||
ref_pulse = 0;
|
||||
@ -1525,8 +1525,8 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
|
||||
for (j = real_size; j > 1; j--)
|
||||
addbit (d, 0);
|
||||
addbit (d, 1);
|
||||
for (j = 0; j < real_size; j++)
|
||||
*pt++ = (uae_u16)(pulse / real_size);
|
||||
for (j = 0; j < real_size; j++)
|
||||
*pt++ = (uae_u16)(pulse / real_size);
|
||||
}
|
||||
|
||||
/* prepares for the next pulse */
|
||||
@ -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]);
|
||||
if (min_pulse < ref_pulse)
|
||||
min_pulse = ref_pulse;
|
||||
randval = rand();
|
||||
randval = uaerand();
|
||||
if (randval < (RAND_MAX / 2)) {
|
||||
if (randval > (RAND_MAX / 4)) {
|
||||
if (randval <= (3 * RAND_MAX / 8))
|
||||
@ -1656,11 +1656,11 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
|
||||
ref_pulse = 0;
|
||||
if (i == eodat)
|
||||
outstep++;
|
||||
} else if ((unsigned int)rand () <= ((idx[i] * RAND_MAX) / maxidx)) {
|
||||
} else if (uaerand() <= ((idx[i] * RAND_MAX) / maxidx)) {
|
||||
avg_pulse = avgp[i];
|
||||
min_pulse = minp[i];
|
||||
max_pulse = maxp[i];
|
||||
randval = rand();
|
||||
randval = uaerand();
|
||||
if (randval < (RAND_MAX / 2)) {
|
||||
if (randval > (RAND_MAX / 4)) {
|
||||
if (randval <= (3 * RAND_MAX / 8))
|
||||
@ -1793,7 +1793,7 @@ static void fdi2_decode (FDI *fdi, unsigned long totalavg, uae_u32 *avgp, uae_u3
|
||||
|
||||
#endif
|
||||
|
||||
static void fdi2_celltiming (FDI *fdi, unsigned long totalavg, unsigned int bitoffset, uae_u16 *out)
|
||||
static void fdi2_celltiming (FDI *fdi, unsigned long totalavg, unsigned int bitoffset, uae_u16 *out)
|
||||
{
|
||||
uae_u16 *pt2, *pt;
|
||||
double avg_bit_len;
|
||||
|
@ -111,7 +111,7 @@ uae_u32 uaesrand (uae_u32 seed)
|
||||
oldhcounter = -1;
|
||||
randseed = seed;
|
||||
//randseed = 0x12345678;
|
||||
//write_log (L"seed=%08x\n", randseed);
|
||||
//write_log ("seed=%08x\n", randseed);
|
||||
return randseed;
|
||||
}
|
||||
uae_u32 uaerand (void)
|
||||
@ -121,7 +121,7 @@ uae_u32 uaerand (void)
|
||||
oldhcounter = hsync_counter;
|
||||
}
|
||||
uae_u32 r = rand ();
|
||||
//write_log (L"rand=%08x\n", r);
|
||||
//write_log ("rand=%08x\n", r);
|
||||
return r;
|
||||
}
|
||||
uae_u32 uaerandgetseed (void)
|
||||
|
Loading…
Reference in New Issue
Block a user