ZXDS

From GameBrew

Revision as of 12:11, 22 October 2021 by HydeWing (talk | contribs)
ZXDS
Zxds.png
General
AuthorPatrik Rak
Last Updated2017/04/23
TypeComputer Emulator
Version1.3.4
LicenseMixed
Links
Download
Website


ZXDS is an emulator of Sinclair ZX Spectrum for Nintendo DS and 3DS, written by Patrik Rak. It accurately emulates Spectrum 48k, 128k, +2/+2A/+3, and Pentagon, and supports SNA/Z80/SZX snapshots, TAP/TZX/PZX tape files, TRD/SCL/DSK disk files and RZX replay files. It has some other noteworthy features, like the ability to download all these files online over WiFi, peer-to-peer WiFi multiplayer, or Kempston mouse emulation.

Features

  • Solid Z80 core.
  • Full 128k paging support.
  • Reasonable Pentagon emulation.
  • Precise screen emulation.
  • Primitive border emulation.
  • Good 48k/128k snapshot support.
  • Full TAP support.
  • Reasonable TZX support.
  • Full PZX support .
  • Virtual tape deck.
  • Good TRD/SCL support.
  • Builtin disk browser.
  • Good RZX support.
  • POK files support.
  • ZIP archives support.
  • Online WiFi access.
  • Peer-to-peer WiFi multiplayer.
  • Save state support.
  • Screenshot support.
  • Configurable input support.
  • Fully customizable keyboard.
  • Kempston mouse emulation.
  • Memory viewer and disassembler.
  • Text and binary file viewer.
  • Statistics tracking.
  • Favorite/recent files tracking.
  • Battery friendly.
  • Skinning support.
  • Builtin help system.

Installation

Unpack the downloaded archive and copy only the entire ZXDS directory (not just its content, but the directory itself) to the root of whatever device you use to run homebrew on your DS.

Make sure that even the empty subdirectories are copied properly (in particular, make sure the /ZXDS/Saves directory is created, otherwise the save slots won't be saved permanently to your card).

If you wish so, you may then relocate the ZXDS.nds (supports DLDI) to elsewhere on the card, like to the root itself, to make it more accessible.

Note from developer:

The provided binary ZXDS.nds is primarily intended for Slot-1 (DS slot) based cards. Most of these cards now support automatic DLDI patching, so you likely won't have to bother with that at all. Just give it a try and you will see. If it won't work for you right away (meaning you won't be able to see any files to load in the load requester) you might need to patch it with a specific [[DLDI driver for your card with a DLDI patcher, both of which you can find here. The ZXDS.ds.gba version which is better suited for Slot-2 (GBA slot) based cards, and will likely need to DLDI patch it first in this case.

User guide

Simply run ZXDS the same way you run any other application.

Upon startup, follow the builting online help which shall provide you with all the instructions you will need (remember to turn the help off once you get familiar with individual icons and menus, it would only slow you down otherwise). You will basically need to load some file via Load File screen of I/O menu (pressing Start gets you there quickly by default), then perhaps adjust controls via the Controls screen, and you are all set.

A few Spectrum games and demos are included in the archive itself to try out. See also the list of recommended games by the author.

Software for ZXDS

Below is a list of recommended sites if you are interested to find more games and other software for use with the emulator:

Key mappings

The control mapping can really make a difference, so make sure customize it the way you like it most for any serious gaming.

For example, in case you have problems pressing the diagonals, it helps to map the up direction to the B button as well. This way you can jump sideways with ease. And mapping the quick save and quick load actions to the shoulder buttons gives you an instant save and load at the touch of the button, priceless feature for the hardest parts of the game you are playing.

Screenshots

zxds2.png zxds3.png

zxds4.png zxds5.png

zxds6.png zxds7.png

Changelog

1.3.4 2017/04/23

  • HALT is now correctly contended by PC+1, not PC.
  • To give the user a clue, incompatible multiplayer peer is now detected and reported, if possible.
  • Happy birthday, Speccy.

1.3.3 2014/12/24

  • Upon startup, let Start show the most recent files only if there are any.
  • Properly handle save slot medium if all ten medium slots are still being used.
  • When statistics become full, don't discard entries which might still be part of the recent list.
  • When global statistics are loaded, pick the latest version under all circumstances.

1.3.2 2014/11/22

  • Fixed libfat bug which could make corrupt directory entry after the last entry was deleted. You might have experienced this mostly when renaming files or moving them around.
  • Fixed couple more libfat bugs (really long names, alias creation, whitespace trimming).
  • Added caseinfo extension to libfat so letter case of 8.3 names is now read properly.
  • Medium associated with persistent copy of save slot 0 is never deleted prematurely anymore.
  • Save slot medium removal is now postponed to further improve chance of media reuse.
  • Few other subtle changes (cache filenames, file name trimming, minor help tweaks).

1.3.1 2014/07/10

  • Fix the initial main screen palette which could get messed up on some cards.
  • Make the mouse help window look like all the other help windows.

1.3.0 2014/07/01

  • ULA+ emulation for all Sinclair and Amstrad models.
  • Support for all types of 3.5" double sided +3DOS disks.
  • Raw screenshots now support the ULA+ extension for both saving and loading.
  • Current ULA+ palette can be changed simply by loading the appropriate ULA+ palette tape files.
  • Other ULA+ related changes (BMP screenshots, thumbnails, SZX support).
  • The selected ULA mode as well as the display mode are now part of the config file.
  • You can now keep your desired custom configuration persistent separately in custom.cfg.
  • Sector viewer now displays bottom side track addressing info in inverse colors.
  • Reverted special treatment of full size TR-DOS disks, so padded images work again.
  • Minor +3DOS fixes (gap3 reading, EDSK track padding, SZX disk side selection, motor bit disabling)
  • Loading a POK file now automatically shows the poke screen. Pressing Y switches back, as usual.
  • Reading attributes from unmapped ports on Pentagon now mimics the real hardware mod behavior.
  • Other subtle emulation accuracy improvements (+2A/+3/Pentagon screen timing, 128K/+2 INT duration).
  • Many internal changes (optimized screen sampling, optimized contention, async palette switching).
  • Other subtle changes (UNDO media keeping, CPU stepping prior snapshot save, volume mode order).
  • Minor bugfixes (media slot release, paths set to root dir, filter in root dir, allowed filter chars).
  • Happy birthday, and thanks for all the fish.

1.2.0 2014/02/19

  • Proper Spectrum +2/+2A/+3 emulation, including contention and everything.
  • Support for +3DOS 3" DSK/EDSK disks, including formatting, autoboot and disk browser.
  • TR-DOS formatting now also works for all possible disk format types.
  • File and directory name filtering is now available in file requester.
  • All keyboard keys are now sticky whenever the emulation is paused.
  • In load requester, L/R+Y now shows the other medium than Y does.
  • Button input in file viewer can be now toggled with icon or L/R+X and Pause.
  • Full size TR-DOS disks are now always treated as double track and double sided.
  • Alternate save/load directories now work better and even with filter enabled.
  • Various internal changes (ROM deltas, SZX +3DOS support, plus model stats, media icon).
  • Minor bugfixes (FTP files caching, hex decoding, TR-DOS BASIC start line).
  • Dedicated to my beloved parents. Thanks for getting me my first Speccy.

1.1.1 2012/12/24

  • Spectrum +2A/+3 snapshots are not rejected right away anymore. Instead, they are executed in 128K mode with extended paging enabled. This makes some +2A/+3 RZXs and exclusive software work quite fine.
  • Added a bit of color coding to the controls screen.

1.1.0 2012/12/20

  • Custom ROMs support. See roms/readme.txt for more info.
  • IF2 ROMs and 48k/128k ROMs can be loaded directly in load requester.
  • Both SZX and Z80 snapshots now support custom ROMs as well.
  • TR-DOS/Beta Disk support for all models, not only Pentagon. Simply choose the model or reset the machine while a disk is loaded. You can also autoboot any disk with current model by using R+A.
  • Beta 128 in 48k mode responds even to the standard Beta 48 entry points. This makes both Beta 128 and many Beta 48 programs work at the same time.
  • True Beta 48 mode can be enabled with proper beta48.rom (such as TK90X's CBI95 ROM).

+ Added NMI aka Magic button - becomes useful with some custom ROMs. + Added custom keyboards for more games as well as one for more comfortable text typing. + Added Virtual TR-DOS games and ZX AAA demos sites to servers.cfg.

  • Pressing Start twice upon startup now takes you to the last used files view.
  • Few subtle changes (save slot media loading, ROM launch stats).
  • Little optimizations (Z80 core, sound generation, normal speed load mode).
  • Subtle emulation improvements (authentic SCF/CCF, MEMPTR and AY white noise).
  • Minor bugfixes (grayscale border, step direction bit).
  • Merry Christmas.

1.0.0 2012/07/01

  • Custom keyboard support. See custom/readme.txt for more info.
  • Favorite/recent files lists showing up to 500 most/last used files.
  • TR-DOS disk browser for viewing both disk directory and sector data. It can be used to insert empty disk images as well.
  • TR-DOS disk images can be now saved in SCL format, too.
  • Keep the file viewer visible while enabling button input by pressing R.
  • Little UI graphics improvements (nicer icons, empty requesters).
  • Added skins/light/style.cfg for those who prefer black text on white.
  • Few subtle TR-DOS changes (density check, zero files SCL).
  • Few subtle tape related changes (tape block flush, PZX fast loading test).
  • Other subtle changes (widget help tracking, virtual files stats).
  • Minor bugfixes (IN[ID](R) postdecrement, libfat lseek).

0.9.9 beta 2 2012/04/24

  • The paused time is now not counted towards the current file times.
  • The sleep time is now not counted towards any times but sleep time.
  • Fixed the stats date display.

0.9.9 beta 1 2012/04/23

  • Kempston mouse emulation, including dual mouse in multiplayer. See docs/mouse.txt for more detailed info.
  • Tape deck now supports tape recording and tape block deletion. TAP and TZX tapes can record standard blocks, PZX anything. The recorded tapes can be then saved in save requester like other files.
  • Track statistics about overall usage as well as games and apps launched. The statistics are additionally automatically saved every minute by default. If your card is too slow to deal with this and you keep noticing slowdowns, you can increase stats_write_timeout or set it to 0 to disable the autosave. You can also remove the ZXDS/stats directory to disable statistics entirely.
  • Builtin viewer for viewing both text and binary files.
  • The World of Spectrum online server listings now include text instructions.
  • The emulation speed can be slowed up to 8 times.
  • The data dump view now allows poking whole 2byte words at once.
  • More thorough DLDI startup to work around misbehaving drivers.
  • Fixed loading of files from the root directory.
  • Fixed playback of RZXs containing multiple snapshots.
  • Properly mark SCL disks as such when saving SZX.
  • Few minor enhancements (improved PZX fast loading, AY register masks).
  • Other subtle changes (file type recognition, avoid snapshot single step).
  • Minor bugfixes (delayed IME handling, proper user settings slot).

0.9.3 beta 1 2012/03/17

  • Proper save requester, including support for basic file management operations.
  • Alternate between two different directories by tapping the save/load file icon again.
  • Quickly switch models in load requester with various L/R+X combinations.
  • Risky operations now use confirmation requesters.
  • It is now possible to step the emulation frame by frame.
  • Added pouet.net and Tipshop pokes library to servers.cfg.
  • Implemented HTTP redirects, required by some pouet.net sites.
  • Directly poke decimal, hexadecimal, or binary values in the data dump view.
  • Switched to PNG for background and icon graphics. The BMP support remains, but note that some names have changed - check skins/readme.txt for details.
  • Augmented the 128k keyboard graphics with symbol characters. Thanks, Paddy.
  • The selected keyboard is now saved to the config file.
  • Distinguish the load and save slot screens with colored slot frames.
  • Disable the keyboard matrix effect during multiplayer session. It is often difficult enough to configure the controls even without it.
  • Switching to maximum speed while loading tapes in fast mode now disables the display updates entirely. Handy for slight speed boost if you feel desperate.
  • Other subtle changes (nicer boot message, increased cheat poke limit).
  • Fixed loading of Pentagon SZX files (ROM paging, step direction).
  • Minor bugfixes (libfat mkdir and aliasing, skipping of long names in ZIP).

0.9.2 beta 1 2010/11/09

  • Peer-to-peer WiFi multiplayer for 2 players.
  • SZX snapshots support.
  • RZX playback now supports external snapshots.
  • Save slots now use SZX instead of Z80. Existing Z80 slot files are still loaded, though, and you can delete them manually once you don't need/want to keep them.
  • Save slots now save the associated tape/disk into a separate file if needed as well. Disk is saved once and then only whenever it is modified, tape is saved only once and only if it is not positioned at the beginning or the very end.
  • Lot of internal changes (save states cache, icon buffering, bigger file buffer).
  • Few subtle TRDOS fixes (eject during sector write, access to high tracks of SD disks).
  • Subtle changes (2x faster change to parent directory, no cd to zip in zip, WiFi IPC sync).
  • Changed grayscale palette to match the luminance of the real Spectrum.

0.9.1 beta 1 2010/08/13

  • Memory viewer and disassembler.
  • Tape sound is now audible in normal speed load mode (conveniently forced with R+A).
  • The system log can be saved to a file now, helpful when troubleshooting.
  • Cleaned up the virtual directory code, greatly reducing the amount of required IO accesses.
  • Changed the confusing bouncing logic of previous displays' history to simple LRU.
  • Fixed the annoying sound clicks when sound is temporarily paused (e.g., scrolling in requesters).
  • Minor bugfixes in download code (HTTP continuation lines, last line EOL in listings).

0.9.0 beta 2 2009/03/20

  • Added proper initial FIFO sync which shall make WiFi init work on all cards.
  • Reenabled automatic loading of .cfg and .pok files which was accidentally disabled before.
  • Added early boot message so people can see something is going on if boot takes a bit longer.
  • The r4tf.dldi driver is not patched in, as these cards now support autopatching. Also note that for the same reason and to avoid excess garbage the latest libfat library doesn't include any builtin DLDI drivers anymore, so if you have some older card, you may need to DLDI patch ZXDS yourself even if you hadn't to do that before.

0.9.0 beta 1 2009/03/12

  • Support for download of files from HTTP and FTP servers over WiFi.
  • Virtual directory system for creating arbitrary listings of both local and remote files. Config for World of Spectrum, RZX Archive and Demotopia data feeds included. See docs/online.txt for how to create the listings and setup your own servers.
  • The data_path, saves_path and screens_path are now configurable.
  • Help now finally uses the variable width font as I always intended.
  • Stick to the Zilog behavior regarding SCF/CCF undocumented flags.
  • Built with the latest devkitPro release, should solve most libfat/DLDI issues.

0.8.1 beta 2 2008/12/03

  • Tweaked RZX code to work with more nonconformant but commonly available recordings.
  • Worked around sound clamping while keeping the sound loud by throwing dummy sample into the mix.

0.8.1 beta 1 2008/11/27

  • RZX playback (no SZX snapshot support yet, though).
  • Files stored in ZIP archives can be browsed and loaded directly.
  • Support for poke cheats in POK file format, including autoload.
  • Added log screen for better problem diagnostics, especially those RZX related.
  • Turn off the bottom screen backlight after configurable timeout.
  • Automatically save state and enter sleep mode when the lid is closed.
  • Alternatively boot from saves/boot.z80 instead of last session state.
  • Skip loading of either state upon startup when L/R buttons are held.
  • Replaced few busy loops with inactive waits to further improve battery life.
  • Improved the last menu action to cycle through all recently used views.
  • Extended the range of both AY and speaker samples to make the sound louder.
  • Tweaked the Z80 snapshot loading code to support some less conformant files.
  • The HALT instruction now updates the R register properly.

0.8.0 beta 1 2008/06/19

  • TR-DOS emulation, allowing loading of TRD/SCL disks (including autoboot).
  • For/next loops in TZX files are now supported.
  • Screenshot support, for SCR/BMP saving and SCR loading.
  • Color/grayscale palette toggle for more nostalgic look.
  • Mode for black and white display of ink/paper only, without attributes.
  • AY ACB and ABC stereo modes and narrow/wide stereo separation.
  • Choice of three relative AY and speaker volume levels.
  • Changed AY volume tables to match the real machine more closely.
  • Implemented fake low-pass AY filter to avoid aliasing issues in some tunes.
  • Fixed setting of AY envelope register even if it doesn't change, fixes few sound effects.
  • Fixed sound clamping when all AY channels played at full volume and speaker was off.
  • Few other subtle changes (initial config autosave, even more safe shutdown).

0.7.0 beta 2 2007/12/24

  • Implemented normal speed loading, to make loader minigames playable.
  • Quick fix for launchers which don't set the initial display state properly.
  • Should make the bottom screen properly visible for DS Extreme users.

0.7.0 beta 1 2007/12/21

  • Finally added keyboard graphics, for both 48k and 128k keyboard.
  • Replaced the ad-hoc file requester with proper touch screen version.
  • Configurable button to key/action binding, with 9 predefined customizable settings.
  • Tape browser and manual tape control.
  • Autoload feature, with both tape-loader and USR0 mode support.
  • Skinning support for changing graphics and color of each UI element.
  • Builtin online help.
  • Pentagon emulation (no TR-DOS yet, though).
  • Z80 snapshots are now compressed.
  • Added 1 forgotten T state to EX (SP),* instructions.
  • Fixed #7FFD paging decoding (A15+A1 instead of A14-15+A1), more demos now work.
  • Changed #1F kempston joystick decoding (loose A5 instead of strict A5-A7), more games should work.
  • Disable autoplay when tape end is reached, more flawed tape files should now load.
  • Few other subtle fixes (triple buffering race, halt timing upon requester).

0.6.0 beta 1 2007/10/10

  • Full memory and IO contention emulation.
  • Proper floating bus emulation.
  • T-state accurate screen sampling.
  • About everything should now work like on real machines, including multicolor effects.
  • Accurate speaker synthesis instead of discrete sampling.
  • Screen is now triple buffered and the LCD refresh rate is synced to 50Hz. This results in extremely smooth and tearing-free display.
  • Fixed opening of files from directories of varying depth. It sometimes failed before due broken chdir(), so full names are used now instead.
  • Few subtle fixes regarding snapshots (#7FFD, IFF2, T counter, tape eject).
  • Dropped the .ds.gba version, as people need to DLDI patch it themselves * before* the loader is appended anyway.

0.5.1 beta 1 2007/08/14

  • Support for the new PZX tape file format.
  • File requester finally supports directory browsing.
  • Fixed on-screen save slot numbers to match the snapshot names.
  • Included .ds.gba version for people who need it (owners of some Slot-2 based cards, like EZFlash IV and SuperCard) yet don't know how to make one.

0.5.0 beta 1 2007/04/23

  • Both TAP and TZX tape files are now loaded at high speeds whenever possible.
  • Z80 snapshots are now supported.
  • Save state support via in-memory/on-card write-through save slots for 10 Z80 snapshots.

0.0.4 alpha 1 2007/04/13

  • Sound support, both speaker and AY-3-8912.

0.0.3 alpha 1 2007/04/03

  • Basic TAP support (no fastloading yet, though).
  • Basic TZX support (no fastloading, missing support for flow control blocks).
  • Primitive border support.

0.0.2 alpha 3 2007/03/25

  • BIT instructions now set the undocumented flags 5 and 3 properly, with the sole exception of BIT n,(HL), as MEMPTR is intentionally not emulated. These flags were always set before, due to lack of documentation.
  • Instructions IN[ID](R) and OUT[ID](R) now also set the PV flag.
  • Instructions OUT[ID](R) now set the CY and HC flags correctly. They used the IN[ID](R) behavior before, due to lack of documentation. So ZXDS now passes both ZEXDOC and ZEXALL (sans BIT n,(HL) in the latter).

0.0.2 alpha 2 2007/03/24

  • Fixed silly typo in the macro testing the Half Carry flag, which grossly broke the DAA instruction and affected flags 5 and 3 after CP[ID](R) instructions. Bit 4 of H register instead of HC was tested by mistake before.

0.0.2 alpha 1 2007/03/21

  • Primitive file requester, root dir only.
  • Loads 128k snapshots as well, with interrupts now being enabled properly.
  • Touch screen now shows at least some minimalistic keyboard layout.

0.0.1 alpha 1 2007/03/20

  • First release.
  • Still pretty incomplete, but boots 128k.
  • Can only load 48k snapshots, though.

Credits

ZXDS itself is written by Patrik Rak, however credit is due as it would not have happened without the following people and their software:

  • devkitProARM toolchain maintained by Dave Murphy et al.
  • libnds by Michael Noland, Jason Rogers, Dave Murphy, et al.
  • libfat by Michael Chisholm.
  • dswifi by Stephen Stair.
  • zlib by Jean-loup Gailly and Mark Adler.

Furthermore, ZXDS comes with several copyrighted ROM images built in:

  • ZX Spectrum 48k Basic ROM by Steve Vickers and John Grant, owned by Amstrad. Note that Amstrad have kindly given their permission for the redistribution of their copyrighted material but retain that copyright.
  • ZX Spectrum 128k Editor ROM by Martin Brennan, Steve Berry, Andrew Cummins, Rupert Goodwins and Kevin Males, also owned by Amstrad.
  • ZX Spectrum 128k +3 ROM by Rupert Goodwins, Cliff Lawson, and Vik Olliver, owned by Amstrad.
  • TR-DOS ROM by Technology Research.

The following software was also helpful during the development:

  • no$gba by Martin Korth.
  • Pro Motion by Jan Zimmermann.

External links