TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Javatari - multiplayer Atari 2600 emulator written in Java with no external libs

70 pointsby beothornabout 13 years ago

11 comments

mjnabout 13 years ago
That's some pretty clean emulator code! Sticks fairly closely to the hardware design, and it's clear what's going on for the most part. In addition to practical use as an emulator, it might make a good learning tool for someone who wants to understand how the Atari VCS's weird hardware works. Perhaps read along with the canonical Stella Programmer's Guide (<a href="http://www.alienbill.com/2600/101/docs/stella.html" rel="nofollow">http://www.alienbill.com/2600/101/docs/stella.html</a>) and the less technical but still informative book <i>Racing the Beam</i> (<a href="http://www.amazon.com/gp/product/026201257X/ref=as_li_ss_tl?ie=UTF8&#38;tag=kmjn-20&#38;linkCode=as2&#38;camp=1789&#38;creative=390957&#38;creativeASIN=026201257X" rel="nofollow">http://www.amazon.com/gp/product/026201257X/ref=as_li_ss_tl?...</a>).<p>A minor quibble is that the audio emulation, while accurate from the perspective of what the audio hardware does, produces a bunch of harsh-sounding aliasing when used to generate digital audio. That's a common problem with 8-bit emulators, though. The short explanation of why: in the hardware implementation, the Atari feeds square waves directly into speakers. Square waves are in a sense the "natural" electrical signal for digital circuits, and from simple bit-patterns you can get complex harmonics. But when, instead of feeding them as voltages directly to a speaker, you generate digital audio samples that look like square waves, the harmonics above the Nyquist frequency (1/2 the sample rate) fold over into the audible range as aliasing artifacts.<p>The fix is to generate band-limited square waves, which are approximations to square waves w/ no frequency content above the Nyquist frequency. There's an active research literature on how to best do that efficiently (it's important if you're trying to digitally replicate the sound of classic analog synths like the Moog), but it mostly boils down to replacing the discontinuity in the square wave (which is where the harmonics come from) with something more like a ripple, designed to only produce sub-Nyquist harmonics. One fairly simple approach, integrated into several emulators, is explained here (w/code): <a href="http://www.slack.net/~ant/bl-synth/" rel="nofollow">http://www.slack.net/~ant/bl-synth/</a>
评论 #3865116 未加载
评论 #3865876 未加载
gaiusabout 13 years ago
I highly recommend the book Racing the Beam by Nick Montfort if you are interested in the development of early Ataris.<p>Also see <a href="http://www.bogost.com/games/a_television_simulator.shtml" rel="nofollow">http://www.bogost.com/games/a_television_simulator.shtml</a>
TazeTSchnitzelabout 13 years ago
All sorts of weird sounds and glitching if you turn on without a ROM... is this a faithful emulation? Would the original Atari do that?
评论 #3865265 未加载
rollypollyabout 13 years ago
I love stuff like that! I hope it isn't taken down by Atari's legal department. They're notoriously unfriendly towards hobbyists.
评论 #3865792 未加载
评论 #3865644 未加载
评论 #3865091 未加载
sehuggabout 13 years ago
Nice job! I was wondering the other day if anyone ever ported Stella to Java, but this looks simpler and ripe for hacks!
klauswuestefeldabout 13 years ago
What about having to blow on the cartridge? :) Can that be emulated by blowing on the mic?
评论 #3864925 未加载
weirdkidabout 13 years ago
There is a Java port of Stella -- I converted it to an applet for a buddy of mine back in 1999. Get it here: <a href="http://weirdkid.com/jstella" rel="nofollow">http://weirdkid.com/jstella</a>
kalecserkurtzabout 13 years ago
Nice job!<p>Maybe someone could create a PlayN version so it will run on the browser and on Android.
bdunbarabout 13 years ago
You know ... Defender _now_ is not nearly as visually cool as it was _then_.
PauloMagalhaesabout 13 years ago
awesome ;)
评论 #3869963 未加载
ifnazarabout 13 years ago
very cool