trying to sync rc1

parent 27c16d07
......@@ -128,10 +128,10 @@ void a2065_reset (void)
td = NULL;
}
static void dumppacket (char *n, uae_u8 *packet, int len)
static void dumppacket (TCHAR *n, uae_u8 *packet, int len)
{
int i;
char buf[10000];
TCHAR buf[10000];
for (i = 0; i < len; i++) {
_stprintf (buf + i * 3, ".%02X", packet[i]);
......
......@@ -280,10 +280,10 @@ static void set_status (uae_u8 status, int quick)
scsidelay_status = status;
}
static char *scsitostring (void)
static TCHAR *scsitostring (void)
{
static char buf[200];
char *p;
static TCHAR buf[200];
TCHAR *p;
int i;
p = buf;
......@@ -1198,9 +1198,9 @@ static void freescsi (struct scsi_data *sd)
scsi_free (sd);
}
int addscsi (int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys, int scsi_level)
int addscsi (int ch, TCHAR *path, int blocksize, int readonly,
TCHAR *devname, int sectors, int surfaces, int reserved,
int bootpri, TCHAR *filesys, int scsi_level)
{
struct hd_hardfiledata *hfd;
......@@ -1270,9 +1270,9 @@ static void addnativescsi (void)
}
}
int a3000_add_scsi_unit (int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys)
int a3000_add_scsi_unit (int ch, TCHAR *path, int blocksize, int readonly,
TCHAR *devname, int sectors, int surfaces, int reserved,
int bootpri, TCHAR *filesys)
{
return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 2);
}
......@@ -1287,9 +1287,9 @@ void a3000scsi_free (void)
freenativescsi ();
}
int a2091_add_scsi_unit (int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys)
int a2091_add_scsi_unit (int ch, TCHAR *path, int blocksize, int readonly,
TCHAR *devname, int sectors, int surfaces, int reserved,
int bootpri, TCHAR *filesys)
{
return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 1);
}
......
......@@ -14,9 +14,9 @@
static struct ide_hdf *idedrive[2];
int adide_add_ide_unit (int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys)
int adide_add_ide_unit (int ch, TCHAR *path, int blocksize, int readonly,
TCHAR *devname, int sectors, int surfaces, int reserved,
int bootpri, TCHAR *filesys)
{
struct ide_hdf *ide;
......
......@@ -1789,9 +1789,9 @@ uae_u8 *restore_akiko (uae_u8 *src)
uae_u32 v;
int i;
if (!currprefs.cs_cd32cd) {
changed_prefs.cs_cd32c2p = changed_prefs.cs_cd32cd = changed_prefs.cs_cd32nvram = 1;
currprefs.cs_cd32c2p = currprefs.cs_cd32cd = currprefs.cs_cd32nvram = 1;
if (!currprefs.cs_cd32cd || !cdromok) {
changed_prefs.cs_cd32c2p = changed_prefs.cs_cd32cd = changed_prefs.cs_cd32nvram = true;
currprefs.cs_cd32c2p = currprefs.cs_cd32cd = currprefs.cs_cd32nvram = true;
akiko_init ();
}
......
......@@ -87,13 +87,13 @@ static int boot_read;
static int nvwrite;
static int load_rom8 (char *xpath, uae_u8 *mem, int extra)
static int load_rom8 (TCHAR *xpath, uae_u8 *mem, int extra)
{
struct zfile *zf;
char path[MAX_DPATH];
TCHAR path[MAX_DPATH];
int i;
uae_u8 *tmp = xmalloc (uae_u8, 131072);
char *bin = extra == 1 ? ".bin" : "";
TCHAR *bin = extra == 1 ? ".bin" : "";
memset (tmp, 0, 131072);
_stprintf (path, "%s%s%s", xpath, extra == 3 ? "-hi" : (extra == 2 ? "hi" : "h"), bin);
......@@ -121,9 +121,9 @@ end:
return 0;
}
static struct arcadiarom *is_arcadia (const char *xpath, int cnt)
static struct arcadiarom *is_arcadia (const TCHAR *xpath, int cnt)
{
char path[MAX_DPATH], *p;
TCHAR path[MAX_DPATH], *p;
struct arcadiarom *rom = NULL;
int i;
......@@ -153,9 +153,9 @@ static struct arcadiarom *is_arcadia (const char *xpath, int cnt)
static int load_roms (struct arcadiarom *rom)
{
char path[MAX_DPATH], path2[MAX_DPATH], path3[MAX_DPATH], *p;
TCHAR path[MAX_DPATH], path2[MAX_DPATH], path3[MAX_DPATH], *p;
int i, offset;
char *xpath;
TCHAR *xpath;
if (rom->type == ARCADIA_BIOS)
xpath = currprefs.romextfile;
......@@ -347,7 +347,7 @@ static void multigame(int v)
allocated_arbmemory >> 16, 0);
}
int is_arcadia_rom (const char *path)
int is_arcadia_rom (const TCHAR *path)
{
struct arcadiarom *rom;
......@@ -450,7 +450,7 @@ uae_u8 arcadia_parport (int port, uae_u8 pra, uae_u8 dra)
return v;
}
struct romdata *scan_arcadia_rom (char *path, int cnt)
struct romdata *scan_arcadia_rom (TCHAR *path, int cnt)
{
struct romdata *rd = 0;
struct romlist **arc_rl;
......
This diff is collapsed.
......@@ -196,6 +196,8 @@ static uae_u32 REGPARAM2 nullfunc (TrapContext *context)
static uae_u32 REGPARAM2 getchipmemsize (TrapContext *context)
{
m68k_dreg (regs, 1) = allocated_z3chipmem;
m68k_areg (regs, 1) = z3chipmem_start;
return allocated_chipmem;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -433,7 +433,7 @@ static int cdrom_modeset (uae_u8 *cmd)
static void cdrom_command_accepted (int size, uae_u8 *cdrom_command_input, int *cdrom_command_cnt_in)
{
#ifdef CDTV_DEBUG_CMD
char tmp[200];
TCHAR tmp[200];
int i;
#endif
cdrom_command_size_out = size;
......@@ -590,7 +590,7 @@ static uae_u8 *read_raw (int sector, int size)
static struct zfile *f;
static int track;
int trackcnt;
char fname[MAX_DPATH];
TCHAR fname[MAX_DPATH];
static uae_u8 buf[4096];
uae_u32 prevlsn = 0;
uae_u8 *s = cdrom_toc + 4;
......@@ -1536,9 +1536,9 @@ uae_u8 cdtv_battram_read (int addr)
return v;
}
int cdtv_add_scsi_unit(int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys)
int cdtv_add_scsi_unit(int ch, TCHAR *path, int blocksize, int readonly,
TCHAR *devname, int sectors, int surfaces, int reserved,
int bootpri, TCHAR *filesys)
{
return addscsi (ch, path, blocksize, readonly, devname, sectors, surfaces, reserved, bootpri, filesys, 1);
}
......
This diff is collapsed.
......@@ -1899,6 +1899,7 @@ int EvalException ( LPEXCEPTION_POINTERS blah, int n_except )
emit_byte(0xe9);
emit_long((uae_u32)veccode-(uae_u32)target-4);
#ifdef JIT_DEBUG
write_log ("JIT: Create jump to %p\n",veccode);
write_log ("JIT: Handled one access!\n");
#endif
......
......@@ -91,13 +91,13 @@ uaecptr consolehook_beginio (uaecptr request)
uae_u16 cmd = get_word (request + 28);
if (cmd == CMD_WRITE) {
char *buf;
TCHAR *buf;
const char *src = (char*)get_real_address (io_data);
int len = io_length;
if (io_length == -1)
len = strlen (src);
buf = xmalloc (char, len + 1);
strncpy (buf, src, len);
buf = xmalloc (TCHAR, len + 1);
au_copy (buf, len, src);
buf[len] = 0;
//f_out ("%s", buf);
xfree (buf);
......
......@@ -331,9 +331,9 @@ static int current_change_set;
struct sprite_entry sprite_entries[2][MAX_SPR_PIXELS / 16];
struct color_change color_changes[2][MAX_REG_CHANGE];
struct decision line_decisions[2 * (MAXVPOS + 1) + 1];
struct draw_info line_drawinfo[2][2 * (MAXVPOS + 1) + 1];
#define COLOR_TABLE_SIZE (MAXVPOS + 1) * 2
struct decision line_decisions[2 * (MAXVPOS + 2) + 1];
struct draw_info line_drawinfo[2][2 * (MAXVPOS + 2) + 1];
#define COLOR_TABLE_SIZE (MAXVPOS + 2) * 2
struct color_entry color_tables[2][COLOR_TABLE_SIZE];
int next_sprite_entry = 0;
......@@ -1803,7 +1803,7 @@ static void start_bpl_dma (int hpos, int hstart)
prevbpl[lof_current][vpos][i] = bplptx[i];
if (!lof_current && (bplcon0 & 4))
bplpt[i] = prevbpl[1 - lof_current][vpos][i];
if (!(bplcon0 & 4) || interlace_seen < 0)
if (!(bplcon0 & 4) || interlace_seen < 0)
prevbpl[1 - lof_current][vpos][i] = prevbpl[lof_current][vpos][i] = 0;
}
}
......@@ -2797,6 +2797,8 @@ void init_hz (void)
dumpsync ();
hzc = 1;
}
if (maxvpos_nom >= MAXVPOS)
maxvpos_nom = MAXVPOS;
if (currprefs.gfx_scandoubler && doublescan == 0)
doublescan = -1;
if (doublescan != odbl || maxvpos != omaxvpos)
......@@ -2834,9 +2836,16 @@ void init_hz (void)
#ifdef PICASSO96
init_hz_p96 ();
#endif
// if (vblank_hz != ovblank)
// updatedisplayarea ();
//inputdevice_tablet_strobe ();
if (vblank_hz != ovblank) {
#ifdef OPENGL
OGL_refresh ();
#endif
#ifdef D3D
D3D_refresh ();
#endif
}
//inputdevice_tablet_strobe ();
write_log ("%s mode%s%s V=%dHz H=%dHz (%dx%d)\n",
isntsc ? "NTSC" : "PAL",
(bplcon0 & 4) ? " interlaced" : "",
......@@ -3084,9 +3093,9 @@ STATIC_INLINE uae_u16 VHPOSR (void)
vp = 0;
}
if (HPOS_OFFSET) {
hp += 1;
if (hp >= maxhpos)
hp -= maxhpos;
hp += 1;
if (hp >= maxhpos)
hp -= maxhpos;
}
vp <<= 8;
......@@ -5497,6 +5506,13 @@ void hsync_handler (void)
INTREQ (0x8000 | 0x0008);
}
{
extern void bsdsock_fake_int_handler (void);
extern int volatile bsd_int_requested;
if (bsd_int_requested)
bsdsock_fake_int_handler ();
}
/* See if there's a chance of a copper wait ending this line. */
cop_state.hpos = 0;
cop_state.last_write = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -286,13 +286,11 @@ static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
if (expamem[0] & add_memory) {
// Z3 RAM expansion
p2 = 0;
while (!p2 && z3num < 3) {
while (!p2 && z3num < 2) {
if (z3num == 0 && currprefs.z3fastmem_size)
p2 = z3fastmem_start >> 16;
else if (z3num == 1 && currprefs.z3fastmem2_size)
p2 = z3fastmem2_start >> 16;
else if (z3num == 2 && currprefs.z3chipmem_size)
p2 = z3chipmem_start >> 16;
if (!p2)
z3num++;
}
......@@ -340,7 +338,7 @@ static void REGPARAM2 expamem_bput (uaecptr addr, uae_u32 value)
if (expamem_type () == zorroII) {
expamem_hi = value;
(*card_map[ecard]) ();
write_log (" Card %d (Zorro%s) done.\n", ecard + 1, expamem_type() == 0xc0 ? "II" : "III");
write_log (" Card %d (Zorro%s) done.\n", ecard + 1, expamem_type () == 0xc0 ? "II" : "III");
++ecard;
if (ecard < cardno)
(*card_init[ecard]) ();
......@@ -356,7 +354,7 @@ static void REGPARAM2 expamem_bput (uaecptr addr, uae_u32 value)
break;
case 0x4c:
write_log (" Card %d (Zorro%s) had no success.\n", ecard + 1, expamem_type() == 0xc0 ? "II" : "III");
write_log (" Card %d (Zorro%s) had no success.\n", ecard + 1, expamem_type () == 0xc0 ? "II" : "III");
++ecard;
if (ecard < cardno)
(*card_init[ecard]) ();
......@@ -894,7 +892,7 @@ addrbank z3fastmem2_bank = {
addrbank z3chipmem_bank = {
z3chipmem_lget, z3chipmem_wget, z3chipmem_bget,
z3chipmem_lput, z3chipmem_wput, z3chipmem_bput,
z3chipmem_xlate, z3chipmem_check, NULL, "ZorroIII FakeChipRAM",
z3chipmem_xlate, z3chipmem_check, NULL, "MegaChipRAM",
z3chipmem_lget, z3chipmem_wget, ABFLAG_RAM
};
......@@ -1020,36 +1018,31 @@ static void expamem_init_filesys (void)
* Zorro III expansion memory
*/
static void expamem_map_z3fastmem_2 (addrbank *bank, uaecptr *startp, uae_u32 size, uae_u32 allocated)
static void expamem_map_z3fastmem_2 (addrbank *bank, uaecptr *startp, uae_u32 size, uae_u32 allocated, int chip)
{
int z3fs = ((expamem_hi | (expamem_lo >> 4)) << 16);
int start = *startp;
if (start != z3fs) {
write_log ("WARNING: Z3FAST mapping changed from $%08x to $%08x\n", start, z3fs);
write_log ("WARNING: Z3MEM mapping changed from $%08x to $%08x\n", start, z3fs);
map_banks (&dummy_bank, start >> 16, size >> 16,
allocated);
*startp = z3fs;
map_banks (bank, start >> 16, size >> 16,
allocated);
}
write_log ("Fastmem (32bit): mapped @$%08x: %d MB Zorro III fast memory \n",
start, allocated / 0x100000);
write_log ("Z3MEM (32bit): mapped @$%08x: %d MB Zorro III %s memory \n",
start, allocated / 0x100000, chip ? "chip" : "fast");
}
static void expamem_map_z3fastmem (void)
{
expamem_map_z3fastmem_2 (&z3fastmem_bank, &z3fastmem_start, currprefs.z3fastmem_size, allocated_z3fastmem);
expamem_map_z3fastmem_2 (&z3fastmem_bank, &z3fastmem_start, currprefs.z3fastmem_size, allocated_z3fastmem, 0);
}
static void expamem_map_z3fastmem2 (void)
{
expamem_map_z3fastmem_2 (&z3fastmem2_bank, &z3fastmem2_start, currprefs.z3fastmem2_size, allocated_z3fastmem2);
expamem_map_z3fastmem_2 (&z3fastmem2_bank, &z3fastmem2_start, currprefs.z3fastmem2_size, allocated_z3fastmem2, 0);
}
static void expamem_map_z3chipmem (void)
{
expamem_map_z3fastmem_2 (&z3chipmem_bank, &z3chipmem_start, currprefs.z3chipmem_size, allocated_z3chipmem);
}
static void expamem_init_z3fastmem_2 (addrbank *bank, uae_u32 start, uae_u32 size, uae_u32 allocated)
{
......@@ -1096,10 +1089,6 @@ static void expamem_init_z3fastmem2 (void)
{
expamem_init_z3fastmem_2 (&z3fastmem2_bank, z3fastmem2_start, currprefs.z3fastmem2_size, allocated_z3fastmem2);
}
static void expamem_init_z3chipmem (void)
{
expamem_init_z3fastmem_2 (&z3chipmem_bank, z3chipmem_start, currprefs.z3chipmem_size, allocated_z3chipmem);
}
#ifdef PICASSO96
/*
......@@ -1175,6 +1164,12 @@ static void allocate_expamem (void)
currprefs.gfxmem_size = changed_prefs.gfxmem_size;
currprefs.z3chipmem_size = changed_prefs.z3chipmem_size;
z3chipmem_start = currprefs.z3fastmem_start;
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;
if (allocated_fastmem != currprefs.fastmem_size) {
free_fastmemory ();
allocated_fastmem = currprefs.fastmem_size;
......@@ -1336,6 +1331,8 @@ static uaecptr check_boot_rom (void)
#endif
if (currprefs.chipmem_size > 2 * 1024 * 1024)
return b;
if (currprefs.z3chipmem_size)
return b;
return 0;
}
......@@ -1431,28 +1428,23 @@ void expamem_reset (void)
card_map[cardno++] = expamem_map_fastcard;
}
z3fastmem_start = currprefs.z3fastmem_start;
z3fastmem2_start = currprefs.z3fastmem_start + currprefs.z3fastmem_size;
if (z3fastmem != NULL) {
if (z3fastmem != NULL) {
z3num = 0;
card_init[cardno] = expamem_init_z3fastmem;
card_map[cardno++] = expamem_map_z3fastmem;
if (kickstart_version >= 36) {
card_init[cardno] = expamem_init_z3fastmem;
card_map[cardno++] = expamem_map_z3fastmem;
}
map_banks (&z3fastmem_bank, z3fastmem_start >> 16, currprefs.z3fastmem_size >> 16, allocated_z3fastmem);
if (z3fastmem2 != NULL) {
card_init[cardno] = expamem_init_z3fastmem2;
card_map[cardno++] = expamem_map_z3fastmem2;
if (kickstart_version >= 36) {
card_init[cardno] = expamem_init_z3fastmem2;
card_map[cardno++] = expamem_map_z3fastmem2;
}
map_banks (&z3fastmem2_bank, z3fastmem2_start >> 16, currprefs.z3fastmem2_size >> 16, allocated_z3fastmem2);
}
}
}
z3chipmem_start = z3fastmem2_start + currprefs.z3fastmem2_size;
if (currprefs.z3fastmem_size || currprefs.z3fastmem2_size)
z3chipmem_start += 16 * 1024 * 1024;
if (z3chipmem != NULL) {
z3num = 0;
card_init[cardno] = expamem_init_z3chipmem;
card_map[cardno++] = expamem_map_z3chipmem;
if (z3chipmem != NULL)
map_banks (&z3chipmem_bank, z3chipmem_start >> 16, currprefs.z3chipmem_size >> 16, allocated_z3chipmem);
}
#ifdef CDTV
if (currprefs.cs_cdtvcd) {
card_init[cardno] = expamem_init_cdtv;
......
This diff is collapsed.
......@@ -22,6 +22,7 @@
; 2008.12.25 mousehack cursor sync
; 2009.01.20 clipboard sharing
; 2009.12.27 console hook
; 2010.05.27 Z3Chip
AllocMem = -198
FreeMem = -210
......@@ -224,21 +225,40 @@ FSIN_none:
; jsr -$007e(a6) ; Enable
filesys_dev_storeinfo ; add >2MB chip RAM to memory list
filesys_dev_storeinfo
moveq #3,d4 ; MEMF_CHIP | MEMF_PUBLIC
cmp.w #36,20(a6)
bcs.s FSIN_ksold
or.w #256,d4 ; MEMF_LOCAL
FSIN_ksold
; add >2MB-6MB chip RAM to memory list
move.w #$FF80,d0
bsr.w getrtbase
jsr (a0)
moveq.l #3,d1
moveq.l #-10,d2
move.l d4,d1
moveq #-10,d2
move.l #$200000,a0
sub.l a0,d0
bcs.b FSIN_chip_done
beq.b FSIN_chip_done
moveq.l #0,d4
move.l d4,a1
sub.l a1,a1
jsr -618(a6) ; AddMemList
FSIN_chip_done
; add MegaChipRAM
move.w #$FF80,d0
bsr.w getrtbase
jsr (a0) ; d1 = size, a1 = start address
beq.s FSIN_fchip_done
move.l a1,a0
move.l d1,d0
move.l d4,d1
moveq #-5,d2
lea fchipname(pc),a1
jsr -618(a6) ; AddMemList
FSIN_fchip_done
lea fstaskname(pc),a0
lea fsmounttask(pc),a1
moveq #10,d0
......@@ -2453,4 +2473,5 @@ intlibname: dc.b 'intuition.library',0
gfxlibname: dc.b 'graphics.library',0
explibname: dc.b 'expansion.library',0
fsresname: dc.b 'FileSystem.resource',0
fchipname: dc.b 'megachip memory',0
END
......@@ -1000,11 +1000,19 @@ static struct fs_dirhandle *fs_opendir (Unit *u, const TCHAR *nname)
{
struct fs_dirhandle *fsd = xmalloc (struct fs_dirhandle, 1);
/* fsd->isarch = !!(u->volflags & MYVOLUMEINFO_ARCHIVE);
if (fsd->isarch)
if (fsd->isarch) {
fsd->zd = zfile_opendir_archive (nname);
else*/
if (!fsd->zd)
goto end;
} else */ {
fsd->od = my_opendir (nname);
if (!fsd->od)
goto end;
}
return fsd;
end:
xfree (fsd);
return NULL;
}
static void fs_closedir (struct fs_dirhandle *fsd)
{
......@@ -1020,12 +1028,19 @@ static struct fs_filehandle *fs_open (Unit *unit, const TCHAR *name, char *flags
{
struct fs_filehandle *fsf = xmalloc (struct fs_filehandle, 1);
/* fsf->isarch = !!(unit->volflags & MYVOLUMEINFO_ARCHIVE);
if (fsf->isarch)
if (fsf->isarch) {
fsf->zf = zfile_open_archive (name, flags);
else*/
write_log(">>>>>>>>>>>>>>>>>>>>>>>\n\nopen: %s %s\n", name, flags);
if (!fsf->zf)
goto end;
} else */ {
fsf->of = my_open (name, flags);
if (!fsf->of)
goto end;
}
return fsf;
end:
xfree (fsf);
return NULL;
}
static void fs_close (struct fs_filehandle *fd)
{
......@@ -1550,7 +1565,7 @@ static void delete_aino (Unit *unit, a_inode *aino)
{
a_inode **aip;
TRACE(("deleting aino %x\n", aino->uniq));
TRACE(("deleting aino %x\n", aino->uniq));
aino_test (aino);
aino->dirty = 1;
......@@ -1745,9 +1760,9 @@ static int fill_file_attrs (Unit *u, a_inode *base, a_inode *c)
c->amigaos_mode = flags;
c->comment = comment;
return 1;
} else {*/
} else */ {
return fsdb_fill_file_attrs (base, c);
//}
}
return 0;
}
......@@ -1812,7 +1827,7 @@ static a_inode *new_child_aino (Unit *unit, a_inode *base, TCHAR *rel)
a_inode *aino = NULL;
int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
TRACE(("new_child_aino %s, %s\n", base->aname, rel));
TRACE(("new_child_aino %s, %s\n", base->aname, rel));
if (!isarch)
aino = fsdb_lookup_aino_aname (base, rel);
......@@ -1840,7 +1855,7 @@ static a_inode *new_child_aino (Unit *unit, a_inode *base, TCHAR *rel)
init_child_aino (unit, base, aino);
recycle_aino (unit, aino);
TRACE(("created aino %x, lookup, amigaos_mode %d\n", aino->uniq, aino->amigaos_mode));
TRACE(("created aino %x, lookup, amigaos_mode %d\n", aino->uniq, aino->amigaos_mode));
return aino;
}
......@@ -1866,7 +1881,7 @@ static a_inode *create_child_aino (Unit *unit, a_inode *base, TCHAR *rel, int is
aino->dirty = 1;
recycle_aino (unit, aino);
TRACE(("created aino %x, create\n", aino->uniq));
TRACE(("created aino %x, create\n", aino->uniq));
return aino;
}
......@@ -1943,7 +1958,7 @@ static a_inode *lookup_child_aino_for_exnext (Unit *unit, a_inode *base, TCHAR *
init_child_aino (unit, base, c);
recycle_aino (unit, c);
TRACE(("created aino %x, exnext\n", c->uniq));
TRACE(("created aino %x, exnext\n", c->uniq));
return c;
}
......@@ -1958,7 +1973,7 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const TCHAR *rel, int *err)
aino_test (base);
*err = 0;
TRACE(("get_path(%s,%s)\n", base->aname, rel));
TRACE(("get_path(%s,%s)\n", base->aname, rel));
/* root-relative path? */
for (i = 0; rel[i] && rel[i] != '/' && rel[i] != ':'; i++)
......@@ -3334,7 +3349,7 @@ static void action_examine_object (Unit *unit, dpacket packet)
uaecptr info = GET_PCK_ARG2 (packet) << 2;
a_inode *aino = 0;
TRACE(("ACTION_EXAMINE_OBJECT(0x%lx,0x%lx)\n", lock, info));
TRACE(("ACTION_EXAMINE_OBJECT(0x%lx,0x%lx)\n", lock, info));
DUMPLOCK(unit, lock);
if (lock != 0)
......@@ -3368,11 +3383,11 @@ static void populate_directory (Unit *unit, a_inode *base)
base->locked_children++;
unit->total_locked_ainos++;
}
TRACE(("Populating directory, child %p, locked_children %d\n",
TRACE(("Populating directory, child %p, locked_children %d\n",
base->child, base->locked_children));
for (;;) {
TCHAR fn[MAX_DPATH];
struct dirent *ok;
struct dirent *ok;
uae_u32 err;
/* Find next file that belongs to the Amiga fs (skipping things
......@@ -4020,7 +4035,7 @@ static void
uaecptr lock1 = GET_PCK_ARG1 (packet) << 2;
uaecptr lock2 = GET_PCK_ARG2 (packet) << 2;
TRACE(("ACTION_SAME_LOCK(0x%lx,0x%lx)\n",lock1,lock2));
TRACE(("ACTION_SAME_LOCK(0x%lx,0x%lx)\n",lock1,lock2));
DUMPLOCK(unit, lock1); DUMPLOCK(unit, lock2);
if (!lock1 || !lock2) {
......@@ -4135,7 +4150,7 @@ static void
{
uaecptr lock = GET_PCK_ARG1 (packet) << 2;
TRACE(("ACTION_PARENT(0x%lx)\n",lock));
TRACE(("ACTION_PARENT(0x%lx)\n",lock));
if (!lock) {
PUT_PCK_RES1 (packet, 0);
......@@ -4143,7 +4158,7 @@ static void
} else {
action_parent_common (unit, packet, get_long (lock + 4));
}
TRACE(("=%x %d\n", GET_PCK_RES1 (packet), GET_PCK_RES2 (packet)));
TRACE(("=%x %d\n", GET_PCK_RES1 (packet), GET_PCK_RES2 (packet)));
}
static void
......@@ -4154,7 +4169,7 @@ static void
a_inode *aino;
int err;
TRACE(("ACTION_CREATE_DIR(0x%lx,\"%s\")\n", lock, bstr (unit, name)));
TRACE(("ACTION_CREATE_DIR(0x%lx,\"%s\")\n", lock, bstr (unit, name)));
if (unit->ui.readonly || unit->ui.locked) {
PUT_PCK_RES1 (packet, DOS_FALSE);
......@@ -4236,7 +4251,7 @@ static void
if (mode < 0)
whence = SEEK_SET;
TRACE(("ACTION_SET_FILE_SIZE(0x%lx, %d, 0x%x)\n", GET_PCK_ARG1 (packet), offset, mode));
TRACE(("ACTION_SET_FILE_SIZE(0x%lx, %d, 0x%x)\n", GET_PCK_ARG1 (packet), offset, mode));
k = lookup_key (unit, GET_PCK_ARG1 (packet));
if (k == 0) {
......@@ -4301,7 +4316,6 @@ static void relock_re (Unit *unit, a_inode *a1, a_inode *a2, int failed)
knext = k1->next;
if (k1->aino == a1 && k1->fd) {
char *mode = (k1->dosmode & A_FIBF_READ) == 0 ? "wb" : (k1->dosmode & A_FIBF_WRITE) == 0 ? "rb" : "r+b";
//mode |= O_BINARY;
if (failed) {
/* rename still failed, restore fd */
k1->fd = fs_open (unit, a1->nname, mode);
......@@ -4812,7 +4826,7 @@ static uae_u32 REGPARAM2 exter_int_helper (TrapContext *context)
lockend = locks;
while (get_long (lockend) != 0) {
if (get_long (lockend) == lockend) {
write_log ("filesystem lock queue corrupted!\n");
write_log ("filesystem lock queue corrupted!\n");
break;
}
lockend = get_long (lockend);
......@@ -4905,7 +4919,7 @@ static uae_u32 REGPARAM2 exter_int_helper (TrapContext *context)
break;
default:
write_log ("Shouldn't happen in exter_int_helper.\n");
write_log ("Shouldn't happen in exter_int_helper.\n");
break;
}
return 0;
......@@ -4989,7 +5003,7 @@ static int handle_packet (Unit *unit, dpacket pck)
case ACTION_FORMAT:
return 0;
default:
write_log ("FILESYS: UNKNOWN PACKET %x\n", type);
write_log ("FILESYS: UNKNOWN PACKET %x\n", type);
return 0;
}
return 1;
......@@ -5084,7 +5098,7 @@ error:
PUT_PCK_RES1 (packet_addr, DOS_FALSE);
PUT_PCK_RES2 (packet_addr, ERROR_ACTION_NOT_KNOWN);
}
TRACE(("reply: %8lx, %ld\n", GET_PCK_RES1 (pck), GET_PCK_RES2 (pck)));
TRACE(("reply: %8lx, %ld\n", GET_PCK_RES1 (packet_addr), GET_PCK_RES2 (packet_addr)));
error2:
......@@ -5572,7 +5586,7 @@ static int rdb_mount (UnitInfo *uip, int unit_no, unsigned int partnum, uaecptr
m68k_dreg (regs, 7) = m68k_dreg (regs, 7) & ~1;
buf[37 + buf[36]] = 0; /* zero terminate BSTR */
uip->rdb_devname_amiga[partnum] = ds (device_dupfix (get_long (parmpacket + PP_EXPLIB), (char *)(buf + 37)));
uip->rdb_devname_amiga[partnum] = ds (device_dupfix (get_long (parmpacket + PP_EXPLIB), (char *)(buf + 37)));
put_long (parmpacket, uip->rdb_devname_amiga[partnum]); /* name */
put_long (parmpacket + 4, ROM_hardfile_resname);
put_long (parmpacket + 8, uip->devno);
......
This diff is collapsed.
......@@ -1648,20 +1648,20 @@ uae_u8 *restore_fpu (uae_u8 *src)
changed_prefs.fpu_model = currprefs.fpu_model = restore_u32();
flags = restore_u32 ();
for (i = 0; i < 8; i++) {
uae_u32 w1 = restore_u32 ();
uae_u32 w2 = restore_u32 ();
uae_u32 w3 = restore_u16 ();
regs.fp[i] = to_exten (w1, w2, w3);
uae_u32 w1 = restore_u32 ();
uae_u32 w2 = restore_u32 ();
uae_u32 w3 = restore_u16 ();
regs.fp[i] = to_exten (w1, w2, w3);
}
regs.fpcr = restore_u32 ();
native_set_fpucw (regs.fpcr);
regs.fpsr = restore_u32 ();
regs.fpiar = restore_u32 ();
if (flags & 0x80000000) {
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;
}
......@@ -1672,19 +1672,19 @@ uae_u8 *save_fpu (int *len, uae_u8 *dstptr)
*len = 0;
if (currprefs.fpu_model == 0)
return 0;
return 0;
if (dstptr)
dstbak = dst = dstptr;
dstbak = dst = dstptr;
else
dstbak = dst = xmalloc (uae_u8, 4+4+8*10+4+4+4+4+4);
save_u32 (currprefs.fpu_model);
save_u32 (0x80000000);
for (i = 0; i < 8; i++) {
uae_u32 w1, w2, w3;
from_exten (regs.fp[i], &w1, &w2, &w3);
save_u32 (w1);
save_u32 (w2);
save_u16 (w3);
uae_u32 w1, w2, w3;
from_exten (regs.fp[i], &w1, &w2, &w3);
save_u32 (w1);
save_u32 (w2);
save_u16 (w3);
}
save_u32 (regs.fpcr);
save_u32 (regs.fpsr);
......@@ -1694,10 +1694,6 @@ uae_u8 *save_fpu (int *len, uae_u8 *dstptr)
*len = dst - dstbak;
return dstbak;
}
void fpux_save (int *v)
{
}
void fpux_restore (int *v)
{
}
void fpux_save (int *v) {}
void fpux_restore (int *v) {}
#endif /* SAVESTATE */
This diff is collapsed.
......@@ -143,22 +143,22 @@ int fsdb_mode_supported (const a_inode *aino)
* native FS. Return zero if that is not possible. */
int fsdb_mode_representable_p (const a_inode *aino, int amigaos_mode)
{
int mask = amigaos_mode ^ 15;
if (0 && aino->dir)
return amigaos_mode == 0;
if (mask & A_FIBF_SCRIPT) /* script */
return 0;
if ((mask & 15) == 15) /* xxxxRWED == OK */
return 1;
if (!(mask & A_FIBF_EXECUTE)) /* not executable */
return 0;
if (!(mask & A_FIBF_READ)) /* not readable */
return 0;
if ((mask & 15) == (A_FIBF_READ | A_FIBF_EXECUTE)) /* ----RxEx == ReadOnly */
return 1;
return 0;
int mask = amigaos_mode ^ 15;
if (0 && aino->dir)
return amigaos_mode == 0;
if (mask & A_FIBF_SCRIPT) /* script */
return 0;
if ((mask & 15) == 15) /* xxxxRWED == OK */
return 1;
if (!(mask & A_FIBF_EXECUTE)) /* not executable */
return 0;
if (!(mask & A_FIBF_READ)) /* not readable */
return 0;
if ((mask & 15) == (A_FIBF_READ | A_FIBF_EXECUTE)) /* ----RxEx == ReadOnly */
return 1;
return 0;
}
char *fsdb_create_unique_nname (a_inode *base, const char *suggestion)
......@@ -166,18 +166,18 @@ 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"[rand () % 63];
}
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"[rand () % 63];
}
}
}
/* fsusage.c -- return space usage of mounted filesystems
Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysconfig.h"
#include "sysdeps.h"
#include "target.h"
#if defined TARGET_AMIGAOS
......@@ -198,10 +199,10 @@ int get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp)
Return the actual number of bytes read, zero for EOF, or negative
for an error. */
static int
int
safe_read (desc, ptr, len)
int desc;
char *ptr;
TCHAR *ptr;
int len;
{
int n_chars;
......@@ -231,9 +232,9 @@ static int
on a system that requires a non-NULL value. */
int
get_fs_usage (path, disk, fsp)
const char *path;
const char *disk;
struct fs_usage *fsp;
const TCHAR *path;
const TCHAR *disk;
struct fs_usage *fsp;
{
#ifdef STAT_STATFS3_OSF1
# define CONVERT_BLOCKS(B) adjust_blocks ((B), fsd.f_fsize, 512)
......@@ -265,7 +266,7 @@ int
# define SUPERBOFF (SUPERB * 512)
# endif
# define CONVERT_BLOCKS(B) \
adjust_blocks ((B), (fsd.s_type == Fs2b ? 1024 : 512), 512)
adjust_blocks ((B), (fsd.s_type == Fs2b ? 1024 : 512), 512)
struct filsys fsd;
int fd;
......@@ -280,7 +281,7 @@ int
if (fd < 0)
return -1;
lseek (fd, (long) SUPERBOFF, 0);
if (safe_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd)
if (safe_read (fd, (TCHAR *) &fsd, sizeof fsd) != sizeof fsd)
{
close (fd);
return -1;
......@@ -304,11 +305,11 @@ int
# ifdef STATFS_TRUNCATES_BLOCK_COUNTS
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
struct statfs are truncated to 2GB. These conditions detect that
truncation, presumably without botching the 4.1.1 case, in which
the values are not truncated. The correct counts are stored in
undocumented spare fields. */
/* In SunOS 4.1.2, 4.1.3, and 4.1.3_U1, the block counts in the
struct statfs are truncated to 2GB. These conditions detect that
truncation, presumably without botching the 4.1.1 case, in which
the values are not truncated. The correct counts are stored in
undocumented spare fields. */
if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0)
{
fsd.f_blocks = fsd.f_spare[0];
......@@ -348,26 +349,26 @@ int
if (statfs (path, &fsd, sizeof fsd, 0) < 0)
return -1;
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
/* Empirically, the block counts on most SVR3 and SVR3-derived
systems seem to always be in terms of 512-byte blocks,
no matter what value f_bsize has. */
#endif /* STAT_STATFS4 */
#ifdef STAT_STATVFS /* SVR4 */
# define CONVERT_BLOCKS(B) \
adjust_blocks ((B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
adjust_blocks ((B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
struct statvfs fsd;
if (statvfs (path, &fsd) < 0)
return -1;
/* f_frsize isn't guaranteed to be supported. */
/* f_frsize isn't guaranteed to be supported. */
#endif /* STAT_STATVFS */
#if !defined(STAT_STATFS2_FS_DATA) && !defined(STAT_READ_FILSYS)
/* !Ultrix && !SVR2 */
/* !Ultrix && !SVR2 */
fsp->fsu_blocks = CONVERT_BLOCKS (fsd.f_blocks);
fsp->fsu_bfree = CONVERT_BLOCKS (fsd.f_bfree);
......@@ -377,7 +378,7 @@ int
#endif /* not STAT_STATFS2_FS_DATA && not STAT_READ_FILSYS */
return 0;
return 0;
}
#if defined(_AIX) && defined(_I386)
......@@ -385,7 +386,7 @@ int
int
statfs (path, fsb)
char *path;
TCHAR *path;
struct statfs *fsb;
{
struct stat stats;
......
......@@ -195,7 +195,7 @@ STATIC_INLINE void pw (int offset, uae_u16 w)
ide->secbuf[offset * 2 + 0] = (uae_u8)w;
ide->secbuf[offset * 2 + 1] = w >> 8;
}
static void ps (int offset, char *src, int max)
static void ps (int offset, TCHAR *src, int max)
{
int i, len;
......@@ -410,7 +410,7 @@ static void ide_identify_drive (void)
uae_u64 totalsecs;
int v;
uae_u8 *buf = ide->secbuf;
char tmp[100];
TCHAR tmp[100];
if (ide->hdhfd.size == 0) {
ide_fail ();
......@@ -1484,9 +1484,9 @@ static void initsramattr (int size, int readonly)
*p++= 4; /* PCMCIA 2.1 */
*p++= 1;
if (real) {
strncpy ((char*)p, hfd->product_id, -1);
ua_copy ((char*)p, -1, hfd->product_id);
p += strlen ((char*)p) + 1;
strncpy ((char*)p, hfd->product_rev, -1);
ua_copy ((char*)p, -1, hfd->product_rev);
} else {
strcpy ((char*)p, "UAE");
p += strlen ((char*)p) + 1;
......@@ -1575,7 +1575,7 @@ static int freepcmcia (int reset)
return 1;
}
static int initpcmcia (const char *path, int readonly, int reset)
static int initpcmcia (const TCHAR *path, int readonly, int reset)
{
if (currprefs.cs_pcmcia == 0)
return 0;
......@@ -1860,9 +1860,9 @@ static void dumphdf (struct hardfiledata *hfd)
}
#endif
int gayle_add_ide_unit (int ch, char *path, int blocksize, int readonly,
char *devname, int sectors, int surfaces, int reserved,
int bootpri, char *filesys)
int gayle_add_ide_unit (int ch, TCHAR *path, int blocksize, int readonly,
TCHAR *devname, int sectors, int surfaces, int reserved,
int bootpri, TCHAR *filesys)
{
struct ide_hdf *ide;
......@@ -1884,12 +1884,12 @@ int gayle_add_ide_unit (int ch, char *path, int blocksize, int readonly,
return 1;
}
int gayle_add_pcmcia_sram_unit (const char *path, int readonly)
int gayle_add_pcmcia_sram_unit (const TCHAR *path, int readonly)
{
return initpcmcia (path, readonly, 1);
}
int gayle_modify_pcmcia_sram_unit (const char *path, int readonly, int insert)
int gayle_modify_pcmcia_sram_unit (const TCHAR *path, int readonly, int insert)
{
if (insert)
return initpcmcia (path, readonly, pcmcia_sram ? 0 : 1);
......
......@@ -40,7 +40,6 @@ static void generate_func(void)
printf("#include \"sysdeps.h\"\n");
printf("#include \"options.h\"\n");
printf("#include \"custom.h\"\n");
// printf("#include \"custom_private.h\"\n");
printf("#include \"memory.h\"\n");
printf("#include \"blitter.h\"\n");
printf("#include \"blitfunc.h\"\n\n");
......@@ -102,15 +101,15 @@ static void generate_func(void)
} else {
printf("\tfor (i = b->hblitsize; i--; ) {\n\t\tuae_u32 bltadat, srca;\n\n");
}
if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_agnus_wget (ptc); ptc += 2; }\n");
if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_agnus_wget (ptb); ptb += 2;\n");
if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget_indirect (ptc); ptc += 2; }\n");
if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_wget_indirect (ptb); ptb += 2;\n");
if (b_is_on) printf("\t\t\tsrcb = (((uae_u32)prevb << 16) | bltbdat) >> b->blitbshift;\n");
if (b_is_on) printf("\t\t\tprevb = bltbdat;\n\t\t}\n");
if (a_is_on) printf("\t\tif (pta) { bltadat = blt_info.bltadat = chipmem_agnus_wget (pta); pta += 2; } else { bltadat = blt_info.bltadat; }\n");
if (a_is_on) printf("\t\tif (pta) { bltadat = blt_info.bltadat = chipmem_wget_indirect (pta); pta += 2; } else { bltadat = blt_info.bltadat; }\n");
if (a_is_on) printf("\t\tbltadat &= blit_masktable[i];\n");
if (a_is_on) printf("\t\tsrca = (((uae_u32)preva << 16) | bltadat) >> b->blitashift;\n");
if (a_is_on) printf("\t\tpreva = bltadat;\n");
printf("\t\tif (dstp) chipmem_agnus_wput (dstp, dstd);\n");
printf("\t\tif (dstp) chipmem_wput_indirect (dstp, dstd);\n");
printf("\t\tdstd = (%s) & 0xFFFF;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dstd;\n");
printf("\t\tif (ptd) { dstp = ptd; ptd += 2; }\n");
......@@ -122,7 +121,7 @@ static void generate_func(void)
printf("}\n");
if (b_is_on) printf("b->bltbhold = srcb;\n");
if (c_is_on) printf("b->bltcdat = srcc;\n");
printf("\t\tif (dstp) chipmem_agnus_wput (dstp, dstd);\n");
printf("\t\tif (dstp) chipmem_wput_indirect (dstp, dstd);\n");
#if 0
printf("}\n");
#endif
......@@ -183,15 +182,15 @@ static void generate_func(void)
} else {
printf("\tfor (i = b->hblitsize; i--; ) {\n\t\tuae_u32 bltadat, srca;\n");
}
if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_agnus_wget (ptc); ptc -= 2; }\n");
if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_agnus_wget (ptb); ptb -= 2;\n");
if (c_is_on) printf("\t\tif (ptc) { srcc = chipmem_wget_indirect (ptc); ptc -= 2; }\n");
if (b_is_on) printf("\t\tif (ptb) {\n\t\t\tuae_u32 bltbdat = blt_info.bltbdat = chipmem_wget_indirect (ptb); ptb -= 2;\n");
if (b_is_on) printf("\t\t\tsrcb = ((bltbdat << 16) | prevb) >> b->blitdownbshift;\n");
if (b_is_on) printf("\t\t\tprevb = bltbdat;\n\t\t}\n");
if (a_is_on) printf("\t\tif (pta) { bltadat = blt_info.bltadat = chipmem_agnus_wget (pta); pta -= 2; } else { bltadat = blt_info.bltadat; }\n");
if (a_is_on) printf("\t\tif (pta) { bltadat = blt_info.bltadat = chipmem_wget_indirect (pta); pta -= 2; } else { bltadat = blt_info.bltadat; }\n");
if (a_is_on) printf("\t\tbltadat &= blit_masktable[i];\n");
if (a_is_on) printf("\t\tsrca = (((uae_u32)bltadat << 16) | preva) >> b->blitdownashift;\n");
if (a_is_on) printf("\t\tpreva = bltadat;\n");
printf("\t\tif (dstp) chipmem_agnus_wput (dstp, dstd);\n");
printf("\t\tif (dstp) chipmem_wput_indirect (dstp, dstd);\n");
printf("\t\tdstd = (%s) & 0xFFFF;\n", blitops[blttbl[i]].s);
printf("\t\ttotald |= dstd;\n");
printf("\t\tif (ptd) { dstp = ptd; ptd -= 2; }\n");
......@@ -203,7 +202,7 @@ static void generate_func(void)
printf("}\n");
if (b_is_on) printf("b->bltbhold = srcb;\n");
if (c_is_on) printf("b->bltcdat = srcc;\n");
printf("\t\tif (dstp) chipmem_agnus_wput (dstp, dstd);\n");
printf("\t\tif (dstp) chipmem_wput_indirect (dstp, dstd);\n");
#if 0
printf("}\n");
#endif
......
......@@ -2874,12 +2874,13 @@ gen_opcode (unsigned long int opcode)
}
static void
generate_includes (FILE * f)
generate_includes (FILE * f, int bigger)
{
fprintf (f, "#include \"sysconfig.h\"\n");
fprintf (f, "#if defined(JIT)\n");
fprintf (f, "#include \"sysdeps.h\"\n");
fprintf (f, "#include \"options.h\"\n");
if (bigger)
fprintf (f, "#include \"options.h\"\n");
fprintf (f, "#include \"memory.h\"\n");
fprintf (f, "#include \"custom.h\"\n");
fprintf (f, "#include \"events.h\"\n");
......@@ -3125,8 +3126,8 @@ main (int argc, char **argv)
stblfile = fopen ("compstbl.c", "wb");
freopen ("compemu.c", "wb", stdout);
generate_includes (stdout);
generate_includes (stblfile);
generate_includes (stdout, 1);
generate_includes (stblfile, 1);
printf("#include \"compemu.h\"\n");
......
......@@ -175,7 +175,7 @@ static void addcycles000_3 (char *s)
count_ncycles++;
}
static int isreg(amodes mode)
static int isreg (amodes mode)
{
if (mode == Dreg || mode == Areg)
return 1;
......@@ -296,7 +296,7 @@ static const char *gen_nextiword (int flags)
if (flags & GF_NOREFILL) {
strcpy (buffer, "regs.irc");
} else {
sprintf (buffer, "get_word_ce_prefetch (%d)", r + 2);
sprintf (buffer, "get_word_ce_prefetch (%d)", r + 2);
count_read++;
}
} else {
......@@ -319,7 +319,7 @@ static const char *gen_nextiword (int flags)
insn_n_cycles += 4;
}
}
return buffer;
return buffer;
}
static const char *gen_nextibyte (int flags)
......@@ -1392,9 +1392,9 @@ static void genflags (flagtypes type, wordsizes size, char *value, char *src, ch
case flag_add:
switch (size) {
case sz_byte: printf ("\toptflag_addb (%s, (uae_s8)(%s), (uae_s8)(%s));\n", value, src, dst); break;
case sz_word: printf ("\toptflag_addw (%s, (uae_s16)(%s), (uae_s16)(%s));\n", value, src, dst); break;
case sz_long: printf ("\toptflag_addl (%s, (uae_s32)(%s), (uae_s32)(%s));\n", value, src, dst); break;
case sz_byte: printf ("\toptflag_addb (%s, (uae_s8)(%s), (uae_s8)(%s));\n", value, src, dst); break;
case sz_word: printf ("\toptflag_addw (%s, (uae_s16)(%s), (uae_s16)(%s));\n", value, src, dst); break;
case sz_long: printf ("\toptflag_addl (%s, (uae_s32)(%s), (uae_s32)(%s));\n", value, src, dst); break;
}
return;
......@@ -3797,9 +3797,9 @@ int main (int argc, char **argv)
do_merges ();
opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
counts = (unsigned long *) xmalloc (sizeof (unsigned long) * 65536);
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
counts = (unsigned long *) xmalloc (sizeof (unsigned long) * 65536);
read_counts ();
/* It would be a lot nicer to put all in one file (we'd also get rid of
......@@ -3837,17 +3837,17 @@ int main (int argc, char **argv)
using_mmu = 0;
cpu_level = 5 - i;
if (i == 11 || i == 12) {
cpu_level = 0;
using_prefetch = 1;
using_exception_3 = 1;
cpu_level = 0;
using_prefetch = 1;
using_exception_3 = 1;
if (i == 12)
using_ce = 1;
for (rp = 0; rp < nr_cpuop_funcs; rp++)
for (rp = 0; rp < nr_cpuop_funcs; rp++)
opcode_next_clev[rp] = 0;
} else if (i == 20) {
cpu_level = 2;
using_ce020 = 1;
read_counts ();
read_counts ();
for (rp = 0; rp < nr_cpuop_funcs; rp++)
opcode_next_clev[rp] = cpu_level;
} else if (i == 21 || i == 22 || i == 23) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
extern void cd32_fmv_init (uaecptr);
extern void cd32_fmv_init (uaecptr);
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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