I dusted off my old project to use LWJGL for rendering. It was actually quite easy (most work was to get the damn thing to work with web start). I renamed the project to JEmu2 (JEmu was the predecessor of CottAGE).

I expect problems on linux since I rely on being able to select 60Hz modes in order to use VSync. It might still work but probably not smooth or at the wrong speed.Mac will most likely have the LWJGL/WebStart issue, so Mac users must expect to be only be able to watch the attract mode (if it works at all).

Ms.Pacman should have sound , although it still suffers from the bad sound code (synchronization issues). Any exceptions or errors or something? On what hw is this?1943 has a soundchip that is not supported yet so that one shouldn't have sound.

The games all seem to run too fast on my laptop. Is it a refresh rate issue?

thanks!

Read at least the initial post completely.

Thanks!

However, enabling vsync is just a try and you can't tell if it's really on or off (ok you can with nvidia but you can't with ati or anything else). So check in your driver settings if vsync is set to "always off". If so, set it to "default off", "default on" or "always on" (basically everything else than "always off").

Under low cpu usage it performs equally well and under heavy cpu load it performs better [sync2(hz+1);].

edit:

It only makes a noticeable difference if the machine can deliver most of the frames in time (when it just meets your system requirements). Eg at 75hz and some load you get 72-73fps with the old method and with this one you get 75fps in most cases and sometimes 74fps.

I updated the emulator with proper speed throttling (thanks onyx & princec). Also, the sound code was updated. The sound is now almost 100% perfect (note that only mspacman and galaga have sound as for now).So let jws do its magic and update it for you

I throttle to the speed of the original arcade, which is 60Hz most of the time. When VSync is switched on too (which it is at startup) and your display runs at another frequency or something, I can imagine the fast-slow speed you describe.So press either F12 for the correct speed, or F11 for a smooth (if too slow) display.Maybe I need to set the default vsync/throttling settings based on the video mode being chosen...

I'll try to find another way to fix the sound. Sound is almost 100% perfect here, but apparently causing braindamage and pigs being slaughtered elsewhere . I tried to 'fix' the sound by putting a small sleep in the loop of the sound thread so that the main thread gets more time to regularly send sound commands to the sound thread. Maybe I need to make the sound thread sleep only if the buffer is sufficiently filled.

I updated the sound code and removed the multithreaded nature of it. It works much better now, for me anyway. I hope it doesn't cause braindamage now

Also, at startup vsync is enabled when a video mode could be selected with the same refresh rate of the original arcade. Otherwise, throttling is used (you can still use F11 and F12 to toggle vsync and throttling).Beware that the sound code now relies on the emulator running at the correct speed, otherwise buffer underruns might occur or more laggy sound.

wow - excellent!And may I just point *everybody* to Black Tiger - the only arcade game I could complete using 1 credit, and which also happens to be one of the best arcade games everNow if it only had sound...

All rendering is still done inside the CPU. Only the final frame is rendered using LWJGL, so there not really a speed gain I'm afraid.What I did gain is better timing and better display quality (getting a zoomed and filtered display for free).It should be possible to completely render everything using LWJGL, but that will require a large rewrite.

And yeah, Black Tiger is very cool but I can't get past one point where I have to get up on platform that I can't reach

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org