src/mess/drivers/cdi.c
| r6080 | r6081 | |
| 962 | 962 | (msf & 0x000f0000) >> 16, |
| 963 | 963 | (msf & 0x00f00000) >> 20 |
| 964 | 964 | }; |
| 965 | | nybbles[2] -= 2; |
| 966 | | if(nybbles[2] > 9) |
| 965 | if(nybbles[2] >= 2) |
| 967 | 966 | { |
| 968 | | nybbles[2] += 10; |
| 969 | | nybbles[3]--; |
| 967 | nybbles[2] -= 2; |
| 970 | 968 | } |
| 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 | } |
| 971 | 990 | lba = nybbles[0] + nybbles[1]*10 + ((nybbles[2] + nybbles[3]*10)*75) + ((nybbles[4] + nybbles[5]*10)*75*60); |
| 972 | 991 | |
| 973 | 992 | //printf( "Reading Mode %d sector from MSF location %06x\n", cdic_regs.command - 0x28, cdic_regs.time | 2 ); |
| r6080 | r6081 | |
| 996 | 1015 | { |
| 997 | 1016 | cdic_regs.time &= 0xfff0ffff; |
| 998 | 1017 | 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 | | } |
| 1009 | 1018 | } |
| 1010 | 1019 | } |
| 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 | } |
| 1011 | 1030 | |
| 1012 | 1031 | if(((buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_FORM | CDIC_SUBMODE_DATA | CDIC_SUBMODE_AUDIO | CDIC_SUBMODE_VIDEO)) == (CDIC_SUBMODE_FORM | CDIC_SUBMODE_AUDIO)) && |
| 1013 | 1032 | (cdic_regs.channel & cdic_regs.audio_channel & (1 << buffer[CDIC_SECTOR_CHAN2]))) |
| r6080 | r6081 | |
| 1025 | 1044 | } |
| 1026 | 1045 | else if((buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_DATA | CDIC_SUBMODE_AUDIO | CDIC_SUBMODE_VIDEO)) == 0x00) |
| 1027 | 1046 | { |
| 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) |
| 1030 | 1048 | { |
| 1031 | | verboselog(machine, 0, "Message sector, ignored\n" ); |
| 1032 | | } |
| 1033 | | else |
| 1034 | | { |
| 1035 | 1049 | cdic_regs.x_buffer |= 0x8000; |
| 1036 | 1050 | |
| 1037 | 1051 | cdic_regs.data_buffer |= 0x4000; |
| r6080 | r6081 | |
| 1042 | 1056 | cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), M68K_IRQ_4, 128); |
| 1043 | 1057 | cputag_set_input_line(machine, "maincpu", M68K_IRQ_4, ASSERT_LINE); |
| 1044 | 1058 | } |
| 1059 | else |
| 1060 | { |
| 1061 | verboselog(machine, 0, "Message sector, ignored\n" ); |
| 1062 | } |
| 1045 | 1063 | } |
| 1046 | | else |
| 1064 | else /*if(buffer[CDIC_SECTOR_SUBMODE2] & (CDIC_SUBMODE_DATA | CDIC_SUBMODE_VIDEO))*/ |
| 1047 | 1065 | { |
| 1048 | 1066 | cdic_regs.x_buffer |= 0x8000; |
| 1049 | 1067 | |
| r6080 | r6081 | |
| 2983 | 3001 | plane_enable_b = 1; |
| 2984 | 3002 | break; |
| 2985 | 3003 | } |
| 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; |
| 2986 | 3010 | switch(mcd212.channel[0].plane_order) |
| 2987 | 3011 | { |
| 2988 | 3012 | case MCD212_POR_AB: |