#72854 - naleksiev - Wed Feb 22, 2006 4:09 am
What is wrong with my code or my calculation?
I have this code
Because I have only ~60 VBlanks per second I think I need to have different value for frame/60 on ~1 second. It's pretty fast about. About 8 times faster. I tried this on real device GB Micro. It's still fast about 6 times faster.
First do you have any idea why this is so fast?
Second why I have such differense between the real device and the emulator? SetPosition is pretty simple function just one line that is changing the offset ot one of the backgrounds.
I have this code
Code: |
void WaitForVSync() {
while (*(vu16*)& *(u16*)0x4000006 != 160) { } } |
Code: |
...
int frame = 0; while (1) { WaitForVSync(); SetPosition(1, 0, frame/60); frame++; } ... |
Because I have only ~60 VBlanks per second I think I need to have different value for frame/60 on ~1 second. It's pretty fast about. About 8 times faster. I tried this on real device GB Micro. It's still fast about 6 times faster.
First do you have any idea why this is so fast?
Second why I have such differense between the real device and the emulator? SetPosition is pretty simple function just one line that is changing the offset ot one of the backgrounds.