Merge pull request #41 from rofl0r/fix_warnings

Fix warnings and switch uaecptr to always be 32bit
This commit is contained in:
Mustafa TUFAN 2014-03-06 08:38:45 +02:00
commit 4fca5e70cf
28 changed files with 203 additions and 213 deletions

View File

@ -1813,7 +1813,7 @@ static void patchrom (void)
p[i + 8] = 0x4e;
p[i + 9] = 0x71;
protect_roms (true);
write_log (_T("extended rom delay loop patched at 0x%p\n"), i + 6 + 0xe00000);
write_log (_T("extended rom delay loop patched at 0x%08X\n"), i + 6 + 0xe00000);
return;
}
}

View File

@ -1264,7 +1264,7 @@ int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
sys_command_info (unitnum, &di, 1);
if (log_scsiemu) {
write_log (_T("SCSIEMU %d: %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X CMDLEN=%d DATA=%08X LEN=%d\n"), unitnum,
write_log (_T("SCSIEMU %d: %02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X.%02X CMDLEN=%d DATA=%p LEN=%d\n"), unitnum,
cmdbuf[0], cmdbuf[1], cmdbuf[2], cmdbuf[3], cmdbuf[4], cmdbuf[5], cmdbuf[6],
cmdbuf[7], cmdbuf[8], cmdbuf[9], cmdbuf[10], cmdbuf[11],
scsi_cmd_len, scsi_data, dlen);
@ -1273,7 +1273,7 @@ int scsi_cd_emulate (int unitnum, uae_u8 *cmdbuf, int scsi_cmd_len,
// media changed and not inquiry
if (st->mediawaschanged && cmd != 0x12) {
if (log_scsiemu) {
write_log (_T("SCSIEMU %d: MEDIUM MAY HAVE CHANGED STATE\n"));
write_log (_T("SCSIEMU %d: MEDIUM MAY HAVE CHANGED STATE\n"), unitnum);
}
lr = -1;
status = 2; /* CHECK CONDITION */

View File

@ -37,6 +37,7 @@
#include "bsdsocket.h"
#ifdef BSDSOCKET
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
@ -606,7 +607,7 @@ static void copyProtoent (TrapContext *context, SB, const struct protoent *p)
sb->protoent = uae_AllocMem (context, size, 0, sb->sysbase);
if (!sb->protoent) {
write_log ("BSDSOCK: WARNING - copyProtoent() ran out of Amiga memory (couldn't allocate %d bytes)\n", size);
write_log ("BSDSOCK: WARNING - copyProtoent() ran out of Amiga memory (couldn't allocate %lu bytes)\n", (unsigned long) size);
bsdsocklib_seterrno (sb, 12); // ENOMEM
return;
}
@ -1349,7 +1350,7 @@ void host_getservbynameport (TrapContext *context, SB, uae_u32 name, uae_u32 pro
sb->servent = uae_AllocMem (context, size, 0, sb->sysbase);
if (!sb->servent) {
write_log ("BSDSOCK: WARNING - getservby%s() ran out of Amiga memory (couldn't allocate %d bytes)\n",type ? "port" : "name", size);
write_log ("BSDSOCK: WARNING - getservby%s() ran out of Amiga memory (couldn't allocate %lu bytes)\n",type ? "port" : "name", (unsigned long) size);
bsdsocklib_seterrno (sb, 12); // ENOMEM
return;
}
@ -1443,7 +1444,7 @@ uae_u32 host_Inet_NtoA (TrapContext *context, SB, uae_u32 in)
*(uae_u32 *)&ina = htonl (in);
BSDTRACE (("Inet_NtoA(%lx) -> ", in));
BSDTRACE (("Inet_NtoA(%x) -> ", in));
if ((addr = inet_ntoa(ina)) != NULL) {
buf = m68k_areg (regs, 6) + offsetof (struct UAEBSDBase, scratchbuf);
@ -1467,7 +1468,7 @@ uae_u32 host_inet_addr (uae_u32 cp)
addr = htonl (inet_addr (cp_rp));
BSDTRACE (("inet_addr(%s) -> 0x%08lx\n", cp_rp, addr));
BSDTRACE (("inet_addr(%s) -> 0x%08x\n", cp_rp, addr));
return addr;
}

View File

@ -354,7 +354,7 @@ static struct socketbase *alloc_socketbase (TrapContext *context)
sb->signal = CallLib (context, sb->sysbase, -0x14A); /* AllocSignal */
if (sb->signal == -1) {
write_log (_T("bsdsocket: ERROR: Couldn't allocate signal for task 0x%lx.\n"), sb->ownertask);
write_log (_T("bsdsocket: ERROR: Couldn't allocate signal for task 0x%x.\n"), sb->ownertask);
xfree (sb);
return NULL;
}
@ -657,7 +657,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SetSocketSignals (TrapContext *context)
{
struct socketbase *sb = get_socketbase (context);
BSDTRACE ((_T("SetSocketSignals(0x%08lx,0x%08lx,0x%08lx) -> "), m68k_dreg (regs, 0), m68k_dreg (regs, 1), m68k_dreg (regs, 2)));
BSDTRACE ((_T("SetSocketSignals(0x%08x,0x%08x,0x%08x) -> "), m68k_dreg (regs, 0), m68k_dreg (regs, 1), m68k_dreg (regs, 2)));
sb->eintrsigs = m68k_dreg (regs, 0);
sb->eventsigs = m68k_dreg (regs, 1);
@ -717,7 +717,7 @@ static uae_u32 REGPARAM2 bsdsocklib_ObtainSocket (TrapContext *context)
{
struct socketbase *sb = get_socketbase (context);
int sd;
long id;
int id;
SOCKET_TYPE s;
int i;
@ -750,8 +750,8 @@ static uae_u32 REGPARAM2 bsdsocklib_ObtainSocket (TrapContext *context)
static uae_u32 REGPARAM2 bsdsocklib_ReleaseSocket (TrapContext *context)
{
struct socketbase *sb = get_socketbase (context);
int sd;
long id;
long sd;
int id;
SOCKET_TYPE s;
int i;
uae_u32 flags;
@ -760,7 +760,7 @@ static uae_u32 REGPARAM2 bsdsocklib_ReleaseSocket (TrapContext *context)
id = m68k_dreg (regs, 1);
sd++;
BSDTRACE ((_T("ReleaseSocket(%d,%d) -> "), sd, id));
BSDTRACE ((_T("ReleaseSocket(%ld,%d) -> "), sd, id));
s = getsock (sb, sd);
@ -813,8 +813,8 @@ static uae_u32 REGPARAM2 bsdsocklib_ReleaseSocket (TrapContext *context)
static uae_u32 REGPARAM2 bsdsocklib_ReleaseCopyOfSocket (TrapContext *context)
{
struct socketbase *sb = get_socketbase (context);
int sd;
long id;
long sd;
int id;
SOCKET_TYPE s;
int i;
uae_u32 flags;
@ -823,7 +823,7 @@ static uae_u32 REGPARAM2 bsdsocklib_ReleaseCopyOfSocket (TrapContext *context)
id = m68k_dreg (regs, 1);
sd++;
BSDTRACE ((_T("ReleaseSocket(%d,%d) -> "), sd, id));
BSDTRACE ((_T("ReleaseSocket(%ld,%d) -> "), sd, id));
s = getsock (sb, sd);
@ -885,7 +885,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SetErrnoPtr (TrapContext *context)
struct socketbase *sb = get_socketbase (context);
uae_u32 errnoptr = m68k_areg (regs, 0), size = m68k_dreg (regs, 0);
BSDTRACE ((_T("SetErrnoPtr(0x%lx,%d) -> "), errnoptr, size));
BSDTRACE ((_T("SetErrnoPtr(0x%x,%d) -> "), errnoptr, size));
if (size == 1 || size == 2 || size == 4) {
sb->errnoptr = errnoptr;
@ -1252,7 +1252,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
BSDTRACE ((_T("TAG_IGNORE")));
break;
case TAG_MORE:
BSDTRACE ((_T("TAG_MORE(0x%lx)"), currval));
BSDTRACE ((_T("TAG_MORE(0x%x)"), currval));
tagptr = currval;
break;
case TAG_SKIP:
@ -1297,7 +1297,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
tagcopy (currtag, currval, tagptr, (uae_u32 *)&sb->sb_herrno);
break;
case SBTC_DTABLESIZE:
BSDTRACE ((_T("SBTC_DTABLESIZE),0x%lx"), currval));
BSDTRACE ((_T("SBTC_DTABLESIZE),0x%x"), currval));
if (currtag & 1) {
bsdsocklib_SetDTableSize(sb, currval);
} else {
@ -1341,7 +1341,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
BSDTRACE ((_T("IOERRNOSTRPTR),%d"), ulTmp));
BSDTRACE ((_T("IOERRNOSTRPTR),%lu"), ulTmp));
if (ulTmp < number_sys_error) {
tagcopy (currtag, currval, tagptr, &iotextptrs[ulTmp]);
} else {
@ -1360,7 +1360,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
BSDTRACE ((_T("S2ERRNOSTRPTR),%d"), ulTmp));
BSDTRACE ((_T("S2ERRNOSTRPTR),%lu"), ulTmp));
if (ulTmp < number_sys_error) {
tagcopy (currtag, currval, tagptr, &sana2iotextptrs[ulTmp]);
} else {
@ -1379,7 +1379,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
BSDTRACE ((_T("S2WERRNOSTRPTR),%d"), ulTmp));
BSDTRACE ((_T("S2WERRNOSTRPTR),%lu"), ulTmp));
if (ulTmp < number_sys_error) {
tagcopy (currtag, currval, tagptr, &sana2wiretextptrs[ulTmp]);
} else {
@ -1398,7 +1398,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
BSDTRACE ((_T("ERRNOSTRPTR),%d"), ulTmp));
BSDTRACE ((_T("ERRNOSTRPTR),%lu"), ulTmp));
if (ulTmp < number_sys_error) {
tagcopy (currtag, currval, tagptr, &errnotextptrs[ulTmp]);
} else {
@ -1417,7 +1417,7 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
} else { /* SBTM_GETVAL */
ulTmp = currval;
}
BSDTRACE ((_T("HERRNOSTRPTR),%d"), ulTmp));
BSDTRACE ((_T("HERRNOSTRPTR),%lu"), ulTmp));
if (ulTmp < number_host_error) {
tagcopy (currtag, currval, tagptr, &herrnotextptrs[ulTmp]);
} else {
@ -1427,22 +1427,22 @@ static uae_u32 REGPARAM2 bsdsocklib_SocketBaseTagList (TrapContext *context)
break;
case SBTC_ERRNOBYTEPTR:
BSDTRACE ((_T("SBTC_ERRNOBYTEPTR),0x%lx"), currval));
BSDTRACE ((_T("SBTC_ERRNOBYTEPTR),0x%x"), currval));
tagcopy (currtag, currval, tagptr, &sb->errnoptr);
sb->errnosize = 1;
break;
case SBTC_ERRNOWORDPTR:
BSDTRACE ((_T("SBTC_ERRNOWORDPTR),0x%lx"), currval));
BSDTRACE ((_T("SBTC_ERRNOWORDPTR),0x%x"), currval));
tagcopy (currtag, currval, tagptr, &sb->errnoptr);
sb->errnosize = 2;
break;
case SBTC_ERRNOLONGPTR:
BSDTRACE ((_T("SBTC_ERRNOLONGPTR),0x%lx"), currval));
BSDTRACE ((_T("SBTC_ERRNOLONGPTR),0x%x"), currval));
tagcopy (currtag, currval, tagptr, &sb->errnoptr);
sb->errnosize = 4;
break;
case SBTC_HERRNOLONGPTR:
BSDTRACE ((_T("SBTC_HERRNOLONGPTR),0x%lx"), currval));
BSDTRACE ((_T("SBTC_HERRNOLONGPTR),0x%x"), currval));
tagcopy (currtag, currval, tagptr, &sb->herrnoptr);
sb->herrnosize = 4;
break;
@ -1564,7 +1564,7 @@ void bsdlib_reset (void)
for (sb = socketbases; sb; sb = nsb) {
nsb = sb->next;
write_log (_T("BSDSOCK: cleanup start socket %x\n"), sb);
write_log (_T("BSDSOCK: cleanup start socket %p\n"), sb);
host_sbcleanup (sb);
xfree (sb->dtable);

View File

@ -385,7 +385,7 @@ void cd32_fmv_init (uaecptr start)
struct romdata *rd;
struct zfile *z;
write_log (_T("CD32 FMV mapped @$%lx\n"), start);
write_log (_T("CD32 FMV mapped @$%x\n"), start);
if (start != fmv_start)
return;
if (!rl)

View File

@ -1551,13 +1551,13 @@ void CIA_reset (void)
void dumpcia (void)
{
write_log (_T("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n"),
write_log (_T("A: CRA %02x CRB %02x ICR %02x IM %02x TA %04lx (%04lx) TB %04lx (%04lx)\n"),
ciaacra, ciaacrb, ciaaicr, ciaaimask, ciaata, ciaala, ciaatb, ciaalb);
write_log (_T("TOD %06x (%06x) ALARM %06x %c%c CYC=%08X\n"),
write_log (_T("TOD %06lx (%06lx) ALARM %06lx %c%c CYC=%08lX\n"),
ciaatod, ciaatol, ciaaalarm, ciaatlatch ? 'L' : ' ', ciaatodon ? ' ' : 'S', get_cycles ());
write_log (_T("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04x (%04x) TB %04x (%04x)\n"),
write_log (_T("B: CRA %02x CRB %02x ICR %02x IM %02x TA %04lx (%04lx) TB %04lx (%04lx)\n"),
ciabcra, ciabcrb, ciabicr, ciabimask, ciabta, ciabla, ciabtb, ciablb);
write_log (_T("TOD %06x (%06x) ALARM %06x %c%c CLK=%d\n"),
write_log (_T("TOD %06lx (%06lx) ALARM %06lx %c%c CLK=%d\n"),
ciabtod, ciabtol, ciabalarm, ciabtlatch ? 'L' : ' ', ciabtodon ? ' ' : 'S', div10 / CYCLE_UNIT);
}

View File

@ -7905,7 +7905,7 @@ void dumpcustom (void)
{
write_log (_T("DMACON: %04x INTENA: %04x (%04x) INTREQ: %04x (%04x) VPOS: %x HPOS: %x\n"), DMACONR (current_hpos ()),
intena, intena_internal, intreq, intreq_internal, vpos, current_hpos ());
write_log (_T("COP1LC: %08lx, COP2LC: %08lx COPPTR: %08lx\n"), (unsigned long)cop1lc, (unsigned long)cop2lc, cop_state.ip);
write_log (_T("COP1LC: %08lx, COP2LC: %08lx COPPTR: %08x\n"), (unsigned long)cop1lc, (unsigned long)cop2lc, cop_state.ip);
write_log (_T("DIWSTRT: %04x DIWSTOP: %04x DDFSTRT: %04x DDFSTOP: %04x\n"),
(unsigned int)diwstrt, (unsigned int)diwstop, (unsigned int)ddfstrt, (unsigned int)ddfstop);
write_log (_T("BPLCON 0: %04x 1: %04x 2: %04x 3: %04x 4: %04x LOF=%d/%d HDIW=%d VDIW=%d\n"),
@ -7913,7 +7913,7 @@ void dumpcustom (void)
lof_current, lof_store,
hdiwstate == DIW_waiting_start ? 0 : 1, diwstate == DIW_waiting_start ? 0 : 1);
if (timeframes) {
write_log (_T("Average frame time: %.2f ms [frames: %d time: %d]\n"),
write_log (_T("Average frame time: %.2f ms [frames: %ld time: %ld]\n"),
(double)frametime / timeframes, timeframes, frametime);
if (total_skipped)
write_log (_T("Skipped frames: %d\n"), total_skipped);

View File

@ -818,7 +818,7 @@ uaecptr dumpmem2 (uaecptr addr, TCHAR *out, int osize)
if (osize <= (9 + cols * 5 + 1 + 2 * cols))
return addr;
_stprintf (out, _T("%08lX "), addr);
_stprintf (out, _T("%08X "), addr);
for (i = 0; i < cols; i++) {
uae_u8 b1, b2;
b1 = b2 = 0;
@ -1367,7 +1367,7 @@ static void decode_copper_insn (FILE* file, uae_u16 mword1, uae_u16 mword2, unsi
if (get_copper_address (-1) >= addr && get_copper_address(-1) <= addr + 3)
here = '*';
console_out_f (_T("%c%08lx: %04lx %04lx%s\t;%c "), here, addr, insn >> 16, insn & 0xFFFF, record, insn != ((mword1 << 16) | mword2) ? '!' : ' ');
console_out_f (_T("%c%08lx: %04x %04x%s\t;%c "), here, addr, insn >> 16, insn & 0xFFFF, record, insn != ((mword1 << 16) | mword2) ? '!' : ' ');
switch (insn_type) {
case 0x00010000: /* WAIT insn */
@ -1395,9 +1395,9 @@ static void decode_copper_insn (FILE* file, uae_u16 mword1, uae_u16 mword2, unsi
i++;
}
if (custd[i].name)
console_out_f (_T("%s := 0x%04lx\n"), custd[i].name, insn & 0xffff);
console_out_f (_T("%s := 0x%04x\n"), custd[i].name, insn & 0xffff);
else
console_out_f (_T("%04x := 0x%04lx\n"), addr, insn & 0xffff);
console_out_f (_T("%04x := 0x%04x\n"), addr, insn & 0xffff);
}
break;
@ -2176,7 +2176,7 @@ static int memwatch_func (uaecptr addr, int rwi, int size, uae_u32 *valp)
mask <<= shift;
}
*valp = (sval & mask) | ((*valp) & ~mask);
write_log (_T("%p %p %08x %08x %d\n"), addr, m->addr, *valp, mask, shift);
write_log (_T("%08x %08x %08x %08x %d\n"), addr, m->addr, *valp, mask, shift);
return 1;
}
return 0;
@ -3873,7 +3873,7 @@ static bool debug_line (TCHAR *input)
debug_illegal_mask = debug_illegal ? 0 : -1;
debug_illegal_mask &= ~((uae_u64)255 << 24); // mask interrupts
}
console_out_f (_T("Exception breakpoint mask: %0I64X\n"), debug_illegal_mask);
console_out_f (_T("Exception breakpoint mask: %016llX\n"), debug_illegal_mask);
debug_illegal = debug_illegal_mask ? 1 : 0;
} else {
addr = 0xffffffff;

View File

@ -52,6 +52,7 @@ int disk_debug_track = -1;
#include "misc.h"
#include "inputrecord.h"
#include <ctype.h>
#include <unistd.h>
#undef CATWEASEL
@ -1286,8 +1287,8 @@ static void drive_step (drive * drv, int step_direction)
drv->dskchange = 0;
if (drv->steplimit && get_cycles() - drv->steplimitcycle < MIN_STEPLIMIT_CYCLE) {
if (disk_debug_logging > 1)
write_log (_T(" step ignored drive %d, %d"),
drv - floppy, (get_cycles() - drv->steplimitcycle) / CYCLE_UNIT);
write_log (_T(" step ignored drive %ld, %lld"),
drv - floppy, (long long)((get_cycles() - drv->steplimitcycle) / CYCLE_UNIT));
return;
}
/* A1200's floppy drive needs at least 30 raster lines between steps
@ -1924,7 +1925,7 @@ static int decode_buffer (uae_u16 *mbuf, int cyl, int drvsec, int ddhd, int file
trackoffs = (id & 0xff00) >> 8;
if (trackoffs + 1 > drvsec) {
write_log (_T("Disk decode: weird sector number %d (%08X, %d)\n"), trackoffs, id, mbuf - mstart);
write_log (_T("Disk decode: weird sector number %d (%08X, %ld)\n"), trackoffs, id, mbuf - mstart);
if (filetype == ADF_EXT2)
return 2;
continue;
@ -2287,7 +2288,7 @@ static void drive_eject (drive * drv)
drv->crc32 = 0;
drive_settype_id (drv); /* Back to 35 DD */
if (disk_debug_logging > 0)
write_log (_T("eject drive %d\n"), drv - &floppy[0]);
write_log (_T("eject drive %ld\n"), drv - &floppy[0]);
inprec_recorddiskchange (drv - floppy, NULL, false);
}
@ -2733,7 +2734,7 @@ void DISK_select (uae_u8 data)
}
if (disk_debug_logging > 1) {
write_log (_T(" %d%d%d%d% "), (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
write_log (_T(" %d%d%d%d "), (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
if ((prev_data & 0x80) != (data & 0x80))
write_log (_T(" dskmotor %d "), (data & 0x80) ? 1 : 0);
if ((prev_data & 0x02) != (data & 0x02))
@ -4174,7 +4175,7 @@ int disk_prevnext_name (TCHAR *imgp, int dir)
retry:
_tcscpy (imgl, img);
for (i = 0; i < MAX_DPATH && imgl[i] != '\0'; i++)
tolower(imgl[i]);
imgl[i] = tolower(imgl[i]);
gotone = 0;
ret = 0;
ps = imgl;

View File

@ -174,7 +174,7 @@ static int enforcer_decode_hunk_and_offset (TCHAR *buf, uae_u32 pc)
} else {
native_name = my_strdup (_T("Unknown"));
}
_stprintf (buf, _T("----> %08lx - \"%s\" Hunk %04lx Offset %08lx\n"), pc, native_name, hunk, offset);
_stprintf (buf, _T("----> %08x - \"%s\" Hunk %04x Offset %08x\n"), pc, native_name, hunk, offset);
xfree (native_name);
return 1;
}
@ -212,7 +212,7 @@ static int enforcer_decode_hunk_and_offset (TCHAR *buf, uae_u32 pc)
uae_u32 offset = pc - (get_long (node + 8) << 2);
uaecptr mod = get_long (node + 20);
native_name = au ((char*)amiga2native (mod + 24, 100));
_stprintf (buf, _T("----> %08lx - \"%s\" Hunk %04lx Offset %08lx\n"), pc, native_name, hunk, offset);
_stprintf (buf, _T("----> %08x - \"%s\" Hunk %04x Offset %08x\n"), pc, native_name, hunk, offset);
xfree (native_name);
return 1;
}
@ -264,18 +264,18 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
_tcscpy (enforcer_buf_ptr, _T("Enforcer Hit! Bad program\n"));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
_stprintf (buf, _T("Illegal %s: %08lx"), addressmode, addr);
_stprintf (enforcer_buf_ptr, _T("%-48sPC: %0lx\n"), buf, pc);
_stprintf (buf, _T("Illegal %s: %08x"), addressmode, addr);
_stprintf (enforcer_buf_ptr, _T("%-48sPC: %0x\n"), buf, pc);
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
/* Data registers */
_stprintf (enforcer_buf_ptr, _T("Data: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
_stprintf (enforcer_buf_ptr, _T("Data: %08x %08x %08x %08x %08x %08x %08x %08x\n"),
m68k_dreg (regs, 0), m68k_dreg (regs, 1), m68k_dreg (regs, 2), m68k_dreg (regs, 3),
m68k_dreg (regs, 4), m68k_dreg (regs, 5), m68k_dreg (regs, 6), m68k_dreg (regs, 7));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
/* Address registers */
_stprintf (enforcer_buf_ptr, _T("Addr: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
_stprintf (enforcer_buf_ptr, _T("Addr: %08x %08x %08x %08x %08x %08x %08x %08x\n"),
m68k_areg (regs, 0), m68k_areg (regs, 1), m68k_areg (regs, 2), m68k_areg (regs, 3),
m68k_areg (regs, 4), m68k_areg (regs, 5), m68k_areg (regs, 6), m68k_areg (regs, 7));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
@ -288,7 +288,7 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
_tcscpy (enforcer_buf_ptr, _T("Stck:"));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
}
_stprintf (enforcer_buf_ptr, _T(" %08lx"),get_long (a7));
_stprintf (enforcer_buf_ptr, _T(" %08x"),get_long (a7));
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
if (i%8 == 7)
@ -389,7 +389,7 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
}
sm68k_disasm (buf, instrcode, bestpc, NULL);
_stprintf (lines[i], _T("%08lx : %-20s %s\n"), bestpc, instrcode, buf);
_stprintf (lines[i], _T("%08x : %-20s %s\n"), bestpc, instrcode, buf);
temppc = bestpc;
}
@ -403,7 +403,7 @@ static void enforcer_display_hit (const TCHAR *addressmode, uae_u32 pc, uaecptr
temppc = pc;
for (i = 0; i < (INSTRUCTIONLINES + 1) / 2; i++) {
sm68k_disasm (buf, instrcode, temppc, &nextpc);
_stprintf (enforcer_buf_ptr, _T("%08lx : %s %-20s %s\n"), temppc,
_stprintf (enforcer_buf_ptr, _T("%08x : %s %-20s %s\n"), temppc,
(i == 0 ? _T("*") : _T(" ")), instrcode, buf);
enforcer_buf_ptr += _tcslen (enforcer_buf_ptr);
temppc = nextpc;
@ -433,7 +433,7 @@ static uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
if (ISILLEGAL_LONG (addr))
{
enforcer_display_hit (_T("LONG READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("LONG READ from"),m68k_getpc(),addr);
if (enforcermode & 1)
set_special (SPCFLAG_TRAP);
}
@ -450,7 +450,7 @@ static uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
if (ISILLEGAL_WORD (addr))
{
enforcer_display_hit (_T("WORD READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("WORD READ from"),m68k_getpc(),addr);
if (enforcermode & 1)
set_special (SPCFLAG_TRAP);
}
@ -464,7 +464,7 @@ static uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
if (ISILLEGAL_BYTE (addr))
{
enforcer_display_hit (_T("BYTE READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("BYTE READ from"),m68k_getpc(),addr);
if (enforcermode & 1)
set_special (SPCFLAG_TRAP);
}
@ -482,7 +482,7 @@ static void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
if (ISILLEGAL_LONG (addr))
{
enforcer_display_hit (_T("LONG WRITE to"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("LONG WRITE to"),m68k_getpc(),addr);
if (enforcermode & 1)
if (addr != 0x100)
set_special (SPCFLAG_TRAP);
@ -502,7 +502,7 @@ static void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
if (ISILLEGAL_WORD (addr))
{
enforcer_display_hit (_T("WORD WRITE to"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("WORD WRITE to"),m68k_getpc(),addr);
if (enforcermode & 1)
set_special (SPCFLAG_TRAP);
}
@ -518,7 +518,7 @@ static void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
if (ISILLEGAL_BYTE (addr))
{
enforcer_display_hit (_T("BYTE WRITE to"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("BYTE WRITE to"),m68k_getpc(),addr);
if (enforcermode & 1)
set_special (SPCFLAG_TRAP);
}
@ -544,7 +544,7 @@ static uae_u8 * REGPARAM2 chipmem_xlate2 (uaecptr addr)
static uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
{
special_mem_r;
enforcer_display_hit (_T("LONG READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET), addr);
enforcer_display_hit (_T("LONG READ from"),m68k_getpc(), addr);
if (enforcermode & 1) {
set_special (SPCFLAG_TRAP);
return 0;
@ -564,12 +564,12 @@ static uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
if (addr >= 0x00F10000 && addr <= 0x00F7FFFF) {
if (!warned_JIT_0xF10000) {
warned_JIT_0xF10000 = 1;
enforcer_display_hit (_T("LONG READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("LONG READ from"),m68k_getpc(),addr);
}
return 0;
}
#endif
enforcer_display_hit (_T("WORD READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("WORD READ from"),m68k_getpc(),addr);
if (enforcermode & 1) {
set_special (SPCFLAG_TRAP);
return 0;
@ -580,7 +580,7 @@ static uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
static uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
{
special_mem_r;
enforcer_display_hit (_T("BYTE READ from"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("BYTE READ from"),m68k_getpc(),addr);
if (enforcermode & 1) {
set_special (SPCFLAG_TRAP);
return 0;
@ -591,7 +591,7 @@ static uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
static void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
{
special_mem_w;
enforcer_display_hit (_T("LONG WRITE to"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("LONG WRITE to"),m68k_getpc(),addr);
if (enforcermode & 1) {
set_special (SPCFLAG_TRAP);
return;
@ -601,7 +601,7 @@ static void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
static void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
{
special_mem_w;
enforcer_display_hit (_T("WORD WRITE to"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("WORD WRITE to"),m68k_getpc(),addr);
if (enforcermode & 1) {
set_special (SPCFLAG_TRAP);
return;
@ -611,7 +611,7 @@ static void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
static void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
{
special_mem_w;
enforcer_display_hit (_T("BYTE WRITE to"),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("BYTE WRITE to"),m68k_getpc(),addr);
if (enforcermode & 1) {
set_special (SPCFLAG_TRAP);
return;
@ -622,7 +622,7 @@ static void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
static int REGPARAM2 dummy_check2 (uaecptr addr, uae_u32 size)
{
special_mem_r;
enforcer_display_hit (_T("CHECK from "),(uae_u32)(regs.pc_p - NMEM_OFFSET),addr);
enforcer_display_hit (_T("CHECK from "),m68k_getpc(),addr);
return 0;
}
#endif //0

View File

@ -290,14 +290,14 @@ void expamem_next (void)
static uae_u32 REGPARAM2 expamem_lget (uaecptr addr)
{
write_log (_T("warning: READ.L from address $%lx PC=%x\n"), addr, M68K_GETPC);
write_log (_T("warning: READ.L from address $%x PC=%x\n"), addr, M68K_GETPC);
return (expamem_wget (addr) << 16) | expamem_wget (addr + 2);
}
static uae_u32 REGPARAM2 expamem_wget (uaecptr addr)
{
uae_u32 v = (expamem_bget (addr) << 8) | expamem_bget (addr + 1);
write_log (_T("warning: READ.W from address $%lx=%04x PC=%x\n"), addr, v & 0xffff, M68K_GETPC);
write_log (_T("warning: READ.W from address $%x=%04x PC=%x\n"), addr, v & 0xffff, M68K_GETPC);
return v;
}
@ -344,7 +344,7 @@ static void REGPARAM2 expamem_lput (uaecptr addr, uae_u32 value)
#ifdef JIT
special_mem |= S_WRITE;
#endif
write_log (_T("warning: WRITE.L to address $%lx : value $%lx\n"), addr, value);
write_log (_T("warning: WRITE.L to address $%x : value $%x\n"), addr, value);
}
static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
@ -359,7 +359,7 @@ static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
if (ecard >= cardno)
return;
if (expamem_type () != zorroIII)
write_log (_T("warning: WRITE.W to address $%lx : value $%x\n"), addr, value);
write_log (_T("warning: WRITE.W to address $%x : value $%x\n"), addr, value);
else {
switch (addr & 0xff) {
case 0x44:
@ -693,7 +693,7 @@ static void REGPARAM2 filesys_lput (uaecptr addr, uae_u32 l)
#ifdef JIT
special_mem |= S_WRITE;
#endif
write_log (_T("filesys_lput called PC=%p\n"), M68K_GETPC);
write_log (_T("filesys_lput called PC=%08x\n"), M68K_GETPC);
}
static void REGPARAM2 filesys_wput (uaecptr addr, uae_u32 w)
@ -701,7 +701,7 @@ static void REGPARAM2 filesys_wput (uaecptr addr, uae_u32 w)
#ifdef JIT
special_mem |= S_WRITE;
#endif
write_log (_T("filesys_wput called PC=%p\n"), M68K_GETPC);
write_log (_T("filesys_wput called PC=%08x\n"), M68K_GETPC);
}
static void REGPARAM2 filesys_bput (uaecptr addr, uae_u32 b)
@ -763,7 +763,7 @@ static void expamem_map_fastcard (void)
fastmem_bank.start = ((expamem_hi | (expamem_lo >> 4)) << 16);
if (fastmem_bank.start) {
map_banks (&fastmem_bank, fastmem_bank.start >> 16, fastmem_bank.allocated >> 16, 0);
write_log (_T("Fastcard: mapped @$%lx: %dMB fast memory\n"), fastmem_bank.start, fastmem_bank.allocated >> 20);
write_log (_T("Fastcard: mapped @$%x: %dMB fast memory\n"), fastmem_bank.start, fastmem_bank.allocated >> 20);
}
}
@ -817,7 +817,7 @@ static void expamem_map_filesys (void)
filesys_start = ((expamem_hi | (expamem_lo >> 4)) << 16);
map_banks (&filesys_bank, filesys_start >> 16, 1, 0);
write_log (_T("Filesystem: mapped memory @$%lx.\n"), filesys_start);
write_log (_T("Filesystem: mapped memory @$%x.\n"), filesys_start);
/* 68k code needs to know this. */
a = here ();
org (rtarea_base + RTAREA_FSBOARD);
@ -968,7 +968,7 @@ static void expamem_map_gfxcard (void)
gfxmem_bank.start = (expamem_hi | (expamem_lo >> 4)) << 16;
if (gfxmem_bank.start) {
map_banks (&gfxmem_bank, gfxmem_bank.start >> 16, gfxmem_bank.allocated >> 16, gfxmem_bank.allocated);
write_log (_T("%sUAEGFX-card: mapped @$%lx, %d MB RTG RAM\n"), currprefs.rtgmem_type ? _T("Z3") : _T("Z2"), gfxmem_bank.baseaddr, gfxmem_bank.allocated / 0x100000);
write_log (_T("%sUAEGFX-card: mapped @$%p, %d MB RTG RAM\n"), currprefs.rtgmem_type ? _T("Z3") : _T("Z2"), gfxmem_bank.baseaddr, gfxmem_bank.allocated / 0x100000);
}
}

View File

@ -2060,7 +2060,7 @@ static void recycle_aino (Unit *unit, a_inode *new_aino)
/* Still in use */
return;
TRACE3((_T("Recycling; cache size %d, total_locked %d\n"),
TRACE3((_T("Recycling; cache size %ld, total_locked %ld\n"),
unit->aino_cache_size, unit->total_locked_ainos));
if (unit->aino_cache_size > 5000 + unit->total_locked_ainos) {
/* Reap a few. */
@ -3098,12 +3098,12 @@ static void
dumplock (Unit *unit, uaecptr lock)
{
a_inode *a;
TRACE((_T("LOCK: 0x%lx"), lock));
TRACE((_T("LOCK: 0x%x"), lock));
if (!lock) {
TRACE((_T("\n")));
return;
}
TRACE((_T("{ next=0x%lx, mode=%ld, handler=0x%lx, volume=0x%lx, aino %lx "),
TRACE((_T("{ next=0x%x, mode=%d, handler=0x%x, volume=0x%x, aino %x "),
get_long (lock) << 2, get_long (lock + 8),
get_long (lock + 12), get_long (lock + 16),
get_long (lock + 4)));
@ -3336,11 +3336,11 @@ static void
int err;
if (mode != SHARED_LOCK && mode != EXCLUSIVE_LOCK) {
TRACE((_T("Bad mode %d (should be %d or %d).\n"), mode, SHARED_LOCK, EXCLUSIVE_LOCK));
TRACE((_T("Bad mode %ld (should be %d or %d).\n"), mode, SHARED_LOCK, EXCLUSIVE_LOCK));
mode = SHARED_LOCK;
}
TRACE((_T("ACTION_LOCK(0x%08x, \"%s\", %d)\n"), lock, bstr (unit, name), mode));
TRACE((_T("ACTION_LOCK(0x%08x, \"%s\", %ld)\n"), lock, bstr (unit, name), mode));
DUMPLOCK(unit, lock);
a = find_aino (unit, lock, bstr (unit, name), &err);
@ -3532,7 +3532,7 @@ static void action_free_lock (Unit *unit, dpacket packet)
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
a_inode *a;
TRACE((_T("ACTION_FREE_LOCK(0x%lx)\n"), lock));
TRACE((_T("ACTION_FREE_LOCK(0x%x)\n"), lock));
DUMPLOCK(unit, lock);
a = aino_from_lock (unit, lock);
@ -3582,7 +3582,7 @@ static void
action_dup_lock (Unit *unit, dpacket packet)
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
TRACE((_T("ACTION_DUP_LOCK(0x%lx)\n"), lock));
TRACE((_T("ACTION_DUP_LOCK(0x%x)\n"), lock));
if (!lock) {
PUT_PCK_RES1 (packet, 0);
return;
@ -3595,7 +3595,7 @@ static void
action_lock_from_fh (Unit *unit, dpacket packet)
{
Key *k = lookup_key (unit, GET_PCK_ARG1 (packet));
TRACE((_T("ACTION_COPY_DIR_FH(0x%lx,'%s')\n"), GET_PCK_ARG1 (packet), k ? k->aino->aname : _T("<null>")));
TRACE((_T("ACTION_COPY_DIR_FH(0x%x,'%s')\n"), GET_PCK_ARG1 (packet), k ? k->aino->aname : _T("<null>")));
if (k == 0) {
PUT_PCK_RES1 (packet, DOS_FALSE);
return;
@ -3606,7 +3606,7 @@ static void
static void free_exkey (Unit *unit, ExamineKey *ek)
{
if (--ek->aino->exnext_count == 0) {
TRACE ((_T("Freeing ExKey and reducing total_locked from %d by %d\n"),
TRACE ((_T("Freeing ExKey and reducing total_locked from %ld by %ld\n"),
unit->total_locked_ainos, ek->aino->locked_children));
unit->total_locked_ainos -= ek->aino->locked_children;
ek->aino->locked_children = 0;
@ -4387,7 +4387,7 @@ static void action_examine_object (Unit *unit, dpacket packet)
uaecptr info = GET_PCK_ARG2 (packet) << 2;
a_inode *aino = 0;
TRACE((_T("ACTION_EXAMINE_OBJECT(0x%lx,0x%lx)\n"), lock, info));
TRACE((_T("ACTION_EXAMINE_OBJECT(0x%x,0x%x)\n"), lock, info));
DUMPLOCK(unit, lock);
if (lock != 0)
@ -4421,7 +4421,7 @@ static void populate_directory (Unit *unit, a_inode *base)
base->locked_children++;
unit->total_locked_ainos++;
}
TRACE3((_T("Populating directory, child %p, locked_children %d\n"),
TRACE3((_T("Populating directory, child %p, locked_children %ld\n"),
base->child, base->locked_children));
for (;;) {
uae_u64 uniq = 0;
@ -4481,7 +4481,7 @@ static void action_examine_next (Unit *unit, dpacket packet)
ExamineKey *ek;
uae_u32 uniq;
TRACE((_T("ACTION_EXAMINE_NEXT(0x%lx,0x%lx)\n"), lock, info));
TRACE((_T("ACTION_EXAMINE_NEXT(0x%x,0x%x)\n"), lock, info));
gui_flicker_led (UNIT_LED(unit), unit->unit, 1);
DUMPLOCK(unit, lock);
@ -4672,7 +4672,7 @@ static void
mode_t openmode;
int mode;
TRACE((_T("ACTION_FH_FROM_LOCK(0x%lx,0x%lx)\n"), fh, lock));
TRACE((_T("ACTION_FH_FROM_LOCK(0x%x,0x%x)\n"), fh, lock));
DUMPLOCK(unit,lock);
if (!lock) {
@ -4771,7 +4771,7 @@ static void
action_end (Unit *unit, dpacket packet)
{
Key *k;
TRACE((_T("ACTION_END(0x%lx)\n"), GET_PCK_ARG1 (packet)));
TRACE((_T("ACTION_END(0x%x)\n"), GET_PCK_ARG1 (packet)));
k = lookup_key (unit, GET_PCK_ARG1 (packet));
if (k != 0) {
@ -4803,7 +4803,7 @@ static void
/* PUT_PCK_RES2 (packet, EINVAL); */
return;
}
TRACE((_T("ACTION_READ(%s,0x%lx,%ld)\n"), k->aino->nname, addr, size));
TRACE((_T("ACTION_READ(%s,0x%x,%d)\n"), k->aino->nname, addr, size));
gui_flicker_led (UNIT_LED(unit), unit->unit, 1);
if (size == 0) {
@ -4903,7 +4903,7 @@ static void
}
gui_flicker_led (UNIT_LED(unit), unit->unit, 2);
TRACE((_T("ACTION_WRITE(%s,0x%lx,%ld)\n"), k->aino->nname, addr, size));
TRACE((_T("ACTION_WRITE(%s,0x%x,%d)\n"), k->aino->nname, addr, size));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -4982,7 +4982,7 @@ static void
whence = SEEK_SET;
cur = k->file_pos;
TRACE((_T("ACTION_SEEK(%s,%d,%d)=%d\n"), k->aino->nname, pos, mode, cur));
TRACE((_T("ACTION_SEEK(%s,%ld,%ld)=%lld\n"), k->aino->nname, pos, mode, cur));
gui_flicker_led (UNIT_LED(unit), unit->unit, 1);
filesize = fs_fsize64 (k->fd);
@ -5018,7 +5018,7 @@ static void
a_inode *a;
int err;
TRACE((_T("ACTION_SET_PROTECT(0x%lx,\"%s\",0x%lx)\n"), lock, bstr (unit, name), mask));
TRACE((_T("ACTION_SET_PROTECT(0x%x,\"%s\",0x%x)\n"), lock, bstr (unit, name), mask));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5082,7 +5082,7 @@ static void action_set_comment (Unit * unit, dpacket packet)
commented = NULL;
}
}
TRACE ((_T("ACTION_SET_COMMENT(0x%lx,\"%s\")\n"), lock, commented));
TRACE ((_T("ACTION_SET_COMMENT(0x%x,\"%s\")\n"), lock, commented));
a = find_aino (unit, lock, bstr (unit, name), &err);
if (err != 0) {
@ -5119,7 +5119,7 @@ static void
uaecptr lock1 = GET_PCK_ARG1 (packet) << 2;
uaecptr lock2 = GET_PCK_ARG2 (packet) << 2;
TRACE((_T("ACTION_SAME_LOCK(0x%lx,0x%lx)\n"), lock1, lock2));
TRACE((_T("ACTION_SAME_LOCK(0x%x,0x%x)\n"), lock1, lock2));
DUMPLOCK(unit, lock1); DUMPLOCK(unit, lock2);
if (!lock1 || !lock2) {
@ -5146,7 +5146,7 @@ static void
a_inode *a = NULL;
// REMOVEME: a_inode *olda = NULL;
int err = 0;
TRACE((_T("ACTION_CHANGE_MODE(0x%lx,%d,%d)\n"), object, type, mode));
TRACE((_T("ACTION_CHANGE_MODE(0x%x,%ld,%ld)\n"), object, type, mode));
if (! object || (type != CHANGE_FH && type != CHANGE_LOCK)) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5235,7 +5235,7 @@ static void
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
TRACE((_T("ACTION_PARENT(0x%lx)\n"),lock));
TRACE((_T("ACTION_PARENT(0x%x)\n"),lock));
if (!lock) {
PUT_PCK_RES1 (packet, 0);
@ -5254,7 +5254,7 @@ static void
a_inode *aino;
int err;
TRACE((_T("ACTION_CREATE_DIR(0x%lx,\"%s\")\n"), lock, bstr (unit, name)));
TRACE((_T("ACTION_CREATE_DIR(0x%x,\"%s\")\n"), lock, bstr (unit, name)));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5303,7 +5303,7 @@ static void
a_inode *aino = 0;
uaecptr info = GET_PCK_ARG2 (packet) << 2;
TRACE((_T("ACTION_EXAMINE_FH(0x%lx,0x%lx)\n"),
TRACE((_T("ACTION_EXAMINE_FH(0x%x,0x%x)\n"),
GET_PCK_ARG1 (packet), GET_PCK_ARG2 (packet) ));
k = lookup_key (unit, GET_PCK_ARG1 (packet));
@ -5336,7 +5336,7 @@ static void
if (mode < 0)
whence = SEEK_SET;
TRACE((_T("ACTION_SET_FILE_SIZE(0x%lx, %d, 0x%x)\n"), GET_PCK_ARG1 (packet), offset, mode));
TRACE((_T("ACTION_SET_FILE_SIZE(0x%x, %ld, 0x%lx)\n"), GET_PCK_ARG1 (packet), offset, mode));
k = lookup_key (unit, GET_PCK_ARG1 (packet));
if (k == 0) {
@ -5435,7 +5435,7 @@ static void
a_inode *a;
int err;
TRACE((_T("ACTION_DELETE_OBJECT(0x%lx,\"%s\")\n"), lock, bstr (unit, name)));
TRACE((_T("ACTION_DELETE_OBJECT(0x%x,\"%s\")\n"), lock, bstr (unit, name)));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5497,7 +5497,7 @@ static void
struct mytimeval tv;
int err;
TRACE((_T("ACTION_SET_DATE(0x%lx,\"%s\")\n"), lock, bstr (unit, name)));
TRACE((_T("ACTION_SET_DATE(0x%x,\"%s\")\n"), lock, bstr (unit, name)));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5542,8 +5542,8 @@ static void
Key *k1, *knext;
int wehavekeys = 0;
TRACE((_T("ACTION_RENAME_OBJECT(0x%lx,\"%s\","), lock1, bstr (unit, name1)));
TRACE((_T("0x%lx,\"%s\")\n"), lock2, bstr (unit, name2)));
TRACE((_T("ACTION_RENAME_OBJECT(0x%x,\"%s\","), lock1, bstr (unit, name1)));
TRACE((_T("0x%x,\"%s\")\n"), lock2, bstr (unit, name2)));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
@ -5742,7 +5742,7 @@ static void action_change_file_position64 (Unit *unit, dpacket packet)
if (mode < 0)
whence = SEEK_SET;
TRACE((_T("ACTION_CHANGE_FILE_POSITION64(%s,%lld,%d)\n"), k->aino->nname, pos, mode));
TRACE((_T("ACTION_CHANGE_FILE_POSITION64(%s,%lld,%ld)\n"), k->aino->nname, pos, mode));
gui_flicker_led (UNIT_LED(unit), unit->unit, 1);
cur = k->file_pos;
@ -5773,7 +5773,7 @@ static void action_change_file_position64 (Unit *unit, dpacket packet)
PUT_PCK64_RES2 (packet, 0);
k->file_pos = fs_lseek64 (k->fd, 0, SEEK_CUR);
}
TRACE((_T("= oldpos %lld newpos %lld\n"), cur, k->file_pos));
TRACE((_T("= oldpos %lld newpos %lld\n"), cur, (long long) k->file_pos));
}
@ -5788,7 +5788,7 @@ static void action_get_file_position64 (Unit *unit, dpacket packet)
PUT_PCK64_RES2 (packet, ERROR_INVALID_LOCK);
return;
}
TRACE((_T("ACTION_GET_FILE_POSITION64(%s)=%lld\n"), k->aino->nname, k->file_pos));
TRACE((_T("ACTION_GET_FILE_POSITION64(%s)=%lld\n"), k->aino->nname, (long long) k->file_pos));
PUT_PCK64_RES1 (packet, k->file_pos);
PUT_PCK64_RES2 (packet, 0);
}
@ -5807,7 +5807,7 @@ static void action_change_file_size64 (Unit *unit, dpacket packet)
if (mode < 0)
whence = SEEK_SET;
TRACE((_T("ACTION_CHANGE_FILE_SIZE64(0x%lx, %lld, 0x%x)\n"), GET_PCK64_ARG1 (packet), offset, mode));
TRACE((_T("ACTION_CHANGE_FILE_SIZE64(0x%x, %lld, 0x%lx)\n"), GET_PCK64_ARG1 (packet), offset, mode));
k = lookup_key (unit, GET_PCK64_ARG1 (packet));
if (k == 0) {
@ -6020,7 +6020,7 @@ static int handle_packet (Unit *unit, dpacket pck, uae_u32 msg)
uae_s32 type = GET_PCK_TYPE (pck);
PUT_PCK_RES2 (pck, 0);
TRACE((_T("unit=%x packet=%d\n"), unit, type));
TRACE((_T("unit=%p packet=%d\n"), unit, type));
if (unit->inhibited && filesys_isvolume (unit)
&& type != ACTION_INHIBIT && type != ACTION_MORE_CACHE
&& type != ACTION_DISK_INFO) {
@ -6200,7 +6200,7 @@ error:
PUT_PCK_RES1 (packet_addr, DOS_FALSE);
PUT_PCK_RES2 (packet_addr, ERROR_ACTION_NOT_KNOWN);
}
TRACE((_T("reply: %8lx, %ld\n"), GET_PCK_RES1 (packet_addr), GET_PCK_RES2 (packet_addr)));
TRACE((_T("reply: %8x, %d\n"), GET_PCK_RES1 (packet_addr), GET_PCK_RES2 (packet_addr)));
error2:
@ -6713,7 +6713,7 @@ static void dump_partinfo (struct hardfiledata *hfd, uae_u8 *pp)
if ((uae_u64)highcyl * spt * surfaces * blocksize > hfd->virtsize) {
write_log (_T("RDB: WARNING: end of partition > size of disk! (%llu > %llu)\n"),
(uae_u64)highcyl * spt * surfaces * blocksize, hfd->virtsize);
(uae_u64)(highcyl * spt * surfaces * blocksize), hfd->virtsize);
}
}
}
@ -7805,7 +7805,7 @@ static uae_u8 *restore_key (UnitInfo *ui, Unit *u, uae_u8 *src)
openmode = ((k->dosmode & A_FIBF_READ) == 0 ? O_WRONLY
: (k->dosmode & A_FIBF_WRITE) == 0 ? O_RDONLY
: O_RDWR);
write_log (_T("FS: open file '%s' ('%s'), pos=%llu\n"), p, pn, k->file_pos);
write_log (_T("FS: open file '%s' ('%s'), pos=%llu\n"), p, pn, (long long) k->file_pos);
a = get_aino (u, &u->rootnode, p, &err);
if (!a)
write_log (_T("*** FS: Open file aino creation failed '%s'\n"), p);
@ -7847,7 +7847,7 @@ static uae_u8 *restore_key (UnitInfo *ui, Unit *u, uae_u8 *src)
if (s != (uae_s64)savedsize)
write_log (_T("FS: restored file '%s' size changed! orig=%llu, now=%lld!!\n"), p, savedsize, s);
if (k->file_pos > s) {
write_log (_T("FS: restored filepos larger than size of file '%s'!! %llu > %lld\n"), p, k->file_pos, s);
write_log (_T("FS: restored filepos larger than size of file '%s'!! %llu > %lld\n"), p, (long long) k->file_pos, s);
k->file_pos = s;
}
fs_lseek64 (k->fd, k->file_pos, SEEK_SET);
@ -8013,7 +8013,7 @@ static uae_u8 *save_key (uae_u8 *dst, Key *k)
save_u64 (k->file_pos);
save_u64 (size);
write_log (_T("'%s' uniq=%d size=%lld seekpos=%lld mode=%d dosmode=%d\n"),
fn, k->uniq, size, k->file_pos, k->createmode, k->dosmode);
fn, k->uniq, size, (long long) k->file_pos, k->createmode, k->dosmode);
xfree (fn);
return dst;
}

View File

@ -7,6 +7,8 @@
*/
#include <sys/timeb.h>
#include <fcntl.h>
#include <unistd.h>
#include "zfile.h"
typedef int BOOL;
@ -514,7 +516,7 @@ struct my_openfile_s *my_open (const TCHAR *name, int flags) {
err = GetLastError();
}
if (h == INVALID_HANDLE_VALUE) {
write_log (_T("FS: failed to open '%s' %x %x err=%d\n"), namep, DesiredAccess, CreationDisposition, err);
write_log (_T("FS: failed to open '%s' %lx %lx err=%ld\n"), namep, (long)DesiredAccess, (long)CreationDisposition, (long)err);
xfree (mos);
mos = NULL;
goto err;
@ -553,7 +555,7 @@ int my_truncate (const TCHAR *name, uae_u64 len) {
li.QuadPart = len;
li.LowPart = SetFilePointer (hFile, li.LowPart, &li.HighPart, FILE_BEGIN);
if (li.LowPart == INVALID_SET_FILE_POINTER && GetLastError () != NO_ERROR) {
write_log (_T("FS: truncate seek failure for %s to pos %d\n"), namep, len);
write_log (_T("FS: truncate seek failure for %s to pos %llu\n"), namep, len);
} else {
if (SetEndOfFile (hFile) == true)
result = 0;

View File

@ -143,7 +143,7 @@ void fsdb_clean_dir (a_inode *dir)
fseek (f, pos1, SEEK_SET);
size_t isWritten = fwrite (buf, 1, sizeof buf, f);
if (isWritten < sizeof(buf))
write_log("%s:%d [%s] - Failed to write %l bytes (%l/%d)",
write_log("%s:%d [%s] - Failed to write %ld bytes (%ld/%ld)",
__FILE__, __LINE__, __FUNCTION__,
sizeof(buf) - isWritten, isWritten, sizeof(buf));
fseek (f, pos2 + sizeof buf, SEEK_SET);
@ -296,7 +296,7 @@ static void write_aino (FILE *f, a_inode *aino)
aino->db_offset = ftell (f);
size_t isWritten = fwrite (buf, 1, sizeof buf, f);
if (isWritten < sizeof(buf))
write_log("%s:%d [%s] - Failed to write %l bytes (%l/%d)",
write_log("%s:%d [%s] - Failed to write %ld bytes (%ld/%ld)",
__FILE__, __LINE__, __FUNCTION__,
sizeof(buf) - isWritten, isWritten, sizeof(buf));
aino->has_dbentry = aino->needs_dbentry;
@ -370,7 +370,7 @@ void fsdb_dir_writeback (a_inode *dir)
tmpbuf = (uae_u8*)malloc (size);
size_t isRead = fread (tmpbuf, 1, size, f);
if (isRead < (size_t)size)
write_log("%s:%d [%s] - Failed to read %l bytes (%l/%d)",
write_log("%s:%d [%s] - Failed to read %ld bytes (%ld/%d)",
__FILE__, __LINE__, __FUNCTION__,
(size_t)size - isRead, isRead, size);
}

View File

@ -8,6 +8,7 @@
#include "sysconfig.h"
#include "sysdeps.h"
#include <unistd.h>
#include "options.h"
@ -2395,7 +2396,7 @@ static int initpcmcia (const TCHAR *path, int readonly, int type, int reset)
if (!pcmcia_sram->hfd.drive_empty) {
pcmcia_common_size = pcmcia_sram->hfd.virtsize;
if (pcmcia_sram->hfd.virtsize > 4 * 1024 * 1024) {
write_log (_T("PCMCIA SRAM: too large device, %d bytes\n"), pcmcia_sram->hfd.virtsize);
write_log (_T("PCMCIA SRAM: too large device, %llu bytes\n"), pcmcia_sram->hfd.virtsize);
pcmcia_common_size = 4 * 1024 * 1024;
}
pcmcia_common = xcalloc (uae_u8, pcmcia_common_size);

View File

@ -14,6 +14,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include "menu.h"
#include "sysconfig.h"

View File

@ -538,7 +538,7 @@ int hdf_open (struct hardfiledata *hfd, const TCHAR *pname)
hfd->vhd_sectormapblock = -1;
hfd->vhd_bitmapsize = ((hfd->vhd_blocksize / (8 * 512)) + 511) & ~511;
}
write_log (_T("HDF is VHD %s image, virtual size=%dK\n"),
write_log (_T("HDF is VHD %s image, virtual size=%lluK\n"),
hfd->hfd_type == HFD_VHD_FIXED ? _T("fixed") : _T("dynamic"),
hfd->virtsize / 1024);
hdf_init_cache (hfd);

View File

@ -303,7 +303,7 @@ int hdf_open_target (struct hardfiledata *hfd, const char *pname)
}
}
if (hfd->handle_valid || hfd->drive_empty) {
hfd_log ("HDF '%s' opened, size=%dK mode=%d empty=%d\n",
hfd_log ("HDF '%s' opened, size=%lldK mode=%d empty=%d\n",
name, hfd->physsize / 1024, hfd->handle_valid, hfd->drive_empty);
return 1;
}
@ -682,7 +682,7 @@ TCHAR *hdf_getnameharddrive (int index, int flags, int *sectorsize, int *dangero
if (size >= 1024 * 1024 * 1024)
_stprintf (tmp, "%.1fG", ((double)(uae_u32)(size / (1024 * 1024))) / 1024.0);
else if (size < 10 * 1024 * 1024)
_stprintf (tmp, "%dK", size / 1024);
_stprintf (tmp, "%lluK", size / 1024);
else
_stprintf (tmp, "%.1fM", ((double)(uae_u32)(size / (1024))) / 1024.0);
}

View File

@ -20,36 +20,6 @@
*/
#include "sysconfig.h"
/* For this to work the 64bit and [U]VAL64() defines must be first. */
#undef uae_s64
#undef uae_u64
#if SIZEOF_LONG_LONG == 8
# define uae_s64 long long
# define uae_u64 unsigned long long
# define VAL64(a) (a ## LL)
# define UVAL64(a) (a ## uLL)
# ifndef HAS_uae_64
# define HAS_uae_64 1
# endif
#elif SIZEOF___INT64 == 8
# define uae_s64 __int64
# define uae_u64 unsigned __int64
# define VAL64(a) (a)
# define UVAL64(a) (a)
# ifndef HAS_uae_64
# define HAS_uae_64 1
# endif
#elif SIZEOF_LONG == 8
# define uae_s64 long;
# define uae_u64 unsigned long;
# define VAL64(a) (a ## l)
# define UVAL64(a) (a ## ul)
# ifndef HAS_uae_64
# define HAS_uae_64 1
# endif
#endif
#if 0
#if SIZEOF_VOID_P == 8
typedef long int uae_intptr;
@ -64,6 +34,25 @@ typedef unsigned int uae_uintptr;
# error "Unknown/unsupported pointer size"
#endif
#if SIZEOF_LONG_LONG == 8
typedef long long uae_s64;
typedef unsigned long long uae_u64;
# define VAL64(a) (a ## LL)
# define UVAL64(a) (a ## uLL)
#elif SIZEOF___INT64 == 8
typedef __int64 long uae_s64;
typedef unsigned __int64 uae_u64;
# define VAL64(a) (a)
# define UVAL64(a) (a)
#elif SIZEOF_LONG == 8
#warning "if you reach this code probably something went wrong..."
typedef long uae_s64;
typedef unsigned long uae_u64;
# define VAL64(a) (a ## l)
# define UVAL64(a) (a ## ul)
#endif
#ifdef HAVE_STDINT_H
# undef uae_s64
# undef uae_u64
@ -78,11 +67,6 @@ typedef unsigned int uae_uintptr;
typedef int16_t uae_s16;
typedef uint32_t uae_u32;
typedef int32_t uae_s32;
typedef uint64_t uae_u64;
typedef int64_t uae_s64;
# ifndef HAS_uae_64
# define HAS_uae_64 1
# endif
#else
/* If char has more then 8 bits, good night. */
@ -113,12 +97,8 @@ typedef unsigned int uae_uintptr;
#endif /* ! HAVE_STDINT_H */
// Unified pointer type. Please use this for everything address related.
#if defined(__x86_64__) && defined(HAS_uae_64)
typedef uae_u64 uaecptr;
# else
typedef uae_u32 uaecptr;
# endif // __x86_64__
// amiga internal pointer type. always 32 bit.
typedef uae_u32 uaecptr;
/* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known
* to have problems, and it's likely that other compilers choke too. */

View File

@ -359,10 +359,10 @@ static bool write_slot (TCHAR *p, struct uae_input_device *uid, int i, int j)
}
uae_u64 flags = uid->flags[i][j];
if (uid->custom[i][j] && _tcslen (uid->custom[i][j]) > 0) {
_stprintf (p, _T("'%s'.%d"), uid->custom[i][j], flags & ID_FLAG_SAVE_MASK_CONFIG);
_stprintf (p, _T("'%s'.%llu"), uid->custom[i][j], flags & ID_FLAG_SAVE_MASK_CONFIG);
ok = true;
} else if (uid->eventid[i][j] > 0) {
_stprintf (p, _T("%s.%d"), events[uid->eventid[i][j]].confname, flags & ID_FLAG_SAVE_MASK_CONFIG);
_stprintf (p, _T("%s.%llu"), events[uid->eventid[i][j]].confname, flags & ID_FLAG_SAVE_MASK_CONFIG);
ok = true;
} else {
_tcscpy (p, _T("NULL"));

View File

@ -124,7 +124,7 @@ static bool inprec_rstart (uae_u8 type)
lastcycle = get_cycles ();
int mvp = current_maxvpos ();
if ((type != INPREC_DEBUG && type != INPREC_DEBUG2 && type != INPREC_CIADEBUG) || (0 && vsync_counter >= 49 && vsync_counter <= 51))
write_log (_T("INPREC: %010d/%03d: %d (%d/%d) %08x\n"), hsync_counter, current_hpos (), type, hsync_counter % mvp, mvp, lastcycle);
write_log (_T("INPREC: %010ld/%03d: %d (%ld/%d) %08x\n"), hsync_counter, current_hpos (), type, hsync_counter % mvp, mvp, lastcycle);
inprec_plast = inprec_p;
inprec_ru8 (type);
inprec_ru16 (0xffff);
@ -788,7 +788,7 @@ void inprec_setposition (int offset, int replaycounter)
replaypos = replaycounter;
write_log (_T("INPREC: setpos=%d\n"), offset);
if (offset < header_end || offset > zfile_size (inprec_zf)) {
write_log (_T("INPREC: buffer corruption. offset=%d, size=%d\n"), offset, zfile_size (inprec_zf));
write_log (_T("INPREC: buffer corruption. offset=%d, size=%lld\n"), offset, zfile_size (inprec_zf));
gui_message (_T("INPREC error"));
}
zfile_fseek (inprec_zf, 0, SEEK_SET);
@ -942,8 +942,8 @@ void inprec_getstatus (TCHAR *title)
p = title + _tcslen (title);
int mvp = current_maxvpos ();
_stprintf (p, _T("%03d %02d:%02d:%02d/%02d:%02d:%02d"), replaypos,
lasthsync / (vblank_hz * mvp * 60), ((int)(lasthsync / (vblank_hz * mvp)) % 60), (lasthsync / mvp) % (int)vblank_hz,
endhsync / (vblank_hz * mvp * 60), ((int)(endhsync / (vblank_hz * mvp)) % 60), (endhsync / mvp) % (int)vblank_hz);
(int)(lasthsync / (vblank_hz * mvp * 60)), ((int)(lasthsync / (vblank_hz * mvp)) % 60), (lasthsync / mvp % (int)vblank_hz),
(int)( endhsync / (vblank_hz * mvp * 60)), ((int)(endhsync / (vblank_hz * mvp)) % 60), (endhsync / mvp) % (int)vblank_hz);
p += _tcslen (p);
_tcscat (p, _T("] "));

View File

@ -26,6 +26,7 @@
struct flag_struct regflags;
#include <signal.h>
#include <unistd.h>
/* internal prototypes */
void machdep_save_options (struct zfile *, const struct uae_prefs *);

View File

@ -886,7 +886,7 @@ static void REGPARAM2 extendedkickmem_lput (uaecptr addr, uae_u32 b)
special_mem |= S_WRITE;
#endif
if (currprefs.illegal_mem)
write_log (_T("Illegal extendedkickmem lput at %08lx\n"), addr);
write_log (_T("Illegal extendedkickmem lput at %08x\n"), addr);
}
static void REGPARAM2 extendedkickmem_wput (uaecptr addr, uae_u32 b)
{
@ -894,7 +894,7 @@ static void REGPARAM2 extendedkickmem_wput (uaecptr addr, uae_u32 b)
special_mem |= S_WRITE;
#endif
if (currprefs.illegal_mem)
write_log (_T("Illegal extendedkickmem wput at %08lx\n"), addr);
write_log (_T("Illegal extendedkickmem wput at %08x\n"), addr);
}
static void REGPARAM2 extendedkickmem_bput (uaecptr addr, uae_u32 b)
{
@ -902,7 +902,7 @@ static void REGPARAM2 extendedkickmem_bput (uaecptr addr, uae_u32 b)
special_mem |= S_WRITE;
#endif
if (currprefs.illegal_mem)
write_log (_T("Illegal extendedkickmem lput at %08lx\n"), addr);
write_log (_T("Illegal extendedkickmem lput at %08x\n"), addr);
}

View File

@ -280,7 +280,7 @@ static bool check_trace (void)
return true;
if (!cputrace.readcounter && !cputrace.writecounter && !cputrace.cyclecounter) {
if (cpu_tracer != -2) {
write_log (_T("CPU trace: dma_cycle() enabled. %08x %08x NOW=%08X\n"),
write_log (_T("CPU trace: dma_cycle() enabled. %08x %08x NOW=%08lX\n"),
cputrace.cyclecounter_pre, cputrace.cyclecounter_post, get_cycles ());
cpu_tracer = -2; // dma_cycle() allowed to work now
}
@ -303,7 +303,7 @@ static bool check_trace (void)
x_do_cycles = x2_do_cycles;
x_do_cycles_pre = x2_do_cycles_pre;
x_do_cycles_post = x2_do_cycles_post;
write_log (_T("CPU tracer playback complete. STARTCYCLES=%08x NOWCYCLES=%08x\n"), cputrace.startcycles, get_cycles ());
write_log (_T("CPU tracer playback complete. STARTCYCLES=%08x NOWCYCLES=%08lx\n"), cputrace.startcycles, get_cycles ());
cputrace.needendcycles = 1;
cpu_tracer = 0;
return true;
@ -316,7 +316,7 @@ static bool get_trace (uaecptr addr, int accessmode, int size, uae_u32 *data)
struct cputracememory *ctm = &cputrace.ctm[i];
if (ctm->addr == addr && ctm->mode == mode) {
ctm->mode = 0;
write_log (_T("CPU trace: GET %d: PC=%08x %08x=%08x %d %d %08x/%08x/%08x %d/%d (%08X)\n"),
write_log (_T("CPU trace: GET %d: PC=%08x %08x=%08x %d %d %08x/%08x/%08x %d/%d (%08lX)\n"),
i, cputrace.pc, addr, ctm->data, accessmode, size,
cputrace.cyclecounter, cputrace.cyclecounter_pre, cputrace.cyclecounter_post,
cputrace.readcounter, cputrace.writecounter, get_cycles ());
@ -1475,7 +1475,7 @@ static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode
if (dp & 4) base += dispreg;
addr = base + outer;
_stprintf (buffer, _T("(%s%c%d.%c*%d+%ld)+%ld == $%08lx"), name,
_stprintf (buffer, _T("(%s%c%d.%c*%d+%d)+%d == $%08lx"), name,
dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
1 << ((dp >> 9) & 3),
disp, outer,
@ -1520,7 +1520,7 @@ static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode
if (dp & 4) base += dispreg;
addr = base + outer;
_stprintf (buffer, _T("(%s%c%d.%c*%d+%ld)+%ld == $%08lx"), name,
_stprintf (buffer, _T("(%s%c%d.%c*%d+%d)+%d == $%08lx"), name,
dp & 0x8000 ? 'A' : 'D', (int)r, dp & 0x800 ? 'L' : 'W',
1 << ((dp >> 9) & 3),
disp, outer,
@ -3453,7 +3453,7 @@ static void m68k_run_1_ce (void)
cont:
if (cputrace.needendcycles) {
cputrace.needendcycles = 0;
write_log (_T("STARTCYCLES=%08x ENDCYCLES=%08x\n"), cputrace.startcycles, get_cycles ());
write_log (_T("STARTCYCLES=%08x ENDCYCLES=%08lx\n"), cputrace.startcycles, get_cycles ());
#ifdef DEBUGGER
log_dma_record ();
#endif
@ -4645,11 +4645,11 @@ void m68k_dumpstate2 (uaecptr pc, uaecptr *nextpc)
int i, j;
for (i = 0; i < 8; i++){
console_out_f (_T(" D%d %08lX "), i, m68k_dreg (regs, i));
console_out_f (_T(" D%d %08X "), i, m68k_dreg (regs, i));
if ((i & 3) == 3) console_out_f (_T("\n"));
}
for (i = 0; i < 8; i++){
console_out_f (_T(" A%d %08lX "), i, m68k_areg (regs, i));
console_out_f (_T(" A%d %08X "), i, m68k_areg (regs, i));
if ((i & 3) == 3) console_out_f (_T("\n"));
}
if (regs.s == 0)
@ -4711,7 +4711,7 @@ void m68k_dumpstate2 (uaecptr pc, uaecptr *nextpc)
if (pc != 0xffffffff) {
m68k_disasm (pc, nextpc, 1);
if (nextpc)
console_out_f (_T("Next PC: %08lx\n"), *nextpc);
console_out_f (_T("Next PC: %08x\n"), *nextpc);
}
}
void m68k_dumpstate (uaecptr *nextpc)

View File

@ -17,6 +17,7 @@
#include "blkdev.h"
#include "scsidev.h"
#include "gui.h"
#include <unistd.h>
#ifdef SCSIEMU_LINUX_IOCTL

View File

@ -177,10 +177,14 @@ void portio_list_add(PortioList *piolist,
uint32_t addr);
void portio_list_del(PortioList *piolist);
typedef struct IORange IORange;
typedef struct IORangeOps IORangeOps;
typedef struct IORange {
const IORangeOps *ops;
uint64_t base;
uint64_t len;
} IORange;
struct IORangeOps {
void (*read)(IORange *iorange, uint64_t offset, unsigned width,
uint64_t *data);
@ -189,12 +193,6 @@ struct IORangeOps {
void (*destructor)(IORange *iorange);
};
typedef struct IORange {
const IORangeOps *ops;
uint64_t base;
uint64_t len;
} IORange;
typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data);
typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address);
@ -225,14 +223,17 @@ void qemu_register_reset(QEMUResetHandler *func, void *opaque);
#define CIRRUS_ID_CLGD5436 (0x2B<<2)
#define CIRRUS_ID_CLGD5446 (0x2E<<2)
typedef void (*cirrus_bitblt_rop_t) (struct CirrusVGAState *s,
typedef struct CirrusVGAState CirrusVGAState;
typedef void (*cirrus_bitblt_rop_t) (CirrusVGAState *s,
uint8_t * dst, const uint8_t * src,
int dstpitch, int srcpitch,
int bltwidth, int bltheight);
typedef void (*cirrus_fill_t)(struct CirrusVGAState *s,
typedef void (*cirrus_fill_t)(CirrusVGAState *s,
uint8_t *dst, int dst_pitch, int width, int height);
typedef struct CirrusVGAState {
struct CirrusVGAState {
VGACommonState vga;
MemoryRegion cirrus_vga_io;
@ -283,7 +284,7 @@ typedef struct CirrusVGAState {
int device_id;
int bustype;
int valid_memory_config;
} CirrusVGAState;
};
void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci,
MemoryRegion *system_memory,

View File

@ -365,7 +365,7 @@ static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, TCHAR *name,
if (len2)
zfile_fwrite (zero, 1, len2, f);
write_log (_T("Chunk '%s' chunk size %d (%d)\n"), name, chunklen, len);
write_log (_T("Chunk '%s' chunk size %ld (%ld)\n"), name, (long) chunklen, (long) len);
}
static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, size_t *len, size_t *totallen, size_t *filepos)
@ -534,7 +534,7 @@ void restore_state (const TCHAR *filename)
for (;;) {
name[0] = 0;
chunk = end = restore_chunk (f, name, &len, &totallen, &filepos);
write_log (_T("Chunk '%s' size %d (%d)\n"), name, len, totallen);
write_log (_T("Chunk '%s' size %ld (%ld)\n"), name, (long) len, (long) totallen);
if (!_tcscmp (name, _T("END "))) {
#ifdef _DEBUG
if (filesize > filepos + 8)
@ -715,14 +715,14 @@ void restore_state (const TCHAR *filename)
end = restore_log (chunk);
else {
end = chunk + len;
write_log (_T("unknown chunk '%s' size %d bytes\n"), name, len);
write_log (_T("unknown chunk '%s' size %ld bytes\n"), name, (long) len);
}
if (end == NULL)
write_log (_T("Chunk '%s', size %d bytes was not accepted!\n"),
name, len);
write_log (_T("Chunk '%s', size %ld bytes was not accepted!\n"),
name, (long) len);
else if (totallen != (size_t)(end - chunk) )
write_log (_T("Chunk '%s' total size %d bytes but read %d bytes!\n"),
name, totallen, end - chunk);
write_log (_T("Chunk '%s' total size %ld bytes but read %ld bytes!\n"),
name, (long) totallen, (long) (end - chunk));
xfree (chunk);
}
// target_addtorecent (filename, 0);
@ -1195,7 +1195,7 @@ int savestate_dorewind (int pos)
pos = replaycounter - 1;
if (canrewind (pos)) {
savestate_state = STATE_DOREWIND;
write_log (_T("dorewind %d (%010d/%03d) -> %d\n"), replaycounter - 1, hsync_counter, vsync_counter, pos);
write_log (_T("dorewind %d (%010ld/%03ld) -> %d\n"), replaycounter - 1, hsync_counter, vsync_counter, pos);
return 1;
}
return 0;
@ -1316,7 +1316,7 @@ void savestate_rewind (void)
return;
}
inprec_setposition (st->inprecoffset, pos);
write_log (_T("state %d restored. (%010d/%03d)\n"), pos, hsync_counter, vsync_counter);
write_log (_T("state %d restored. (%010ld/%03ld)\n"), pos, hsync_counter, vsync_counter);
if (rewind) {
replaycounter--;
if (replaycounter < 0)
@ -1695,7 +1695,7 @@ retry2:
staterecords_first -= staterecords_max;
}
write_log (_T("state capture %d (%010d/%03d,%d/%d) (%d bytes, alloc %d)\n"),
write_log (_T("state capture %d (%010ld/%03ld,%ld/%d) (%ld bytes, alloc %d)\n"),
replaycounter, hsync_counter, vsync_counter,
hsync_counter % current_maxvpos (), current_maxvpos (),
st->end - st->data, statefile_alloc);

View File

@ -384,7 +384,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
case 0x10: /* WRITE FILEMARK */
len = rl (cmdbuf + 1) & 0xffffff;
if (log_tapeemu)
write_log (_T("TAPEEMU WRITE FILEMARK %d\n"), len);
write_log (_T("TAPEEMU WRITE FILEMARK %lld\n"), len);
if (notape (tape))
goto notape;
if (tape->unloaded)
@ -403,7 +403,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
if (cmdbuf[1] & 1)
len *= tape->blocksize;
if (log_tapeemu)
write_log (_T("TAPEEMU WRITE %d (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
write_log (_T("TAPEEMU WRITE %lld (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
if (notape (tape))
goto notape;
if (tape->unloaded)
@ -422,7 +422,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
if (cmdbuf[1] & 1)
len *= tape->blocksize;
if (log_tapeemu)
write_log (_T("TAPEEMU READ %d (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
write_log (_T("TAPEEMU READ %lld (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
if (notape (tape))
goto notape;
if (tape->unloaded)
@ -463,7 +463,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
s[13] = 1; /* File Mark detected */
ls = 0x12;
if (log_tapeemu)
write_log (_T("TAPEEMU READ FILE END, %d remaining\n"), len - scsi_len);
write_log (_T("TAPEEMU READ FILE END, %lld remaining\n"), len - scsi_len);
}
break;