12 byte patch for speeding up tiny msdos intros

category: code [glöplog]
@TomCat, thanks again for the detailed benchmarking & research! =)
added on the 2019-03-24 13:20:10 by HellMood HellMood
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.
added on the 2019-03-24 17:20:47 by Kuemmel Kuemmel
Easy to convert the measured times to fps, if you know how many frames were drawn.

BB Image
Set WC mode with 10 bytes:
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 ;)
added on the 2023-04-29 11:19:56 by Jin X Jin X