HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

I made a NES emulator in 15 minutes

Bisqwit3 HN recommenders · recommended in 5 months, 2013-2022
YouTube
389K views · 14 years ago · tutorial · evergreen

Bisqwit writes a NES emulator in C++ in about 15 minutes of tool-assisted, sped-up coding, narrated with captions. It shows an accurate emulator built with a compile-time generated 6502 instruction table. Part 2 covers compiling and running it.

HN programmers admire it as a clean, clever demonstration of emulator design and as the standout of a favorite programming YouTuber.

Demoscene & retrocomputingC, C++, Rust, Go & systems languagesSoftware practice, open source & careers#nes#6502#c++#emulation#livecoding#opcodedispatch

9 comments from Hacker News

@molticrystal2022 · in “Smolnes: A NES emulator in less than 5000 significant bytes of C++”

Those who enjoy this might also enjoy "Creating a NES emulator in C++11" [0] [1] [2] while not short in bytes of code(space) there is a nice video series short in minutes(time). Bisqwit takes you on a 30 minute tool assisted coding journey of making an NES emulator and also provides a 15 minute followup Q&A video explaining different aspects. [0] ▶ this video [1] link [2] link

RecommendsView on HN
@petercooper2019 · in “Let’s Create a Speech Synthesizer in C++17 [video]”

Agreed. My favourite programming YouTuber by a long stretch. If anyone is unfamiliar with him and wants to watch some of the "classics" I'd recommend these: His "cracking videogame passwords" series: link Creating a Doom-style 3D engine in C: link Creating a Rogue-like game in C++11: link Creating a PIC16 emulator and NES music player: link Creating a NES emulator: ▶ this video Creating a DOS VGA raytracer: link

Strongly recommendsView on HN
@0xcde4c3db2018 · in “Goboy: Multi-Platform Nintendo Game Boy Color Emulator Written in Go”

The main advantage to NES emulation is that it's a very mature area of study. High-quality documentation is much more readily available than for other systems, and there's more public discussion of the specific problems that NES emulator authors encounter (both primarily on nesdev.com [1] [2]). There's even a sort of tool-assisted speedrun of writing an accurate NES emulator, if you're into that sort of thing [3] [4]. [1] link [2] link [3] ▶ this video [4] link

CitesView on HN
@petercooper2016 · in “Ask HN: What is your favorite YouTube channel for developers?”

link is by far my favorite and I've spent many hours watching him. He does things like create a Doom-style engine from scratch: link .. create a NES emulator: ▶ this video .. work back from a C++17 example to show why new C++ standards are needed: link .. and even building a Tetris clone in GW-BASIC: link .. Right now, he's doing a series on cracking 80s videogame passwords: link Sirajology - link - is another interesting one. He moves a bit too quickly for me, but does things like explain machine learning in 5 minutes or how to generate music with systems like Tensorflow.

RecommendsView on HN
@iofj2015 · in “The Strange Appeal of Watching Coders Code”

I love having streams of coding open while working. It makes me type faster (I think). Sound is off though. ▶ this video

CitesView on HN
@atesti2015 · in “Nes emulator written in go”

Here's a very clean and clever NES emulator in C++ by Bisqwit of TAS fame: ▶ this video He presents the code in the style of a tool assisted run, typing it in in high speed. I never saw templates used like that to create the unrolled CPU dispatcher

RecommendsView on HN
@petercooper2014 · in “Ask HN: Your favorite YouTube channels?”

link record high quality videos at many programming conferences each year and then share the recordings on YouTube. So much to enjoy here, especially if you're open source leaning, like most of the events they do. O'Reilly puts up lots of good stuff at link although the webinar recording quality leaves a lot to be desired. A real random set of tech topics though and often something worth watching. Entrepreneur - link - usually puts up lots of short videos with a business tip in or something. Sometimes longer interviews. Usually worthwhile if a little superficial at times. The guy who founded Something Awful has a ridiculously addictive channel - link - he generally plays horrifically poorly produced indie games with his sidekick Shmorky and I could listen to their absurdist banter all day. It's a bit of a mish mash but link always blows my mind when he does his coding videos such as coding a NES emulator in C++11: ▶ this video link is awesome if you're into supercars. He's currently doing a tour of European supercar events and factories putting up a video each day. Far Lands or Bust - link - is a guy who started to walk towards the 'far lands' in a Minecraft maps years ago. He's something like 10% of the way but is still plodding along recording his progress. This is a real pilgrimage with all the highs and lows that entails. MrThaiBox123 - link - is a British IT expert who seems to have an endless supply of cash to buy gadgets, phones, and amazing computer setups.

RecommendsView on HN
@grapeshot2013 · in “Show HN: I made an easy-to-understand 6502 emulator in pure C”

It's possible to do something like that in C. In C++, you can even do some template magic to create all the appropriate functions for each opcode based on something like the original instruction decode ROM. Brilliant and short code, but very difficult to write in the first place. Here's a very apropos example of this technique as applied to the 6502. ▶ this video

CitesView on HN
@GhotiFish2013 · in “A quick look at the Redis source code”

Yes. It is certainly more pithy. ACTUALLY! It reminds me of a technique Bisqwit used when he made his emulator. He used strings to define the behavior of certain instructions, the strings were actually interpreted at compile time. Though I think this is a C++ specific trick. ▶ this video he brings in the instruction table at 1:30

CitesView on HN
Reverse emulating the NES to give it SUPER POWERS!22:21

Reverse emulating the NES to give it SUPER POWERS!

suckerpinch
1.1M views • 8 years ago
C++ Weekly - Ep 19 C++14 For The Commodore 6417:13

C++ Weekly - Ep 19 C++14 For The Commodore 64

C++ Weekly With Jason Turner
25K views • 10 years ago
FIXING the ENTIRE SM64 Source Code (INSANE N64 performance)18:20

FIXING the ENTIRE SM64 Source Code (INSANE N64 performance)

Kaze Emanuar
3.2M views • 4 years ago
The rigs we've created for chipsynth MD's emulation.14:04

The rigs we've created for chipsynth MD's emulation.

plgDavid
24K views • 7 years ago
CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”1:19:52

CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”

CppCon
264K views • 10 years ago
Creating a Doom-style 3D engine in C18:50

Creating a Doom-style 3D engine in C

Bisqwit
991K views • 11 years ago
Did Nintendo really forget to Optimize Super Mario 64 ? | MVG13:14

Did Nintendo really forget to Optimize Super Mario 64 ? | MVG

Modern Vintage Gamer
1.3M views • 6 years ago
Exploring Sid Meier's Pirates! - BASIC Code, Quirks, Bugs on Commodore 6446:01

Exploring Sid Meier's Pirates! - BASIC Code, Quirks, Bugs on Commodore 64

8-Bit Show And Tell
115K views • 5 years ago
The Making of: ROM City Rampage (Retro City Rampage)10:45

The Making of: ROM City Rampage (Retro City Rampage)

VblankEntertainment
399K views • 13 years ago
Finding the BEST sine function for Nintendo 6426:41

Finding the BEST sine function for Nintendo 64

Kaze Emanuar
418K views • 3 years ago
2021: Year of the Linux Gaming Desktop - Andrew Kelley42:38

2021: Year of the Linux Gaming Desktop - Andrew Kelley

Zig SHOWTIME
15K views • 5 years ago
Emulating the DX7 the HARD way18:41

Emulating the DX7 the HARD way

plgDavid
23K views • 5 years ago
How we fit an NES game into 40 Kilobytes12:04

How we fit an NES game into 40 Kilobytes

Morphcat Games
3.7M views • 8 years ago
Computer program that learns to play classic NES games16:18

Computer program that learns to play classic NES games

suckerpinch
2.2M views • 13 years ago
Amiga Hardware Programming 1 - Use the Assembler and wait for left click2:53

Amiga Hardware Programming 1 - Use the Assembler and wait for left click

ScoopexUs
90K views • 13 years ago
How a Laser-Shot Disk Defeats Hackers & Pirates (Coding Secrets)5:01

How a Laser-Shot Disk Defeats Hackers & Pirates (Coding Secrets)

GameHut
132K views • 8 years ago
Live ClojureScript Game Editor5:27

Live ClojureScript Game Editor

ibdknox
34K views • 14 years ago
Hacking with Andrew and Brad: tip.golang.org1:02:49

Hacking with Andrew and Brad: tip.golang.org

The Go Programming Language
99K views • 11 years ago
I wrote a Raytracer for DOS, 16 VGA colors15:00

I wrote a Raytracer for DOS, 16 VGA colors

Bisqwit
905K views • 15 years ago
Building my dream computer - Part 120:37

Building my dream computer - Part 1

The 8-Bit Guy
3M views • 7 years ago