New builds always here: https://github.com/wavemotion-dave/StellaDS
I've enjoyed reliving my youth playing Atari 2600 games on StellaDS via TWL. Huge thanks to the community for making that possible!
However, a few glitches and bugs distracted from the overall experience when playing Atari 2600 games.
I've never been into programming an emulator but decided my coding skills were probably up to snuff for modifying/improving an existing emulator. Fortunately, Stella-DS code base is rather clean and easy to understand - at least most of it!
So this weekend I got my development environment setup (on Ubuntu) and got to work. I've made the following improvements:
Edit: Lots of progress... wanted to update the top thread to show more fun stuff!
I've enjoyed reliving my youth playing Atari 2600 games on StellaDS via TWL. Huge thanks to the community for making that possible!
However, a few glitches and bugs distracted from the overall experience when playing Atari 2600 games.
I've never been into programming an emulator but decided my coding skills were probably up to snuff for modifying/improving an existing emulator. Fortunately, Stella-DS code base is rather clean and easy to understand - at least most of it!
So this weekend I got my development environment setup (on Ubuntu) and got to work. I've made the following improvements:
- Removed Color TV switch and replaced it with a difficulty switch (stetting A/B renders the difficulty for both Left and Right player switches - I'll probably improve this later). I realize a few odd games do use the Color switch in gameplay... but far more use the difficulty switch and StellaDS was defaulting both switches to the A=Expert position. Until I can add all switches, this is a reasonable trade-off.
- Used a bit more of the DSi screen resolution so that the occasional missing graphic doesn't get compressed away (e.g. if you fire the laser in Chopper Command you can see it sometimes disappears at certain vertical positions of the Chopper... this is no longer an issue). Generally this results in a few missing rows of pixels at the very bottom of the screen which is a better trade-off for 95% of games where almost no action takes place at the extremes.
- Fixed all the on-screen touch button handling such that it's not so glitchy... press SELECT switch or START switch and it actually works every time (it's amazing what a little debounce code will do!). I increased the hot-spots where you can press for each switch so that you can cleanly operate it with a finger or thumb... I hated getting out the Stylus for the small hit-boxes that were originally used.
- Improved the emulator core to handle the most common half-dozen instructions first and in special order plus re-ordered a bit of the math-y code to make computations slightly faster ... this gives about 10% speed up and most games now run at 60FPS or reasonably close to it (on a DSi running 137MHz... no idea on an original DS where I assume this emulator would still be on the struggle-bus).
- Start and Select buttons now map to RESET (often used to start a game) and SELECT switches. That only seems logical. I remapped the FPS display to the right shoulder switch. I also only output the FPS once per second instead of the wasteful 60x per second which means you can run with the FPS enabled with very little (but not zero!) impact on emulation.
- The left shoulder switch runs the game at max speed... but since this emulator is running pretty much full-bore already, it doesn't have a huge impact (for example, you can see the ships in space invaders moving at about 10-15% faster than normal ... hardly worth getting excited about - this was mostly for me to see improvements in core optimization).
- The Power Off button no longer makes that hideous screeching noise. And if you decide not to quit, it renders the screen back properly.
Edit: Lots of progress... wanted to update the top thread to show more fun stuff!
Last edited by wavemotion,