fceu options + support code
authornotaz <notasas@gmail.com>
Sun, 27 May 2007 23:04:35 +0000 (23:04 +0000)
committernotaz <notasas@gmail.com>
Sun, 27 May 2007 23:04:35 +0000 (23:04 +0000)
git-svn-id: file:///home/notaz/opt/svn/fceu@140 be3aeb3a-fb24-0410-a615-afba39da0efa

drivers/gp2x/asmutils.h
drivers/gp2x/asmutils.s
drivers/gp2x/gp2x-video.c
drivers/gp2x/input.c
drivers/gp2x/main.c
drivers/gp2x/menu.c
fce.c
nsf.c
svga.c

index 0ad81b1..7fce5ee 100644 (file)
@@ -2,6 +2,7 @@ void flushcache(unsigned int beginning_addr, unsigned int end_addr, unsigned int
 void block_or(void *src, size_t n, int pat);\r
 void block_and(void *src, size_t n, int pat);\r
 void block_andor(void *src, size_t n, int andpat, int orpat);\r
+void memset32(int *dest, int c, int count);\r
 void spend_cycles(int c); // utility\r
-void soft_scale(void *dst, unsigned short *pal, int offs, int lines);\r
+void soft_scale(void *dst, unsigned short *pal, int line_offs, int lines);\r
 \r
index 62e0661..a91cfaf 100644 (file)
@@ -86,7 +86,36 @@ spend_cycles:
     bx      lr
 
 
-.global soft_scale @ void *dst, unsigned short *pal, int offs, int lines
+.global memset32 @ int *dest, int c, int count
+
+memset32:
+    stmfd   sp!, {lr}
+
+    mov     r3, r1
+    subs    r2, r2, #4
+    bmi     mst32_fin
+
+    mov     r12,r1
+    mov     lr, r1
+
+mst32_loop:
+    subs    r2, r2, #4
+    stmia   r0!, {r1,r3,r12,lr}
+    bpl     mst32_loop
+
+mst32_fin:
+    tst     r2, #1
+    strne   r1, [r0], #4
+
+    tst     r2, #2
+    stmneia r0!, {r1,r3}
+
+    ldmfd   sp!, {lr}
+    bx      lr
+
+
+
+.global soft_scale @ void *dst, unsigned short *pal, int line_offs, int lines
 
 soft_scale:
     stmfd   sp!,{r4-r11,lr}
index b1bf165..ef4a4dc 100644 (file)
@@ -35,6 +35,8 @@ unsigned short gp2x_palette16[256];
 
 int paletterefresh;
 
+extern int eoptions;
+
 #define FPS_COLOR 1
 
 
@@ -50,14 +52,14 @@ static void gp2x_text(unsigned char *screen, int x, int y, char *text, int color
                for (l=0;l<8;l++)
                 {
 
-                       screen[l*320+0]=(fontdata8x8[((text[i])*8)+l]&0x80)?color:screen[l*320+0];
-                       screen[l*320+1]=(fontdata8x8[((text[i])*8)+l]&0x40)?color:screen[l*320+1];
-                       screen[l*320+2]=(fontdata8x8[((text[i])*8)+l]&0x20)?color:screen[l*320+2];
-                       screen[l*320+3]=(fontdata8x8[((text[i])*8)+l]&0x10)?color:screen[l*320+3];
-                       screen[l*320+4]=(fontdata8x8[((text[i])*8)+l]&0x08)?color:screen[l*320+4];
-                       screen[l*320+5]=(fontdata8x8[((text[i])*8)+l]&0x04)?color:screen[l*320+5];
-                       screen[l*320+6]=(fontdata8x8[((text[i])*8)+l]&0x02)?color:screen[l*320+6];
-                       screen[l*320+7]=(fontdata8x8[((text[i])*8)+l]&0x01)?color:screen[l*320+7];
+                       screen[l*320+0]=(fontdata8x8[((text[i])*8)+l]&0x80)?color:0;
+                       screen[l*320+1]=(fontdata8x8[((text[i])*8)+l]&0x40)?color:0;
+                       screen[l*320+2]=(fontdata8x8[((text[i])*8)+l]&0x20)?color:0;
+                       screen[l*320+3]=(fontdata8x8[((text[i])*8)+l]&0x10)?color:0;
+                       screen[l*320+4]=(fontdata8x8[((text[i])*8)+l]&0x08)?color:0;
+                       screen[l*320+5]=(fontdata8x8[((text[i])*8)+l]&0x04)?color:0;
+                       screen[l*320+6]=(fontdata8x8[((text[i])*8)+l]&0x02)?color:0;
+                       screen[l*320+7]=(fontdata8x8[((text[i])*8)+l]&0x01)?color:0;
 
                }
                screen+=8;
@@ -70,7 +72,7 @@ void CleanSurface(void)
        int c=4;
        while (c--)
        {
-               memset(gp2x_screen, 0, 320*240);
+               memset32(gp2x_screen, 0, 320*240*2/4);
                gp2x_video_flip();
        }
        XBuf = gp2x_screen;
@@ -136,38 +138,24 @@ static INLINE void printFps(uint8 *screen)
                prevsec = tv_now.tv_sec;
        }
 
+       if (!Settings.showfps || !screen) return;
+
        if (Settings.scaling == 0)
        {
                if (needfpsflip)
                {
-                       int y, *destt = (int *) screen;
-                       for (y = 20/*240*/; y; y--)
-                       {
-                               *destt++ = 0; *destt++ = 0; *destt++ = 0; *destt++ = 0;
-                               *destt++ = 0; *destt++ = 0; *destt++ = 0; *destt++ = 0;
-                               destt += 64+8;
-
-                               //*destt++ = 0x3F3F3F3F; *destt++ = 0x3F3F3F3F; *destt++ = 0x3F3F3F3F; *destt++ = 0x3F3F3F3F;
-                               //*destt++ = 0x3F3F3F3F; *destt++ = 0x3F3F3F3F; *destt++ = 0x3F3F3F3F; *destt++ = 0x3F3F3F3F;
-                       }
-                       if (Settings.showfps)
-                       {
-                               int sep;
-                               for (sep=1; sep < 5; sep++)
-                                       if (fps_str[sep] == '/' || fps_str[sep] == 0) break;
-                               fps_str[sep] = 0;
-                               gp2x_text(screen, 0,  0, fps_str,       FPS_COLOR, 0);
-                               gp2x_text(screen, 0, 10, fps_str+sep+1, FPS_COLOR, 0);
-                       }
+                       int sep;
+                       for (sep=1; sep < 5; sep++)
+                               if (fps_str[sep] == '/' || fps_str[sep] == 0) break;
+                       fps_str[sep] = 0;
+                       gp2x_text(screen, 0,  0, fps_str,       FPS_COLOR, 0);
+                       gp2x_text(screen, 0, 10, fps_str+sep+1, FPS_COLOR, 0);
                        needfpsflip--;
                }
        }
        else
        {
-               if (Settings.showfps)
-               {
-                       gp2x_text(screen+32, 0, 0, fps_str, FPS_COLOR, 0); // TODO: firstline
-               }
+               gp2x_text(screen+32, 0, srendline, fps_str, FPS_COLOR, 0);
        }
 }
 
@@ -176,14 +164,30 @@ void BlitScreen(uint8 *buf)
 {
        framesEmulated++;
 
-       if (!buf) return;
+       if (!buf) {
+               printFps(0);
+               return;
+       }
 
        framesRendered++;
 
        printFps(gp2x_screen);
 
+       if (eoptions & EO_CLIPSIDES)
+       {
+               int i, *p = (int *) ((char *)gp2x_screen + 32);
+               for (i = 240; i; i--, p += 320/4)
+               {
+                       p[0] = p[1] = p[62] = p[63] = 0;
+               }
+       }
+
        if (Settings.scaling == 3)
-               soft_scale((char *)gp2x_screen + 32, gp2x_palette16, 0, 240);
+       {
+               soft_scale((char *)gp2x_screen + 32, gp2x_palette16, srendline, erendline-srendline);
+               if (srendline)
+                       memset32((int *)((char *)gp2x_screen + 32), 0, srendline*320*2/4);
+       }
 
        gp2x_video_flip();
        XBuf = gp2x_screen;
index 99a0867..daadc34 100644 (file)
@@ -117,7 +117,7 @@ static void do_emu_acts(uint32 acts)
 #define down(b) (keys & GP2X_##b)
 static void do_fake_mouse(unsigned long keys)
 {
-       static int x=0, y=0;
+       static int x=256/2, y=240/2;
        int speed = 3;
 
        if (down(A)) speed = 1;
index 4eaf3f6..caea8cc 100644 (file)
 #include "../common/unixdsp.h"
 #include "../common/cheat.h"
 
+#include "../../fce.h"
+
 #include "dface.h"
 
-// just for printing some iNES info for user..
-#include "../../fce.h"
-#include "../../ines.h"
+
+// TODO! broken fs0, sram saves
+
+void CleanSurface(void);
 
 // internals
 extern char lastLoadedGameName[2048];
@@ -50,12 +53,12 @@ extern uint8 Exit; // exit emu loop flag
 void CloseGame(void);
 
 FCEUGI *fceugi = NULL;
-static int ntsccol=0,ntschue=-1,ntsctint=-1;
+int ntsccol=0,ntschue=-1,ntsctint=-1;
 int soundvol=70;
 int inited=0;
 
-int srendlinev[2]={0,0};
-int erendlinev[2]={239,239};
+int srendlinev[2]={8,0};
+int erendlinev[2]={231,239};
 int srendline,erendline;
 
 
@@ -83,7 +86,6 @@ static void ParseGI(FCEUGI *gi)
   InputType[1]=gi->input[1];
  if(gi->inputfc>=0)
   InputTypeFC=gi->inputfc;
- FCEUI_GetCurrentVidSystem(&srendline,&erendline);
 }
 
 void FCEUD_PrintError(char *s)
@@ -130,8 +132,7 @@ void SaveConfig(const char *name)
        if (name)
             sprintf(tdir,"%s"PSS"cfg"PSS"%s.cfg",BaseDirectory,name);
        else sprintf(tdir,"%s"PSS"fceu2.cfg",BaseDirectory);
-        DriverInterface(DES_GETNTSCTINT,&ntsctint);
-        DriverInterface(DES_GETNTSCHUE,&ntschue);
+       FCEUI_GetNTSCTH(&ntsctint, &ntschue);
         SaveFCEUConfig(tdir,fceuconfig);
 }
 
@@ -141,9 +142,9 @@ static void LoadConfig(const char *name)
        if (name)
             sprintf(tdir,"%s"PSS"cfg"PSS"%s.cfg",BaseDirectory,name);
        else sprintf(tdir,"%s"PSS"fceu2.cfg",BaseDirectory);
+       FCEUI_GetNTSCTH(&ntsctint, &ntschue); /* Get default settings for if no config file exists. */
         LoadFCEUConfig(tdir,fceuconfig);
-        if(ntsctint>=0) DriverInterface(DES_SETNTSCTINT,&ntsctint);
-        if(ntschue>=0) DriverInterface(DES_SETNTSCHUE,&ntschue);
+       FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue);
 }
 
 static void LoadLLGN(void)
@@ -289,13 +290,10 @@ static int DoArgs(int argc, char *argv[])
          if(erendlinev[x]<srendlinev[x] || erendlinev[x]>239) erendlinev[x]=239;
        }
 
-       printf("main() setrendered lines: %d, %d, %d, %d\n",srendlinev[0],erendlinev[0],srendlinev[1],erendlinev[1]);
-        printf("main() clip sides %d\n", eoptions&EO_CLIPSIDES);
-        srendlinev[0]=0;
+       printf("FCEUI_SetRenderedLines: %d, %d, %d, %d\n",srendlinev[0],erendlinev[0],srendlinev[1],erendlinev[1]);
+        printf("clip sides: %d\n", eoptions&EO_CLIPSIDES);
         FCEUI_SetRenderedLines(srendlinev[0],erendlinev[0],srendlinev[1],erendlinev[1]);
-        FCEUI_SetRenderedLines(0,erendlinev[0],srendlinev[1],erendlinev[1]);
         FCEUI_SetSoundVolume(soundvol);
-       DriverInterface(DES_NTSCCOL,&ntsccol); // TODO
        DoDriverArgs();
 
        if(fcexp)
@@ -364,8 +362,9 @@ int CLImain(int argc, char *argv[])
        gp2x_opt_setup();
        gp2x_cpuclock_gamma_update();
        LoadLLGN();
+       FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue);
        if(cpalette)
-        LoadCPalette();
+        LoadCPalette(); // TODO
        if(InitSound())
         inited|=1;
 
@@ -422,13 +421,15 @@ int CLImain(int argc, char *argv[])
          }
 
         PrepareOtherInput();
+        FCEUI_GetCurrentVidSystem(&srendline,&erendline);
         gp2x_video_changemode(Settings.scaling == 3 ? 15 : 8);
         switch (Settings.scaling & 3) {
-                case 0: gp2x_video_RGB_setscaling(0, 320, 240); gp2x_video_set_offs(0); break;
-                case 1: gp2x_video_RGB_setscaling(0, 256, 240); gp2x_video_set_offs(32); break;
-                case 2: gp2x_video_RGB_setscaling(0, 256, 240); gp2x_video_set_offs(32); break; // TODO
-                case 3: gp2x_video_RGB_setscaling(0, 320, 240); gp2x_video_set_offs(32); break;
+                case 0: gp2x_video_set_offs(0);  gp2x_video_RGB_setscaling(0, 320, 240); break;
+                case 1: gp2x_video_set_offs(32); gp2x_video_RGB_setscaling(0, 256, 240); break;
+                case 2: gp2x_video_set_offs(32); gp2x_video_RGB_setscaling(srendline, 256, erendline-srendline); break;
+                case 3: gp2x_video_set_offs(32); gp2x_video_RGB_setscaling(0, 320, 240); break;
         }
+        CleanSurface();
         gp2x_start_sound(Settings.sound_rate, 16, 0);
         FCEUI_Emulate();
        }
index 68b9bff..1972024 100644 (file)
@@ -823,6 +823,19 @@ static void kc_sel_loop(void)
 \r
 // --------- FCEU options ----------\r
 \r
+extern int ntsccol,ntschue,ntsctint;\r
+extern int srendlinev[2];\r
+extern int erendlinev[2];\r
+extern int eoptions;\r
+\r
+\r
+static void int_incdec(int *p, int inc, int min, int max)\r
+{\r
+       *p += inc;\r
+       if      (*p < min) *p = min;\r
+       else if (*p > max) *p = max;\r
+}\r
+\r
 static void draw_fcemenu_options(int menu_sel)\r
 {\r
        int tl_x = 25, tl_y = 60, y;\r
@@ -830,8 +843,16 @@ static void draw_fcemenu_options(int menu_sel)
        y = tl_y;\r
        gp2x_fceu_copy_bg();\r
 \r
-       gp2x_text_out15(tl_x,  y,      "                           %s", "OFF"); // 0\r
-       gp2x_text_out15(tl_x, (y+=10), "Done");\r
+       gp2x_text_out15(tl_x,  y,      "NTSC Color Emulation       %s", ntsccol?"ON":"OFF");    // 0\r
+       gp2x_text_out15(tl_x, (y+=10), "  Tint (default: 56)       %i", ntsctint);\r
+       gp2x_text_out15(tl_x, (y+=10), "  Hue  (default: 72)       %i", ntschue);\r
+       gp2x_text_out15(tl_x, (y+=10), "First visible line (NTSC)  %i", srendlinev[0]);\r
+       gp2x_text_out15(tl_x, (y+=10), "Last visible line (NTSC)   %i", erendlinev[0]);\r
+       gp2x_text_out15(tl_x, (y+=10), "First visible line (PAL)   %i", srendlinev[1]);         // 5\r
+       gp2x_text_out15(tl_x, (y+=10), "Last visible line (PAL)    %i", erendlinev[1]);\r
+       gp2x_text_out15(tl_x, (y+=10), "Clip 8 left/right columns  %s", (eoptions&EO_CLIPSIDES)?"ON":"OFF");\r
+       gp2x_text_out15(tl_x, (y+=10), "Disable 8 sprite limit     %s", "TODO");\r
+       gp2x_text_out15(tl_x, (y+=10), "Done");                                                 // 9\r
 \r
        // draw cursor\r
        gp2x_text_out15(tl_x - 16, tl_y + menu_sel*10, ">");\r
@@ -841,9 +862,11 @@ static void draw_fcemenu_options(int menu_sel)
 \r
 static void fcemenu_loop_options(void)\r
 {\r
-       int menu_sel = 0, menu_sel_max = 1;\r
+       int menu_sel = 0, menu_sel_max = 9, i;\r
        unsigned long inp = 0;\r
 \r
+       FCEUI_GetNTSCTH(&ntsctint, &ntschue);\r
+\r
        for(;;)\r
        {\r
                draw_fcemenu_options(menu_sel);\r
@@ -852,15 +875,29 @@ static void fcemenu_loop_options(void)
                if(inp & GP2X_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }\r
                if((inp& GP2X_B)||(inp&GP2X_LEFT)||(inp&GP2X_RIGHT)) { // toggleable options\r
                        switch (menu_sel) {\r
-                               case  0: break;\r
-                               case  1: return;\r
+                               case  0: ntsccol = !ntsccol; break;\r
+                               case  7: eoptions^=EO_CLIPSIDES; break;\r
+                               case  9: return;\r
+                       }\r
+               }\r
+               if(inp & (GP2X_X|GP2X_A)) {\r
+                       for(i=0;i<2;i++)\r
+                       {\r
+                               if(srendlinev[i]<0 || srendlinev[i]>239) srendlinev[i]=0;\r
+                               if(erendlinev[i]<srendlinev[i] || erendlinev[i]>239) erendlinev[i]=239;\r
                        }\r
+                       FCEUI_SetNTSCTH(ntsccol, ntsctint, ntschue);\r
+                       FCEUI_SetRenderedLines(srendlinev[0],erendlinev[0],srendlinev[1],erendlinev[1]);\r
+                       return;\r
                }\r
-               if(inp & (GP2X_X|GP2X_A)) return;\r
                if(inp & (GP2X_LEFT|GP2X_RIGHT)) { // multi choise\r
                        switch (menu_sel) {\r
-                               case 0:\r
-                                       break;\r
+                               case  1: int_incdec(&ntsctint,      (inp & GP2X_LEFT) ? -1 : 1, 0, 128); break;\r
+                               case  2: int_incdec(&ntschue,       (inp & GP2X_LEFT) ? -1 : 1, 0, 128); break;\r
+                               case  3: int_incdec(&srendlinev[0], (inp & GP2X_LEFT) ? -1 : 1, 0, 239); break;\r
+                               case  4: int_incdec(&erendlinev[0], (inp & GP2X_LEFT) ? -1 : 1, 0, 239); break;\r
+                               case  5: int_incdec(&srendlinev[1], (inp & GP2X_LEFT) ? -1 : 1, 0, 239); break;\r
+                               case  6: int_incdec(&erendlinev[1], (inp & GP2X_LEFT) ? -1 : 1, 0, 239); break;\r
                        }\r
                }\r
        }\r
@@ -932,13 +969,6 @@ static int sndrate_prevnext(int rate, int dir)
        return rates[i];\r
 }\r
 \r
-static void int_incdec(int *p, int inc, int min, int max)\r
-{\r
-       *p += inc;\r
-       if      (*p < min) *p = min;\r
-       else if (*p > max) *p = max;\r
-}\r
-\r
 static void config_commit(void)\r
 {\r
        gp2x_cpuclock_gamma_update();\r
@@ -1161,6 +1191,7 @@ static int menu_loop_root(void)
                                        selfname = romsel_loop(curr_path);\r
                                        if (selfname) {\r
                                                printf("selected file: %s\n", selfname);\r
+                                               while (gp2x_joystick_read(1) & GP2X_B) usleep(50*1000);\r
                                                return 2;\r
                                        }\r
                                        break;\r
diff --git a/fce.c b/fce.c
index becc308..7cc5996 100644 (file)
--- a/fce.c
+++ b/fce.c
@@ -605,7 +605,7 @@ static void LineUpdate(uint8 *target)
 {
        uint32 tem;
 
-       if(FSkip)
+       if(FSkip || scanline < FSettings.FirstSLine || scanline > FSettings.LastSLine)
        {
           if(PPU_hook)
            PRefreshLine();
@@ -614,13 +614,7 @@ static void LineUpdate(uint8 *target)
        {
         if(ScreenON)
         {
-          if(scanline>=FSettings.FirstSLine && scanline<=FSettings.LastSLine)
-           BGRender(target);
-          else
-          {
-           if(PPU_hook)
-            PRefreshLine();
-          }
+          BGRender(target);
         }
         else
         {
@@ -1235,13 +1229,13 @@ static void DoLine(void)
 #ifdef FRAMESKIP
    if(!FSkip)
 #endif
-   if(SpriteON && spork)
-    CopySprites(target);
+   if(scanline>=FSettings.FirstSLine && scanline<=FSettings.LastSLine)
+   {
+    if(SpriteON && spork)
+     CopySprites(target);
 
-#ifdef FRAMESKIP
-   if(!FSkip)
-#endif
-   LineUpdateEnd(target);
+    LineUpdateEnd(target);
+   }
    sphitx=0x100;
 
    if(ScreenON || SpriteON)
diff --git a/nsf.c b/nsf.c
index ea77c6a..52da5e5 100644 (file)
--- a/nsf.c
+++ b/nsf.c
@@ -415,7 +415,7 @@ void DrawNSF(uint8 *XBuf)
   memset(XBuf+SCREEN_OFFS+x*SCREEN_WIDTH,0,256);\r
 \r
  if(FSettings.SoundVolume)\r
-  mul=8192*240/(16384*FSettings.SoundVolume/50)/8;\r
+  mul=8192*240/(16384*FSettings.SoundVolume/50);\r
 \r
  {\r
   int16 *Bufpl;\r
diff --git a/svga.c b/svga.c
index f345e76..d00a38a 100644 (file)
--- a/svga.c
+++ b/svga.c
@@ -139,12 +139,6 @@ uint8 DIPS=0;
 
 uint8 CommandQueue=0;
 
-static int controlselect=0;
-static int ntsccol=0;
-static int ntsctint=46+10;
-static int ntschue=72;
-static int controllength=0;
-
 
 void FCEUI_SetSnapName(int a)
 {
@@ -208,27 +202,12 @@ void DriverInterface(int w, void *d)
 {
  switch(w)
  {
-  case DES_NTSCCOL:ntsccol=*(int *)d;FCEU_ResetPalette();break;
   case DES_RESET:if(netplay!=2) CommandQueue=30;break;
   case DES_POWER:if(netplay!=2) CommandQueue=31;break;
-  case DES_GETNTSCTINT:*(int*)d=ntsctint;break;
-  case DES_GETNTSCHUE:*(int*)d=ntschue;break;
-  case DES_SETNTSCTINT:ntsctint=*(int*)d;if(ntsccol)FCEU_ResetPalette();break;
-  case DES_SETNTSCHUE:ntschue=*(int*)d;if(ntsccol)FCEU_ResetPalette();break;
-
-  case DES_FDSINSERT:if(netplay!=2) CommandQueue=2;break;
-  case DES_FDSEJECT:if(netplay!=2) CommandQueue=3;break;
-  case DES_FDSSELECT:if(netplay!=2) CommandQueue=1;break;
-/*
-  case DES_NSFINC:NSFControl(1);break;
-  case DES_NSFDEC:NSFControl(2);break;
-  case DES_NSFRES:NSFControl(0);break;
-*/
+
   case DES_VSUNIDIPSET:CommandQueue=10+(int)d;break;
   case DES_VSUNITOGGLEDIPVIEW:CommandQueue=10;break;
   case DES_VSUNICOIN:CommandQueue=19;break;
-  case DES_NTSCSELHUE:if(ntsccol && FCEUGameInfo.type!=GIT_VSUNI && !PAL && FCEUGameInfo.type!=GIT_NSF){controlselect=1;controllength=360;}break;
-  case DES_NTSCSELTINT:if(ntsccol && FCEUGameInfo.type!=GIT_VSUNI && !PAL && FCEUGameInfo.type!=GIT_NSF){controlselect=2;controllength=360;}break;
 #if 0
   case DES_NTSCDEC:
                  if(ntsccol && FCEUGameInfo.type!=GIT_VSUNI && !PAL && FCEUGameInfo.type!=GIT_NSF)
@@ -280,10 +259,6 @@ void DriverInterface(int w, void *d)
 #ifdef FRAMESKIP
 void FCEU_PutImageDummy(void)
 {
- if(FCEUGameInfo.type!=GIT_NSF)
- {
-  if(controllength) controllength--;
- }
  if(howlong) howlong--;        /* DrawMessage() */
  #ifdef FPS
  {