Some other request

Request patches for Keen Dreams.
Post Reply
User avatar
szemigi
Posts: 663
Joined: Fri Jan 23, 2009 8:06 pm
Location: Hungary
Contact:

Some other request

Post by szemigi » Fri Nov 08, 2019 6:26 pm

1. I changed the Game Over screen background color to dark red. It's okay, but when it disappeared (by pressing any key or just waiting for it to disappear), the drawn 320x200 box was still blue, not red. I saw it. Why did this happen?

Whatever, here it is. As you see, I changed the Game Over High Score screen background to dark red:

Code: Select all

#Game Over High Score screen background
%patch $16C0E $0004W #Color
Is it even possible to have dark red background when the Game Over disappears or not (keep in mind that this would ONLY affect the Game Over)? If so, make the patch in case of that.


2. When I complete the game + then I start a new game again, the score is reset (like in Keen 4-6). (And this would affect the NEXT score as well on the status screen).

3. I want to use other 8x8 graphics for the Game Over window's border. Is it possible? As I have some free space in the 8x8 graphic bitmap.

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Sat Nov 09, 2019 2:42 am

1.) Are you talking about the high scores? When I use your patch the scores appear against a red background for me. When the table cycles to the titelscreen then back to the scores it is blue. Is this the problem you're having? Or are you saying there is a flash of blue background BEFORE the titlescreen appears?

If so you can change things so that the score is ALWAYS against a red background, since there is another patch affecting the table that appears after the titlescreen.

If you want the score background to be red after a Game Over (Is this winning the game AND dying?) and to only change back later (Or never at all) then I can do this too. Would that be preferred?


2.) Does the score not reset to zero when you start a new game? It resets fine for me.

3.) So you want a window that uses a different border from the usual windows that appear? All different tiles?

User avatar
szemigi
Posts: 663
Joined: Fri Jan 23, 2009 8:06 pm
Location: Hungary
Contact:

Re: Some other request

Post by szemigi » Sat Nov 09, 2019 3:05 am

1. Yes, there is a flash of blue background BEFORE the titlescreen appears. But I want it to be red in all cases. Nothing else.

2. Nope, it doesn't reset the score. I tested it. Straaange, so fix it please.

3. Yeah, I want all different 8x8 graphics for the GAME OVER window only.

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Sat Nov 09, 2019 8:07 am

1.) This will take time.

3.) This will need investigation, the standard game resets the score.

2.) This patch allows all sorts of windows to have different borders, but it can be tricky to get to work correctly:

Code: Select all

#Default window values =$01CB
%patch $23C3B $0000W $0006W $0001W $0007W $0002W $0008W $0003W $0005W

#Text windows call default variables
%patch $13B51 $A1 $01CDW #Bottom left corner of box
%patch $13B70 $A1 $01CFW #Top of box
%patch $13B7E $A1 $01D1W #Bottom of box
%patch $13BA1 $A1 $01D3W #Top right corner of box
%patch $13BAF $A1 $01D5W #Bottom right corner of box
%patch $13BCB $A1 $01D7W #Left side of box
%patch $13BDB $A1 $01D9W #Right side of box
%patch $13B42 $A1 $01CBW #Top left corner of box
              $50 $57 $FF $76 $FE $9A $0CA5094BRL     $44 $44
%patch $13B65 $0A

#Reroute GO window to new code
%patch $3CA8 $00003A45RL

#Window border alteration code =$00003A45RL
%patch $3A45 $55 $8B $EC $56 $57 $8B $76 $06 $8B $7E $08 $9A $00003A78RL 
             $57 $56 $B8 $0019W  $2B $C7 $D1 $E8 $50 $B8 $0028W  $2B $C6 $D1 $E8 $50
             $9A $11FA1B27RL     $83 $C4 $08 $9A $00003A78RL     $5F $5E $5D $CB
%patch $3A78 $55 $8B $EC $83 $36 $01CBW  $0C $83 $36 $01CDW  $0C $83 $36 $01CFW
                 $0C $83 $36 $01D1W  $0C $83 $36 $01D3W  $0C $83 $36 $01D5W
             $0C $83 $36 $01D7W  $0C $83 $36 $01D9W  $0C $5D $CB

#Other possible uses of window code
%patch $37D2  $00003A45RL #F10-G cheat window
%patch $381B  $00003A45RL #F10-I cheat window
%patch $386A  $00003A45RL #F10-J cheat window
%patch $38C9  $00003A45RL #F10-S cheat window
%patch $3919  $00003A45RL #F10-W cheat window
%patch $3CA8  $00003A45RL #Game over window
%patch $3CD8  $00003A45RL #Status window
%patch $4521  $00003A45RL #Pause window
%patch $456B  $00003A45RL #Loading window
%patch $5920  $00003A45RL #1st ending window
%patch $595F  $00003A45RL #2nd ending window
%patch $5999  $00003A45RL #3rd ending window
%patch $59FC  $00003A45RL #Didn't make it past window
%patch $5DAD  $00003A45RL #Unknown loading window
%patch $6A68  $00003A45RL #Can't defeat window
%patch $C576  $00003A45RL #Level entry window
%patch $12036 $00003A45RL #(R)etry window
(Notice the stuff at the bottom is good for testing, you don't have to end the game, you can just use a cheat or something.

The biggest problem with this patch is setting the right tiles. Here I've moved the window border 'forward' 12 tiles ($0C) but you can still get weird results with it.

To change a tile, first find its $A1 value then change the $0C in the window section. So for example, if the bottom right corner of your windows is not the right graphic you look for the tile value.This is '%patch $13BAF $A1 $01D5W'. Next you look for $01D5W in the window code (It is at the end of the second-to-last line.) and change the $0C after it.

I hope this works for you,it can be tricky to get the hang of.

User avatar
szemigi
Posts: 663
Joined: Fri Jan 23, 2009 8:06 pm
Location: Hungary
Contact:

Re: Some other request

Post by szemigi » Sat Nov 09, 2019 2:09 pm

1. I tested the border graphics as you said and it works excellently!

2. As for the flashing RED background I want, take your time, but don't forget about it.

3. In the meantime, I found the guilty patch that caused the score not to be reset after completing or losing the game:

Code: Select all

#Sound when starting new game
%patch $3C10 $B8 $000DW $50 $9A $10BB1282RL $44 $44 $90

That's all.

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Sun Nov 10, 2019 1:05 am

While looking at 2.) I found a problem with the window patch and your patchfile. You use some of the same space for one of your messages, which means the patch will ruin one of your note messages. This patch avoids this:

Code: Select all

#Ignore low memory (Frees $3A45-$3AB8)
%patch $3A43 $EB $74

#Default window values =$0399W
%patch $23E09 $0000W $0006W $0001W $0007W $0002W $0008W $0003W $0005W

#Text windows call default variables
%patch $13B51 $A1 $039BW #Bottom left corner of box
%patch $13B70 $A1 $039DW #Top of box
%patch $13B7E $A1 $039FW #Bottom of box
%patch $13BA1 $A1 $03A1W #Top right corner of box
%patch $13BAF $A1 $03A3W #Bottom right corner of box
%patch $13BCB $A1 $03A5W #Left side of box
%patch $13BDB $A1 $03A7W #Right side of box
%patch $13B42 $A1 $0399W #Top left corner of box
              $50 $57 $FF $76 $FE $9A $0CA5094BRL     $44 $44
%patch $13B65 $0A

#Reroute GO window to new code
%patch $3CA8 $00003A45RL

#Window border alteration code =$00003A45RL
%patch $3A45 $55 $8B $EC $56 $57 $8B $76 $06 $8B $7E $08 $9A $00003A78RL 
             $57 $56 $B8 $0019W  $2B $C7 $D1 $E8 $50 $B8 $0028W  $2B $C6 $D1 $E8 $50
             $9A $11FA1B27RL     $83 $C4 $08 $9A $00003A78RL     $5F $5E $5D $CB
%patch $3A78 $55 $8B $EC $83 $36 $0399W  $0C $83 $36 $039BW  $0C $83 $36 $039DW
                 $0C $83 $36 $039FW  $0C $83 $36 $03A1W  $0C $83 $36 $03A3W
             $0C $83 $36 $03A5W  $0C $83 $36 $03A7W  $0C $5D $CB
Last edited by levellass on Sun Nov 10, 2019 1:21 am, edited 1 time in total.

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Sun Nov 10, 2019 1:14 am

This patch improves your 'broken' sound patch so that you get a start sound but still reset the score and stuff. It makes room for the sound code rather than overwriting things:

Code: Select all

#Play sound when new game starts
%patch $3C04 $33 $C0 $A3 $70EEW  $A3 $7124W  $A3 $7116W  $A3 $7114W  $A3 $7116W
                 $A3 $711AW  $A3 $711CW  $A3 $711EW  $C7 $06 $7118W  $4E20W
             $C7 $06 $7126W  $0003W  $B8 $000DW $50 $9A $10BB1282RL $44 $44 $90

User avatar
szemigi
Posts: 663
Joined: Fri Jan 23, 2009 8:06 pm
Location: Hungary
Contact:

Re: Some other request

Post by szemigi » Sun Nov 10, 2019 4:09 am

Many thanks a lot! They work without any problems.

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Sun Nov 10, 2019 6:58 am

Alright, tell me if this patch eliminates the blue problem with the High scores:

Code: Select all

#Eliminate bluescreen flash after entering high score
%patch $4395 $81 $3E $7118W  $0000W  $75 $03 $E9 $0109W  $33 $C0
             $A3 $7118W $E9 $00AFW

The problem is that the blue is part of a 'clear screen' thing that happens when... well the screen is cleared. It has nothing to do with the High Scores, it's more basic. The patch above makes you go straight to the menu after entering a high score which should eliminate the 'blue pause' while the titlescreen loads.

User avatar
szemigi
Posts: 663
Joined: Fri Jan 23, 2009 8:06 pm
Location: Hungary
Contact:

Re: Some other request

Post by szemigi » Sun Nov 10, 2019 12:56 pm

https://www.dropbox.com/s/95eqykuf74du5 ... R.avi?dl=0

As you see the video file's name, I have a problem with the patch after having GAME OVER.


BUT: Interesting that in case of winning the game, the problem (the strange glitchy screen you can see in my video) disappears quickly (but it can be seen a little bit in case of that, too): https://www.dropbox.com/s/fyep4zdn8lvyb ... 1.png?dl=0

And after GAME OVER I don't understand why the glitchy screen doesn't disappear quickly the way I showed you on the picture. Help me and fix it.


In short: the blue screen is not eliminated. Instead of being eliminated I (and now you, too) can only see the glitchy screen either in case of having GAME OVER or winning the game (except after winning the glitchy screen disappears quickly).

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Mon Nov 11, 2019 6:40 am

This is very unfortunate and may be very tough to fix.

Are you using Keengraph or Modkeen for this? If you're using Keengraph, does this patch quicken your loading times:

Code: Select all

#Keen Dreams - remove Huffman compression (Frees $B4B6-$B5BF)
%patch $B497  $55 $8B $EC $56 $57 $8C $DA $C4 $7E $0A $C5 $76 $06 $8B $4E $0E
              $D1 $E9 $FC $F3 $A5 $73 $01 $A4 $8E $DA $5F $5E $5D $CB

levellass
Posts: 2974
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Re: Some other request

Post by levellass » Fri Nov 15, 2019 2:45 am

ALRIGHT!

This should do it. You need to delete any patches changing the HS background color, they are not needed anymore with this patch.

Code: Select all

#HS table has different background on Game Over
%patch $445D  $A1 $03A9W
%patch $5E6C  $A1 $03A9W
%patch $23E19 $0001W
%patch $4397  $B8 $0001W  $A3 $03A9W  $E9 $0109W
%patch $16C0D $B8 $0004W  $A3 $03A9W  $50 $9A $0CA5026BRL     $44 $44 $EB $08
The two $0001Ws are the blue background high score table,after the title. The $0004W is the red background after a game over. (This also happens after the boss is beat, but it should be possible for the table to stay blue in this case, if you want.) This should get rid of the annoying blue background flash thing.

BOY was that a difficult one to do. Definitely the hardest Keen Dreams patch yet.

Post Reply