0 Members and 3 Guests are viewing this topic.
DJ : what you don't understand is that the program is already 6 times faster (according to latest aeTIos's tests) on GS calcs than on color calcs at merely the same frequency (120 MHz for GS vs 132 MHz for color).
I decided to un-overclock my calc and re-run copyscreen1000times.12:53 seconds.
unsigned short *BUFF_BASE_ADDRESS;void *SCREEN_BACKUP;void initBuffering(){ void *temp; temp = malloc(BUFF_BYTES_SIZE); if(!temp) exit(0); BUFF_BASE_ADDRESS = (unsigned short*)malloc(BUFF_BYTES_SIZE); if(!BUFF_BASE_ADDRESS) { free(temp); exit(0); } SCREEN_BACKUP = *(void**)0xC0000010; // Handle monochrome screens-specific shit if(is_classic) *(int32_t*)0xC000001C = (*(int32_t*)0xC000001C & ~0x0e) | 0x08; *(void**)0xC0000010 = temp;}void updateScreen(){ // Screen-access delays make this the fastest method apparently memcpy(*(void**)0xC0000010, BUFF_BASE_ADDRESS, BUFF_BYTES_SIZE);}void deinitBuffering(){ void *temp = *(void**)0xC0000010; // Handle monochrome screens-specific shit again if(is_classic) *(int32_t*)0xC000001C = (*(int32_t*)0xC000001C & ~0x0e) | 0x04; *(void**)0xC0000010 = SCREEN_BACKUP; free(temp); free(BUFF_BASE_ADDRESS);}int main(void){ int i; initBuffering(); clearBufferB(); for(i = 0; i < 1000; i++) { memcpy(*(void**)0xC0000010, BUFF_BASE_ADDRESS, BUFF_BYTES_SIZE); } deinitBuffering(); return 0;}
giving a mere 6 seconds at 132 MHz as well as 262 MHz, vs 12.58 seconds at 132 MHz and a bit more than 6 seconds at 262 MHz previously
I meant that with this version, the program executes in 6 seconds whether the calc has been clocked to 132 or 262 MHz, whereas with the previous version, the program ran in 12.58 seconds when the calc was clocked to 132 MHz and in 6 seconds when it was clocked at 262 MHz. So the newest version is better.I'll do that in a minute.