Browse Source

Added support for MaruCoin

djm34
phm 11 years ago
parent
commit
67cf41a50c
  1. 1
      Makefile.am
  2. 1
      configure.ac
  3. 6
      driver-opencl.c
  4. 1
      miner.h
  5. 5
      ocl.c
  6. 6
      sgminer.c

1
Makefile.am

@ -46,6 +46,7 @@ sgminer_SOURCES += darkcoin.c darkcoin.h
sgminer_SOURCES += qubitcoin.c qubitcoin.h sgminer_SOURCES += qubitcoin.c qubitcoin.h
sgminer_SOURCES += quarkcoin.c quarkcoin.h sgminer_SOURCES += quarkcoin.c quarkcoin.h
sgminer_SOURCES += myriadcoin-groestl.c myriadcoin-groestl.h sgminer_SOURCES += myriadcoin-groestl.c myriadcoin-groestl.h
sgminer_SOURCES += marucoin.c marucoin.h
sgminer_SOURCES += kernel/*.cl sgminer_SOURCES += kernel/*.cl
bin_SCRIPTS = $(top_srcdir)/kernel/*.cl bin_SCRIPTS = $(top_srcdir)/kernel/*.cl

1
configure.ac

@ -349,6 +349,7 @@ AC_DEFINE_UNQUOTED([DARKCOIN_KERNNAME], ["darkcoin"], [Filename for DarkCoin opt
AC_DEFINE_UNQUOTED([QUBITCOIN_KERNNAME], ["qubitcoin"], [Filename for QubitCoin optimised kernel]) AC_DEFINE_UNQUOTED([QUBITCOIN_KERNNAME], ["qubitcoin"], [Filename for QubitCoin optimised kernel])
AC_DEFINE_UNQUOTED([QUARKCOIN_KERNNAME], ["quarkcoin"], [Filename for QuarkCoin optimised kernel]) AC_DEFINE_UNQUOTED([QUARKCOIN_KERNNAME], ["quarkcoin"], [Filename for QuarkCoin optimised kernel])
AC_DEFINE_UNQUOTED([MYRIADCOIN_GROESTL_KERNNAME], ["myriadcoin-groestl"], [Filename for MyriadCoin-Groestl optimised kernel]) AC_DEFINE_UNQUOTED([MYRIADCOIN_GROESTL_KERNNAME], ["myriadcoin-groestl"], [Filename for MyriadCoin-Groestl optimised kernel])
AC_DEFINE_UNQUOTED([MARUCOIN_KERNNAME], ["marucoin"], [Filename for MaruCoin optimised kernel])
AC_SUBST(OPENCL_LIBS) AC_SUBST(OPENCL_LIBS)
AC_SUBST(OPENCL_FLAGS) AC_SUBST(OPENCL_FLAGS)

6
driver-opencl.c

@ -215,6 +215,8 @@ static enum cl_kernels select_kernel(char *arg)
return KL_QUARKCOIN; return KL_QUARKCOIN;
if (!strcmp(arg, MYRIADCOIN_GROESTL_KERNNAME)) if (!strcmp(arg, MYRIADCOIN_GROESTL_KERNNAME))
return KL_MYRIADCOIN_GROESTL; return KL_MYRIADCOIN_GROESTL;
if (!strcmp(arg, MARUCOIN_KERNNAME))
return KL_MARUCOIN;
return KL_NONE; return KL_NONE;
} }
@ -1367,6 +1369,9 @@ static bool opencl_thread_prepare(struct thr_info *thr)
case KL_MYRIADCOIN_GROESTL: case KL_MYRIADCOIN_GROESTL:
cgpu->kname = MYRIADCOIN_GROESTL_KERNNAME; cgpu->kname = MYRIADCOIN_GROESTL_KERNNAME;
break; break;
case KL_MARUCOIN:
cgpu->kname = MARUCOIN_KERNNAME;
break;
default: default:
break; break;
} }
@ -1406,6 +1411,7 @@ static bool opencl_thread_init(struct thr_info *thr)
case KL_QUBITCOIN: case KL_QUBITCOIN:
case KL_QUARKCOIN: case KL_QUARKCOIN:
case KL_MYRIADCOIN_GROESTL: case KL_MYRIADCOIN_GROESTL:
case KL_MARUCOIN:
thrdata->queue_kernel_parameters = &queue_sph_kernel; thrdata->queue_kernel_parameters = &queue_sph_kernel;
break; break;
default: default:

1
miner.h

@ -383,6 +383,7 @@ enum cl_kernels {
KL_ZUIKKIS, KL_ZUIKKIS,
KL_QUARKCOIN, // kernels starting from this will have difficulty calculated by using quarkcoin algorithm KL_QUARKCOIN, // kernels starting from this will have difficulty calculated by using quarkcoin algorithm
KL_QUBITCOIN, KL_QUBITCOIN,
KL_MARUCOIN,
KL_DARKCOIN, // kernels starting from this will have difficulty calculated by using bitcoin algorithm KL_DARKCOIN, // kernels starting from this will have difficulty calculated by using bitcoin algorithm
KL_MYRIADCOIN_GROESTL, KL_MYRIADCOIN_GROESTL,
}; };

5
ocl.c

@ -474,6 +474,11 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
strcpy(filename, MYRIADCOIN_GROESTL_KERNNAME".cl"); strcpy(filename, MYRIADCOIN_GROESTL_KERNNAME".cl");
strcpy(binaryfilename, MYRIADCOIN_GROESTL_KERNNAME); strcpy(binaryfilename, MYRIADCOIN_GROESTL_KERNNAME);
break; break;
case KL_MARUCOIN:
applog(LOG_WARNING, "Kernel marucoin is experimental.");
strcpy(filename, MARUCOIN_KERNNAME".cl");
strcpy(binaryfilename, MARUCOIN_KERNNAME);
break;
case KL_NONE: /* Shouldn't happen */ case KL_NONE: /* Shouldn't happen */
break; break;
} }

6
sgminer.c

@ -4239,6 +4239,9 @@ void write_config(FILE *fcfg)
case KL_MYRIADCOIN_GROESTL: case KL_MYRIADCOIN_GROESTL:
fprintf(fcfg, MYRIADCOIN_GROESTL_KERNNAME); fprintf(fcfg, MYRIADCOIN_GROESTL_KERNNAME);
break; break;
case KL_MARUCOIN:
fprintf(fcfg, MARUCOIN_KERNNAME);
break;
} }
} }
@ -6055,6 +6058,9 @@ static void rebuild_nonce(struct work *work, uint32_t nonce)
case KL_MYRIADCOIN_GROESTL: case KL_MYRIADCOIN_GROESTL:
myriadcoin_groestl_regenhash(work); myriadcoin_groestl_regenhash(work);
break; break;
case KL_MARUCOIN:
marucoin_regenhash(work);
break;
default: default:
scrypt_regenhash(work); scrypt_regenhash(work);
break; break;

Loading…
Cancel
Save