Live data from Hacker News

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

javatari.org

11–20 of 25 posts

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

#11
post #9
post #2

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 ( http://www.alienbill.com/2600/101/docs/stella.html ) and the…

Thats an amazing observation mjn!!! I knew a little about the Nyquist frequency, but I didn't really hear much aliasing during development. Surely that is a good point to improve! Thanks.

To be fair it's not really a show-stopper in the context of Atari emulation, just a "nice to have". Most of the Atari's sounds are so noisy to begin with (e.g. the famous Combat tank rumble) that the aliasing is much less noticeable than if you're digitally emulating simpler waveforms, like the ones from analog synthesizers.

The most-used 2600 emulator, Stella, doesn't do bandlimited synthesis either, without many complaints. I believe z26 is the only Atari emulator that does, so listening to differences between how things sound in z26 and other emulators might be a way to figure out if it really matters. Though as far as implementation, z26 is 100% asm, so not very easy to use as a reference.

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

#13

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?

Yes... A real Atari does the same thing! That's what the processor and the other chips produce when the machine is started with no ROM to be executed. I tried to implement the emulation at the hardware component level as accurately as I could. It happened spontaneously!

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

#14
post #13

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?

Yes... A real Atari does the same thing! That's what the processor and the other chips produce when the machine is started with no ROM to be executed. I tried to implement the emulation at the hardware component level as accurately as I could. It happened spontaneously!

Where does the randomness come from though?

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

#16
post #13

Earlier quoted context omitted.

Yes... A real Atari does the same thing! That's what the processor and the other chips produce when the machine is started with no ROM to be executed. I tried to implement the emulation at the hardware component level as accurately as I could. It happened spontaneously!

Where does the randomness come from though?

When the processor tries to read the game program from the empty cartridge slot, it ends up reading random bytes from the data bus. Its like a random program commanding the video and audio hardware!

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

#18

I love stuff like that! I hope it isn't taken down by Atari's legal department. They're notoriously unfriendly towards hobbyists.

Thanks for the notice. I forked and downloaded it so I get to keep a copy.

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

#19

I love stuff like that! I hope it isn't taken down by Atari's legal department. They're notoriously unfriendly towards hobbyists.

They don't like clones of games, but I haven't heard of emulators having any trouble. Stella (http://stella.sourceforge.net/) has been around for years without problems. Hopefully it'll stay that way!

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

#20
post #2

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 ( http://www.alienbill.com/2600/101/docs/stella.html ) and the…

Probably the easiest way to solve the aliasing problem is to pre-calculate a series of square waves, each with successively fewer harmonics. You can then just select the right square wave for any given note and play it back via linear or polynomial interpolation. This is what I do in my iPad synth app.

The main downside of this approach is that it takes more memory, but it's very easy on the CPU.

Post reply on HN