Previous 15994 Revisions Next

r6081 Thursday 15th October, 2009 at 00:04:43 UTC by Harmony
[CDI]
- Weighting planes when the Disable Mixing bit is set; DM disables mixing, not weighting. This makes many games look considerably better.
- Fixed MSF sector index increment and correction, fixes videos randomly flipping out
[src/mess/drivers]cdi.c

src/mess/drivers/cdi.c
r6080r6081
962962            (msf & 0x000f0000) >> 16,
963963            (msf & 0x00f00000) >> 20
964964         };
965         nybbles[2] -= 2;
966         if(nybbles[2] > 9)
965         if(nybbles[2] >= 2)
967966         {
968            nybbles[2] += 10;
969            nybbles[3]--;
967            nybbles[2] -= 2;
970968         }
969         else
970         {
971            nybbles[2] = 8 + nybbles[2];
972            if(nybbles[3] > 0)
973            {
974               nybbles[3]--;
975            }
976            else
977            {
978               nybbles[3] = 5;
979               if(nybbles[4] > 0)
980               {
981                  nybbles[4]--;
982               }
983               else
984               {
985                  nybbles[4] = 9;
986                  nybbles[5]--;
987               }
988            }
989         }
971990         lba = nybbles[0] + nybbles[1]*10 + ((nybbles[2] + nybbles[3]*10)*75) + ((nybbles[4] + nybbles[5]*10)*75*60);
972991
973992         //printf( "Reading Mode %d sector from MSF location %06x\n", cdic_regs.command - 0x28, cdic_regs.time | 2 );
r6080r6081
9961015            {
9971016               cdic_regs.time &= 0xfff0ffff;
9981017               cdic_regs.time += 0x00100000;
999               if((cdic_regs.time & 0x00f00000) == 0x00a00000)
1000               {
1001                  cdic_regs.time &= 0xff0fffff;
1002                  cdic_regs.time += 0x01000000;
1003                  if((cdic_regs.time & 0x0f000000) == 0x0a000000)
1004                  {
1005                     cdic_regs.time &= 0xf0ffffff;
1006                     cdic_regs.time += 0x10000000;
1007                  }
1008               }
10091018            }
10101019         }
1020         if((cdic_regs.time & 0x00ff0000) == 0x00600000)
1021         {
1022            cdic_regs.time &= 0xff00ffff;
1023            cdic_regs.time += 0x01000000;
1024            if((cdic_regs.time & 0x0f000000) == 0x0a000000)
1025            {
1026               cdic_regs.time &= 0xf0ffffff;
1027               cdic_regs.time += 0x10000000;
1028            }
1029         }
10111030
10121031         if(((buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_FORM | CDIC_SUBMODE_DATA | CDIC_SUBMODE_AUDIO | CDIC_SUBMODE_VIDEO)) == (CDIC_SUBMODE_FORM | CDIC_SUBMODE_AUDIO)) &&
10131032            (cdic_regs.channel & cdic_regs.audio_channel & (1 << buffer[CDIC_SECTOR_CHAN2])))
r6080r6081
10251044         }
10261045         else if((buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_DATA | CDIC_SUBMODE_AUDIO | CDIC_SUBMODE_VIDEO)) == 0x00)
10271046         {
1028            // Ignore the audio sector for now.
1029            if(!(buffer[CDIC_SECTOR_SUBMODE2] & CDIC_SUBMODE_TRIG))
1047            if(buffer[CDIC_SECTOR_SUBMODE2] & CDIC_SUBMODE_TRIG)
10301048            {
1031               verboselog(machine, 0, "Message sector, ignored\n" );
1032            }
1033            else
1034            {
10351049               cdic_regs.x_buffer |= 0x8000;
10361050
10371051               cdic_regs.data_buffer |= 0x4000;
r6080r6081
10421056               cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), M68K_IRQ_4, 128);
10431057               cputag_set_input_line(machine, "maincpu", M68K_IRQ_4, ASSERT_LINE);
10441058            }
1059            else
1060            {
1061               verboselog(machine, 0, "Message sector, ignored\n" );
1062            }
10451063         }
1046         else
1064         else /*if(buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_DATA | CDIC_SUBMODE_VIDEO))*/
10471065         {
10481066            cdic_regs.x_buffer |= 0x8000;
10491067
r6080r6081
29833001               plane_enable_b = 1;
29843002               break;
29853003         }
3004         plane_a_r_cur = (plane_a_r_cur * mcd212.channel[0].weight_factor_a[x]) >> 6;
3005         plane_a_g_cur = (plane_a_g_cur * mcd212.channel[0].weight_factor_a[x]) >> 6;
3006         plane_a_b_cur = (plane_a_b_cur * mcd212.channel[0].weight_factor_a[x]) >> 6;
3007         plane_b_r_cur = (plane_b_r_cur * mcd212.channel[1].weight_factor_b[x]) >> 6;
3008         plane_b_g_cur = (plane_b_g_cur * mcd212.channel[1].weight_factor_b[x]) >> 6;
3009         plane_b_b_cur = (plane_b_b_cur * mcd212.channel[1].weight_factor_b[x]) >> 6;
29863010         switch(mcd212.channel[0].plane_order)
29873011         {
29883012            case MCD212_POR_AB:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team