Low Byte Productions
Bits! [The Bits And Bytes Of Binary ep.1]
updated
Floating point is a ubiquitous standard that works everywhere, but it needs specialised hardware to have any chance of running fast. This can make calculations on low-powered microcontrollers extremely expensive. Fixed-point solves, giving us a method for cheaply computing fractional results with flexible precision!
00:00:00 Intro
00:03:46 Floating point vs fixed point
00:10:07 Fixed point bit representation
00:17:10 Code: Fixed point defines
00:21:30 Getting to the integer and fractional parts
00:24:24 Sign function and representing ints in fixed point
00:32:14 Converting to and from floating point
00:36:23 Addition and subtraction
00:38:27 Multiplication
00:42:20 Division
00:48:52 Rounding operations
00:50:14 Absolute value
00:54:50 Floor
00:58:57 Getting the fractional part
01:02:38 Ceiling
01:05:37 Round
01:14:14 Motivating example: Analog to digital converter readings
01:30:10 Next time: Sines and cosines
=[ 🔗 Links 🔗 ]=
⭐️ Become a patron and get bonus videos! patreon.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
💻 Github Repo: github.com/lowbyteproductions/fixed-point-math
00:00:00 3D Animated Demo
00:01:36 Understanding X-Y Mode
00:05:00 Firmware Architecture Overview
00:09:52 PWM Digital-to-Analog Conversion
00:14:48 Manually creating images
00:21:57 Visualizing the signals
00:25:03 Writing the static image firmware
00:48:30 PWM signals on the scope
00:51:14 Building the low-pass filters
00:58:42 First 3D image
01:03:30 Reading the 3D renderer firmware code
01:17:15 Final demo
=[ 🔗 Links 🔗 ]=
⭐️ Become a patron and get bonus videos! patreon.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
💻 Github Repo: github.com/lowbyteproductions/3d-oscilloscope-renderer
=[ 🔗 Links 🔗 ]=
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
Chapters
00:00 What is a WS2812 / NeoPixel
02:33 Hardware overview
06:00 What is a "device driver"?
08:35 The signalling protocol
15:00 Reviewing the datasheet
22:00 Figuring out the GPIO timing
49:32 First LED test
53:36 Implementing the driver interface
=[ 🔗 Links 🔗 ]=
🎥 Bare metal playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/stm32-ws2812b
One of the key components is the /proc file system: an interface that the kernel provides for introspecting processes. Combined with ptrace, a system call that allows attaching to and taking control of another process, we write a program to automate extracting information that would otherwise be completely hidden to us!
=[ 🔗 Links 🔗 ]=
https://j3s.sh/thought/recover-lost-text-by-coredumping-firefox.html
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/memory-dumper
=[ 🔗 Links 🔗 ]=
more in depth talk: youtu.be/dFIqNZ8VbRY?si=ZGKcZRex96AUtwlT
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
=[ 🔗 Links 🔗 ]=
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/Turning-Pixels-Into-Waves
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
=[ 🔗 Links 🔗 ]=
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/flow-fields
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
=[ 🔗 Links 🔗 ]=
🐋 RISC-V Docker Image: github.com/francisrstokes/rv-toolchain-docker/pkgs/container/rv-toolchain-docker
🎥 Series Playlist:
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/mit-pdos/xv6-riscv
And of course, where would we be without a false celebration before the ultimate solution 😉
=[ 🔗 Links 🔗 ]=
AES Blog Post: github.com/francisrstokes/githublog/blob/main/2022/6/15/rolling-your-own-crypto-aes.md
Spec: nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf
Deeper justifications and analysis: csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/aes-development/rijndael-ammended.pdf
Attacking AES with power analysis: youtube.com/watch?v=5Hn2D5lrzVo
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
AES Blog Post: github.com/francisrstokes/githublog/blob/main/2022/6/15/rolling-your-own-crypto-aes.md
Spec: nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf
Deeper justifications and analysis: csrc.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/aes-development/rijndael-ammended.pdf
Attacking AES with power analysis: youtube.com/watch?v=5Hn2D5lrzVo
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
In the next video, we'll build the PC side application, and complete this major milestone, before moving on to implementing a cryptographic code signing mechanism, to ensure only authorised code can be loaded onto the device.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
Turns out there were a few bugs - but being able to step though both programs at the same time, seeing how the data flows, allows us to iron those out.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
This protocol is able to automatically process incoming packets, acknowledging or requesting retransmission (or retransmitting when requested), and stuffing the data into a buffer for the application logic to use.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
This protocol consists of a binary packet format, which includes a mechanism for validating the integrity of a packet, as well as a state machine for processing incoming packets, validating them, and automatically requesting retransmission if the packet fails the check.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
Being able to read assembly (if not write it) is a valuable skill - and can help tremendously in both debugging and making sensible performance optimisations.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
PWM is just one function of the built in "Timer" peripheral, which, as the name implies, is able to keep very accurate time.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
Bit Hacks (Beginner to Advanced) video by Creel: youtube.com/watch?v=ZRNO-ewsNcQ
Demystifying bitwise operations blog post by Andrei Ciobanu: andreinc.net/2023/02/01/demystifying-bitwise-ops
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
We'll cover:
- Installing and compiling libopencm3
- Setting up the core system clock
- Configuring a GPIO
- Writing a roughly accurate time delay function
- Blinking a LED
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
This video introduces:
- the series
- what we'll be covering
- who the intended audience is
- the goals and the non-goals
- the hardware you'll need to follow along
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/playlist?list=PLP29wDx6QmW7HaCrRydOnxcy8QmW0SNdQ
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/bare-metal-series
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/Hiding-Data-In-Sound
It's going to involve building custom software that runs on the console, cartridge swapping, and the fabled link cable.
00:00:00 – Intro
00:02:12 – GameBoy Coding Adventure Book
00:03:18 – The plan
00:09:52 – Writing the ROM dumper code
01:14:28 – The GameBoy link port and cable
01:17:52 – Wiring up to the logic analyzer
01:21:18 – Logic SPI setup
01:25:45 – Dumping the ROM
01:31:40 – Processing the dump into a raw binary file
01:40:12 – Testing in an emulator
=[ 🔗 Links 🔗 ]=
📖 GameBoy Coding Adventure: mdagois.gumroad.com/l/CODQn (Use code LBP for discount)
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/francisrstokes/tega
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo (emulator): github.com/francisrstokes/tega
00:00:00 – Intro
00:05:23 – Demo on real hardware
00:06:48 – TEGA Overview
00:08:22 – Modules! No linker required
00:11:18 – Loads, Stores, and instruction representability
00:21:05 – Arithmetic and Logic
00:25:17 – Jumps, Labels, and Branches
00:29:45 – Macro abstraction examples
00:39:28 – Building a ROM
00:45:16 – The GameBoy Memory Map
00:56:58 – Block Jump Code Overview
01:05:39 – Tile graphics
01:12:26 – The DMA routine, and virtual symbol offsets
01:19:19 – Setting up the LCD screen
01:23:52 – Organising values in RAM
01:29:22 – Setting up OAM
01:33:34 – Setting up the player character and obstacle structs
01:35:26 – The main game loop
01:38:08 – Random Number Generation
01:42:26 – Game State Machine
01:53:23 – Jump Physics
02:05:43 – Compression: Encoding side
02:12:42 – Compression: Decoding side
02:17:59 – Running and Debugging in an emulator
02:30:50 – Outro
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/BPS-Patcher
IPS is a relatively old and simple format, and not in widespread use these days, but taking a look at the details provides a lot of insight into the subject, as well as a clear direction for the formats that succeeded it.
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: pawww.patreon.com/lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions/IPS-Binary-Patcher
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
Some of the tools/hardware used in this video, and how to install them:
- 1bitsquared.com/products/icebreaker
- http://bygone.clairexen.net/icestorm
- http://iverilog.icarus.com
- http://gtkwave.sourceforge.net
=[ 🔗 Links 🔗 ]=
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: TODO
Organised by Nate Catelli (github.com/ncatelli), the event takes place over 7 days, with each participant using a maximum of 48 hours to develop their project. You will find everything you need to know about the event on the official github page github.com/LowLevelJam/LLJam0001
Find a team, ask for help, or just come to chat over at the discord server discord.gg/59tmtaQe3X.
Hope to see you there, and can't wait to see what you come up with!
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/watch?v=ER7h4ZTe19A&list=PLP29wDx6QmW4sXTvFYgbHrLygqH8_oNEH
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo (emulator): github.com/LowLevelJavaScript/RISC-V-Emulator
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/watch?v=ER7h4ZTe19A&list=PLP29wDx6QmW4sXTvFYgbHrLygqH8_oNEH
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo (emulator): github.com/LowLevelJavaScript/RISC-V-Emulator
The design involves building a new module, as well as a new super-state of the CPU, which controls when the processor is executing the pipeline, and when it is handling the mechanics of traps.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/watch?v=ER7h4ZTe19A&list=PLP29wDx6QmW4sXTvFYgbHrLygqH8_oNEH
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo (emulator): github.com/LowLevelJavaScript/RISC-V-Emulator
We're diving into machine mode, the associated CSRs, and how they relate to next big piece of functionality we'll be tackling: Traps - Exceptions and Interrupts.
We also take a deep dive into the memory map of the design, relating it to the compilation and linking of the C and assembly code that will run on the processor.
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist: youtube.com/watch?v=ER7h4ZTe19A&list=PLP29wDx6QmW4sXTvFYgbHrLygqH8_oNEH
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo (emulator): github.com/LowLevelJavaScript/RISC-V-Emulator
=[ 🔗 Links 🔗 ]=
🎥 Series Playlist:
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/LowLevelJavaScript/Bit-Packer
🎥 Stream Playlist: youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo:
Edgeguard Keyboard Adapter: keyboard.gg
ebpf-usb: github.com/francisrstokes/ebpf-usb
eBPF: ebpf.io
Book: USB Complete by Jan Axelson
Marcan reverse engineering a MIDI controller: youtube.com/watch?v=cUVuTBH51GY
USB 2.0 Spec: usb.org/document-library/usb-20-specification
Blog with useful resources: hackernoon.com/usb-reverse-engineering-down-the-rabbit-hole-c4809a5b55c4
GreatFET: greatscottgadgets.com/greatfet
🎥 Stream Playlist: youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/francisrstokes/GMMK-Driver
Book: USB Complete by Jan Axelson
Marcan reverse engineering a MIDI controller: youtube.com/watch?v=cUVuTBH51GY
USB 2.0 Spec: usb.org/document-library/usb-20-specification
Blog with useful resources: hackernoon.com/usb-reverse-engineering-down-the-rabbit-hole-c4809a5b55c4
GreatFET: greatscottgadgets.com/greatfet
🎥 Stream Playlist: youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo: github.com/francisrstokes/GMMK-Driver
🎥 Stream Playlist: youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo:
🎥 Stream Playlist: youtube.com/playlist?list=PLP29wDx6QmW7jg0LgRJYAmHLM6G_6NDw6
💌 Updates to your inbox: tinyletter.com/lowleveljavascript
🗣 Discord: discord.gg/FPWaVgk
⭐️ Patreon: patreon.com/lowleveljavascript
💻 Github Repo:


