Scrap the 50Hz, nobody uses it anyway...
Just sync the emulator to 64Hz, no problem with that. Audio can just be delayed one frame and everybody is happy
Just my 2 cents...I agree, just sync to 64Hz would be nice. Everybody prefer 60Hz than 50Hz, so 64Hz is almost ideal.
I guess that you guys know about the Goboy, a Gameboy Color emulator for the Series 60 as well... It was running pettry fine, just like the fMSX, only a few games slowdown... The developers (the guys from WildPalm) have released a new version, the version 1.3 of the emulator, that features sound in emulation. I haven't tested it because sound support is only for registred users, but the source code of the emulator is available from their page. Maybe that it could be interesting for you Jr.
This is the URL: www.wildpalm.co.uk/GoBoy7650.html
I had a look at Goboy and it seems they don't synchronize at all, at least in the provided source code all timing functions were empty. I think GB emulation does not need as much CPU power as MSX since their source code was not even using direct screen access but instead wasting a lot of time talking with the Symbian OS Window Server.
I also checked what the C64 emulator does for timing and also there in the source code you can find usleep() implementation which does nothing. Other than that it seems to use this 64Hz timer and treat it as a millisecond timer even if that's not what it provides. Oh well.
So no help there but I'll continue the work anyway...
Hi Jr! I'm a new MSX friend. I'm from Russia and I don't know english well (You see ).
Thank you for emulator Yamaha MSX. You - GENIUS! But You Can talk me about NES emulator for Series 60? Really do NES emulator/S60 or Not ? Thanks before you respond .
Thanks. Do you mean that you would like me to make a NES emulator or are you thinking about creating one yourself?
I had a look at Goboy and it seems they don't synchronize at all, at least in the provided source code all timing functions were empty. I think GB emulation does not need as much CPU power as MSX since their source code was not even using direct screen access but instead wasting a lot of time talking with the Symbian OS Window Server.
I also checked what the C64 emulator does for timing and also there in the source code you can find usleep() implementation which does nothing. Other than that it seems to use this 64Hz timer and treat it as a millisecond timer even if that's not what it provides. Oh well.
So no help there but I'll continue the work anyway... Well, as I said before, I think that 64Hz sync is good enough since everybody uses 60Hz. The interesting about these sources were the sound managing since this is the main difficulty of the emulator. Of course, emulate a Gameboy (even a Gameboy Color) requires much less CPU power than a complete MSX system. It is really weird that there is not direct access to sound hardware on Series 60... I think that there must be some workarround for this, but, well... Symbian devices are new ones and it will took time to the programers to discover "tricks"...
I disabled the 50Hz (PAL) mode for now. Syncing to the 64Hz timer with sound requires a few "tricks" as well because the system is running at the edge so to say but I already got it working on my 7650. I will test this on a 3650 as well to see that it also works on it. One funny thing (which I clarified already some time ago but still) is that the sound streaming API in Symbian OS 6.1 does not offer any means to specify the format in which the audio data is being handled so I basically had to try out different combinations to find the correct format...
So sound (PSG,SCC+) is working if you freeze the screen. I implemented a screen freeze toggle key to the emulator.
I know this is not good enough because you want to listen to sounds while playing. That is also possible, but at the moment this is too much for the system to handle and sound gets distorted => not nice to listen to.
I'll also try to implement a sound on/off toggle key so that you could listen to the music but disable it if you want to play and don't like the sound when it gets distorted.
So once again, I'm hoping to release v0.95 this week. Then you can see for yourself how much there is still left to optimize in the emulator to get sound working all the way =)
About the OS sound system in general -- in the new OS version that is in use in the 6600 phone there is direct access to the sound driver. No access to the sound hardware yet but at least it is a step in the right direction.
And in Goboy they seem to use a separate server process for their sound handling - well, that's one way to do it but also it wastes some CPU resources because they have to do task switching from their emulator to their sound server and after that to the OS sound server. In fMSX the middle step is skipped. Of course server processes can run at higher priority than UI apps but still I don't think it would make that much of a difference especially if you are not running anything else in the background while playing and because of the lost time in the task switching.
Jr, You are great programmer! And I think, you may make a NES emulator/Series60 also easy as fMSX! The Nes emulators for Windows or DOS writings on C++ a great ensemble! No nothing more simply that creating a NES/S60! But I Can't create, because I'm not programmer!
What abour also SEGA Genesis/S60 or Sega GameGear(Sega Master System) /S60 ?
That's a pity that the 3650/7650 phones aren't fast enough to emulate the sound perfectly..
well MSX is a powerful computer..
No access to the sound hardware yet but at least it is a step in the right direction.Guess they want to keep everything compatible as much as possible..
Is there any way to check how much CPU-time is still available (i.e. in idle-time)?
I'm just wondering how much time is wasted through all those the API-layers/servers.
So once again, I'm hoping to release v0.95 this week. Then you can see for yourself how much there is still left to optimize in the emulator to get sound working all the way =)I'm already looking forward to the new release!
And thanks again for your great effort!
Jr, You are great programmer! And I think, you may make a NES emulator/Series60 also easy as fMSX! The Nes emulators for Windows or DOS writings on C++ a great ensemble! No nothing more simply that creating a NES/S60! But I Can't create, because I'm not programmer!
What abour also SEGA Genesis/S60 or Sega GameGear(Sega Master System) /S60 ?
Thanks, 1eonid - I may have learned a thing or two along the way, I have worked for the gaming industry in the past for some years. But like everyone else, I have to work hard to produce things like this emulator. It's not too easy. And it's not just about the difficulty level, even easy things always take up time to implement.
I'm not thinking about starting other emulator projects at the moment, fMSX/S60 is taking up my development resources and systems like NES or Genesis are quite different from MSX so I would have to study them first. You see, even for fMSX/S60, I rewrote nearly 100% of the source code for the emulator -- of course using the original fMSX source code as a reference but still I had to understand how the system works. I had to do this because the original fMSX is written in C for Unix and some of the architectural decisions imposed by the emulator code were not applicable in Symbian OS.