# Matias Salles > Software engineer, Ruby/Crystal developer, and author. Born in Buenos Aires, raised in Montevideo, now doing a master's in AI back in Buenos Aires. This is my personal blog where I write about Ruby internals, Crystal, emulation, electronics, and software engineering in general. ## About me I'm a Ruby on Rails developer who got into Crystal after trying to build a NES emulator in Ruby (it ran at 0.5 FPS). I rewrote it in Crystal and got 60 FPS. Then I wrote a 280-page book about the whole process. I also built a 4-bit CPU from scratch with breadboards and integrated circuits during my first year of college. ## The book: Building Your First Emulator "Building Your First Emulator: Understanding How Emulators Work by Building a NES from Scratch" is a 280-page step-by-step guide to building a working NES emulator in Crystal. It covers the 6502 CPU (all 151 official opcodes, addressing modes, and flags), PPU background and sprite rendering, APU audio synthesis, controller input, and cartridge mappers (NROM and MMC1). - Books page: https://matiassalles99.codes/books/ - Interactive WebAssembly NES emulator: https://emulator.matiassalles99.codes - Free runnable NES hardware guides (EN): https://emulator.matiassalles99.codes/learn/ - Guías interactivas de NES (ES): https://emulator.matiassalles99.codes/learn/es/ - Free sample chapter (PDF, English): https://emulator.matiassalles99.codes/demo-en.pdf - Muestra gratis (PDF, Español): https://emulator.matiassalles99.codes/demo-es.pdf - Buy on Leanpub (PDF & EPUB, English): https://leanpub.com/nes-emulator-en - Comprar en Leanpub (PDF & EPUB, Español): https://leanpub.com/nes-emulator-sp - Buy on Amazon Kindle: https://www.amazon.com/dp/B0H86PFYCW - Book source code (Crystal): https://github.com/matiassalles99/nes-emulator-book ## Games: Truco · Card Nights A 3D multiplayer Truco card game that runs in the browser (Argentine, Uruguayan and Brazilian Paulista rules). Play online with friends with voice chat and card signals, or against bots. Characters with their own animations, gestures, card backs and maps. Free, in Spanish and Portuguese. - Games page: https://matiassalles99.codes/games/ - Play: https://truco.cardnights.app ## Free runnable NES hardware guides - [The 6502, for web developers](https://emulator.matiassalles99.codes/learn/6502-for-web-developers/): Registers, opcodes, addressing modes, and flags with an interactive WebAssembly 6502 simulator. - [From a tile to your first NES background pixel](https://emulator.matiassalles99.codes/learn/first-background-pixel/): How nametables, CHR bitplanes, and palettes produce a pixel on screen. - [Memory-mapped I/O: when a write talks to hardware](https://emulator.matiassalles99.codes/learn/memory-mapped-io/): How the NES CPU bus routes addresses to RAM, mirrors, and PPU registers ($2000-$2007). ## Blog posts - [A Free Tool to Add Video Captions in Your Browser](https://matiassalles99.codes/posts/free-video-captions-in-your-browser/): Building a client-side browser video captioning tool using Whisper (Transformers.js) and FFmpeg. - [Publishing My Emulator Book on Amazon KDP](https://matiassalles99.codes/posts/publishing-emulator-book-on-amazon-kdp/): Converting the NES emulator book to EPUB, updating chapters from reader feedback, and launching on Amazon Kindle. - [Slap Links: A Vibecoded Chrome Extension](https://matiassalles99.codes/posts/slap-links-vibecoded-chrome-extension/): Building and shipping a Chrome extension for quick link management. - [From Heroku to DigitalOcean: $4/month Side Project Deploys](https://matiassalles99.codes/posts/heroku-to-digital-ocean/): Moving Rails side projects from Heroku to a $4 DigitalOcean droplet using Kamal and SQLite. - [Cheap Domains for Indie Hackers: Why I Moved to Porkbun](https://matiassalles99.codes/posts/cheap-domains-porkbun/): Cutting domain renewal costs in half by transferring domains from GoDaddy to Porkbun with Cloudflare DNS. - [Building a NES Emulator from Scratch: The Book (Crystal)](https://matiassalles99.codes/posts/building-nes-emulator-crystal-book/): The story behind the book, 6502 CPU and PPU code samples in Crystal, and the playable WebAssembly version. - [Crystal: The Language I Didn't Know I Needed](https://matiassalles99.codes/posts/crystal-programming-language/): How I discovered Crystal while building a NES emulator in Ruby, why the syntax felt familiar, and what the 240x speedup looked like. - [Save Money on Heroku: Share One Database Across Multiple Apps](https://matiassalles99.codes/posts/heroku-tips/): Using PostgreSQL schema_search_path to share a single database across multiple Heroku apps. - [Building a 4-bit CPU with Integrated Circuits and Breadboards](https://matiassalles99.codes/posts/4bit-cpu/): How my friend and I built a 4-bit CPU from integrated circuits for a college assignment, covering the clock, ALU, registers, RAM, and control unit. - [Active Record's Magic: How Rails Defines Getters and Setters](https://matiassalles99.codes/posts/active-record-magic/): A deep dive into ActiveRecord internals, explaining how AttributeMethods, ModelSchema, and Railties define methods from your database schema. - [How to Create a DSL in Ruby](https://matiassalles99.codes/posts/dsl-with-ruby/): Building a domain-specific language using define_method, class_eval, and ActiveSupport::Concern, based on a real open-source gem. ## Links - Blog: https://matiassalles99.codes - Books: https://matiassalles99.codes/books/ - Games: https://matiassalles99.codes/games/ - Truco (3D card game): https://truco.cardnights.app - GitHub: https://github.com/matiassalles99 - Emulator & Guides: https://emulator.matiassalles99.codes - Emulator LLM index: https://emulator.matiassalles99.codes/llms.txt - Full blog content for LLMs: https://matiassalles99.codes/llms-full.txt