Previous 15994 Revisions Next

r5949 Saturday 3rd October, 2009 at 07:50:43 UTC by Barry Rodewald
[FMTOWNS] Fixed palette.
[src/mess/drivers]fmtowns.c

src/mess/drivers/fmtowns.c
r5948r5949
320320      case 0x00:
321321         return towns_palette_select;
322322      case 0x02:
323         return towns_palette_b[towns_palette_select];
324      case 0x04:
323325         return towns_palette_r[towns_palette_select];
324      case 0x04:
326      case 0x06:
325327         return towns_palette_g[towns_palette_select];
326      case 0x06:
327         return towns_palette_b[towns_palette_select];
328328      case 0x08:
329329      case 0x09:
330330      case 0x0a:
r5948r5949
347347         towns_palette_select = data;
348348         break;
349349      case 0x02:
350         towns_palette_r[towns_palette_select] = data;
350         towns_palette_b[towns_palette_select] = data;
351351         break;
352352      case 0x04:
353         towns_palette_g[towns_palette_select] = data;
353         towns_palette_r[towns_palette_select] = data;
354354         break;
355355      case 0x06:
356         towns_palette_b[towns_palette_select] = data;
356         towns_palette_g[towns_palette_select] = data;
357357         break;
358358      case 0x08:
359359      case 0x09:
r5948r5949
366366         towns_degipal[offset-0x08] = data;
367367         break;
368368   }
369//   logerror("VID: wrote 0x%02x to port %04x\n",data,offset+0xfd90);
369   logerror("VID: wrote 0x%02x to port %04x\n",data,offset+0xfd90);
370370}
371371
372372static READ8_HANDLER(towns_keyboard_r)
r5948r5949
800800         dat2 = towns_gfxvram[(x/8) + (y*0x50) + 0x8000];
801801         dat3 = towns_gfxvram[(x/8) + (y*0x50) + 0x10000];
802802         dat4 = towns_gfxvram[(x/8) + (y*0x50) + 0x18000];
803         colour = (dat1 & (1 << bit) ? 8 : 0)
804            | (dat2 & (1 << bit) ? 4 : 0)
805            | (dat3 & (1 << bit) ? 2 : 0)
806            | (dat4 & (1 << bit) ? 1 : 0);
803         colour = (dat1 & (1 << bit) ? 1 : 0)
804            | (dat2 & (1 << bit) ? 2 : 0)
805            | (dat3 & (1 << bit) ? 4 : 0)
806            | (dat4 & (1 << bit) ? 8 : 0);
807807         *BITMAP_ADDR32(bitmap,y,x) =
808808            (towns_palette_r[colour] << 16)
809809            | (towns_palette_g[colour] << 8)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team