Java MSX Emulator

Page 3/3
1 | 2 |

By snout

Ascended (15184)

snout's picture

16-03-2005, 14:21

If you have a S60 phone, why not use the wonderful fMSX/S60 emulator? Smile

By freakazoid

Supporter (6)

freakazoid's picture

16-03-2005, 14:56

Why not fMSX?
J2ME can be spread around any J2ME device. Symbian rocks, but I love challenge. In future, it can grow to a sofisticated emulation in JAVA. Sun will love this.

About CAS question, I used System.getCurrentTimeMillis(), I will try to use the profilling tool to confirm the bottleneck.
The worse bottleneck is not in Graphics, but in CPU. It takes minutes to start VDP.
I boosted the code just with bit operations to multiply and div some values, but it far from a good emulation.

I will try other optimizations techniques.

By [D-Tail]

Ascended (8247)

[D-Tail]'s picture

16-03-2005, 18:00

Does the object code (the classes) differ in various compilers? Maybe you need some more sophisticated compiler, which uses many optimisation techniques.

Maybe we should all code JAVA in bytecode Tongue

By genergabasa

Ambassador (0)

genergabasa's picture

13-11-2008, 07:06

This post is already old and I believe lots of people here have already ported Arnon's J2SE MSX emulator in J2ME. But if not then just try mine:

Also, on that page are other java emulators ported to J2ME.


By erikd

Master (255)

erikd's picture

09-12-2008, 22:05

I'm not very experienced in J2ME (just J2SE), but here are a few thoughts for what it's worth:

1) Try a byte code optimizer. HotSpot is too clever for them to have any effect on desktops, but it can make a difference on mobiles.

2) Try ordering the big switches. There are 2 switch bytecodes in Java, and the faster one for big switches (table switch) will be used by the compiler if the switch is ordered.

3) Try a big array of objects that implement the Z80 instructions instead of big switches. On modern VM's such as HotSpot this is faster than switches, but I'm not sure about mobile java tbh. Worth testing I guess.

4) Use lookup tables for CPU flag emulation. This can make a big performance difference at the cost of some heap space.

5) Most mobile JVM's are little more than interpreters, so old fashioned optimization techniques will work here, such as bitshifting for POT multiplications/divisions, loop unrolling, etc. OTOH, Optimizations that work on some modern CPU's (such as binary trees instead of switches, cache considerations etc) probably won't work. If I remember correctly, Arnon's code uses some really tight loops to decode graphics, so it might be worth it to unroll them.

6) Try LRU caching of decoded graphics (sprites, background tiles and such). This can really help.

7) Cheat Big smile For example don't bother with sprite collision detection (just a few games use it and it can be quite expensive), don't emulate sprites per row limitations, use frameskipping techniques, don't emulate screen borders, don't emulate undocumented Z80 flags etc. (of course, consider this as a last resort as it will obviously lower compatibility).

By SLotman

Paragon (1236)

SLotman's picture

14-03-2009, 02:13

not to ressurrect an old topic, but doing it anyway... I just tried this today, but couldnt get it to run. On my Nokia 5310, it just said "not enough memory" Sad

What are the requirements to run this emulator?

On a sad note, my phone can run ZXMobile just fine... Sad

By Yukio

Paragon (1540)

Yukio's picture

14-03-2009, 05:38

It work on the Sony Ericsson W350a Mobile Phone, but there are some restrictions like missing graphics (the right part of the images) and it is a little slow. Even with this the image is beautiful, the high density of the display makes the Road Fighter really impressive for a mobile game. Goonies is unplayable due to restriction on the screen size, probably people would need some smart phone with larger display and faster processor to play the game in their right form ...

By SLotman

Paragon (1236)

SLotman's picture

14-03-2009, 09:02

hmmm... resolution on my phone is 240x320, so it can handle MSX1 res; also memory shouldn't be a problem; the phone can run some pretty have applications (fully 3d fifa soccer, or project ghotam racing, justy tried demos of both), so really, I dont know what happened Sad

By Yukio

Paragon (1540)

Yukio's picture

14-03-2009, 15:05

hmmm... resolution on my phone is 240x320, so it can handle MSX1 res; also memory shouldn't be a problem; the phone can run some pretty have applications (fully 3d fifa soccer, or project ghotam racing, justy tried demos of both), so really, I dont know what happened Sad

Does the Nokia phone have flip screen (landscape and portrait modes?)? If the screen does not have a vertical orientation you will miss some lines too (the MSX screen is something like 256x192 pixels). Some models from Palm and Nokia can change between portrait and landscape modes (people need to turn the phone to play the games).

The Mobile applications (and the four games that are included: three games from Konami plus Super Boy II from Zemina?) does not features sounds, but the original Java Applet for Internet use does not output sound too ... At least it is easy to install into the phone, just copy the file(s) into the memory card (M2) and use the file manager to install the "game". There is a menu to chose from each game or even boot only with the Expert 1.0 BASIC "ROM" (sure that without keyboard support this is not much useful, maybe into a future release this could be included too).

Page 3/3
1 | 2 |