Ultimate Amiga

Other => Ultimate Amiga Site News and Announcements => Topic started by: Mequa on January 31, 2012, 06:29:09 AM

Title: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on January 31, 2012, 06:29:09 AM
I present a new AMOS BASIC reimplementation:

(http://img252.imageshack.us/img252/9266/jamos.jpg)

Following on from my jAMAL project, this uses an interpreter based on my MequaScript (http://mac.softpedia.com/get/Utilities/MequaScript.shtml) project, and includes all the AMAL support found in jAMAL.
A subset of AMOS BASIC is already supported, albeit with simplified syntax at present.

Written in Java, and fully cross-platform, this is completely unrelated to previous AMOS implementations such as Alvyn Basic and Mattathias Basic.
Like jAMAL before it, this is fully open source with a permissive BSD-style license, and utilises the JGame engine.

jAMOS alpha 0.1 is now ready for public download:
Get it here (http://sourceforge.net/projects/javaamos)!
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: FOL on January 31, 2012, 11:00:15 AM
Fixed your link, but the link is dead.

Can you email file to me, I will upload it here for you. Or attach it here.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Hungry Horace on January 31, 2012, 11:50:39 AM
Looks very cool, although I must admit i'm struggling a bit with it at a first glance.

I'm sure as it gets more in-depth (and hopefulyl when support for certain extension commands appears) it will be very nice to translate a few of my programs to other platforms.

FOL: the download seems to work fine here.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: FOL on January 31, 2012, 02:01:37 PM
FOL: the download seems to work fine here.

Aye, appears to be working now.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on January 31, 2012, 09:58:30 PM
Update: jAMOS 0.11 adds mouse and cursor keys (simulated joystick) input and corresponding examples.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: MadAngus on February 01, 2012, 02:51:10 AM
Mequa

Will users be able to use the AMOS manuals as is for jAMOS, or would there be some notable differences.

I'm thinking that once I've finished porting the AMOS manuals to be AMOS Pro specific, aka The AMOS Pro Resource Kit, if necessary that resource kit could also be ported to a separate jAMOS specific manual set.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 01, 2012, 05:26:31 AM
Mequa

Will users be able to use the AMOS manuals as is for jAMOS, or would there be some notable differences.

I'm thinking that once I've finished porting the AMOS manuals to be AMOS Pro specific, aka The AMOS Pro Resource Kit, if necessary that resource kit could also be ported to a separate jAMOS specific manual set.
Sure, jAMOS is still in its infancy, but much from the original AMOS manuals still applies. The aim is to implement the same language.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: MadAngus on February 01, 2012, 07:05:28 AM
Good stuff. That would mean only a small addendum to the resource kit to cover jAMOS. :)

The resource kit is also in it's infancy. I'm not expecting it to be completed until early next year, that is the manuals part of the resource kit. ;)
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 03, 2012, 12:46:56 AM
Update: jAMOS 0.12

A major milestone has been reached with the first fully playable game created with jAMOS, a simple Breakout clone "jAMOSOut", now added to the examples. Some more AMOS functions have been implemented too.
Title: Re: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 05, 2012, 11:31:33 AM
Guys :)

jAMOS is more than just AMOS. It adds some powerful features to the language. No new updates here - these have always been in jAMOS, courtesy of the MequaScript interpreter at its core.

Try adding this to the bottom of any of the examples:

Code: [Select]
Brain Second
   X=20
   Do
      If X>500 : X=20 : End If
      Bob 81,X,300,7
      X=X+5
      Wait Vbl
   Loop
EndBrain

And would you believe it? 2 jAMOS programs running in parallel. :)

You can share variables between brains too:

Code: [Select]
Brain Third
Do
Bob 82,Second.X,400,8
Wait Vbl
Loop
EndBrain

And while you can use traditional BASIC type identifiers such as A$ for a string and A# for a floating point variable, that is optional. Types are dynamic, so you could just as easily:

Code: [Select]
A=2
Print A+2
A="I just changed my type!!!111oneoneone11!!"
Print A+1

Don't worry about case though, just like in good old AMOS, variables are not case-sensitive.

Code: [Select]
A="Hello World"
Print a

You currently need to run jAMOS from a console to see text output though.

Oh and don't worry about using hundreds of sprites, this isn't the Amiga. :)
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 18, 2012, 01:30:36 AM
Update: Alpha 0.13 (February 18th 2012)

- A text output console is now spawned on creation (for HelloWorld.jamos, etc.).
- Default example changed to jAMOSOut (original still available under AMAL examples).
- AMAL examples now default to the first AMAL program in the editor when opened (as with jAMAL).
- More examples were added demonstrating dynamic types, concurrent jAMOS programs and hybrid syntax.
- jAMAL's startup sound is playable from the menu alongside jAMOS's.
- Some minor bug-fixes.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 23, 2012, 03:39:48 AM
Update: Alpha 0.14 (February 23rd 2012)

- Can now load AMOS sprite banks (.abk) directly.
- Built-in sprite bank viewer now supports image zooming.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 25, 2012, 01:55:33 AM
Update: Alpha 0.15 (February 25th 2012)

- Graphical drawing subsystem is now operational.
- Paste Bob implemented, including support for AMOS .abk files and two new examples.
- Plot implemented, with two new examples including a simple Mandelbrot generator.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 27, 2012, 06:12:46 PM
jAMOS Alpha 0.16 (February 27th 2012)

- Refactored AMOS command wrapper in the source code.
- Fixed some bugs with the graphical subsystem.
- Added more drawing commands and related examples.
- Split the jAMOS example menu.
- Random number generation is now operational in jAMOS code.
- Bob flipping now works with loaded .abk files and with Paste Bob.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on February 28, 2012, 09:38:56 PM
jAMOS Alpha 0.17 (February 28th 2012)

- Added many maths and string functions.
- Added early support for Rainbows (high-level emulated Amiga Copper effects).
- Rainbow and maths examples were added.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on March 21, 2012, 06:22:13 AM
Update: jAMOS alpha 0.18 (March 21st 2012)

- Basic support for procedures implemented. (To do: passing arguments, local/shared variables, global variable definitions, call without "Proc".)
- Some groundwork done for array support - implementation coming soon!
- AMOS Boom and Shoot sounds implemented (alongside Bell), and added to jAMOSOut and a new procedure example.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on March 24, 2012, 04:35:15 AM
Update: jAMOS alpha 0.19 (March 24th 2012)

- Can now return an argument from procedures using Param/Param#/Param$. An example was added under the Tutorial menu.
- Some groundwork done for passing arguments to procedures - implementation coming soon.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on March 25, 2012, 03:24:53 AM
I did a bit of performance testing, comparing jAMOS to AMOS Professional running under WinUAE (with Direct JIT + Fastest Possible CPU, 8MB Fast RAM, ECS chipset, hardware collisions disabled).

For the Mandelbrot plotter (on my i7 machine), using almost identical code and producing identical output, jAMOS performed 8 times faster than AMOSPro in WinUAE using the AMOSPro interpreter, and around 4-5 times faster than the AMOSPro Compiler. (Bear in mind that jAMOS uses 24-bit plotting and an interpreter running on a JIT-compiled Java VM.) Both maxed out one hardware thread out of 8, i.e. half a physical CPU core.

Of course this is still pretty slow for a Mandelbrot plotter (it took over a second to draw a 720x576 image in jAMOS on my i7), but already has major performance gains over emulated AMOSPro. If I have time I'll add the ability to compile jAMOS code to Java source compilable to Java bytecode, which should improve performance some more.

Sprite and screen display in jAMOS is still quite sluggish on slower PCs however, due to its somewhat inefficient usage of JGame's sprite engine at the moment. The sound engine may also cause occasional freeze-ups due to the JVM heap size being too small and forcing garbage collection. This can be fixed by launching jAMOS from a command prompt and specifying a larger heap size using JVM command line options.

From my tests, its interpreter is surprisingly nippy though, as is its AMAL interpreter.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on March 28, 2012, 07:22:30 AM
Update: jAMOS alpha 0.20 (March 28th 2012)

- Can now pass arguments to procedures as well as return an argument (variable scoping and "call without Proc" still to do). The example was updated.
- Some bugfixes with number-to-string conversion. Type conversion is automatic unlike AMOS, so you can now do number+string as well as string+number.
Title: jAMOS alpha 0.21
Post by: Mequa on April 29, 2012, 07:36:34 PM
Update: jAMOS alpha 0.21 (April 29th 2012)

- Arrays are now implemented, including multi-dimensional support surpassing the AMOS original.
- An example was added using two-dimensional arrays for plotting to and from a buffer.
Title: jAMOS alpha 0.22
Post by: Mequa on May 10, 2012, 11:03:33 PM
Update: jAMOS alpha 0.22 (May 10th 2012)

- Various bug fixes and code refactoring.
- Now supports whitespace in expressions without hanging (bug fix); examples updated.
- Tidied up several examples.
- Back-port of the parser/interpreter core from Java to C++ almost completed, to be released soon as "MequaScript".
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: BooBoo on May 16, 2012, 03:12:30 PM
What about something like this for blitz to make converting AMOS to blitz a nice easy process :)
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: Mequa on May 17, 2012, 12:37:01 AM
What about something like this for blitz to make converting AMOS to blitz a nice easy process :)
Amiga Blitz in Java, or AMOS to Amiga Blitz?


I've recently ported almost all of the interpreter core (apart from AMAL) to C++. I've been getting to grips with SDL too, so I've been wondering if a C++/SDL port of jAMOS (to be renamed of course) would be of interest? (Only this is the same platform that was used for Alvyn, but unlike Alvyn I don't use the GPL.)

This should work on NG Amigas too, and be faster than jAMOS. In all honesty I am sick of Java, it seems a dead-end platform now and suffers from performance issues, particularly on anything other than x86.
So would a native version be of interest?

I'd also like to try this on my recently acquired Mac Mini G4 with registered MorphOS, and I'll be getting a Raspberry Pi next month. ;)
Title: jAMOS alpha 0.23
Post by: Mequa on May 23, 2012, 03:33:03 PM
Update: jAMOS alpha 0.23 (May 23rd 2012)

- Various more bug fixes and code refactoring.
- A new, non-AMAL Abk example was added with easier code to follow.
- jAMOS now has a sister project - XAMOS! Fully re-written runtime engine in C++ with SDL libraries, compatible with jAMOS projects.
Title: jAMOS alpha 0.24
Post by: Mequa on June 03, 2012, 02:59:19 PM
Update: jAMOS alpha 0.24 (June 3rd 2012)

- Various more bug fixes and code refactoring in line with XAMOS 0.24.
- Can now translate AMAL and AMAL EnvGen code into C++ as well as Java, in line with XAMOS's new AMAL support.
Title: Re: AMOS: jAMOS - new AMOS BASIC reimplementation in Java
Post by: DarkN3mo on January 10, 2023, 03:12:01 AM
It's a shame it's not done anymore, it would have been really cool