DS994a

From GameBrew
Revision as of 15:46, 21 April 2023 by HydeWing (talk | contribs) (Created page with "{{Infobox DS Homebrews |title=DS994a |image=ds994a2.png |description=A Texas Instruments Emulator for the DS/DSi. |author=Dave Bernazzani (wavemotion-dave) |lastupdated=2023/03/29 |type=Computer |version=1.5 |license=Mixed |download=https://dlhb.gamebrew.org/dshomebrew/ds994a.7z |website=https://gbatemp.net/threads/ds994a-a-texas-instruments-emulator-for-the-ds-dsi.624156/ |source=https://github.com/wavemotion-dave/DS994a |donation= }} DS994a is a Texas Instruments TI99/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
DS994a
Ds994a2.png
General
AuthorDave Bernazzani (wavemotion-dave)
TypeComputer
Version1.5
LicenseMixed
Last Updated2023/03/29
Links
Download
Website
Source

DS994a is a Texas Instruments TI99/4a Emulator for the DS/DSi. Parsec, Alpiner, Tunnels of Doom and Hunt the Wumpus - all the classic TI games the way you remember them on your venerable handheld.

To run requires the TI BIOS ROMS in the /roms/bios directory. See BIOS files further down for the ones you need.

Features

  • Games and programs run at or near full speed across the spectrum of DS hardware (though the emulator targets the DSi / XL for optmium performance).
  • Cart loads up to 2048K (2MB) on the DSi and 512K on the DS using standard TI99 bankswitching (+40K of GROM beyond the 24K Console GROM).
  • 32K RAM Expansion built-in.
  • SAMS at full 1MB for the DSi (and above) and 512K for the older DS/DS-Lite units.
  • MBX and Mini-Mem carts supported with extra RAM. Use Options to select cart type.
  • Save and Load State.
  • High score saving for up to 10 scores per game.
  • Full mapping of any of the 12 DS keys to any combination of TI Joysticks/Keyboard.
  • Virtual TI99 keyboard with classic TI99/4a stylings just the way you remember it.
  • Disk Support for DSK1, DSK2 and DSK3 up to 360K each using a modification for the standard TI Disk Controller (you need 994adisk.bin - see BIOS files below).
  • Speech is not fully emulated (but games requiring the Speech Synth will run/play - just no voice).
  • A few games have speech samples built-in: Parsec, Alpiner, Moonmine, Star Trek and Bigfoot.

Installation

How to setup

You will need the two console BIOS files as described below. Place both .bin BIOS files into /roms/bios (you can just make the directory on your SD card).

You will also need the emulator itself. You can get this from the GitHub page - the only file you need here is DS994a.nds (the .nds is a Nintendo executable file). You can put this anywhere - most people put the .nds file into the root of the SD card.

If you want to play disk based games (Adventure, Tunnels of Doom, etc) you will need 994adisk.bin (often just named disk.bin but you need to rename it and put it into /roms/bios).

You will need games to play... right now the emulator supports C/D/G files plus "8" non-inverted files and "9" inverted files. Basically just try loading a file to see if it works, the ROMs should have a .bin extension.

Recommend you put your game ROMs into /roms/ti99 as the emulator will default to that directory. That's where the cool kids keep them.

Recommend you put any disk files needed in a directory easily accessible (near) where you store your rom files so it's a faster navigation.

BIOS files

Here are the BIOS file CRC32 hashes the author used for testing - seek these out if you want maximum compatibility. Place these into /roms/bios:

* db8f33e5	994aROM.bin (8K)
* af5c2449	994aGROM.bin (24K)
* 8f7df93f	994aDISK.bin (8K) - only required if you want .DSK support, often named disk.bin

User guide

Be sure to check out to the documentation, it contains instructions on running specific games.

File Types Supported

DS994a supports the following file types:

  • Files whose base filename ends in C/D/G files also known as 'mixed mode'. If there is a 'D' file, it must be exactly 8K. C is the main binary and G is the GROM binary. If a C/D/G file is detected, only the C (or G if it's GROM-only) will be shown in the file listing.
  • Files whose base filename ends in 3 or 9 are considered "inverted" files and the banks will be swapped appopriately.
  • All other files are considered '8' files which is non-inverted banking up to 2048K (2MB) for the DSi and up to 512K for the older DS hardware.
  • There is a limit of 512 ROM files per directory and 256 DSK images per directory. You can have as many directories as you wish.
  • Filenames are limited to 128 characters. Shorten your ROM filenames if you run into this.

Configuration

There are two levels of configuration:

  • Global Configuration sets defaults for all games - though most things can be overridden at the individual game level.
  • Game Configuration is specific to the game you've loaded.

Be sure to use the START button to save out your configuration options so they persist on future launches of the emulator.

Emulated Disk Drives

DS994a will support 3 Disk Drives all at up to 360KB as DSK1, DSK2 and DSK3. The first two drives are fully buffered and read/write. DSK3 is read-only. This uses the TI99 standard Disk Controller but with a modification to allow up to 360KB drives to be supported. Any writes to disk should be auto-persisted and writen back to the SD card.

Please be aware that a rare glitch can occur when writing to certain SD cards, particularly when using homebrew libraries for writing the SD on the Nintendo DS with emulation. To mitigate this issue, a precautionary measure has been implemented whereby the original .DSK file is renamed to .DSK.BAK before the write process begins, allowing it to be retained for future reference.

If the write fails and freezes up, the next time you boot the emulator and load that disk, it will check if the .DSK.BAK file is around and will revert to that as needed (it does mean that you will have lost your last save...). Also, in the DISK MENU you can 'BACKUP DISK' which you should do occasionally... this will make a /BAK directory and copy the desired .DSK file into that directory for safe-keeping. Using these precautionary methods, you should be able to work around any potential glitches when writing the disk files back to the SD card. Most users will not run into such issues.

Keyboards and Menus

Two virtual keyboards are supported, both emulate the look and feel of a real TI keyboard. One has a slightly 3D/raised-key look and the other is a more flat look. Experiment and find the one that best suits you - you can set a global default choice in the Global Configuration menu.

Pressing the TI logo in the upper right will bring up a mini-menu to let you save the game state, exit the game, load up a .DSK image, etc.

Key Mapping

You can map all 12 of the DS keys (ABXY, D-Pad, Start, Select, Left/Right Shoulder Buttons) to any TI key (Joystick 1, Joystick 2 or Keyboard Key). By default the shoulder buttons are used for FCTN and SHIFT which is convienent as there are many games that require the Function keys. You can also press the X key to toggle P1, P2 and Keyboard Game mapping while in the "Configure Keys" area.

There are also some special keys that are always available:

  • Hold Left Shoulder + Right Shoulder + X and you will swap the top/bottom screens.
  • Hold Left Shoulder + Right Shoulder + Y and you will take a .BMP snapshot of the top screen (written to SD card with date/time as the filename).

Memory/System Configurations

By default each game is configured to run on a 32K expanded system which runs 99% of all TI99/4a games. The SAMS support must be enabled on a per-game basis (you can also set to have the SAMS support enabled globally).

Be aware - the SAMS handling does require a more accurate emulation core and will slow down the emulation by almost 20%. That's generally fine for the DSi and above but my recommendation is to use the default 32K expanded system for virtually all games and only enable the SAMS support for the few things that need it.

Blend Mode (DSi)

DS99/4a supports a "blend mode" which borrowed from StellaDS. In this mode, two frames are blended together - this is really useful when playing games like TI Invaders or Scramble where the bullets on screen are small and the DSi LCD just doesn't hold onto the pixels long enough to be visible.

These games were designed to run on an old tube TV with phosphor which decays slowly so your eye will see slight traces as the image fades. This emulates that (crudely). On the DSi using this new mode renders those games really bright and visible.

The DSi XL/LL has a slower refresh on the LCD and it more closely approximates the old tube TVs... so blend mode is not needed for the XL/LL models.

However, using blend mode comes at at 15% CPU cost. The DSi can handle it... the DS-LITE/PHAT might struggle a bit on more complicated games.

The recommendation is as follows:

  • DSi non XL/LL - use Blend Mode for the games that benefit from it (e.g. TI Invaders).
  • DSi XL/LL - don't bother... the XL/LL screen decay is slower and games look great as-is.
  • DS-LITE/PHAT - you can try it but the framerate might drop below 60 on some games.

To enable this new blend mode, pick your game and go into the "Game Options" sub-menu and turn it on.

Screenshots

ds994a3.pngds994a4.png

ds994a5.pngds994a6.png

Compatibility

To run this on your DS or DSi (or 2DS/3DS) requires that you have the ability to launch homebrews.

For the older DS units, this is usually accomplished via a FlashCart such as the R4 or one of the many clones. These tend to run about US$25.

If you have a DSi or above, you can soft-mod your unit and run something like Twilight Menu++ or Unlaunch which will run homebrew software on the DS. The DSi has a convienent SD card slot on the side that saw very little use back in the day but is a great way to enjoy homebrews. See https://dsi.cfw.guide/ to get started on how to soft-mod your unit.

Known issues

https://github.com/wavemotion-dave/DS994a#known-issues-

Changelog

V1.5 2023/03/29

  • Fixed minor cosmetic glitches with menu handling and ROM file selection.
  • DSi now supports up to 2048K (2MB) banked ROMs (the older DS still supports 512K).
  • Other minor cleanups as time permitted.

V1.4 2023/03/01

  • Added new 3D TI virtual keyboard. Removed old grey grid-style keyboard.
  • New dark menu theme throughout to more closely mimic the black/silver stylings of an old-school TI99/4a.
  • Improved memory usage and refactored code to allow for better future expansion.
  • Fixed VDP writes so Funware's Ambulance now plays correctly.

V1.3 2023/02/24

  • More speech samples added. Parsec, Alpiner and Moonmine have all speech phrases included. Star Trek and Bigfoot have partial speech included.
  • Improved memory usage to gain back a bit more resources for future expansion.
  • Minor cleanups as time permitted.

V1.2 2023/02/20

  • Speech samples added for Parsec, Alpiner and Moonmine. It's not perfect but does bring back the feels of those games with speech.
  • Added additional TI keys that can be mapped to the DS.
  • Minor cleanups as time permitted.

V1.1 2023/02/14

  • New compile with GCC 9.4.0 and latest DEVKITPRO and libnds 1.8.0.
  • Improved DSK writes for greater consistency and safety.
  • Reverted to -O2 compilation optimizations for greater stability.
  • Improved TI keyboard graphic - more legible and cleaner look.
  • Minor cleanups as time permitted.

V1.0 2023/02/11

  • Improved TI99 keyboard which is the new default.
  • Improved DSK saves for more robust writes.
  • Screen Snapshot added (press and hold L+R+Y).
  • Ability to swap upper / lower screens (press and hold L+R+X).
  • Cleanup across the board for the official 1.0 release.

V0.9 2023/02/02

  • Added DSK3 support. All three drives support up to 360K disks.
  • Improved emulation on SAMS memory such that Realms of Antiquity will run.
  • Persist SAMS memory on Save State/Load using RLE compression.
  • Other cleanups as time permitted.

V0.8 2023/01/29

  • Added DSK2 support and both drives now handle up to 360K disks.
  • Improved default key mapping so X='1' and Y='2' allowing faster game startup.
  • Inverted .bin files now supported with the filenames ending in '3' or '9'.
  • Added ability to paste in DSKx.FILENAME from the Disk menu.
  • Other cleanups as time permitted.

V0.7 2023/01/24

  • New TI99 Keyboard Layout - select in Global Options or on a Per-Game basis.
  • Better DSK vs ROM handling - remembers last directory for each.
  • SAMS 1MB enabled for DSi and above.
  • Fixed save/load state for Mini-Men, SuperCart and MBX Carts (only SAMS save/load is non-functional right now).
  • Other cleanups as time permitted.

V0.6 2023/01/21

  • Re-write of the CPU core. It's 20% smaller and 20% faster.
  • Added ability to list disk contents so you can see what programs are on it.
  • Added write-backing of .DSK files. When they change the file is written out in the background.
  • Added SAMS 512K expanded memory support - must be enabled in OPTIONS on a per-game basis.
  • Added new cartridge types to support SuperCart 8K, MiniMemory 4K and Milton Bradley MBX carts (with and without special 1K RAM).
  • New splash screen... new logo icon... a fresh start!

V0.5 2023/01/12

  • Streamlined save and load of save state so it's only 2 blocks of SD card (64K). Old saves will not work with version 0.5 - so finish your games before you upgrade.
  • Fixed banking so that Skyway8.bin (and probably others) will load properly.
  • Improved CPU and memory reset so games are less glitchy when starting up after having just played another game.
  • Another frame of performance squeezed out of the CPU core.

V0.4 2023/01/09

  • Added .DSK support for 90K and 180K disks (read and write both work but write doesn't yet persist back to SD card). Use the Cassette icon in the *lower left of the keyboard to mount disks.
  • Added High Score support for 10 scores per game. Use the new 'HI' button on the main keyboard.
  • Fixed loading of 8K "banked" games (Tuthankam, Mancala, etc).
  • Fixed right-side border rendering for "TEXT MODE" games (Adventure, Zork, etc).
  • Added new option to mirror console RAM. This is more accurate but slows down the emualation. Congo Bongo needs this to render level 2+ properly.
  • Games that were hanging looking for Speech Synthesis module no longer freeze up (no voice yet but you can play them).
  • Keyboard is now more robust - presses are always properly 'clicked' and it's less glitchy. Key repeat now works.
  • Other minor cleanups as time permitted.

V0.3 2023/01/07

  • Improved speed 8% across the board.
  • Fixed spirte cut-off at top of screen.
  • Fixed X in control mapping so that it toggles P1 vs P2.
  • Added PAL (along with default NTSC) support.
  • New splash screen and logo.
  • Other minor cleanups as time permitted.

V0.2 2023/01/06

  • Increased bankswitch support to 512k
  • Fixed IDLE instruction so games like Slymoids works
  • Improved speed by 10-15% across the board...
  • Other minor cleanups as time permitted

V0.1 2023/01/05

  • It works! Almost...

Credits

  • Thanks to Alekmaul who provided the original Coleco emulator framework of which this is based.
  • Thanks to Flubba for the SN76496 sound core (virtually the same as the TI9919 sound chip).
  • Thanks to Marat Fayzullin (ColEM) for the TI9918A video driver.
  • Thanks to Mike Brent for Classic99 and letting me use some of the disk and CPU core code plus some helpful consults.
  • Thanks to Pete Eberlein and some great ideas and a bit of code from his upcoming BuLWiP emulator.
  • Thanks to ti99iuc over on AtariAge for the DS99/4a Logo.
  • Thanks to Darryl Hirschler for the TI99 Keyboard Graphic.
  • Thanks to the 99ers over on the AtariAge site for their help in grokking memory layouts and banking schemes as well as testing and providing feedback.

External links

Advertising: