Skip to content

Commit

Permalink
Added verus2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
monkins1010 committed Jun 10, 2020
1 parent 70c35f8 commit 1b9ccbb
Show file tree
Hide file tree
Showing 9 changed files with 2,777 additions and 965 deletions.
Binary file removed ccminer.VC.VC.opendb
Binary file not shown.
72 changes: 53 additions & 19 deletions ccminer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright 2010 Jeff Garzik
* Copyright 2012-2014 pooler
* Copyright 2014-2017 tpruvot
Expand Down Expand Up @@ -42,7 +42,8 @@

#include "miner.h"
#include "algos.h"

#include "sia/sia-rpc.h"
#include "crypto/xmr-rpc.h"
#include "equi/equihash.h"

//#include <cuda_runtime.h>
Expand Down Expand Up @@ -1600,6 +1601,7 @@ static bool stratum_gen_work(struct stratum_ctx *sctx, struct work *work)
memcpy(&work->data[9], sctx->job.coinbase, 32+32); // merkle [9..16] + reserved
work->data[25] = le32dec(sctx->job.ntime);
work->data[26] = le32dec(sctx->job.nbits);
work->hash_ver = sctx->job.hash_ver;
memcpy(&work->data[27], sctx->xnonce1, sctx->xnonce1_size & 0x1F); // pool extranonce
work->data[35] = 0x80;
//applog_hex(work->data, 140);
Expand Down Expand Up @@ -1744,7 +1746,7 @@ static bool wanna_mine(int thr_id)
float temp = gpu_temp(cgpu);
if (temp > opt_max_temp) {
if (!conditional_state[thr_id] && !opt_quiet)
gpulog(LOG_INFO, thr_id, "temperature too high (%.0f°c), waiting...", temp);
gpulog(LOG_INFO, thr_id, "temperature too high (%.0f°c), waiting...", temp);
state = false;
} else if (opt_max_temp > 0. && opt_resume_temp > 0. && conditional_state[thr_id] && temp > opt_resume_temp) {
if (!thr_id && opt_debug)
Expand Down Expand Up @@ -1838,7 +1840,7 @@ static void *miner_thread(void *userdata)
}

/* Cpu thread affinity */
if (num_cpus > 1) {
/*if (num_cpus > 1) {
if (opt_affinity == -1L && opt_n_threads > 1) {
if (opt_debug)
applog(LOG_DEBUG, "Binding thread %d to cpu %d (mask %x)", thr_id,
Expand All @@ -1850,7 +1852,7 @@ static void *miner_thread(void *userdata)
(long) opt_affinity);
affine_to_cpu_mask(thr_id, (unsigned long) opt_affinity);
}
}
}*/



Expand Down Expand Up @@ -3436,6 +3438,18 @@ BOOL WINAPI ConsoleHandler(DWORD dwType)
}
#endif

void Clear()
{
#if defined _WIN32
system("cls");
#elif defined (__LINUX__) || defined(__gnu_linux__) || defined(__linux__)
system("clear");
#elif defined (__APPLE__)
system("clear");
#endif
}


int main(int argc, char *argv[])
{
struct thr_info *thr;
Expand All @@ -3444,15 +3458,34 @@ int main(int argc, char *argv[])

// get opt_quiet early
parse_single_opt('q', argc, argv);

printf("*** ccminer " PACKAGE_VERSION " for CPU's by Monkins1010 based on ccminer***\n");
if (!opt_quiet) {
const char* arch = is_x64() ? "64-bits" : "32-bits";

printf(" Originally based on Christian Buchner and Christian H. project\n");
printf("BTC donation address: 1AJdfCpLWPNoAMDfHF1wD5y8VgKSSTHxPo (tpruvot)\n\n");
printf("Verus donation address: REoPcdGXthL5yeTCrJtrQv5xhYTknbFbec (monkins)\n");
}

Clear();

printf(" .. ..\n");
printf(" .lkK0o. 'd0Kkc. \n");
printf(" cKWMMMW0; 'dXMMMMWK: \n");
printf(" :XMMMMMMMXc. lKMMMMMMMMK; .\n");
printf(" lWMMMMMMMMNl., OWMMMMMMMMMNkoxkO0OOko:. 'odddddl,;okOOdodddddc. ,oddddo' ., ldkO00Okxo : .\n");
printf(" ,0MMMMMMMMMNxdXMMMMMMMMMMNNWMMMMMMMMMWK: .xWMMMMMWXWMMMNKNMMMMWd. .kMMMMM0,'oKWMMMMMMMMMMWKc\n");
printf(" ;KMMMMMMMMMMMMMMMMMMMMWWWMMMN0kOXMMMMMK; :XMMMMMMMMMMMWKKWMMMMK, cNMMMMWdlKMMMMXxlcdXMMMMM0'\n");
printf(" :KMMMMMMMMMMMMMMMMMWWWWMMNd'. :XMMMMNdkWMMMMWN0oc:::dXMMMMWd. .kMMMMM0o0MMMMWx. :xxxxxl. \n");
printf(" :KMMMMMMMMMMMMMMMWWWMMMMKdllllxNMMMMN0XMMMMWx, ..xMMMMMK, cNMMMMWo; 0MMMMMNKkdl:, .\n");
printf(" :KMMMMMMMMMMMMNXNWMMMMMMMMMMMMMMMMMXXWMMMMK, :XMMMMWo .kMMMMM0' ;ONWMMMMMMMMN0o. \n");
printf(" ;KMMMMMMMMMW0coNMMMMMKkxxxxxxxxxxxONMMMMWo .xMMMMM0, cNMMMMWl ':oxOKWMMMMMWk. \n");
printf(" ;0MMMMMMMNd.lWMMMMMO, .'cc. .kWMMMM0, ;KMMMMMk. ;0MMMMMXkddddd; .cKMMMMMk. \n");
printf(" ,0WMMMWO;, 0MMMMMWXkxdx0NWWx' :XMMMMWo :NMMMMMNOxxONMMMMMNkOMMMMMKo::ckNMMMMK; \n");
printf(" 'OWMXl. ,OWMMMMMMMMMMMWKo:kWMMMMK, ,0MMMMMMMMWWWMMMMM0,'kWMMMMMMMMMMMWKd' \n");
printf(" .dd' .;oxOKXXK0kdl,. 'x0000Oc .oOKXXKOxc:x0000O: .; okOKXXK0Oxl, .\n");
// printf(" .... .... .....\n");
// printf("*********************************************************************************************************\n");

printf("\n *** ccminer CPU" PACKAGE_VERSION " for Verushash v2.1 - 2.2 by Monkins1010 based on ccminer***\n\n");

//printf(" Built with VC++ %d" , msver());
printf("Originally based on Christian Buchner and Christian H. project\n");

printf("Located at: " PACKAGE_URL " \n\n");


rpc_user = strdup("");
rpc_pass = strdup("");
Expand Down Expand Up @@ -3612,11 +3645,12 @@ int main(int argc, char *argv[])
// Enable windows high precision timer
timeBeginPeriod(1);
#endif
if (opt_affinity != -1) {
if (!opt_quiet)
applog(LOG_DEBUG, "Binding process to cpu mask %x", opt_affinity);
affine_to_cpu_mask(-1, (unsigned long)opt_affinity);
}
//if (opt_affinity != -1) {
// if (!opt_quiet)
// opt_affinity = 0xffffffffffffffff;
// applog(LOG_DEBUG, "Binding process to cpu mask %llx", opt_affinity);
// affine_to_cpu_mask(-1, (unsigned long)opt_affinity);
//}
if (active_gpus == 0) {
applog(LOG_ERR, "No CUDA devices found! terminating.");
exit(1);
Expand Down
Loading

0 comments on commit 1b9ccbb

Please sign in to comment.