Beispiel #1
0
void dongle_potgo (uae_u16 val)
{
	if (!currprefs.dongle)
		return;
	switch (currprefs.dongle)
	{
	case ITALY90:
	case LOGISTIX:
	case DAMESGRANDMAITRE:
		flag = (uaerand () & 7) - 3;
		break;
	}

}
Beispiel #2
0
static int load (struct CapsTrackInfoT2 *ci, int drv, int track, bool seed)
{
	int flags;
	
	flags = caps_flags;
	if (canseed) {
		ci->type = 2;
		if (seed) {
			flags |= DI_LOCK_SETWSEED;
			ci->wseed = uaerand ();
		}
	} else {
		ci->type = 1;
	}
	if (pCAPSLockTrack ((PCAPSTRACKINFO)ci, caps_cont[drv], track / 2, track & 1, flags) != imgeOk)
		return 0;
	return 1;
}
Beispiel #3
0
char *fsdb_create_unique_nname (a_inode *base, const char *suggestion)
{
    char tmp[256] = "__uae___";
    strncat (tmp, suggestion, 240);
    for (;;) {
	int i;
	char *p = build_nname (base->nname, tmp);
	if (access (p, R_OK) < 0 && errno == ENOENT) {
	    printf ("unique name: %s\n", p);
	    return p;
	}
	free (p);

	/* tmpnam isn't reentrant and I don't really want to hack configure
	 * right now to see whether tmpnam_r is available...  */
	for (i = 0; i < 8; i++) {
	    tmp[i] = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[uaerand() % 63];
	}
    }
}
Beispiel #4
0
int amiga_get_rand_checksum() {
    return uaerand() & 0x00ffffff;
}