SHARE
TWEET

Untitled

a guest Oct 3rd, 2014 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.   do
  3.   {
  4.     if ( !pBackupObject_ListObWbOut )
  5.     {
  6.       assert("pBackupObject", "./ShootVfx/ShootTa10/ShootTa10State.c", 0x6C5);
  7.     }
  8.     v27 = pBackupObject_ListObWbOut[2];
  9.     if ( !pBackupObject_ListLensOut )
  10.     {
  11.       assert("pBackupObject", "./ShootVfx/ShootTa10/ShootTa10State.c", 0x6C9);
  12.     }
  13.     v26 = (signed __int16 *)pBackupObject_ListLensOut[2];
  14.     if ( !pBackupObject_ListFnoOut )
  15.     {
  16.       assert("pBackupObject", "./ShootVfx/ShootTa10/ShootTa10State.c", 0x6CD);
  17.     }
  18.     v25 = pBackupObject_ListFnoOut[2];
  19.     if ( !pBackupObject_ListNR )
  20.     {
  21.       assert("pBackupObject", "./ShootVfx/ShootTa10/ShootTa10State.c", 0x6D1);
  22.     }
  23.     v24 = *(_BYTE *)pBackupObject_ListNR[2];
  24.     pBackupObject_ListObWbOut = (unsigned int *)pBackupObject_ListObWbOut[1];
  25.     pBackupObject_ListLensOut = (unsigned int *)pBackupObject_ListLensOut[1];
  26.     pBackupObject_ListFnoOut = (unsigned int *)pBackupObject_ListFnoOut[1];
  27.     pBackupObject_ListNR = (unsigned int *)pBackupObject_ListNR[1];
  28.     sub_FF416600(*(_BYTE *)(v25 + 2), 0, 1, dword_2C38C, (signed __int16 *)v27, v26, (unsigned int *)pClrObwbReg, (unsigned int)pRshdParam);
  29.     if ( !skip_count )
  30.     {
  31.       out_off = pRshdParam[6];
  32.     }
  33.     if ( v24 == 1 )
  34.     {
  35.       DryosDebugMsg(this->debug_ctx & 0xFF, 3, "%s Skip Count:%d", "stsStripeCorrectATypeMakeDarkLuma", skip_count++);
  36.     }
  37.     else
  38.     {
  39.       if ( loops )
  40.       {
  41.         image = (int)this->image_a;
  42.       }
  43.       else
  44.       {
  45.         image = (int)this->image_b;
  46.       }
  47.       sub_FF327BB0(this->field_38, image, v25, (int)pRshdParam, pClrObwbReg, 0, 1, 8);
  48.       if ( loops )
  49.       {
  50.         DryosDebugMsg(this->debug_ctx & 0xFF, 3, "%s Addsub Count:%d", "stsStripeCorrectATypeMakeDarkLuma", skip_count);
  51.         div8 = pBackupObject_ListObWbOut == ListObWbOut;
  52.         EekoAddRawPath(this->image_a, this->image_b, this->image_b, enum_eeko_op_ADD, -(signed __int16)pRshdParam[6], 0x1000, 0x800, 0x1000, 0x800, div8, (signed __int16)out_off, (void (__cdecl *)(void *))cbr_sem_release, (void *)sem_eeko_path);
  53.         if ( TakeSemaphoreTimeout(sem_eeko_path, 1000) & 1 )
  54.         {
  55.           DryosDebugMsg(this->debug_ctx & 0xFF, 6, "%s %d", "stsStripeCorrectATypeMakeDarkLuma", 0x711);
  56.           assert((const char *)&off_FF32A568, "./ShootVfx/ShootTa10/ShootTa10State.c", 0x712);
  57.         }
  58.         EekoAddRawPath_Reset();
  59.         EekoAddRawPath_Unlock();
  60.       }
  61.       ++skip_count;
  62.       ++loops;
  63.     }
  64.   }
  65.   while ( pBackupObject_ListObWbOut != ListObWbOut );
  66.  
  67. void __fastcall EekoAddRawPath(void *img_a, void *img_b, void *img_out, enum enum_eeko_operation op, int minus_off_a, int gain_a, __int16 black_a, int gain_b, __int16 black_b, int div8, __int16 out_black, void (__cdecl *cbr)(void *), void *cbr_arg)
  68. {
  69.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  70.  
  71.   EekoAddRawPath_LockResources(eeko_resources, 0xE - (div8 == 0), enum_eeko_chain_DSUNPACK, enum_eeko_chain_ADUNPACK, enum_eeko_outchain_PACK16, div8 == 0, 0x28u, 2u, 0x29u, 2u, 5, 0);
  72.   img_b_info.pixel_mode = 2;
  73.   img_a_info.ptr = img_a;
  74.   img_out_info.ptr = img_out;
  75.   opts_shad.SHAD_RMODE = 1;
  76.   img_out_info.pixel_mode = 2;
  77.   img_a_info.pixel_mode = 2;
  78.   opts_shad.SHAD_PRESETUP_14_12 = -black_a;
  79.   opts_shad.SHAD_GAIN = gain_a;
  80.   opts_b.zero = 0;
  81.   img_b_info.ptr = img_b;
  82.   opts_b.presetup = -black_b;
  83.   opts_shad.SHAD_MODE = 0;
  84.   opts_b.gain = (unsigned int)gain_b >> 3;
  85.   opts_b.postsetup = black_b;
  86.   opts_b.mask = 0x3FFF;
  87.   opts_shad.SHAD_POSTSETUP_14_12 = black_a;
  88.   *(_DWORD *)&opts_out.zero = *(_DWORD *)&opts_b.zero;
  89.   *(_DWORD *)&opts_out.mask = *(_DWORD *)&opts_b.mask;
  90.   opts_out.gain = 0x40;
  91.   opts_out.presetup = -out_black;
  92.   opts_out.postsetup = out_black;
  93.   EekoAddRawPath_PrepareAsync(op, &img_a_info, &img_b_info, &img_out_info, pDsDefine->XSIZE_MEM1, pDsDefine->YSIZE_MEM1, 2, &opts_shad, &opts_b, minus_off_a, &opts_out, cbr, (int)cbr_arg);
  94.   EekoAddRawPath_Start();
  95. }
  96.  
  97. void __cdecl EekoAddRawPath_LockResources(unsigned int *reslock_list, unsigned int resid_count, enum enum_eeko_chain img_a_chain, enum enum_eeko_chain img_b_chain, enum enum_eeko_outchain img_out_chain, int no_div_8, unsigned int edmac_id_img_a, unsigned int val_2a, unsigned int edmac_id_img_b, unsigned int val_2b, signed int val_5, int val_0)
  98. {
  99.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  100.  
  101.   eeko_div_8_is_zero = no_div_8;
  102.   if ( Eeko_hResLockEntry_allocated != 1 )
  103.   {
  104.     Eeko_hResLockEntry = (int)CreateResLockEntry(reslock_list, resid_count);
  105.     Eeko_hResLockEntry_allocated = 1;
  106.   }
  107.   if ( LockEngineResources((struct struc_LockEntry *)Eeko_hResLockEntry) & 1 )
  108.   {
  109.     assert("!IS_ERROR( LockEngineResources( hResLockEntry ) )", "./PathDrvWrap/EekoAddRawPath.c", 0xB4);
  110.   }
  111.   EngDrvOut(&dword_C0F37000, 0);
  112.   EngDrvOut(&dword_C0F37004, 0);
  113.   EngDrvOut(&dword_C0F37008, 0);
  114.   switch ( img_a_chain )
  115.   {
  116.     case enum_eeko_chain_DSUNPACK:
  117.       v14 = j_cli();
  118.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFFFFFF8, 1);
  119.       j_sei(v14);
  120.       v15 = j_cli();
  121.       v16 = 0;
  122.       goto LABEL_8;
  123.     case enum_eeko_chain_UNPACK32:
  124.       v17 = j_cli();
  125.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFFFFE3F, 0x40);
  126.       j_sei(v17);
  127.       v15 = j_cli();
  128.       v16 = 1;
  129.       goto LABEL_8;
  130.     case enum_eeko_chain_ADUNPACK:
  131.       v18 = j_cli();
  132.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFFF8FFF, 0x1000);
  133.       j_sei(v18);
  134.       v15 = j_cli();
  135.       v16 = 2;
  136.       goto LABEL_8;
  137.     case enum_eeko_chain_UNK2:
  138.       v19 = j_cli();
  139.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFE3FFFF, 0x40000);
  140.       j_sei(v19);
  141.       v15 = j_cli();
  142.       v16 = 0x20;
  143.       goto LABEL_8;
  144.     case enum_eeko_chain_UNK3:
  145.       v20 = j_cli();
  146.       EngDrvBits(&EEKO_chain_C0F37010, 0xF8FFFFFF, 0x1000000);
  147.       j_sei(v20);
  148.       v15 = j_cli();
  149.       v16 = 0x21;
  150. LABEL_8:
  151.       EngDrvBits(&EEKO_chain_img_a_C0F3701C, 0xFFFFFFC0, v16);
  152.       j_sei(v15);
  153.       break;
  154.     default:
  155.       break;
  156.   }
  157.   switch ( img_b_chain )
  158.   {
  159.     case enum_eeko_chain_DSUNPACK:
  160.       v21 = j_cli();
  161.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFFFFFF8, 3);
  162.       j_sei(v21);
  163.       v22 = j_cli();
  164.       v23 = 0;
  165.       goto LABEL_15;
  166.     case enum_eeko_chain_UNPACK32:
  167.       v24 = j_cli();
  168.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFFFFE3F, 0xC0);
  169.       j_sei(v24);
  170.       v22 = j_cli();
  171.       v23 = 0x100;
  172.       goto LABEL_15;
  173.     case enum_eeko_chain_ADUNPACK:
  174.       v27 = j_cli();
  175.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFFF8FFF, 0x3000);
  176.       j_sei(v27);
  177.       v22 = j_cli();
  178.       v23 = 0x200;
  179.       goto LABEL_15;
  180.     case enum_eeko_chain_UNK2:
  181.       v28 = j_cli();
  182.       EngDrvBits(&EEKO_chain_C0F37010, 0xFFE3FFFF, 0xC0000);
  183.       j_sei(v28);
  184.       v22 = j_cli();
  185.       v23 = 0x2000;
  186.       goto LABEL_15;
  187.     case enum_eeko_chain_UNK3:
  188.       v29 = j_cli();
  189.       EngDrvBits(&EEKO_chain_C0F37010, 0xF8FFFFFF, 0x3000000);
  190.       j_sei(v29);
  191.       v22 = j_cli();
  192.       v23 = 0x2100;
  193. LABEL_15:
  194.       EngDrvBits(&EEKO_chain_img_b_C0F37050, 0xFFFFC0FF, v23);
  195.       j_sei(v22);
  196.       break;
  197.     default:
  198.       break;
  199.   }
  200.   if ( img_out_chain )
  201.   {
  202.     if ( img_out_chain == enum_eeko_outchain_PACK16 )
  203.     {
  204.       if ( eeko_div_8_is_zero )
  205.       {
  206.         v34 = j_cli();
  207.         v35 = 0x500;
  208.       }
  209.       else
  210.       {
  211.         v34 = j_cli();
  212.         v35 = 0x1C00;
  213.       }
  214.       EngDrvBits(&LV_RAW_type_C0F37014, 0xFFFFC0FF, v35);
  215.       j_sei(v34);
  216.       v32 = j_cli();
  217.       v33 = 0x1000000;
  218.     }
  219.     else
  220.     {
  221.       if ( img_out_chain != enum_eeko_outchain_UNK )
  222.       {
  223.         goto LABEL_35;
  224.       }
  225.       if ( eeko_div_8_is_zero )
  226.       {
  227.         v25 = j_cli();
  228.         v26 = 0x50000;
  229.       }
  230.       else
  231.       {
  232.         v25 = j_cli();
  233.         v26 = 0x1C0000;
  234.       }
  235.       EngDrvBits(&LV_RAW_type_C0F37014, 0xFFC0FFFF, v26);
  236.       j_sei(v25);
  237.       v32 = j_cli();
  238.       v33 = 0x6000000;
  239.     }
  240.   }
  241.   else
  242.   {
  243.     if ( eeko_div_8_is_zero )
  244.     {
  245.       v30 = j_cli();
  246.       v31 = 5;
  247.     }
  248.     else
  249.     {
  250.       v30 = j_cli();
  251.       v31 = 0x1C;
  252.     }
  253.     EngDrvBits(&LV_RAW_type_C0F37014, 0xFFFFFFC0, v31);
  254.     j_sei(v30);
  255.     v32 = j_cli();
  256.     v33 = 0;
  257.   }
  258.   EngDrvBits((void *)((unsigned int)&LV_RAW_type_C0F37014 | ((unsigned int)&LV_RAW_type_C0F37014 >> 0x19)), 0xF0FFFFFF, v33);
  259.   j_sei(v32);
  260. LABEL_35:
  261.   if ( !eeko_div_8_is_zero )
  262.   {
  263.     v36 = j_cli();
  264.     EngDrvBits(&EEKO_chain_img_b_C0F37050, 0xFFFFFFC0, 5);
  265.     j_sei(v36);
  266.   }
  267.   v37 = j_cli();
  268.   EngDrvBits(&dword_C0F37018, 0xFFC0FFFF, 0x40000);
  269.   j_sei(v37);
  270.   v38 = j_cli();
  271.   EngDrvBits(&dword_C0F37018, 0xC0FFFFFF, 0x1D000000);
  272.   j_sei(v38);
  273.   v39 = get_0x00_0x40_0x80(val_0);
  274.   edmac_img_out = sub_FF4FCB20(val_5);
  275.   val_2b_ = Eeko_EDmac_smth_limit_0_7(val_2b);
  276.   edmac_img_b = Eeko_EDmac_map_chan(edmac_id_img_b);
  277.   val_2a_ = Eeko_EDmac_smth_limit_0_7(val_2a);
  278.   edmac_img_a = Eeko_EDmac_map_chan(edmac_id_img_a);
  279.   eeko_setup_globals(img_a_chain, img_b_chain, img_out_chain, no_div_8, edmac_img_a, val_2a_, edmac_img_b, val_2b_, edmac_img_out, v39);
  280. }
  281.  
  282. void __cdecl EekoAddRawPath_PrepareAsync(int operation, struct struc_eeko_img_ptr *in_img_a, struct struc_eeko_img_ptr *in_img_b, struct struc_eeko_img_ptr *in_img_out, int xsize, int ysize, int out_mode___, struc_eeko_opts_shad *in_opts_a, struc_eeko_opts *in_opts_b, int minus_off_a, struc_eeko_opts *in_opts_out, void (__cdecl *cbr)(void *), int cbr_ctx)
  283. {
  284.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  285.  
  286.   img_a.ptr = in_img_a->ptr;
  287.   img_a.pixel_mode = in_img_a->pixel_mode;
  288.   img_b.ptr = in_img_b->ptr;
  289.   img_b.pixel_mode = in_img_b->pixel_mode;
  290.   img_out.ptr = in_img_out->ptr;
  291.   img_out.pixel_mode = in_img_out->pixel_mode;
  292.   opts_shad.SHAD_PRESETUP_14_12 = in_opts_a->SHAD_PRESETUP_14_12;
  293.   opts_shad.SHAD_POSTSETUP_14_12 = in_opts_a->SHAD_POSTSETUP_14_12;
  294.   opts_shad.SHAD_MODE = in_opts_a->SHAD_MODE;
  295.   opts_shad.SHAD_GAIN = in_opts_a->SHAD_GAIN;
  296.   opts_shad.SHAD_RMODE = in_opts_a->SHAD_RMODE;
  297.   opts_b.presetup = in_opts_b->presetup;
  298.   opts_b.gain = in_opts_b->gain;
  299.   opts_b.zero = in_opts_b->zero;
  300.   opts_b.postsetup = in_opts_b->postsetup;
  301.   opts_b.mask = in_opts_b->mask;
  302.   opts_img_b.presetup = in_opts_out->presetup;
  303.   opts_img_b.gain = in_opts_out->gain;
  304.   opts_img_b.zero = in_opts_out->zero;
  305.   opts_img_b.postsetup = in_opts_out->postsetup;
  306.   opts_img_b.mask = in_opts_out->mask;
  307.   EekoAddRawPath_SetCallback(cbr, cbr_ctx);
  308.   EekoAddRawPath_Prepare((enum enum_eeko_operation)operation, &img_a, &img_b, &img_out, xsize, ysize, (enum enum_pixelmode)out_mode___, &opts_shad, &opts_b, minus_off_a, &opts_img_b);
  309. }
  310.  
  311. void __fastcall EekoAddRawPath_Start_really()
  312. {
  313.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  314.  
  315.   EekoEDmac_SetTransferSize_smth(EekoEDmac_Channel_img_out, Eeko_img_out_0);
  316.   if ( Eeko_img_out_chain )
  317.   {
  318.     if ( Eeko_img_out_chain == 1 )
  319.     {
  320.       v0 = &PACK16_Control_register_0xC0F08120;
  321.     }
  322.     else
  323.     {
  324.       if ( Eeko_img_out_chain != 2 )
  325.       {
  326.         goto LABEL_8;
  327.       }
  328.       v0 = &UNK_Control_Register_C0F37240;
  329.     }
  330.   }
  331.   else
  332.   {
  333.     v0 = &PACK32_Control_register_0xC0F08090;
  334.   }
  335.   EngDrvOut(v0, 1);
  336. LABEL_8:
  337.   if ( !Eeko_no_div_8 )
  338.   {
  339.     EngDrvOut(&dword_C0F37AB8, 1);
  340.   }
  341.   EngDrvOut(&TWOADD_Control_register_0xC0F08040, 1);
  342.   EngDrvOut(&dword_C0F37B18, 1);
  343.   EngDrvOut(&SHAD_Control_Register_0xC0F08020, 1);
  344.   switch ( Eeko_img_a_chain )
  345.   {
  346.     case enum_eeko_chain_DSUNPACK:
  347.       v1 = &DSUNPACK_ENB_0xC0F08060;
  348.       goto LABEL_13;
  349.     case enum_eeko_chain_UNPACK32:
  350.       v1 = (int *)((unsigned int)&DSUNPACK_ENB_0xC0F08060 | ((unsigned int)&DSUNPACK_ENB_0xC0F08060 >> 0x1A));
  351.       goto LABEL_13;
  352.     case enum_eeko_chain_ADUNPACK:
  353.       v1 = &ADUNPACK_Control_Register_0xC0F08080;
  354.       goto LABEL_13;
  355.     case enum_eeko_chain_UNK2:
  356.       v1 = (int *)&UNK2_Control_Register_C0F371F0;
  357.       goto LABEL_13;
  358.     case enum_eeko_chain_UNK3:
  359.       v1 = (int *)&UNK3_Control_Register_C0F37218;
  360. LABEL_13:
  361.       EngDrvOut(v1, 1);
  362.       break;
  363.     default:
  364.       break;
  365.   }
  366.   switch ( Eeko_img_b_chain )
  367.   {
  368.     case enum_eeko_chain_DSUNPACK:
  369.       v2 = &DSUNPACK_ENB_0xC0F08060;
  370.       goto LABEL_20;
  371.     case enum_eeko_chain_UNPACK32:
  372.       v2 = (int *)((unsigned int)&DSUNPACK_ENB_0xC0F08060 | ((unsigned int)&DSUNPACK_ENB_0xC0F08060 >> 0x1A));
  373.       goto LABEL_20;
  374.     case enum_eeko_chain_ADUNPACK:
  375.       v2 = &ADUNPACK_Control_Register_0xC0F08080;
  376.       goto LABEL_20;
  377.     case enum_eeko_chain_UNK2:
  378.       v2 = (int *)&UNK2_Control_Register_C0F371F0;
  379.       goto LABEL_20;
  380.     case enum_eeko_chain_UNK3:
  381.       v2 = (int *)&UNK3_Control_Register_C0F37218;
  382. LABEL_20:
  383.       EngDrvOut(v2, 1);
  384.       break;
  385.     default:
  386.       break;
  387.   }
  388.   EekoEDmac_SetTransferSize_smth(EekoEDmac_Channel_img_a, Eeko_img_a_2);
  389.   EekoEDmac_SetTransferSize_smth(EekoEDmac_Channel_img_b, Eeko_img_b_2);
  390. }
  391. void __cdecl EekoAddRawPath_Prepare(enum enum_eeko_operation operation, struc_eeko_img_ptr *img_a, struc_eeko_img_ptr *img_b, struc_eeko_img_ptr *img_c, int xsize, int ysize, enum enum_pixelmode pixelmode_out, struc_eeko_opts_shad *opt_shad, struc_eeko_opts *opts_a, int minus_off_a, struc_eeko_opts *opts_b)
  392. {
  393.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  394.  
  395.   dword_38B0C = 0;
  396.   dword_38B10 = 0;
  397.   Eeko_operation_mode = operation;
  398.   dword_38B14 = 0;
  399.   pixelmode_a = img_a->pixel_mode;
  400.   switch ( pixelmode_a )
  401.   {
  402.     default:
  403.       img_a_16bpp = 0;
  404.       break;
  405.     case enum_pixelmode_16bpp:
  406.     case enum_pixelmode_4:
  407.     case enum_pixelmode_5:
  408.     case enum_pixelmode_6:
  409.     case enum_pixelmode_7:
  410.       img_a_16bpp = 1;
  411.       break;
  412.   }
  413.   switch ( img_b->pixel_mode )
  414.   {
  415.     default:
  416.       img_b_16bpp = 0;
  417.       break;
  418.     case enum_pixelmode_16bpp:
  419.     case enum_pixelmode_4:
  420.     case enum_pixelmode_5:
  421.     case enum_pixelmode_6:
  422.     case enum_pixelmode_7:
  423.       img_b_16bpp = 1;
  424.       break;
  425.   }
  426.   switch ( img_c->pixel_mode )
  427.   {
  428.     default:
  429.       img_out_16bpp = 0;
  430.       break;
  431.     case enum_pixelmode_16bpp:
  432.     case enum_pixelmode_4:
  433.     case enum_pixelmode_5:
  434.     case enum_pixelmode_6:
  435.     case enum_pixelmode_7:
  436.       img_out_16bpp = 1;
  437.       break;
  438.   }
  439.   switch ( Eeko_img_a_chain )
  440.   {
  441.     case enum_eeko_chain_DSUNPACK:
  442.       Eeko_prepare_DSUNPACK(pixelmode_a, pixelmode_out, img_a_16bpp);
  443.       break;
  444.     case enum_eeko_chain_UNPACK32:
  445.       Eeko_prepare_UNPACK24(pixelmode_a, pixelmode_out, img_a_16bpp);
  446.       break;
  447.     case enum_eeko_chain_ADUNPACK:
  448.       Eeko_prepare_ADUNPACK(pixelmode_a, pixelmode_out, img_a_16bpp);
  449.       break;
  450.     case enum_eeko_chain_UNK2:
  451.       Eeko_prepare_UNK2(pixelmode_a, pixelmode_out, img_a_16bpp);
  452.       break;
  453.     case enum_eeko_chain_UNK3:
  454.       Eeko_prepare_UNK3(pixelmode_a, pixelmode_out, img_a_16bpp);
  455.       break;
  456.     default:
  457.       break;
  458.   }
  459.   switch ( Eeko_img_b_chain )
  460.   {
  461.     case enum_eeko_chain_DSUNPACK:
  462.       Eeko_prepare_DSUNPACK(img_b->pixel_mode, pixelmode_out, img_b_16bpp);
  463.       break;
  464.     case enum_eeko_chain_UNPACK32:
  465.       Eeko_prepare_UNPACK24(img_b->pixel_mode, pixelmode_out, img_b_16bpp);
  466.       break;
  467.     case enum_eeko_chain_ADUNPACK:
  468.       Eeko_prepare_ADUNPACK(img_b->pixel_mode, pixelmode_out, img_b_16bpp);
  469.       break;
  470.     case enum_eeko_chain_UNK2:
  471.       Eeko_prepare_UNK2(img_b->pixel_mode, pixelmode_out, img_b_16bpp);
  472.       break;
  473.     case enum_eeko_chain_UNK3:
  474.       Eeko_prepare_UNK3(img_b->pixel_mode, pixelmode_out, img_b_16bpp);
  475.       break;
  476.     default:
  477.       break;
  478.   }
  479.   EekoSetupShad(opt_shad, pixelmode_out);
  480.   EekoAddRawPathCore_img_a(opts_a, xsize, ysize, pixelmode_out);
  481.   EekoSetupTwoAdd(img_a->pixel_mode, minus_off_a, pixelmode_out);
  482.   if ( !Eeko_no_div_8 )
  483.   {
  484.     EekoAddRawPathCore_img_b(opts_b, xsize, ysize, pixelmode_out);
  485.   }
  486.   if ( Eeko_img_out_chain )
  487.   {
  488.     if ( Eeko_img_out_chain == enum_eeko_outchain_PACK16 )
  489.     {
  490.       EngDrvOut(&PACK16_Control_register_0xC0F08120, 0x80000000);
  491.       EngDrvOut(&PACK16_MODE_0xC0F08124, (img_out_16bpp << 8) | 0x20);
  492.       EngDrvBits(&PACK16_CCD2_DM_EN_0xC0F0827C, 0xFFFFFFEF, 0);
  493.       EngDrvOut(&PACK16_DEFM_ON_0xC0F082B8, 0);
  494.       reg_is_14bpp = &PACK16_is_14bpp_C0F08C58;
  495.       if ( pixelmode_out == enum_pixelmode_12bpp )
  496.       {
  497.         v23 = 1;
  498.       }
  499.       else
  500.       {
  501.         if ( pixelmode_out == enum_pixelmode_14bpp )
  502.         {
  503.           goto LABEL_33;
  504.         }
  505.         v23 = 0;
  506.       }
  507.       EngDrvBits(&PACK16_CCD2_DM_EN_0xC0F0827C, 0xFFFFFFFE, v23);
  508.       goto LABEL_36;
  509.     }
  510.     if ( Eeko_img_out_chain != enum_eeko_outchain_UNK )
  511.     {
  512.       goto LABEL_38;
  513.     }
  514.     EngDrvOut(&UNK_Control_Register_C0F37240, 0x80000000);
  515.     EngDrvOut(&UNK_MODE_C0F3724C, (img_out_16bpp << 8) | 0x20);
  516.     EngDrvOut(&UNK_MODE_H_C0F37258, 0);
  517.     EngDrvOut(&UNK_DEFM_ON_C0F3725C, 0);
  518.     reg_dm_en = &UNK_DM_EN_C0F37254;
  519.     reg_is_14bpp = &UNK_is_14bpp_C0F37264;
  520.   }
  521.   else
  522.   {
  523.     EngDrvOut(&PACK32_Control_register_0xC0F08090, 0x80000000);
  524.     EngDrvOut(&PACK32_MODE_0xC0F08094, (img_out_16bpp << 8) | 0x20);
  525.     EngDrvOut(&PACK32_MODE_H_0xC0F08268, 0);
  526.     EngDrvOut(&PACK32_DEFM_ON_0xC0F082BC, 0);
  527.     reg_dm_en = &PACK32_DM_EN_0xC0F08264;
  528.     reg_is_14bpp = (int *)&PACK32_is_14bpp_C0F08BF0;
  529.   }
  530.   if ( pixelmode_out == enum_pixelmode_12bpp )
  531.   {
  532.     v20 = 1;
  533. LABEL_35:
  534.     EngDrvOut(reg_dm_en, v20);
  535. LABEL_36:
  536.     v21 = 0;
  537.     goto LABEL_37;
  538.   }
  539.   if ( pixelmode_out != enum_pixelmode_14bpp )
  540.   {
  541.     v20 = 0;
  542.     goto LABEL_35;
  543.   }
  544. LABEL_33:
  545.   v21 = 1;
  546. LABEL_37:
  547.   EngDrvOut(reg_is_14bpp, v21);
  548. LABEL_38:
  549.   v22 = EekoGetLinePitch(xsize, img_a->pixel_mode);
  550.   EekoEDmac_RegisterInterrupt(EekoEDmac_Channel_img_a, EekoEDmac_ISR_img_a, 0);
  551.   EekoEDmac_SetupSizes(EekoEDmac_Channel_img_a, v22 * ysize, 8u);
  552.   EekoEDmac_SetImageBuffer(EekoEDmac_Channel_img_a, (int)img_a->ptr);
  553.   EekoEDmac_SetFlags(EekoEDmac_Channel_img_a, 0);
  554.   if ( pixelmode_out == enum_pixelmode_12bpp )
  555.   {
  556.     EekoEDmac_SetTransferSize_12bpp(EekoEDmac_Channel_img_a);
  557.   }
  558.   else if ( pixelmode_out == enum_pixelmode_14bpp )
  559.   {
  560.     EekoEDmac_SetTransferSize_14bpp(EekoEDmac_Channel_img_a);
  561.   }
  562.   if ( Eeko_img_a_chain == enum_eeko_chain_DSUNPACK )
  563.   {
  564.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_a, 0x24);
  565.   }
  566.   if ( Eeko_img_a_chain == enum_eeko_chain_UNPACK32 )
  567.   {
  568.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_a, 0x24);
  569.   }
  570.   if ( Eeko_img_a_chain == enum_eeko_chain_ADUNPACK )
  571.   {
  572.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_a, 0x24);
  573.   }
  574.   if ( Eeko_img_a_chain == enum_eeko_chain_UNK2 )
  575.   {
  576.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_a, 0x24);
  577.   }
  578.   if ( Eeko_img_a_chain == enum_eeko_chain_UNK3 )
  579.   {
  580.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_a, 0x24);
  581.   }
  582.   v24 = EekoGetLinePitch(xsize, img_b->pixel_mode);
  583.   EekoEDmac_RegisterInterrupt(EekoEDmac_Channel_img_b, EekoEDmac_ISR_img_b, 0);
  584.   EekoEDmac_SetupSizes(EekoEDmac_Channel_img_b, v24 * ysize, 8u);
  585.   EekoEDmac_SetImageBuffer(EekoEDmac_Channel_img_b, (int)img_b->ptr);
  586.   EekoEDmac_SetFlags(EekoEDmac_Channel_img_b, 0);
  587.   if ( pixelmode_out == enum_pixelmode_12bpp )
  588.   {
  589.     EekoEDmac_SetTransferSize_12bpp(EekoEDmac_Channel_img_b);
  590.   }
  591.   else if ( pixelmode_out == enum_pixelmode_14bpp )
  592.   {
  593.     EekoEDmac_SetTransferSize_14bpp(EekoEDmac_Channel_img_b);
  594.   }
  595.   if ( Eeko_img_b_chain == enum_eeko_chain_DSUNPACK )
  596.   {
  597.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_b, 0x28);
  598.   }
  599.   if ( Eeko_img_b_chain == enum_eeko_chain_UNPACK32 )
  600.   {
  601.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_b, 0x28);
  602.   }
  603.   if ( Eeko_img_b_chain == enum_eeko_chain_ADUNPACK )
  604.   {
  605.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_b, 0x28);
  606.   }
  607.   if ( Eeko_img_b_chain == enum_eeko_chain_UNK2 )
  608.   {
  609.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_b, 0x28);
  610.   }
  611.   if ( Eeko_img_b_chain == enum_eeko_chain_UNK3 )
  612.   {
  613.     EekoEDmac_SetEdmacConnection(EekoEDmac_Channel_img_b, 0x28);
  614.   }
  615.   bytes_per_line = EekoGetLinePitch(xsize, img_c->pixel_mode);
  616.   EekoEDmac_RegisterInterrupt(EekoEDmac_Channel_img_out, EekoEDmac_ISR_img_out, 0);
  617.   EekoEDmac_SetupSizes(EekoEDmac_Channel_img_out, bytes_per_line * ysize, 8u);
  618.   EekoEDmac_SetImageBuffer(EekoEDmac_Channel_img_out, (int)img_c->ptr);
  619.   EekoEDmac_SetFlags(EekoEDmac_Channel_img_out, 0);
  620.   if ( pixelmode_out == enum_pixelmode_12bpp )
  621.   {
  622.     EekoEDmac_SetTransferSize_12bpp(EekoEDmac_Channel_img_out);
  623.   }
  624.   else if ( pixelmode_out == enum_pixelmode_14bpp )
  625.   {
  626.     EekoEDmac_SetTransferSize_14bpp(EekoEDmac_Channel_img_out);
  627.   }
  628.   if ( Eeko_img_out_chain == enum_eeko_outchain_PACK32 )
  629.   {
  630.     Eeko_EDmac_set_CHSW(EekoEDmac_Channel_img_out, 0);
  631.   }
  632.   if ( Eeko_img_out_chain == 1 )
  633.   {
  634.     Eeko_EDmac_set_CHSW(EekoEDmac_Channel_img_out, 0);
  635.   }
  636.   if ( Eeko_img_out_chain == 2 )
  637.   {
  638.     Eeko_EDmac_set_CHSW(EekoEDmac_Channel_img_out, 0);
  639.   }
  640. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top