Skip to content

general graphx optimizations#742

Open
ZERICO2005 wants to merge 8 commits intomasterfrom
opt_graphx
Open

general graphx optimizations#742
ZERICO2005 wants to merge 8 commits intomasterfrom
opt_graphx

Conversation

@ZERICO2005
Copy link
Contributor

@ZERICO2005 ZERICO2005 commented Mar 9, 2026

smaller optimizations across graphx:

  • optimized SMC code for gfx_floodfill
  • removed redundant comparison check in one of the while loops for floodfill
  • optimized off screen sprite clipping by returning directly to the caller if the sprite is off-screen. This makes all paths a minimum of 1F + 2 faster.
  • switched _indcallHL to ti._indcall to save a relocation
  • saved 1 byte in gfx_SetCharData
  • optimized gfx_TilePtr via djnz hax
  • ld iy, 0 \ ld iyl, a \ ld iyh, SMC can be changed to inc.s iy \ ld iyl, a \ ld iyh, SMC

11795 - 11765 = 30 bytes saved

@ZERICO2005 ZERICO2005 marked this pull request as draft March 9, 2026 18:59
@ZERICO2005 ZERICO2005 marked this pull request as ready for review March 9, 2026 19:55
inc b
djnz .heightpow2
; UBC and B are zero
call ti._idvrmu
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by the way, couldn't this be changed to 16 bit division?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant