Git Product home page Git Product logo

zx-spectrum_mister's Introduction

ZX Spectrum for MiSTer Platform

Some verilog models from Till Harbaum Spectrum core were used in this project.

Features:

  • Fully functional ZX Spectrum 48K, 128K, +3 and Pentagon 128 with correct CPU and Video timings.
  • Pentagon 1024K and Profi 1024K memory interfaces.
  • Turbo 7MHz, 14MHz, 28MHz, 56MHz.
  • ULA+ v1.1 programmable palettes with extended Timex control.
  • Timex HiColor, HiRes modes.
  • TAP tape format with turbo (direct byte injection) and normal loading.
  • TZX and CSW tape formats with fast(16x) and normal loading.
  • Z80/SNA snapshot loading.
  • TR-DOS (Beta Disk Interface) - TRD(read/write) and SCL(read-only) images.
  • G+DOS (MGT +D Disk Interface) and IMG, MGT images (only in non +2A/+3 memory modes).
  • +3 Disk drive usable with +3DOS.
  • DivMMC with ESXDOS.
  • Multiface 128 and Multiface 3 (in +3 mode) add-on.
  • Memory snapshot save/load in +D and Multiface.
  • Kempston Mouse.
  • Joysticks: Kempston, Sinclair I/II, Cursor
  • General Sound with 512KB-2MB of RAM
  • Turbosound-FM (dual YM2203 incl. dual YM2149)
  • SAA1099

Installation:

Copy the *.rbf to the root folder, copy boot.rom to games/Spectrum/ on the SD card.

Notes about supported formats:

TRD is TR-DOS image used with Beta Disk Interface (BDI). To use TR-DOS you need to choose TRD image in OSD first. In 128K mode use menu to enter TR-DOS. In 48K mode use command RANDOMIZE USR 15616 to enter TR-DOS. In +3 mode, enter to 48K mode from the +3 BASIC via the USR0 command, then issue RANDOMIZE USR 15616. Use command RETURN to leave TR-DOS.

Note: Not all TRD have autostart and it's cumbersome way to enter TR-DOS from 48K mode, there is GLUK ROM included. So insert TRD/SCL dosk and press F11, you will enter to GLUK menu, then choose GLUK BOOT where you can select the file to boot. That's all.

IMG is G+DOS image used with +D Disk interface. Although it's fully supported, i couldn't find any games on such disks. The main purpose of these images is to use snapshot function of +D and Multiface.

MGT is G+DOS and MasterDOS (SAM Coupe) image. It's similar to IMG but uses different layout. The main purpose is to transfer data to/from SAM Coupe.

DSK +3 disk format. In none- +3 modes, +D tries to mount it, however +3 disk images are not compatible with G+DOS. The original +3 disk drive is a single-sided single-destiny drive, but this core supports double-sided double-destiny images, too. An empty DSDD image is great for saving from Multiface. Note: in +3 mode, both the Beta and the +3 disk drive are supported, but only one image can be mounted, so both cannot be used at the same time.

TAP is simple tape dump format. It is possible to use normal and turbo loading (only if application uses standard loading routines from ROM). To load in turbo mode, you need to choose TAP file in OSD first and then start to load app through menu (128K) or by command LOAD "" (48K, 128K). To load TAP file in normal mode through internal AUDIO IN loop, you need to start loading through menu or command first and then choose TAP file though OSD. If application uses non-standard loader, then TAP file will be played in normal mode automatically. Thus it's safe to always choose the turbo mode. Some applications are split into several parts inside one TAP file. For example DEMO apps where each part is loaded after finish of previous part, or games loading levels by requests. The core pauses the TAP playback after each code part (flag=#255). If application uses standard loader from ROM, then everything will be handled automatically and unnoticeable. If app uses non-standard loader, then there is no way to detect the loading. In this case you need to press F1 key to continue/pause TAP playback. Do not press F1 key while data is loading (or you will have to reset and start from beginning). To help operate with TAP (for non-standard loaders) there is special yellow LED signaling:

  • LED is ON: more data is available in TAP file.
  • LED is flashing: loading is in process.
  • LED is OFF: no more data left in TAP file.

In normal mode, while TAP loading, the following keys can be used:

  • F1 - pause/continue
  • F2 - jump to previous part (if pressed while pilot tone), or beginning of current part (if pressed while code is transferring).
  • F3 - skip to next part

If game uses non-standard loader, then loading usually paused after loading of first part. Press F1 to continue loading.

OSD option Fast tape load increases CPU frequency to 56MHz while tape loading.

Use F10 key to switch into 48K basic (won't lock 48K mode) and automatically enter LOAD "" if game/app doesn't load from 128K menu.

Turbo modes

You can control CPU speed by following keys:

  • F4 - normal speed (3.5MHz)
  • F5 - 7MHz
  • F6 - 14MHz
  • F7 - 28MHz
  • F8 - 56MHz
  • F9 - pause/continue Speed can be controlled from OSD as well.

Due to SDRAM speed limitation 28MHz and 56MHz speeds include wait states, so effective CPU speed is lower than nominal.

Memory Configurations with extra RAM:

  • Pentagon 512K uses bits 6 and 7 in port 7FFD to access additional memory.
  • Profi 1024K uses bits 0-2 in port DFFD to access additional memory.

Mouse and Joystick:

Kempston mouse has no strict convention which bit (D0 or D1) reflects a main button. After each reset, the first button pressed on mouse (left or right buttons only) will be represented by bit D0 (other button will be represented by bit D1). So, if you are not satisfied by mouse button map, then simply press reset and then press other button first. Due to port conflict with Kempston joystick, core uses autodetection. Any mouse activity will switch port to mouse control. Any joystick activity will switch port to joystick control. Some games/apps autodetect the mouse. So, move the mouse or click its button before use such games/apps.

Snapshots:

Core supports snapshot functionality of +D. In order to use it, you need to mount IMG or MGT image. ROM includes preloaded G+DOS image, thus you can mount IMG/MGT at any time (even while playing the game). Note #1: preloaded G+DOS has been patched to allow disk change on-the-fly. So, if you will load G+DOS from disk, then be careful - it may corrupt previous saves if you will change the disk! Note #2: only one disk image can be mounted at any time. Thus make sure if you use game from TRD image, the game won't save anything later to its disk.

To save snapshot using +D (preferred way), press F11 key. You will see stripes on border and game will freeze. You can press following keys:

  • 3 - to save the screen.
  • 4 - to save 48K snapshot.
  • 5 - to save 128K snapshot. Original +D ROM requires to press additional Y/N keys in 128K mode to choose the correct screen buffer. Included ROM has been pre-patched to automatically detect the screen. So, just press 5 for 128K snapshot.

To load snapshot, just mount IMG/MGT and go to basic prompt where type CAT 1 to list its content. Note the number of snapshot file. Then type LOAD pX where X is the number of shapshot file. For other disk commands please find and read G+DOS (MGT +D) manual.

Multiface 128 and Multiface 3:

You can enter Multiface ROM using RShift+F11. Multiface 128 includes preloaded debugger (Genie) where you can trace or modify the game. If you prefer to use bare Multiface 128 ROM then do following procedure: Press and hold ESC, then press RShift+F11. You will be able to use bare Multiface ROM by simple subsequent presses of RShift+F11 till core reload. Multiface provides snapshot functionality by saving to IMG/MGT disks. Please find and read Multiface 128 manual. Note: Multiface 128 expose its port, thus if game has protection against Multiface, it won't work, unless you press (o)ff before you exit from the Multiface menu. Thus using +D snapshot is prefered. When using the Spectrum +2A/3 mode, the Multiface 3 is supported. There's no Genie for the +3, but there are useful toolkit routines in the stock ROM.

DivMMC

Supported both VHD images and secondary SD card. Default auto mode makes DivMMC hidden til VHD image gets selected. You have to get ESXDOS package, rename ESXMMC.BIN to boot1.rom and place to games/Spectrum/ Make sure boot1.rom and files inside VHD (or SD card) are from the same ESXDOS version.

Special Keys:

  • Ctrl+F11 - warm reset
  • Alt+F11 - cold reset will disk unload
  • Ctrl+Alt+F11 - reset to ROM0 menu
  • F10 - switch to Basic 48 (without 48K lock) and issue LOAD""
  • RShift+F10 - same as F10 with 48K lock
  • F11 - enter +D snapshot menu (or ROM0 menu if IMG/MGT not mounted) or DivMMC file browser.
  • RShift+F11 - enter Multiface 128 menu
  • F12 - OSD menu

Quick switch between models:

  • Alt+F1 - ZX Spectrum 48K (48KB, ULA-48)
  • Alt+F2 - ZX Spectrum 128K (128KB/+2, ULA-128)
  • Alt+F3 - ZX Spectrum +3 (128KB +3, ULA-128)
  • Alt+F4 - Pentagon 48K (48KB, Pentagon)
  • Alt+F5 - Pentagon 128K (128KB, Pentagon)
  • Alt+F6 - Pentagon 1024K (1024KB, Pentagon) CPU speed will reset to original.

Download precompiled binaries and system ROMs:

Go to releases folder.

boot.rom Structure

boot.rom is a collection of required ROMs, however it does not contain a full set of ROMs for each supported machine and/or hardware, it only includes the necessary subset.

N Base Offset (Hex) Chunk Size (Hex) SHA1 Of the Original Description
1 00000 4000 5f40f5af51c4c1e9083eac095349d7518545b0e0 glukpen.rom Mr Gluk Boot Service version 6.61
2 04000 4000 ??? (doesn't match known 5.04t or 5.04t-bugfixed) TR-DOS 5.04T
3 08000 4000 d07fcdeca892ee80494d286ea9ea5bf3928a1aca 128p-0.rom (128K editor and menu), the first half of the Pentagon 128 ROM
4 0C000 4000 80080644289ed93d71a1103992a154cc9802b2fa 128-1.rom English 128 ROM 1 (48K BASIC)
5 10000 4000 62ec15a4af56cd1d206d0bd7011eac7c889a595d plus3-4.1-english-0.rom English +2B/+3B v4.1 ROM 0 (128K editor)
6 14000 4000 1a7812c383a3701e90e88d1da086efb0c033ac72 plus3-4.1-english-1.rom English +2B/+3B v4.1 ROM 1 (128K syntax checker)
7 18000 4000 8df145d10ff78f98138682ea15ebccb2874bf759 plus3-4.1-english-2.rom English +2B/+3B v4.1 ROM 2 (+3DOS)
8 1C000 4000 be365f331942ec7ec35456b641dac56a0dbfe1f0 plus3-4.1-english-3.rom English +2B/+3B v4.1 ROM 3 (48K BASIC)
9 20000 2000 6b841dc5797ef7eb219ad455cd1e434ca3b9d30d plusd-1.A.rom MGT's +D disk interface ROM v1.A
10 22000 2000 CUSTOM plusd-sys.bin MODIFIED version of the +D system code, based on the chunk CONFIG2 from "Plus D System Tape"
11 24000 2000 8df204ab490b87c389971ce0c7fb5f9cbd281f14 mf128-87.2.rom (CRC32: 78ec8cfd) Miltuface 128 (87.2)
12 26000 2000 926425b3e84180683f0872aee9ebf6f4b9dfaf5f genie128-2.rom GENIE 128K V2.1, the second half of the Genie 128 Disassembler ROM
13 28000 2000 5d74d2e2e5a537639da92ff120f8a6d86f474495 mf3-3.C.rom (CRC32: 2d594640) Multiface 3 (3.C)
14 2A000 2000 N/A zeroes.bin unused 8K, padding for the MF3 ROM to fill remaining space in 16K block
15 2C000 4000 5ea7c2b824672e914525d1d5c419d71b84a426a2 48.rom BASIC for 16/48K models

zx-spectrum_mister's People

Contributors

adrianlongland avatar alfishe avatar gyurco avatar hackshed avatar jameshpdp avatar limi avatar milanpolle avatar sorgelig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zx-spectrum_mister's Issues

Document boot.rom structure

Hello!

Could we get a few words in the README.md about the boot.rom structure and sources, please? We were able to identify most of the components [1, 2], however some of them appear to be modified. It would be great describing the reason for those modifications, if possible.

Apologies for not starting with a pull request, but I am afraid I do not have enough information for that yet. Happy to draft one when more information is available.

Thank you.

  1. https://misterfpga.org/viewtopic.php?p=60600#p60600
  2. https://misterfpga.org/viewtopic.php?p=73638#p73638

wd1793 need delay

In the attached image there is a demo with a turbo loader attached. which works fine on the real Speccy and on emulators, but does not want to work on the FPGA implementation. After hours of debug FPGA, I discovered that without special delay between calling the 1FF3,2A53,2FC3 procedures and between calling the trdos 2F1B procedure (reading the sector) it reads garbage. And if you put a delay there, then everything goes well. (shfix.C option)
trdos-bug.zip
trdos-bug

Alienate demo don't work well

I try this demo in serveral configurations but allways crash after the clean screen effect, in original hardware work correctly.
On the other hand, the sound with 'General Sound' configuration don't work.

Can download and try it here:
http://www.pouet.net/prod.php?which=10531

Thanks for all the work done to make this perfect core.

[Feature request] Native ram snapshots

Hi,

If possible, It would be great to have an option for native ram snapshots (z80 or sna). The solution to do it with the disciple in a comfortable way is complicated, it's more tedious, requieres to manage disks and some games has crashes or screen corruption issues when loaded again.

Port FE is not working properly

When bit 4 (EAR output) of port FE is set to 0 or 1 and that port is read back, it should return the same status in bit 6 (EAR input) if computer is an issue 3, always 0 or 1 until bit 3 is enabled (MIC output and indirectly EAR output) and any subsequent reading of the port would return the same written value, this would be the case of an issue 2, or it would always remain fixed at 0 or 1 regardless of the status written to bit 3, which is the wrong case and the one that occurs in some emulators and this core (it always returns 1).

This is not the appropriate behaviour for this port, because it doesn't fit any of the two issues and causes problems with some games, such as abu simbel or blinkys scary school.

More details can be found here: https://worldofspectrum.org/faq/reference/48kreference.htm (Port 0xfe section)

Save core settings

@sorgelig

hi, when I change the core settings (full screen or memory) the core does not let me to save it.
So when I turn on the mister the settings are lost and are to be changed again.
The same with c64 core.
Can you let the users to save the settings for each core ?
A new command in the core menu to save settings as default, I mean.
Thank you

[Feature Request] Option for disable AY chip

It would be interesting, in 128k modes, to be able to disable the AY sound chip from the menu, just as it can be done with general sound. Yes, I know that this chip is part of these models, but there are situations in which you want to hear only the beeper sound, because the music is repetitive or for simply comparison, and it's not possible since it is always enabled.

Question - IPF Files

Forgive me if this is the wrong area but I have an IPF archive of the files. How would I go about converting these to a compatible format?

Enlarge the screen to 16: 9 HDMI/remove side black bands

Good morning @sorgelig ,
is there the possibility to enlarge the screen to 16: 9?
I would like to eliminate the two black side bands that appear (see photo), other cores have the option in the menu but with the ZxSpectrum core I can't find a way to have a full screen without these two side black bands.
How can I do?

Untitled 1

Bug with John Ritman games menu

John Ritman games Head Over Heels/Batman/MatchdayII have a common menu interface style. On this core the menu selection constantly rolls through the options, I'm not sure if this is a regression. This is not reproducable on the ZXNext core or actual hardware.

Sound corrupted with 128k only games

Hello, i'm a new user of MisTer, trying this core i've encountered a possible bug, trying one of my favourite homebrew game: Castlevania Spectral Interlude, freely downloadable on the authors page http://spectralinterlude.com/ i've seen that the music and the sound in general is horribly corrupted, the same things happens with the game Midnight Resistance with the 128k only version. 48k games i've tried sounds correctly. I'm using HDMI connection and i've tried both 96k and 48k for hdmi audio.

Missing border lines in Pentagon mode

Hello,

I'd like to bring to your attention an out of spec behaviour of Pentagon mode whereby it does not render at least 16 lines of top border. This can be clearly observed in "Across the Edge" demo where at some point a text "ACROSS" is drawn on top of the screen and "EDGE" at the bottom and that top part is cut. Also, ZX Next core in "Soviet timings" personality renders noticably higher top border than bottom.

I don't know if that was an intentional decision to implement it like that in ZX Spectrum core but I would like to kindly ask to make the missing lines to appear as it would in real Pentagon.

Thank you very much in advance.

Request: correct video positon according to real HW.

I have a problem with the position of the image on the screen of the ZX-Spectrum core in several CRT televisions (15hz), using VGA / SCART.
Basically the problem is that on some TVs, the core is off-center to the left, even losing the entire edge.
On other TVs, the core is off-center to the right, or above the screen, losing the upper edge depending on the model.
It is an issue that I have reported in Main_MiSTer and I have been answered (thank you) that it is better to post the problem in each core individually, since it is not possible to implement it at the framework level.
It would be great to have a Horizontal / Vertical position control in the OSD to be able to center the image regardless of the TV used.
I have tested the real machine on different TVs and curiously the image does come out perfectly centered.
I have tried several SONY trinitrons as well, such as SAMSUNG and SANYO models.

Tab not used

Hi @sorgelig,
The spectrum core has not the key TAB assigned.
Could it set to use Graph Mode as like Spectrum plus or 128 ?
So it would be easy to change to [G] mode instead use other combinations.
image
image

How to assign a key permanently

@sorgelig

hi,
I need to change a key, how can I modify the keymap permanently ?
Is there a file to edit ?
If I change a key by menu when I reload the core it will be restored to default., I need to fix it permanently, the save setting does not work for this.
Help me please.
Thanks

Light gun support

It would be great to have light gun support. Guncon 2 for CRT TV and Guncon 3 for modern TV is great feature that have console cores. Could You please add.

[Feature request] Stereo modes for AY

Hello,

I would like to kindly ask to implement a feature in the core which would allow to switch stereo mode between ABC and ACB. This is because most of the demos for Pentagon seem to be made with ACB in mind whilst the core appears to be ABC.

Additionallly, if it was possible to have both AY and YM chips implemented (I don't know which one is now) and option to switch between them, that would make the core basically feature complete over already a great thing.

Many thanks in advance.

a lot of tapes broken with current release

A lot of tapes are broken with current release V20210123. R loading Error's, hang ups during loading, or loading border goes red flashing

Just some examples of the N folder:

N.E.I.L. Android (1988)(Alternative Software).tzx
Nebula (1984)(Red Shift).tzx
Necris Dome, The (1987)(Codemasters).tzx

All these are working in previous V201108.

If more examples or md5 sums of the files are needed just tell me. I'd pick them out.

No reset option in OSD

In OSD, it's not possible to reset the current machine without changing to another one.

Eg, if I'm in 48K mode and want to reset I need to first change the machine in "Memory" tab, then "Reset & Apply" becomes available, then I have to change the machine back to 48K in "Memory" and reset again.

I know there are shortcuts for keyboard reset, but it can be a minor annoyance when using a joypad. Perhaps adding a separate "Reset" option would be a good idea, or just enabling "Reset & Apply" to reset current machine without changing it.

Kempston mouse support?

It would be great to have kempston mouse support either on this one or zx evo core.

There are a few games and conversions for it.

The best one is 'ZX Larry', appeared on latest ZX Dev, but there are others:
https://velesoft.speccy.cz/kmsoft.htm

and probably much more.

It's kind of BSX on SNES, it's not a veeery used feature, but a nice one ๐Ÿ˜„

Z80 In Circuit Emulator (ICE)

I suggest adding possibly debugging Z80,
There is a ready project github.com/hoglet67/AtomBusMon, which is built on the T80 Core and a simple AVR Core you need to manage. And the console output is simply connected to the Linux console.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.