Welcome, Guest. Please login or register.


Author Topic: Double software emulation on a stock EP128 (Read 39084 times)

Offline kokkiklhs

  • Beginner
  • *
  • Posts: 49
  • Country: gr
Double software emulation on a stock EP128
« 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:

[ Guests cannot view attachments ]

"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
« Last Edit: 2021.January.05. 18:35:10 by kokkiklhs »

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14773
  • Country: hu
    • http://enterprise.iko.hu/
Re: Double software emulation on a stock EP128
« Reply #1 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 :-)
[ Guests cannot view attachments ] [ Guests cannot view attachments ] [ Guests cannot view attachments ]

Offline kokkiklhs

  • Beginner
  • *
  • Posts: 49
  • Country: gr
Re: Double software emulation on a stock EP128
« Reply #2 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:

Offline geco

  • EP addict
  • *
  • Posts: 7217
  • Country: hu
    • Támogató Támogató
Re: Double software emulation on a stock EP128
« Reply #3 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

Offline kokkiklhs

  • Beginner
  • *
  • Posts: 49
  • Country: gr
Re: Double software emulation on a stock EP128
« Reply #4 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

Offline geco

  • EP addict
  • *
  • Posts: 7217
  • Country: hu
    • Támogató Támogató
Re: Double software emulation on a stock EP128
« Reply #5 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.

Offline kokkiklhs

  • Beginner
  • *
  • Posts: 49
  • Country: gr
Re: Double software emulation on a stock EP128
« Reply #6 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!!!

Offline szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 10074
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: Double software emulation on a stock EP128
« Reply #7 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:
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Offline geco

  • EP addict
  • *
  • Posts: 7217
  • Country: hu
    • Támogató Támogató
Re: Double software emulation on a stock EP128
« Reply #8 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 )

Offline kokkiklhs

  • Beginner
  • *
  • Posts: 49
  • Country: gr
Re: Double software emulation on a stock EP128
« Reply #9 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, 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...

Offline geco

  • EP addict
  • *
  • Posts: 7217
  • Country: hu
    • Támogató Támogató
Re: Double software emulation on a stock EP128
« Reply #10 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.

Offline geco

  • EP addict
  • *
  • Posts: 7217
  • Country: hu
    • Támogató Támogató
Re: Double software emulation on a stock EP128
« Reply #11 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)

Offline kokkiklhs

  • Beginner
  • *
  • Posts: 49
  • Country: gr
Re: Double software emulation on a stock EP128
« Reply #12 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

Offline geco

  • EP addict
  • *
  • Posts: 7217
  • Country: hu
    • Támogató Támogató
Re: Double software emulation on a stock EP128
« Reply #13 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 ;-)

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14773
  • Country: hu
    • http://enterprise.iko.hu/
Re: Double software emulation on a stock EP128
« Reply #14 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...