Homebrew Emulation Introducing Nintellivision - an Emulator for the DS/DSi

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
I know some of you like a peek under the hood and so here is a technical tidbit.

I've come to find out that two games running at 60FPS doesn't mean that both are equally smooth. The reason is that it's 60 individually rendered frames - each with their one-frame worth of CPU, Sound and Video rendering. Some frames are "more expensive" than others - perhaps the programmer of the game only draws moving objects every other frame. Or perhaps some complex calculation happens only occasionally.

Ideally, each frame will take the CPU 1/60th of a second. The emulator will "catch" up as best it can if a few frames are slower. For example, if frame 5 (of 60) takes longer than 1/60th of a second but frame 6 is shorter... the emulator will just eat into some of that frame 6 timing to keep things on track for a full 60 frames per second. But that means that there will be bit of slowdown in the 5th (of 60) frames and a bit of speedup in the 6th (of 60) frames.

Does this matter? Not really... but it's the reason why some games that are barely running at 60FPS don't feel quite as smooth as a game that has lots of extra CPU power to spare. Which is why it's really good that on the older DS-LITE hardware, many games are now capable of running 10% overspeed... this smooths out the game when running at 60FPS - sound and visuals will be very smooth and clean. But if the game were running much closer to the 60FPS with no extra CPU... it might not appear as smooth.

D1K, for example, runs at 60FPS on both the DS-LITE and DSi. But the DS-LITE is just barely keeping up... so when you play you will notice it might slow down for a fraction of a second... or the sound might dip slightly when playing. On the DSi with the same game those don't happen because the CPU has lots of spare power to keep the game running perfectly with no single frame taking longer than it should.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Been dealing with power outage that just got restored... still no Internet so I'm on my phone for now.

I have added new Favorites handling. You can toggle a game as a favorite (and it shows a little yellow 'favorites' dot next to it) - and can have up to 64 favorites that can be filtered to show on the game selection screen.

I'm also adding handling for when a BIOS file is not found - it will search the games directory for the proper CRC of the bios files and load that... many people don't bother to read the instructions so this will hopefully make it easier for people that just dump a load of Intellivision games into a directory and want to play.

I also found another 2-3% speed which will make even the more stubborn games on the DS-LITE playable...

When my internet comes back up - I'll upload.

1635426002868.png
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Ok... I'm back up and running. Not ready for a new build - but 3.0a is checked in. This has the aforementioned favorites support, a bit more raw speed (mostly for the DS-LITE... the DSi is already fast enough) and it will search out the BIOS files if not found by name (this is slower...it takes 2-3 extra seconds to load a game if you don't have your bios files properly named as I have to read every file to check the size/CRC to see if it is a "match" to the official BIOS roms).

You can mark up to 64 games as favorites... pressing SELECT will toggle a favorite selection. Be sure to use START to save out your favorites - or they will be lost. Why 64? That's how much space I reserved in the global config for this... plus, if you have more than 64 games as favorites, just use directories to sort your stuff :)

With the power outage, I was able to get in a few solid hours of playing version 3.0... AD&D Treasure of Tarmin sure takes the sting out of no lights :)
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Not ready for a new build... but 3.0b is checked in.

This version sound-corrects when running faster than 60FPS.

I like to play Treasure of Tarmin at 120% speed - just a bit faster to move around the dungeon - same great game, just 20% faster. But the sound would drop because the sound engine was still outputting as if it was 60FPS. Not a huge deal but if you count arrows or count food you can hear it sometimes drops sounds when running over-clocked. This new version will increase the output sample rate to match the faster speed... except when running at MAX speed (there it just opens the throttles and is running without trying to hit a specific framerate).

I'm the only one that will care about this - but it makes playing Treasure of Tarmin on faster speeds more awesome :)
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Version 3.1 is released: https://github.com/wavemotion-dave/NINTV-DS

V3.1 : 30-Oct-2021 by wavemotion-dave
  • Favorites support - you can select up to 64 games as 'favs'
  • Sound sync when running faster than 60FPS
  • If BIOS files not found, emulator will search for them (slow but effective)
  • Tiny bit more speed and optimization
I found another small optimization that gives another frame of performance... possibly 2. D1K and D2K are now capable of running at 63FPS on the older DS-LITE hardware which is enough buffer to make them play smoothly. Many other games are well above 10% spare CPU - this makes things much nicer for the DS-LITE/PHAT users. Of course the DSi continues to run everything full speed - often to the point where I'm starting to approach 50% spare CPU!


Next up is some code cleanup and commenting - so that the next person that wants to use the codebase and add features can feel a little less lost.
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Ha! Well… I have been contemplating “what’s next?”

I’ve been at this 11 months. I remember coming here last November lamenting that there wasn’t a way to set the difficulty switch on the slow Atari 2600 emulator last updated in 2011. Thai was five emulators ago!

Let’s see….

I’ve got access to the MSX-DS but that would mostly be modernize and a few new features add.

I’d love to have a full-featured Colecovision emulator with SGM and other modern peripheral support… but we’ve already got 2 emulators that run the classic stuff well enough and that’s probably not worth the effort (despite being one of my childhood beloved systems).

I’ve a fondness for the TI-99/4A which has the incredible Tunnels of Doom that would be great on the DS and touchscreen.

I may also just retire and fade away … to be remembered in passing in a decade as that goofy guy who sometimes figured out stuff. “We last saw him playing Treasure of Tarmin at 20% over-clocked speed.”


Edit: someone informed me that I forgot to update the splash screen for "3.1"... I just put up 3.1a which corrects that and has one other change: you can now press SELECT on the main menu to bring up the game options. This is convenient so you can press SELECT twice to quickly get into Game Options (once to bring up the menu and the second press to get into Game Options)
 
Last edited by wavemotion,

Coto

-
Member
Joined
Jun 4, 2010
Messages
2,979
Trophies
2
XP
2,564
Country
Chile
Ha! Well… I have been contemplating “what’s next?”

I’ve been at this 11 months. I remember coming here last November lamenting that there wasn’t a way to set the difficulty switch on the slow Atari 2600 emulator last updated in 2011. Thai was five emulators ago!

Let’s see….

I’ve got access to the MSX-DS but that would mostly be modernize and a few new features add.

I’d love to have a full-featured Colecovision emulator with SGM and other modern peripheral support… but we’ve already got 2 emulators that run the classic stuff well enough and that’s probably not worth the effort (despite being one of my childhood beloved systems).

I’ve a fondness for the TI-99/4A which has the incredible Tunnels of Doom that would be great on the DS and touchscreen.

I may also just retire and fade away … to be remembered in passing in a decade as that goofy guy who sometimes figured out stuff. “We last saw him playing Treasure of Tarmin at 20% over-clocked speed.”


Edit: someone informed me that I forgot to update the splash screen for "3.1"... I just put up 3.1a which corrects that and has one other change: you can now press SELECT on the main menu to bring up the game options. This is convenient so you can press SELECT twice to quickly get into Game Options (once to bring up the menu and the second press to get into Game Options)

How about you delve into 3D game programming? I am going that route.

Also good work!
 

ts-x

Member
Newcomer
Joined
Oct 7, 2021
Messages
14
Trophies
0
XP
395
Country
United States
Version 3 is coming soon... sound seems fixed. I just checked in 2.9c with a global change to the way menus are handled - we now have font choices... mostly for @ts-x and anyone that finds the contrast of the green font a little lacking... you can now switch to a global white font across the board which makes things like menus and manuals a bit easier to read! This will also make global menu changes easier going forward - the streamlining and unification actually reduced the code size by about 10K.

I also added a new menu item for Global Config so you can jump right there without having to go through game-options first. With this change I also allow you to get into the main menu selection before you've loaded up a game so you can change global options if you want.
The white font is much appreciated, thank you! To celebrate, I've added six more manuals to my original post. "Batch 3" includes Bump 'N' Jump, Dig Dug, Lady Bug, Mouse Trap, Q*bert and (Duncan's) Thin Ice.
 
Last edited by ts-x,

matt!

Well-Known Member
Member
Joined
Nov 20, 2009
Messages
633
Trophies
1
Age
47
Website
www.gingerbeardman.com
XP
1,345
Country
United Kingdom
Super exciting to catch up on this! Fantastic work. Loved the technical deep dives.

My only request would be multiple screen presests that can be mapped to buttons.

1. stretch to fit (default)
2. unstretched, left aligned
3. unstretched, right aligned

That way I could map 2&3 to L&R when playing Chip Shot golf to keep the correct aspect ratio and view the left and right side of the screen.

Lastly, I'm not sure adjusting the screen width in pixel increments is too useful?
 

ts-x

Member
Newcomer
Joined
Oct 7, 2021
Messages
14
Trophies
0
XP
395
Country
United States
Super exciting to catch up on this! Fantastic work. Loved the technical deep dives.

My only request would be multiple screen presests that can be mapped to buttons.

1. stretch to fit (default)
2. unstretched, left aligned
3. unstretched, right aligned

That way I could map 2&3 to L&R when playing Chip Shot golf to keep the correct aspect ratio and view the left and right side of the screen.

Lastly, I'm not sure adjusting the screen width in pixel increments is too useful?
My vote is to retain the existing pixel increment and independent left/right shift options in addition to any new presets, as they can really help maximize the “squareness” of games like Loco-motion, Lady Bug, Mousetrap, Reversi, etc. The left/right shift often helps with tweaking the view for scores, number of remaining lives, etc. that are shown on just one side of the screen (generally to the right).
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Not ready for a new build, but 3.1b is checked in. This has a few small fixes (e.g. we now read the last line of a .cfg file even if it doesn't end with a newline). It also has some optimization of the speech core which will speed up Intellivoice games 2-3%... this is enough that Space Spartans (with Aggressive Frameskip) will hold 60FPS on the older/slower DS-LITE through all but the most intense action.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
908
Trophies
1
XP
7,258
Country
United States
Version 3.2 is released: https://github.com/wavemotion-dave/NINTV-DS

V3.2 : 04-Nov-2021 by wavemotion-dave
  • Fixed .cfg file reading (last line was skipped if there was no CR)
  • A few homebrew and missing games added to the internal database.
  • A slight speedup on Intellivoice games which really helps the older DS hardware.
  • Another half-dozen game manuals added to extras.zip (thanks ts-x!)

Not a huge update - mostly I really just wanted to release 3 DS emulators in a single day :)

Also, for once I'm happy to release a version that has only minor updates so I'm less likely to break anything!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Veho @ Veho:
    Mkay.
  • Veho @ Veho:
    I just ordered another package from China just to spite you.
  • SylverReZ @ SylverReZ:
    Communism lol
  • SylverReZ @ SylverReZ:
    OUR products
  • The Real Jdbye @ The Real Jdbye:
    @LeoTCK actually good quality products are dying out because they can't compete with dropshipped chinese crap
    +2
  • BakerMan @ BakerMan:
    @LeoTCK is your partner the sascrotch or smth?
  • Xdqwerty @ Xdqwerty:
    Good morning
  • Xdqwerty @ Xdqwerty:
    Out of nowhere I got several scars on my forearm and part of my arm and it really itches.
  • AdRoz78 @ AdRoz78:
    Hey, I bought a modchip today and it says "New 2040plus" in the top left corner. Is this a legit chip or was I scammed?
  • Veho @ Veho:
    @AdRoz78 start a thread and post a photo of the chip.
    +2
  • Xdqwerty @ Xdqwerty:
    Yawn
  • S @ salazarcosplay:
    and good morning everyone
    +1
  • K3Nv2 @ K3Nv2:
    @BakerMan, his partner is Luke
  • Sicklyboy @ Sicklyboy:
    Sup nerds
    +1
  • Flame @ Flame:
    oh hi, Sickly
  • K3Nv2 @ K3Nv2:
    Oh hi flame
  • S @ salazarcosplay:
    @K3Nv2 what was your ps4 situation
  • S @ salazarcosplay:
    did you always have a ps4 you never updated
  • S @ salazarcosplay:
    or were you able to get new ps4 tracking it \
    as soon as the hack was announced
  • S @ salazarcosplay:
    or did you have to find a used one with the lower firm ware that was not updated
  • K3Nv2 @ K3Nv2:
    I got this ps4 at launch and never updated since 9.0
  • K3Nv2 @ K3Nv2:
    You got a good chance of buying a used one and asking the seller how often they used or even ask for a Pic of fw and telling them not to update
    K3Nv2 @ K3Nv2: You got a good chance of buying a used one and asking the seller how often they used or even ask...