Extending hardware 16/8 division to more bits?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Extending hardware 16/8 division to more bits?

Post by rainwarrior »

jeffythedragonslayer wrote: Wed Jun 15, 2022 4:37 amDo you mean always less than or equal? Can't the approximation be dead on?
Yes.
User avatar
jeffythedragonslayer
Posts: 344
Joined: Thu Dec 09, 2021 12:29 pm

Re: Extending hardware 16/8 division to more bits?

Post by jeffythedragonslayer »

Awesomesauce. I added some comments to the routine based on the insights in this thread.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Extending hardware 16/8 division to more bits?

Post by rainwarrior »

My adaptation of it has some descriptive comments, if that's helpful.

I'm still trying to think of how to make an arbitrarily wide division out of the hardware 16/8. That method for 16x16 does not seem to be applicable if the numerator and denominator are too far apart from each other.

Software binary division works, but there might be a faster way. I'm trying to think about polynomial long division, but haven't yet come up with anything suitable.
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Extending hardware 16/8 division to more bits?

Post by Oziphantom »

maybe some perfectly timed writes to the registers could cause it to "go again" with existing partial results..
Post Reply