Banner
Views: 328,032,095
Time: 2014-12-20 11:53:06 AM
41 users online: Iesua Nazarenus, anonimzwxmas, Bandicoot, WhiteSnow187, SOPA? NO WAY! SOPA? NO WAY!, CAN'T MAKE A GOOD HOLIDAY NAME, o 2cold4me, Otakus Kill Christmas!, Rumia, FreezingSnow, G.n.k., GrandChaos9000, o HoHoHo, o Queen Elsa, Kazeshin, o Koopsnow, o Ealconpunch, o Letty Whiterock, is secretly, o luks like it's winter, Mac45, christmas is almost here!, http://smwc.me/u/10874, MercuryPresents, o Yukinnai, NGB, Nin, OrphenX, pakkie, Rykon-V73, http://smwc.me/1183907, o \(^.^\) \(^.^)/ (/^.^)/, skawo, o Sue Sakamoto, Five Nights at Freddy's 4, MARIO SAYS:MARRY X MAS!!!, Trollope, o Userbar Generator, Ghost of Christmas C3 2015, Wuthering, EiEiPoo - Guests: 46 - Bots: 46Users: 26,019 (1,138 active)
Latest: Happy Holidays SMWCentral!
Tip: Even though good graphics may make people interested in your hack, what really counts is how fun it is to play.
ASM Modulus?
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - ASM Modulus?
Pages: « 1 »
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.
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.
so what, I have to insert code to delay untill it's done or will it do it it's self?
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.
I might, but does it take EXACTLY that long?
It's a safe limit..
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? =_=
Last edited on 2007-09-23 05:39:46 AM by KilloZapit.
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 - 2014 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 29

C3 ENDING IN
1 DAY, 23 HOURS, 6 MINUTES AND 54 SECONDS
C3 ENDING IN
1 DAY, 23 HOURS, 6 MINUTES AND 54 SECONDS
Menu

Affiliates

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