News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

JavaCPC Desktop 1.0 official release

Started by Devilmarkus, 11:05, 14 August 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

JavaCPC update 2.9e is available.

Changelog:
- Hotfix in tape emulation, removed a bug, which caused a division by zero in some cases.
- RAM-ROM management rewritten. The emulator doesnt define a new CPC after each ROM change. Just changes the roms, and thats it.
- Added a nice startmenu to "AMSTRAD" logo, when used as Desktop.
- Small resetbutton added to emulator window.
- few GUI improvements for BDD databases. (You now can also search for a game)

Download:
http://sourceforge.net/projects/javacpc

or:
http://cpc-live.com/download.php?view.2

or check for available updates in JavaCPC
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

kilon

Quote from: Devilmarkus on 09:54, 12 March 15
JavaCPC update 2.9e is available.

Changelog:
- Hotfix in tape emulation, removed a bug, which caused a division by zero in some cases.
- RAM-ROM management rewritten. The emulator doesnt define a new CPC after each ROM change. Just changes the roms, and thats it.
- Added a nice startmenu to "AMSTRAD" logo, when used as Desktop.
- Small resetbutton added to emulator window.
- few GUI improvements for BDD databases. (You now can also search for a game)

Download:
JavaCPC Desktop - Java CPC Emulator | SourceForge.net

or:
http://cpc-live.com/download.php?view.2

or check for available updates in JavaCPC

How I can run this in UBUNTU ?

Devilmarkus

Drop a command file in the folder.
Content should look like:
java -jar JavaCPC.jar -xms1024m

(Like BAT file on PC)
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

Morn

You may also have to set java.library.path (at least this is the case on Arch Linux) or the gamepad library will not be found, e.g.:

java -Djava.library.path=. -jar JavaCPC.jar -Xms512m

Morn

Markus, why is JavaCPC 2.9e trying to load a Windows DLL on Linux? (The previous 2.9 version worked fine.)

loaded 55 user settings
Args: -Xms512m
Checking resource files...
Transferred 0 file(s)
loaded 17 rom settings
loaded 9 desktop settings
Mrz 12, 2015 11:51:44 AM net.java.games.input.ControllerEnvironment log
INFORMATION: Linux plugin claims to have found 7 controllers

Num. controllers: 7
Game pad index: 0
Game controller: Logitech Gamepad F510, Gamepad
Num. Components: 18
Found x; index: 11
Found y; index: 12
Found z; index: 13
Found rz; index: 16
Found pov; index: 17
Found A; index: 0
Found B; index: 1
Found X; index: 2
Found Y; index: 3
Found Left Thumb; index: 4
Found Right Thumb; index: 5
Found Select; index: 6
Found Mode; index: 8
Found Left Thumb 3; index: 9
Found Right Thumb 3; index: 10
Too few buttons (10); expecting 12
Rumblers found: 1
Joy found!
1
3
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/javacpc/.\lib\windows\x86\jdic.dll
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
    at java.lang.Runtime.load0(Runtime.java:795)
    at java.lang.System.load(System.java:1062)
    at jemu.ui.Desktop.<init>(Desktop.java:1057)
    at jemu.ui.JEMU.init(JEMU.java:351)
    at jemu.ui.JEMU.main(JEMU.java:1554)
    at jemu.ui.Main.launchClassic(Main.java:487)
    at jemu.ui.Main.main(Main.java:447)


kilon

Quote from: Morn on 11:48, 12 March 15
You may also have to set java.library.path (at least this is the case on Arch Linux) or the gamepad library will not be found, e.g.:

java -Djava.library.path=. -jar JavaCPC.jar -Xms512m


yeap it is stuck into loading because it uses a windows library and also uses a windows path as well

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /home/kilon/Downloads/JavaCPC/.\lib\windows\x86\jdic.dll


kilon

Quote from: Morn on 12:25, 12 March 15
Kilon, here is the old 2.9 file that works:

https://github.com/mdoege/javacpc-backup/archive/master.zip

thanks but still cant load, here is the log

java -Djava.library.path=. -jar JavaCPC.jar -Xms512m
loaded 6 user settings
Args: -Xms512m
Checking resource files...
Transferred 0 file(s)
loaded 17 rom settings
loaded 9 desktop settings
ROMs are disabled: false
Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event10): Failed to open device /dev/input/event10 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event11): Failed to open device /dev/input/event11 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event12): Failed to open device /dev/input/event12 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event2): Failed to open device /dev/input/event2 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event3): Failed to open device /dev/input/event3 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event4): Failed to open device /dev/input/event4 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event5): Failed to open device /dev/input/event5 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event6): Failed to open device /dev/input/event6 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event7): Failed to open device /dev/input/event7 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event8): Failed to open device /dev/input/event8 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Failed to open device (/dev/input/event9): Failed to open device /dev/input/event9 (13)


Mar 12, 2015 1:37:15 PM net.java.games.input.ControllerEnvironment log
INFO: Linux plugin claims to have found 0 controllers

No controllers found
No game pad found
Start time: [Thu Mar 12 13:37:15 EET 2015]
executable is true
Avail mem is 404531360
init()
Frequency=1000000, adder=65536
Building tapedrive
Samplerate is 44100hz
javax.sound.sampled.LineUnavailableException: unable to obtain a line
    at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.connect(PulseAudioDataLine.java:273)
    at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:101)
    at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:75)
    at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:290)
    at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:51)
    at jemu.core.device.sound.JavaSound.init(JavaSound.java:77)
    at jemu.core.device.sound.SunAudio.<init>(SunAudio.java:40)
    at jemu.core.device.sound.JavaSound.<init>(JavaSound.java:46)
    at jemu.core.device.sound.SoundUtil.getSoundPlayer(SoundUtil.java:26)
    at jemu.core.device.sound.AY_3_8910.<init>(AY_3_8910.java:176)
    at jemu.system.cpc.CPC.<init>(CPC.java:796)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at jemu.core.device.Computer.createComputer(Computer.java:101)
    at jemu.ui.JEMU.setComputer(JEMU.java:4258)
    at jemu.ui.JEMU.start(JEMU.java:1187)
    at jemu.ui.JEMU.desktop(JEMU.java:1620)
    at jemu.ui.Desktop.<init>(Desktop.java:1016)
    at jemu.ui.Desktop.main(Desktop.java:11313)
    at jemu.ui.Main.launchDesktop(Main.java:470)
    at jemu.ui.Main.main(Main.java:444)
JavaSound: 256 x 2
Line Buffer: 0 for class org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine
java: /build/buildd/openjdk-7-7u75-2.5.4/icedtea-sound/src/native/org_classpath_icedtea_pulseaudio_Stream.c:753: Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1flush: Assertion `stream' failed.
Aborted (core dumped)

Morn

For the controller problem: add your user to the input group (or Ubuntu equivalent) so it can access /dev/input/event*

The other bug is PulseAudio. Quit all other apps and start with

pasuspender java ...

Or load a GUI like WindowMaker that does not start PulseAudio.

Morn

P.S. And if you get JavaCPC running, you may have to change the audio sample rate back and forth (e.g. from 44k to 22k and back to 44k) in the settings once to get sound.


Morn

P.P.S. You can use ps to check whether PulseAudio is running:

$ ps aux|grep pulse
martin     599  0.0  0.2 580828 20512 ?        S<l  11:16   0:07 /usr/bin/pulseaudio --start --log-target=syslog


kilon

Quote from: Morn on 12:45, 12 March 15
For the controller problem: add your user to the input group (or Ubuntu equivalent) so it can access /dev/input/event*

The other bug is PulseAudio. Quit all other apps and start with

pasuspender java ...

Or load a GUI like WindowMaker that does not start PulseAudio.

no idea how to do those things

I tried

pasuspender java -Djava.library.path=. -jar JavaCPC.jar -Xms512m
pasuspender: invalid option -- 'D'

kilon

Quote from: Morn on 13:27, 12 March 15
P.P.S. You can use ps to check whether PulseAudio is running:

$ ps aux|grep pulse
martin     599  0.0  0.2 580828 20512 ?        S<l  11:16   0:07 /usr/bin/pulseaudio --start --log-target=syslog


ps aux|grep pulse
kilon     1693  0.5  0.0 448424  7608 ?        S<l  10:10   1:27 /usr/bin/pulseaudio --start --log-target=syslog
kilon     7824  0.0  0.0  15948   944 pts/6    S+   14:28   0:00 grep --color=auto pulse

Morn

Yes, apparently pasususpender does not like command line arguments.  :(

You can create a shell script to start JavaCPC, e.g. I use

$ cat /usr/bin/javacpc
#!/usr/bin/bash

cd /usr/lib/javacpc
java -Djava.library.path=/usr/lib/javacpc/ -jar JavaCPC.jar -Xms512m


And then I have an alias in my ~/.bashrc:

alias jcpc="pasuspender javacpc"   # run JavaCPC with PulseAudio disabled


kilon

Quote from: Morn on 13:34, 12 March 15
Yes, apparently pasususpender does not like command line arguments.  :(

You can create a shell script to start JavaCPC, e.g. I use

$ cat /usr/bin/javacpc
#!/usr/bin/bash

cd /usr/lib/javacpc
java -Djava.library.path=/usr/lib/javacpc/ -jar JavaCPC.jar -Xms512m


And then I have an alias in my ~/.bashrc:

alias jcpc="pasuspender javacpc"   # run JavaCPC with PulseAudio disabled

no I am afraid it still gives me the exact same error and crashes.

Morn

Strange, normally you simply get no audio from JavaCPC when PulseAudio is running, but no crashes. (This is with PulseAudio 6.0 on Arch; Ubuntu might have an older version that is causing problems. Can you upgrade PA perhaps?)

When using pasuspender, PA keeps running but is suspended and may still cause some sound issues in JavaCPC.

So like I said, I think your best bet is to install a simple window manager like wmaker, log in to that, check that PulseAudio is not running (don't start e.g. Chrome or PA might get started!), and run javacpc without the pasususpend stuff.

Morn

Another option might be uninstalling PulseAudio for now, provided you can force your package manger to skip dependency checks. In Arch Linux I can force-uninstall anything with "pacman -Rdd", but I don't know about Ubuntu.

Oh, and if you disable PulseAudio (either by using another window manager or uninstalling PA), you may have to look for an ALSA mixer, because by default all channels in ALSA are muted. So you need to crank them up first.

Sound on Linux really is an inexhaustible topic.  :D


kilon

#242
Quote from: Morn on 14:10, 12 March 15
Strange, normally you simply get no audio from JavaCPC when PulseAudio is running, but no crashes. (This is with PulseAudio 6.0 on Arch; Ubuntu might have an older version that is causing problems. Can you upgrade PA perhaps?)

When using pasuspender, PA keeps running but is suspended and may still cause some sound issues in JavaCPC.

So like I said, I think your best bet is to install a simple window manager like wmaker, log in to that, check that PulseAudio is not running (don't start e.g. Chrome or PA might get started!), and run javacpc without the pasususpend stuff.

Bingo!

I upgraded from PulseAudio 4 to PulseAudio 5 and now JavaCPC opens.

It looks like now it throws an exception

Exception in thread "PulseAudio Eventloop Thread" java.lang.IllegalStateException: drain failed
    at org.classpath.icedtea.pulseaudio.EventLoop.native_iterate(Native Method)
    at org.classpath.icedtea.pulseaudio.EventLoop.run(EventLoop.java:133)
    at java.lang.Thread.run(Thread.java:745)

it seriously does not like PulseAudio

its frozen and refuses to quit.

No I dont want to uninstall PulseAudio, I love audio with my Ubuntu thank you very much :D

I also dont want to mess with this Ubuntu install, its my work PC and I have loads of valuable data in it and already Ubuntu gives me hard time with my printer and scanner.

Morn

Well, xkill is your friend to kill hung applications!

Yes, PA is a major problem with JavaCPC. To be fair, Minecraft is also a Java app and sound in that works flawlessly with PA, so this must be an issue in JavaCPC.

You will still get audio if you uninstall PA. PA is very useful for audio routing, e.g. some apps to HDMI, others to headphone jack. But multiplexed audio output works just fine with plain old ALSA.

Or you could try OS X because I see in your GitHub bug report you have that too.


Devilmarkus

AFAIK, also SUN audio should be integrated in actual Java distributions for Linux, isn't it so?

I know people running JavaCPC under Linux, without any audio problems...
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

Morn

Quote from: Devilmarkus on 15:36, 12 March 15
AFAIK, also SUN audio should be integrated in actual Java distributions for Linux, isn't it so?
Maybe there is a way to revert to plain OSS (I think this is equivalent to Sun audio), but then only one app can use the sound card at a time. Very inconvenient to say the least.

I've tried uninstalling PA and using ALSA and still got some occasional audio glitchiness, whereas everything runs smoothly on Windows on the same machine.

Quote from: Devilmarkus on 15:36, 12 March 15
I know people running JavaCPC under Linux, without any audio problems...
More details about the distro they use, etc. would be useful.

But like I said, I think Minecraft proves that Java can cooperate with PulseAudio in principle. I don't know why JavaCPC so stubbornly refuses.  :)

Devilmarkus

Quote from: Morn on 16:14, 12 March 15
But like I said, I think Minecraft proves that Java can cooperate with PulseAudio in principle. I don't know why JavaCPC so stubbornly refuses.  :)

Sure, playing samplefiles should work, without problems, with PA.
But JavaCPC produces sound for itself. (AudioStream) which seems is not working well with PA.

I tested several audioformats. 8,16bit, big endian, little endian, etc... All tests ended in the same result...
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

kilon

OK as far I can tell, for MacOSX i see the same problem with that windows library

but the version that you gave me with that gihub link works fine.

I tried to play deathsword but no key seem to work , I need to setup something ?

I dont care so much about linux , MacOSX is my main platform.

TFM

To start Deathsword one need to hit return of space or so, kinda unused. I'm not sure if I remember right though.  :laugh:
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

kilon

Quote from: TFM on 17:15, 12 March 15
To start Deathsword one need to hit return of space or so, kinda unused. I'm not sure if I remember right though.  :laugh:

yes I have done this, its space to change to mode 1 and enter to start battle. Those work. But I cant control my hero , no key seem to work for him , though enemy attacks me and kills me.

Powered by SMFPacks Menu Editor Mod