puae 2.3.0

parent 0493cab3
# P-UAE
#
# 2010 Mustafa TUFAN (aka GnoStiC/BRONX)
#
# this is the main script to build (and test) PUAE
#
base=" --with-sdl --with-sdl-gl --with-sdl-gfx --with-sdl-sound --enable-drvsnd "
cd32=" --enable-cd32 "
a600=" --enable-gayle "
scsi=" --enable-scsi-device --enable-ncr --enable-a2091 "
other=" --with-caps --enable-amax "
#
#
./bootstrap.sh ./bootstrap.sh
./configure --with-sdl --with-sdl-gl --with-sdl-gfx --with-sdl-sound --with-caps --with-gayle --enable-drvsnd --enable-amax --enable-cd32 --enable-scsi-device ./configure $base $cd32 $a600 $scsi $other
make clean make clean
make make
./bootstrap.sh
./configure --with-sdl --with-sdl-gl --with-sdl-gfx --with-sdl-sound --with-caps --with-gayle --enable-drvsnd --enable-amax --enable-cd32 --enable-scsi-device --disable-jit
make clean
make
# P-UAE
#
# 2010 Mustafa TUFAN
#
# this script cleans up various files so that we don't push unnecessary files to git..
#
make clean make clean
rm -rf ./df0.adz rm -rf ./df0.adz
rm -rf ./kick.rom rm -rf ./kick.rom
rm -rf ./config.log
rm -rf ./config.status
rm -rf ./configure
rm -rf ./aclocal.m4 rm -rf ./aclocal.m4
rm -rf ./src/gfxdep rm -rf ./src/gfxdep
...@@ -22,3 +26,8 @@ rm -rf `find . -type f -name Makefile` ...@@ -22,3 +26,8 @@ rm -rf `find . -type f -name Makefile`
rm -rf `find . -type f -name *~` rm -rf `find . -type f -name *~`
rm -rf `find . -type f -name *.o` rm -rf `find . -type f -name *.o`
rm -rf `find . -type f -name *.a` rm -rf `find . -type f -name *.a`
rm -rf `find . -type f -name configure`
rm -rf `find . -type f -name config.log`
rm -rf `find . -type f -name config.status`
rm -rf `find . -type f -name sysconfig.h`
...@@ -107,11 +107,11 @@ noinst_HEADERS = \ ...@@ -107,11 +107,11 @@ noinst_HEADERS = \
include/osemu.h include/picasso96.h \ include/osemu.h include/picasso96.h \
include/readcpu.h include/savestate.h \ include/readcpu.h include/savestate.h \
include/scsidev.h include/serial.h \ include/scsidev.h include/serial.h \
include/sinctable.h \ include/sinctable.h include/sana2.h \
include/sleep.h include/sysdeps.h \ include/sleep.h include/sysdeps.h \
include/traps.h \ include/traps.h \
include/tui.h include/uae.h \ include/tui.h include/uae.h \
include/uaeexe.h \ include/uaeexe.h include/uaenet.h \
include/uae_endian.h \ include/uae_endian.h \
include/uae_malloc.h \ include/uae_malloc.h \
include/uae_string.h \ include/uae_string.h \
...@@ -136,7 +136,7 @@ uae_SOURCES = \ ...@@ -136,7 +136,7 @@ uae_SOURCES = \
diskutil.c zfile.c zfile_archive.c cfgfile.c picasso96.c inputdevice.c \ diskutil.c zfile.c zfile_archive.c cfgfile.c picasso96.c inputdevice.c \
gfxutil.c audio.c sinctable.c drawing.c consolehook.c \ gfxutil.c audio.c sinctable.c drawing.c consolehook.c \
native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \ native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \
uaeexe.c uaelib.c uaeresource.c fdi2raw.c hotkeys.c amax.c \ uaeexe.c uaelib.c uaeresource.c uaeserial.c fdi2raw.c hotkeys.c amax.c \
ar.c driveclick.c enforcer.c misc.c a2065.c gayle.c ncr_scsi.c \ ar.c driveclick.c enforcer.c misc.c a2065.c gayle.c ncr_scsi.c \
missing.c readcpu.c missing.c readcpu.c
......
...@@ -85,11 +85,11 @@ am_uae_OBJECTS = main.$(OBJEXT) newcpu.$(OBJEXT) memory.$(OBJEXT) \ ...@@ -85,11 +85,11 @@ am_uae_OBJECTS = main.$(OBJEXT) newcpu.$(OBJEXT) memory.$(OBJEXT) \
consolehook.$(OBJEXT) native2amiga.$(OBJEXT) disk.$(OBJEXT) \ consolehook.$(OBJEXT) native2amiga.$(OBJEXT) disk.$(OBJEXT) \
crc32.$(OBJEXT) savestate.$(OBJEXT) arcadia.$(OBJEXT) \ crc32.$(OBJEXT) savestate.$(OBJEXT) arcadia.$(OBJEXT) \
cdtv.$(OBJEXT) cd32_fmv.$(OBJEXT) uaeexe.$(OBJEXT) \ cdtv.$(OBJEXT) cd32_fmv.$(OBJEXT) uaeexe.$(OBJEXT) \
uaelib.$(OBJEXT) uaeresource.$(OBJEXT) fdi2raw.$(OBJEXT) \ uaelib.$(OBJEXT) uaeresource.$(OBJEXT) uaeserial.$(OBJEXT) \
hotkeys.$(OBJEXT) amax.$(OBJEXT) ar.$(OBJEXT) \ fdi2raw.$(OBJEXT) hotkeys.$(OBJEXT) amax.$(OBJEXT) \
driveclick.$(OBJEXT) enforcer.$(OBJEXT) misc.$(OBJEXT) \ ar.$(OBJEXT) driveclick.$(OBJEXT) enforcer.$(OBJEXT) \
a2065.$(OBJEXT) gayle.$(OBJEXT) ncr_scsi.$(OBJEXT) \ misc.$(OBJEXT) a2065.$(OBJEXT) gayle.$(OBJEXT) \
missing.$(OBJEXT) readcpu.$(OBJEXT) ncr_scsi.$(OBJEXT) missing.$(OBJEXT) readcpu.$(OBJEXT)
uae_OBJECTS = $(am_uae_OBJECTS) uae_OBJECTS = $(am_uae_OBJECTS)
SCRIPTS = $(dist_noinst_SCRIPTS) SCRIPTS = $(dist_noinst_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@ DEFAULT_INCLUDES = -I.@am__isrc@
...@@ -386,11 +386,11 @@ noinst_HEADERS = \ ...@@ -386,11 +386,11 @@ noinst_HEADERS = \
include/osemu.h include/picasso96.h \ include/osemu.h include/picasso96.h \
include/readcpu.h include/savestate.h \ include/readcpu.h include/savestate.h \
include/scsidev.h include/serial.h \ include/scsidev.h include/serial.h \
include/sinctable.h \ include/sinctable.h include/sana2.h \
include/sleep.h include/sysdeps.h \ include/sleep.h include/sysdeps.h \
include/traps.h \ include/traps.h \
include/tui.h include/uae.h \ include/tui.h include/uae.h \
include/uaeexe.h \ include/uaeexe.h include/uaenet.h \
include/uae_endian.h \ include/uae_endian.h \
include/uae_malloc.h \ include/uae_malloc.h \
include/uae_string.h \ include/uae_string.h \
...@@ -415,7 +415,7 @@ uae_SOURCES = \ ...@@ -415,7 +415,7 @@ uae_SOURCES = \
diskutil.c zfile.c zfile_archive.c cfgfile.c picasso96.c inputdevice.c \ diskutil.c zfile.c zfile_archive.c cfgfile.c picasso96.c inputdevice.c \
gfxutil.c audio.c sinctable.c drawing.c consolehook.c \ gfxutil.c audio.c sinctable.c drawing.c consolehook.c \
native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \ native2amiga.c disk.c crc32.c savestate.c arcadia.c cdtv.c cd32_fmv.c \
uaeexe.c uaelib.c uaeresource.c fdi2raw.c hotkeys.c amax.c \ uaeexe.c uaelib.c uaeresource.c uaeserial.c fdi2raw.c hotkeys.c amax.c \
ar.c driveclick.c enforcer.c misc.c a2065.c gayle.c ncr_scsi.c \ ar.c driveclick.c enforcer.c misc.c a2065.c gayle.c ncr_scsi.c \
missing.c readcpu.c missing.c readcpu.c
...@@ -658,6 +658,7 @@ distclean-compile: ...@@ -658,6 +658,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaeexe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaeexe.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaelib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaelib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaeresource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaeresource.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uaeserial.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writelog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writelog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfile_archive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfile_archive.Po@am__quote@
......
...@@ -692,7 +692,7 @@ static int sys_cddev_open (void) ...@@ -692,7 +692,7 @@ static int sys_cddev_open (void)
struct device_info di; struct device_info di;
unitnum = get_standard_cd_unit (CD_STANDARD_UNIT_CD32); unitnum = get_standard_cd_unit (CD_STANDARD_UNIT_CD32);
sys_command_info (unitnum, &di, 0); sys_command_info (unitnum, &di, 0);
write_log ("using drive %s (unit %d, media %d)\n", di.label, unitnum, di.media_inserted); write_log ("AKIKO: using drive %s (unit %d, media %d)\n", di.label, unitnum, di.media_inserted);
/* make sure CD audio is not playing */ /* make sure CD audio is not playing */
cdaudiostop_do (); cdaudiostop_do ();
return 0; return 0;
...@@ -706,7 +706,6 @@ static void sys_cddev_close (void) ...@@ -706,7 +706,6 @@ static void sys_cddev_close (void)
sys_command_close (unitnum); sys_command_close (unitnum);
} }
unitnum = -1; unitnum = -1;
} }
static int command_lengths[] = { 1,2,1,1,12,2,1,1,4,1,-1,-1,-1,-1,-1,-1 }; static int command_lengths[] = { 1,2,1,1,12,2,1,1,4,1,-1,-1,-1,-1,-1,-1 };
......
...@@ -295,7 +295,6 @@ float sample_evtime, scaled_sample_evtime; ...@@ -295,7 +295,6 @@ float sample_evtime, scaled_sample_evtime;
static unsigned long last_cycles; static unsigned long last_cycles;
static float next_sample_evtime; static float next_sample_evtime;
unsigned int obtainedfreq; unsigned int obtainedfreq;
typedef uae_s8 sample8_t; typedef uae_s8 sample8_t;
...@@ -1044,7 +1043,6 @@ static void zerostate (int nr) ...@@ -1044,7 +1043,6 @@ static void zerostate (int nr)
cdp->state = 0; cdp->state = 0;
cdp->evtime = MAX_EV; cdp->evtime = MAX_EV;
cdp->intreq2 = 0; cdp->intreq2 = 0;
cdp->dsr = cdp->dr = false;
cdp->dmaenstore = false; cdp->dmaenstore = false;
#ifdef TEST_AUDIO #ifdef TEST_AUDIO
cdp->have_dat = false; cdp->have_dat = false;
...@@ -1345,6 +1343,10 @@ static void audio_state_channel2 (int nr, bool perfin) ...@@ -1345,6 +1343,10 @@ static void audio_state_channel2 (int nr, bool perfin)
break; break;
case 1: case 1:
cdp->evtime = MAX_EV; cdp->evtime = MAX_EV;
if (!chan_ena) {
zerostate (nr);
return;
}
if (!cdp->dat_written) if (!cdp->dat_written)
return; return;
#ifdef TEST_AUDIO #ifdef TEST_AUDIO
...@@ -1361,6 +1363,10 @@ static void audio_state_channel2 (int nr, bool perfin) ...@@ -1361,6 +1363,10 @@ static void audio_state_channel2 (int nr, bool perfin)
break; break;
case 5: case 5:
cdp->evtime = MAX_EV; cdp->evtime = MAX_EV;
if (!chan_ena) {
zerostate (nr);
return;
}
if (!cdp->dat_written) if (!cdp->dat_written)
return; return;
#ifdef DEBUG_AUDIO #ifdef DEBUG_AUDIO
......
...@@ -1323,17 +1323,6 @@ static void do_blitter2 (int hpos, int copper) ...@@ -1323,17 +1323,6 @@ static void do_blitter2 (int hpos, int copper)
if (dmaen (DMA_BLITPRI)) if (dmaen (DMA_BLITPRI))
set_special (SPCFLAG_BLTNASTY); set_special (SPCFLAG_BLTNASTY);
#if 0
if (M68K_GETPC >= 0x00070554 && M68K_GETPC <= 0x000706B0) {
blitter_done ();
return;
}
if (M68K_GETPC >= 0x00070838) {
blitter_done ();
return;
}
#endif
if (dmaen (DMA_BLITTER)) if (dmaen (DMA_BLITTER))
bltstate = BLT_work; bltstate = BLT_work;
......
...@@ -381,49 +381,20 @@ static void *cdda_play_func (void *v) ...@@ -381,49 +381,20 @@ static void *cdda_play_func (void *v)
int num_sectors = CDDA_BUFFERS; int num_sectors = CDDA_BUFFERS;
int quit = 0; int quit = 0;
int bufnum; int bufnum;
int buffered;
uae_u8 *px[2], *p;
int bufon[2]; int bufon[2];
int i;
WAVEHDR whdr[2];
MMRESULT mmr;
int volume[2], volume_main;
int oldplay; int oldplay;
int idleframes; int idleframes;
bool foundsub; bool foundsub;
struct cdunit *cdu = (struct cdunit*)v; struct cdunit *cdu = (struct cdunit*)v;
for (i = 0; i < 2; i++) {
memset (&whdr[i], 0, sizeof (WAVEHDR));
whdr[i].dwFlags = WHDR_DONE;
}
while (cdu->cdda_play == 0) while (cdu->cdda_play == 0)
Sleep (10); Sleep (10);
oldplay = -1; oldplay = -1;
p = xmalloc (uae_u8, 2 * num_sectors * 4096);
px[0] = p;
px[1] = p + num_sectors * 4096;
bufon[0] = bufon[1] = 0; bufon[0] = bufon[1] = 0;
bufnum = 0; bufnum = 0;
buffered = 0;
volume[0] = volume[1] = -1; cda_audio *cda = new cda_audio (num_sectors);
volume_main = -1;
if (cdda_openwav ()) {
for (i = 0; i < 2; i++) {
memset (&whdr[i], 0, sizeof (WAVEHDR));
whdr[i].dwBufferLength = 2352 * num_sectors;
whdr[i].lpData = (LPSTR)px[i];
mmr = waveOutPrepareHeader (cdda_wavehandle, &whdr[i], sizeof (WAVEHDR));
if (mmr != MMSYSERR_NOERROR) {
write_log ("IMAGE CDDA: waveOutPrepareHeader %d:%d\n", i, mmr);
goto end;
}
whdr[i].dwFlags |= WHDR_DONE;
}
while (cdu->cdda_play > 0) { while (cdu->cdda_play > 0) {
...@@ -497,12 +468,10 @@ static void *cdda_play_func (void *v) ...@@ -497,12 +468,10 @@ static void *cdda_play_func (void *v)
setstate (cdu, AUDIO_STATUS_IN_PROGRESS); setstate (cdu, AUDIO_STATUS_IN_PROGRESS);
} }
while (!(whdr[bufnum].dwFlags & WHDR_DONE)) { cda->wait(bufnum);
Sleep (10); bufon[bufnum] = 0;
if (!cdu->cdda_play) if (!cdu->cdda_play)
goto end; goto end;
}
bufon[bufnum] = 0;
if (idleframes <= 0 && !isaudiotrack (&cdu->di.toc, cdda_pos)) { if (idleframes <= 0 && !isaudiotrack (&cdu->di.toc, cdda_pos)) {
setstate (cdu, AUDIO_STATUS_PLAY_ERROR); setstate (cdu, AUDIO_STATUS_PLAY_ERROR);
...@@ -516,10 +485,10 @@ static void *cdda_play_func (void *v) ...@@ -516,10 +485,10 @@ static void *cdda_play_func (void *v)
gui_flicker_led (LED_CD, cdu->di.unitnum - 1, LED_CD_AUDIO); gui_flicker_led (LED_CD, cdu->di.unitnum - 1, LED_CD_AUDIO);
memset (px[bufnum], 0, num_sectors * 2352); memset (cda->buffers[bufnum], 0, num_sectors * 2352);
for (cnt = 0; cnt < num_sectors; cnt++) { for (cnt = 0; cnt < num_sectors; cnt++) {
uae_u8 *dst = px[bufnum] + cnt * 2352; uae_u8 *dst = cda->buffers[bufnum] + cnt * 2352;
uae_u8 subbuf[SUB_CHANNEL_SIZE]; uae_u8 subbuf[SUB_CHANNEL_SIZE];
sector = cdda_pos; sector = cdda_pos;
...@@ -569,27 +538,11 @@ static void *cdda_play_func (void *v) ...@@ -569,27 +538,11 @@ static void *cdda_play_func (void *v)
if (idleframes <= 0) if (idleframes <= 0)
cdu->cd_last_pos = cdda_pos; cdu->cd_last_pos = cdda_pos;
volume_main = currprefs.sound_volume;
int vol_mult[2];
for (int j = 0; j < 2; j++) {
volume[j] = cdu->cdda_volume[j];
vol_mult[j] = (100 - volume_main) * volume[j] / 100;
if (vol_mult[j])
vol_mult[j]++;
if (vol_mult[j] >= 32768)
vol_mult[j] = 32768;
}
uae_s16 *p = (uae_s16*)(px[bufnum]);
for (i = 0; i < num_sectors * 2352 / 4; i++) {
p[i * 2 + 0] = p[i * 2 + 0] * vol_mult[0] / 32768;
p[i * 2 + 1] = p[i * 2 + 1] * vol_mult[1] / 32768;
}
bufon[bufnum] = 1; bufon[bufnum] = 1;
mmr = waveOutWrite (cdda_wavehandle, &whdr[bufnum], sizeof (WAVEHDR)); cda->setvolume (currprefs.sound_volume, cdu->cdda_volume[0], cdu->cdda_volume[1]);
if (mmr != MMSYSERR_NOERROR) { if (!cda->play (bufnum)) {
write_log ("IMAGE CDDA: waveOutWrite %d\n", mmr); setstate (cdu, AUDIO_STATUS_PLAY_ERROR);
break; goto end;
} }
if (dofinish) { if (dofinish) {
...@@ -600,30 +553,23 @@ static void *cdda_play_func (void *v) ...@@ -600,30 +553,23 @@ static void *cdda_play_func (void *v)
} }
if (bufon[0] == 0 && bufon[1] == 0) { if (bufon[0] == 0 && bufon[1] == 0) {
while (!(whdr[0].dwFlags & WHDR_DONE) || !(whdr[1].dwFlags & WHDR_DONE))
Sleep (10);
while (cdu->cdda_paused && cdu->cdda_play > 0) while (cdu->cdda_paused && cdu->cdda_play > 0)
Sleep (10); Sleep (10);
} }
bufnum = 1 - bufnum; bufnum = 1 - bufnum;
}
} }
end: end:
while (!(whdr[0].dwFlags & WHDR_DONE) || !(whdr[1].dwFlags & WHDR_DONE)) cda->wait (0);
Sleep (10); cda->wait (1);
for (i = 0; i < 2; i++)
waveOutUnprepareHeader (cdda_wavehandle, &whdr[i], sizeof (WAVEHDR));
while (cdimage_unpack_active == 1) while (cdimage_unpack_active == 1)
Sleep (10); Sleep (10);
cdda_closewav (); delete cda;
xfree (p);
cdu->cdda_play = 0; cdu->cdda_play = 0;
write_log ("IMAGE CDDA: thread killed\n"); write_log ("IMAGE CDDA: thread killed\n");
return NULL; return NULL;
......
...@@ -1516,7 +1516,7 @@ static void open_unit (void) ...@@ -1516,7 +1516,7 @@ static void open_unit (void)
struct device_info di; struct device_info di;
unitnum = get_standard_cd_unit (CD_STANDARD_UNIT_CDTV); unitnum = get_standard_cd_unit (CD_STANDARD_UNIT_CDTV);
sys_command_info (unitnum, &di, 0); sys_command_info (unitnum, &di, 0);
write_log ("using drive %s (unit %d, media %d)\n", di.label, unitnum, di.media_inserted); write_log ("CDTV: using drive %s (unit %d, media %d)\n", di.label, unitnum, di.media_inserted);
} }
static void close_unit (void) static void close_unit (void)
{ {
......
...@@ -1997,6 +1997,8 @@ int EvalException (LPEXCEPTION_POINTERS blah, int n_except) ...@@ -1997,6 +1997,8 @@ int EvalException (LPEXCEPTION_POINTERS blah, int n_except)
#if defined(__APPLE__) && __DARWIN_UNIX03 #if defined(__APPLE__) && __DARWIN_UNIX03
#define CONTEXT_MEMBER(x) __##x #define CONTEXT_MEMBER(x) __##x
#elif defined(__FreeBSD__)
#define CONTEXT_MEMBER(x) sc_##x
#else #else
#define CONTEXT_MEMBER(x) x #define CONTEXT_MEMBER(x) x
#endif #endif
...@@ -2021,6 +2023,9 @@ static void vec(int x, struct sigcontext sc) ...@@ -2021,6 +2023,9 @@ static void vec(int x, struct sigcontext sc)
write_log ("Caught illegal access to (unknown) at eip=%08x\n", i); write_log ("Caught illegal access to (unknown) at eip=%08x\n", i);
} }
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
#elif defined(__FreeBSD__)
//uae_u32 addr=sc.cr2;
uae_u32 addr=sc.CONTEXT_MEMBER(spare2); // UJ: @@@@: ????:
#else #else
uae_u32 addr=sc.cr2; uae_u32 addr=sc.cr2;
#endif #endif
......
This diff is collapsed.
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "autoconf.h" #include "autoconf.h"
#include "traps.h" #include "traps.h"
#include "gui.h" #include "gui.h"
#include "gfxdep/gfx.h"
#include "picasso96.h" #include "picasso96.h"
#include "drawing.h" #include "drawing.h"
#include "savestate.h" #include "savestate.h"
...@@ -1930,15 +1929,26 @@ static void record_color_change (int hpos, int regno, unsigned long value) ...@@ -1930,15 +1929,26 @@ static void record_color_change (int hpos, int regno, unsigned long value)
if (regno < 0x1000 && hpos < HBLANK_OFFSET && !(beamcon0 & 0x80) && prev_lineno >= 0) { if (regno < 0x1000 && hpos < HBLANK_OFFSET && !(beamcon0 & 0x80) && prev_lineno >= 0) {
struct draw_info *pdip = curr_drawinfo + prev_lineno; struct draw_info *pdip = curr_drawinfo + prev_lineno;
int idx = pdip->last_color_change; int idx = pdip->last_color_change;
bool lastsync = false;
/* Move color changes in horizontal cycles 0 to HBLANK_OFFSET to end of previous line. /* Move color changes in horizontal cycles 0 to HBLANK_OFFSET to end of previous line.
* Cycles 0 to HBLANK_OFFSET are visible in right border on real Amigas. (because of late hsync) * Cycles 0 to HBLANK_OFFSET are visible in right border on real Amigas. (because of late hsync)
*/ */
if (curr_color_changes[idx - 1].regno == 0xffff) {
idx--;
lastsync = true;
}
pdip->last_color_change++; pdip->last_color_change++;
pdip->nr_color_changes++; pdip->nr_color_changes++;
curr_color_changes[idx].linepos = (hpos + maxhpos) * 2; curr_color_changes[idx].linepos = (hpos + maxhpos) * 2;
curr_color_changes[idx].regno = regno; curr_color_changes[idx].regno = regno;
curr_color_changes[idx].value = value; curr_color_changes[idx].value = value;
curr_color_changes[idx + 1].regno = -1; if (lastsync) {
curr_color_changes[idx + 1].linepos = hsyncstartpos * 2;
curr_color_changes[idx + 1].regno = 0xffff;
curr_color_changes[idx + 2].regno = -1;
} else {
curr_color_changes[idx + 1].regno = -1;
}
} }
record_color_change2 (hpos, regno, value); record_color_change2 (hpos, regno, value);
...@@ -3467,10 +3477,6 @@ static void INTENA (uae_u16 v) ...@@ -3467,10 +3477,6 @@ static void INTENA (uae_u16 v)
if (v & 0x8000) if (v & 0x8000)
doint (); doint ();
} }
#if 0
if (v & 0x40)
write_log ("INTENA %04X (%04X) %p\n", intena, v, M68K_GETPC);
#endif
} }
void INTREQ_f (uae_u16 v) void INTREQ_f (uae_u16 v)
...@@ -5212,21 +5218,6 @@ static void copper_check (int n) ...@@ -5212,21 +5218,6 @@ static void copper_check (int n)
static void CIA_vsync_prehandler (int dotod) static void CIA_vsync_prehandler (int dotod)
{ {
CIA_vsync_handler (dotod); CIA_vsync_handler (dotod);
#if 0
if (input_recording > 0) {
inprec_rstart(INPREC_CIAVSYNC);
inprec_ru32(ciavsync_counter);
inprec_rend();
} else if (input_recording < 0) {
uae_u32 v = -1;
while (inprec_pstart(INPREC_CIAVSYNC)) {
v = inprec_pu32();
inprec_pend();
}
if (v != ciavsync_counter)
write_log ("INPREC: ciavsync sync error %d <> %d\n", v, ciavsync_counter);
}
#endif
ciavsync_counter++; ciavsync_counter++;
} }
...@@ -5319,6 +5310,9 @@ static uae_u16 dmal, dmal_hpos; ...@@ -5319,6 +5310,9 @@ static uae_u16 dmal, dmal_hpos;
static void dmal_emu (uae_u32 v) static void dmal_emu (uae_u32 v)
{ {
// Disk and Audio DMA bits are ignored by Agnus, Agnus only checks DMAL and master bit
if (!(dmacon & 0x200))
return;
int hpos = current_hpos (); int hpos = current_hpos ();
if (v >= 6) { if (v >= 6) {
v -= 6; v -= 6;
...@@ -5516,21 +5510,6 @@ static void hsync_handler (void) ...@@ -5516,21 +5510,6 @@ static void hsync_handler (void)
vpos = 0; vpos = 0;
vsync_handler (); vsync_handler ();
vpos_count = 0; vpos_count = 0;
#if 0
if (input_recording > 0) {
inprec_rstart (INPREC_VSYNC);
inprec_ru32 (vsync_counter);
inprec_rend ();
} else if (input_recording < 0) {
uae_u32 v = -1;
while (inprec_pstart(INPREC_VSYNC)) {
v = inprec_pu32();
inprec_pend();
}
if (v != vsync_counter)
write_log ("INPREC: vsync sync error %d <> %d\n", v, vsync_counter);
}
#endif
vsync_counter++; vsync_counter++;
if (currprefs.cs_ciaatod == 0) if (currprefs.cs_ciaatod == 0)
CIA_vsync_prehandler (!(bplcon0 & 2) || ((bplcon0 & 2) && currprefs.genlock)); CIA_vsync_prehandler (!(bplcon0 & 2) || ((bplcon0 & 2) && currprefs.genlock));
...@@ -5625,6 +5604,16 @@ static void hsync_handler (void) ...@@ -5625,6 +5604,16 @@ static void hsync_handler (void)
INTREQ (0x8000 | 0x0008); INTREQ (0x8000 | 0x0008);
} }
#ifdef UAENET
{
extern int volatile uaenet_int_requested;
extern int volatile uaenet_vsync_requested;
if (uaenet_int_requested || (uaenet_vsync_requested && vpos == 10)) {
INTREQ (0x8000 | 0x2000);
}
}
#endif
{ {
extern void bsdsock_fake_int_handler (void); extern void bsdsock_fake_int_handler (void);
extern int volatile bsd_int_requested; extern int volatile bsd_int_requested;
...@@ -5710,19 +5699,6 @@ static void hsync_handler (void) ...@@ -5710,19 +5699,6 @@ static void hsync_handler (void)
if (diw_change > 0) if (diw_change > 0)
diw_change--; diw_change--;
#if 0
{
static int skip;
if (M68K_GETPC >= 0x0C0D7A2 && M68K_GETPC < 0x00C0D7B2 && vpos == 0xf3) {
if (!skip)
activate_debugger ();
skip = 1;
}
if (vpos != 0xf3)
skip = 0;
}
#endif
} }
void event2_remevent (int no) void event2_remevent (int no)
...@@ -5948,7 +5924,7 @@ void customreset (int hardreset) ...@@ -5948,7 +5924,7 @@ void customreset (int hardreset)
if (hardreset) if (hardreset)
rtc_hardreset(); rtc_hardreset();
//picasso_reset (); picasso_reset ();
} }
void dumpcustom (void) void dumpcustom (void)
......
...@@ -2307,6 +2307,8 @@ clipsignal ...@@ -2307,6 +2307,8 @@ clipsignal
moveq #12,d1 moveq #12,d1
bsr.w getrtbase bsr.w getrtbase
jsr (a0) jsr (a0)
tst.l d0
beq.s .nowrite
; and now we should have the data in CLIP_WRITE_ALLOC ; and now we should have the data in CLIP_WRITE_ALLOC
tst.l CLIP_WRITE_ALLOC(a5) tst.l CLIP_WRITE_ALLOC(a5)
beq.s .nowrite beq.s .nowrite
......
This diff is collapsed.
...@@ -2125,30 +2125,27 @@ static void gen_opcode (unsigned long int opcode) ...@@ -2125,30 +2125,27 @@ static void gen_opcode (unsigned long int opcode)
printf ("\t\tuae_s16 sr = %s (a);\n", srcw); printf ("\t\tuae_s16 sr = %s (a);\n", srcw);
printf ("\t\tuae_s32 pc = %s (a + 2);\n", srcl); printf ("\t\tuae_s32 pc = %s (a + 2);\n", srcl);
printf ("\t\tuae_s16 format = %s (a + 2 + 4);\n", srcw); printf ("\t\tuae_s16 format = %s (a + 2 + 4);\n", srcw);
printf ("\t\tint frame = format >> 12;\n");
printf ("\t\tint offset = 8;\n"); printf ("\t\tint offset = 8;\n");
#if 0
genamode (Aipi, "7", sz_word, "sr", 1, 0, 0);
genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
genamode (Aipi, "7", sz_word, "format", 1, 0, 0);
#endif
printf ("\t\tnewsr = sr; newpc = pc;\n"); printf ("\t\tnewsr = sr; newpc = pc;\n");
printf ("\t\tif ((format & 0xF000) == 0x0000) { m68k_areg (regs, 7) += offset; break; }\n"); printf ("\t\tif (frame == 0x0) { m68k_areg (regs, 7) += offset; break; }\n");
printf ("\t\telse if ((format & 0xF000) == 0x1000) { m68k_areg (regs, 7) += offset; }\n"); printf ("\t\telse if (frame == 0x1) { m68k_areg (regs, 7) += offset; }\n");
printf ("\t\telse if ((format & 0xF000) == 0x2000) { m68k_areg (regs, 7) += offset + 4; break; }\n"); printf ("\t\telse if (frame == 0x2) { m68k_areg (regs, 7) += offset + 4; break; }\n");
printf ("\t\telse if ((format & 0xF000) == 0x4000) { m68k_areg (regs, 7) += offset + 8; break; }\n"); printf ("\t\telse if (frame == 0x4) { m68k_areg (regs, 7) += offset + 8; break; }\n");
printf ("\t\telse if ((format & 0xF000) == 0x8000) { m68k_areg (regs, 7) += offset + 50; break; }\n");
if (using_mmu) if (using_mmu)
printf ("\t\telse if ((format & 0xF000) == 0x7000) { m68k_do_rte_mmu (a); m68k_areg (regs, 7) += offset + 52; break; }\n"); printf ("\t\telse if (frame == 0x7) { m68k_do_rte_mmu (a); m68k_areg (regs, 7) += offset + 52; break; }\n");
printf ("\t\telse if ((format & 0xF000) == 0x9000) { m68k_areg (regs, 7) += offset + 12; break; }\n"); printf ("\t\telse if (frame == 0x8) { m68k_areg (regs, 7) += offset + 50; break; }\n");
printf ("\t\telse if ((format & 0xF000) == 0xa000) { m68k_areg (regs, 7) += offset + 24; break; }\n"); printf ("\t\telse if (frame == 0x9) { m68k_areg (regs, 7) += offset + 12; break; }\n");
printf ("\t\telse if ((format & 0xF000) == 0xb000) { m68k_areg (regs, 7) += offset + 84; break; }\n"); printf ("\t\telse if (frame == 0xa) { m68k_areg (regs, 7) += offset + 24; break; }\n");
printf ("\t\telse if (frame == 0xb) { m68k_areg (regs, 7) += offset + 84; break; }\n");
printf ("\t\telse { m68k_areg (regs, 7) += offset; Exception (14, 0); goto %s; }\n", endlabelstr); printf ("\t\telse { m68k_areg (regs, 7) += offset; Exception (14, 0); goto %s; }\n", endlabelstr);
printf ("\t\tregs.sr = newsr; MakeFromSR ();\n}\n"); printf ("\t\tregs.sr = newsr; MakeFromSR ();\n}\n");
pop_braces (old_brace_level); pop_braces (old_brace_level);
printf ("\tregs.sr = newsr; MakeFromSR ();\n"); printf ("\tregs.sr = newsr; MakeFromSR ();\n");
printf ("\tif (newpc & 1)\n"); printf ("\tif (newpc & 1) {\n");
printf ("\t\texception3 (0x%04X, m68k_getpc (), newpc);\n", opcode); printf ("\t\texception3i (0x%04X, m68k_getpc (), newpc);\n", opcode);
printf ("\telse\n"); printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
printf ("\t\tm68k_setpc (newpc);\n"); printf ("\t\tm68k_setpc (newpc);\n");
printf ("\tipl_fetch ();\n"); printf ("\tipl_fetch ();\n");
need_endlabel = 1; need_endlabel = 1;
...@@ -2162,19 +2159,24 @@ static void gen_opcode (unsigned long int opcode) ...@@ -2162,19 +2159,24 @@ static void gen_opcode (unsigned long int opcode)
genamode (curi->smode, "srcreg", curi->size, "offs", GENA_GETV_FETCH, GENA_MOVEM_DO_INC, 0); genamode (curi->smode, "srcreg", curi->size, "offs", GENA_GETV_FETCH, GENA_MOVEM_DO_INC, 0);
genamode (Aipi, "7", sz_long, "pc", GENA_GETV_FETCH, GENA_MOVEM_DO_INC, 0); genamode (Aipi, "7", sz_long, "pc", GENA_GETV_FETCH, GENA_MOVEM_DO_INC, 0);
printf ("\tm68k_areg(regs, 7) += offs;\n"); printf ("\tm68k_areg(regs, 7) += offs;\n");
setpc ("pc");
} else { } else {
genamode (Aipi, "7", sz_long, "pc", 1, 0, 0); genamode (Aipi, "7", sz_long, "pc", 1, 0, 0);
genamode (curi->smode, "srcreg", curi->size, "offs", 1, 0, 0); genamode (curi->smode, "srcreg", curi->size, "offs", 1, 0, 0);
printf ("\tm68k_areg (regs, 7) += offs;\n"); printf ("\tm68k_areg (regs, 7) += offs;\n");
printf ("\tif (pc & 1)\n"); printf ("\tif (pc & 1) {\n");
printf ("\t\texception3 (0x%04X, m68k_getpc (), pc);\n", opcode); printf ("\t\texception3i (0x%04X, m68k_getpc (), pc);\n", opcode);
printf ("\telse\n"); printf ("\t\tgoto %s;\n", endlabelstr);
setpc ("pc"); printf ("\t}\n");
} }
printf ("\tif (pc & 1) {\n");
printf ("\t\texception3i (0x%04X, m68k_getpc(), pc);\n", opcode);
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
setpc ("pc");
/* PC is set and prefetch filled. */ /* PC is set and prefetch filled. */
m68k_pc_offset = 0; m68k_pc_offset = 0;
fill_prefetch_full (); fill_prefetch_full ();
need_endlabel = 1;
break; break;
case i_LINK: case i_LINK:
// ce confirmed // ce confirmed
...@@ -2211,6 +2213,7 @@ static void gen_opcode (unsigned long int opcode) ...@@ -2211,6 +2213,7 @@ static void gen_opcode (unsigned long int opcode)
} }
break; break;
case i_RTS: case i_RTS:
printf ("\tuaecptr pc = m68k_getpc ();\n");
if (using_ce020 == 1) if (using_ce020 == 1)
printf ("\tm68k_do_rts_ce020 ();\n"); printf ("\tm68k_do_rts_ce020 ();\n");
else if (using_ce020 == 2) else if (using_ce020 == 2)
...@@ -2223,9 +2226,16 @@ static void gen_opcode (unsigned long int opcode) ...@@ -2223,9 +2226,16 @@ static void gen_opcode (unsigned long int opcode)
printf ("\tm68k_do_rts_mmu ();\n"); printf ("\tm68k_do_rts_mmu ();\n");
else else
printf ("\tm68k_do_rts ();\n"); printf ("\tm68k_do_rts ();\n");
printf ("\tif (m68k_getpc () & 1) {\n");
printf ("\t\tuaecptr faultpc = m68k_getpc ();\n");
printf ("\t\tm68k_setpc (pc);\n");
printf ("\t\texception3i (0x%04X, pc, faultpc);\n", opcode);
printf ("\t\tgoto %s;\n", endlabelstr);
printf ("\t}\n");
count_read += 2; count_read += 2;
m68k_pc_offset = 0; m68k_pc_offset = 0;
fill_prefetch_full (); fill_prefetch_full ();
need_endlabel = 1;
break; break;
case i_TRAPV: case i_TRAPV:
sync_m68k_pc (); sync_m68k_pc ();
......
This diff is collapsed.
extern void amiga_clipboard_want_data (void); extern int amiga_clipboard_want_data (void);
extern void amiga_clipboard_got_data (uaecptr data, uae_u32 size, uae_u32 actual); extern void amiga_clipboard_got_data (uaecptr data, uae_u32 size, uae_u32 actual);
extern void amiga_clipboard_die (void); extern void amiga_clipboard_die (void);
extern void amiga_clipboard_init (void); extern void amiga_clipboard_init (void);
extern uaecptr amiga_clipboard_proc_start (void); extern uaecptr amiga_clipboard_proc_start (void);
extern void amiga_clipboard_task_start (uaecptr); extern void amiga_clipboard_task_start (uaecptr);
extern void clipboard_disable (bool);
extern void clipboard_vsync (void); extern void clipboard_vsync (void);
\ No newline at end of file
This diff is collapsed.
...@@ -239,7 +239,8 @@ STATIC_INLINE void m68k_incpci (int o) ...@@ -239,7 +239,8 @@ STATIC_INLINE void m68k_incpci (int o)
STATIC_INLINE void m68k_do_rts (void) STATIC_INLINE void m68k_do_rts (void)
{ {
m68k_setpc (get_long (m68k_areg (regs, 7))); uae_u32 newpc = get_long (m68k_areg (regs, 7));
m68k_setpc (newpc);
m68k_areg (regs, 7) += 4; m68k_areg (regs, 7) += 4;
} }
STATIC_INLINE void m68k_do_rtsi (void) STATIC_INLINE void m68k_do_rtsi (void)
......
...@@ -195,9 +195,6 @@ struct uae_prefs { ...@@ -195,9 +195,6 @@ struct uae_prefs {
int gfx_display; int gfx_display;
TCHAR gfx_display_name[256]; TCHAR gfx_display_name[256];
int gfx_framerate, gfx_autoframerate; int gfx_framerate, gfx_autoframerate;
int gfx_width_win, gfx_height_win;
int gfx_width_fs, gfx_height_fs;
int gfx_width, gfx_height;
struct wh gfx_size_win; struct wh gfx_size_win;
struct wh gfx_size_fs; struct wh gfx_size_fs;
struct wh gfx_size; struct wh gfx_size;
......
...@@ -104,7 +104,7 @@ extern const TCHAR *uae_diskimageextensions[]; ...@@ -104,7 +104,7 @@ extern const TCHAR *uae_diskimageextensions[];
extern struct zvolume *zfile_fopen_archive (const TCHAR *filename); extern struct zvolume *zfile_fopen_archive (const TCHAR *filename);
extern struct zvolume *zfile_fopen_archive2 (const TCHAR *filename, int flags); extern struct zvolume *zfile_fopen_archive2 (const TCHAR *filename, int flags);
extern struct zvolume *zfile_fopen_archive_root (const TCHAR *filename); extern struct zvolume *zfile_fopen_archive_root (const TCHAR *filename, int flags);
extern void zfile_fclose_archive (struct zvolume *zv); extern void zfile_fclose_archive (struct zvolume *zv);
extern int zfile_fs_usage_archive (const TCHAR *path, const TCHAR *disk, struct fs_usage *fsp); extern int zfile_fs_usage_archive (const TCHAR *path, const TCHAR *disk, struct fs_usage *fsp);
extern int zfile_stat_archive (const TCHAR *path, struct _stat64 *statbuf); extern int zfile_stat_archive (const TCHAR *path, struct _stat64 *statbuf);
......
...@@ -2485,6 +2485,7 @@ void inputdevice_add_inputcode (int code, int state) ...@@ -2485,6 +2485,7 @@ void inputdevice_add_inputcode (int code, int state)
void inputdevice_do_keyboard (int code, int state) void inputdevice_do_keyboard (int code, int state)
{ {
#ifdef CDTV
if (code >= 0x72 && code <= 0x77) { // CDTV keys if (code >= 0x72 && code <= 0x77) { // CDTV keys
if (cdtv_front_panel (-1)) { if (cdtv_front_panel (-1)) {
// front panel active // front panel active
...@@ -2494,6 +2495,7 @@ void inputdevice_do_keyboard (int code, int state) ...@@ -2494,6 +2495,7 @@ void inputdevice_do_keyboard (int code, int state)
return; return;
} }
} }
#endif
if (code < 0x80) { if (code < 0x80) {
uae_u8 key = code | (state ? 0x00 : 0x80); uae_u8 key = code | (state ? 0x00 : 0x80);
keybuf[key & 0x7f] = (key & 0x80) ? 0 : 1; keybuf[key & 0x7f] = (key & 0x80) ? 0 : 1;
......
...@@ -137,23 +137,8 @@ static void fixup_prefs_dim2 (struct wh *wh) ...@@ -137,23 +137,8 @@ static void fixup_prefs_dim2 (struct wh *wh)
void fixup_prefs_dimensions (struct uae_prefs *prefs) void fixup_prefs_dimensions (struct uae_prefs *prefs)
{ {
if (prefs->gfx_width_fs < 320) fixup_prefs_dim2 (&prefs->gfx_size_fs);
prefs->gfx_width_fs = 320; fixup_prefs_dim2 (&prefs->gfx_size_win);
if (prefs->gfx_height_fs < 200)
prefs->gfx_height_fs = 200;
if (prefs->gfx_height_fs > 1280)
prefs->gfx_height_fs = 1280;
prefs->gfx_width_fs += 7;
prefs->gfx_width_fs &= ~7;
if (prefs->gfx_width_win < 320)
prefs->gfx_width_win = 320;
if (prefs->gfx_height_win < 200)
prefs->gfx_height_win = 200;
if (prefs->gfx_height_win > 1280)
prefs->gfx_height_win = 1280;
prefs->gfx_width_win += 7;
prefs->gfx_width_win &= ~7;
} }
void fixup_cpu (struct uae_prefs *p) void fixup_cpu (struct uae_prefs *p)
...@@ -661,7 +646,7 @@ void reset_all_systems (void) ...@@ -661,7 +646,7 @@ void reset_all_systems (void)
init_eventtab (); init_eventtab ();
#ifdef PICASSO96 #ifdef PICASSO96
//picasso_reset (); picasso_reset ();
#endif #endif
#ifdef SCSIEMU #ifdef SCSIEMU
scsi_reset (); scsi_reset ();
......
...@@ -972,7 +972,7 @@ void my_kbd_handler (int keyboard, int scancode, int newstate) ...@@ -972,7 +972,7 @@ void my_kbd_handler (int keyboard, int scancode, int newstate)
if (scancode_new == currprefs.win32_guikey && scancode_new != DIK_F12) if (scancode_new == currprefs.win32_guikey && scancode_new != DIK_F12)
scancode = scancode_new;*/ scancode = scancode_new;*/
write_log ("kbd = %d, scancode = %d, state = %d\n", keyboard, scancode, newstate ); // write_log ("kbd = %d, scancode = %d, state = %d\n", keyboard, scancode, newstate );
if (newstate == 0 && code == 0) { if (newstate == 0 && code == 0) {
switch (scancode) switch (scancode)
......
...@@ -421,7 +421,7 @@ static void REGPARAM2 ncr_bput (uaecptr addr, uae_u32 b) ...@@ -421,7 +421,7 @@ static void REGPARAM2 ncr_bput (uaecptr addr, uae_u32 b)
ncr_bput2 (addr, b); ncr_bput2 (addr, b);
} }
static addrbank ncr_bank = { addrbank ncr_bank = {
ncr_lget, ncr_wget, ncr_bget, ncr_lget, ncr_wget, ncr_bget,
ncr_lput, ncr_wput, ncr_bput, ncr_lput, ncr_wput, ncr_bput,
default_xlate, default_check, NULL, "A4091", default_xlate, default_check, NULL, "A4091",
......
...@@ -416,7 +416,7 @@ static void build_cpufunctbl (void) ...@@ -416,7 +416,7 @@ static void build_cpufunctbl (void)
if (currprefs.mmu_model) { if (currprefs.mmu_model) {
mmu_reset (); mmu_reset ();
mmu_set_tc (regs.tcr); mmu_set_tc (regs.tcr);
mmu_set_super (regs.s); mmu_set_super (regs.s != 0);
} }
#endif #endif
} }
...@@ -1135,7 +1135,7 @@ void REGPARAM2 MakeFromSR (void) ...@@ -1135,7 +1135,7 @@ void REGPARAM2 MakeFromSR (void)
} }
#ifdef MMU #ifdef MMU
if (currprefs.mmu_model) if (currprefs.mmu_model)
mmu_set_super (regs.s); mmu_set_super (regs.s != 0);
#endif #endif
doint (); doint ();
...@@ -1147,7 +1147,7 @@ void REGPARAM2 MakeFromSR (void) ...@@ -1147,7 +1147,7 @@ void REGPARAM2 MakeFromSR (void)
unset_special (SPCFLAG_TRACE); unset_special (SPCFLAG_TRACE);
} }
STATIC_INLINE void exception_trace (unsigned int nr) static void exception_trace (unsigned int nr)
{ {
unset_special (SPCFLAG_TRACE | SPCFLAG_DOTRACE); unset_special (SPCFLAG_TRACE | SPCFLAG_DOTRACE);
if (regs.t1 && !regs.t0) { if (regs.t1 && !regs.t0) {
...@@ -1267,7 +1267,7 @@ Interrupt cycle diagram: ...@@ -1267,7 +1267,7 @@ Interrupt cycle diagram:
*/ */
STATIC_INLINE void Exception_ce000 (int nr, uaecptr oldpc) static void Exception_ce000 (int nr, uaecptr oldpc)
{ {
uae_u32 currpc = m68k_getpc (), newpc; uae_u32 currpc = m68k_getpc (), newpc;
int sv = regs.s; int sv = regs.s;
...@@ -1486,7 +1486,7 @@ static void Exception_normal (int nr, uaecptr oldpc) ...@@ -1486,7 +1486,7 @@ static void Exception_normal (int nr, uaecptr oldpc)
regs.s = 1; regs.s = 1;
#ifdef MMU #ifdef MMU
if (currprefs.mmu_model) if (currprefs.mmu_model)
mmu_set_super (regs.s); mmu_set_super (regs.s != 0);
#endif #endif
} }
if (currprefs.cpu_model > 68000) { if (currprefs.cpu_model > 68000) {
...@@ -2179,7 +2179,7 @@ void m68k_reset (int hardreset) ...@@ -2179,7 +2179,7 @@ void m68k_reset (int hardreset)
if (currprefs.mmu_model) { if (currprefs.mmu_model) {
mmu_reset (); mmu_reset ();
mmu_set_tc (regs.tcr); mmu_set_tc (regs.tcr);
mmu_set_super (regs.s); mmu_set_super (regs.s != 0);
} }
#endif #endif
...@@ -2999,10 +2999,15 @@ retry: ...@@ -2999,10 +2999,15 @@ retry:
} }
//activate_debugger (); //activate_debugger ();
TRY (prb2) { TRY (prb2) {
Exception (2, regs.fault_pc); Exception (0, regs.fault_pc);
} CATCH (prb2) { } CATCH (prb2) {
write_log ("MMU: double bus error, rebooting..\n"); write_log ("MMU: double bus error, rebooting..\n");
regs.tcr = 0;
m68k_reset (0);
m68k_setpc (0xf80002);
mmu_reset ();
uae_reset (1); uae_reset (1);
return;
} }
goto retry; goto retry;
} }
...@@ -4351,7 +4356,7 @@ STATIC_INLINE void fill_icache030 (uae_u32 addr, int idx) ...@@ -4351,7 +4356,7 @@ STATIC_INLINE void fill_icache030 (uae_u32 addr, int idx)
STATIC_INLINE bool cancache030 (uaecptr addr) STATIC_INLINE bool cancache030 (uaecptr addr)
{ {
return ce_cachable[addr >> 16]; return ce_cachable[addr >> 16] != 0;
} }
// and finally the worst part, 68030 data cache.. // and finally the worst part, 68030 data cache..
......
...@@ -4,7 +4,7 @@ AM_CFLAGS = @UAE_CFLAGS@ ...@@ -4,7 +4,7 @@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.c memory.c support.c ami-disk.c blkdev-amiga.c libosdep_a_SOURCES = main.c memory.c support.c ami-disk.c blkdev-amiga.c parser.c
noinst_HEADERS = amiga-kludges.h memory.h hrtimer.h noinst_HEADERS = amiga-kludges.h memory.h hrtimer.h
......
...@@ -61,7 +61,8 @@ ARFLAGS = cru ...@@ -61,7 +61,8 @@ ARFLAGS = cru
libosdep_a_AR = $(AR) $(ARFLAGS) libosdep_a_AR = $(AR) $(ARFLAGS)
libosdep_a_LIBADD = libosdep_a_LIBADD =
am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \ am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \
support.$(OBJEXT) ami-disk.$(OBJEXT) blkdev-amiga.$(OBJEXT) support.$(OBJEXT) ami-disk.$(OBJEXT) blkdev-amiga.$(OBJEXT) \
parser.$(OBJEXT)
libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS) libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS)
SCRIPTS = $(dist_noinst_SCRIPTS) SCRIPTS = $(dist_noinst_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
...@@ -240,7 +241,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \ ...@@ -240,7 +241,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \
-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/src
AM_CFLAGS = @UAE_CFLAGS@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.c memory.c support.c ami-disk.c blkdev-amiga.c libosdep_a_SOURCES = main.c memory.c support.c ami-disk.c blkdev-amiga.c parser.c
noinst_HEADERS = amiga-kludges.h memory.h hrtimer.h noinst_HEADERS = amiga-kludges.h memory.h hrtimer.h
dist_noinst_SCRIPTS = scc dist_noinst_SCRIPTS = scc
all: all-am all: all-am
...@@ -295,6 +296,7 @@ distclean-compile: ...@@ -295,6 +296,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blkdev-amiga.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blkdev-amiga.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@
.c.o: .c.o:
......
...@@ -5,7 +5,7 @@ AM_CXXFLAGS = @UAE_CFLAGS@ -Wno-multichar ...@@ -5,7 +5,7 @@ AM_CXXFLAGS = @UAE_CFLAGS@ -Wno-multichar
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.cpp memory.c libosdep_a_SOURCES = main.cpp memory.c parser.c
noinst_HEADERS = memory.h hrtimer.h noinst_HEADERS = memory.h hrtimer.h
......
...@@ -60,7 +60,8 @@ LIBRARIES = $(noinst_LIBRARIES) ...@@ -60,7 +60,8 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru ARFLAGS = cru
libosdep_a_AR = $(AR) $(ARFLAGS) libosdep_a_AR = $(AR) $(ARFLAGS)
libosdep_a_LIBADD = libosdep_a_LIBADD =
am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \
parser.$(OBJEXT)
libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS) libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
...@@ -245,7 +246,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \ ...@@ -245,7 +246,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \
AM_CFLAGS = @UAE_CFLAGS@ AM_CFLAGS = @UAE_CFLAGS@
AM_CXXFLAGS = @UAE_CFLAGS@ -Wno-multichar AM_CXXFLAGS = @UAE_CFLAGS@ -Wno-multichar
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.cpp memory.c libosdep_a_SOURCES = main.cpp memory.c parser.c
noinst_HEADERS = memory.h hrtimer.h noinst_HEADERS = memory.h hrtimer.h
dist_noinst_DATA = uae.rsrc dist_noinst_DATA = uae.rsrc
all: all-am all: all-am
...@@ -298,6 +299,7 @@ distclean-compile: ...@@ -298,6 +299,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
...@@ -4,6 +4,6 @@ AM_CFLAGS = @UAE_CFLAGS@ ...@@ -4,6 +4,6 @@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.c memory.c libosdep_a_SOURCES = main.c memory.c parser.c
noinst_HEADERS = memory.h hrtimer.h noinst_HEADERS = memory.h hrtimer.h
...@@ -59,7 +59,8 @@ LIBRARIES = $(noinst_LIBRARIES) ...@@ -59,7 +59,8 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru ARFLAGS = cru
libosdep_a_AR = $(AR) $(ARFLAGS) libosdep_a_AR = $(AR) $(ARFLAGS)
libosdep_a_LIBADD = libosdep_a_LIBADD =
am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \
parser.$(OBJEXT)
libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS) libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
...@@ -237,7 +238,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \ ...@@ -237,7 +238,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \
-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/src
AM_CFLAGS = @UAE_CFLAGS@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.c memory.c libosdep_a_SOURCES = main.c memory.c parser.c
noinst_HEADERS = memory.h hrtimer.h noinst_HEADERS = memory.h hrtimer.h
all: all-am all: all-am
...@@ -289,6 +290,7 @@ distclean-compile: ...@@ -289,6 +290,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
...@@ -4,6 +4,6 @@ AM_CFLAGS = @UAE_CFLAGS@ ...@@ -4,6 +4,6 @@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.c memory.c blkdev-linux.c libosdep_a_SOURCES = main.c memory.c blkdev-linux.c parser.c
noinst_HEADERS = memory.h hrtimer.h noinst_HEADERS = memory.h hrtimer.h
...@@ -60,7 +60,7 @@ ARFLAGS = cru ...@@ -60,7 +60,7 @@ ARFLAGS = cru
libosdep_a_AR = $(AR) $(ARFLAGS) libosdep_a_AR = $(AR) $(ARFLAGS)
libosdep_a_LIBADD = libosdep_a_LIBADD =
am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \ am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \
blkdev-linux.$(OBJEXT) blkdev-linux.$(OBJEXT) parser.$(OBJEXT)
libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS) libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
...@@ -238,7 +238,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \ ...@@ -238,7 +238,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \
-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/src
AM_CFLAGS = @UAE_CFLAGS@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.c memory.c blkdev-linux.c libosdep_a_SOURCES = main.c memory.c blkdev-linux.c parser.c
noinst_HEADERS = memory.h hrtimer.h noinst_HEADERS = memory.h hrtimer.h
all: all-am all: all-am
...@@ -291,6 +291,7 @@ distclean-compile: ...@@ -291,6 +291,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blkdev-linux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blkdev-linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
...@@ -4,7 +4,7 @@ AM_CFLAGS = @UAE_CFLAGS@ ...@@ -4,7 +4,7 @@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.m memory.c libosdep_a_SOURCES = main.m memory.c parser.c
noinst_HEADERS = main.h memory.h hrtimer.h noinst_HEADERS = main.h memory.h hrtimer.h
noinst_DATA = Info.plist.in euae.icns noinst_DATA = Info.plist.in euae.icns
......
...@@ -60,7 +60,8 @@ LIBRARIES = $(noinst_LIBRARIES) ...@@ -60,7 +60,8 @@ LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru ARFLAGS = cru
libosdep_a_AR = $(AR) $(ARFLAGS) libosdep_a_AR = $(AR) $(ARFLAGS)
libosdep_a_LIBADD = libosdep_a_LIBADD =
am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) am_libosdep_a_OBJECTS = main.$(OBJEXT) memory.$(OBJEXT) \
parser.$(OBJEXT)
libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS) libosdep_a_OBJECTS = $(am_libosdep_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
...@@ -244,7 +245,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \ ...@@ -244,7 +245,7 @@ AM_CPPFLAGS = @UAE_CPPFLAGS@ -I$(top_srcdir)/src/include \
-I$(top_builddir)/src -I$(top_srcdir)/src -I$(top_builddir)/src -I$(top_srcdir)/src
AM_CFLAGS = @UAE_CFLAGS@ AM_CFLAGS = @UAE_CFLAGS@
noinst_LIBRARIES = libosdep.a noinst_LIBRARIES = libosdep.a
libosdep_a_SOURCES = main.m memory.c libosdep_a_SOURCES = main.m memory.c parser.c
noinst_HEADERS = main.h memory.h hrtimer.h noinst_HEADERS = main.h memory.h hrtimer.h
noinst_DATA = Info.plist.in euae.icns noinst_DATA = Info.plist.in euae.icns
EXTRA_DIST = euae.icns EXTRA_DIST = euae.icns
...@@ -300,6 +301,7 @@ distclean-compile: ...@@ -300,6 +301,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Po@am__quote@
.c.o: .c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
......
...@@ -59,17 +59,18 @@ int p96hack_vpos, p96hack_vpos2, p96refresh_active; ...@@ -59,17 +59,18 @@ int p96hack_vpos, p96hack_vpos2, p96refresh_active;
int have_done_picasso = 0; /* For the JIT compiler */ int have_done_picasso = 0; /* For the JIT compiler */
int picasso_is_special = PIC_WRITE; /* ditto */ int picasso_is_special = PIC_WRITE; /* ditto */
int picasso_is_special_read = PIC_READ; /* ditto */ int picasso_is_special_read = PIC_READ; /* ditto */
#endif
static int hwsprite = 0;
#define NOBLITTER 0 #define NOBLITTER 0
#define NOBLITTER_BLIT 0 #define NOBLITTER_BLIT 0
#define P96TRACING_ENABLED 0 #define P96TRACING_ENABLED 0
#define P96SPRTRACING_ENABLED 0 #define P96SPRTRACING_ENABLED 0
static int hwsprite = 0;
static int picasso96_BT = BT_uaegfx; static int picasso96_BT = BT_uaegfx;
static int picasso96_GCT = GCT_Unknown; static int picasso96_GCT = GCT_Unknown;
static int picasso96_PCT = PCT_Unknown; static int picasso96_PCT = PCT_Unknown;
#endif
static int p96syncrate; static int p96syncrate;
int p96hsync_counter, full_refresh; int p96hsync_counter, full_refresh;
......
...@@ -8,3 +8,4 @@ void scsidev_install (void) {} ...@@ -8,3 +8,4 @@ void scsidev_install (void) {}
void scsidev_reset (void) {} void scsidev_reset (void) {}
void scsidev_start_threads (void) {} void scsidev_start_threads (void) {}
int scsi_do_disk_change (int unitnum, int insert, int *pollmode) { return -1; }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* sysconfig.h. Generated from sysconfig.h.in by configure. */
/* sysconfig.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
#define HAVE_STRCASECMP 1
/* Define to 1 if you have the `strcmpi' function. */
/* #undef HAVE_STRCMPI */
/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1
/* Define to 1 if you have the `stricmp' function. */
/* #undef HAVE_STRICMP */
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* The size of `char', as computed by sizeof. */
#define SIZEOF_CHAR 1
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 4
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* The size of `void *', as computed by sizeof. */
#define SIZEOF_VOID_P 4
/* The size of `__int64', as computed by sizeof. */
#define SIZEOF___INT64 0
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
...@@ -150,7 +150,7 @@ static struct zcache *zcache_put (const TCHAR *name, struct zdiskimage *data) ...@@ -150,7 +150,7 @@ static struct zcache *zcache_put (const TCHAR *name, struct zdiskimage *data)
zc->tm = time (NULL); zc->tm = time (NULL);
return zc; return zc;
} }
static struct zfile *zfile_create (struct zfile *prev) static struct zfile *zfile_create (struct zfile *prev)
{ {
struct zfile *z; struct zfile *z;
...@@ -1491,7 +1491,11 @@ static struct zfile *zfile_fopen_2 (const TCHAR *name, const TCHAR *mode, int ma ...@@ -1491,7 +1491,11 @@ static struct zfile *zfile_fopen_2 (const TCHAR *name, const TCHAR *mode, int ma
} }
l->zfdmask = mask; l->zfdmask = mask;
} else { } else {
#if defined(__FreeBSD__)
struct stat st;
#else
struct stat64 st; struct stat64 st;
#endif
l = zfile_create (NULL); l = zfile_create (NULL);
l->mode = my_strdup (mode); l->mode = my_strdup (mode);
l->name = my_strdup (name); l->name = my_strdup (name);
...@@ -2779,6 +2783,11 @@ struct zdirectory { ...@@ -2779,6 +2783,11 @@ struct zdirectory {
TCHAR **filenames; TCHAR **filenames;
}; };
struct zfile *zfile_open_archive (const TCHAR *path, int flags)
{
return 0;
}
#ifdef _CONSOLE #ifdef _CONSOLE
static TCHAR *zerror; static TCHAR *zerror;
#define WRITE_LOG_BUF_SIZE 4096 #define WRITE_LOG_BUF_SIZE 4096
...@@ -2803,3 +2812,4 @@ void zfile_seterror (const TCHAR *format, ...) ...@@ -2803,3 +2812,4 @@ void zfile_seterror (const TCHAR *format, ...)
{ {
} }
#endif #endif
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
#include <zlib.h> #include <zlib.h>
#if defined(__FreeBSD__)
#include <time.h>
#include <sys/time.h>
#endif
#define unpack_log write_log #define unpack_log write_log
#undef unpack_log #undef unpack_log
#define unpack_log #define unpack_log
...@@ -43,7 +48,14 @@ static time_t fromdostime (uae_u32 dd) ...@@ -43,7 +48,14 @@ static time_t fromdostime (uae_u32 dd)
tm.tm_mday = (dd >> 16) & 0x1f; tm.tm_mday = (dd >> 16) & 0x1f;
t = mktime (&tm); t = mktime (&tm);
tzset (); tzset ();
#if defined(__FreeBSD__)
time_t time_now = time(NULL);
struct tm* tm_local;
tm_local = localtime(&time_now);
t -= tm_local->tm_gmtoff;
#else
t -= timezone; t -= timezone;
#endif
return t; return t;
} }
...@@ -252,6 +264,11 @@ struct zvolume *archive_directory_tar (struct zfile *z) ...@@ -252,6 +264,11 @@ struct zvolume *archive_directory_tar (struct zfile *z)
struct znode *zn; struct znode *zn;
tzset (); tzset ();
#if defined(__FreeBSD__)
time_t time_now = time(NULL);
struct tm* tm_local;
tm_local = localtime(&time_now);
#endif
zv = zvolume_alloc (z, ArchiveFormatTAR, NULL, NULL); zv = zvolume_alloc (z, ArchiveFormatTAR, NULL, NULL);
for (;;) { for (;;) {
uae_u8 block[512]; uae_u8 block[512];
...@@ -287,8 +304,13 @@ struct zvolume *archive_directory_tar (struct zfile *z) ...@@ -287,8 +304,13 @@ struct zvolume *archive_directory_tar (struct zfile *z)
zai.name = my_strdup (name); zai.name = my_strdup (name);
zai.size = size; zai.size = size;
zai.t = strtoul ((char*)block + 136, NULL, 8); zai.t = strtoul ((char*)block + 136, NULL, 8);
#if defined(__FreeBSD__)
zai.t += tm_local->tm_gmtoff;
if (tm_local->tm_isdst)
#else
zai.t += timezone; zai.t += timezone;
if (daylight) if (daylight)
#endif
zai.t -= 1 * 60 * 60; zai.t -= 1 * 60 * 60;
if (zai.name[_tcslen (zai.name) - 1] == '/') { if (zai.name[_tcslen (zai.name) - 1] == '/') {
zn = zvolume_adddir_abs (zv, &zai); zn = zvolume_adddir_abs (zv, &zai);
......
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