
B2fJ – A Java Virtual Machine to run on the 8-bit home computers of the 80s - muterad_murilax
https://mzattera.github.io/b2fJ/
======
_Codemonkeyism
"Preemptive threads with synchronization."

From working in 6502 asm in the 80s on a c64 I must say:

Most astonishing.

~~~
dmitrygr
In an interpreter, appearing to do threads is easy. Just interpret some
instructions from one "thread", then some from next, etc

~~~
greenshackle2
That's pretty much what Python does, no?

------
Rjevski
Java on Sega Genesis/MegaDrive:
[https://www.mikekohn.net/micro/sega_genesis_java.php](https://www.mikekohn.net/micro/sega_genesis_java.php)

~~~
nsxwolf
"I keep getting asked why I'm programming for a Sega Genesis system in Java,
the reason is I'm hoping someone from Sega or Sun Microsystems finds this page
and offers me a job."

"Posted: November 17, 2015"

Oh man... I think he's been trapped in a hole coding for a very long time...
Should I tell him or should you?

~~~
MrBuddyCasino
I was hoping he was being sarcastic. Oh boy. Impressive technical achievement
though.

------
to3m
See also this, which is (as far as I can tell) the JVM for the Apple II:
[http://forum.6502.org/viewtopic.php?f=2&t=2224&p=20418](http://forum.6502.org/viewtopic.php?f=2&t=2224&p=20418)

------
Koshkin
Java fell into a disrespect among much of the younger crowd to a considerable
degree - in contrast to the almost universal excitement about it some 20 years
ago.

But I still find it an amazing, very well-engineered, extremely versatile
platform that works on large machines and tiny microcontrollers alike and is
easy to extend to new devices!

~~~
CyberDildonics
You find Java well engineered or you find the JVM well engineered? Java may go
down in history for the most destructively designed programming language ever
created. The entire standard library and methodology is to create every little
piece of data on the heap, then use extremely deep inheritance as a substitute
for the ability to write generic software pieces.

Not only is the "Object Oriented" way of doing things arguably a blight on
software design, both allocation and chasing of virtual pointers are
devastating to modern performance. Then to combat this, the JVM is an
engineering marvel that has matured over 20 years.

~~~
bsder
> Not only is the "Object Oriented" way of doing things arguably a blight on
> software design, both allocation and chasing of virtual pointers are
> devastating to modern performance.

Um, this is not unique to Java, you know. Even C++ does this.

~~~
CyberDildonics
It is easily avoided in C++ by putting most values on the stack. Also with
templates, inheritance isn't needed for generic data structures.

------
minxomat
Modern JVM, for modern 8bits AVRs:
[http://dmitry.gr/index.php?r=05.Projects&proj=12.%20uJ%20-%2...](http://dmitry.gr/index.php?r=05.Projects&proj=12.%20uJ%20-%20a%20micro%20JVM)

~~~
dmitrygr
That can be build for c64 easily and thus give you support of garbage
collection, threads, arrays, and well, all of java

------
gururise
Really cool! Wish floating point was working though... software float can be
useful!

------
gururise
Anyone know of a Java VM that works on Arduino?

~~~
opless
[http://dmitry.gr/index.php?r=05.Projects&proj=12.%20uJ%20-%2...](http://dmitry.gr/index.php?r=05.Projects&proj=12.%20uJ%20-%20a%20micro%20JVM)

------
majidazimi
In the mean time, I'm struggling to open Atom on an i7 processor with 16GB of
memory.

~~~
LeonM
You'll probably get downvoted, but I can't help having the same thoughts when
reading a headline like this

------
Bjornskjald
But can it run Doom?

~~~
poizan42
Kinda sorta depending on what you think of as a C64 and what you think of as
Doom.

Proper Doom on extended C64:
[https://www.youtube.com/watch?v=7ZzivzuDOls](https://www.youtube.com/watch?v=7ZzivzuDOls)
\- even then the framerate is horrible.

Doom with heavily simplified graphics and stuff (M.O.O.D. Doom) on a proper
C64:
[https://www.youtube.com/watch?v=YQcK527rYJI](https://www.youtube.com/watch?v=YQcK527rYJI)

