News for hackers. Stuff that matters.
Re:Edge of Emulation: Game Boy Sewing Machines by jcelerier on Friday June 05, 2020 @11:35AM (#23429729)
say you want to represent values going from -10 to 10 with a step of 2 you'll have an array which is

    int array[]{-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10};
-> "0" is 6 in that case and you only need 4 bits to store your index. In addition in hardware it's somewhat common to have definitely non symmetrical ranges, e.g. from -20 to 150 or things like that.
Re:Edge of Emulation: Game Boy Sewing Machines by bondarchuk on Friday June 05, 2020 @11:38AM (#23429768)
Aha, thanks for the explanation!