Enterprise Forever

:UK => Emulators => Topic started by: kokkiklhs on 2021.January.05. 18:26:46

Title: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.05. 18:26:46
Hey, I was playing around with my EP128 during the Christmas holiday and I had a rather silly idea, which appeared to be interesting, at the end...
Have a look at this:

[attachimg=1]

"Yeah, big deal", I hear you say...
But wait!!! This is NOT the ZX81emu emulator by geco running MAZOGS on the Enterprise... :roll:
...it's the excellent SpEmu by geco, running the also excellent ZX81 emulator for the Spectrum by dr.beep (Johan Koelman), which runs MAZOGS!!! :ds_icon_cheesygrin:

I'm not sure if someone else had tried this so far, at least I didn't find it posted somewhere! It was big fun doing this, just because it could be done!!! ;)

Reporting my impressions out of this test:
Well, the EP128 already runs as a Spectrum at a little lower speed, let's say 85-90%. The ZX81 emu by dr.beep also runs a little slower on a real Spectrum, so on the EP128 I assume that we have here a speed of about 65-70% of a real Zeddy. But this is quite reasonable and usable, we can play games at this speed, it's not dead-slow...

Two major caveats:
a) Only the first (1.0) version of dr.beep's Zeddy emu will load Zeddy games converted to TAP... The recent, improved 2.0 version loads fine on the EP128, but it always freezes on the header section (bytes:filename), when trying to load Zeddy games on the EP128. This doesn't happen on real Spectrum or the 2.0 Zeddy emu running under a Windoze Speccy emu, like Spectaculator (the one I'm using on my laptop...)
b) On a real Spectrum or on a Windoze Spectrum emulator, both versions of dr.beep's Zeddy emu have a rather high compatibility rate, let's say that almost 7-8 out of 10 "normal" lo-res games will run fine. On the EP128 with the trick I tried, I was able to successfully play, let's say 3-4 out of 10 Zeddy proggies... Many of them are loading fine but they e.g. freeze/crash on the starting screen. Most recent games like the ones from Bob Smith will not run properly.
But hey, 3D Monster Maze, La Pulga, Mazogs, Gauntlet, which are some of my all time favorites, run just fine, of course slower, as I mentioned above!!

Cool!! And it's software-only!!!!
:smt023
Title: Re: Double software emulation on a stock EP128
Post by: Zozosoft on 2021.January.05. 18:41:36
Nice! :smt038

Many years ago tried it: in a ep128emu emulated Enterprise machine used emulated hardware Spectrum Emulator card running ZX81 emulator :-)
[attach=1][attach=2][attach=3]
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.05. 19:18:18
Nice! :smt038

Many years ago tried it: in a ep128emu emulated Enterprise machine used emulated hardware Spectrum Emulator card running ZX81 emulator :-)
(Attachment Link) (Attachment Link) (Attachment Link)

Ooooh, there's ALWAYS someone who had our good ideas before we did!!!
:bow:
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.05. 19:38:36
The problem can be caused by spemu, because it is not a real emulator, it convert speccy programs after loading, and patches the interrupt of the loaded programs also that's why menu can be called anytime, if a game does not use interrupts, i put menu call code into keyboard emulation also :-D
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.05. 20:22:32
The problem can be caused by spemu, because it is not a real emulator, it convert speccy programs after loading, and patches the interrupt of the loaded programs also that's why menu can be called anytime, if a game does not use interrupts, i put menu call code into keyboard emulation also :-D

There isn't a "problem", I think it's just amazing that one emulator loads through another, I could never expect to see such a thing on a plain, stock 8-bit machine! The EP is very powerful machine, shame it didn't get the proper attention back in its time...
But the most important is your coding, just amazing!!! I wanted to thank you and congratulate you from the first moment I saw SpEmu, so now it's my chance:
THANKS and CONGRATS, geco!!! You rock!!!
:smt041
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.05. 21:57:02
thank you very much :-) it is nothing special, just i got some good ideas to my mind, there were modified Speccy ROM's on EP from the eighties, which worked well, just machine code programs did not run, because almost all programs used the HW ports, not ROM calls, and tried to "emulate" them too.
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.05. 22:49:26
thank you very much :-) it is nothing special, just i got some good ideas to my mind, there were modified Speccy ROM's on EP from the eighties, which worked well, just machine code programs did not run, because almost all programs used the HW ports, not ROM calls, and tried to "emulate" them too.
...and you succeeded very well!!
:cool:
In fact I've been able to play many of my favorite games with SpEmu, I didn't expect it to work THAT good!!! So according to what you explain here, the software emulator must have been better than the hardware one! Amazing!!! The other thing I love sooooo much about SpEmu is that it loads directly from tape, no images, snapshots, nothing! You can just play an old original or copied REAL cassette and load your games like on real Speccy, very cool!!!
Title: Re: Double software emulation on a stock EP128
Post by: szipucsu on 2021.January.06. 11:56:52
The most unusual would be to run a Windows emulator on Linux. On the Windows emulator run EP128emu. Here you can run the Spectrum emulator, then ZX81 emulator. :ds_icon_cheesygrin:
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.06. 14:31:20
So according to what you explain here, the software emulator must have been better than the hardware one! Amazing!!!
It is, probably it's compatibility is lower than the HW emulator with new ROM, but it is faster if bigger amount of attirbutes are changed on the screen, and it does not slow down when the program has high beeper activity ( because OUT (0feh),a instruction is changed to OUT (0a7h),a :D :D :D )
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.06. 18:14:33
The most unusual would be to run a Windows emulator on Linux. On the Windows emulator run EP128emu. Here you can run the Spectrum emulator, then ZX81 emulator. :ds_icon_cheesygrin:
Yes, this will be the ULTIMATE emulating experience, until someone writes a ZX80 or ENIAC emulator for the ZX81!!! :mrgreen:
It could be EVEN more complicated, there is a Spectrum emulator for the Amstrad CPC (http://www.cpcwiki.eu/index.php/ZXM), so the Spectrum could run on the EP under geco's Amstrad emulator!!! :smt033
I'm not sure if this ZXM thing could run the Zeddy emulator of dr.beep correctly, I haven't tried it...

It is, probably it's compatibility is lower than the HW emulator with new ROM, but it is faster if bigger amount of attirbutes are changed on the screen, and it does not slow down when the program has high beeper activity ( because OUT (0feh),a instruction is changed to OUT (0a7h),a :D :D :D )
It's perfect, really perfect for a software-only emulator!!! No other 8-bit machine has such a good Spectrum emulator!! But how about the Amstrad CPC? If you take a look at ZXM mentioned above, it says it's for BASIC only, I haven't tested it though... It surprises me that nobody tried to create a Speccy emulator as good as yours on the CPC, I believe it could be done on an 6128...
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.06. 20:52:13
it is impossible to write so fast Speccy emulator on CPC like SpEmu, because CPC does not have attribute mode, and does not have LPT, so if it could be done in 2 or 4 colour mode , then Speccy addressing should converted also, which i think nearly impossible to create a good algorythm to find out all writes to video memory, and convert all routines, one way is possible, convert the whole speccy screen, but in this case all 6912 bytes have to be converted on CPC, SpEmu converts only 768 bytes of attributes in 3 frames by default, it can be changed.
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.06. 20:56:12
As i see ZXM works the same like old Ep software Speccy emulators, only basic programs run on it, except those machine code programs which use only ROM calls (CPCEmu works in the same way)
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.06. 21:28:24
it is impossible to write so fast Speccy emulator on CPC like SpEmu, because CPC does not have attribute mode, and does not have LPT, so if it could be done in 2 or 4 colour mode , then Speccy addressing should converted also, which i think nearly impossible to create a good algorythm to find out all writes to video memory, and convert all routines, one way is possible, convert the whole speccy screen, but in this case all 6912 bytes have to be converted on CPC, SpEmu converts only 768 bytes of attributes in 3 frames by default, it can be changed.

Oh, I forgot this 4-color limitation with CPC medium res... Yes, screen conversion would be slow and ugly... Enteprise WINS!!!

As i see ZXM works the same like old Ep software Speccy emulators, only basic programs run on it, except those machine code programs which use only ROM calls (CPCEmu works in the same way)

Yes, but with CPCEmu I was able to play my favorites Sir Lancelot and Fruity Frank in reasonable speed!! ;)
I have to try the ZXM on my real CPC, I got curious now! :D
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.06. 21:35:35
Yes, because there are some (about 5-10% ) CPC programs, which uses only ROM calls :-D There is nearly no Speccy programs which uses only ROM calls ;-)
Title: Re: Double software emulation on a stock EP128
Post by: Zozosoft on 2021.January.06. 21:57:35
There is nearly no Speccy programs which uses only ROM calls ;-)
Pogo do it. But have a many bugs which are write to the ROM...
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.06. 22:00:01
Sorry, i forgot about ROM writing Speccy programs, there are quite lot.
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.06. 22:00:46
Yes, because there are some (about 5-10% ) CPC programs, which uses only ROM calls :-D There is nearly no Speccy programs which uses only ROM calls ;-)

I see!! I will test ZXM with some "lightweight" favorite games of mine, like "Gangsters!", "Stock Market" and "Dictator", to see what happens... These are mostly BASIC proggies, with little/no code included!
I am not sure if ZXM will load on CPCEmu, though... We will find out in the next days!!
If it loads successfully I will take another photo of the EP running a Spectrum game through CPC emulation!!! :D

P.S. I also tried to run "20 Commodes" (the VIC emulator) and Videopac emulator on SPEmu, but they didn't load properly... I guess I was lucky with dr.beep's ZX81 emulator, which runs very-very well!!!
Of course your ZX81emu running "natively" on the EP is faster and more compatible, but I did the double emulation just for fun!
;)
Title: Re: Double software emulation on a stock EP128
Post by: geco on 2021.January.06. 22:16:19
There could be more reasons of problem, Spemu checking byte patterns after or before OUT or IN instructions, probably those programs have different byte patterns before or after, other ptoblem is ROM writing, what is used by several Speccy programs ( this can be solved by ROM version of SpEmu), other possible problem is finding things about IM2 interrupt, and probably there is more, just i got to my mind the above mentioned :-D
I got another thing, Nirvana and other programs which are using similar attr refresh method do not work either
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.07. 11:20:40
There could be more reasons of problem, Spemu checking byte patterns after or before OUT or IN instructions, probably those programs have different byte patterns before or after, other ptoblem is ROM writing, what is used by several Speccy programs ( this can be solved by ROM version of SpEmu), other possible problem is finding things about IM2 interrupt, and probably there is more, just i got to my mind the above mentioned :-D
I got another thing, Nirvana and other programs which are using similar attr refresh method do not work either

Oh, these are details that only programmers can understand, I am just a simple user!!
:oops:
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2021.January.07. 22:59:02
I am not sure if ZXM will load on CPCEmu, though... We will find out in the next days!!

So now quoting my own previous words, I am reporting that the attempt to load ZXM on CPEmu was a disaster... :cry:
ZXM is a disk-only program with some hidden data, so I couldn't extract the files, to be able to load them as sound on the EP...

But even if I could do that, I realized that ZXM loads and saves from and to disk only, no tape support at all, so it wouldn't be possible to load any spectrum software without having a disk drive (which I don't)...
So this second idea of mine is totally useless...
Title: Re: Double software emulation on a stock EP128
Post by: kokkiklhs on 2023.June.02. 19:01:42
Opening again this old thread, I'd like to inform anyone interested that Johan "dr beep" Koelman, who is active mostly in the "sinclairzxworld" ZX81 forum has compiled an even more accurate 2.16 version of his emulator on the spectrum and is also working on a ZX80 (!!!) emulator for Spectrum!

I find this impressive and I am looking forward to presenting you here a ZX80 emulated through the fabulous Spemu by geco running on a real EP128!
:cool: