Page 2 of 2

Posted: Fri Jul 09, 2010 9:53 pm
by Fleexy
Make light rooms dark and dark rooms light!

Posted: Sat Jul 10, 2010 12:30 pm
by levellass
Added to the keen wiki here: http://www.shikadi.net/keenwiki/Patch:P ... olor_patch

I hope I commented on it correctly?

Posted: Sat Jul 10, 2010 1:15 pm
by Mink
So I had been holding off testing this since I figured it was pretty much just another not really noticeable palette patch, and wow I stand corrected; that is some seriously nice patching, Dr K - it makes everything else feel clunky! Like THC was saying, this'll have a fair bit of repercussions on mods' styles, and man I am excited for the possibilities.

Posted: Sat Jul 10, 2010 4:36 pm
by Dr. Kylstein
levellass wrote:Added to the keen wiki here: http://www.shikadi.net/keenwiki/Patch:P ... olor_patch

I hope I commented on it correctly?
Those values you highlighted in the the fade functions are not delay values and should not be modified. $40 = 64, or max brightness + 1, the number of shade levels the fade loops through. The fades are synchronized to the video update, so the only way to speed them up is to make them double-step.

Also, I'm pretty sure the sprites are frozen during the original fade routines. If you can prove otherwise, I'll fix that.

Posted: Sat Jul 10, 2010 5:05 pm
by lemm
Sprites are not drawn until fade in has completed.

Posted: Sun Jul 11, 2010 4:08 am
by levellass
However, since the fades are much smoother than the originals, this is more readily noticeable. Also, I have managed to shorten the fade time by changing those two values to half (32, $20), which works better for my mod, what effect does this have? Can it cause a crash or graphics problems?

Posted: Sun Jul 11, 2010 7:38 am
by CommanderSpleen
Finally got around to trying it. Very, very tasty.

I'm not finding everything 'clunky' after seeing it. In fact, the contrast makes me appreciate the graphics even more.

Posted: Sun Jul 11, 2010 4:58 pm
by Dr. Kylstein
levellass wrote:However, since the fades are much smoother than the originals, this is more readily noticeable. Also, I have managed to shorten the fade time by changing those two values to half (32, $20), which works better for my mod, what effect does this have? Can it cause a crash or graphics problems?
It shouldn't cause any serious problems, but it will only fade to/from half-darkened instead of black.

Edit: Here's a version that double-steps.

Code: Select all

# Set the palette when we go into graphics mode
%patch $6E46 $E8 $64 $FE $90 $90

#support functions
%patch $5B3D $BA $DA $03 $EC $A8 $08 $75 $FB $EC $A8 $08 $74 $FB $C3 $55 $89
             $E5 $E8 $EC $FF $BA $DA $03 $EC $BA $C0 $03 $EC $50 $B0 $14 $EE
             $8B $46 $04 $EE $58 $EE $89 $EC $5D $C3 $55 $89 $E5 $83 $EC $08
             $31 $C0 $31 $DB $89 $46 $F8 $8A $87 $00 $E8 $2A $46 $04 $73 $02
             $31 $C0 $89 $46 $FA $43 $8A $87 $00 $E8 $2A $46 $04 $73 $02 $31
             $C0 $89 $46 $FC $43 $8A $87 $00 $E8 $2A $46 $04 $73 $02 $31 $C0
             $89 $46 $FE $43 $E8 $B9 $10 $FF $46 $F8 $83 $FB $60 $75 $C8 $89
             $EC $5D $C3

#VGA palette fading
%patch $6C49 $B9 $20 $00 $E8 $EE $EE $89 $C8 $D1 $E0 $48 $50 $E8 $0F $EF $44
             $44 $E2 $F0 $C3 $55 $89 $E5 $BA $C8 $03 $8B $46 $04 $EE $BA $C9
             $03 $8B $46 $06 $EE $8B $46 $08 $EE $8B $46 $0A $EE $89 $EC $5D
             $C3 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00
             $00 $00 $00 $00 $B9 $20 $00 $E8 $AA $EE $B8 $40 $00 $D1 $E1 $29
             $C8 $50 $E8 $C9 $EE $44 $44 $D1 $E9 $E2 $EC $31 $C0 $50 $E8 $A1
             $EE $44 $44 $C3 $B8 $0D $00 $CD $10 $B8 $13 $10 $BB $00 $01 $CD
             $10 $B8 $02 $10 $1E $07 $BA $3B $25 $CD $10 $B8 $12 $10 $B9 $20
             $00 $31 $DB $BA $00 $E8 $CD $10 $C3

#VGA lights
%patch $3592 $C7 $06 $1E $82 $01 $00 $B8 $01 $00 $50 $E8 $43 $8B $44 $44 $31
             $C0 $50 $E8 $A4 $25 $44 $44 $C3 $00 $00 $00 $00 $00 $00 $00 $00
             $C7 $06 $1E $82 $00 $00 $B8 $01 $00 $50 $E8 $23 $8B $44 $44 $B8
             $01 $00 $50 $E8 $83 $25 $44 $44 $C3

%patch	$3596 $01 $00 #lights on delay
%patch	$35B9 $01 $00 #lights off delay
I think this may be closer to the pace of the original routines.

Posted: Mon Jul 12, 2010 4:18 am
by levellass
Added to the wiki. I assume the above patch needs the two palettes and the Set EGA color register values code.

Posted: Wed Jul 14, 2010 1:20 am
by Dr. Kylstein
levellass wrote:Added to the wiki. I assume the above patch needs the two palettes and the Set EGA color register values code.
Yes. I've updated the wiki article to make the two patches more consistent and tweak the formatting a bit.

Posted: Wed Jul 14, 2010 2:37 am
by levellass
Cool, cleared up the commentary just a bit. This is excellent stuff!