refraction said:nice job bjz thats kinda what im aiming for, but without the evil blue background.
see youve come across the same bug (in every way) i had with the scrolling writing on the space invaders title screen! i cant remember how i fixed it now either!
bjz said:nope got that fixed up yesterday by aprentice i didnt implement till now, text works now.
That it cycles through the list of opcodes sounds bad. If you're doing it with if-else-statements, you should consider other options like function pointer tables. Because if you do it with if-else then the last instruction in your list takes the longest time to find and non-constant values in instruction calls are no good. Maybe a switch-case could work better, because function pointers are little obscure, if not familiar with them.refraction said:well with interpreters, on every op code call it cycles through the list of opcodes till it finds the one it wants. i suppose the only (and best) way to do it is put the code in where it tells it to interpret the next op code, i spose that would be classed as a chip8 cycle.
I think that if the compiler is smart enough and it is possible it converts switch-cases to jump tables, but generally you're right.LXS said:Moreover, switch case *ARE* if-else if-else statements...
euphoria said:I think that if the compiler is smart enough and it is possible it converts switch-cases to jump tables, but generally you're right.
sorry about the double post, little problems with my connection/browser, i thought that the message was never posted...