This is a Bitcoin miner for C64.
It can run in demo mode or communicate with ngbtminer for C64 over serial link (1200 baud, 8N1) to access Bitcoin blockchain.
Note: hashing is 20% faster than in this version, takes 3.6s for each round.
A C64 would need 337 years and 10 months to reach this result
- low memory footprint
- low power usage
- doesn't take over GPU
- dedicated mining equipment
- not very fast - 0.2 hash/s (1MHz PAL)
Coded by Maciej 'YTM/Elysium' Witkowiak using cc65.
Based on stacksmashing's work on Bitcoin mining with Game Boy
Just load and run miner.prg
in VICE and press 'd' for demo mode. In about 30 minutes (at 100% emulation speed)
you will reach nonce value $0000019d, for which the hashed block value is smaler than the test target.
Don't forget to verify md5 sum of the downloaded file! You wouldn't want your precious C64 computation power to be hijacked by hackers.
VICE's x64 emulator can send/receive RS232 communication over TCP socket. My version of ngbtminer will wait for connections on port 25233.
Setup ngbtminer to connect to your bitcoind (or your mining pool), see original project for more info.
Alternatively you can run the test code: python3 test_ngbtminer.py
to mine one test block in 5 rounds without bitcoind
- Start ngbtminer / test_ngbtminer
- Run VICE's x64, load and run
miner.prg
- Setup Vice:
- Settings -> RS232 settings -> RS232 settings -> RS232 device 1 -> set to NGBTMINER_IP:25233, for example
192.168.2.54:25233
- Settings -> RS232 settings -> RS232 user port settings:
- Enable RS232 userport emulation
- Userport device - RS232 device 1
- Userport baud rate - 1200
- Settings -> RS232 settings -> RS232 settings -> RS232 device 1 -> set to NGBTMINER_IP:25233, for example
- Continue the miner, press any key
No, it really does the same thing that every other miner does:
- Receive block data to be hashed (76 bytes)
- Append 32-bit nonce at the end
- Hash twice with
sha256
algorithm - Check if result is smaller than the target value (current blockchain difficulty)
- If not, increase nonce and try again
The 6502 CPU in C64 runs at about 1MHz and it doesn't handle 32-bit computations very efficiently.
Just enjoy the experience.