who needs GDB when you have the good old fashion print statement... O.o
[1] https://segaretro.org/Sega_Mega_Drive/Palettes_and_CRAM#Back...
Pretty sure I optimized by putting a piece of tape at the exit line on the TV, then trying to make the color bar more narrow. :)