src/mess/drivers/cdi.c
| r6147 | r6148 | |
| 45 | 45 | |
| 46 | 46 | #define ENABLE_UART_PRINTING (0) |
| 47 | 47 | |
| 48 | | #define VERBOSE_LEVEL (6) |
| 48 | #define VERBOSE_LEVEL (5) |
| 49 | 49 | |
| 50 | 50 | #define ENABLE_VERBOSE_LOG (0) |
| 51 | 51 | |
| r6147 | r6148 | |
| 1353 | 1353 | cdic_regs.audio_buffer |= 0x8000; |
| 1354 | 1354 | } |
| 1355 | 1355 | |
| 1356 | // Set the CDIC interrupt line |
| 1357 | verboselog(machine, 0, "Setting CDIC interrupt line for soundmap decode\n" ); |
| 1358 | cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), M68K_IRQ_4, 128); |
| 1359 | cputag_set_input_line(machine, "maincpu", M68K_IRQ_4, ASSERT_LINE); |
| 1360 | |
| 1356 | 1361 | if(CDIC_IS_VALID_SAMPLE_BUF(cdic_regs.z_buffer & 0x3ffe)) |
| 1357 | 1362 | { |
| 1358 | 1363 | attotime period; |
| 1359 | 1364 | |
| 1360 | 1365 | verboselog(machine, 0, "Hit audio_sample_trigger, with cdic_regs.z_buffer == %04x, calling cdic_decode_audio_sector\n", cdic_regs.z_buffer ); |
| 1361 | 1366 | |
| 1362 | | // Set the CDIC interrupt line |
| 1363 | | verboselog(machine, 0, "Setting CDIC interrupt line for soundmap decode\n" ); |
| 1364 | | cpu_set_input_line_vector(cputag_get_cpu(machine, "maincpu"), M68K_IRQ_4, 128); |
| 1365 | | cputag_set_input_line(machine, "maincpu", M68K_IRQ_4, ASSERT_LINE); |
| 1366 | | |
| 1367 | 1367 | // Decode the data at Z+4, the same offset as a normal CD sector. |
| 1368 | 1368 | cdic_decode_audio_sector(machine, ((UINT8*)cdram) + (cdic_regs.z_buffer & 0x3ffe) + 4, 1); |
| 1369 | 1369 | |
| r6147 | r6148 | |
| 1385 | 1385 | } |
| 1386 | 1386 | else |
| 1387 | 1387 | { |
| 1388 | | // Swap buffer positions to indicate our new buffer position at the next read |
| 1389 | 1388 | cdic_regs.z_buffer &= 0xfffe; |
| 1390 | | cdic_regs.z_buffer += 0xa00; |
| 1391 | | if(cdic_regs.z_buffer == 0x3c00) |
| 1392 | | { |
| 1393 | | cdic_regs.z_buffer = 0x2800; |
| 1394 | | } |
| 1395 | | |
| 1396 | | cdic_regs.z_buffer &= 0xfffe; |
| 1397 | 1389 | verboselog(machine, 0, "Data is not valid, stopping playback\n" ); |
| 1398 | 1390 | timer_adjust_oneshot(cdic_regs.audio_sample_timer, attotime_never, 0); |
| 1399 | 1391 | } |
| r6147 | r6148 | |
| 1658 | 1650 | //printf("Clearing CDIC interrupt line\n" ); |
| 1659 | 1651 | } |
| 1660 | 1652 | cdic_regs.data_buffer &= ~0x4000; |
| 1661 | | if(cdic_regs.data_buffer & 0x8000) |
| 1662 | | { |
| 1663 | | if(cdic_regs.command == 0x2c) |
| 1664 | | { |
| 1665 | | cdic_regs.data_buffer &= ~0x8000; |
| 1666 | | } |
| 1667 | | } |
| 1668 | 1653 | return temp; |
| 1669 | 1654 | } |
| 1670 | 1655 | default: |
| r6147 | r6148 | |
| 1794 | 1779 | break; |
| 1795 | 1780 | case 0x2c: // Seek |
| 1796 | 1781 | cdic_regs.data_buffer &= 0x7fff; |
| 1782 | //cdic_regs.x_buffer |= 0x8000; |
| 1797 | 1783 | break; |
| 1798 | 1784 | default: |
| 1799 | 1785 | verboselog(space->machine, 0, "Unknown CDIC command: %02x\n", cdic_regs.command ); |
| r6147 | r6148 | |
| 2367 | 2353 | #define MCD212_DDR_FT_BMP2 0x0100 // Bitmap (alt.) |
| 2368 | 2354 | #define MCD212_DDR_FT_RLE 0x0200 // Run-Length Encoded |
| 2369 | 2355 | #define MCD212_DDR_FT_MOSAIC 0x0300 // Mosaic |
| 2370 | | #define MCD212_DDR_MT 0x0c00 // Mosaic File Type |
| 2371 | | #define MCD212_DDR_MT_2 0x0000 // 2x1 |
| 2372 | | #define MCD212_DDR_MT_4 0x0400 // 4x1 |
| 2373 | | #define MCD212_DDR_MT_8 0x0800 // 8x1 |
| 2374 | | #define MCD212_DDR_MT_16 0x0c00 // 16x1 |
| 2375 | | #define MCD212_DDR_MT_SHIFT 10 |
| 2376 | 2356 | |
| 2377 | 2357 | static const UINT16 cdi220_lcd_char[20*22] = |
| 2378 | 2358 | { |
| r6147 | r6148 | |
| 2977 | 2957 | { |
| 2978 | 2958 | int x = 0; |
| 2979 | 2959 | |
| 2980 | | static int latched_rf0 = 0; |
| 2981 | | static int latched_rf1 = 0; |
| 2982 | | static int latched_wfa = 0; |
| 2983 | | static int latched_wfb = 0; |
| 2984 | | latched_wfa = mcd212.channel[0].weight_factor_a[0]; |
| 2985 | | latched_wfb = mcd212.channel[1].weight_factor_b[0]; |
| 2960 | int latched_rf0 = 0; |
| 2961 | int latched_rf1 = 0; |
| 2962 | int latched_wfa = mcd212.channel[0].weight_factor_a[0]; |
| 2963 | int latched_wfb = mcd212.channel[1].weight_factor_b[0]; |
| 2964 | int reg = 0; |
| 2986 | 2965 | for(x = 0; x < 768; x++) |
| 2987 | 2966 | { |
| 2988 | 2967 | if(mcd212.channel[0].image_coding_method & MCD212_ICM_NR) |
| r6147 | r6148 | |
| 3092 | 3071 | } |
| 3093 | 3072 | else |
| 3094 | 3073 | { |
| 3095 | | int reg = 0; |
| 3096 | | for(reg = 0; reg < 8; reg++) |
| 3074 | if(reg < 8) |
| 3097 | 3075 | { |
| 3098 | 3076 | int flag = (mcd212.channel[0].region_control[reg] & MCD212_RC_RF) >> MCD212_RC_RF_SHIFT; |
| 3099 | | if(mcd212.channel[0].region_control[reg] == 0) |
| 3077 | if(!(mcd212.channel[0].region_control[reg] & MCD212_RC_OP)) |
| 3100 | 3078 | { |
| 3079 | for(; x < 768; x++) |
| 3080 | { |
| 3081 | mcd212.channel[0].weight_factor_a[x] = latched_wfa; |
| 3082 | mcd212.channel[1].weight_factor_b[x] = latched_wfb; |
| 3083 | mcd212.region_flag_0[x] = latched_rf0; |
| 3084 | mcd212.region_flag_1[x] = latched_rf1; |
| 3085 | } |
| 3101 | 3086 | break; |
| 3102 | 3087 | } |
| 3103 | 3088 | if(x == (mcd212.channel[0].region_control[reg] & MCD212_RC_X)) |
| r6147 | r6148 | |
| 3188 | 3173 | } |
| 3189 | 3174 | break; |
| 3190 | 3175 | } |
| 3191 | | break; |
| 3176 | reg++; |
| 3192 | 3177 | } |
| 3193 | 3178 | } |
| 3194 | 3179 | } |
| r6147 | r6148 | |
| 3211 | 3196 | UINT8 *clut_r = mcd212.channel[0].clut_r; |
| 3212 | 3197 | UINT8 *clut_g = mcd212.channel[0].clut_g; |
| 3213 | 3198 | UINT8 *clut_b = mcd212.channel[0].clut_b; |
| 3214 | | UINT8 mosaic_enable = ((mcd212.channel[channel].ddr & MCD212_DDR_FT) == MCD212_DDR_FT_MOSAIC); |
| 3215 | | UINT8 mosaic_factor = 1 << (((mcd212.channel[channel].ddr & MCD212_DDR_MT) >> MCD212_DDR_MT_SHIFT) + 1); |
| 3216 | | int mosaic_index = 0; |
| 3217 | 3199 | |
| 3218 | 3200 | //printf( "vsr before: %08x: ", vsr ); |
| 3219 | 3201 | //fflush(stdout); |
| r6147 | r6148 | |
| 3234 | 3216 | { |
| 3235 | 3217 | case MCD212_DDR_FT_BMP: |
| 3236 | 3218 | case MCD212_DDR_FT_BMP2: |
| 3237 | | case MCD212_DDR_FT_MOSAIC: |
| 3238 | 3219 | if(mcd212.channel[channel].dcr & MCD212_DCR_CM) |
| 3239 | 3220 | { |
| 3240 | 3221 | // 4-bit Bitmap |
| r6147 | r6148 | |
| 3264 | 3245 | bY = bU = bV = 0x80; |
| 3265 | 3246 | break; |
| 3266 | 3247 | } |
| 3267 | | for(; x < 768; x += 2) |
| 3248 | for(; x < 768; x += 4) |
| 3268 | 3249 | { |
| 3269 | 3250 | BYTE68K b0 = byte; |
| 3270 | 3251 | BYTE68K bU1 = bU + mcd212_abDeltaUV[b0]; |
| r6147 | r6148 | |
| 3291 | 3272 | pixels_g[x + 0] = pixels_g[x + 1] = pbLimit[mcd212_abMatrixUG[bU] + mcd212_abMatrixVG[bV]]; |
| 3292 | 3273 | pixels_b[x + 0] = pixels_b[x + 1] = pbLimit[mcd212_abMatrixUB[bU]]; |
| 3293 | 3274 | |
| 3294 | | if(mosaic_enable) |
| 3295 | | { |
| 3296 | | for(mosaic_index = 0; mosaic_index < mosaic_factor; mosaic_index++) |
| 3297 | | { |
| 3298 | | pixels_r[x + 0 + mosaic_index*2] = pixels_r[x + 0]; |
| 3299 | | pixels_g[x + 0 + mosaic_index*2] = pixels_g[x + 0]; |
| 3300 | | pixels_b[x + 0 + mosaic_index*2] = pixels_b[x + 0]; |
| 3301 | | pixels_r[x + 1 + mosaic_index*2] = pixels_r[x + 1]; |
| 3302 | | pixels_g[x + 1 + mosaic_index*2] = pixels_g[x + 1]; |
| 3303 | | pixels_b[x + 1 + mosaic_index*2] = pixels_b[x + 1]; |
| 3304 | | } |
| 3305 | | x += mosaic_factor * 2; |
| 3306 | | } |
| 3307 | | else |
| 3308 | | { |
| 3309 | | x += 2; |
| 3310 | | } |
| 3311 | | |
| 3312 | 3275 | bY = bY1; |
| 3313 | 3276 | bU = bU1; |
| 3314 | 3277 | bV = bV1; |
| 3315 | 3278 | |
| 3316 | 3279 | pbLimit = mcd212_abLimit + bY + BYTE68K_MAX; |
| 3317 | 3280 | |
| 3318 | | pixels_r[x + 0] = pixels_r[x + 1] = pbLimit[mcd212_abMatrixVR[bV]]; |
| 3319 | | pixels_g[x + 0] = pixels_g[x + 1] = pbLimit[mcd212_abMatrixUG[bU] + mcd212_abMatrixVG[bV]]; |
| 3320 | | pixels_b[x + 0] = pixels_b[x + 1] = pbLimit[mcd212_abMatrixUB[bU]]; |
| 3281 | pixels_r[x + 2] = pixels_r[x + 3] = pbLimit[mcd212_abMatrixVR[bV]]; |
| 3282 | pixels_g[x + 2] = pixels_g[x + 3] = pbLimit[mcd212_abMatrixUG[bU] + mcd212_abMatrixVG[bV]]; |
| 3283 | pixels_b[x + 2] = pixels_b[x + 3] = pbLimit[mcd212_abMatrixUB[bU]]; |
| 3321 | 3284 | |
| 3322 | | if(mosaic_enable) |
| 3323 | | { |
| 3324 | | for(mosaic_index = 0; mosaic_index < mosaic_factor; mosaic_index++) |
| 3325 | | { |
| 3326 | | pixels_r[x + 0 + mosaic_index*2] = pixels_r[x + 0]; |
| 3327 | | pixels_g[x + 0 + mosaic_index*2] = pixels_g[x + 0]; |
| 3328 | | pixels_b[x + 0 + mosaic_index*2] = pixels_b[x + 0]; |
| 3329 | | pixels_r[x + 1 + mosaic_index*2] = pixels_r[x + 1]; |
| 3330 | | pixels_g[x + 1 + mosaic_index*2] = pixels_g[x + 1]; |
| 3331 | | pixels_b[x + 1 + mosaic_index*2] = pixels_b[x + 1]; |
| 3332 | | } |
| 3333 | | x += (mosaic_factor * 2) - 2; |
| 3334 | | } |
| 3335 | | |
| 3336 | 3285 | byte = data[(vsr & 0x0007ffff) ^ 1]; |
| 3337 | 3286 | |
| 3338 | 3287 | vsr++; |
| r6147 | r6148 | |
| 3350 | 3299 | pixels_r[x + 1] = clut_r[clut_entry]; |
| 3351 | 3300 | pixels_g[x + 1] = clut_g[clut_entry]; |
| 3352 | 3301 | pixels_b[x + 1] = clut_b[clut_entry]; |
| 3353 | | if(mosaic_enable) |
| 3354 | | { |
| 3355 | | for(mosaic_index = 0; mosaic_index < mosaic_factor; mosaic_index++) |
| 3356 | | { |
| 3357 | | pixels_r[x + 0 + mosaic_index*2] = pixels_r[x + 0]; |
| 3358 | | pixels_g[x + 0 + mosaic_index*2] = pixels_g[x + 0]; |
| 3359 | | pixels_b[x + 0 + mosaic_index*2] = pixels_b[x + 0]; |
| 3360 | | pixels_r[x + 1 + mosaic_index*2] = pixels_r[x + 1]; |
| 3361 | | pixels_g[x + 1 + mosaic_index*2] = pixels_g[x + 1]; |
| 3362 | | pixels_b[x + 1 + mosaic_index*2] = pixels_b[x + 1]; |
| 3363 | | } |
| 3364 | | x += (mosaic_factor * 2) - 2; |
| 3365 | | } |
| 3366 | 3302 | byte = data[(vsr & 0x0007ffff) ^ 1]; |
| 3367 | 3303 | vsr++; |
| 3368 | 3304 | } |
| r6147 | r6148 | |
| 3374 | 3310 | { |
| 3375 | 3311 | UINT8 even_entry = BYTE_TO_CLUT(channel, icm, byte >> 4); |
| 3376 | 3312 | UINT8 odd_entry = BYTE_TO_CLUT(channel, icm, byte); |
| 3377 | | if(mosaic_enable) |
| 3378 | | { |
| 3379 | | for(mosaic_index = 0; mosaic_index < mosaic_factor; mosaic_index++) |
| 3380 | | { |
| 3381 | | pixels_r[x + mosaic_index] = clut_r[even_entry]; |
| 3382 | | pixels_g[x + mosaic_index] = clut_g[even_entry]; |
| 3383 | | pixels_b[x + mosaic_index] = clut_b[even_entry]; |
| 3384 | | } |
| 3385 | | for(mosaic_index = 0; mosaic_index < mosaic_factor; mosaic_index++) |
| 3386 | | { |
| 3387 | | pixels_r[x + mosaic_factor + mosaic_index] = clut_r[odd_entry]; |
| 3388 | | pixels_g[x + mosaic_factor + mosaic_index] = clut_g[odd_entry]; |
| 3389 | | pixels_b[x + mosaic_factor + mosaic_index] = clut_b[odd_entry]; |
| 3390 | | } |
| 3391 | | x += (mosaic_factor * 2) - 2; |
| 3392 | | } |
| 3393 | | else |
| 3394 | | { |
| 3395 | | pixels_r[x + 0] = clut_r[even_entry]; |
| 3396 | | pixels_g[x + 0] = clut_g[even_entry]; |
| 3397 | | pixels_b[x + 0] = clut_b[even_entry]; |
| 3398 | | pixels_r[x + 1] = clut_r[odd_entry]; |
| 3399 | | pixels_g[x + 1] = clut_g[odd_entry]; |
| 3400 | | pixels_b[x + 1] = clut_b[odd_entry]; |
| 3401 | | } |
| 3313 | pixels_r[x + 0] = clut_r[even_entry]; |
| 3314 | pixels_g[x + 0] = clut_g[even_entry]; |
| 3315 | pixels_b[x + 0] = clut_b[even_entry]; |
| 3316 | pixels_r[x + 1] = clut_r[odd_entry]; |
| 3317 | pixels_g[x + 1] = clut_g[odd_entry]; |
| 3318 | pixels_b[x + 1] = clut_b[odd_entry]; |
| 3402 | 3319 | byte = data[(vsr & 0x0007ffff) ^ 1]; |
| 3403 | 3320 | vsr++; |
| 3404 | 3321 | } |
| r6147 | r6148 | |
| 3492 | 3409 | } |
| 3493 | 3410 | } |
| 3494 | 3411 | break; |
| 3495 | | /* |
| 3412 | case MCD212_DDR_FT_MOSAIC: |
| 3496 | 3413 | verboselog(machine, 0, "Unsupported display mode: Mosaic\n" ); |
| 3497 | | memset(pixels_r, 0x10, 768); |
| 3498 | | memset(pixels_g, 0x10, 768); |
| 3499 | | memset(pixels_b, 0x10, 768); |
| 3500 | 3414 | done = 1; |
| 3501 | 3415 | break; |
| 3502 | | */ |
| 3503 | 3416 | } |
| 3504 | 3417 | } |
| 3505 | 3418 | |
| r6147 | r6148 | |
| 3570 | 3483 | UINT8 transparent_color_b_r = (UINT8)(mcd212.channel[1].transparent_color_b >> 16); |
| 3571 | 3484 | UINT8 transparent_color_b_g = (UINT8)(mcd212.channel[1].transparent_color_b >> 8); |
| 3572 | 3485 | UINT8 transparent_color_b_b = (UINT8)(mcd212.channel[1].transparent_color_b >> 0); |
| 3573 | | UINT8 dyuv_enable_a = (mcd212.channel[0].image_coding_method & 0x0000000f) == 5; |
| 3574 | | UINT8 dyuv_enable_b = ((mcd212.channel[0].image_coding_method >> 8) & 0x0000000f) == 5; |
| 3486 | UINT8 image_coding_method_a = mcd212.channel[0].image_coding_method & 0x0000000f; |
| 3487 | UINT8 image_coding_method_b = (mcd212.channel[0].image_coding_method >> 8) & 0x0000000f; |
| 3488 | UINT8 dyuv_enable_a = (image_coding_method_a == 5); |
| 3489 | UINT8 dyuv_enable_b = (image_coding_method_b == 5); |
| 3575 | 3490 | UINT8 mosaic_enable_a = (mcd212.channel[0].mosaic_hold_a & 0x800000) >> 23; |
| 3576 | 3491 | UINT8 mosaic_enable_b = (mcd212.channel[1].mosaic_hold_b & 0x800000) >> 23; |
| 3577 | 3492 | UINT8 mosaic_count_a = (mcd212.channel[0].mosaic_hold_a & 0x0000ff) << 1; |
| r6147 | r6148 | |
| 3602 | 3517 | plane_enable_a = 0; |
| 3603 | 3518 | break; |
| 3604 | 3519 | case 1: |
| 3605 | | plane_enable_a = (plane_a_r_cur != transparent_color_a_r || plane_a_g_cur != transparent_color_a_g || plane_a_b_cur != transparent_color_a_b) || dyuv_enable_a; |
| 3520 | plane_enable_a = (plane_a_r_cur != transparent_color_a_r || plane_a_g_cur != transparent_color_a_g || plane_a_b_cur != transparent_color_a_b); |
| 3606 | 3521 | break; |
| 3607 | 3522 | case 3: |
| 3608 | | plane_enable_a = mcd212.region_flag_0[x]; |
| 3523 | plane_enable_a = !mcd212.region_flag_0[x]; |
| 3609 | 3524 | break; |
| 3610 | 3525 | case 4: |
| 3611 | | plane_enable_a = mcd212.region_flag_1[x]; |
| 3526 | plane_enable_a = !mcd212.region_flag_1[x]; |
| 3612 | 3527 | break; |
| 3613 | 3528 | case 5: |
| 3614 | | plane_enable_a = (plane_a_r_cur != transparent_color_a_r || plane_a_g_cur != transparent_color_a_g || plane_a_b_cur != transparent_color_a_b || dyuv_enable_a || mcd212.region_flag_0[x] == 1); |
| 3529 | plane_enable_a = (plane_a_r_cur != transparent_color_a_r || plane_a_g_cur != transparent_color_a_g || plane_a_b_cur != transparent_color_a_b) && (dyuv_enable_a || mcd212.region_flag_0[x] == 0); |
| 3615 | 3530 | break; |
| 3616 | 3531 | case 6: |
| 3617 | | plane_enable_a = (plane_a_r_cur != transparent_color_a_r || plane_a_g_cur != transparent_color_a_g || plane_a_b_cur != transparent_color_a_b || dyuv_enable_a || mcd212.region_flag_1[x] == 1); |
| 3532 | plane_enable_a = (plane_a_r_cur != transparent_color_a_r || plane_a_g_cur != transparent_color_a_g || plane_a_b_cur != transparent_color_a_b) && (dyuv_enable_a || mcd212.region_flag_1[x] == 0); |
| 3618 | 3533 | break; |
| 3619 | 3534 | case 8: |
| 3620 | 3535 | plane_enable_a = 1; |
| 3621 | 3536 | break; |
| 3622 | 3537 | case 9: |
| 3623 | | plane_enable_a = (plane_a_r_cur == transparent_color_a_r && plane_a_g_cur == transparent_color_a_g && plane_a_b_cur == transparent_color_a_b) || dyuv_enable_a; |
| 3538 | plane_enable_a = (plane_a_r_cur == transparent_color_a_r && plane_a_g_cur == transparent_color_a_g && plane_a_b_cur == transparent_color_a_b); |
| 3624 | 3539 | break; |
| 3625 | 3540 | case 11: |
| 3626 | | plane_enable_a = !mcd212.region_flag_0[x]; |
| 3541 | plane_enable_a = mcd212.region_flag_0[x]; |
| 3627 | 3542 | break; |
| 3628 | 3543 | case 12: |
| 3629 | | plane_enable_a = !mcd212.region_flag_1[x]; |
| 3544 | plane_enable_a = mcd212.region_flag_1[x]; |
| 3630 | 3545 | break; |
| 3631 | 3546 | case 13: |
| 3632 | | plane_enable_a = (plane_a_r_cur == transparent_color_a_r && plane_a_g_cur == transparent_color_a_g && plane_a_b_cur == transparent_color_a_b) || dyuv_enable_a || mcd212.region_flag_0[x] == 0; |
| 3547 | plane_enable_a = (plane_a_r_cur == transparent_color_a_r && plane_a_g_cur == transparent_color_a_g && plane_a_b_cur == transparent_color_a_b) || dyuv_enable_a || mcd212.region_flag_0[x] == 1; |
| 3633 | 3548 | break; |
| 3634 | 3549 | case 14: |
| 3635 | | plane_enable_a = (plane_a_r_cur == transparent_color_a_r && plane_a_g_cur == transparent_color_a_g && plane_a_b_cur == transparent_color_a_b) || dyuv_enable_a || mcd212.region_flag_1[x] == 0; |
| 3550 | plane_enable_a = (plane_a_r_cur == transparent_color_a_r && plane_a_g_cur == transparent_color_a_g && plane_a_b_cur == transparent_color_a_b) || dyuv_enable_a || mcd212.region_flag_1[x] == 1; |
| 3636 | 3551 | break; |
| 3637 | 3552 | default: |
| 3638 | 3553 | verboselog(machine, 0, "Unhandled transparency mode for plane A: %d\n", transparency_mode_a); |
| r6147 | r6148 | |
| 3645 | 3560 | plane_enable_b = 0; |
| 3646 | 3561 | break; |
| 3647 | 3562 | case 1: |
| 3648 | | plane_enable_b = (plane_b_r_cur != transparent_color_b_r || plane_b_g_cur != transparent_color_b_g || plane_b_b_cur != transparent_color_b_b) || dyuv_enable_b; |
| 3563 | plane_enable_b = (plane_b_r_cur != transparent_color_b_r || plane_b_g_cur != transparent_color_b_g || plane_b_b_cur != transparent_color_b_b); |
| 3649 | 3564 | break; |
| 3650 | 3565 | case 3: |
| 3651 | | plane_enable_b = mcd212.region_flag_0[x]; |
| 3566 | plane_enable_b = !mcd212.region_flag_0[x]; |
| 3652 | 3567 | break; |
| 3653 | 3568 | case 4: |
| 3654 | | plane_enable_b = mcd212.region_flag_1[x]; |
| 3569 | plane_enable_b = !mcd212.region_flag_1[x]; |
| 3655 | 3570 | break; |
| 3656 | 3571 | case 5: |
| 3657 | | plane_enable_b = (plane_b_r_cur != transparent_color_b_r || plane_b_g_cur != transparent_color_b_g || plane_b_b_cur != transparent_color_b_b || dyuv_enable_b || mcd212.region_flag_0[x] == 1); |
| 3572 | plane_enable_b = (plane_b_r_cur != transparent_color_b_r || plane_b_g_cur != transparent_color_b_g || plane_b_b_cur != transparent_color_b_b) && (dyuv_enable_b || mcd212.region_flag_0[x] == 0); |
| 3658 | 3573 | break; |
| 3659 | 3574 | case 6: |
| 3660 | | plane_enable_b = (plane_b_r_cur != transparent_color_b_r || plane_b_g_cur != transparent_color_b_g || plane_b_b_cur != transparent_color_b_b || dyuv_enable_b || mcd212.region_flag_1[x] == 1); |
| 3575 | plane_enable_b = (plane_b_r_cur != transparent_color_b_r || plane_b_g_cur != transparent_color_b_g || plane_b_b_cur != transparent_color_b_b) && (dyuv_enable_b || mcd212.region_flag_1[x] == 0); |
| 3661 | 3576 | break; |
| 3662 | 3577 | case 8: |
| 3663 | 3578 | plane_enable_b = 1; |
| 3664 | 3579 | break; |
| 3665 | 3580 | case 9: |
| 3666 | | plane_enable_b = (plane_b_r_cur == transparent_color_b_r && plane_b_g_cur == transparent_color_b_g && plane_b_b_cur == transparent_color_b_b) || dyuv_enable_b; |
| 3581 | plane_enable_b = (plane_b_r_cur == transparent_color_b_r && plane_b_g_cur == transparent_color_b_g && plane_b_b_cur == transparent_color_b_b); |
| 3667 | 3582 | break; |
| 3668 | 3583 | case 11: |
| 3669 | | plane_enable_b = !mcd212.region_flag_0[x]; |
| 3584 | plane_enable_b = mcd212.region_flag_0[x]; |
| 3670 | 3585 | break; |
| 3671 | 3586 | case 12: |
| 3672 | | plane_enable_b = !mcd212.region_flag_1[x]; |
| 3587 | plane_enable_b = mcd212.region_flag_1[x]; |
| 3673 | 3588 | break; |
| 3674 | 3589 | case 13: |
| 3675 | | plane_enable_b = (plane_b_r_cur == transparent_color_b_r && plane_b_g_cur == transparent_color_b_g && plane_b_b_cur == transparent_color_b_b) || dyuv_enable_b || mcd212.region_flag_0[x] == 0; |
| 3590 | plane_enable_b = (plane_b_r_cur == transparent_color_b_r && plane_b_g_cur == transparent_color_b_g && plane_b_b_cur == transparent_color_b_b) || dyuv_enable_b || mcd212.region_flag_0[x] == 1; |
| 3676 | 3591 | break; |
| 3677 | 3592 | case 14: |
| 3678 | | plane_enable_b = (plane_b_r_cur == transparent_color_b_r && plane_b_g_cur == transparent_color_b_g && plane_b_b_cur == transparent_color_b_b) || dyuv_enable_b || mcd212.region_flag_1[x] == 0; |
| 3593 | plane_enable_b = (plane_b_r_cur == transparent_color_b_r && plane_b_g_cur == transparent_color_b_g && plane_b_b_cur == transparent_color_b_b) || dyuv_enable_b || mcd212.region_flag_1[x] == 1; |
| 3679 | 3594 | break; |
| 3680 | 3595 | default: |
| 3681 | 3596 | verboselog(machine, 0, "Unhandled transparency mode for plane B: %d\n", transparency_mode_b); |