Is the NEXT an emulator?

The Speccy's spritely young offspring. Discuss everything from FPGA to ZX
Sparky
Manic Miner
Posts: 611
Joined: Tue Dec 15, 2020 9:42 pm

Is the NEXT an emulator?

Post by Sparky »

I can't seem to find a reliable answer either way. Does it emulate or is it hardware?
Alex
akeley
Dynamite Dan
Posts: 1108
Joined: Sat Feb 01, 2020 5:47 pm

Re: Is the NEXT an emulator?

Post by akeley »

Loaded question. It's somewhere in between ;)
Sparky
Manic Miner
Posts: 611
Joined: Tue Dec 15, 2020 9:42 pm

Re: Is the NEXT an emulator?

Post by Sparky »

It costs well over ₤300, shouldn't it be full hardware?
Alex
User avatar
PeterJ
Site Admin
Posts: 6966
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Is the NEXT an emulator?

Post by PeterJ »

Google FPGA [mention]Sparky[/mention]. It's complicated!
akeley
Dynamite Dan
Posts: 1108
Joined: Sat Feb 01, 2020 5:47 pm

Re: Is the NEXT an emulator?

Post by akeley »

Sparky wrote: Sat Feb 20, 2021 12:03 pm It costs well over ₤300, shouldn't it be full hardware?
"Full hardware" means it would have to use exactly the same chips that ZX Spectrum does. That would make it a clone (like Harlequin), and also wouldn't allow for the new, extended features.

Designing a completely new hardware chip is so costly it makes it impossible for anybody but the biggest players such as Intel or AMD. That's why all the hobbyists use FPGAs.
User avatar
desUBIKado
Microbot
Posts: 108
Joined: Sun Jan 10, 2021 10:27 am

Re: Is the NEXT an emulator?

Post by desUBIKado »

In my opinion, ZX Spectrum Next is hardware (FPGA) recreating other hardware.
User avatar
1024MAK
Bugaboo
Posts: 3176
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Is the NEXT an emulator?

Post by 1024MAK »

To answer I have to ask you some questions...

If you take standard production car (let’s call it a model A) and put a different engine in it or a different gear box or a different transmission system, is it still a model A car?

Is a Harlequin a hardware emulator of a ZX Spectrum?

If the original Ferranti ULA in your ZX Spectrum dies and you fit a modern ULA replacement module in it, is it still a ZX Spectrum?

In other words, at what point do you decide that something is an emulator? The Next is definitely not a faster microprocessor running a software program that is trying to emulate a ZX Spectrum.

The Next uses a FPGA chip. This is a very large number of logic elements (logic gates, flip-flops, registers etc.) all in the same chip, but which can be configured by a file stored in a memory area (either on chip or in an external memory chip).

Using a FPGA, you can replicate the same logic functions that you can build using traditional logic chips, including microprocessors, memory, standard 74xxxx logic plus anything else where you know enough about the logic system.

And unlike a software emulation where only a relatively limited number of things can happen simultaneously (depending on the hardware that it itself is running on) because it’s using hardware, many, many logic functions can operate in parallel simultaneously.

If the Next just recreated the functions of the ZX Spectrum, then most would call it a clone. But it adds extra functions. Hence it is a ZX Spectrum like computer that can be set up to be compatible with various ZX Spectrum models.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer being good this year.
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Is the NEXT an emulator?

Post by Alcoholics Anonymous »

Yes just to add: it is very clear that it is not an emulator. FPGAs are the modern day equivalent of the ULA which can be thought of as half way between MSI parts (like TTL logic) and custom ASIC.

The ZX80 was implemented using ttl parts but the ZX81 replaced those ttl parts (about 20 of them) with its ULA which integrated the function of all those parts into a single programmable IC. People become confused when they hear "programmable". It wasn't programmable as in software, it was programmable as in placement of wires. It doesn't make much sense to think of the ZX81 as a ZX80 emulator.

You have a more recent example in the new omni. The last version was based on the harlequin which was implemented using ttl parts. The new version will replace many of those ttl parts with a CPLD (a more limited device than an fpga) just like the ZX80 -> ZX81 step back in the day. Or indeed the spectrum prototype -> commercial spectrum step.

Today's FPGAs have much higher equivalent gate counts than the old ULA from 1982. In the zx next, it's not just a portion of the circuit that is integrated into a single IC -- it's almost all of it: the z80, the former ula functions, a divmmc, a multiface, and so on. It is very much like the entire pcb was put onto a single integrated circuit. Inside the fpga there is a z80, z80 address bus, z80 data bus, z80 control bus, a z80 dma chip, 3 x AY-8912 ics, joystick interfaces, registers, muxes, logic gates, etc and these things are all connected like they would be on a pcb. Note that fpgas don't come with these parts as standard -- they are implemented using the fpga's logic cells. The z80 is not by Zilog; it's an independent implementation and can be thought of as a clone. Think NEC versus Zilog or AMD vs Intel. Likewise with other common parts.

The particular fpga the Next uses is "programmable". Not as in software, but as in placement of wires and specific logic functions. In the 1982 ULA the wire placement was permanent because it involved melting metal onto the top of the chip to make connections. In the Next's fpga, the wire placement is made by connecting many unconnected wires using transistor switches that are controlled by a single sram bit. When the fpga boots, it loads those bits to make those transistors connect wires or not. In this way you get a "programmable" fpga where the hardware can be determined at home and reloaded on every power up compared to the original ULA where the factory had to program it and it could only do it once by permanently melting metal into the device. That's 40 years of progress for you. What was once only accessible to corporations with a million bucks is now accessible to individuals essentially for free except for the cost of the part itself.

What the zx next is not is an identical reproduction of any spectrum model or even a clone of any specific model as the aforementiond harlequin might be considered to be. It is a new computer and tries to position itself as a new spectrum model. It begins with the zx spectrum architecture and extends it by adding new hardware that gives it more capabilities and integrates many of the devices that have been cooked up over the years by the community. The 128K was not identical to the 48K, the +2 was not identical with the 128K and the +3 was not identical to the +2. They all improved on the original machine and tried to maintain backward compatibility with varying success. The Next is like that starting with the +3 and maintains backward compatibility with all the machines, including their differences. Because there are so many gates available, it is possible to do things like implement the video timing of all models and implement io ports with decoding specific to each model which can be dynamically changed at runtime. In this way the Next can run almost all spectrum software properly and use most legacy hardware peripherals which is not something any one original model can do.

What rankles some is the team's claim that the zx next is a new spectrum model (note: I am part of that team). But this is as close as it can get with the use of the Sinclair name licensed, the original case designer involved to make the new case, and significant extensions of the +3 operating system and hardware rather than replacements of anything that came before. To help guide the design, the machine's hardware was imagined to be consistent with what was competitive and possible in the 1990s with modern day conveniences (sd card, 28MHz, 2MB ram would not have been possible at that time, eg, either for technical or cost reasons). Similarly had Sinclair or Amstrad or whoever decided to come out with a +4, it too would be different with new capabilities but a common historical thread.

It should be noted that an fpga is a blank slate so it would be possible to do something like implement an x86 processor and then run a spectrum emulator on that :) But that is not what is happening in the Next.
User avatar
Lethargeek
Manic Miner
Posts: 763
Joined: Wed Dec 11, 2019 6:47 am

Re: Is the NEXT an emulator?

Post by Lethargeek »

some people call fpga designs "hardware emulators", some just "hardware", but whatever

funny thing though is that ZX software compatibility may be worse compared to the best pure software emulators :lol:
User avatar
NEO SPECTRUMAN
Microbot
Posts: 110
Joined: Tue Jan 26, 2021 10:27 pm

Re: Is the NEXT an emulator?

Post by NEO SPECTRUMAN »

Sparky wrote: Sat Feb 20, 2021 11:46 am reliable answer
it's a FPGA devboard in plastic case :mrgreen:
NOT the spectrum's bright future
User avatar
Nitrowing
Manic Miner
Posts: 632
Joined: Mon Sep 21, 2020 8:38 pm
Location: Cleethorpes

Re: Is the NEXT an emulator?

Post by Nitrowing »

" the original case designer involved to make the new case"
This was one of the factors that gave me a 'feels good' about the project.
I see the Next as a successor in so far as that it follows the design and function of the Spectrum models. Backwards compatible with additional functionality. Not a clone. Not an emulator.
Alcoholics Anonymous
Microbot
Posts: 194
Joined: Mon Oct 08, 2018 3:36 am

Re: Is the NEXT an emulator?

Post by Alcoholics Anonymous »

NEO SPECTRUMAN wrote: Sun Feb 21, 2021 6:26 am it's a FPGA devboard in plastic case :mrgreen:
NOT the spectrum's bright future
Welcome to the 20th century. I can't even say 21st :D

Technological progress is all about integrating more transistors into as small an area as possible. At one point there were only discrete resistors, diodes and transistors. Then they put these things on chips and called it small scale integration with limits around 10 devices per chip. Then came medium scale integration where the limit was in the hundreds range. This is where the standard TTL families live. Note that the 74xx parts you are familiar with were not invented with this generation -- variations existed as discrete components before this. Nor did it mean these new 74xx parts were emulating previous discrete implementations by moving from discrete parts to a chip. Then came large scale integration where the number of transistors was in the thousands to tens of thousands. This is were things like the Z80 and ULA were. Then came very large scale integration and ultra large scale integration. This is where naming each advance became meaningless and we just mean any device with more transistors than LSI to be covered by the VLSI term.

The late 70s / early 80s saw LSI being taken advantage for the first time by industry in general. It was no longer the purview of a small number of specialized companies. Commodore and Atari, eg, made full custom ASICs for their bespoke hardware in order to condense dozens of MSI TTL parts onto a small number of ics. They did it to reduce costs and improve performance. Sinclair did the same but used a new programmable technology called the ULA. The whole point of the ZX80 -> ZX81 transition was to reduce costs and chip count by integrating all the logic onto one ic. This led to the first computer being made available at sub $100 using just five integrated circuits. The difference between these two approaches -- fully custom ASIC versus programmable ULA -- was driven by cost and risk. If you make a lot, custom ASIC is the way to go because it has very high up front cost, high risk for failure, and low per unit cost. The programmable ULA is the opposite with lower up front cost, lower risk of failure and higher per unit cost. Other differences were in performance -- number of equivalent gates, speed and power.

The point is they were already trying very hard to put as many things as they could onto a single integrated circuit. If they could have done it, they would have put it all on one integrated circuit in order to cut costs even further. That was not possible in 1980 but it became possible in the late 80s for a machine at the complexity level of a spectrum. This did happen with microprocessors becoming embedded in application specific silicon, including the Z80. Today you can put it all on one integrated circuit as either a custom ic or fpga without breaking a sweat. The fpga / asic choice is again about cost and risk trade-offs.

Integrating it all on one ic is how modern hardware design works. Doing hardware design with hundreds or thousands of TTL parts would be silly. Circuit design with multiple LSI / MSI components arranged on a pcb has moved to circuit design with multiple LSI / MSI component equivalents arranged within a single ic. Insistence on using older technology is for reasons other than practicality.

The spectrum next is no more an fpga dev board than the original spectrum is a z80 dev board. Both are hunks of contemporary silicon in a plastic case, cases designed by a Sinclair employee. What the spectrum next does do is trace a direct path through all sinclair spectrum machines in its hardware and software design. It is a "super spectrum" designed by fans of the machine and making use of the developments in the community over the past 30 years.
Lethargeek wrote: Sun Feb 21, 2021 6:14 am funny thing though is that ZX software compatibility may be worse compared to the best pure software emulators
No one has concerns about that :P The level of compatibility is very high.
Last edited by Alcoholics Anonymous on Sun Feb 21, 2021 7:57 pm, edited 1 time in total.
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: Is the NEXT an emulator?

Post by Pegaz »

Still worse than the best Spectrum emulators and the best Uno cores.
The fancy case isn’t enough, at least for me..
User avatar
PeterJ
Site Admin
Posts: 6966
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Is the NEXT an emulator?

Post by PeterJ »

Out of interest, I know all these snazzy tests can be run and they are very useful, but how much impact does it have on being able to play mainstream released games from the heyday of the Spectrum. I'm not talking obscure demos here. More what the majority of us play.

Can I suggest a spreadsheet of known problematic mainstream games and how they perform on various platforms.

There are quite a few games which won't run on the original Amstrad +3 for technical reasons, and that's a real machine. Also many titles need alteration to run on divMMC device for other reasons (though I appreciate that's a peripheral rather than a machine).

I'm not trying to ask trick questions here and don't have any agenda, I'm just genuinely interested. I own real hardware, and FPGA devices.
akeley
Dynamite Dan
Posts: 1108
Joined: Sat Feb 01, 2020 5:47 pm

Re: Is the NEXT an emulator?

Post by akeley »

PeterJ wrote: Sun Feb 21, 2021 8:07 pm Out of interest, I know all these snazzy tests can be run and they are very useful, but how much impact does it have on being able to play mainstream released games in the heyday of the Spectrum. I'm not talking obscure demos here. More what the majority of us play.
This is sort of a bit more metaphysical issue. Both emulators and mature FPGA cores usually can handle 99% of a given system's library, and this is enough for 99% of users. But one of the key selling points of FPGAs (apart from 0-lag and "feel") is that they are supposed to be "hardware implementations", and "not emulation !!!!1!!1", which is what many (most?) of its fans interpret as a 1:1 replacement for original hardware. That's how I understood it as well, before I actually got some hands-on experience with them.

But incompatibility with some stuff, no matter how small that percentage is, sort of spoils the "real hardware" claim. It's up to anybody to decide how important to them this fact is, but I find it disappointing that it's often swept under the rug by more zealous FPGA promoters.

Please note that the above is meant "in general" in regard to the entire FPGA scene and not particualrly aimed at the Next. This machine actually needed to be an FPGA because otherwise it'd be tricky (impossible?) to implement new features and make it really a "next" Spectrum.
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: Is the NEXT an emulator?

Post by Pegaz »

Well, Next has to allow all multicolor games to work properly through the hdmi output, which has been promised and advertised since the start of the first kickstarter campaign.
Then, we can agree on which games and demos or test programs are obscure and which are not, so that we know what does or doesn't count. ;)
We can play JSW or MM comfortably, even on the ancient Lunter's Z80, but its clear today, that a quality fpga implementation must be really close to 100% compatibility with the original hardware.
If several emulators allready have achieved this, there is no reason not to expect exactly the same from Next.
User avatar
PeterJ
Site Admin
Posts: 6966
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Is the NEXT an emulator?

Post by PeterJ »

Thanks [mention]Pegaz[/mention], I'm meaning FPGA devices in general. I'm not singling out any particular device. I'm not trying to bash the Next.

It would still be good to know which mainstream games don't work as intended with the stock device (not tweaked). Next, Uno, ZX-DOS+ etc. I use SCART on the Next as I appreciate there are some HDMI issues.

I do also appreciate that FPGA should be as good if not better than emulators, and as good (as is practical) as the real thing.
User avatar
PeterJ
Site Admin
Posts: 6966
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Is the NEXT an emulator?

Post by PeterJ »

akeley wrote: Sun Feb 21, 2021 8:31 pm This is sort of a bit more metaphysical issue.
Please note that the above is meant "in general" in regard to the entire FPGA scene and not particualrly aimed at the Next. This machine actually needed to be an FPGA because otherwise it'd be tricky (impossible?) to implement new features and make it really a "next" Spectrum.
Thank you. That is very clear. So are any of these FPGA devices 99% + accurate?
User avatar
Pegaz
Dynamite Dan
Posts: 1210
Joined: Mon Nov 13, 2017 1:44 pm

Re: Is the NEXT an emulator?

Post by Pegaz »

Well, as far as I've seen so far, Spectrum Kyp and azesmbog ZX-Uno Spectrum cores are certainly at that level, much like SpecEmu, SpecIde, Baremulator and a few other most accurate emulators.
I don't have MiSTer to compare, but I think its Spectrum core is also very accurate.
User avatar
PeterJ
Site Admin
Posts: 6966
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Is the NEXT an emulator?

Post by PeterJ »

Thanks [mention]Pegaz[/mention],

So there are there particular games that cause issues?
Sparky
Manic Miner
Posts: 611
Joined: Tue Dec 15, 2020 9:42 pm

Re: Is the NEXT an emulator?

Post by Sparky »

A metaphysical issue? Really?
:lol:
It's a glorified emulator as far as I can tell.
I read all about FPGA's, and yes, I see how they could be used in this century, but I'm not convinced this has been used to its full potential.
Maybe I am not "metaphysical" enough? :o
Alex
User avatar
PeterJ
Site Admin
Posts: 6966
Joined: Thu Nov 09, 2017 7:19 pm
Location: Surrey, UK

Re: Is the NEXT an emulator?

Post by PeterJ »

Sparky wrote: Sun Feb 21, 2021 9:27 pm It's a glorified emulator as far as I can tell.
You need to remember that as [mention]1024MAK[/mention] said, these are not just clones [mention]Sparky[/mention]. They offer extra features. Some find them useful, other not.
Sparky
Manic Miner
Posts: 611
Joined: Tue Dec 15, 2020 9:42 pm

Re: Is the NEXT an emulator?

Post by Sparky »

PeterJ wrote: Sun Feb 21, 2021 9:33 pm
Sparky wrote: Sun Feb 21, 2021 9:27 pm It's a glorified emulator as far as I can tell.
You need to remember that as @1024MAK said, these are not just clones @Sparky. They offer extra features. Some find them useful, other not.
Yes, I am just stating my opinion Peter. I am sure it is more than useful for others.
Alex
akeley
Dynamite Dan
Posts: 1108
Joined: Sat Feb 01, 2020 5:47 pm

Re: Is the NEXT an emulator?

Post by akeley »

Sparky wrote: Sun Feb 21, 2021 9:27 pm I read all about FPGA's
Not sure you really did read "all" about them, or perhaps it was a selective reading. Besides, personal experience usually beats reading.

Things like "feel" are very subjective, hence me saying (half-seriously) it's metaphysical. In ideal world FPGA implementation would be 1:1, as in, you could take it 100 years from now and use it to produce exactly the same physical hardware chip. In reality, replicating the whole logic is of course very difficult, time consuming and sometimes probably not entirely possible, hence some inaccuracies. This is important if you are looking for something bit more than emulation to replicate the "spirit" of the machine. It may not be important to you, but is to many other people who like to use original hardware.

Then there are things like 0-lag, snappiness, insta-boot time and occasionally greater accuracy. These are very quantifable and the reason why stating that FPGAs are just "glorified emulators" is perhaps somewhat unfair (to put it mildly).

[mention]PeterJ[/mention] it's really hard to say about 99% accuracy - I used it just to say that's probably what we can assume in regard to some cores, though real figure would be somewhere between 95-99. I suppose the 8-bit Big Four ones on MiSTer are close to that ideal. Amiga/ST are very solid too. Some others, like MSX, are "very good". It's really hard to find out though because that community is very touchy about such questions (which is rather silly, if you ask me). I don't know about any ZX games which wouldn't work, but it did fail some of the tests from this forum I did once. But most of these cores are still WIP, even if that's been going for years sometimes.

One metric is to look at github issues per core: ZX doesn't have any major ones atm. https://github.com/MiSTer-devel/Main_MiSTer/wiki
Sparky
Manic Miner
Posts: 611
Joined: Tue Dec 15, 2020 9:42 pm

Re: Is the NEXT an emulator?

Post by Sparky »

akeley wrote: Sun Feb 21, 2021 9:55 pm I read all about FPGA's
Not sure you really did read "all" about them, or perhaps it was a selective reading. Besides, personal experience usually beats reading.
[/quote]
I obviously could not have read all about them, my mistake.
Selective reading? Are you telling me, or are you stating the facts about your interpretation?
Agreed, personal experience is the final word.
At the end of the day, If people are happy with their experience and purchase, then cheers from me.
Alex
Post Reply