Skip to content

Commit

Permalink
imported winuaesrc2020b11.zip
Browse files Browse the repository at this point in the history
  • Loading branch information
tonioni committed Feb 22, 2010
1 parent 2c02123 commit dddda49
Show file tree
Hide file tree
Showing 261 changed files with 3,569 additions and 5,559 deletions.
4 changes: 2 additions & 2 deletions a2065.c → a2065.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static void chip_init (void)
uaenet_close (sysdata);
if (td != NULL) {
if (!sysdata)
sysdata = xcalloc (uaenet_getdatalenght(), 1);
sysdata = xcalloc (uae_u8, uaenet_getdatalenght());
if (!uaenet_open (sysdata, td, NULL, gotfunc, getfunc, prom)) {
write_log (L"A2065: failed to initialize winpcap driver\n");
}
Expand Down Expand Up @@ -719,7 +719,7 @@ static void REGPARAM2 a2065_lput (uaecptr addr, uae_u32 l)
a2065_wput (addr + 2, l);
}

static addrbank a2065_bank;
extern addrbank a2065_bank;

static void REGPARAM2 a2065_bput (uaecptr addr, uae_u32 b)
{
Expand Down
4 changes: 2 additions & 2 deletions a2091.c → a2091.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ int addscsi (int ch, TCHAR *path, int blocksize, int readonly,

freescsi (scsis[ch]);
scsis[ch] = NULL;
hfd = xcalloc (sizeof (struct hd_hardfiledata), 1);
hfd = xcalloc (struct hd_hardfiledata, 1);
if (!hdf_hd_open (hfd, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys))
return 0;
hfd->ansi_version = scsi_level;
Expand Down Expand Up @@ -1350,7 +1350,7 @@ void a2091_init (void)
if (z) {
write_log (L"A590/A2091 BOOT ROM %d.%d ", rd->ver, rd->rev);
rom_size = rd->size;
rom = xmalloc (rom_size);
rom = xmalloc (uae_u8, rom_size);
if (rl->rd->id == 56)
rombankswitcher = 1;
zfile_fread (rom, rom_size, 1, z);
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions akiko.c → akiko.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ static int cdrom_command_status (void)
if (unitnum >= 0)
cdrom_toc ();
/* firmware info */
strcpy (cdrom_result_buffer + 2, FIRMWAREVERSION);
memcpy (cdrom_result_buffer + 2, FIRMWAREVERSION, sizeof FIRMWAREVERSION);
cdrom_result_buffer[0] = cdrom_command;
cd_initialized = 1;
return 20;
Expand Down Expand Up @@ -1694,10 +1694,10 @@ int akiko_init (void)
}
if (!sys_cddev_open ()) {
cdromok = 1;
sector_buffer_1 = xmalloc (SECTOR_BUFFER_SIZE * 2048);
sector_buffer_2 = xmalloc (SECTOR_BUFFER_SIZE * 2048);
sector_buffer_info_1 = xmalloc (SECTOR_BUFFER_SIZE);
sector_buffer_info_2 = xmalloc (SECTOR_BUFFER_SIZE);
sector_buffer_1 = xmalloc (uae_u8, SECTOR_BUFFER_SIZE * 2048);
sector_buffer_2 = xmalloc (uae_u8, SECTOR_BUFFER_SIZE * 2048);
sector_buffer_info_1 = xmalloc (uae_u8, SECTOR_BUFFER_SIZE);
sector_buffer_info_2 = xmalloc (uae_u8, SECTOR_BUFFER_SIZE);
sector_buffer_sector_1 = -1;
sector_buffer_sector_2 = -1;
}
Expand Down Expand Up @@ -1725,7 +1725,7 @@ uae_u8 *save_akiko(int *len)
if (!currprefs.cs_cd32cd)
return NULL;

dstbak = dst = malloc (1000);
dstbak = dst = xmalloc (uae_u8, 1000);
save_u16 (0);
save_u16 (0xCAFE);
save_u32 (cdrom_intreq);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion amax.c → amax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void amax_init (void)
zfile_fseek (z, 0, SEEK_END);
rom_size = zfile_ftell (z);
zfile_fseek (z, 0, SEEK_SET);
rom = xmalloc (rom_size);
rom = xmalloc (uae_u8, rom_size);
zfile_fread (rom, rom_size, 1, z);
zfile_fclose (z);
write_log (L"AMAX: '%s' loaded, %d bytes\n", currprefs.amaxromfile, rom_size);
Expand Down
8 changes: 4 additions & 4 deletions ar.c → ar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ int action_replay_load (void)
return 0;
}
action_replay_flag = ACTION_REPLAY_INACTIVE;
armemory_rom = xmalloc (ar_rom_file_size);
armemory_rom = xmalloc (uae_u8, ar_rom_file_size);
zfile_fread (armemory_rom, 1, ar_rom_file_size, f);
zfile_fclose (f);
if (ar_rom_file_size == 65536) {
Expand All @@ -1681,7 +1681,7 @@ int action_replay_load (void)
}
arram_mask = arram_size - 1;
arrom_mask = arrom_size - 1;
armemory_ram = xcalloc (arram_size, 1);
armemory_ram = xcalloc (uae_u8, arram_size);
write_log (L"Action Replay %d installed at %08X, size %08X\n", armodel, arrom_start, arrom_size);
action_replay_version();
return armodel;
Expand Down Expand Up @@ -1739,7 +1739,7 @@ void action_replay_cleanup()
#endif

#ifdef ACTION_REPLAY_HRTMON
#include "hrtmon.rom.c"
#include "hrtmon.rom.cpp"
#endif

int hrtmon_lang = 0;
Expand Down Expand Up @@ -2072,7 +2072,7 @@ uae_u8 *save_action_replay (int *len, uae_u8 *dstptr)
if (dstptr)
dstbak = dst = dstptr;
else
dstbak = dst = malloc (arram_size + sizeof ar_custom + sizeof ar_ciaa + sizeof ar_ciab + 1024);
dstbak = dst = xmalloc (uae_u8, arram_size + sizeof ar_custom + sizeof ar_ciaa + sizeof ar_ciab + 1024);
save_u8 (0);
save_u8 (armodel);
save_u32 (get_crc32 (armemory_rom + 4, arrom_size - 4));
Expand Down
6 changes: 3 additions & 3 deletions arcadia.c → arcadia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
*/

static void multigame(int);
static void multigame (int);

int arcadia_flag, arcadia_coin[2];
struct arcadiarom *arcadia_bios, *arcadia_game;
Expand Down Expand Up @@ -91,7 +91,7 @@ static int load_rom8 (TCHAR *xpath, uae_u8 *mem, int extra)
struct zfile *zf;
TCHAR path[MAX_DPATH];
int i;
uae_u8 *tmp = xmalloc (131072);
uae_u8 *tmp = xmalloc (uae_u8, 131072);
TCHAR *bin = extra == 1 ? L".bin" : L"";

memset (tmp, 0, 131072);
Expand Down Expand Up @@ -397,7 +397,7 @@ int arcadia_map_banks (void)
{
if (!arcadia_bios)
return 0;
arbmemory = (uae_u8*)xmalloc (allocated_arbmemory);
arbmemory = xmalloc (uae_u8, allocated_arbmemory);
arbbmemory = arbmemory + bios_offset;
memset (arbmemory, 0, allocated_arbmemory);
if (!load_roms (arcadia_bios)) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions archivers/dms/pfile.c → archivers/dms/pfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static int passfound, passretries;
static TCHAR modes[7][7]={L"NOCOMP",L"SIMPLE",L"QUICK ",L"MEDIUM",L"DEEP ",L"HEAVY1",L"HEAVY2"};
static USHORT PWDCRC;

UCHAR *text;
static UCHAR *text;

static void log_error(int track)
{
Expand Down Expand Up @@ -84,14 +84,14 @@ USHORT DMS_Process_File(struct zfile *fi, struct zfile *fo, USHORT cmd, USHORT o

passfound = 0;
passretries = 2;
b1 = (UCHAR *)calloc((size_t)TRACK_BUFFER_LEN,1);
b1 = xcalloc(UCHAR,TRACK_BUFFER_LEN);
if (!b1) return ERR_NOMEMORY;
b2 = (UCHAR *)calloc((size_t)TRACK_BUFFER_LEN,1);
b2 = xcalloc(UCHAR,TRACK_BUFFER_LEN);
if (!b2) {
free(b1);
return ERR_NOMEMORY;
}
text = (UCHAR *)calloc((size_t)TEMP_BUFFER_LEN,1);
text = xcalloc(UCHAR,TEMP_BUFFER_LEN);
if (!text) {
free(b1);
free(b2);
Expand Down Expand Up @@ -365,7 +365,7 @@ static USHORT Process_Track(struct zfile *fi, struct zfile *fo, UCHAR *b1, UCHAR
// did we have another cylinder 0 already?
uae_u8 *p;
zfile_fseek (fo, 0, SEEK_SET);
p = xcalloc (512 * 22, 1);
p = xcalloc (uae_u8, 512 * 22);
zfile_fread (p, 512 * 22, 1, fo);
addextra(L"BigFakeBootBlock", extra, p, 512 * 22);
xfree (p);
Expand Down Expand Up @@ -535,7 +535,7 @@ static void printbandiz(UCHAR *m, USHORT len){
if (*i == 10) {
TCHAR *u;
*i=0;
u = au (j);
u = au ((char*)j);
write_log (L"%s\n",u);
xfree (u);
j=i+1;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions archivers/dms/u_deep.c → archivers/dms/u_deep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ int init_deep_tabs=1;
#define MAX_FREQ 0x8000 /* updates tree when the */


USHORT freq[T + 1]; /* frequency table */
static USHORT freq[T + 1]; /* frequency table */

USHORT prnt[T + N_CHAR]; /* pointers to parent nodes, except for the */
static USHORT prnt[T + N_CHAR]; /* pointers to parent nodes, except for the */
/* elements [T..T + N_CHAR - 1] which are used to get */
/* the positions of leaves corresponding to the codes. */

USHORT son[T]; /* pointers to child nodes (son[], son[] + 1) */
static USHORT son[T]; /* pointers to child nodes (son[], son[] + 1) */



Expand Down
2 changes: 1 addition & 1 deletion archivers/dms/u_heavy.c → archivers/dms/u_heavy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define N1 510
#define OFFSET 253

USHORT left[2 * NC - 1], right[2 * NC - 1 + 9];
static USHORT left[2 * NC - 1], right[2 * NC - 1 + 9];
static UCHAR c_len[NC], pt_len[NPT];
static USHORT c_table[4096], pt_table[256];
USHORT lastlen, np;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 10 additions & 28 deletions archivers/lha/crcio.c → archivers/lha/crcio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ put_indicator(count)

/* ------------------------------------------------------------------------ */
unsigned short
calccrc(p, n)
unsigned char *p;
unsigned int n;
calccrc(unsigned char *p, unsigned int n)
{
reading_size += n;
#ifdef NEED_INCREMENTAL_INDICATOR
Expand All @@ -66,8 +64,7 @@ calccrc(p, n)

/* ------------------------------------------------------------------------ */
void
fillbuf(n) /* Shift bitbuf n bits left, read n bits */
unsigned char n;
fillbuf(unsigned char n) /* Shift bitbuf n bits left, read n bits */
{
while (n > bitcount) {
n -= bitcount;
Expand All @@ -87,8 +84,7 @@ fillbuf(n) /* Shift bitbuf n bits left, read n bits */

/* ------------------------------------------------------------------------ */
unsigned short
getbits(n)
unsigned char n;
getbits(unsigned char n)
{
unsigned short x;

Expand Down Expand Up @@ -154,10 +150,7 @@ putbits(n, x) /* Write rightmost n bits of x */
#endif
/* ------------------------------------------------------------------------ */
int
fread_crc(p, n, fp)
unsigned char *p;
int n;
struct zfile *fp;
fread_crc(unsigned char *p, int n, struct zfile *fp)
{
n = zfile_fread(p, 1, n, fp);

Expand All @@ -167,10 +160,7 @@ fread_crc(p, n, fp)

/* ------------------------------------------------------------------------ */
void
fwrite_crc(p, n, fp)
unsigned char *p;
int n;
struct zfile *fp;
fwrite_crc(unsigned char *p, int n, struct zfile *fp)
{
calccrc(p, n);
if (verify_mode)
Expand All @@ -183,7 +173,7 @@ fwrite_crc(p, n, fp)

/* ------------------------------------------------------------------------ */
void
init_code_cache( /* void */ )
init_code_cache(void)
{ /* called from copyfile() in util.c */
#ifdef EUC
putc_euc_cache = EOF;
Expand All @@ -192,7 +182,7 @@ init_code_cache( /* void */ )
}

void
init_getbits( /* void */ )
init_getbits(void)
{
lhabitbuf = 0;
subbitbuf = 0;
Expand Down Expand Up @@ -255,10 +245,7 @@ putc_euc(c, fd)

/* ------------------------------------------------------------------------ */
int
fwrite_txt(p, n, fp)
unsigned char *p;
int n;
FILE *fp;
fwrite_txt(unsigned char *p, int n, FILE *fp)
{
while (--n >= 0) {
if (*p != '\015' && *p != '\032') {
Expand All @@ -276,10 +263,7 @@ fwrite_txt(p, n, fp)

/* ------------------------------------------------------------------------ */
int
fread_txt(p, n, fp)
unsigned char *p;
int n;
FILE *fp;
fread_txt(unsigned char *p, int n, FILE *fp)
{
int c;
int cnt = 0;
Expand Down Expand Up @@ -337,9 +321,7 @@ fread_txt(p, n, fp)

/* ------------------------------------------------------------------------ */
unsigned short
calc_header_crc(p, n) /* Thanks T.Okamoto */
unsigned char *p;
unsigned int n;
calc_header_crc(unsigned char *p, unsigned int n) /* Thanks T.Okamoto */
{
crc = 0;
while (n-- > 0)
Expand Down
Loading

0 comments on commit dddda49

Please sign in to comment.