5 ms·
The computer this runs on is Ben Eater's 6502 breadboard kit, which I highly recommend to anyone with the slightest interest in wires and NAND gates: https://ea
by oconnor663 5y ago
The computer this runs on is Ben Eater's 6502 breadboard kit, which I highly recommend to anyone with the slightest interest in wires and NAND gates: https://eater.net/6502 https://eater.net/6502. After the hello world program was working, I wanted to try something more substantial, so here's the world's slowest implementation of BLAKE3 :) If you have Rust and Cargo installed, you can run `make emulate` to test out the program in your terminal.
- marktangotango 5y agoHa, this is neat, I haven't seen the permutation table presented this way before, good stuff. permute: ; Rather than permuting the 32-bit words stored in the ; COMPRESS_MSG array, we permute the 8-bit pointers stored ; in the MPTRS array. ; ; The permutation is defined to be: ; 2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8 ; ; If we walk those assignments, we get two loops: ; 0<-2<-3<-10<-12<-9<-11<-5<-0 ; 1<-6<-4<-7<-13<-14<-15<-8<-1
- oconnor663 5y agoI'm pleased with that part, but I'm ashamed of my ror12 function :p I'd love it if anyone could suggest a better way to do it.
- Someone 5y agohttp://6502.org/source/general/SWN.html http://6502.org/source/general/SWN.html swaps the nybbles in A in 8 bytes/12 cycles. That’s not quite what you need, but may give you ideas.
- oconnor663 5y agoOh that looks perfect. I'll have to try it out today and report back.
- jacquesm 5y agoIf you want to be on the far end of the speed/space trade off you could simply use a lookup table. That should speed things up considerably. You'd index it by byte (split the tables, save one shift left) and then recombine the results.
- jroesner 5y agoGreat work! You might like https://github.com/janroesner/sixty5o2 https://github.com/janroesner/sixty5o2 as a lightweight OS for the BE6502, which makes program changes way easier.