Previous 15994 Revisions Next

r5148 Sunday 5th July, 2009 at 02:16:13 UTC by Barry Rodewald
[FM77AV] Added implementation of the 'invalid' ALU function.
[src/mess/video]fm7.c

src/mess/video/fm7.c
r5147r5148
2727   UINT16 x1;
2828   UINT16 y0;
2929   UINT16 y1;
30   UINT8 busy;
3031} fm7_alu;
3132
3233extern UINT8* fm7_video_ram;
r5147r5148
335336   }
336337}
337338
339static void fm7_alu_function_invalid(UINT32 offset)
340{
341   // Invalid function, still does something though (used by Laydock)
342   int x;
343   UINT8 dat;
344   int page = 0;
345   UINT8 mask;
346   
347   if(fm7_alu.command & 0x40)
348      fm7_alu_function_compare(offset);
349   
350   if(offset >= 0xc000)
351      page = 1;
352   
353   for(x=0;x<3;x++) // cycle through banks
354   {
355      if(!(fm7_alu.bank_disable & (1 << x)))
356      {
357         mask = (fm7_video_ram[(offset & 0x3fff) + (x * 0x4000) + (page * 0xc000)]);
358         
359         dat = mask & fm7_alu.mask;
360           
361         fm7_video_ram[(offset & 0x3fff) + (x * 0x4000) + (page * 0xc000)] = dat;
362      }
363   }
364}
365
338366static void fm7_alu_function_tilepaint(UINT32 offset)
339367{
340368   // TILEPAINT - writes to VRAM based on the tilepaint colour registers
r5147r5148
401429         break;
402430      case 0x01:
403431      default:
404         popmessage("ALU: Invalid draw mode %i used\n",fm7_alu.command & 0x07);
432         fm7_alu_function_invalid(offset);
405433   }
406434}
407435

Previous 15994 Revisions Next


© 1998-2018 The MESS Team