12 byte patch for speeding up tiny msdos intros
category: code [glöplog]
@TomCat, thanks again for the detailed benchmarking & research! =)
Regarding the benchmarking I think we should look at the FPS of intros here also. I guess that 'seashell' and 'colourful' are at a very low FPS already, more like slideshow, or ?
So the amount of cycles used for calculating the pixels is already superhigh compared to the others...so the screen plotting isn't the bottleneck in those cases.
I tested one unpublished heavy load FPU intro at 640x480 true colour and run it first normally (around 30 FPS) then I replaced the 'stosd' by simply 'add di,4', so no screen output...and received almost the same timings.
I guess one has to see in each case if the FPS isn't already good enough before investing the 12 Bytes.
So the amount of cycles used for calculating the pixels is already superhigh compared to the others...so the screen plotting isn't the bottleneck in those cases.
I tested one unpublished heavy load FPU intro at 640x480 true colour and run it first normally (around 30 FPS) then I replaced the 'stosd' by simply 'add di,4', so no screen output...and received almost the same timings.
I guess one has to see in each case if the FPS isn't already good enough before investing the 12 Bytes.
Easy to convert the measured times to fps, if you know how many frames were drawn.
Set WC mode with 10 bytes:
Set 13h mode and WC with 14 bytes:
Try this with different options inside INC files ;)
Code:
cwd
inc dx ; edx = 1
div ecx ; eax = 01010101h (it need the high word of edx = 0)
mov cx,259h
wrmsr
Set 13h mode and WC with 14 bytes:
Code:
xchg bx,ax
lodsb ; al = 93h
int 10h
mov cx,259h
push si ; 0101h
push si
pop eax ; 01010101h
wrmsr
Try this with different options inside INC files ;)