Jump to content
Elkino

Running java ByteCode on Atari 8-bit home computer

Recommended Posts

Posted (edited)
Yes, is possible to run JAVA bytecode on 8-bit home computers and develop some atari examples using standard class libraries.
 
Here a demo running on Atari800 (The .XEX was tested on a real machine).
 
This is a port to Atari from the B2FJ java virtual machine that allows to run bytecode on C64 (https://mzattera.github.io/b2fJ/)
 
Demo Sources:
 
Project on GitHub:
 

b2fjplay.xex

Edited by Elkino
  • Like 4
  • Thanks 3
  • Haha 1

Share this post


Link to post
Share on other sites

This is really cool but how useful is it?  Once you have a JVM running on a 48/64k machine how much is left over for byte code?

 

I built a toy VM a few years ago implementing a 16 instruction stack machine.  It worked well and I started to implement some of the core in assembly but then the tech ADHD SQUIRREL! happened...  :)

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, damosan said:

This is really cool but how useful is it?  Once you have a JVM running on a 48/64k machine how much is left over for byte code?

 

I built a toy VM a few years ago implementing a 16 instruction stack machine.  It worked well and I started to implement some of the core in assembly but then the tech ADHD SQUIRREL! happened...  :)

 

I think that this fall in the category: "We did it because we can." 🙂

 

But, I get you, may be is not very useful as after compiled and linked, the final xex images with an average program give us only 3K left for data, even if use Proguard to optimize the class library bytecode, but at least can be useful to write some short examples in Java as you can see in the code. I know that not brilliant spend 32-bytes in a integer, but Atari Basic use 40-bit. After you prototype your code in Java it could be ported later to C. The runtime interpreter and the embedded bytecode is compiled with CC65, may be if we use a compiler that produce code optimized for 6502 we can get better results. Also, it is possible to rewrite the interpreter in assembly, but then it will lose portability. Currently the same interpreter can be run on linux, windows, macos, c64, a800, etc.

  • Like 2

Share this post


Link to post
Share on other sites
10 hours ago, Elkino said:

 

I think that this fall in the category: "We did it because we can." 🙂

 

And that's the only reason that matters.  :)

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...