What's new

Z64 - a LLE graphics plugin

Emu&Co

Fuggin Retro Fan
Hi, I have Problems unning this Plugin on Pj64 1.6 and Pj64 1.7. When starting a game,the emulator just exits. I have a ATI Mobility Radeon x300 and yes I tried no_npot_fbos = 1. Any experienes with that? Any ideas?
 

PsyMan

Just Another Wacko ;)
Use the modified RSP ziggy attached on his first post. The default PJ64 v1.6 RSP will not work. Avoid using the v1.7 RSP since it has problems with z64 (it IS a WIP BETA anyway).
 

angrylion

New member
Ziggy, are you still working on this outstanding plugin?
Would be nice if you threw some light on future improvements or something.
Actually I can't wait for a day when World Driver Championship will show something (it's not a request of course).
 
OP
Z

ziggy

New member
I am not doing any work on Z64 at the moment. Real life is taking over, I need to find a job and a new place to live :)

I may or I may not work again on this project in the future, but I cannot know for sure at the moment. In any case, the source is available, so anyone is free to toy with it.

One thing that I know need to be improved, but I haven't work out yet , is the emulation of coverage. The RDP handles antialiasing in a particular way, some informations called "coverage" is stored in the framebuffer (but most of it isn't actually available to the programmer, because it's stored in "hidden" bits of the memory of the N64 (bits normally used for CRC)) Some effects rely on this coverage processing being precisely emulated. This point is my top priority, but it's a delicate problem : emulating it exactly with a 3D card isn't really an option, so instead it requires to find a trick to get a similar result but still allow to use 3D acceleration.

The other point I'd like to improve is taking advantage of multiple CPUs on the emulating host. To go further in this direction, I'd need a core emulator with a debugger (because synchronisation between the Mips, the RSP and the RDP is not completely understood yet (at least by me)), preferably open source. I know Hacktarux started to work on this for Mupen64, so if he finishes it some day, I might start again working on this problem.
 

chadernook

New member
Hi,

This is my first time posting here, though I have popped my head in and out from time to time over the years I probably haven't gained an appropriate amount of lurking but, hi.

I have written a (linux for the time being) N64 emulator. I've never managed to get around to releasing it though (never really knew how to actually do the releasing part). The reason I decided to announce it here and now is because I believe that I might finally be able to finish it.

It was originally conceived as a network transparent emulator: the emulator runs as a server daemon on a server, you have your various inputs and outputs, graphics, sound and controllers that 'plug-in' to the server over a network.

I wrote the server: the main emulator to try to be a simplified, low level, interpreting emulator that would be vaguely future-proof and run anywhere with no dependencies. It worked well and had to my mind easily better stability than anything else on Linux. I then decided that the next thing to do was the graphics. Big mistake, because trying to wrap my head around the upsetting variety of ucodes burned me out. That was two years ago. I did rewrite the core completely about six months ago, it was noticably faster but I am still yet to get around to implementing address error exceptions and the corresponding TLB reload on the rewritten version (Goldeneye doesn't yet work).

I just think that this new paradigm of chip emulation might be a little more amenable to being mangled through a network layer. Or have I misunderstood something really badly?

Ziggy, I did think at one point of writing a 'proper' debugger under ncurses, is that the kind of thing you're after?
Also, has anyone compiled and tried Ziggy's work under native amd64/x86_64?
Last thing, does anyone still care about new emulators? As it is it doesn't really do anything Mupen doesn't (apart from maybe run native under 64bit Linux).

Thanks
(Sorry if this is too OT)
 
OP
Z

ziggy

New member
Squall is right, this thread is still open and there's a reason for it ;)

Chadernook, sorry for not answering more longly and earlier to your message. Your project might be interesting, I'd say, the best you can do is release something, so that people will be able to see what you did :)
 

angrylion

New member
Glad to hear something from you, Ziggy!
I also learnt that your rsp.cpp was borrowed from MAME. MooglyGuy has already tested some opcodes against real N64 through NUTS. His results are available at http://mooglyguy.hamsta.com/opcodes.html. He has made one-line-long corrections to VRCP, VRCPH, VRCPL, VRSQL and VRSQH code that are explained on the page I linked to, but not yet implemented in the current source code of Z64. So it may be a good idea to change your rsp.cpp to conform with MooglyGuy's finds. I tried to introduce these changes myself, compiled new Z64 RSP binary and this new build didn't break any games I tested (although no improvements I've seen so far, either).
EDIT: A funny bug I spotted recently. Automobili Lamborghini, Quake II and Roadsters Trophy - these 3 games do not normally work under Z64. They just show a blank screen. But if you run them with Z64 debug version (the latest is based on R13), press "P" and then press "-" or "+" a couple of times, you'll see that rendering actually happens. But it renders to some frame buffer (or back buffer, whatever), not to the primary surface. So an experienced coder (or Ziggy himself, if he returns) would be able to fix these 3 games quite easily. I recommend you to set fb_info=0, threaded=0, async=0, and to use Z64 RSP r17 plugin. Otherwise you may not see this behaviour. Screenshots attached.
 
Last edited:

X-Fi6

New member
Since this is so CPU-intensive, I'm guessing using Richard42's 64-bit Mupen64 on an AMD64 with XP x64 Edition should make it go faster? :)
 

angrylion

New member
I've modified Ziggy's RSP plugin a bit and managed to get further in World Driver Championship and Stunt Racer 64. These games are playable now, geometry is perfect. There's some texture corruption, though.
What did I modify:
- switched the plugin back to interpreter, as it was in MAME
- added RSP interrupt handling in cases when interrupt is triggered by MTC0, which Ziggy omitted (dunno why)
- I force the plugin to exit an infinite loop which it enters because of Zilmar's RSP spec's drawback. The spec doesn't allow CPU to write into signal flags while RSP operates. As you may have thought, it is a dirty game-specific hack.
- added Mooglyguy's opcode fixes for VRCP, VRCPH, VRCPL, VRSQL and VRSQH.

Required configuration:
Emulator: Project64 1.5
Sound plugin: Jabo's plugin bundled with Project64 1.5
Graphics plugin: z64gl r17 properly set up (don't ask how, it was explained many times)
It's settings in z64gl.conf: hires_fb=1, threaded=1, async=1
RSP plugin: RSP.DLL, the build I've attached. Put it into plugin directory and overwrite any other RSP.DLL.
World driver championship also requires the following. While in rom browser right-click on this game, select "Edit game settings" and set "CPU Core Style" field to Interpreter.


Version history:
Version 1: some 3D in World Driver Championship.
Version 2: both games are playable using the aforementioned configuration.
Version 3: 80% speed boost (still very slow). Now it's hopefully safe to use this plugin with other games, besides these two (still it's not recommended).






VERSION 3 DOWNLOAD LINK
http://w14.easy-share.com/15021281.html
Source code: http://w14.easy-share.com/1699574214.html
 
Last edited:

MooglyTwo

New member
Ziggy, I'm interested in finally backporting your fixes to MESS / MAME. Unfortunately, in order to support hardware acceleration the RDP functionality seems to have undergone a fairly radical rewrite, to the extent that I cannot easily determine specifically what behavioral changes you've made under the hood.

With that in mind, could I convince you to contact me via any of the means listed here - http://mooglyguy.hamsta.com/n64.html - with a synopsis of any and all of the bugs that you've fixed, and how?

Thanks in advance.
 

squall_leonhart

The Great Gunblade Wielder
Use the modified RSP ziggy attached on his first post. The default PJ64 v1.6 RSP will not work. Avoid using the v1.7 RSP since it has problems with z64 (it IS a WIP BETA anyway).

btw Psyman, when set correctly, 1.7 and 1.7 RSP do a better job with Ziggy's plugin then 1.6 and the custom RSP.
 

angrylion

New member
A new version of my RSP hack for World Driver Championship. It doesn't improve graphics. But now you don't need cheats or savestates to load. It also doesn't crash while ingame (as far as I've tested) nor after Midway's billboard appearance.
Remember that you must use the emulator and plugins I recommended earlier. Not only you must set threaded=1, async=1, but also hires_fb=1.
EDIT: The updated link is in post#354
 
Last edited:

MasterPhW

Master of the Emulation Flame
A new version of my RSP hack for World Driver Championship. It doesn't improve graphics. But now you don't need cheats or savestates to load. It also doesn't crash while ingame (as far as I've tested) nor after Midway's billboard appearance.
Remember that you must use the emulator and plugins I recommended earlier. Not only you must set threaded=1, async=1, but also hires_fb=1.
Don't try to improve graphics by tweaking emulator settings or graphics plugin's settings, it won't happen. It looks ugly because it executes only about a half of the ucode with my hack, or maybe even lesser part.

http://w14.easy-share.com/14488331.html

Hmm...Emutalk fails to attach today...
It's great to see a relatively new member come with such stuff. Keep it up and probably Ziggy will also have good use of these stuff.
 

squall_leonhart

The Great Gunblade Wielder
Well, they sure didn't 6 months ago.

it hasn't been updated for 6 months and it works fine for me.

games like rogue squadron require that the Core be set to interpreter, and to do that properly you need to set it both in the Core settings and Debug settings, which most of the testers don't even have enabled. once thats done it boots fine. the current plugin version though doesn't show the title menu properly though for some reason.

anyway, once you get past the opening menu and into the select screens you can re-enable Recompiler and rogue squadron works at perfect speeds.
battle for naboo has issues in the plugin itself though.
 

Top