Author Topic: JavaCPC for Linux  (Read 2767 times)

0 Members and 1 Guest are viewing this topic.

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1014
  • Likes Given: 926
JavaCPC for Linux
« on: 16:04, 22 May 10 »
Hi together,
as I don't know exactly, what is bad when running JavaCPC on Linux, I am working on a test application now.
So I need your help to get it working.
Please download this test emulator:
http://cpc-live.com/webcpc.zip

How to use?
In Linux "open with" add command:
java -jar

Or complete launch command is java -jar WebCPC.jar

You can load DSK with double click into emulator window.

When this test emu starts up you are asked if you want to use Linux optimized code.

Please check both possibilites.

In lower right corner you can see how many FPS are drawn.

Please:
- Report me, which setting runs faster on Linux.
- Report how many FPS you have.
- Report all problems you encounter.
- Report if you can hear floppy drive sounds

« Last Edit: 16:12, 22 May 10 by Devilmarkus »
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

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.280
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1017
  • Likes Given: 2385
Re: JavaCPC for Linux
« Reply #1 on: 22:57, 22 May 10 »
Hallo Markus!



In my system (Dell Inspiron 9400) with Linux Mint 8, the program runs at 10-12 fps. It doesn't matter if it has filters on or off, it runs always at the same speed.


I can hear the drive sounds, and so far the only problem is (maybe due to low fps) some weird keyboard response.


Hope this helps, it would be nice to have a good CPC emulator in linux.  ;)

Offline nurgle

  • CPC6128
  • ****
  • Posts: 200
  • Country: de
    • index.php?action=treasury
  • Liked: 7
  • Likes Given: 12
Re: JavaCPC for Linux
« Reply #2 on: 02:28, 23 May 10 »
Finally a version with working sound. Thanks!

My System:
- AMD Athlon X2 5200+
- NVIDIA GeForce 7950 GT
- Creative Audigy 2
- Fedora 11 64bit with NVIDIA binary display drivers and pulseaudio
- SUN JDK 1.6.0_17 and OpenJDK 1.6.0.0-35.b18

Sound in WebCPC does not work with SUN JDK, but it does work with the OpenJDK from the Fedora repositories.

- Report me, which setting runs faster on Linux.
  Linux: yes
  - Report how many FPS you have.
  Linux yes: ~ 45 - 50
Linux no: ~25 - 30
  - Report all problems you encounter.
  See above. Does not work with SUN JDK. I suppose it's pulseaudio issue, nothing you can do anything about (probably).
  - Report if you can hear floppy drive sounds
yes.

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.023
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1189
  • Likes Given: 2414
Re: JavaCPC for Linux
« Reply #3 on: 09:25, 23 May 10 »
I'm running Ubuntu. Don't ask me about CPU and stuff.

FPS were the same regardless of the Linux yes/no setting, about 11 fps. But music playback in STarKos was slower when selecting No.
Yes, there were discdrive sounds.

I think I'm using SUN's JDK at the moment.

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1014
  • Likes Given: 926
Re: JavaCPC for Linux
« Reply #4 on: 13:25, 23 May 10 »
I also tested the emulator on my PC with Linux-live CD.
Intel P-IV 3ghz dual core,
2gb ram,
256mb nvidia Geforce 6800GT

I also had ~10-11 fp/s.
I had the same performance with both possibilities: Linux on or off.

I think this:
JEMU uses no double buffers. (Faster display but no way to show informations on screen)
JEMU uses a JComponent as Display, which cannot be double buffered in main class, but auto-updates.
WebCPC uses a JPanel which contains the display, which can be double buffered but is slower on non-optimized GFX drivers.
It also uses an alternative "update" void in main class. (called by a invisible JCheckBox, not the cleanest way, but was a solution to double buffer the display)

So I will try to rebuild the classic "display" which isn't double buffered.

About the performance itself (except of the fps): JEMU/JavaCPC have a auto-controlled frame-skip.
So when less fps, also the emulator cannot sync very properly.

I now am searching a way to draw the display in JEMU's way. IF this helps, I will code a choice between the methods.
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