Coder Social home page Coder Social logo

Comments (6)

NicholasMoser avatar NicholasMoser commented on August 25, 2024

@Athkore mentioned in #96 trying to simplify SEQ operands like *seq_p_sp->field_0xC, especially in cases where we know the names. Based on your comments, here's what I see as the list of ways we could change it:

  1. seq_p_sp->field_0xC
  2. *seq_p_sp->field_0xC (this is what we have today)
  3. seq_p_sp(0xC)
  4. *seq_p_sp(0xC)
  5. seq_p_sp (0xC)
  6. *seq_p_sp (0xC)
  7. 0xC (seq_p_sp)
  8. 0xC(seq_p_sp)
  9. seq_p_sp[0x3]
  10. *seq_p_sp[0x3]

And for names fields maybe something like:

  1. seq_p_sp->flags

Do you have a preference for the 10 options I listed above? If you provide an order of preference we can choose the one that you and I like the most.

from gntool.

NicholasMoser avatar NicholasMoser commented on August 25, 2024

Also worth considering how to simplify something like this:
*seq_p_sp->field_0x38 + offset 0x23C
which happens to be the current action id of a character

from gntool.

Athkore avatar Athkore commented on August 25, 2024

To simplify *seq_p_sp->field_0x38 + offset 0x23C, the simplest would probably be to replace seq_p_sp with the known field name, and if unknown replace as s(number being operand given to seq_regcmd - 0x18), or even as r(number being operand given to seq_regcmd). So this specific example could be something akin to chr_p(0x23C) or chr_p->action_id (sE->field_0x23C if both unknown).

From what I can discern, all fields in seq_p_sp are 4 bytes in size, and they work pretty much like and extension to reg_p, so that they combined contain 0x3F registers, with registers 0x00-0x12 are general purpose, while registers 0x13-0x3f are all special purpose registers. Knowing that they belong to different structures don't add anything really to functionality when looking at it from the angle of writing seq codes. I still feel that keeping them as different kinds of registers would be beneficial.

As for ordering of notation, I feel kinda similar, except for being a bit partial of treating seq_p_sp fields like registers, and keep them in the naming. I believe something like that would cut down tremendously on verbosity, while still keeping things apart at a glance.

  1. s3
  2. s3(0x0)
  3. s3->field_0x0
  4. seq_p_sp->field_0xC
  5. *seq_p_sp->field_0xC (this is what we have today)
  6. seq_p_sp(0xC)
  7. *seq_p_sp(0xC)
  8. seq_p_sp (0xC)
  9. *seq_p_sp (0xC)
  10. 0xC (seq_p_sp)
  11. 0xC(seq_p_sp)

from gntool.

Athkore avatar Athkore commented on August 25, 2024

I have a new idea with regards to making assembling easier, keep the seq_p_sp name but give it the same treatment as gpr.
So for seq_p_sp->field_0xC, it would be seq_p_sp12.

from gntool.

NicholasMoser avatar NicholasMoser commented on August 25, 2024

So for seq_p_sp->field_0xC, it would be seq_p_sp12.

That sounds good to me!

from gntool.

Athkore avatar Athkore commented on August 25, 2024

I didn't think properly when I wrote the last one, I meant for seq_p_sp->field_0xC to be seq_p_sp3, since they're only reachable 4 byte aligned. But I can definitely work with seq_p_sp12 as well, just need to rename a bunch of stuff

from gntool.

Related Issues (20)

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.