What's new

U-Code ?!?

N-Rage

New member
Since there so many Ppl working on their Plugin now I dare to ask what exactly does a U-Code do?
I know its the RSP-Microcode, but what does it exactly - Vertex-Transformation&Lighting ( I think the Color-Ops are fixed ) ?

And how is it configurable - does it automatically process DisplayLists or can you configure kinda like own OpCodes?

Just wouldda like to know out of Interest :blush:
 

Hacktarux

Emulator Developer
Moderator
I will try to explain what the rsp does but not sure if it will be understable ;)

As you may know the n64 has a chip responsible of producing sound and graphics : the RCP. You can consider the RCP as two different chips : the RSP and the RDP. Now what these two chips do ?

The RDP handle display lists : you just have to configure the start and the end of the display list and the RDP interpret it and display the result.

The RSP is a processor similar to the main one (a r4300). The difference is that it doesn't have floating point instructions, 64 bit instructions and some other ones. It also have SIMD instructions (like MMX). Another difference is that it can't access the main memory, it can just access its own memory area. This processor usually execute a library called a ucode (which is loaded in the rsp memory area). A ucode execute more complex command than the RDP. It handles a ucode display list and convert it into a RDP display list and nothing else.
For each ucode display list command, if it is a simple one that can be handle directly by the RDP it just have to copy it to the RDP, if it is a complex one, it have to convert it into several RDP commands.
The RDP can only draw 2D rectangle and triangles and some simplistic action. The ucode handle all the 3d transformation, lighting...

This is the main purpose of the RSP, but it can be used to do other tasks because it is just a processor : it is used in a similar way to process audio lists, decompress jpeg images...

hope that this will help to understand how things work :)
 
OP
N-Rage

N-Rage

New member
so if i understand this right the u-code is rather more a classic subroutine than a processor-microcode. So RSP & RDP share a Memory region i spose.. since they cant access main memory but they have to communicate. Or are they even piped so that you cant access RDP directly?

Thanx for the good read anyway =)
 

Hacktarux

Emulator Developer
Moderator
It is possible to access RDP directly, but i have never seen any rom that do it.
The RSP can't acces main memory directly but it can read from memory and write to by a dma. The RDP can read display list from main memory. The RSP can also write to RDP registers.

To sum it up, for each task:
- The RSP loads the ucode
- The RSP read a ucode display list from main memory via a dma.
- The RSP process this display list and write each RDP command via a dma to the main memory.
- The RSP write to RDP registers so it can execute the display list.

Think i've not forgotten any important thing :)
 

Ogy

3Dfx Fanatic.
N-Rage, hope on to IRC in #Glide64 (EFnet) and talk to dave, trust me you'll get all your questions answered, and meet a really nice guy :)
 
OP
N-Rage

N-Rage

New member
Ogy said:
N-Rage, hope on to IRC in #Glide64 (EFnet) and talk to dave, trust me you'll get all your questions answered, and meet a really nice guy :)

Im behind a firewall during the day - mirc is a no-go.
Getting teached Java here, Im already sick of it ;)
I need my Pointers!
 

Top