Comments (5)
Where did you get this input data? It seems to be malformed, the vertex indices are supposed to go in the high word for F3DEX.
glank@glank-pc:~$ cat test.c
#include <stdio.h>
#define F3DEX_GBI
#include "gbi.h"
int main()
{
Gfx gfx = gsSP1Triangle(30, 28, 31, 0);
printf("%08X %08X\n", gfx.hi, gfx.lo);
}
glank@glank-pc:~$ gcc -o test test.c && ./test
BF3C383E 00000000
glank@glank-pc:~$ gfxdis.f3dex -d BF3C383E 00000000
{
gsSP1Triangle(30, 28, 31, 0),
}
It's possible that this is meant to be Fast3D GBI, which does have vertex indices in the low word, but even then it seems to be malformed because the indices are multiplied by ten in the macro, and therefore need to be multiples of ten in the binary;
glank@glank-pc:~$ gfxdis.f3d -i -d BF000000 002C3A3E
{
gsSP1Triangle(4 /* INVALID */, 5 /* INVALID */, 6 /* INVALID */, 0),
}
from n64.
It's not the best source, but the project 64 f3dex source reads it from the lo word for f3dex.
from n64.
I'm working on decompiling Space Station Silicon Valley.
In the US 1.0 ROM:
006924a0: 0400 81ff 802e e650 b100 0204 0006 0008 .......P........
006924b0: b102 000a 0000 060c b10e 1012 0006 1416 ................
006924c0: b118 0e1a 0010 021c b11e 2022 0024 1e26 .......... ".$.&
006924d0: b128 242a 001e 242c b120 2e30 0020 1e32 .($*..$,. .0. .2
006924e0: b134 2836 0038 343a bf00 0000 003c 383e .4(6.84:.....<8>
006924f0: 0400 81ff 802e e850 b100 0204 0006 0208 .......P........
00692500: b102 000a 000c 0e10 b100 1214 0016 0c18 ................
00692510: b10e 061a 001c 1e20 b122 1c24 0026 2228 ....... .".$.&"(
00692520: b11c 222a 001e 2c2e b11e 1c30 0032 2634 .."*..,....0.2&4
00692530: b136 3238 003a 363c bf00 0000 002c 3a3e .628.:6<.....,:>
from n64.
/***
*** 1 Triangle
***/
#define gSP1Triangle(pkt, v0, v1, v2, flag) \
{ \
Gfx *_g = (Gfx *)(pkt); \
\
_g->words.w0 = _SHIFTL(G_TRI1, 24, 8); \
_g->words.w1 = __gsSP1Triangle_w1f(v0, v1, v2, flag); \
}
#define gsSP1Triangle(v0, v1, v2, flag) \
{ \
_SHIFTL(G_TRI1, 24, 8), \
__gsSP1Triangle_w1f(v0, v1, v2, flag) \
}
from n64.
You're right, this seems to stem from a incorrect implementation of SP1Triangle for F3DEX in the GBI header.
from n64.
Related Issues (10)
- install_dep installs incorrect binaries on MSYS2 HOT 3
- Gru doesn't build with Lua 5.4 and above HOT 1
- Handling gsSPLine3D from Mario Kart 64 HOT 4
- B1 op code to `gSP2Triangles` HOT 1
- Innaccurate gfxdis F3DEX output
- No support for `gSPFogPosition` command & inaccurate combine/LERP HOT 3
- install-toolchain troubles HOT 2
- Bug when decoding `gSPSetOtherMode`/`gsSPSetOtherMode` macro on `gfxdis.f3dex`
- Checking for Suffix of Object Files Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n64.