Homebrew XEGS-DS - Yeah, it's a thing...

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
Version 2.4 is released: https://github.com/wavemotion-dave/XEGS-DS

V2.4 : 02-Apr-2021 by wavemotion-dave
* New bank switching handling that is much faster (in some cases 10x faster)
to support all of the larger 128K, 320K and even the 1088K games (AtariBlast!)
* ATX format now supported for copy protected disk images.


With this build, I think the DSi will run every Atari 8-bit game on the planet at full speed. I tried running AtariBlast (the only known game to utilize 1088K) on the Atari800-nds emulator and it runs below 20% frame rate (about 10FPS). On the latest XEGS-DS it runs at 150% frame rate unthrottled and zero frameskip (about 90FPS). Winning!

The bank switching was a major bottleneck on the 128K, 320K games. It's the reason I hadn't even bothered to put in support for the silly-large 1088K RAM expansion - until now! Please seek out Atari Blast! in XEX format and play it to see what awesomeness the Atari 8-bit is capable of.
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
I finally finished going through about 6000 games on the Atari 8-bit. I ended up tagging the ones that I think I'd like to play again including some absolute classics that will always be on my play-rotation. I total I ended up tagging about 700 games - more than 10% of the library as games I enjoyed playing and will play more.

I'm going to polish a few things on the UI interface and start cleaning up the code for future generations should anyone else want to jump in and make changes. I just added a copyright statement that pretty much gives permission for anyone to use this emulator (and it's source) for any purpose they see fit providing they credit/thank Alekmaul, Avery Lee (Altirra OS sources) and, well, me :)
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
Version 2.5 is released: https://github.com/wavemotion-dave/XEGS-DS

V2.5 : 08-Apr-2021 by wavemotion-dave
* Major cleanup of unused code to get down to a small but efficient code base.
* Added LCD swap using L+R+A (hold for half second to toggle screens)
* Cleanup of text-on-screen handling and other minor bug fixes.

I'm done cleaning up all the dead/unused code and removed all the unnecessary files. The executable and code base is down to a manageable size and is relatively clean and semi-commented for the next generation!
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
Version 2.6 is released: https://github.com/wavemotion-dave/XEGS-DS

Minor changes only - but stuff I've been sitting on a while and wanted to get it checked in.

V2.6 : 11-Jul-2021 by wavemotion-dave
  • Reduced down to one screen buffer - this cleans up ghosting visible sometimes on dark backgrounds.
  • If atarixl.rom exists, it is used by default (previously had still been defaulting to Altirra rom)
  • Added new screen blending types - NORMAL and BLUR1-BLUR7 to help with screen scaling.
  • Minor cleanups as time permitted.
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
You guys are quite welcome - thanks for the kind words.

Embarrassingly, I forgot to check in the new screen blending options for 2.6. I just did that now and re-released 2.6 so if you grabbed it already, please grab it again. Sorry :/

The new blending options were added to help with the problem of the Atari rendering 320 pixels but the DS screen only having 256. Something has to give... and missing pixel columns tend to make small details look crappy. So the code has a "jitter" effect where we slightly shift the pixels from one frame to another. Shift them too little and you see no difference. Shift them a bit more and your eye will start to fill in more detail as it blurs. Shift them too much and it starts to look "shakey" on screen. So I've given 8 different levels... the default is to not shift at all - stable screen but probably not the best look on some games. In settings you can change the effect and the screen will instantly update - so you can fine-tune those score displays so they look as good as possible. In the end, you can't get water from a stone and there's no perfect solution to mapping 320 pixels down to 256.
 
Last edited by wavemotion,

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
Version 2.7 is released: https://github.com/wavemotion-dave/XEGS-DS

V2.7 : 04-Nov-2021 by wavemotion-dave
  • New sound output processing to eliminate Zingers!
  • bios files can now optionally be in /roms/bios or /data/bios
  • Left/Right now selects the next/previous option (rather than A button to only cycle forward).
  • Other cleanups as time permitted.

The big change here is the zinger-free sound core borrowed from Nintellivision. I've also taken this opportunity to allow the bios files to be in /roms/bios or /data/bios (you can also keep them in the emulator folder). This should now allow you to keep all of your bios files in one directory for all of the emulators I've worked on. I'll sleep better at night.

There is still a slight pop going into and out of menus on XEGS (and A5200DS). I can't quite figure out what's happening to cause it... the LIBNDS library sound stuff is not always cooperative. But it's minor and doesn't affect in-game sounds.
 

ber71

Well-Known Member
Member
Joined
Apr 24, 2019
Messages
332
Trophies
0
Age
57
XP
1,580
Country
Spain
Fantastic work, greatly appreciated .

A suggestion. As more locations are avaible for the BIOS, you might consider searching inside
sd://retroarch/cores/system
which would be useful for 3DS users which run these emulators via TWLM++ and have installed retroarch. The 'system' directory is intended to store all needed BIOS. There are plenty of 'system' bundles for retroarch on the internet, including the Atari BIOSes among others.
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
Version 2.8 is released: https://github.com/wavemotion-dave/XEGS-DS

V2.8 : 30-Nov-2021 by wavemotion-dave
* Switched to maxmod audio library for improved sound.
* Try to start in /roms or /roms/a800 if possible

Big change is the switch to the maxmod audio streaming system. This was no joke - took 8 hours to modify the XEGS codebase to swap over - part of that was a learning curve because (unlike ColecoDS) I'm also mixing in some sound effects for button and keyboard presses and I had to learn how soundbanks worked. This also comes with some drawbacks - because the maxmod library offloads much of the streaming of audio samples, you have a little less control over when those samples get loaded (I'm using manual mode to trigger the sound buffering but it's not quite the same). For most games this is fine - in fact, it's preferred over trying to update the sound channel in "real time" as the scanlines are being generated. But a few games use what is known as "volume only" mode to play 4-bit digitized speech samples... things like the robot voices in Berzerk or the computer voice in Bosconian. These will not sound as good as previous versions of XEGS because of the switch to the new buffered audio stream (but the voices can still be made out). But the actual gameplay and normal game sounds are hugely improved with the new streaming setup. The 4-channel Pokey chip is really amazing - and it's been seriously hampered in the past with the original "scratchy" sound system I was using. No more!

Just about everything you throw at it on the DSi will play at full speed. The DS-LITE/PHAT will play most games full speed except the really large bankswitched ones.

PS: I have noticed that when you go into and out of loading a game (or pausing the sound for options) there is a slight audio pop... I've noticed this on @FluBBa's emus as well so at least I'm in good company. I've reduced it as much as possible for the time being until I can get a better handle on it.

This took a bit out of me... but I'll do my best to get the same audio handling into A5200DS soon.


1638281830693.png
 

Attachments

  • 1638281863607.png
    1638281863607.png
    12.9 KB · Views: 14

michalt

Member
Newcomer
Joined
Jun 28, 2020
Messages
12
Trophies
0
Age
53
XP
35
Country
Netherlands
Hi All, I have just tried last 2 versions (2.8 and 2.9) on my NintendoDS with CycloDS card, but im getting just black screens and nothing more. Have you ever seen it? Thanks
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
Hi @michalt - I've not seen that before. I've tried it on a few different R4i cards on the DS with no problems (and, of course, via SD card / TWL++ on the DSi). Even without a real XL BIOS file, it should come up and use the Altirra open-source BIOS. My guess is that it can't initialize the FAT file system on that card... but I've no idea why.

Do any of my other emulators behave the same?
 

michalt

Member
Newcomer
Joined
Jun 28, 2020
Messages
12
Trophies
0
Age
53
XP
35
Country
Netherlands
Hi @michalt - I've not seen that before. I've tried it on a few different R4i cards on the DS with no problems (and, of course, via SD card / TWL++ on the DSi). Even without a real XL BIOS file, it should come up and use the Altirra open-source BIOS. My guess is that it can't initialize the FAT file system on that card... but I've no idea why.

Do any of my other emulators behave the same?

Thank you for your fast reply!

Not really, I use ZXDS (including the latest version), NeoDs and PokeyDSV (old atari emulator) and all work normally.
 

michalt

Member
Newcomer
Joined
Jun 28, 2020
Messages
12
Trophies
0
Age
53
XP
35
Country
Netherlands
Is there any logging in your application maybe so we can debug it? it would be amazing to make it working ;-)
 

wavemotion

Benign Geek
OP
Member
Joined
Nov 23, 2020
Messages
718
Trophies
1
XP
5,089
Country
United States
When the library init fails, there is a call to iprintf() which would print a message to the console - in theory, that would show on the bottom screen.

if (!fatInitDefault()) {
iprintf("Unable to initialize libfat!\n");
return -1;
}

If you're not even seeing that... I'm not sure what to suggest.
 

michalt

Member
Newcomer
Joined
Jun 28, 2020
Messages
12
Trophies
0
Age
53
XP
35
Country
Netherlands
I don’t see anything. Would it be possible to add few debug messages to pin point the problem? It’s very strange indeed …
 

michalt

Member
Newcomer
Joined
Jun 28, 2020
Messages
12
Trophies
0
Age
53
XP
35
Country
Netherlands
I will try to install it as well. In the meantime, I have observed (which I did not realise earlier) once I run XEGS the console switches itself off (no power light), which is super strange.
 

michalt

Member
Newcomer
Joined
Jun 28, 2020
Messages
12
Trophies
0
Age
53
XP
35
Country
Netherlands
btw. I checked 5200/7800/stella and all switch off the console - I have never seen anything similar ...very interesting ... :)
 
General chit-chat
Help Users
    DEMONGreninjaPG @ DEMONGreninjaPG: earlier there was someone in one of my games spam really inappropriate stuff and idk why