Elkino Posted April 2, 2021 Share 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 5 3 1 Quote Link to comment Share on other sites More sharing options...
Elkino Posted April 2, 2021 Author Share Posted April 2, 2021 Here is the Video Quote Link to comment Share on other sites More sharing options...
damosan Posted April 2, 2021 Share 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 Link to comment Share on other sites More sharing options...
Elkino Posted April 2, 2021 Author Share 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. 3 Quote Link to comment Share on other sites More sharing options...
damosan Posted April 3, 2021 Share 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. 4 Quote Link to comment Share on other sites More sharing options...
Elkino Posted April 5, 2021 Author Share 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 Link to comment Share on other sites More sharing options...
edburns Posted April 5 Share Posted April 5 Hello @Elkino, it's almost exactly three years later. I just tried running this on the 400 mini but when I do, it says THIS PROGRAM MUST BE RUN ON AN XL. Do you have any tips for how to make it run on that thing? I'm going to JavaLand next week and I'd love to show it off in my booth as a fun activity. Thanks, Ed Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted April 5 Share Posted April 5 Sounds like it's checking for the later OS version, the 400 mini must be using the 400/800 OS or something that's been modified, other than that, it's probably checking how much RAM you have as it may need 64K and be using the RAM that's under the OS, don't know if the mini can access that. Quote Link to comment Share on other sites More sharing options...
edburns Posted April 7 Share Posted April 7 I found that in the advanced options, you can select 800XL. Then it works. Thanks. Ed Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted April 8 Share Posted April 8 hmm this looks like it will become useful, nice Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.