]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/modex16.c
added easter egg and palette updater stress test.... apparently ther eis a bug....
[16.git] / src / lib / modex16.c
index 79d1b26005dd83165f652f81fcf073e8f144f95f..bcf98c1187adff0119947cd3a992eece926cdae8 100644 (file)
@@ -593,7 +593,7 @@ modexPalWhite() {
 void
 modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqpp)
 {
-       byte *p = bmp->palette;
+       const byte *p = bmp->palette;
        word w=0;
        word q=0;
        word qq=0;
@@ -829,6 +829,23 @@ modexPalUpdate2(byte *p)
        }
 }
 
+void
+modexPalUpdate3(byte *p)
+{
+       int i;
+       modexWaitBorder();
+       outp(PAL_WRITE_REG, 0);  /* start at the beginning of palette */
+       for(i=0; i<PAL_SIZE/2; i++)
+       {
+               outp(PAL_DATA_REG, rand());
+       }
+       modexWaitBorder();          /* waits one retrace -- less flicker */
+       for(; i<PAL_SIZE; i++)
+       {
+               outp(PAL_DATA_REG, rand());
+       }
+}
+
 //color checker~
 //i want to make another vesion that checks the palette when the palette is being appened~
 void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z)