News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Xyphoe

Spectrum emulator... on an Amstrad?

Started by Xyphoe, 08:13, 31 August 12

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xyphoe

Hopefully not a stupid question, but something that I've been wondering about for a while.

Years ago, I swear I saw a news article in Amstrad Action about a public domain utility and emulator that allowed you to play Spectrum games on the CPC. From even vaguer memories they noted it was only about 60% compatible with most games.

Maybe my memory is terrible, but even so I was wondering if it was possible or if something similar has been used before.

Playing Last Ninja 2 recently made me think ... it's identical to the Speccy version and slower. Now, of course - I know about Speccy ports and the code the porters have to write each time like on R-Type to make it work with the CPC's makeup, but then on the Last Ninja 2 title screen out came blaring the most hideous music ever - and its the Speccy's 'buzzer' music! On the CPC!?! I got thinking, have they taken the Speccy code lock n stock and used some kind of emulator they've written?

If such an emulator is possible it would be great to bring across to the CPC games that were on the Speccy that weren't on the Amstrad, or that had better versions of. I was thinking of this on the "Zombi" topic, the Amstrad version was the original one (yay!) and years later the Speccy port included vast improvements on the Amstrad original - making it technically the better game. But given the static nature of the game and no moving sprites, this would be an excellent candidate.

Sorry if this is all rubbish and not possible!!



TotO

We already got all the Speccy ports I though ?  :-\
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Xyphoe

Quote from: TotO on 08:21, 31 August 12
We already got all the Speccy ports I though ?  :-\

LOL!

But then as I said, compare the Amstrad and Speccy versions of Zombi.... :)

TotO

#3
Sure, I'm jocking. :D

An "easy" Spectrum emulator (more a wrapper here) will be to do the same as Speccy ports have done.
So, the most difficult part was to realy emulate the video display... And all programs may suffer of slowdown.
The AY chip will not sound the same too, because slower on CPC.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

arnoldemu

Quote from: Xyphoe on 08:13, 31 August 12
Hopefully not a stupid question, but something that I've been wondering about for a while.

Years ago, I swear I saw a news article in Amstrad Action about a public domain utility and emulator that allowed you to play Spectrum games on the CPC. From even vaguer memories they noted it was only about 60% compatible with most games.

Maybe my memory is terrible, but even so I was wondering if it was possible or if something similar has been used before.

Playing Last Ninja 2 recently made me think ... it's identical to the Speccy version and slower. Now, of course - I know about Speccy ports and the code the porters have to write each time like on R-Type to make it work with the CPC's makeup, but then on the Last Ninja 2 title screen out came blaring the most hideous music ever - and its the Speccy's 'buzzer' music! On the CPC!?! I got thinking, have they taken the Speccy code lock n stock and used some kind of emulator they've written?

If such an emulator is possible it would be great to bring across to the CPC games that were on the Speccy that weren't on the Amstrad, or that had better versions of. I was thinking of this on the "Zombi" topic, the Amstrad version was the original one (yay!) and years later the Speccy port included vast improvements on the Amstrad original - making it technically the better game. But given the static nature of the game and no moving sprites, this would be an excellent candidate.

Sorry if this is all rubbish and not possible!!
Are you referring to this:

ZXM - CPCWiki

From my experience, and I've converted one game from amstrad to spectrum, once you have your library of code functions, converting a game takes little time.

From Amstrad to Spectrum it takes more work, because you have to cope with narrower screen, colour clash and potentially different resolution (e.g. mode 0 to spectrum's).

Going back the other way from Spectrum to Amstrad is often a bit easier, with just reducing some gfx, and the appropiate code to draw it.

In terms of the Last Ninja, I think it uses the Ay's hardware register. It probably does some kind of simulation of the Spectrum's buzzer sound.

I'm not sure they used a spectrum emulator, I think more they developed some functions on cpc and spectrum, and just reused them over and over again without improving or updating them to get more out of the cpc.

Perhaps the cost just wasn't worth it for them?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

andycadley

They wouldn't have done it with an actual Spectrum emulator. Quite aside from the fact there would have been copyright issues with the Spectrum ROM (notwithstanding how many tape Speedloaders were based on a modified version of the loader in the Spectrum ROM!), but by the time you've got the ROM in place and reserved RAM for the CPC display file, you've basically only got enough room to emulate a 16K Spectrum (which is all ZXM can do).

It's much easier to have a handful of generic library routines that can be substituted to handle the machine dependent parts like drawing graphics etc. That does tend to cause things to aim a little bit more at the lowest common denominator though.

Xyphoe

Quote from: arnoldemu on 09:10, 31 August 12
Are you referring to this:

ZXM - CPCWiki


WOW! Yes!!! I wasn't going mad then!!
Thank you.

Have you or anyone else tried this out? I mean actually loading a Speccy game?

I see that it basically boots you into the Spectrum basic operating system as you would! I wonder how, on a PC via emulation you could feed in a .tzx or .tap format via WinApe. Any idea? Also any clue on what limitations it would have ... I take it already a large chunk of memory is already used up so we're looking at 48k only games?

Quote
In terms of the Last Ninja, I think it uses the Ay's hardware register. It probably does some kind of simulation of the Spectrum's buzzer sound.

Do you think? I think this must be only CPC game I know of that does! Why would they go to the trouble of writing something to simulate the buzzer sound? Might as well just got a freelancer to contribute some basic music for little money.

If you haven't booted up LAST NINJA 2 on the Amstrad trust me - the music is *identical* to the Speccy version! Unbelievable!



To add insult to injury on the LAST NINJA REMIX release - which is supposed to be LN2 with updated graphics and music - well the music is exactly the same! DOH!

Quote
I'm not sure they used a spectrum emulator, I think more they developed some functions on cpc and spectrum, and just reused them over and over again without improving or updating them to get more out of the cpc.

Yes I believe so now, the live emulation idea is a bit daft I had. Plus having recorded my longplay there are a few very minor differences - such as the code you find to enter into the safe which is different numbers.

Xyphoe

Quote from: andycadley on 00:12, 04 September 12
you've basically only got enough room to emulate a 16K Spectrum (which is all ZXM can do).

Ah that may have answered my above question. Do you think there'd be enough room to load a 48k Speccy game?

MacDeath

Last Ninja2 had no ZX 128 features ? :o

TFM

Here you can have the ROM version, Thanks to Devilmarkus for his request.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: Xyphoe on 17:31, 05 September 12
Ah that may have answered my above question. Do you think there'd be enough room to load a 48k Speccy game?
I think it will only run games that use pure spectrum basic, no pokes or assembler.
A lot of games would try to access the hardware directly to read keyboard, poke to the screen etc, and this will not work with the emulator.
Think of this more as a spectrum basic simulator.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

MacDeath

#11
Also, a ZX speccy48 or even Speccy128 emulator may be a bit difficult to run more compelx programs (with too much sound and video), but i guess a Sinclair ZX81 emulator could work just fine ?


The problem could also be that to do a more fine emulation, it would then run at almost half speed perhaps ?

andycadley

Quote from: Xyphoe on 17:31, 05 September 12
Ah that may have answered my above question. Do you think there'd be enough room to load a 48k Speccy game?

Not easily. The fundamental problem is that the Speccy 48K uses all 64K of address space (the first 16K being ROM). Whatever you do from an emulation point of view you have to be able to store all of the AND the 16K of memory for the "real" CPC screen display. Theoretically you could try and use some of the banked configuration of a 6128 to try and work around it I guess, but it'd not be easy.

Quote from: arnoldemu on 09:46, 06 September 12
I think it will only run games that use pure spectrum basic, no pokes or assembler.
A lot of games would try to access the hardware directly to read keyboard, poke to the screen etc, and this will not work with the emulator.
Think of this more as a spectrum basic simulator.

The architecture of the Spectrum meant that a lot of coders would just jump directly into random bits of the ROM for common routines (it saved memory and also the ROM isn't contended memory), so port collisions might be less of an issue even with m/c routines. I seem to recall that ZXAM does have the ability to update the Amstrad display based on what's in the RAM that would be the spectrums display file, but I can't imagine that's ever going to be a particularly speedy

andycadley

Quote from: MacDeath on 17:22, 06 September 12
Also, a ZX speccy48 or even Speccy128 emulator may be a bit difficult to run more compelx programs (with too much sound and video), but i guess a Sinclair ZX81 emulator could work just fine ?


The problem could also be that to do a more fine emulation, it would then run at almost half speed perhaps ?

Well the ZX81 did everything in Z80, even generating the video display, so you'd be able to claw back some of the potential CPU cycles that were used for that to handle the emulation aspect. And emulating the sound would be easier to, it never had any.  :laugh:

Xyphoe

Ah well.

I was kinda hoping and thinking that maybe we could use "ZXM" as a backend program to boot up and load Speccy games with a single command or something - a quick and dirty port - to allow us Amstrad owners to play Speccy games that never made it to the Amstrad. Maybe have it all wrapped up in a single .dsk that we could just load with a simple run"game.bas" - ie - that in the background loads up ZXM and without booting into the Speccy O/S prompt starts the Speccy game loading.

For example "Action Force II" believe it or not is an excellent game and I'd be more than happy with just a straight Speccy port of it! Or the aforementioned Zombi which would be a great candidate for conversion because the graphics and colours are basically the same and it's single screen with no real moving sprites - just 2 frames of animation on a zombie (stand + attack) ... on the CPC version NO zombie appears instead we get a little skull icon appear to signify that there is a zombie on the screen!

But never mind, it's never as simple as that is it!!

SyX

Sorry, i have been away the last week.  The LN2 music looks similar to my ports of zx beeper music, where i use the AY channel B volume register and only send 0 or 12 (it sounds better that using 15, the maximum volume).

Nich

Quote from: Xyphoe on 17:30, 05 September 12
Do you think? I think this must be only CPC game I know of that does! Why would they go to the trouble of writing something to simulate the buzzer sound? Might as well just got a freelancer to contribute some basic music for little money.
Last Ninja 2 was converted to the CPC by Mev Dinc (MD Software), and I know that a few of his other Spectrum-to-CPC conversions also emulate the Spectrum's beeper (e.g. Big Trouble in Little China, Knightmare, Prodigy, Super Hang-On).

I agree that the tunes in these games sound awful (Prodigy's 'music' is almost unlistenable!), but I guess Mev Dinc used this technique as the music could be ported directly to the CPC without having to be rewritten specifically for the AY chip (all the games mentioned above are blatant Spectrum ports).

The only other game I can think of that emulates the Spectrum's beeper is Kinetik, but it doesn't have any music.

Incidentally, does anyone (SyX, perhaps?) know how to emulate the beeper using the AY chip (e.g. what registers are used)? I tried to do it when I converted Jonathan Cauldwell's mini-game Area 51 to the CPC, but I couldn't work it out! :(

SyX

Quote from: Nich on 23:02, 11 September 12Incidentally, does anyone (SyX, perhaps?) know how to emulate the beeper using the AY chip (e.g. what registers are used)? I tried to do it when I converted Jonathan Cauldwell's mini-game Area 51 to the CPC, but I couldn't work it out! :(
Of course, Nich, as i said in my previos message, you only need to use one AY register, more exactly the "Channel B Amplitude" or AY Register 9.

Then when the speccy beeper routine send a 0 in the bit 4 of the port $FE (EAR), you need to send volume 0 to the AY R9; and when the speccy routine send a 1 for bit  4 of port $FE, you send the maximum volume to the AY R9 (as i said, instead of send 15, send 12 for not being too noisy).

You should modify the frequency of the notes from the 3,5MHz of the spectrum to the cpc frequency, but usually is not necessary ;)

MacDeath

#18
Anyway, wasn't LastNinja2 remade into last Ninja 2 Remix in order to give it proper cinematic pages and proper AY Music ?


Seems like emulating the speccy beeper was too much and got too many critics/shitstorm...


http://www.cpc-power.com/index.php?page=detail&num=1281

http://www.cpc-power.com/index.php?page=detail&num=1280

But perhaps the "Remix" version was Disk only ? obviously not even according to the manual.




Devilmarkus

Quote from: MacDeath on 13:24, 13 September 12
But perhaps the "Remix" version was Disk only ? obviously not even according to the manual.

Well, you can also download the original tape-images:
http://www.cpc-power.com/index.php?page=detail&onglet=dsk&num=1280
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

McKlain

The menu music is still the same beeping crap.

Xyphoe

Quote from: MacDeath on 13:24, 13 September 12
Anyway, wasn't LastNinja2 remade into last Ninja 2 Remix in order to give it proper cinematic pages and proper AY Music ?


Seems like emulating the speccy beeper was too much and got too many critics/shitstorm...


http://www.cpc-power.com/index.php?page=detail&num=1281

http://www.cpc-power.com/index.php?page=detail&num=1280

But perhaps the "Remix" version was Disk only ? obviously not even according to the manual.

Hi mate, sorry don't mean to make a cheap plug but I already did a video of Last Ninja Remix -



For the Amstrad versions - it is identical to Last Ninja 2 apart from a new intro sequence and the border graphics in the game has slightly changed. But that's it! As I said in the review - you would have thought in the 'remix' edition they would have redone the music!! I'm not 100% sure but on the Speccy version I think they had new music on the title screen before the start of each level, but again this has been ported to the Amstrad and the horrible buzzer emulated!

Powered by SMFPacks Menu Editor Mod