What's new

LLE Graphics Plugin

nephalim

Psychic Vampire
I am looking for a project to start my programming on (yeah, I know i'm starting high, but that's just what I do...bit by bit, i'll get there.)

I'm not interested in doing an HLE plugin. I want to do a LLE Plugin (as i've never programmed an emulator before, nor a 3D engine neither. Yeah, i've got my work cut out for me. I do know 3d Modelling and animation though! Just not the engine aspect of it.)

Anyways, before the flames begin, just answer some simple questions..that's all i'm asking.

LLE Cpu exist. Nemu. Nemu, however, I don't think supports plugins. Oh well.
LLE RSP...I think they are all that way, but not sure.
LLE Controller...i'm nearly positive that's how they all are.
LLE Sound...most definetely (Jabo's, I believe.)

LLE Graphics...here's the one that's missing. The big question is, is it feasible? Can today's computer's handle it? Will it dramatically increase compatibility and/or programming difficulty (which of course in turn will increase compatibility:)
 

euphoria

Emutalk Member
nephalim said:
I am looking for a project to start my programming on (yeah, I know i'm starting high, but that's just what I do...bit by bit, i'll get there.)

I'm not interested in doing an HLE plugin. I want to do a LLE Plugin (as i've never programmed an emulator before, nor a 3D engine neither. Yeah, i've got my work cut out for me. I do know 3d Modelling and animation though! Just not the engine aspect of it.)

Anyways, before the flames begin, just answer some simple questions..that's all i'm asking.

LLE Cpu exist. Nemu. Nemu, however, I don't think supports plugins. Oh well.
LLE RSP...I think they are all that way, but not sure.
LLE Controller...i'm nearly positive that's how they all are.
LLE Sound...most definetely (Jabo's, I believe.)

LLE Graphics...here's the one that's missing. The big question is, is it feasible? Can today's computer's handle it? Will it dramatically increase compatibility and/or programming difficulty (which of course in turn will increase compatibility:)

If i remember correctly azimer once talked something about that jabo/zilmar had done a lle gfx plugin but it was horribly slow and therefore never released to public.
Not trying to discourage you or anything but i think that if it had been a "good" way of doing things it would've been done.
 

Doomulation

?????????????????????????
LLE gfx is incredibly slow and wouldn't operate full speed at our current computers. Not to mention all those with low-end specs still :plain:
And as for that, a LLE gfx plugin is much more advanced than HLE due to that documentation for it simple doesn't exist! Well, not as much as for HLE at least.

And the n64 isn't an easy console to emulate either.
 

Tagrineth

Dragony thingy
An LLE graphics plugin would have to be 100% software (well, OK, maybe you could offload SOME rasterisation but still...).

A Riva TNT puts a 3.06GHz P4 to shame at rendering (turn on bilinear filtering and any x86 CPU just dies).
 

Rice

Emulator Developer
Tagrineth said:
An LLE graphics plugin would have to be 100% software (well, OK, maybe you could offload SOME rasterisation but still...).

Right, maybe you can do LLE in RSP and RDP, but leave rasterisation be HLE.
 

Hacktarux

Emulator Developer
Moderator
nephalim said:
LLE Graphics...here's the one that's missing. The big question is, is it feasible?

yes but i'm not sure that jabo's rsp plugin is able to handle all ucodes correctly, the rsp interpreter seems more accurate but it can still have some problems afaik... Understanding lle triangles commands is also pretty hard...

Can today's computer's handle it?
Probably not with current rsp plugin... Even if the compiler was accurate enough i think it would still be too slow.

Will it dramatically increase compatibility and/or programming difficulty (which of course in turn will increase compatibility:)

Nope, hle plugins are very compatible now, so it would only thing missing ucodes which are only used by very few games ( i believe less than 20).

The plugin itself shouldn't be much harder to program than a hle one but you have to deal with the rsp problems...
 

Laahel

New member
Tagrineth said:
An LLE graphics plugin would have to be 100% software (well, OK, maybe you could offload SOME rasterisation but still...).

A Riva TNT puts a 3.06GHz P4 to shame at rendering (turn on bilinear filtering and any x86 CPU just dies).

interesting, i just asked a question in the way about mame the other day, and i was answered that LLE could be done throug hardware acceleration .... and that hardware acceleration doesn't mean HLE ....
 

Tagrineth

Dragony thingy
As I said, some raster could be offloaded. But for LLE, mostly due to N64's really weird architecture, a lot would have to stay on the CPU.
 

Reznor007

New member
A fully LLE N64 emulator can be done on current computers.If you write a LLE CPU emulator using a dynarec method, and the same for the RSP, you could then offload the rendering to a 3d card. Playstation emulators do the same thing. Nebula Model 2 also does this, but simulates the T&L right now(although it can be turned off if El Semi wants to).

However, I don't think current N64 emulators would be able to work with a LLE plugin as they are now. It would probably take a new plugin system.
 

Hacktarux

Emulator Developer
Moderator
Reznor, there's really no need for a new plugin system... what we need is plugins that's all...

And yes pj64 have lle emulation of both r4300 and rsp using a dynarec but it's still not fast enough to process dlist at fullspeed.... even if you're using an empty gfx plugin that display nothing. So the problem isn't to use 3d acceleration or not, really.
 

Reznor007

New member
I was under the impression that the LLE RSP plugin was interpreter only, and that the dynarec version used HLE. Is it possible that the LLE path isn't optimized? As at least one MAME dev has said that a fullly LLE dynarec N64 emu would only need 1-1.5GHz. That was the person that did Sega System32, Sega Model 1, and Konami System GX.

On a side note, Aaron Giles added dynarec to his MIPS R5000 and MIPS R4600 cores for MAME, so now Killer Instinct will run full speed on a 1.33GHz system(and this includes full emulation of the ADSP2105 instead of simulating it like U64emu).
 

Hacktarux

Emulator Developer
Moderator
Reznor007 said:
I was under the impression that the LLE RSP plugin was interpreter only, and that the dynarec version used HLE. Is it possible that the LLE path isn't optimized? As at least one MAME dev has said that a fullly LLE dynarec N64 emu would only need 1-1.5GHz. That was the person that did Sega System32, Sega Model 1, and Konami System GX.

On a side note, Aaron Giles added dynarec to his MIPS R5000 and MIPS R4600 cores for MAME, so now Killer Instinct will run full speed on a 1.33GHz system(and this includes full emulation of the ADSP2105 instead of simulating it like U64emu).

Hmm read this:
HLE: means no interpreter, no dynarec but c functions to simulate a library...
Interpreter or dynarec means LLE

Jabo's compiler is already highly optimized even if i think there's a possibility for a small improvement room... When i use it in 1964 with no gfx plugin and that i process dlists i get 5 vi/s instead of 30 on my athlon 1GHz...

And you shouldn't forget that the gfx part is very complex on the n64 and should take a lot of cpu power... Most of the problems that current hle plugins have aren't caused by hle but by complex combiner commands and other things that need to be emulated as well in a lle plugin...

Now it's still possible to write a lle plugin for fun, but it won't be usable at fullspeed ;)
 

tooie

New member
The problem is that the n64 hardware works differently then the pc hardware .. so when you change it from low level instruction oposed to dlist, your forcing the PC to work in a way it is not designed .. so it becomes extremly slow, try the refrence drivers for dx ... that is basicly what your trying to do .. by taking it at a high level you can change that method ..

I remember talking about it before .. it came to the conclusion you need about 4-6 ghz machine for real time lle gfx
 

Reznor007

New member
Hacktarux said:
Hmm read this:
HLE: means no interpreter, no dynarec but c functions to simulate a library...
Interpreter or dynarec means LLE

Jabo's compiler is already highly optimized even if i think there's a possibility for a small improvement room... When i use it in 1964 with no gfx plugin and that i process dlists i get 5 vi/s instead of 30 on my athlon 1GHz...

And you shouldn't forget that the gfx part is very complex on the n64 and should take a lot of cpu power... Most of the problems that current hle plugins have aren't caused by hle but by complex combiner commands and other things that need to be emulated as well in a lle plugin...

Now it's still possible to write a lle plugin for fun, but it won't be usable at fullspeed ;)

I know what HLE is. But there is no reason an N64 emulator should need more than 3GHz for full LLE emulation(that is if you use a dynarec CPU core and hardware rasterization).

Even Carnevil in MAME (R5000@150MHz+ADSP sound+3dfx) only needs 6-7GHz in interpreter mode with software rendering. Switching to a dynarec core for the MIPS CPU would make it about full speed on a 3GHz system.

Since N64 is just a MIPS R4300i with a MIPS based coprocessor, there is no reason it should need massive amounts of power.
 

Hacktarux

Emulator Developer
Moderator
Reznor007 said:
I know what HLE is. But there is no reason an N64 emulator should need more than 3GHz for full LLE emulation(that is if you use a dynarec CPU core and hardware rasterization).

Even Carnevil in MAME (R5000@150MHz+ADSP sound+3dfx) only needs 6-7GHz in interpreter mode with software rendering. Switching to a dynarec core for the MIPS CPU would make it about full speed on a 3GHz system.

Since N64 is just a MIPS R4300i with a MIPS based coprocessor, there is no reason it should need massive amounts of power.

Does any of the systems you're talking about are using simd processors ? This is the problem with the rsp coprocessor, the microcodes that are run on it is mainly based on simd opcodes which are exclusive to the rsp and also undocumented... That's why you shouldn't only call the rsp a MIPS based coprocessor... To give you an idea generally 50 simds opcodes are excuted for one standard MIPS opcode.

Also you're still forgetting the gfx part. Even with "hardware rasterization", pc hardware isn't designed to handle gfx like the n64 do it... Anyway as long as no rsp plugins is fast enough to run at full speed gfx tasks with dummy gfx plugin, there's no point to talk about gfx...
 

grand master

Emualtion Pimp
Listen these guys have been emulating the n64 hardware for years. Let the mame ppl continue to emulate arcades and let the experts here emulate the n64.

It is easy to say that this and this can be done when you have never actually really looked at the console and are comparing it to an arcade system that is different.

Prehaps you are right in saying that it shouldnt need heaps of power for lle n64 emulation but how gives a sh*t??
The current emualtion that is achieved by the plugin system and hle is great to damn near perfect. I mean what use is it to start from scratch with lle??
 

Reznor007

New member
Hacktarux said:
Does any of the systems you're talking about are using simd processors ? This is the problem with the rsp coprocessor, the microcodes that are run on it is mainly based on simd opcodes which are exclusive to the rsp and also undocumented... That's why you shouldn't only call the rsp a MIPS based coprocessor... To give you an idea generally 50 simds opcodes are excuted for one standard MIPS opcode.

Also you're still forgetting the gfx part. Even with "hardware rasterization", pc hardware isn't designed to handle gfx like the n64 do it... Anyway as long as no rsp plugins is fast enough to run at full speed gfx tasks with dummy gfx plugin, there's no point to talk about gfx...

There is nothing special about the N64 rasterizer. It was designed by Silicon Graphics, and anything it can do is available via OpenGL.

As for the CPU stuff, the sound system used by Carnevil eats up almost 1GHz on it's own(ADSP2115 DSP chip), plus a MIPS R5000@150MHz(more advanced+50% faster clock than N64).

In emulation, Carnevil runs at 50-75% speed on a P4 3.06GHz in full interpreter mode using software emulation of the 3dfx chipset it uses(equivalent to Voodoo2). NFL Blitz '99 runs about 20-30% because it uses alot more 3d rendering. Speeds with the new dynarec support haven't been posted...although results with KI arcade(R4600@100MHz+ADSP2105@10MHz) show an almost 3x speed improvement.

And since the MAME guys will eventually have to support N64(for Mickie's Tetris or something...used N64 hardware), we will see how fast they can do it. Probably won't happen too soon, since the game isn't dumped(AFAIK) and I doubt someone would want to write a driver for just 1 game.
 

Reznor007

New member
grand master said:
Listen these guys have been emulating the n64 hardware for years. Let the mame ppl continue to emulate arcades and let the experts here emulate the n64.

It is easy to say that this and this can be done when you have never actually really looked at the console and are comparing it to an arcade system that is different.

Prehaps you are right in saying that it shouldnt need heaps of power for lle n64 emulation but how gives a sh*t??
The current emualtion that is achieved by the plugin system and hle is great to damn near perfect. I mean what use is it to start from scratch with lle??

Why? To properly emulate the system for one...

To be fair, current N64 emulation does have fairly high compatibility, but nearly every game has SOME issue somewhere. I wouldn't call it damn near perfect.
 

Hacktarux

Emulator Developer
Moderator
Reznor007 said:
Why? To properly emulate the system for one...

To be fair, current N64 emulation does have fairly high compatibility, but nearly every game has SOME issue somewhere. I wouldn't call it damn near perfect.

True, but it wouldn't be solved by lle... Basically the only things that is done via hle is t&l and i don't think there's many games with issues in this area...

And no, gfx on the n64 is not based on ogl... Some particular things still reminds that it's done by sgi but that's all.

btw i've looked at this adsp thingy in mame source code and it seems like nothing compared to rsp processor... I can't believe it takes 1GHz... Well i may be wrong but it's not using any simd and you say it's running @ 10MHz.
 

Top