Git Product home page Git Product logo

gifscript's Introduction

# 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.

gifscript's People

Contributors

f0bes avatar

Stargazers

 avatar André Guilherme avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.