Elkino #1 Posted April 2, 2021 (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: https://github.com/eahumada/b2fJ/blob/master/dev/test/b2fJ/test/atari/ColorMusicPlayerTest.java Project on GitHub: https://github.com/eahumada/b2fJ/ Video: https://youtu.be/Zym4K55Vecc b2fjplay.xex Edited April 6, 2021 by Elkino 4 3 1 Quote Share this post Link to post Share on other sites
Elkino #2 Posted April 2, 2021 Here is the Video Quote Share this post Link to post Share on other sites
damosan #3 Posted April 2, 2021 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... 1 Quote Share this post Link to post Share on other sites
Elkino #4 Posted April 2, 2021 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. 2 Quote Share this post Link to post Share on other sites
damosan #5 Posted April 3, 2021 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. 3 Quote Share this post Link to post Share on other sites
Elkino #6 Posted April 5, 2021 You can see it running online also: https://eahumada.github.io/AtariOnline/demos/demos-mame.html?disk=b2fj.atr Other apps: https://eahumada.github.io/AtariOnline/ Quote Share this post Link to post Share on other sites