April 29th, 2007, 16:42
Z64 - a LLE graphics plugin
I am pleased to release a very experimental LLE graphics plugins for N64 that I started to develop about a month ago. I've called it Z64. It is originally based on the excellent work of Ville Linde in Mame/Mess, even though there isn't much of his own code left, it was the starting point of this project without which it wouln't exist today. Also , thanks for other plugin authors that released their source code, as it provided a lot of valuable informations (in particular but not limited to : glN64, Rivevideo, Glide64)
What is it exactly : it is mainly an RDP emulator implemented in OpenGL. Contrary to usual graphics plugins, it doesn't emulate the RSP part, so it requires a functionnal RSP emulator plugin to give any results. I'm providing two solutions to emulate the RSP, one that is based on the plugin from Project64 v1.4 with a few fixes, and another one slower based again on the work of Ville Linde in Mame/Mess. The first is much faster , but still has a few problems. My suggestion is to use the first one by default, and use the second one if the game freezes or crashes.
The advantage of emulating the RDP and RSP separately is that it is more direct and thus more accurate. It is also, in a way, much simpler, because you don't have to reverse engineer the RSP ucode of each specific games. The drawback is that it's pretty CPU intensive, because the RSP is quite heavy to emulate (and this even though the RSP emulator from Project64 is very well optimized)
What it is not ? Well , this project at the moment doesn't aim at competing with existing mature video plugins like for example Glide64. They have years of development behind them, and as said before , also are much faster. The aim instead is rather to possibly emulate those rare games that no other plugins could emulate fully yet, because the ucode wasn't reversed engineered. And of course, for me to have fun developing it.
Instructions to use it
You need to install in your core emulator plugins directory a few files :
- z64gl.dll the RDP emulator
- z64gl.conf the configuration file
- z64-rsp.dll the slow RSP emulator
- RSPcomp-pj64.dll the much faster RSP emulator based on Project64
To select the RSP plugin, it depends on which core emulator you're using :
- with mupen64, simply select it just like you would select an audio or video plugin
- with Project64, you need to rename the plugin "RSP.dll". Don't forget to backup your original RSP.dll plugin (that is the one provided by the core emulator) before doing that Indeed, the RSP plugins I'm providing won't work with other standard HLE video plugins.
Under Linux, it's similar, but you'll need before that to compile it, just type "make" in the source directory for both Z64 and the RSP emulator.
I am not looking yet for feedbacks about emulation inacuracies. There are still many problems, and they are pretty obvious. However I'm interested in feedbacks related to compatibility with hardware as well as "success stories", that is if you find a game that is actually better emulated with Z64 than with other plugins.
Regarding hardware requirement, you'll need a graphics card with GLSL extensions as well as Framebuffer Objects extension. That means mainly a decent nVidia or ATI card. You'll also need a pretty fast CPU because of the RSP emulation part. Regarding multicore CPU, in the future I plan to emulate the RSP in a separate thread, meaning that multicore CPUs will greatly benefit from it. This is not done yet however.
Finally, it is early development, so in particular there aren't yet any configuration dialog. There is now a configuration file though.
Well, have fun
Below a screenshot of Goldeneye showing the sky, one effect that uses a "non standard" ucode.
EDIT : forgot to include glew32 dll that is required for z64gl.dll. Just install this dll either in your windows installation path, either in the core emulator directory (not in the plugin directory)
EDIT : release R2 that write debug messages into a file called z64log.txt, fix black border texels and possibly crash on exit
EDIT : release R3 (now R4) that should fix crash on exit in Pj64. However, you should toggle windowed mode before exiting a game, otherwise the screen resolution isn't going to be restored until you run a new ROM.
EDIT : release R5 that should fix part of the slowness issues on ATI cards
EDIT : R6 that should fix depth issue introduced in R5 . Now R7 that fixes a second depth issue.
EDIT : R8 possibly fixing another slowness issue on ATI when using certain clamping mode on non power of two sized textures.
EDIT : R9 another attempt at fixing slowness issue for ATI (based on the idea in the test tp2), seems to also speed a bit things on nVidia. Also fix black screen issue in Shadowgate
EDIT : R10 with again more ATI slowness fixes, plus a configuration file called z64gl.conf. This file should be copied into your Plugin/ directory, it allows to select screen resolution as well as other options.
EDIT : R11 with some framebuffer effects, multitexturing and screen setup fixes.
EDIT : R12 fixes in combiner/blender, 2d mapping, zbuffer for triangles in no Z mode, mapping in non perspective mode
EDIT : new version of the modified pj64 rsp plugin (R3). It fixes most differences with the z64-rsp plugin, games that now work fine with it include : Jet Force Gemini, Mario Party, Yoshi's Story , Zelda (these two had not visible problems because there was a hack in the rdp emulator), Telefoot. EDIT now R4 to get rid of a dialog box that pop up in Telefoot.
EDIT : z64 R13 with some texture formats fixes, a new option for video cards that do not support non power of two textures, the hack for the RSP plugin bug is now removed (make sure you use latest rsp plugin) EDIT now R14 to fix stupid bug in the z64-rsp plugin (some leftover debug code causing problems under windows)
EDIT : R15 more combiners improvements and fixes usage of tile #7.
EDIT : R17 now support asynchronous RDP emulation (try it preferably on dual core processors). To use it, set both "threaded" and "async" to 1 in the config file. It's a bit unstable, though once a game is booted successfully it should work well enough. Plus other various improvements.
Source code (r12 - r18) - http://adf.ly/HnLIM
Binary r12 - http://adf.ly/HnLVF
Binary r15 - http://adf.ly/HnLk0
Binary r17 - http://adf.ly/HnLrk
Binary r17(Angrylion custom build, may fix texture glitches in some games) - http://adf.ly/HnMQb
Glew32 - http://adf.ly/HnLwx
Last edited by death--droid; January 23rd, 2013 at 13:03.
April 29th, 2007, 16:51
Another screenshot showing motion blur effect in Conker's Bad Fur Day.
April 29th, 2007, 18:00
Just Another Wacko ;)
April 29th, 2007, 18:25
Yes, I just noticed my mistake, I've added the glew32 dll into in my original post.
I'm currently trying it under windows, it does work with Mupen64 and Project64, however there's a crash on exit with Pj64. That should be easy to fix, I'll do a new release soon.
April 29th, 2007, 18:46
April 29th, 2007, 19:08
Thanks for testing It should be much faster, but it also depends on your hardware of course. What CPU and graphics card are you testing with ? I suspect the problem is with GLSL (pixel shaders). When the GL hardware driver doesn't support a feature, then it fallback to CPU emulation, which is typically 100 times slower.
Originally Posted by PsyMan
I'm using a nVidia 7600Gt (but I tried also on a 6800Gt and it was running fine as well), and an Athlon 64x2 5200 (2.6Ghz, but only one core used by the emulator at the moment). I get usually full speed emulation except in certain very crowded cases.
April 29th, 2007, 19:48
Just Another Wacko ;)
I use an ATi mobility Radeon X600 (it supports shaders v2.0) and a Pentium M 740 (32bit at 1.73GHz).
I believe that something is wrong with the shaders here...
I'm not insane. YOU are insane... You are all insane!
April 29th, 2007, 20:27
Yes, it's most likely a shader problem. If you're ok to do more tests, I'll make a benchmark application to try to pinpoint where exactly the problem is.
April 29th, 2007, 20:54
April 29th, 2007, 22:38
Very Nice! I Love to see new things being developed.
I tried it with Mupen64 and Project64 and both crashed on game load. Maybe I did some thing wrong?
Last edited by toe_head2001; April 30th, 2007 at 04:29.