Author: musuruan
Update of /cvs/nonfree/rpms/e-uae/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv27645/devel
Modified Files:
.cvsignore sources
Added Files:
e-uae-0.8.29-execstack.patch e-uae-0.8.29-hardfilefixes.patch
e-uae-0.8.29-irqfixes.patch e-uae.png e-uae.spec
Log Message:
First import
e-uae-0.8.29-execstack.patch:
--- NEW FILE e-uae-0.8.29-execstack.patch ---
Only in e-uae-0.8.29-WIP4: autom4te.cache
diff -dur e-uae-0.8.29-WIP4.orig/configure e-uae-0.8.29-WIP4/configure
--- e-uae-0.8.29-WIP4.orig/configure 2007-03-28 06:20:21.000000000 +0200
+++ e-uae-0.8.29-WIP4/configure 2008-08-15 10:27:51.000000000 +0200
@@ -18154,57 +18154,6 @@
fi
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
-
- { echo "$as_me:$LINENO: checking whether assembler supports --execstack
option" >&5
-echo $ECHO_N "checking whether assembler supports --execstack option...
$ECHO_C" >&6; }
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="-Wa,--execstack $CFLAGS"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-int main (void) {return 0;}
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
- UAE_CFLAGS="-Wa,--execstack $UAE_CFLAGS"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$SAVE_CFLAGS"
else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
diff -dur e-uae-0.8.29-WIP4.orig/configure.in e-uae-0.8.29-WIP4/configure.in
--- e-uae-0.8.29-WIP4.orig/configure.in 2007-03-28 03:41:28.000000000 +0200
+++ e-uae-0.8.29-WIP4/configure.in 2008-08-15 10:25:42.000000000 +0200
@@ -762,16 +762,6 @@
fi
fi
AC_MSG_RESULT(yes)
-
- AC_MSG_CHECKING([whether assembler supports --execstack option])
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="-Wa,--execstack $CFLAGS"
- AC_TRY_COMPILE(, int main (void) {return 0;},
- [AC_MSG_RESULT(yes)
- UAE_CFLAGS="-Wa,--execstack $UAE_CFLAGS"],
- AC_MSG_RESULT(no)
- )
- CFLAGS="$SAVE_CFLAGS"
else
AC_MSG_RESULT(no)
fi
e-uae-0.8.29-hardfilefixes.patch:
--- NEW FILE e-uae-0.8.29-hardfilefixes.patch ---
--- e-uae-0.8.29-WIP4/src/hardfile.c.orig 2007-03-12 20:21:13.000000000 +0000
+++ e-uae-0.8.29-WIP4/src/hardfile.c 2008-03-21 02:10:49.000000000 +0000
@@ -432,8 +432,12 @@
if (!hfpd->opencount)
return 0;
hfpd->opencount--;
- if (hfpd->opencount == 0)
+
+ if (hfpd->opencount == 0) {
write_comm_pipe_u32 (&hfpd->requests, 0, 1);
+ uae_sem_wait (&hfpd->sync_sem);
+ }
+
put_word (m68k_areg (&context->regs, 6) + 32, get_word (m68k_areg
(&context->regs, 6) + 32) - 1);
return 0;
}
@@ -663,7 +667,7 @@
error = handle_scsi (request, hfd);
} else { /* we don't want users trashing their "partition" hardfiles
with hdtoolbox */
error = -3; /* IOERR_NOCMD */
- write_log ("UAEHF: HD_SCSICMD tried on regular HDF, unit %d", unit);
+ write_log ("UAEHF: HD_SCSICMD tried on regular HDF, unit %d\n", unit);
}
break;
@@ -793,11 +797,20 @@
if ((request = hfpd->d_request[i]))
abort_async (hfpd, request, 0, 0);
}
+
+ write_comm_pipe_u32 (&hfpd->requests, 0, 1);
+ uae_sem_wait (&hfpd->sync_sem);
}
+
memset (hfpd, 0, sizeof (struct hardfileprivdata));
}
}
+void hardfile_cleanup (void)
+{
+ hardfile_reset ();
+}
+
void hardfile_install (void)
{
uae_u32 functable, datatable;
e-uae-0.8.29-irqfixes.patch:
--- NEW FILE e-uae-0.8.29-irqfixes.patch ---
--- e-uae-0.8.29-WIP4/src/custom.c.orig 2007-03-12 20:21:12.000000000 +0000
+++ e-uae-0.8.29-WIP4/src/custom.c 2008-03-20 23:04:57.000000000 +0000
@@ -2550,86 +2550,103 @@
#ifdef CPUEMU_6
-static int irq_pending[15]; /* If true, an IRQ is pending arrival at the CPU. */
-static unsigned long irq_due[15]; /* Cycle time that IRQ will arrive at CPU */
+static int irq_pending[15]; /* If true, an IRQ is pending arrival at the CPU.
If false,
+ * an IRQ has arrived or is disabled. */
+static unsigned long irq_time[15]; /* Cycle time an IRQ will arrive at the CPU if that
IRQ is
+ * pending or has arrived; otherwise 0, if an IRQ is disabled. */
/*
- * Handle interrupt delay in cycle-exact mode.
+ * Get priority level of IRQ (cycle-exact mode)
*/
-static int intlev_2 (void)
+STATIC_INLINE int intlev_exact (uae_u16 imask)
{
- uae_u16 imask = intreq & intena;
- int il = -1;
-
- if (imask && (intena & 0x4000)) {
- unsigned long cycles = get_cycles ();
- int i;
+#if 0
+ assert ((imask & 0x7FFF) != 0);
+#endif
- for (i = 14; i >= 0; i--) {
- if (imask & (1 << i)) {
- if (irq_pending[i] && (cycles >= irq_due[i])) {
- irq_pending[i] = 0;
+ unsigned long curr_time = get_cycles ();
+ int i;
- if (i == 13 || i == 14)
- il = -1;
- else if (i == 11 || i == 12)
- return 5;
- else if (i >= 7 && i <= 10)
- return 4;
- else if (i >= 4 && i <= 6)
- return 3;
- else if (i == 3)
- return 2;
- else
- return 1;
- }
+ for (i = 14; i >= 0; i--) {
+ if (imask & (1 << i)) {
+ if (irq_pending[i] == 0 || ((curr_time - irq_time[i]) > 4 * CYCLE_UNIT)) {
+ /* Mark IRQ as arrived. */
+ irq_pending[i] = 0;
+
+ /* Get priority level of IRQ. */
+ if (i == 13 || i == 14)
+ return 6;
+ if (i == 11 || i == 12)
+ return 5;
+ if (i >= 7 && i <= 10)
+ return 4;
+ if (i >= 4 && i <= 6)
+ return 3;
+ if (i == 3)
+ return 2;
+ else
+ return 1;
}
}
- } else
- unset_special (®s, SPCFLAG_INT);
-
- return il;
+ }
+ /* If we got here, then an at least one IRQ must be pending,
+ * but has not yet arrived at the CPU. */
+ return 0;
}
#endif
/*
- * Get interrupt level of IRQ.
+ * Get priority level of IRQ (not cycle-exact mode)
+ */
+STATIC_INLINE int intlev_simple (uae_u16 imask)
+{
+#if 0
+ assert ((imask & 0x7FFF) != 0);
+#endif
+
+ if (imask & 0x6000)
+ return 6;
+ if (imask & 0x1800)
+ return 5;
+ if (imask & 0x0780)
+ return 4;
+ if (imask & 0x0070)
+ return 3;
+ if (imask & 0x0008)
+ return 2;
+ else
+ return 1;
+}
+
+/*
+ * Get level of interrupt request presented to CPU.
+ *
+ * If no IRQs are active and enabled, returns -1.
+ * If none of the active IRQs have yet reached the CPU, returns 0.
+ * Otherwise, returns the priority level of the highest priorty active IRQ.
*/
int intlev (void)
{
- int il = -1;
+ uae_u16 imask = intreq & intena;
+ if (imask && (intena & 0x4000)) {
#ifdef CPUEMU_6
- if (currprefs.cpu_cycle_exact) {
- il = intlev_2 ();
- if (il >= 0 && il <= (int) regs.intmask)
- unset_special (®s, SPCFLAG_INT);
- } else
+ if (currprefs.cpu_cycle_exact)
+ return intlev_exact (imask);
+ else
#endif
- {
- uae_u16 imask = intreq & intena;
- if (imask && (intena & 0x4000)) {
- if (imask & 0x6000)
- il = 6;
- if (imask & 0x1800)
- il = 5;
- if (imask & 0x0780)
- il = 4;
- if (imask & 0x0070)
- il = 3;
- if (imask & 0x0008)
- il = 2;
- if (imask & 0x0007)
- il = 1;
- }
+ return intlev_simple (imask);
}
-
- return il;
+ return -1;
}
+/*
+ * Enable/disable an IRQ.
+ */
static void doint (void)
{
- set_special (®s, SPCFLAG_INT);
+ if (intena & 0x4000)
+ set_special (®s, SPCFLAG_INT);
#ifdef CPUEMU_6
if (currprefs.cpu_cycle_exact) {
@@ -2639,12 +2656,12 @@
imask = intreq & intena;
if (imask && (intena & 0x4000)) {
- /* Set up delay for IRQ to arrive at the CPU. */
- unsigned long cycle_irq_due = get_cycles () + 4 * CYCLE_UNIT;
+ /* Set up time for IRQ to arrive at the CPU. */
+ unsigned long curr_time = get_cycles ();
for (i = 0; i < 15; i++) {
if ((imask & (1 << i)) && irq_pending[i] == 0) {
irq_pending[i] = 1;
- irq_due[i] = cycle_irq_due;
+ irq_time[i] = curr_time;
}
}
}
@@ -2677,14 +2694,17 @@
* pending status. */
int i;
for (i = 0; i < 15; i++) {
- if (v & (1 << i))
+ if (v & (1 << i)) {
irq_pending[i] = 0;
+ irq_time[i] = 0;
+ }
}
}
}
#endif
- doint ();
+ if (intena & 0x4000)
+ doint ();
}
void INTREQ (uae_u16 v)
--- e-uae-0.8.29-WIP4/src/newcpu.c.orig 2007-03-28 02:27:18.000000000 +0100
+++ e-uae-0.8.29-WIP4/src/newcpu.c 2008-03-20 23:07:47.000000000 +0000
@@ -687,7 +687,10 @@
}
}
+ /* Interrupt priority level may have changed. Assert SPCFLAG_INT
+ * to check if there's an IRQ ready to go at the new level. */
set_special (regs, SPCFLAG_INT);
+
if (regs->t1 || regs->t0)
set_special (regs, SPCFLAG_TRACE);
else
@@ -973,15 +976,12 @@
STATIC_INLINE void service_interrupt (unsigned int level, struct regstruct *regs)
{
- if (level > regs->intmask) {
-
- regs->stopped = 0;
- unset_special (regs, SPCFLAG_STOP);
+ regs->stopped = 0;
+ unset_special (regs, SPCFLAG_STOP);
- Exception (level + 24, regs, 0);
+ Exception (level + 24, regs, 0);
- regs->intmask = level;
- }
+ regs->intmask = level;
}
/*
@@ -1694,12 +1694,14 @@
* In non-cycle-exact mode we handle this by separating the interrupt request
* pending (SPCFLAG_INT) and interrupt request arrived (SPCFLAG_DOINT) events.
* This ensures that there's always a delay of one opcode (and so at least 2
- * machine cycles) between the interrupt controller requesting an interrupt
- * and us servicing it here.
+ * machine cycles) between the interrupt controller requesting an interrupt or
+ * the processor changing its interrupt priority level and us servicing it here.
*
* In cycle-exact mode, there's just one event (SPCFLAG_INT) and the delay is
* handled internally by the interrupt controller code in custom.c - intlev()
* and friends.
+ *
+ * This stuff needs some tidying up!
*/
if ((regs->spcflags & SPCFLAG_DOINT) ||
(currprefs.cpu_cycle_exact && (regs->spcflags & SPCFLAG_INT))) {
@@ -1708,8 +1710,15 @@
unset_special (regs, SPCFLAG_DOINT);
- if (intr != -1)
+ if (intr > (int)regs->intmask) {
+ if (currprefs.cpu_cycle_exact)
+ unset_special(regs, SPCFLAG_INT);
+
service_interrupt (intr, regs);
+ } else {
+ if (intr < 0 && currprefs.cpu_cycle_exact)
+ unset_special (regs, SPCFLAG_INT);
+ }
}
if ((regs->spcflags & SPCFLAG_INT) && !currprefs.cpu_cycle_exact) {
--- NEW FILE e-uae.spec ---
Name: e-uae
Version: 0.8.29
Release: 0.10.wip4%{?dist}
Summary: A powerful Amiga Emulator, based on UAE
Group: Applications/Emulators
License: GPLv2+
URL:
http://www.rcdrummond.net/uae/
Source0:
http://www.rcdrummond.net/uae/%{name}-%{version}-WIP4/%{name}-%{version}-...
Source1: %{name}.png
Patch0: %{name}-0.8.29-irqfixes.patch
Patch1: %{name}-0.8.29-hardfilefixes.patch
# patch from upstream not to require an executable stack
Patch2: %{name}-0.8.29-execstack.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
BuildRequires: gtk2-devel => 2.0.0
BuildRequires: libcapsimage-devel => 2.0.0
BuildRequires: libICE-devel
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
BuildRequires: SDL-devel => 1.2.0
BuildRequires: zlib-devel
Requires: hicolor-icon-theme
Requires: policycoreutils
%description
E-UAE is an Amiga Emulator based on UAE which attempts to bring all the
features of WinUAE to non Windows platforms. E-UAE includes almost
complete emulation of the custom chips, including AGA, bsdsocket
emulation, JIT compilation for X86 processors, emulation of the 68000 to
the 68060 as well as the FPUs.
%prep
%setup -q -n %{name}-%{version}-WIP4
%patch0 -p1
%patch1 -p1
%patch2 -p1
# Encoding fixes
iconv -f iso8859-1 ChangeLog -t utf8 > ChangeLog.conv && /bin/mv -f
ChangeLog.conv ChangeLog
# Permission fixes
chmod -x src/crc32.c
%build
# Flag notes
# --enable-jit : Defaults to enabled on X86
# --enable-natmem : Defaults to enabled on Linux/X86
# --enable-autoconfig : Defaults to enabled if threading available (should be)
# --enable-aga : Defaults to true
# --enable-cdtv : Defaults to true if SCSI is enabled.
# --enable-cd32 : Defaults to true if AGA and SCSI is enabled
# --enable-action-replay : Defaults to true
# --enable-cycle-exact-cpu : Defaults to true
# --enable-compatible-cpu : Defaults to true
# --enable-natmem : Defaults to yes on Linux
# --enable-autoconfig : Defaults to yes if threads enabled (they should be)
# --enable-fdi : Defaults to on
%configure --enable-bsdsock-new \
--enable-ui \
--enable-audio \
--with-caps \
--with-caps-prefix=/usr \
--with-sdl \
--with-sdl-gfx \
--with-sdl-sound
# Don't use parallel building (%%{?_smp_mflags}) seems broken in some cases
make
# Build desktop icon
cat >%{name}.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Name=E-UAE
GenericName=Amiga Emulator
Comment=UNIX Amiga Emulator
Exec=uae
Icon=%{name}
Terminal=false
Type=Application
Categories=Game;Emulator;
EOF
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/48x48/apps
install -pm0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
desktop-file-install --vendor dribble \
--dir %{buildroot}%{_datadir}/applications \
%{name}.desktop
%clean
rm -rf %{buildroot}
%post
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
# SELinux support
%ifarch %{ix86}
semanage fcontext -a -t java_exec_t %{_bindir}/uae >/dev/null 2>&1 || :
restorecon -R %{_bindir}/uae
%endif
%postun
touch --no-create %{_datadir}/icons/hicolor
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
# SELinux support
%ifarch %{ix86}
if [ "$1" -eq "0" ]; then
semanage fcontext -d -t java_exec_t %{_bindir}/uae >/dev/null 2>&1 || :
fi
%endif
%files
%defattr(-,root,root,-)
%{_bindir}/uae
%{_bindir}/readdisk
%{_datadir}/applications/dribble-e-uae.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%doc docs/* ChangeLog COPYING README
%changelog
* Sun Oct 05 2008 Andrea Musuruane <musuruan(a)gmail.com> 0.8.29-0.10.wip4
- addedd a patch from upstream not to require an executable stack
- added an SELinux context because uae requires an executable heap
* Fri Mar 21 2008 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.9.wip4
- Add support for libcapsimage to x86_64
- Added patch for various IRQ handling fixes
- Added patch for fixing hardfile related race condition
- Convert ChangeLog to UTF8
- License change due to new guidelines
* Sat Mar 31 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.8.wip4
- Upgrade to 0.8.29-WIP4
* Tue Mar 13 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.7.wip3
- Dropped dribble-menus requirement, due to be obsoleted
- Changed .desktop category to Game;Emulator;
* Thu Jan 25 2007 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.6.wip3
- Various spec cleanups
- Dropped support for FC4
- Renamed icon and .desktop file
* Wed Aug 02 2006 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.5.wip3
- Upgraded to 0.8.29-WIP3
* Sun Jul 09 2006 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.4.wip2
- Moved icon installation to make it freedesktop compliant
- Added %%post and %%postun sections to update icon cache at installation
* Sat Jun 24 2006 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.3.wip2
- Cosmetic fixes for the Dribble repository
- Rebuilt ensuring libICE support
- Moved .desktop file creation to build section
* Wed May 31 2006 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.2.wip2
- Corrected release name format to 0.%%{X}.%%{alphatag} from 0.%%{alphatag}.%%{X}
- Added %%{version}-%%{release} to provides field
- Dropped gawk as a buildrequire. Doesn't seem to be needed.
- Dropped xorg-x11-devel as a buildrequire. SDL-devel should pull in needed X
headers and this should make it compatible with both modular/non-modular X
- Added ncurses-devel as a buildrequire
- Added pkgconfig as a buildrequire
- Disabled parallel make as it currently seems to be broken.
- Cosmetic changes to the configure section. Makes it less verbose.
* Sat May 06 2006 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.29-0.WIP2.1.iss
- Upgraded to 0.8.29-WIP2
- Spec file changed to more closely follow Fedora packaging guidelines
- Amiga specific tools removed
- Added gawk, xorg-x11-devel, desktop-file-utils buildrequires
- Removed file from buildrequires as per packaging guidelines
- Added x86_64 support, minus caps stuff as it's not available for x86_64
* Mon Oct 24 2005 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.28-1.iss
- Upgraded to 0.8.28
- Fixes for deprecated fields no longer supported by the latest rpmbuild
- Now compiled against SDL as the FC2 arts/SDL bug appears fixed.
- Compiled on PPC
- SCSI emulation removed.
* Sun Jan 23 2005 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.27-2.iss
- Upgraded to the final version of 0.8.27 instead of RC2
- Now compiled against alsa as it supports it natively.
- Added scsi emulation support.
- CD32 emulation now enabled as it required scsi-emulation support
- CDTV emulation now enabled as it required scsi-emulation support
* Tue Nov 30 2004 Ian Chapman <packages[AT]amiga-hardware.com> 0.8.27-1.iss
- Initial Release
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/e-uae/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Jun 2008 15:33:09 -0000 1.1
+++ .cvsignore 16 Oct 2008 17:43:22 -0000 1.2
@@ -0,0 +1 @@
+e-uae-0.8.29-WIP4.tar.bz2
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/e-uae/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Jun 2008 15:33:09 -0000 1.1
+++ sources 16 Oct 2008 17:43:22 -0000 1.2
@@ -0,0 +1 @@
+cbfd7e3d7a1b323331afbb92ea7ff4f0 e-uae-0.8.29-WIP4.tar.bz2