fredag 16 oktober 2009

Some progress

Yes, I'm making progress on the jamvm for AmigaOS4.

I have found some pthread stuff that isn't implemented on AmigaOS4's implementation. For now its removed with #defines, which ofcourse doesn't work, but I atleast got it to run on the Miggy. I'm thinking of implementing the thread functionality with AmigaOS tasks. For now there are defines, #ifdef __amigaos4__, taking care of special stuff. Perhaps an entire new thread.c for AmigaOS...

Anyhow, I thought it might be good to compile for my x86 aswell, to see how its supposed to work. Then I also got to compile the classpath again.

Its rather encouraging actually being able to run something.

torsdag 17 september 2009

jamvm

Trying to compile jamvm on AmigaOS4.
I have a configure-line:

I also neede to define HAVE_SYS_PARAM_H 0 in src/config.h
#define HAVE_SYS_PARAM_H 0
#define USE_ZIP 0

alphasort had to be included in class.c:

int alphasort(const struct dirent **a, const struct dirent **b) {
return strcmp((*a)->d_name,(*b)->d_name);
}

Don't know if that is correct.

Then a few SIGs wasn't defined.

söndag 30 augusti 2009

JamVM for AmigaOS

Trying to compile jamvm for AmigaOS using cross-compiler on Linux.
JamVM-version: 1.5.3

Created a new amiga-directory (should probably be named amigaos4) in src/os, mostly copied from bsd (or was it linux, can't remember). That directory will be made available sometime perhaps.

Made changes in these files to add the amiga directory above:
configure.in

Made ugly hardcoded changes in these files:
USE_MALLOC should be properly defined in some configure files, instead of in the files directly
src/alloc.h
src/alloc.h
added #define sigjmp_buf jmp_bUf:
src/thread.c
src/thread.h

Configure:
./configure --host=ppc-amigaos --program-prefix=/media/disk/Filer/Projekt/amijamvm LIBS="-ldl -lauto -use-dyndl"
Make:
make

Still copmplains about SIG_BLOCK, SIG_UNBLOCK

fredag 17 juli 2009

Java on Amiga

Yup. I'm trying on my spare time (på ensamma hemmakvällar, if I may quote Dynamit-Harry) to get some sort of java running on AmigaOS4.

I'm using JAmiga 0.0.5 from sourceforge. I made some changes, but I can't remeber which ones right now.

However, as stated on amigans.net the crucial part is not the JVM, but the classpath. On the JAmiga site you can download a pre-compiled GNU classpath of version 0.5, or so, but we reallt want a later one. I downloaded classpath 0.98. I initially tried to compile it on OS4, but it seems I miss javac. I tried using kaffe, but it uses the ixemul library, and I didn't want that. A version on Aminet also crashed on me.
So, I tried crossompiling it on my Vista-machine with Cygwin and ZeroHeros cross-compile setup. I downloaded classpath 0.98 and did these steps:
1. Set the classpath to the classpath-0.98/-dir
export CLASSPATH=/cygdrive/c/Projekt/classpath/classpath-0.98/
2. Ran this:
./configure -C --disable-gtk-peer --disable-gconf-peer --disable-plugin --host=ppc-amigaos

And it didn't work. I couldn't compile Java.

I got tired, but found a link: http://developer.classpath.org/mediation/ClasspathOnCygwin