Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to optimize C code for NGPC?
#5
First, do you execute the hblank every line? if yes, maybe try only evry4 lines as 8, 60 and 100 are multiple of 4. You can also adapt your gfx to multiples of 8 (64 & 96 or 104).

Then compile with -S flag to check the compiled code of the hblank and change the condition order to see if it's simpler or not.

What is the hb counter used for? if you have ras_y...

Maybe to avoid conditions, you can do a specific hblank for each situation: showHUD, boss room and/or screenSplit...

I'll try on my side tomorrow to see if asm can be useful because as I said, most of the time, the compiler is better than me, and modifying my C code to help the compiler is often the best solution.
Reply


Messages In This Thread
RE: How to optimize C code for NGPC? - by sodthor - 02-11-2022, 07:43 PM
RE: How to optimize C code for NGPC? - by sodthor - 02-11-2022, 08:49 PM
RE: How to optimize C code for NGPC? - by sodthor - 02-14-2022, 05:33 AM
RE: How to optimize C code for NGPC? - by sodthor - 02-14-2022, 06:29 PM
RE: How to optimize C code for NGPC? - by sodthor - 02-14-2022, 09:16 PM
RE: How to optimize C code for NGPC? - by sodthor - 02-15-2022, 03:38 AM
RE: How to optimize C code for NGPC? - by sodthor - 02-15-2022, 04:17 AM
RE: How to optimize C code for NGPC? - by sodthor - 02-16-2022, 07:25 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)