Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kh2vif
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GovanifY
kh2vif
Commits
ef0937b8
Unverified
Commit
ef0937b8
authored
8 years ago
by
Gauvain Roussel-Tarbouriech
Browse files
Options
Downloads
Patches
Plain Diff
Well I guess that's that
parent
0b8d7787
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
obj2kh2v.c
+15
-1
15 additions, 1 deletion
obj2kh2v.c
with
16 additions
and
2 deletions
README.md
+
1
−
1
View file @
ef0937b8
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
obj2kh2v.c
+
15
−
1
View file @
ef0937b8
...
...
@@ -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\n
stmask 0xf3f3f3f3; Sets mask register(3303, check EEUSER_E)
\n
stcycl 01, 01; We write code to memory without skips/overwrite
\n\n
unpack 4, 128, S_8, 0, *; Vertex indices
\n
"
;
for
(
int
i
=
0
;
i
<
vi
+
1
;
i
++
){
dsm
<<
".byte "
<<
i
<<
"
\n
"
;}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment