CPCWiki forum

General Category => Emulators => Topic started by: antoniovillena on 12:12, 04 May 11

Title: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 12:12, 04 May 11
Hello

I am the developper of this piece of shit:
http://roland.antoniovillena.es/ (http://roland.antoniovillena.es/)

This thread is for send me every crappy comment about the emulator, like:
"your shit doesn't work with game XXX"

I will also accept every scatological suggestion
:P
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 12:30, 04 May 11
Burnin' Rubber doesn't work...
What a piece of shi..
































Argglllllll!!!
Just joking ;)
Nice work!!! Keep going!
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: MacDeath on 14:47, 04 May 11
Don't no if serious.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: remax on 14:59, 04 May 11
Quote from: MacDeath on 14:47, 04 May 11
Don't no if serious.


Don't nderstan what you to mean.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: TFM on 19:48, 04 May 11
Aehm... can't see that much at the HP. However, if would be great if is would support expansion RAM and ROMs.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 21:40, 04 May 11
MacDeath, the post is a little sarcastic, but also is serious.

Devilmarcus, I found Burnin' Rubber DSK but... that is a CPC+ game, now I understand the joke. Sorry, I didn't have a CPC machine. I started learning in the world of CPC one month ago, for programming the emulator. I only have read technical documents, from cpcwiki.eu and from grimware.com. So my game knowledge is null, only remember games that were similar in spectrum (I owns a ZX Spectrum +2A).

TFM/FS, what does HP mean, Hewlet Packard? Expansion RAM is supported only up to 128Kb and in games that uses it (like Batman the Movie). So tell me the game that you want to see working and I will upgrade the machine for it. About ROM expansion, what of these ROMs http://www.cpcwiki.eu/index.php/Category:Expansion_ROM (http://www.cpcwiki.eu/index.php/Category:Expansion_ROM)
do you want to see?

Thank you everybody for the feedback
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: TFM on 21:50, 04 May 11
HP = Homepage  ;)

Well, to have expansion RAM would be great in general. 512 K is enought. If you can work with 128 k, the 512 k is nearly the same.

About ROMs, would be great to be able to add expansion ROMs.

However I must admit that I can't check out the emulator here at work, will do that later at home. So maybe I got a bit a wrong picture of it.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 08:49, 05 May 11
You did this in a month without ever having had a CPC? Wow, good work, mate...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 09:35, 05 May 11
Quote from: TFM/FS on 21:50, 04 May 11
HP = Homepage  ;)

Well, to have expansion RAM would be great in general. 512 K is enought. If you can work with 128 k, the 512 k is nearly the same.

About ROMs, would be great to be able to add expansion ROMs.

However I must admit that I can't check out the emulator here at work, will do that later at home. So maybe I got a bit a wrong picture of it.

Roland emulator has 2 ways for loading software. 1. Loads from the server, with the filename in the URL. 2. From your local storage, dragging a file into screen area.

The first option is targeted to non-experienced cpc-users, that doesn't have dsks or taps images in their hardrives. Also they don't know how to load the software: run", |cpm, so all this will be occur transparently.

The second one is for cpc-users. You can load a local file (like in cpcbox), but also must type the start command.

So I can put a 4th machine: 6128 with 512k. And you can load locally the dsk that you want. Also I can upload some software to the server that uses that expansion.

To add ROM I have this idea:
-You drag into emulator a 16k raw rom file.
-Emulator ask you from bank number: http://www.cpcwiki.eu/index.php/Upper_ROM_Bank_Number (http://www.cpcwiki.eu/index.php/Upper_ROM_Bank_Number)

What do you think?
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Ygdrazil on 09:42, 05 May 11

Great achievement  :)





Quote from: antoniovillena on 12:12, 04 May 11
Hello

I am the developper of this piece of shit:
http://roland.antoniovillena.es/ (http://roland.antoniovillena.es/)

This thread is for send me every crappy comment about the emulator, like:
"your shit doesn't work with game XXX"

I will also accept every scatological suggestion
:P
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 09:49, 05 May 11
Quote from: Gryzor on 08:49, 05 May 11
You did this in a month without ever having had a CPC? Wow, good work, mate...

Yes but starting with a good tested ZX Spectrum emulator. The jbacteria takes me more time. The hardest part of writting an emulator is the CPU core.

Emulators are simpler than people should think. But also are very difficult to debug, so you can write an emulator in a week, and spend months to fix all the bugs to make it stable.

Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: arnoldemu on 09:58, 05 May 11
Quote from: antoniovillena on 09:49, 05 May 11
Yes but starting with a good tested ZX Spectrum emulator. The jbacteria takes me more time. The hardest part of writting an emulator is the CPU core.

Emulators are simpler than people should think. But also are very difficult to debug, so you can write an emulator in a week, and spend months to fix all the bugs to make it stable.

I find the most difficult thing is the accuracy.
Some things are still being discovered about how the crtc, fdc etc work exactly.

The CPC is a lot more complex than the Spectrum, but I agree that writing an emulator is also about making a great CPU core etc

EDIT: Keep going. You are doing great.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 17:15, 05 May 11
Thank you everybody for the feedback.

Yes, accuracy is very difficult, but I don't pretend go to the limit. My target is to make most games playable. Cpcbox is (and will be) better in accuracy.

In ZX Spectrum AFAIK is possible perfect emulation (only recently) thank to that russian hacker that discover the MEMPTR register and Chris Smith http://www.zxdesign.info/book/ (http://www.zxdesign.info/book/)
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 21:48, 25 June 11

  Hi

  Roland has now sound emulation. Audio Data Api for Firefox 4+ and Web Audio Api for Chrome dev-channel (then enabled in about:flags).

http://roland.antoniovillena.es/ (http://roland.antoniovillena.es/)

  For embed the emulator in another web page, here is an example: http://antoniovillena.es/2011/05/roland-cpc-javascript (http://antoniovillena.es/2011/05/roland-cpc-javascript)

  Also you can play in a dedicated window, with links like:
http://roland.antoniovillena.es/6128?batmanth.dsk/run%22disc (http://roland.antoniovillena.es/6128?batmanth.dsk/run%22disc)
http://roland.antoniovillena.es/6128s?batmanth.dsk/run%22disc (http://roland.antoniovillena.es/6128s?batmanth.dsk/run%22disc)

  Regards
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 22:16, 25 June 11
Hi Antonio,
That's really great news!
The sound works fine and no stuttering on my system.
Just 1 little thing:
Could you try to playback the sound @ ca. 1 octave deeper?
It's too high...
;)
In rest, thats really cool!
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Phi2x on 22:20, 25 June 11
.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 23:42, 25 June 11
Quote from: phi2x on 22:20, 25 June 11
I just tried Roland with Batman The Movie on Firefox 5. Audio output works without sound cuts on my notebook. Really cool. 8)

The audio seems to be pitched too high though.
Perhaps are you emulating the AY chip with spectrum clocking (~1.7MHz)? The AY chip on CPC is only clocked at 1MHz. ;)

Thank you phi2x and Devilmarkus for the anotation.

The CPU runs 60.000 cycles every frame (at 50Hz), so before the divisor was 16. 60000/16= 3750 samples * 50 = 187500 samples/second
Now the divisor is 24, 60000/24= 2500 samples * 50= 125000 samples/second

In other words, the AY chip was clocked at 1.5Mhz and now runs at 1Mhz as phi2x suggested
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 23:53, 25 June 11
Yeahhh now it really rocks!  8)

Hmmmm Zynaps slows down the emulation to 28%?!?

But other games I checked work really fine! Cool!!!
Title: Re: Roland, no longer the worst Amstrad CPC emulator?
Post by: AMSDOS on 00:14, 26 June 11
Sound eh?? You should reconsider the name of this thread, I've only popped in a suggestion, other titles could be considered!  :)
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 00:47, 26 June 11
Quote from: Devilmarkus on 23:53, 25 June 11
Yeahhh now it really rocks!  8)

Hmmmm Zynaps slows down the emulation to 28%?!?

But other games I checked work really fine! Cool!!!


I suggest you to try the other render version. Click at "SLOW RENDER" in upper-rigth corner in the game list.
Title: Re: Roland, a javascript CPC emulator, NOW WITH SOUND
Post by: antoniovillena on 00:49, 26 June 11
Quote from: CP/M User on 00:14, 26 June 11
Sound eh?? You should reconsider the name of this thread, I've only popped in a suggestion, other titles could be considered!  :)


Sorry, I have opened an old thread, when I created the emulator. The title is changed.
Title: Re: Roland, a javascript CPC emulator, NOW WITH SOUND
Post by: AMSDOS on 01:12, 26 June 11
Quote from: antoniovillena on 00:49, 26 June 11

Sorry, I have opened an old thread, when I created the emulator. The title is changed.


Perfectly fine by me, cause I'm a fan when it comes down to using Old Threads!  :D  I like the new title too!  :)
Title: Re: Roland, now with a HUGE DATABASE
Post by: antoniovillena on 10:35, 28 July 11

  Hello

  I have updated the emulator with the next changes:

-More accurate emulation. Now I am using the correct Z80 timings for CPC (before it was emulated spectrum timing).
-Bugfix in OUTD (OUTI, OTIR, OTDR) instruction that causes bad sound in some games like 1943.


  And the most important think, thanks to Mauricio, Litos and Raúl now you can play it with a HUGE DATABASE of 3600 games. Load screen, in-game screen and inlays are available for each game.

  http://amstradcpc.es/emulador/ (http://amstradcpc.es/emulador/)
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 07:25, 05 August 11
This is an excellent effort... wow!
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Sykobee (Briggsy) on 22:37, 05 August 11
Great stuff! Works great.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 18:29, 21 September 11
Now you can record games with Roland, look at these examples:

http://roland.antoniovillena.es/464s?TnmT0w.rec (http://roland.antoniovillena.es/464s?TnmT0w.rec)
http://amstradcpc.es/emulador/464.html?TnocxQ.rec (http://amstradcpc.es/emulador/464.html?TnocxQ.rec)

As easy as pressing F6 when you end your game
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 19:07, 21 September 11
Heeey, this is pretty neat!

I always wondered, how is this done?
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 20:35, 21 September 11
Quote from: Gryzor on 19:07, 21 September 11
Heeey, this is pretty neat!

I always wondered, how is this done?


The recordings are made with the emulator itself. Just launch a game (from roland.antoniovillena.es or amstradcpc.es) and press F6 key when finish. You can interrupt the playback with F3, or go to the end of the playback with F4, and then, continue playing.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 08:13, 22 September 11
Well, yes, I gathered that much, but *how* does the emulator do it? How does it record it?

One way to do it in other emulators is to record input, but this doesn't work in non-predetermined games...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 10:32, 22 September 11
Quote from: Gryzor on 08:13, 22 September 11
Well, yes, I gathered that much, but *how* does the emulator do it? How does it record it?

One way to do it in other emulators is to record input, but this doesn't work in non-predetermined games...

Why not?
When the timing is 100% accurate, also "random values" are the same!

Sadly the VSync in JavaCPC seem to be not 100% accurate...
Recordings get out of sync after a while... :(
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 10:34, 22 September 11
Maybe I don't understand something about how games are modified at launch.

If you get a game where the enemies are found in random positions with each new game, or where the items are in random rooms etc. etc, what good would input recording do?
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 10:36, 22 September 11
Well, random numbers are generated in Z80.
A recording looks like this:
- Take a SNA snapshot
- keep this snapshot in memory
- record keyboard input
- When done, save SNA with attached keyboard inputs.

The random values so are always the same!
(You can try in BASIC! When you print a random number with a "RANDOMIZE xxx" before, the random numbers are always the same after a RUN)
So a SNA also does a kind like "RANDOMIZE" when loaded...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 10:38, 22 September 11
Ah, yeah, I thought of the snapshot thing, but I thought I can't be that clever - so it must be something else :D

Ok, simpler than I thought then. Thanks!
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Phi2x on 10:51, 22 September 11
.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 10:54, 22 September 11
Yeah, I guess this makes sense: determine the initial conditions and you're all set...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 12:41, 22 September 11
Yes, the key is that all in a computer is deterministic. If you save the state of a machine and record exactly all the input (keystrokes and mouse events), then you will show the same results in the output (screen and audio)

As Devilmarkus says, the emulator must be accurate to work with other emulators recordings (there is a SNP format). If JavaCPC fails in VSYNC, probably Roland fails in other stuff. So it uses their own recording format.

As phi2x says, Roland uses TAPs and DSKs in normal cases. Also there is a special case (for example if you want to record only the second level of a game) where you can use also SNAs.

So Gryzor, there is not any secret in input recording. The only change in the emulator is that now I sample the keystate every frame (because keystrokes are recorded in frame units, 20ms). Not necesary if you use CPU cycles as time unit.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 13:07, 22 September 11
Quote from: antoniovillena on 12:41, 22 September 11
Not necesary if you use CPU cycles as time unit.

I also tried with CPU cycles!
There's still a sync problem with!
Funny:
When I just change a bit of the code it already causes these problems!
I mean: Use the same code but with different variable names for example!

And that's really strange....
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Phi2x on 13:30, 22 September 11
.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 14:03, 22 September 11
Quote from: phi2x on 13:30, 22 September 11
So, would it be a desirable feature to have for a CPC emulator?
Would it help us enjoy insanely difficult games? Or would it spoil all the fun?

You can do rollback in Roland (with F3 and F4). Then if you save the gameplay, you will
see the perfect playgame (the mistakes were deleted in the recording).

Yes, It's not exactly the REWIND feature, but running backwards an emulator is a very difficult task. You must save a log with past values in not reverseable instructions (like ld bc,0). Also the reverseable instructions (like add a, b) must log some flags.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Phi2x on 14:29, 22 September 11
.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Phi2x on 14:48, 22 September 11
.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 15:21, 22 September 11
Holy frak, rewinding is fantastic!!!! I want it for the CPC emulators now...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 15:41, 22 September 11
Quote from: phi2x on 14:48, 22 September 11
Thinking about it a bit more, differential snapshots are not that practical because you have to process every differential since the first one to extract that snapshot when you'll want to rewind. So, it will be very heavy on the CPU.
It's like video encoding in a way. What they do in video encoders is storing keyframes at regular intervals between differential frames.
So, it would be a mix of full snapshots (every 10 frames?) and differential ones.

Let's do the math again:
full snapshots : 128KB * 5 frames * 30 seconds = 19200KB
+ differential snapshots: 8KB * 45 frames * 30 seconds = 10800KB

19200KB + 10800KB = 30000KB = 30MB

Still a bargain  :) ... but more complex than I thought!

Another solution is saving full snaspshots every, for example, 5 seconds. If you rewind 2 seconds, and for example the last snapshot is saved 3 second back, you only have to emulate 1 second forwards to extract the correct snapshot. The worst case is to emulate 5 seconds forward but it's easy because you don't have to do in real time (cpu can be full throtle) and to show anything to screen or buffer sound.

The other question is that you must log a circular buffer every frame of last 5 seconds (or the time you want to rewind) to show the user the illusion of the rewind. But in this case you only must save the video screen (16Kb each frame).

So redoing the calcs, you need: 128K * 1/5 * 30 seconds= 768k
For video buffer: 16K * 50frames/second * 5 seconds= 4Mb (video buffer is the same indepently on recording duration)

I have made a recording of a difficult game (with rollback of course) here:

http://amstradcpc.es/emulador/664.html?TntBgA.rec (http://amstradcpc.es/emulador/664.html?TntBgA.rec)




Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 16:57, 22 September 11

In this link you can view the recorded gameplays, only the ones in that players fill user & comment field.

http://amstradcpc.es/emulador/partidas.php (http://amstradcpc.es/emulador/partidas.php)
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: RockRiver on 12:05, 07 December 11
Quote from: antoniovillena on 21:40, 04 May 11
I owns a ZX Spectrum +2A)
Thanks for your work!!! mate.
I recommend to you to acquire a +3 [disquette support compatible PCW and CPC] and then a 6128. These are two of my favorites retro-compus. HcX compatible too ;-)
Or study the great emus that support that... in +3 side I like so much RealSpectrum with "real"disquette reading like WinAPE. This make easy sharing software within my real and virtual machines.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Mochilote on 19:38, 29 December 11
Roland running at 9x% on iphone 4 (IOS 5.0.1):



(http://i41.tinypic.com/oiu4wo.png)
(http://i42.tinypic.com/2i8fb5u.png)


it's a shame that can not be used because they have no on-screen keyboard... :D
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 10:07, 07 February 12
Hmmm unfortunately the % doesn't show up on my Android browser... impressive though!
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 22:08, 16 February 12
I have seen this page:
http://seb.ly/2011/04/multi-touch-game-controller-in-javascripthtml5-for-ipad/ (http://seb.ly/2011/04/multi-touch-game-controller-in-javascripthtml5-for-ipad/)


So it's possible to map the joystick by clicking in the border. I have not Android or IOS mobile, so I can't try, but it's a good suggestion for the next version of Roland.



   |       |
---|-------|---
U |       |
D |       |
---|-------|---
F |  L  R |



  Sorry the ugly Ascii, so I propose these locations for UP, DOWN, LEFT, RIGHT and FIRE.


  Another question, is all the keyboard mapped in these devices or i need remap some keys (or adding touch support)?
-----
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: antoniovillena on 23:25, 05 June 14
Updated emulator


Roland, probably the worst Amstrad CPC emulator (http://roland.retrolandia.net/)


Because it lacks of sound in latest versions of Firefox. Now I have ported the Firefox code to Web Audio Api and works well.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Zoe Robinson on 19:08, 20 June 14
Quote from: antoniovillena on 23:25, 05 June 14
Updated emulator


Thank you for removing any chance of me getting any work done today. :)


*goes back to playing Silkworm on your website*
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 19:36, 21 June 14
Ah, just played some Silkwork myself. What a great game!
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Lazy Dude on 20:08, 21 June 14
why the hell did I not see this thread before!
nice emulator, such a shame my tablet pc at work has died, still its a good enough reason to get me a new one :)
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Carnivius on 20:13, 21 June 14
Yeah, Silkworm ain't bad on CPC.   I do wish it could have had some backgrounds though.   Used to play the Amiga version in 2 player at my friend's house a lot before I owned an Amiga myself so I bought the CPC version and it kept me entertained til I eventually did get an A1200 and the Amiga Silkworm.   CPC version lacks the extremely punchy sound effects (I loved those sounds on the Amiga version) but does alright and it does do a good attempt at the funky theme tune.  Plays well despite the somewhat more cramped play area too. 
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 17:05, 22 June 14
Thanks for the comment, will try it on the Amiga... Can you control both vehicles with one player?
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 17:12, 22 June 14
Quote from: Gryzor on 17:05, 22 June 14
Thanks for the comment, will try it on the Amiga... Can you control both vehicles with one player?

Depends on your fingers:

When you can move & handle your left hand totally different and independently to your right hand: Why not?
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 17:28, 22 June 14
So, the answer is no I guess; I meant using the same controls for both...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Devilmarkus on 19:19, 22 June 14
I mean to remember, that this works, too with the Amiga version...
Or you can re-define the controls so that both use the same...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Neil79 on 19:43, 22 June 14
I tried Ami-CPC on the Amiga and it's dog *** slow  >:( :'(
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Carnivius on 22:00, 22 June 14
Quote from: Gryzor on 17:05, 22 June 14
Thanks for the comment, will try it on the Amiga... Can you control both vehicles with one player?

At the same time?  The vehicles do not play the same way so that wouldn't work well anyway.  Not like UN Squadron where you end up with double fire power cos both players are in jets.    The beauty of Silkworm is 2 players helping each other out with the advantages and disadvantages of the two vehicles.   I always enjoyed the jeep cos it was charming and gave the game a more unique feel to most shooters and my friend would provide air support with the chopper while I would often watch his back by aiming the jeep's gun behind the chopper when needed.
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Gryzor on 18:25, 23 June 14
Nah, actually the beauty of SW lies in the ability to control both vehicles at the same time at a very efficient and manageable way; yes, they don't play the same but it's extremely doable, and that's how I always played (and finished) it...
Title: Re: Roland, probably the worst Amstrad CPC emulator
Post by: Carnivius on 23:05, 23 June 14
If you say so.  Seems a bit of a waste to me.
Powered by SMFPacks Menu Editor Mod