Banner
Views: 436,308,506
Time: 2016-07-25 07:48:23 PM
30 users online: o 1UPdudes, 33953YoShI, Alcaro, autisticsceptile1993, Barnowl, o Erik557, o Ersanio, GeminiSunfall, Jeffmoncada14, o K3fka, KingKoopshi64, Kinopio, LDA, leod, Lightvayne, Mandew, Mario1989, MarioFan22, MercuryPenny, Merthacks, nathanrayman1998, OmegaYoshi, Prizm, Suika Ibuki, Theultimate12, o TRS, o underway, Vitor Vilela, Y.Y., Zekrom PKstarship - Guests: 50 - Bots: 179Users: 29,350 (1,242 active)
Latest: albertotito99
Tip: Don't remake levels from other Mario games, especially popular ones (SMB1/3 1-1, for example).Not logged in.
ASM Modulus?
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - ASM Modulus?
Pages: « 1 »

Jiggles!
How would you go about doing a modulus in asm anyway? XD I am makeing a sprite that I think will use the X coord as a peramiter like some of the normal ones do.
Jiggles the Catgirl!Stranded
One of these days I will come up with a good sig. But not today.
New blog! Read read read!
The SNES has hardware multiply / divide (with remainders).

Code
4204  wl++++ WRDIVL - Dividend C low byte
4205  wh++++ WRDIVH - Dividend C high byte
        dddddddd dddddddd
4206  wb++++ WRDIVB - Divisor B
        bbbbbbbb

        Write $4204/5, then $4206. 16 "machine cycles" (probably 96 master
        cycles) after $4206 is set, the quotient may be read from $4214/5, and
        the remainder from $4216/7. Presumably, $4204/5 are not altered by this
        process, much like $4202.
        
        The division is unsigned. Division by 0 gives a quotient of $FFFF and a
        remainder of C.


I guess you'll be making use of the remainder there.

Jiggles!
so what, I have to insert code to delay untill it's done or will it do it it's self?
Jiggles the Catgirl!Stranded
One of these days I will come up with a good sig. But not today.
New blog! Read read read!
You have to delay with instructions. 8 NOPS for divide and 4 for multiply is in order unless you have something to do within the wait period.

Jiggles!
I might, but does it take EXACTLY that long?
Jiggles the Catgirl!Stranded
One of these days I will come up with a good sig. But not today.
New blog! Read read read!
It's a safe limit..

Jiggles!
Bah It's not working as I expected and it takes a bunch of code to do what I want, so I will just make multible custom sprites I guess.

Bah! dosn't sprite tool have a way of makeing sprites which use the las sprites code pointer without reassmembleing the code? =_=
Jiggles the Catgirl!Stranded
One of these days I will come up with a good sig. But not today.
New blog! Read read read!
Pages: « 1 »
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - ASM Modulus?

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2016 - SMW Central
Legal Information - Privacy Policy - Provide feedback to the staff - Link To Us


Total queries: 24

Menu

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • RVLution