f0bes / gifscript Goto Github PK
View Code? Open in Web Editor NEWA GS packet transpiler.
License: MIT License
A GS packet transpiler.
License: MIT License
# gifscript, a GS packet transpiler. View the examples directory for, well, examples. Documentation is located [here](https://github.com/F0bes/gifscript/wiki) ## What problem does this solve? At the moment, nothing really. It's just a little abstraction over writing gif packets manually. I only started this project to learn how to write a lexer and parser. Eventually it would be interesting to create another frontend (lexer) that takes in binary data and make this into a bidirectional transpiler. This could end up being a nifty debug tool for PS2 GS development. ## Task List: - Output to a file, not just stdout. (Done) - Support more registers / modifiers. - Macros inside of macros. (Done) - Dynamic variables / arguments for macros, instead of just fixed xy offset. - Fix memory leaks. Look into smart pointers for register allocation. (done) - External variable support. Design is still under thought. - Binary data backend. - Support PACKED formats when available. - Heuristic for REGLIST / AD precision problems. - Move first PRIM into GIFTAG.(done) - Optimizations? IE: cull writes to a register that has no side effects twice. (first pass system done) - Handle super sized gif packets that require more than one packet. - Errors needs to propagate back instead of continuing in an error state. (kind of done) ## Design Details This may be incorrect by the time you read this. But here is the outline of how gifscript works. The frontend (gifscript.rl), powered by ragel, takes in the file data and tokenizes it. The tokens then get sent to the parser (parser.y), powered by lemon. The parser then communicates with the "machine" (great name, I know) which handles gif blocks, macros and various state. When it is time for the block to be emitted, the machine calls the current backend, which contains the logic for how to represent the block in the output format.
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.