-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PGA Eropean Tour: gauge STILL not working properly #2834
Comments
This game uses L3DEX2 ucode to draw the line marker
That is line opcode is 0x05. If I change the opcode, it fixes the marker. |
@olivieryuyu, thanks! I checked Glover2! Yes, the line command there is 0x08, as it should be.
Could you check, what these commands are? |
@olivieryuyu Regarding 0x05 line command in PGA Eropean Tour: |
i will have a look to both Glover 2 and PGA. This is going to be a hard work I think. |
Glover 2: D9 is the code for 0xC2 (SDEX v1) = 0x06 (SDEX v2). However there is no uObjTxtr data structure loaded, only uObjSprite. I would not implement those commands because all of them leads to not display anything during the game. Potentially this is a left over of a debug feature using SDEX or a developer was playing with the microcode. Let's not forget that Glover 2 was never published and this is only a prototype. |
About PGA and command 0x05. As per manual, L3DEX allows 1Triangle, 2Triangles, and 1Quadrangle of F3DEX microcodes to be displayed using wireframes. Command 0x05 (G_TRI1) can be used for drawing lines of a triangles. Actually the RSP code takes 2 vertices (v0,v1) and draw the line, then go to the next vertices (v1,v2) and draw the line and then go to the next vertices (v2, v0) and draw the line. So CMD=0x05 W0=0x05020000 W1=0x00000000 should not be unknown by GlideN64. 0x5v0v1v2 You have 3 vertices here: index in vertex buffer 02 (v0). This is also the vertex used for flat shading. As v1 = v2 you have only one line drawn (well the same line drawn twice and a point) Default line with is 0x03 as I understand (I assume 1.5f). This W can be adjusted with the first byte of W1 (this byte is signed) by adding this default value with first byte of W1. You can have as well V10, V11 and V11 in the last 3 bytes of W1 in case of (G_TRI2: 0x06) |
Glover 2: 0x08 works as other games for LINE3D command. 0x08v0v1W example 0x08000203 the code takes here only v0 and v1 in the vertex buffer to draw the line. v0 is also the flag for flat shading. W is the width. It is by default 0x03 (1.5f i assume) and you can add to this W value a signed byte. So in our example we would have a width of 0x06 (0x03 + 0x03). In Glover2 you have also: 0x080002ff 0x00000000 here the width will be then 0x02 (so 1.0f I assume). |
My analysis concerns mainly LDEX2 btw. Can be different in with LDEX and Line3D original code. Will check first LDEX1. |
LDEX1: LINE3D B5000000 The code draws a line of with vertex V0 and V1. V0 is the vertex for flat shading. Width is by default 0x03 (1.5f i assume) and a unsigned byte W can be added to this value. In LDEX2 W0 was used, here it is W1. |
LDEX1: command B1 (TRI2) and BF (TRI1) B1: B1v10v11v12 the code draws line between v10 and v11, then v11 and v12, then v12 to v10, then v00 and v01, then v01 and v02 and finally v02 to v00. the width is fixed to 0x03 (1.5f). There is no W parameters. V10 is the vertex for v10,v11,v12 combination for flat shading BF000000 the code draws line between v00 and v01, then v01 and v02 and finally v02 to v00. the width is fixed to 0x03 (1.5f). There is no W parameters. |
the original fast3d ucode for line is siglthy different than LDEX v1. Will check this. |
Original Line3D (Fast3D): B5000000 same than for LDEX1, except that a flag byte FF is set in the first byte of W1 (for flat shading) If FF = 0x00, V0 is the vertex for flat shading |
Original TRI1 (Fast3D): BF000000 If FF = 0x00, V0 is the vertex for flat shading Width is fixed to 0x03 (1.5f). Then 3 lines are drawn between the vertex. |
hopefully with all my explanation this should solve the issues spotted so far. |
Anything else necessary for this matter? :) |
I think, no. You did quite a research, thank you very much! I'll check and fix all line commands implementations. |
@olivieryuyu I corrected L3D* commands, thanks for the detailed information. I force disabled lighting and got the correct colors.
Is it the same for L3D* commands? Or flat shading is always used, for all commands? |
Ok it is quite a puzzling situation. So far what i can see: Line3D checks out G_SHADING_SMOOTH is set on or not. If G_SHADING_SMOOTH is set on, the colors are the one set for each vertex. For command 0x080002FF 0x00000000, I have geomode 0x00A20405 So G_SHADING_SMOOTH is set on and the colors to be used in this case should be the one for each vertex. I have in this case: 0x202020FF This is dark colors but not may be not black. I would need to check if colors of the vertex are impacted by G_LIGHTING. I assume so far yes. Hard nut |
Ok there is no lighting code in L3DEX2 so there is no lighting computation to be done. This make total sense. as G_SHADING_SMOOTH is set on, you should use the original colors of the each vertex. |
Cool, thanks! |
great! Lot of work for tiny bugs :) |
PR landed. |
@dq6 |
You guys, are awesome! 😃 I couldn't (in name of all gamers of the world) thank you enough for your patience and efforts, making GLideN64 such a miraculous piece of software that it allows playing N64 games directly in Google TV with good speed and that high fidelity... 🙂 Thank you very much! |
There should be TWO white markers in the gauge. Both are fundamental for playing correctly this game. One of them is fixed, but the other one changes its position depending upon the power you want to use for your next swing.
In the Angrylion's screenshot we can see both markers, but with GLideN64, only the first marker -the fixed one- appears. The second one -the really useful- never appears, making this game playable but not enjoyable.
The text was updated successfully, but these errors were encountered: