What's new

Sega MegaDrive/Genesis

Pixman

New member
Good job, Lordus.

Did you comemnt it a lot? If yes, is the source open too?
i'd love to read it up a bit.
And also the sources for the GB emulator maybe.
I'd like to have it.
I'm planning to code a GB emulator on my own but I'm a bit stuck.. I started on the core, don't find it TOO hard yet, but it's till tough to me :)

Greets,
Pix
 
OP
L

Lordus

New member
Didnt have so much time, but started working on it again last week.
Implemented both V-Scrolling modes now, fixed some bugs, which
raised compatibility a lot.
There is also almost complete sound support now, and i am quite happy about that ...

The only thing that is really annoying is the throtteling. It seems almost impossible in Java,
to provide a constant framerate for everyone. It works on my machine, but
might not on others.
Depending on the VM the Java timing has an incredible resolution of up to 16ms and i just couldnt come up with a method yet, that works everywhere and is native Java.
If anyone has an idea about that, please share it with me ...

Also, if anyone is interested, i can release my current version.

gynoug.png
 

smcd

Active member
I'd be interested in having the latest edition posted just because it's fun to play with up-and-coming emulators :)
 

smcd

Active member
Works pretty nicely. The sound's a bit crackly sometimes but hey, it's working! I am using java 1.5u6 and played Sonic & Knuckles just fine.
 

hap

New member
Sounds and works well over here. I've noticed some crackling too sometimes, I think due to the PSG, eg. in the Sonic "Sega" intro voice.
 

NecroRomancist

New member
Hi.I ran your emu on my linux box and i 'm staggered. Really fast and compatible..only some problems with the sound and fullscreen but that maybe due to the jvm rather than your code.
One question- what are you using to draw the image? BufferedImages and setRGB? do you use a double buffering technique?
One suggestion - could you add a plugin structure..it would be really could if we could used lwjgl if available :)
Congrats on your work..
 
Last edited:
OP
L

Lordus

New member
Thanks. I think most of the sound problems are related to timing issues. I dont have crackling sound or anything like that here, except when the framerate drops for a second.
I am thinking of using lwjgl myself, for rendering and it also provides more acurate timing. I also thought about plugins and i am consideing it.
I was experimenting with the JNI and actually wrote a native rendering and sound "plugin" for windows. Maybe i will do something into that direction and also use lwjgl.

Currently i am not using BufferedImage. I tried, but it was slower for me. I am using double buffering with a fast ImageProducer class and setPixels.
 

smcd

Active member
There's also java bindings for sdl which might be a possible route? Just thought I'd share.
 

NecroRomancist

New member
About the timing issues.There is a opensource java master system emu (http://www.javagear.co.uk) that has a nice throtteling code.On bindings it would be really cool to have bindings for something like libcdio to make it possible to emulate the mega cd as it provides iso and cd reading :) I've gotta take a look into that :)
 
OP
L

Lordus

New member
Thanks, but the throtteling of JavaGear doesnt help much. Its not so different from mine, its just a general problem using the System.currentTimeMillis() and Thread.sleep() to throttle this way. It works mostly, just not for everyone.
There is another way since the 1.5 VM that i am currently experimenting with, that provides a solid 60fps.

I am also currently working with LWJGL and its so neat. The speed increase is
huge due to OpenGL rendering. I achieved 130fps in 3x resolution that way.
With the Java rendering i just get like 25 fps on my machine in 3x.
So i will provide both methods in the end i guess.
 

Fabricio_EX

New member
Way to go, Lordus! A great work using this language that everyone say it's slow. Soon I'll be programming in Java too (I'm still learning the basics), and I want to make an emulator using this language (although I don't know the platform yet). I think it's nice to create those programs to increase your abilities... and have fun!
 
OP
L

Lordus

New member
Here is a new version of jEnesis: jEnesis 0.0.4.zip
For the complete changelog look here

There are many fixes, it has .7z support now and uses an alternate timing method, which i hope works better.
If not, feel free to tell me. Eventually i will get that right i guess.

Sound is still buggy, but i will work on that for the next release.

I forgot to mention it in the readme.txt (which nobody reads anyway), but you can disable LWJGL and switch to native Java rendering, by setting
LWJGL=false
in the config file (if its all too fast for you).
And also switch back to the old timing method by specifiying:
UseHighPrecissionTimer=false

As always, feedback is welcome of course.
 
OP
L

Lordus

New member
The amount of feedback is overwhelming :D . I updated the LWJGL part a bit, as many people seem to have problems with that.
jEnesis 0.0.5
If anyone has problems with LWJGL rendering, like blank screens, fullscreen mode not working, or crashes, please send me your system specs and tell me about the exact problem.
It would be really helpful to have some beta testers :p Its just hard to debug something that i cant reproduce here...
 

NecroRomancist

New member
On a linux system with both the DRI drivers and the ATI official ones i get this

Xlib: unexpected async reply (sequence 0x4801)!

when using LWJGL.

PS :- Sorry if haven't said anything about the libcdio bindings but life is really busy atm :)
 
OP
L

Lordus

New member
No problem, i was working on something else anyway. Ill try to fix that LWJGL problems, its just hard without any more info on what is going wrong.
But anyway here is a little update. I wrote a SH2 core now and somwhat the 32X already works as you can see below.
Its still a bit slow, but i am sure it can be optimized a lot. I am also working on converting the core to a dynarec one atm. Those 2 SH2 cores are just damn fast and take about 80-85% of the whole processing power.

32x_doom.png
32x_sh.png
32x_tempo.png
 

Top