15 users online: AmazingChest, BUX88, colablues, CourtlyHades296, danwaleby, Edselrama, Golden Yoshi, Green, h.carrell, NixKillsMyths, Ondore's Lies, ScubaSaul,  xHF01x, Zavok,  zuccha - Guests: 133 - Bots: 130
Users: 62,878 (2,639 active)
Latest user: GadoGamer085

SA-1 Graphics Rotate/Scale Routine

Well, on past I have been working on a graphics rotation/scaling method with SA-1 but I gave up because I wasn't getting able to fix the interpolation plus the terrible slowdown the code is.

But I finally got rid of the interpolation issues (by just swaping src and dest pointers), but I still can't get rid of the slowdown, so I decided to "release" the code, but I would love if we could optimize it more to at least don't slowdown in snes9x and still have a little time to process some sprites.

Of course, it's possible to simply put the code on parallel/background mode and work on a frame skip system, while SA-1 is idle.

Anyway, here is the code:

It includes a IPS with a sample level and source code (it's on uberASM/code).

You can rotate the egg with left/right keys and scale with up and down keys. If you press Y, the rotation/scale will be 4x faster.

There's a little risk of freezing the level. That's normal when SA-1 gets too much slowdown.

The GFX file is egg.bin, on format 4BPP Linear. If you want to use another GFX, you can rip it with SnesGFX. It must be exactly a 32x32 image.
GitHub - Twitter - YouTube - SnesLab Discord