pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators/xcopilot Fix GCC 3.3.1 related build problem.
details: https://anonhg.NetBSD.org/pkgsrc/rev/7eb554f7a952
branches: trunk
changeset: 462344:7eb554f7a952
user: tron <tron%pkgsrc.org@localhost>
date: Tue Sep 30 17:47:44 2003 +0000
description:
Fix GCC 3.3.1 related build problem.
diffstat:
emulators/xcopilot/distinfo | 3 +-
emulators/xcopilot/patches/patch-aj | 502 ++++++++++++++++++++++++++++++++++++
2 files changed, 504 insertions(+), 1 deletions(-)
diffs (truncated from 520 to 300 lines):
diff -r 5ca75b79f914 -r 7eb554f7a952 emulators/xcopilot/distinfo
--- a/emulators/xcopilot/distinfo Tue Sep 30 17:44:45 2003 +0000
+++ b/emulators/xcopilot/distinfo Tue Sep 30 17:47:44 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2001/04/20 10:50:01 agc Exp $
+$NetBSD: distinfo,v 1.3 2003/09/30 17:47:44 tron Exp $
SHA1 (xcopilot-0.6.6.tar.gz) = 91f76d1fd8fc19b6fea18853425aa3076e945d5d
Size (xcopilot-0.6.6.tar.gz) = 343264 bytes
@@ -11,3 +11,4 @@
SHA1 (patch-ag) = 68a22072946811f9cc97434f532081a07fda567f
SHA1 (patch-ah) = fa166c5ecf7458c91f89b216aee5acb6de270292
SHA1 (patch-ai) = 255d997e2ef340a8d4b91ce25c2a3071df5c4520
+SHA1 (patch-aj) = 560a3dd902323ec1d07c292b6e8f95acb6c1c939
diff -r 5ca75b79f914 -r 7eb554f7a952 emulators/xcopilot/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/xcopilot/patches/patch-aj Tue Sep 30 17:47:44 2003 +0000
@@ -0,0 +1,502 @@
+$NetBSD: patch-aj,v 1.1 2003/09/30 17:47:44 tron Exp $
+
+--- mc68k/fab_custom.c.orig 1998-07-29 01:08:48.000000000 +0200
++++ mc68k/fab_custom.c 2003-09-30 19:22:12.000000000 +0200
+@@ -1027,252 +1027,251 @@
+ * Max Okumoto
+ *---------------------------------------------------------------------------*/
+ static char *HACK[] = {
+-"
+-/****************************************
+- * Handle a key event. The fields *
+- * keydown and key of the shared image *
+- * are interpreted, and the dragonball *
+- * registers updated *
+- ****************************************/
+-static void
+-dokey(void)
+-{
+- UBYTE d;
+- d = db_PDDATA.x;
+- if (CustShptr->keydown) {
+- db_PDDATA.x |= (1 << CustShptr->key);
+- CustShptr->keydown = 0;
+- CustShptr->key = -1;
+- } else if (CustShptr->key >= 0) {
+- db_PDDATA.x &= ~(1 << CustShptr->key);
+- CustShptr->key = -1;
+- }
+- db_PDDATA_edge |= db_PDDATA.x & ~d;
+- db_IPR.anon.PEN = CustShptr->pen;
+- db_IPR.x = (db_IPR.x & 0xffff00ff) |
+- ((((db_PDDATA_edge & db_PDIRQEDGE.x) |
+- (db_PDDATA.x & ~db_PDIRQEDGE.x)) & db_PDIRQEN.x) << 8);
+-}
+-
+-void
+-updateisr()
+-{
+- db_IPR.anon.PEN = CustShptr->pen;
+- db_ISR.x = db_IPR.x & ~db_IMR.x;
+- if (db_ISR.x) {
+- specialflags |= SPCFLAG_INT;
+- }
+- CustShptr->run_updateisr = 0;
+-}
+-
+-void
+-maybe_updateisr()
+-{
+- if (CustShptr->run_updateisr) {
+- dokey();
+- updateisr();
+- }
+-}
+-
+-int
+-intbase()
+-{
+- return db_IVR.anon.VECTOR << 3;
+-}
+-
+-int
+-intlev()
+-{
+- if (db_ISR.anon.IRQ7) return 7;
+- if (db_ISR.anon.SPIS) return 6;
+- if (db_ISR.anon.TMR1) return 6;
+- if (db_ISR.anon.IRQ6) return 6;
+- if (db_ISR.anon.PEN) return 5;
+- if (db_ISR.anon.SPIM) return 4;
+- if (db_ISR.anon.TMR2) return 4;
+- if (db_ISR.anon.UART) return 4;
+- if (db_ISR.anon.WDT) return 4;
+- if (db_ISR.anon.RTC) return 4;
+- if (db_ISR.anon.KB) return 4;
+- if (db_ISR.anon.PWM) return 4;
+- if (db_ISR.anon.INT0) return 4;
+- if (db_ISR.anon.INT1) return 4;
+- if (db_ISR.anon.INT2) return 4;
+- if (db_ISR.anon.INT3) return 4;
+- if (db_ISR.anon.INT4) return 4;
+- if (db_ISR.anon.INT5) return 4;
+- if (db_ISR.anon.INT6) return 4;
+- if (db_ISR.anon.INT7) return 4;
+- if (db_ISR.anon.IRQ3) return 3;
+- if (db_ISR.anon.IRQ2) return 2;
+- if (db_ISR.anon.IRQ1) return 1;
+- return -1;
+-}
+-
+-static void
+-pen(int down, int x, int y)
+-{
+- if (!pendown && down) {
+- db_IPR.anon.PEN = 1;
+- updateisr();
+- } else if (pendown && !down) {
+- db_IPR.anon.PEN = 0;
+- updateisr();
+- }
+- pendown = down;
+- penx = x;
+- peny = y;
+-}
+-
+-static void
+-hotsync(int down)
+-{
+- if (down) {
+- db_IPR.anon.IRQ1 = 1;
+- } else {
+- db_IPR.anon.IRQ1 = 0;
+- }
+- updateisr();
+-}
+-
+-/*
+- * custptr is a pointer to a shared memory block which will \"back-up\"
+- * the register values of the custom circuits, allowing other processes
+- * to look at register values
+- */
+-void
+-custom_init(shared_img * shptr)
+-{
+- CustShptr = shptr;
+- CustShptr->PICF = 0;
+- CustShptr->VPW = 0xff;
+- CustShptr->POSR = 0;
+- CustShptr->grpalette[0] = 1;
+- CustShptr->grpalette[1] = 0;
+- CustShptr->grpalette[2] = 3;
+- CustShptr->grpalette[3] = 7;
+- CustShptr->quit = 0;
+- CustShptr->run_updateisr = 0;
+- CustShptr->LcdPower = lcdOn;
+- CustShptr->Backlight = 0;
+- customreset();
+-}
+-
+-void
+-do_cycles(int longtime)
+-{
+- if (db_TCTL2.anon.TEN) {
+- db_TCN2.anon.COUNT++;
+- if (db_TCN2.anon.COUNT > db_TCMP2.anon.COMPARE || longtime) {
+- db_TSTAT2.anon.COMP = 1;
+- if (db_TCTL2.anon.FRR == 0) {
+- db_TCN2.anon.COUNT = 0;
+- }
+- if (db_TCTL2.anon.IRQEN) {
+- db_IPR.anon.TMR2 = 1;
+- updateisr();
+- }
+- }
+- }
+- /*
+- * Determine if there are any chars to read from the serial port or
+- * debugger
+- */
+-
+- /*
+- * WARNING: This uses a shared memory data structure to store the
+- * FIFO. The producer is adding things to this _at the same time_ as
+- * this is consuming. Examine main.c and take a course in concurrent
+- * programming before modifying this. :-) - Ian
+- */
+-
+- if (CustShptr->serial.head != CustShptr->serial.tail &&
+- db_USTCNT.anon.UART_ENABLE && !db_URX.anon.DATA_READY) {
+- int curhead = CustShptr->serial.head;
+- db_URX.anon.DATA = CustShptr->serial.fifo[curhead];
+- curhead += 1;
+- if (curhead == FIFO_SIZE) {
+- curhead = 0;
+- }
+- CustShptr->serial.head = curhead;
+- db_URX.anon.DATA_READY = 1;
+- if (db_USTCNT.anon.RX_READY_ENABLE) {
+- db_IPR.anon.UART = 1;
+- updateisr();
+- }
+- }
+- if (CustShptr->gdb.head != CustShptr->gdb.tail &&
+- db_USTCNT.anon.UART_ENABLE && !db_URXdb.anon.DATA_READY) {
+- int curhead = CustShptr->gdb.head;
+- db_URXdb.anon.DATA = CustShptr->gdb.fifo[curhead];
+- curhead += 1;
+- if (curhead == FIFO_SIZE) {
+- curhead = 0;
+- }
+- CustShptr->gdb.head = curhead;
+- db_URXdb.anon.DATA_READY = 1;
+- }
+-}
+-
+-struct EventType {
+- UWORD eType;
+- UWORD penDown;
+- UWORD screenX;
+- UWORD screenY;
+- UWORD data[8];
+-};
+-
+-struct SndCommandType {
+- UWORD cmd;
+- UWORD param1hi;
+- UWORD param1lo;
+- UWORD param2;
+- UWORD param3;
+-};
+-
+-#define keyDownEvent 4
+-#define sysTrapEvtGetEvent 41245
+-#define sysTrapSndDoCmd 41523
+-
+-int
+-do_api(int api)
+-{
+- switch (api) {
+- case sysTrapEvtGetEvent:
+- if (CustShptr->kbin != CustShptr->kbout) {
+-
+- struct EventType *ev;
+- int out;
+-
+- out = CustShptr->kbout;
+- ev = (struct EventType *) get_real_address(get_long(CustShptr->regs.a[7]));
+-
+- ev->eType = keyDownEvent;
+- ev->data[0] = CustShptr->kb[out];
+- ev->data[1] = 0;
+- ev->data[2] = 0;
+- CustShptr->kbout = (out + 1) & 7;
+- return 1;
+- }
+- break;
+- case sysTrapSndDoCmd:
+- {
+- struct SndCommandType *sc;
+- sc = (struct SndCommandType *)
+- get_real_address(get_long(CustShptr->regs.a[7] + 4));
+- if ((sc->cmd >> 8) == 1) {
+- CustShptr->BellFreq = (sc->param1hi << 16) + sc->param1lo;
+- CustShptr->BellDur = sc->param2;
+- CustShptr->BellAmp = sc->param3;
+- CustShptr->LcdReq = lcdBell;
+- return 1;
+- }
+- }
+- break;
+- }
+- return 0;
+-}
+-"
++"\n"
++"/****************************************\n"
++" * Handle a key event. The fields *\n"
++" * keydown and key of the shared image *\n"
++" * are interpreted, and the dragonball *\n"
++" * registers updated *\n"
++" ****************************************/\n"
++"static void\n"
++"dokey(void)\n"
++"{\n"
++" UBYTE d;\n"
++" d = db_PDDATA.x;\n"
++" if (CustShptr->keydown) {\n"
++" db_PDDATA.x |= (1 << CustShptr->key);\n"
++" CustShptr->keydown = 0;\n"
++" CustShptr->key = -1;\n"
++" } else if (CustShptr->key >= 0) {\n"
++" db_PDDATA.x &= ~(1 << CustShptr->key);\n"
++" CustShptr->key = -1;\n"
++" }\n"
++" db_PDDATA_edge |= db_PDDATA.x & ~d;\n"
++" db_IPR.anon.PEN = CustShptr->pen;\n"
++" db_IPR.x = (db_IPR.x & 0xffff00ff) |\n"
++" ((((db_PDDATA_edge & db_PDIRQEDGE.x) |\n"
++" (db_PDDATA.x & ~db_PDIRQEDGE.x)) & db_PDIRQEN.x) << 8);\n"
++"}\n"
++"\n"
++"void\n"
Home |
Main Index |
Thread Index |
Old Index