Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

DS994a: Difference between revisions

From GameBrew
m (Text replacement - "↵Category:Computer Emulators on DS" to "")
m (Text replacement - "|download=https://dlhb.gamebrew.org/dshomebrew2/↵" to "|download=https://dlhb.gamebrew.org/dshomebrew2/")
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
|version=2.1
|version=2.1
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/dshomebrew/ds994a.7z
|download=https://dlhb.gamebrew.org/dshomebrew2/ds994a.7z
|website=https://gbatemp.net/threads/ds994a-a-texas-instruments-emulator-for-the-ds-dsi.624156/
|website=https://gbatemp.net/threads/ds994a-a-texas-instruments-emulator-for-the-ds-dsi.624156/
|source=https://github.com/wavemotion-dave/DS994a
|source=https://github.com/wavemotion-dave/DS994a

Latest revision as of 04:46, 16 August 2024

DS99/4a
Ds994a2.png
General
AuthorDave Bernazzani (wavemotion-dave)
TypeComputer
Version2.1
LicenseMixed
Last Updated2024/03/09
Links
Download
Website
Source

DS99/4a 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 8192K (8MB) on the DSi and 512K on the DS using standard TI99 bankswitching (+40K of GROM beyond the 24K Console GROM).
  • Mixed mode C/D/G/8/9 files supported as well as the MESS/MAME .RPK (Rom PacKs).
  • 32K RAM Expansion built-into the base console emulation.
  • SAMS at full 1MB for the DSi (and above) and 512K for the older DS/DS-Lite units.
  • MBX, Mini-Mem and Super 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 TI-99/4A keyboard with classic 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 (requires 994adisk.bin).
  • Speech is not fully emulated (but games requiring the Speech Synth will run/play)
  • 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 create the directory on your SD card).

You also need the emulator itself, which can be obtained from the GitHub page. The only required file is DS994a.nds (the .nds file is a Nintendo executable file). You can place this file anywhere, most people put it in the root of the SD card.

For disk-based games (Adventure, Tunnels of Doom, etc.), you'll need 994adisk.bin (often named disk.bin, but you should rename it and place it into /roms/bios).

You'll need game ROMs to play. Currently, the emulator supports C/D/G files, as well as '8' non-inverted files and '9' inverted files. Simply 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.

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

Make sure sure to check out to the readme, which contains instructions on running specific games.

File Types Supported

File name ends in C, D, or G, is known as 'mixed mode.' The 'D' file has to be exactly 8K. C is the main binary, and G is the GROM binary. If a C/D/G file is found, only the C (or G if it's GROM-only) will show in the file list.

If the file name ends in 9, it's known as an "inverted" file, and the banks will be swapped accordingly.

If the file name ends in 0, it's a system GROM and can replace the standard console GROMs (like Son of Board).

All other files are considered '8' files, allowing non-inverted banking up to 8192K (8MB) for the DSi and up to 512K for the older DS hardware.

There's a limit of 512 ROM files and 256 DSK images per directory. You can have as many directories as you want.

Filenames can only be up to 128 characters long. If your ROM filenames are too long, shorten them.

Starting from version 2.0, the MAME/MESS .rpk (ROM PacK) format is also supported. These are single-file archives containing ROMs and a layout.xml file that explains where the ROMs are loaded and how banking might work.

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, labeled as DSK1, DSK2, and DSK3. The first two drives are fully buffered and read/write, while DSK3 is read-only. The emulator utilizes the TI99 standard Disk Controller with a modification to allow support for up to 360KB drives.

Any writes to the disk should be auto-persisted and written back to the SD card. However, there may be rare glitches when writing to some SD cards, as emulation coupled with homebrew libraries for writing to the SD on the DS is not perfect.

To address potential issues, the emulator includes some safeguards. Before the write takes place, the original .DSK file is renamed to .DSK.BAK. 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 present and revert to that as needed. Keep in mind that you will have lost your last save in this scenario.

Additionally, in the DISK MENU, you can choose 'BACKUP DISK,' which creates a /BAK directory and copies the selected .DSK file into that directory for safe-keeping. By using these precautionary methods, you can work around potential glitches when writing the disk files back to the SD card. Most people will not encounter such issues.

Keyboards and Menus

DS994a supports two virtual keyboards, both designed to emulate the look and feel of a real TI keyboard. One has a slightly 3D/raised-key appearance, while the other has a flatter look. You can experiment with both and choose the one that best suits their preferences. It's possible to set a global default choice for the virtual keyboard in the Global Configuration menu.

Additionally, pressing the TI logo in the upper right corner will bring up a mini-menu, allowing you to perform actions such as saving the game state, exiting the game, loading 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

In DS994a, each game is configured by default to run on a 32K expanded system, which is suitable for 99% of all TI99/4a games. SAMS support must be enabled on a per-game basis, and you also have the option to set global SAMS support. Note that SAMS handling requires a more accurate emulation core and will result in a nearly 20% slowdown in emulation speed. While this is generally acceptable for DSi and above, the recommendation is to use the default 32K expanded system for most games and only enable SAMS support for those that specifically require it.

Adding to the complexity, there are settings for Mini-Memory (4K of RAM mapped at 7000h) and SuperCart (8K of RAM mapped at 6000h to 7FFFh). Some games, particularly complex Infocom games, may need this additional 8K of memory. These games are often identified with a "_SC" at the end of the filename. To use these games, you can load them with the Editor-Assembler (EA) module, change the Cart Type to 'Super Cart', and load the program requiring SuperCart memory via the EA option '5' by specifying DSK1.FILENAME.

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.png ds994a4.png

ds994a5.png ds994a6.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

  • TI Speech Module is not fully supported yet. Games that rely on the module will still play - just no voice except samples on Parsec, Alpiner, Moonmine, Star Trek and Bigfoot.
  • MBX-only games (Championship Baseball, I'm Hiding and Terry's Turtle Adventures) will not run as the full MBX is not emulated (other MBX-optional titles with 1K of RAM work fine).
  • Dragon's Lair 8MB demo will load and run but the sound sampling is not fast enough on the handheld to render the direct sound output.

Changelog

V2.1 2024/03/09

  • Now using a small light on the CAPS/ALPHALOCK key to indicate if CAPS LOCK is on (cleaner look).
  • GROM auto-increment of address will properly preserve the upper bits so we don't inadvertantly select the next GROM in our system (accuracy).
  • Added partial speech samples for MB Superfly.
  • Minor cleanups of SAMS handling and improved commenting in that driver.
  • Improved TMS9900 debugger for development use.

V2.0 2024/03/01

  • Support for .rpk (Rom PacKs - same as used by MAME/MESS).
  • Fix for save/load state of games that use RAM (MBX carts, MiniMem, etc)
  • Improved SAMS handling so that the proper amount of RAM is detected
  • On DSi and above, DSK3 is now fully buffered and writable.
  • Lots of small tweaks and cleanups across the board as time permitted.
  • Refactored and reduced resources so we free up an additional 256K of valuable memory for the future!

V1.9 2024/02/24

  • Improvements to the TMS9900 CPU core to improve accuracy and slight optmization for another frame of performance.
  • Added new global configuration default for frame skip (DSi, by default will disable frame skip and the DS-Lite/Phat will enable light frameskip).
  • Improved Disk menu handling to show free space and used space plus some instructions on how the paste buffer works.
  • Lots of cleanup and code comments added across the board.

V1.8 2024/02/19

  • Improvements to the TMS9918a emulation to fix 5th sprite handling and improve collision detection. Megademo, Eric in Monsterland and Interceptor all work correctly now.
  • Fix for Robots of Death II so it starts properly (was hanging on Speech detection).
  • DSi now supports up to 8192K (8MB) banked ROMs (the older DS still supports 512K). The Dragon's Lair demo will run but won't process speech/sound as the emulation can't sample the SN sound chip fast enough for that game.
  • Optimized VDP rendering and CPU memory read/writes to be a bit faster to help with older DS hardware. This gives a 5-50% speedup in video rendering depending on the game. The megademo will sustain 60fps throughout on a DSi.
  • Properly offset the text modes by 8 pixels so that games like Adventure will center text properly.
  • Improved memory density so that we end up with more cache-hits than misses when dealing with CPU memory - this gives a nice speedup of several percent across the board.
  • Lots of code comments and refactoring improvements as time permitted.

V1.7 2024/02/16

  • Integrated the updated SN sound core for more robust sound.
  • Fixed audio squeals and other odd noises in a few games (e.g. Borzork, Mission Destruct, etc).
  • Fixed RAM mirrors so more games play correctly - DSi defaults to RAM Mirrors ENABLED.
  • Fixed SAMS 16-bit memory read access so programs like SAMSTEST4 detect the memory.
  • New classic floppy disk read/write sounds (can be disabled in Global Settings).
  • Added new diagonal DPAD configuration to aid a few of the Q-Bert like games.
  • Added new options for 90% (slower than normal) and up to 150% (faster than normal) emulation.
  • Added the ability to auto-mount disks based on the filename. See File Types Supported in the readme for details.
  • Lots of minor cleanups and tweaks at time permitted.

V1.6 2023/08/17

  • New icon for Twilight Menu - woot!
  • Fixed missing arrows on TI-99 Classic Keyboard graphic.
  • Other minor cleanups and tweaks at time permitted.

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: