r10506 - in packages/trunk/invaders/debian: . patches

Fabian Greffrath fabian-guest at alioth.debian.org
Fri Nov 13 14:28:55 UTC 2009


Author: fabian-guest
Date: 2009-11-13 14:28:54 +0000 (Fri, 13 Nov 2009)
New Revision: 10506

Modified:
   packages/trunk/invaders/debian/changelog
   packages/trunk/invaders/debian/patches/02-gcc-ldflags.patch
   packages/trunk/invaders/debian/patches/03-reboot-on-esc.patch
Log:
* debian/patches/02-gcc-ldflags.patch: Replace -fno-builtin with -ffreestanding, the latter implies the former and is even stricter.
* Simplyfied debian/patches/03-reboot-on-esc.patch, based on code from current memtest86.
* Adjusted changelog entry.



Modified: packages/trunk/invaders/debian/changelog
===================================================================
--- packages/trunk/invaders/debian/changelog	2009-11-12 15:49:22 UTC (rev 10505)
+++ packages/trunk/invaders/debian/changelog	2009-11-13 14:28:54 UTC (rev 10506)
@@ -8,11 +8,13 @@
     + use CFLAGS for linking as well (since gcc is used)
 
   [ Fabian Greffrath ]
+  * debian/patches/02-gcc-ldflags.patch: Replace -fno-builtin with
+    -ffreestanding, the latter implies the former and is even stricter.
   * debian/patches/03-reboot-on-esc.patch: New patch, perform a reboot
     when the ESC key is pressed. Relies on the keyboard controller available
-    at port 0x64, so may most likely not work on non-PC/BIOS systems.
+    at port 0x64 (just as the whole game does anyway).
 
- -- Fabian Greffrath <fabian at debian-unofficial.org>  Thu, 12 Nov 2009 15:27:25 +0100
+ -- Fabian Greffrath <fabian at debian-unofficial.org>  Fri, 13 Nov 2009 13:44:59 +0100
 
 invaders (1.0.0-9) unstable; urgency=low
 

Modified: packages/trunk/invaders/debian/patches/02-gcc-ldflags.patch
===================================================================
--- packages/trunk/invaders/debian/patches/02-gcc-ldflags.patch	2009-11-12 15:49:22 UTC (rev 10505)
+++ packages/trunk/invaders/debian/patches/02-gcc-ldflags.patch	2009-11-13 14:28:54 UTC (rev 10506)
@@ -10,7 +10,7 @@
  
 -CFLAGS="-fno-builtin -nostdinc -O2 -I. -Wall -Werror"
 -LDFLAGS="-nostdlib -Wl,-N -Wl,-Ttext -Wl,100000"
-+CFLAGS="-fno-builtin -nostdinc -O2 -I. -Wall -Werror -m32 -nostdlib"
++CFLAGS="-ffreestanding -nostdinc -O2 -I. -Wall -Werror -m32 -nostdlib"
 +LDFLAGS="-Wl,-N -Wl,-Ttext -Wl,100000 -Wl,--build-id=none -m32"
  gcc $CFLAGS -c keyboard.c
  gcc $CFLAGS -c delay.c

Modified: packages/trunk/invaders/debian/patches/03-reboot-on-esc.patch
===================================================================
--- packages/trunk/invaders/debian/patches/03-reboot-on-esc.patch	2009-11-12 15:49:22 UTC (rev 10505)
+++ packages/trunk/invaders/debian/patches/03-reboot-on-esc.patch	2009-11-13 14:28:54 UTC (rev 10506)
@@ -1,20 +1,30 @@
-Reboot the machine when the ESC key is pressed.
+Reboot the machine when the ESC key is pressed (taken from memtest86_3.5-2).
 
 --- invaders-1.0.0.orig/game.c
 +++ invaders-1.0.0/game.c
-@@ -19,6 +19,11 @@
+@@ -2,6 +2,7 @@
+ #include "keyboard.h"
+ #include "sound.h"
+ #include "delay.h"
++#include "io.h"
  
+ struct shot_t {
+   int8 x,y; // x==-1 -> inactive shot
+@@ -19,6 +20,13 @@
+ 
  static bool gameover, winner;
  
-+static inline void reboot()
++inline void reboot()
 +{
-+  __asm__ __volatile__ ("outb %b0,%w1": :"a" (0xfe), "Nd" (0x64));
-+}
++  /* tell the BIOS to do a warm start */
++  *((unsigned short *)0x472) = 0x1234;
++  outb(0xfe,0x64);
++};
 +
  void resetgame()
  {
    gameover=false;
-@@ -120,6 +125,9 @@
+@@ -120,6 +128,9 @@
        break;
      case 'x':
        return;




More information about the Pkg-games-commits mailing list