Unverified Commit ef0937b8 authored by GovanifY's avatar GovanifY
Browse files

Well I guess that's that

parent 0b8d7787
......@@ -5,7 +5,7 @@ It's as dirty as it can get and doesn't even include VU1 assembler
for now but eh, it kinda works.
Oh btw when I mean it kinda works datas are roughly placed, I just made the
tool in a day. It is still missing header reconstruction, UV mapping, fixing some unpack
tool in a day. It is still missing header reconstruction, fixing some unpack
commands and all, just figured I would upload this before I lose it
Good luck for understanding the code btw, should stop working
......
......@@ -3,6 +3,7 @@
#include <string>
#include <fstream>
#include <sstream>
#include <math.h>
int flag(int x, int y, int z) {
int flagx = x;
......@@ -26,7 +27,20 @@ int main(int argc, char* argv[]){
vi++;
}
}
for(int i =0; i<vi+1;i++){dsm << ".short 0xffff, 0xffff\n";}
in.clear();
in.seekg(0, std::ios::beg);
while (getline(in, line))
{
if (line.substr(0,3) == "vt ")
{
std::istringstream s(line.substr(3));
float u, v;
s >> u; s >> v;
dsm << ".short " << int(round(u*4095)) << ", " << int(round(v*4095)) << "\n";
}
}
dsm << ".EndUnpack\n\nstmask 0xf3f3f3f3; Sets mask register(3303, check EEUSER_E)\nstcycl 01, 01; We write code to memory without skips/overwrite\n\nunpack 4, 128, S_8, 0, *; Vertex indices\n";
for(int i =0; i<vi+1;i++){dsm << ".byte " << i << "\n";}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment