TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Smolnes: A NES emulator in less than 5000 significant bytes of C++

142 点作者 jpegqs超过 2 年前

12 条评论

molticrystal超过 2 年前
Those who enjoy this might also enjoy &quot;Creating a NES emulator in C++11&quot; [0] [1] [2] while not short in bytes of code(space) there is a nice video series short in minutes(time).<p>Bisqwit takes you on a 30 minute tool assisted coding journey of making an NES emulator and also provides a 15 minute followup Q&amp;A video explaining different aspects.<p>[0] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=y71lli8MS8s" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=y71lli8MS8s</a><p>[1] <a href="http:&#x2F;&#x2F;youtu.be&#x2F;XZWw745wPXY" rel="nofollow">http:&#x2F;&#x2F;youtu.be&#x2F;XZWw745wPXY</a><p>[2] <a href="http:&#x2F;&#x2F;youtu.be&#x2F;QIUVSD3yqqE" rel="nofollow">http:&#x2F;&#x2F;youtu.be&#x2F;QIUVSD3yqqE</a>
评论 #33381445 未加载
评论 #33382297 未加载
mixmix超过 2 年前
If you want to understand how a NES emulator works, I highly recommend javidx9’s videos: <a href="https:&#x2F;&#x2F;youtube.com&#x2F;playlist?list=PLrOv9FMX8xJHqMvSGB_9G9nZZ_4IgteYf" rel="nofollow">https:&#x2F;&#x2F;youtube.com&#x2F;playlist?list=PLrOv9FMX8xJHqMvSGB_9G9nZZ...</a> I personally got more joy watching that series than out of HBO shows.
pvitz超过 2 年前
While reading the code I stumbled upon &quot;case 1 ... 10:” or similar and asked myself how I could have missed this range feature for so many years. It turns out that this is a GCC extension and indeed not part of the language. A list of the C extensions (and C++ extensions) can be found here: <a href="https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc-4.1.2&#x2F;gcc&#x2F;C-Extensions.html#C-Extensions" rel="nofollow">https:&#x2F;&#x2F;gcc.gnu.org&#x2F;onlinedocs&#x2F;gcc-4.1.2&#x2F;gcc&#x2F;C-Extensions.ht...</a>
评论 #33382531 未加载
lioeters超过 2 年前
Big fan of this author&#x27;s work.<p>They have a Gameboy emulator written in C, which can be compiled to WASM and run in the browser.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;binji&#x2F;binjgb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;binji&#x2F;binjgb</a><p>I learned a lot from the code.<p>Also I love this project with a bunch of demos in hand-written WebAssembly Text (WAT) format, which is like low-level Lisp that works only with raw memory, numbers, and minimal syntax.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;binji&#x2F;raw-wasm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;binji&#x2F;raw-wasm</a><p>Then I discovered the same author is quite active in the WebAssembly ecosystem, including specs and tooling. Fascinating stuff!<p><a href="https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;spec" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;spec</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;wabt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WebAssembly&#x2F;wabt</a>
评论 #33386064 未加载
amilios超过 2 年前
Sometimes I think I&#x27;m good at programming, then I find something like this and I&#x27;m put back in my place.
mythz超过 2 年前
A great resource for learning how to write an NES emulator is the Jakt NES monster video series [1] which covers writing the entire emulator where JT shows how to map specs of each instruction to code. The source code uses Jakt&#x27;s modern syntax making it very readable [2].<p>[1] <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLP2yfE2-FXdQBRpnZbcObTe33-eSeSRYl" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLP2yfE2-FXdQBRpnZbcOb...</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;jntrnr&#x2F;jaktnesmonster" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jntrnr&#x2F;jaktnesmonster</a>
binji超过 2 年前
Hi all, author here! Happy to answer any questions y&#x27;all have
userbinator超过 2 年前
IOCCC entry? Tiny emulators seem to appear there semi-regularly, e.g. this one was memorable years ago: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18198374" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=18198374</a>
评论 #33381587 未加载
mid-kid超过 2 年前
This is the same person who made pokegb, a similarly <i>tiny</i> Game Boy emulator: <a href="https:&#x2F;&#x2F;github.com&#x2F;binji&#x2F;pokegb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;binji&#x2F;pokegb</a>
a_t48超过 2 年前
I did something similar, but couldn’t figure out a clever enough way of resampling the audio from “native” rate down to something that Windows was happy with. What was your strategy?
评论 #33381567 未加载
guenthert超过 2 年前
Well, 5000 bytes of C++ <i>plus</i> the SDL library.
评论 #33379965 未加载
评论 #33380709 未加载
评论 #33380516 未加载
评论 #33387470 未加载
minraws超过 2 年前
you got me, though using SDL doesn&#x27;t seem quite as fair if you use that title :P<p>nice work though. I have been writing a compile-eval NES emulator in multiple languages, C++, Rust and such, it was a lot of fun. Still haven&#x27;t managed to get it working with Rust, I still have hope.
评论 #33381087 未加载