peterlemon / psx Goto Github PK
View Code? Open in Web Editor NEWPlayStation Bare Metal Mips Assembly Programming
PlayStation Bare Metal Mips Assembly Programming
Hello,
your repo is really useful, and I'm finding it the best way for learning about pure assembly development on the PSX. I was able to modify the code part of some examples to do a bit of practice, but I'm currently struggling to understand something that's probably very trivial: how would I render triangles in 3D space (not in 2D), instead of the quads that are used in the Cube example; first to display very simple objects like a prism, and then possibly much more complex models, using the included ASM functions?
Looking in the .asm and .inc files, I found a function apparently analogous to ShadeTexQuadCullBackZSort
but for triangles, ShadeTexTriCullBackZSort
. If I understood correctly by reading the code, it should work with a data structure similar to the cube one, but without the attributes related to point 4 (since we're dealing with triangles and not rectangles)... however, no matter what I've tried, I can never display even a single triangular face correctly, and always have either glitches or nothing at all on screen. I don't really have code to post, because what I did is swap the macro call in the cube demo for the other one, modify the cube data structure to omit every segment that relates to the 4th point, leaving only the first 3, and then attempting (many, many times) to write multiple 3-point coordinates that I would think make sense for a triangle face.
On the Internet, many materials can be found about rendering complex 3D objects on the PSX, but they all relate to C development with various SDKs and not pure ASM development.
If possible, it would be nice to get some example code for drawing a simple triangle-based 3D object, like a pyramid or a prism as I said. Having that hard part as a base, it will be really easy to convert and draw any complex 3D object. I would really appreciate it.
Thank you for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.