Browse Source

add 6.0 and 6.1 api support

2upstream 1.0.4-gost
R4SAS 7 years ago
parent
commit
d97c89ad21
  1. 20
      ccminer.cpp
  2. 6
      ccminer.vcxproj

20
ccminer.cpp

@ -1500,9 +1500,9 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
case ALGO_WHIRLCOIN: case ALGO_WHIRLCOIN:
SHA256((uchar*)sctx->job.coinbase, sctx->job.coinbase_size, (uchar*)merkle_root); SHA256((uchar*)sctx->job.coinbase, sctx->job.coinbase_size, (uchar*)merkle_root);
break; break;
case ALGO_GOSTD: case ALGO_GOSTD:
gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); gostd(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
break; break;
case ALGO_WHIRLPOOL: case ALGO_WHIRLPOOL:
default: default:
sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size); sha256d(merkle_root, sctx->job.coinbase, (int)sctx->job.coinbase_size);
@ -1512,11 +1512,11 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
memcpy(merkle_root + 32, sctx->job.merkle[i], 32); memcpy(merkle_root + 32, sctx->job.merkle[i], 32);
if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR) if (opt_algo == ALGO_HEAVY || opt_algo == ALGO_MJOLLNIR)
heavycoin_hash(merkle_root, merkle_root, 64); heavycoin_hash(merkle_root, merkle_root, 64);
if (opt_algo == ALGO_GOSTD) else if (opt_algo == ALGO_GOSTD)
{ {
memcpy(merkle_root + 32, merkle_root, 32); memcpy(merkle_root + 32, merkle_root, 32);
gostd(merkle_root, merkle_root, 64); gostd(merkle_root, merkle_root, 64);
} }
else else
sha256d(merkle_root, merkle_root, 64); sha256d(merkle_root, merkle_root, 64);
} }
@ -3708,7 +3708,9 @@ int main(int argc, char *argv[])
CUDART_VERSION/1000, (CUDART_VERSION % 1000)/10, arch); CUDART_VERSION/1000, (CUDART_VERSION % 1000)/10, arch);
printf(" Originally based on Christian Buchner and Christian H. project\n"); printf(" Originally based on Christian Buchner and Christian H. project\n");
printf(" Include some algos from alexis78, djm34, sp, tsiv and klausT.\n\n"); printf(" Include some algos from alexis78, djm34, sp, tsiv and klausT.\n\n");
printf("BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo (tpruvot)\n\n"); printf(" GOSTd algo by PurpleI2P team, ©2017. Donations are welcome to\n");
printf(" address GbD2JSQHBHCKLa9WTHmigJRpyFgmBj4woG. Thanks!\n\n");
printf("BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo (tpruvot)\n");
} }
rpc_user = strdup(""); rpc_user = strdup("");

6
ccminer.vcxproj

@ -112,7 +112,7 @@
<MaxRegCount>80</MaxRegCount> <MaxRegCount>80</MaxRegCount>
<PtxAsOptionV>true</PtxAsOptionV> <PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep> <Keep>true</Keep>
<CodeGeneration>compute_52,sm_52</CodeGeneration> <CodeGeneration>compute_50,sm_50</CodeGeneration>
<Include>$(NVTOOLSEXT_PATH)\include;..\..\..\Common\C99</Include> <Include>$(NVTOOLSEXT_PATH)\include;..\..\..\Common\C99</Include>
<TargetMachinePlatform>64</TargetMachinePlatform> <TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile> </CudaCompile>
@ -155,7 +155,7 @@
<MaxRegCount>80</MaxRegCount> <MaxRegCount>80</MaxRegCount>
<PtxAsOptionV>true</PtxAsOptionV> <PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep> <Keep>true</Keep>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_30,sm_30;compute_20,sm_21</CodeGeneration> <CodeGeneration>compute_61,sm_61;compute_60,sm_60;compute_52,sm_52;compute_50,sm_50;compute_30,sm_30;compute_20,sm_21</CodeGeneration>
<AdditionalOptions>--ptxas-options="-O2" %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>--ptxas-options="-O2" %(AdditionalOptions)</AdditionalOptions>
<Optimization>O2</Optimization> <Optimization>O2</Optimization>
</CudaCompile> </CudaCompile>
@ -198,7 +198,7 @@
<MaxRegCount>80</MaxRegCount> <MaxRegCount>80</MaxRegCount>
<PtxAsOptionV>true</PtxAsOptionV> <PtxAsOptionV>true</PtxAsOptionV>
<Keep>true</Keep> <Keep>true</Keep>
<CodeGeneration>compute_52,sm_52;compute_50,sm_50;compute_35,sm_35;compute_30,sm_30;compute_20,sm_21</CodeGeneration> <CodeGeneration>compute_61,sm_61;compute_60,sm_60;compute_52,sm_52;compute_50,sm_50;compute_35,sm_35;compute_30,sm_30;compute_20,sm_21</CodeGeneration>
<Include>$(NVTOOLSEXT_PATH)\include;..\..\..\Common\C99</Include> <Include>$(NVTOOLSEXT_PATH)\include;..\..\..\Common\C99</Include>
<Optimization>O3</Optimization> <Optimization>O3</Optimization>
<TargetMachinePlatform>64</TargetMachinePlatform> <TargetMachinePlatform>64</TargetMachinePlatform>

Loading…
Cancel
Save