Immediately enter a level when starting the game

Request patches for Keens 1-3.
Post Reply
User avatar
Fleexy
Site Admin
Posts: 420
Joined: Fri Dec 12, 2008 1:33 am
Location: Blogham Tower
Contact:

Immediately enter a level when starting the game

Post by Fleexy » Sun Sep 17, 2017 3:21 am

For this project, it would be really convenient if the game could immediately start in level 1 as soon as possible, instead of doing the rising Apogee logo or menu or world map. I know Galaxy has the tedlevel command-line thing, but I haven't been able to find any similar functionality or patch for Vorticons. If this could be done for at least Keen 1, that would be great - I think I could translate it to the other Vorticons episodes once I have the implementation for one.

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

Re: Immediately enter a level when starting the game

Post by levellass » Mon Sep 18, 2017 10:36 pm

This is a combination of two patches. The first skips the start sequence and menu entirely and just dumps you on the world map. (As a side effect you have no lives, but this too can be changed easy enough.) There's also a patch that just skips the start sequence.

The second set of patches load a level number into memory (Here 2) then send Keen to it the second he lands on the map. (The only side effect is the map blinks into existence for a sec, replacing it with black tiles fixes this.) The first two lines eliminate the 'Keen's left' window (Which would otherwise appear.), the thrid skips the map stuff and the fourth is of course the level number.

Code: Select all

#Skip start sequence and menu, go to new game
%patch $8FF0  $C3

#Keen starts game in level 2
%patch $7E99 $90 $90 $90
%patch $7EBC $90 $90 $90
%patch $7FA1 $EB $29
%patch $7FCC $C7 $06 $6EC0W  $0002W  $90

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

Re: Immediately enter a level when starting the game

Post by levellass » Tue Sep 19, 2017 8:32 am

Keen 2:

Code: Select all

#Skip start sequence and menu, go to new game
%patch $8A7E  $C3

#Keen starts game in level 2
%patch $82A1 $90 $90 $90
%patch $82BE $90 $90 $90
%patch $83A0 $EB $29
%patch $83CB $C7 $06 $6E9CW  $0002W  $90
And Keen 3:

Code: Select all

#Skip start sequence and menu, go to new game
%patch $98D4 $C3

#Keen starts game in level 2
%patch $8C44 $90 $90 $90
%patch $8C61 $90 $90 $90
%patch $8D6C $EB $2E
%patch $8D9C $C7 $06 $70ECW  $0002W  $90

User avatar
Fleexy
Site Admin
Posts: 420
Joined: Fri Dec 12, 2008 1:33 am
Location: Blogham Tower
Contact:

Re: Immediately enter a level when starting the game

Post by Fleexy » Tue Sep 19, 2017 7:13 pm

Works great, thank you! Here it is in action!

User avatar
Nisaba
Posts: 195
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Re: Immediately enter a level when starting the game

Post by Nisaba » Tue Sep 19, 2017 9:04 pm

yay!
Keen in Loops on Mars!

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

Re: Immediately enter a level when starting the game

Post by levellass » Tue Sep 19, 2017 10:13 pm

The following revised patches allow loops of any number of levels, when Keen reaches the 'max level' winning it will only send him back to the start (Though it's possible to send him back to level 1 also.) Just take 2 away from $AAC4W for each level you want to take out of the loop. (So the 1 level loop above replaces this with $AAA6W.)

Dying replays the last level, but any other means of exiting moves Keen up a level.

Keen 1:

Code: Select all

#Skip start sequence and menu, go to new game
%patch $8FF0  $C3

#Keen starts game in normal level, max is 16
%patch $7E99 $90 $90 $90
%patch $7EBC $90 $90 $90
%patch $7FA1 $83 $3E $5DAAW  $00 $75 $04 $FF $06 $AAA8W  $A1 $AAA8W  $A3 $6EC0W
                 $C7 $06 $5DAAW  $0000W  $EB $19
%patch $4214 $FE80W
%patch $4219 $A3 $8242W  $A3 $5DAAW
Keen 2:

Code: Select all

#Skip start sequence and menu, go to new game
%patch $8A7E  $C3

#Keen starts game in normal level, max is 16
%patch $82A1 $90 $90 $90
%patch $82BE $90 $90 $90
%patch $83A0 $83 $3E $5D86W  $00 $75 $04 $FF $06 $9ADAW  $A1 $9ADAW  $A3 $6E9CW
                 $C7 $06 $5D86W  $0000W  $EB $19
%patch $7056 $FE80W
%patch $705B $A3 $96E2W  $A3 $5D86W
Keen 3:

Code: Select all

#Skip start sequence and menu, go to new game
%patch $98D4 $C3

#Keen starts game in normal level, max is 16
%patch $8C44 $90 $90 $90
%patch $8C61 $90 $90 $90
%patch $8D6C $83 $3E $5FD6W  $00 $75 $04 $FF $06 $9D44W  $A1 $9D44W  $A3 $70ECW
                 $C7 $06 $5FD6W  $0000W  $EB $1E
%patch $78BD $FE80W
%patch $78C2 $A3 $9932W  $A3 $5FD6W

User avatar
Fleexy
Site Admin
Posts: 420
Joined: Fri Dec 12, 2008 1:33 am
Location: Blogham Tower
Contact:

Re: Immediately enter a level when starting the game

Post by Fleexy » Sun Oct 08, 2017 6:30 pm

This is working great. It would also be pretty nice if points and ammo could be reset on death. I tried using this patch, but it doesn't seem to work with the immediate entry - the score sticks around and sometimes I get a game freeze. I also tried to adapt the patch that zeroes pogo and ammo, but it's only for Keen 1 and I was unable to find the analogous code chunk in Keen 2 and 3. How might this be accomplished in the other episodes?

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

Re: Immediately enter a level when starting the game

Post by levellass » Fri Oct 13, 2017 6:35 pm

The conflict with the first patch is the first '$90 $90 $90' line; this skips the call to the 'reset score' code. Deleting it (It is 7E99 82A1 and 8C44) should make the two work. Do tell me if random game crashes occur however.

The other patch you linked has been updated for Keen 2 and 3.

User avatar
Fleexy
Site Admin
Posts: 420
Joined: Fri Dec 12, 2008 1:33 am
Location: Blogham Tower
Contact:

Re: Immediately enter a level when starting the game

Post by Fleexy » Fri Oct 13, 2017 11:25 pm

Works perfect, thanks! I suspect the previous freezes might actually have been from my own attempt at translating the "Keen always has the pogo" patch to Keen 2. I have corrected that; here it is, for what it's worth:

Code: Select all

# Assume Keen always has the pogo - Keen 2
%patch $6958 $EB $05
%patch $6BF2 $FE

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

Re: Immediately enter a level when starting the game

Post by levellass » Sat Oct 14, 2017 11:46 pm

Is that the same as

Code: Select all

#Don't need pogo item to use pogo
%patch $0DF9 $EB $04 #C T Space doesn't affect pogo
%patch $6958 $EB $05 #Always pogo 1
%patch $6BE7 $EB $0C #Always pogo 2
%patch $8A9C $0000W  #Pogos at start of game

Post Reply