News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

.

Started by Phi2x, 18:49, 09 September 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Phi2x

#50
.

Phi2x

#51
.

Phi2x

#52
.

Grim

I'm using Opera on a 6yo laptop here, and it works quite nicely for what it is (~17fps).

Devilmarkus

Quote from: phi2x on 13:54, 07 October 10All I do is pushing the canvas every time I finished rendering a frame and the rest is automagically taken care of by the browser.

So simple:
Add code, which prevents a "update image" until previous image has not been painted.
(I mean: Also don't do a internal vsync/gatearray render update until last paint hasn't finished yet)
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

Phi2x

#55
.

Gryzor

Finally got to try  the last version.

Athlon II 635 @2.9GHz,
Windows 7 Ultimate 64x,
Opera 10.70.34.77

Seems to be working with no issues at 40fps with tons of other windows open. Now waiting for sound implementation... ;)

Phi2x

#57
.

Gryzor

But, wait, I thought that there are HTML-based video players that also play audio?

Otherwise, I find it strange that they'd design something as powerful as this without any sound support...?

andycadley

Quote from: Gryzor on 08:42, 18 October 10
But, wait, I thought that there are HTML-based video players that also play audio?
The HTML5 video tag will let you play back videos with audio, but it's a whole different kettle of fish if you want to generate audio programmatically

robcfg

#60
It shouldn't be that different.


You have to decode the audio stream of the video file somewhere. And that place is the same where you should have to put your programatically created audio data.


Edit: The "Media" interface from which the "Audio" object inherits seems to have a nice set of functions for controlling the media and its rendering. I don't now if it's a must to write a codec for the media type or you can do it on the fly.

Phi2x

#61
.

robcfg

Do you know if there is some kind of communication between the codec and the HTML5 code running?


If some info could be sent to the codec, it would appear to the browser like a streamed file but under control of the code.


Of course it's only a crazy idea, but It seems too odd for me that you can make palette rotation in an image canvas and not something similar for audio...

Phi2x

#63
.

Devilmarkus

Another problem I see here is:
The emulator does not run with 100% speed!
So a probably emulated sound would make a crap output.
Sad, the timing does not depend much on painting the image, because if not, phi2x could simply skip 3 frames and have less fps but faster emulation.
(Add manual frameskip could be a solution with radiocheckboxes to choose how many frames should be skipped)

But until the emu does not reach 100% speed it also makes not much sense to emulate sound.
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

Phi2x

#65
.

Devilmarkus

Quote from: phi2x on 18:21, 18 October 10
And that's not even mentioning the fact that, due to the added computations, AY sound emulation would slowdown CPCBox even more  :(

Well, only a 1mhz device more to emulate  :P
(But I think you already emulate it partially to enable keyboard input)
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

robcfg

I think you can play an audio file within the audio tag with a different speed, that would made it work like a tracker (in  some way).


Could it be possible to use a sample of a square wave and play it looped altering the volume and pitch to match the desired sound?

Phi2x

#68
.

robcfg

Ok, it's a bit of a  longshot but the theory is sound, hehehe  :P


Maybe I'll be trying it just for curiosity... maybe...

Devilmarkus

A YM player is simple to code  8)
It only took me 1-2 hours to get some sound of the AY-emulation from JavaCPC (JEMU).
Then another 1-2 days to build the GUI and improve some things...
You only need is:
- AY emulation
- Timers
- PPI emulation + IO
- some crap
- and a few cans of coffee
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

Phi2x

#71
.

Phi2x

#72
.

Gryzor

So I can now play at full speed on my netbook?? ;)

Phi2x

#74
.

Powered by SMFPacks Menu Editor Mod