11 comments

  • msephton46 minutes ago
    A couple months ago I wrote about this kind of transcompilation hop-skip-jump: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49643284">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=49643284</a><p>I used it to get games written in Lua running on SNES and in my own language&#x2F;engine running on Dreamcast, Wii, Web and more.
  • raldi3 hours ago
    But the Japanese Contra was so much better! <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;shorts&#x2F;CiXzONyCDW0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;shorts&#x2F;CiXzONyCDW0</a>
  • shinryudbz2 hours ago
    Is the audio not supposed to work? I was hoping to hear the legendary tracks!
  • gwbas1c4 hours ago
    One of the things that I&#x27;m curious about: How easy &#x2F; hard is it to use the same NES game with higher resolution &#x2F; color graphics, and sample-based sound?<p>Are there any emulators out there that let you swap in higher resolution assets so a game can be freshened without a complete port?
    • vunderba3 hours ago
      You might like 3dSen, which came out several years ago. It does some pretty crazy stuff, converting NES games into essentially 3D voxel environments.<p><a href="https:&#x2F;&#x2F;store.steampowered.com&#x2F;app&#x2F;1147940&#x2F;3dSen_PC" rel="nofollow">https:&#x2F;&#x2F;store.steampowered.com&#x2F;app&#x2F;1147940&#x2F;3dSen_PC</a>
      • tevlon3 hours ago
        whoa, that&#x27;s cool. I didn&#x27;t know about this. Thanks for sharing!
    • BSPtree4 hours ago
      I would not think so, at least not in a meaningful way. That would require to edit the cartridge data thus the ROM, as all sprite data was contained within the cartridge. Sample based sound is impossible natively, as NES and older game consoles don&#x27;t work with digital data but synthesizers. You could perhaps synthesize the music to WAV files and then enchance it. But then again, NES and thus its emulators have no way of playing digitized audio!
      • kevin_thibedeau1 hour ago
        &gt; Sample based sound is impossible natively, as NES and older game consoles don&#x27;t work with digital data<p>The NES supports PCM audio. It was notably implemented wrong in the title screen of Double Dribble and fixed with a patch that produces clearer audio after bit reversal into the correct encoding for the hardware:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Jli0RGpuZDg" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=Jli0RGpuZDg</a>
      • cowlevel3 hours ago
        The NES in particular is probably not too difficult to upscale, because the graphics data is stored on its own ROM chip (sometimes RAM) in a well structured layout. SMB1 just uses a ROM chip containing many tile graphics which the CPU code addresses by tile index. It would be really easy for an emulator to use the same tile indices to address any arbitrary set of tiles loaded from a PNG. Some games use RAM, which makes it harder as you&#x27;d have to index the PNG by hash or something.
      • pantelisk3 hours ago
        Compute motion vectors, faux depth, and add DLLS5 to it maybe? Could be pretty cool, or pretty horrific. Only one way to find out :)
    • unleaded4 hours ago
      Mesen has texture packs. Don&#x27;t know about sound, you&#x27;d have to reverse each game&#x27;s sound driver first. <a href="https:&#x2F;&#x2F;vgmpf.com&#x2F;Wiki&#x2F;index.php?title=Famicom&#x2F;NES_Sound_Driver_List" rel="nofollow">https:&#x2F;&#x2F;vgmpf.com&#x2F;Wiki&#x2F;index.php?title=Famicom&#x2F;NES_Sound_Dri...</a>
    • kekebo4 hours ago
      Idk about swapping assets but zsnes used to have a range of video filters that could improve the experience on a modern screen quite a bit.<p>Edit: For SNES, not NES, my bad.
  • egonschiele2 hours ago
    Contra is my favorite game of all time so this is a real treat, and the co-op idea is fantastic. Not to be greedy, but how hard would it be to add music? :)
  • BSPtree4 hours ago
    Cool, how did you build the multiplayer mode? And how much AI was used?
    • Emjayen33 minutes ago
      I think you know the answer to that; they poked and prodded their surrogate mommy to do their homework for them.
    • esikich2 hours ago
      100% AI I&#x27;m sure. I played around with this kind of thing a month or so ago and Codex had no problems mashing games up from just the ROMs. In about 30 minutes I had the contra guys running through SMB 1 shooting enemies.
      • waltbosz46 minutes ago
        Can you elaborate on the process? Do you just provide it with the ROMs and it is able to pull apart the relevant sprites and code pieces, and recombine into a new ROM?
    • tevlon3 hours ago
      For the Multiplayer part: It&#x27;s deterministic lockstep. Both browsers run the same C core (compiled to WebAssembly), and the only thing sent over the network is each player&#x27;s button bitmask per frame. Local input is delayed by 4 frames (~67 ms), which hides normal internet latency; if the other player&#x27;s input for a frame hasn&#x27;t arrived yet, the game waits for it. Every 2 seconds both sides compare a hash of the game RAM to catch desyncs. Transport is a WebRTC data channel via PeerJS (its free cloud server handles matchmaking with a room code), with Google&#x27;s STUN server for NAT traversal and Metered&#x27;s free-tier TURN relay as a fallback when a direct connection isn&#x27;t possible.<p>For AI usage: It was all done by Claude&#x2F;Codex, but it wasn&#x27;t that straight forward. First: i started in April and the models weren&#x27;t good enough and would make errors. You could see those immediately in glitches. Then, i spent some time in building a harness and collect telemetry data in Mesen. Once, i had that: i just played the game in the emulator and asked Claude Opus 5.5 to use this as verification. The rest was smooth.
  • jasonlotito41 minutes ago
    Whenever I see a game that uses the arrow keys and doesn&#x27;t offer WASD as well, I can&#x27;t help but see a game written by a non-gamer. I consider these fundamentals, and a shibboleth of whether I should care.
    • anonymous90821337 minutes ago
      While I&#x27;m not defending a slop port, I have to question your gamer credentials. Maybe by gamer you mean a Call of Duty player? WASD is traditional for FPS&#x2F;TPS games that expect you to have one hand on the mouse. Most 2D games, and every emulator I&#x27;ve ever used, have never offered WASD.
      • literallyanythi30 minutes ago
        correct me if i&#x27;m wrong, gamer credential questioner, but WASD was immortalized by the id Software &quot;win Carmack&#x27;s ferrari&quot; tournament. Before then EDSF was also popular because it gave you more keys on the left side for hotkeys.<p>I do think you&#x27;re objectively correct in your post, but I think what the grandparent meant was that &quot;The author isn&#x27;t actually interested in playing Contra on his website&quot; which is why QoL stuff like that wasn&#x27;t added and it &quot;smells&quot; like it should be there if you cared about playing on the thing you actually shared to HN. I know the first thing I would do would be to add wasd + mouse support to Contra, since the control scheme is the reason I don&#x27;t try to play it. But at the same time I have never been interested in games that deliberately limit your controls as a form of difficulty (feels like a Japanese gamedev thing, from Resident Evil to Dark Souls)
        • justsomehnguy23 minutes ago
          NB: WASD won because most (like 99%) of the keyboards did had (and I can bet cheap shit still have) some dead keys aka &#x27;key ghosting&#x27; on ESDF.
          • literallyanythi11 minutes ago
            You awoke negative-nostalgia to membrane keyboards where I remember I couldn&#x27;t hold Shift + W + A at the same time in Minecraft as a kid so you&#x27;re definitely right about bad keyboards, but I remember dead keys on WASD as well. I wasn&#x27;t there, but the largest consensus seems to be that Quake popularized it, plain and simple. I&#x27;m sure other factors like what you mention helped it become the dominant layout as well<p>edit: figured out why that nostalgia happened. I was revisiting an old flash game I liked [0] and people were complaining to the dev about this exact key ghosting issue to him when it wasn&#x27;t his fault but a fault of their keyboards, and in the Newgrounds description he links to a forum post [1] elaborating on the issue<p>[0] <a href="https:&#x2F;&#x2F;www.newgrounds.com&#x2F;portal&#x2F;view&#x2F;547881" rel="nofollow">https:&#x2F;&#x2F;www.newgrounds.com&#x2F;portal&#x2F;view&#x2F;547881</a><p>[1] <a href="https:&#x2F;&#x2F;board.flashkit.com&#x2F;board&#x2F;showthread.php?789015-wont-respond-to-keyboard-up-left-and-space-at-the-same-time" rel="nofollow">https:&#x2F;&#x2F;board.flashkit.com&#x2F;board&#x2F;showthread.php?789015-wont-...</a>
  • Dwedit2 hours ago
    All that work and then somehow transposing the A and B keys at the very end.
  • pxx1 hour ago
    No controller support?
  • gosen2 hours ago
    thanks for bringing back my childhood memories!
  • einpoklum4 hours ago
    Most of the keys aren&#x27;t working for me in Firefox though :-(
    • tevlon3 hours ago
      i only testing in chrome. Will look into it!