m (@m_bitsnbites) header
m (@m_bitsnbites) profile picture

Software/hardware developer (3D graphics, compression, audio/music, signal processing...). Creator of GLFW, BuildCache and MRISC32.

Sweden
Joined May 2011
Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)Photo by m (@m_bitsnbites)
Happily running the MC1 #FPGA computer @ 120 MHz, after patching my broken DE0-CV board with a new oscillator via GPIO pins (off screen, wires to the right). github.com/mrisc32/mc1 #MRISC32 #CPU #VHDL #opensource
1
5
24
Created another tool: Remote V4L recording (for Linux). I needed to capture a video stream from my PS3, but the laptop that I could connect to the HDMI was too weak, so I had to stream the raw video+audio data over LAN to a more powerful computer. codeberg.org/mbitsnbites/vid…
3
252
Latest hack: A spatial domain variable block size luma dependent chroma compression algorithm bitsnbites.eu/a-spatial-doma… #image #compression
4
196
This weekend's hack: How long does it take to brute force a cryptographic key? bruteforce.bitsnbites.eu/
1
111
Why not change the Unix epoch to the big bang? The number of seconds since the big bang fits comfortably in an unsigned 64-bit integer (only 59 bits are required, so far). Caveat: All we have to do is to define the age of the universe with sub-second accuracy. 🤔
4
279
So far I like codeberg.org - Free European Git hosting, with a familiar interface. #git #codeberg #foss
165
Smile of the day: Every error message should start with "dear friend". 🙂 Courtesy of codeberg.org/kenneth_stailey…
158
In anticipation of the C23 standard #embed, I couldn't help revisiting the age old covert-binary-data-to-source-code problem. I came up with a ludicrous speed conversion tool (2 GB/s binary data conversion rate). Light speed is too slow! Check it out! gitlab.com/mbitsnbites/lsb2s
1
1
1
8
2,027
Fun fact: Even when compiled for MRISC32 and running in my (quite slow) CPU simulator, lsb2s is *STILL* faster at generating source code than xxd -include (running natively).
3
230
BuildCache just gained support for caching Rust builds 🥳 Contribution by Firefox developer @__farre__ 🙏 Get v0.29 and speed up your Rust builds: gitlab.com/bits-n-bites/buil… #rustlang @mozilla @firefox
214
Want to run #DOOM. Need something to run it on. ✔️ Develop new CPU ISA. ✔️ Write new GCC backend. ✔️ Implement CPU and VGA gfx in FPGA. ✔️ Write a minimal OS. ✔️ Port DOOM to the new CPU & platform. ✔️ Optimize rendering code. Now I can run DOOM 🤘 @romero #MRISC32 #FPGA
22
83
8
521
41,143
Came up with a working set of instructions for PC-relative calls and address calculations for my V16 ISA. +/-2MB range w two instructions (32 bits of code), and full 4GB range w three instructions. Also perfectly fusable. Struggling somewhat w aligned relocs in binutils/bfd.
1
3
417
The first V16 program in the world! Hand-assembled in a hex editor, disassembled with binutils, nothing to run it on, and it's a pretty meaningless program (the prologue/epilogue isn't even needed), but still 🥳 Forgot how cute 16-bit instructions look 😅 #CPU #ISA
2
28
2,034
Trying a new ISA targeting the very low end (think AVR, Cortex M), but with a twist. Only at the concept level right now: gitlab.com/mbitsnbites/v16 Still not convinced about the 16-bit instruction encoding, but I'm fairly confident about the vector functionality.
4
1
12
1,936
TIL: There's a browser called Ladybird - written entirely from scratch. Something I didn't think was possible (given the complexity of a browser). Granted, it isn't feature complete and there are bugs, but IT WORKS! It's an astonishing feat! 🤯 awesomekling.github.io/Ladyb…
1
6
376
Making some progress on optimizing the #Quake2 software renderer for #MRISC32 (running in simulator so far). How it started: 632 frames, 272.2 seconds: 2.3 fps How it's going: 632 frames, 126.8 seconds: 5.0 fps Reducing the resolution to 320x160 makes it ALMOST fluent 😁
1
11
592
Turning on clang sanitizers for the regular Linux x86_64 build also revealed some bad behavior (null pointer dereferencing etc) - which may be a clue to why it's acting up on the FPGA. More work needed...
1
74
So FemtoRV by @BrunoLevy01 and SERV by @OlofKindgren are head to head for the "smallest RISC-V core", at 0.029mm2 in 65nm tech. Those are seriously tiny cores🧐 Great work and article by @BitlogIT bitlog.it/20220118_asic_roun…
3
16
1,530
Okeey! Quake II builds, and runs in the MRISC32 simulator. ...although at painfully slow framerates (and not on the FPGA yet - possibly some memory/buffer-overrun issues?). Optimizations ... may now begin 😎 #FPGA #Quake2 #MRISC32
1
1
14
1,366
Making some progress with porting Quake II to MC1. First step was to refactor the build system & code to support static linking of the game & rendering modules. ✅ Next remove dependencies on SDL, mmap & network. ✅ Todo: MC1 gfx & input and a null sound driver. ⏳
4
864
For instance, I had long wondered why ARM included a flags register in AArch64, despite the pain points for OoO machines, and I finally got the answer: To be able to emulate x86 code efficiently (hello Apple Rosetta 2!).
1
172