Jump to content
Posted Fri May 23, 2003 8:07 AM
Posted Fri May 23, 2003 8:11 AM
Posted Fri May 23, 2003 8:12 AM
Posted Fri May 23, 2003 9:15 AM
Posted Fri May 23, 2003 10:19 AM
Posted Fri May 23, 2003 12:18 PM
Posted Fri May 23, 2003 12:58 PM
Posted Fri May 23, 2003 8:06 PM
I am reading Programming the 6502, and it gets so detailed about division, decimal math, etc (stuff I presume there is not a great deal of use for?)
Posted Fri Sep 5, 2003 1:58 PM
Since general division & multiplication take so many cycles (often with a wide variation between cases) 2600 programmers try to avoid them if at all possible. Where one of the operands is a constant a dedicated routine can often be created (such as the div/mod 15 routine sometimes used for sprite positioning) or a table used. But even then, it is a good idea to try and figure out a way to do without.
Posted Sat Sep 6, 2003 2:33 AM
re: multiplication and division: remember, both are really just high powered forms of addition and subtraction, respectively. So to multiply a number X by Y, sometimes it's going to be easier and quicker to just add X to itself Y times.
Posted Sun Sep 7, 2003 10:39 AM
Yes, happened to me several times.
And although 2812 cycles sounds like a lot, it can get used very easily.
Posted Thu Jan 6, 2005 12:53 AM
But often there are things you don't have to do every frame (e.g. checking the joystick). So you can schedule those codes over several frames.
Posted Thu Jan 6, 2005 7:53 AM
I don't know, maybe you should ask Todd Rogers.
This got me thinking.. how may times can a person press the button per second?
Posted Thu Jan 6, 2005 11:59 AM
Posted Thu Jan 6, 2005 2:12 PM
but shouldn't you "oversample" the buttons a bit ?
i mean, if you assume for instance that one can't press the button more than 10 times per second and thus only check every 5th (or 6th) frame, you might miss short triggers of the button, or not ?
Posted Thu Jan 6, 2005 3:37 PM
True, but sometimes the action(s) following a pressed button are very time consuming.
Hm... now checking the fire button isn't really something that'll waste dozens of cycles. The overhead of determining wether to check it on a particular frame or not is probably already more than just checking it each frame
0 members, 0 guests, 0 anonymous users