CPC emulation added in-page for topics! 🕹️

Hello guys!

I’m happy to announced that I’ve implemented in-page emulation for posts that have relevant attachments!

I’ve used cpcjs which is a js port of Caprice32 RVMPlayer, no cartridge support though.

Things to keep in mind:

  • you can run it on dsk, cdt, sna and cartridge files (haven’t tried it with zip files containing images)
  • I think I’ve still got to work on joystick support
  • I don’t know how to “Press Play” when inserting a tape

Try it out!

Gryzor (E).dsk

Looks very nice!

As suggested on another thread, I’d give it a try at RVM player and do a poll to see what does people prefer.

I don’t know if it’s me, the game, the emulator or the browser, but I can’t get any sound.

I’m on my phone so I can’t check, but sounds definitely worked for me. Will check from my laptop later.

If there’s interest I could test switching to another emu, bit can’t have both at the same time to try out

Ok just tried it as a normal user, sound definitely works. But I’ll be glad to hear from others.

Into Oblivion (E).cdt (40.5 KB)

Tape loading - Finally I RTFM, F4 presses play :smiley:

Oh, glorious!

(also, neat that you can reply and the emulator still stays open and running)

What an absolutely glorious feature!

This adds a whole new dimension over what we had in the old forum.

[EDIT] I just had to try adding one of my games to this thread!

gf2.dsk

Yessss I love it so much myself! It’s something that was nearly impossible on the old forum, I’m really glad we managed to have it here!

Hmmm, that’s odd.

I added Goatfish 2 to my previous post.

RUN"GF2" does indeed load the game via a BASIC loader, but when the game itself loads up, there is no sound, and keyboard input doesn’t seem to work.

RUN"GF2.BIN" skips the BASIC loader and just runs the game binary. Sound works, as does keyboard input.

Wouldn’t that denote an emulation/loader issue? For me, however, run"GF2 works fine, both sound and keyboard

That’s very strange.

I’m running Firefox, if that makes a difference.

I shall try a different browser.

[EDIT] Nope, Edge shows the same behaviour (I don’t have Chrome installed).

Maybe it’s a Caprice issue?

Possibly. If you can try that image with the original Capreice32 we could verify…

Regarding the emulator not producing sound, for some weird reason, now it’s working but it sounds distorted.

I get the following message on the Chrome Dev Tools console, which may be related:
[Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (``https://bit.ly/audio-worklet``)

RVM Player works fine. You can try it here: https://amstrad.es/rvmplayer.php?file=hardest1.zip&emuonline=FREDDY

Hm, thanks for that. Indeed ScriptProcessorNode runs on the main UI thread and this, theoretically, causes buffer underruns (IRQ conflicts, anyone? :smiley: ). And also, the internal 44.1KHz has to be upsampled to 48KHz for the browser, which further introduces artefacts.

You’ve sent me down a rabbit hole, actually. I just pushed a slight modification causing the browser to output at the native 44.1KHz and doubled the buffer. Can you try it and let me know?

RVM looks neat, but it lacks the control that Caprice32 gives you when you press F1.

EDIT: nah my fix isn’t working. I’ll look into switching to RVM later today or tomorrow.


On the latest Vivaldi, it seems to work well enough with sound, that is, well enough for me to complete goatfish 2!

But if it’s using deprecated browser features then it might be best to try something different.

@Gryzor is it possible to send a “CAT” automatically once the player is loaded? (For disk images of course)

This is very odd indeed.

I just tried with Caprice32 4.6.0, and I get the same behaviour.

The BASIC loader runs, then the game is loaded, the main menu appears, but there is no sound, and no keypresses are recognised.

However, WinAPE and Cadence both work fine.

I will try to find a commercial game that uses a BASIC loader in a similar fashion.

[EDIT] I tried Jean-Marie’s fantastic version of Sly Spy with music added, as that also has a BASIC loader, though it is far more complex than mine.

And it also gets stuck after the game has loaded, not recognising keypresses!

WinAPE works fine.