PATCHES: High Score Table

Completed patches for Keen1.
Post Reply
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

PATCHES: High Score Table

Post by levellord »

Keen1.exe: Null pointer assignment! Aieee!

Andy: Oh my God! What are you doing to it?

Here is everything you'll ever need to rearange the high score table [and bonus junk thrown in too!]

Firstly, the positioning and sprites of all of... well, the sprites:

#'High Scores' sprite
%patch $9875 $00
#Don't show 'high scores' sprite
%patch $987E $90

#High scores sprite y position
%patch $9879 $00
#'High scores' sprite x position [$90 and above drops the sprite one line.]
%patch $987D $00 $00

#'Name' sprite
%patch $9887 $00
#Don't show name sprite
%patch $9890 $90

#name y position
%patch $988b $01
#Name x position [$90 and above drops the sprite one line.]
%patch $988F $01 $00

#Score sprite
%patch $9899 $01
#Don't show score sprite
%patch $989F $90

#Score sprites y position
%patch $989D $00
#'Score' sprites x position [$90 and above drops the sprite one line.]
%patch $98A1 $10 $00

#'Parts' sprite
%patch $98AB $01
#Don't show Parts sprite
%patch $98B2 $90

#Parts sprite y position
%patch $98AF $00
#'Parts' sprite x position [$90 and above drops the sprite one line.]
%patch $98B3 $20 $00


And now the items:

#Always show item
%patch $9900 $90
%patch $9937 $90
%patch $9969 $90
%patch $999D $90

#items x position.
%patch $991E $0E
%patch $9951 $0F
%patch $9984 $10
%patch $99B7 $11

#Don't show the four items
%patch $9928 $90
%patch $995B $90
%patch $998E $90
%patch $99C1 $90

#Don't show all items
%patch $98D5 $90


And the text:

#Scores x offset; $012 puts them where names are, $0C where parts are.]
%patch $99E6 $01

#x offset of name [$09 $00 puts names where scores are.]
#[$00 $01 and higher drop the names one line.]
%patch $9A03 $09 $00


And just look where the High score table is located:

#High score table location in level 90; 00 is 4 blocks left of normal,
# add ten for each block right, -ve numbers act as $FF-x
%patch $9A2C $40

#high score screen is title screen area. [Do NOT se 9A2C to 20, any other
#value is fine.]
%patch $9A30 $00
%patch $9A2C $21

#now hscore screen is Ordering info screen. [9A2C must not be 60!]
%patch $9A31 $01
%patch $9A2C $61

#Joy! Now its the story screen! [9A2C is not A0!]
%patch $9A31 $02
%patch $9A2C $A1

#Gah! Now its about Id!! [9A2C is NOT E0!]
%patch $9A31 $03
%patch $9A2C $E1

#Please stop!! Now its the start screen! [9A2C is not 80!]
#[And with $xx greater than 81 you go off the map and back to the
#title screen.]
%patch $9A31 $06
%patch $9A2C $81

#Ooops! Its right off the map! [9A2C is not 00!]
#[High score table has background of tile #1]
%patch $9A31 $90
%patch $9A2C $01

#High score screen y co ordinates [$01\$00 puts you right off the map.]
%patch $9A3D $00 #[1 =16 tiles]
%patch $9A38 $10 #[1 =01 pixel]


And now the junk:

#High scores acts like 'Return to demo' option [takes you to title screen]
#[Note, you can get a high score, you just can't see it!]
%patch $9A4A $90

#Selecting high scores gives you the high score table, then starts a new
#game. [Quitting a game just gives you the HS table, then menu.]
%patch $9A5A $90

#When HS are acessed from [and only from] the menu the 'can only save game
#on map' message pops up, otherwise HS are normal.
%patch $9A6B $90

#high scores appear for only 1 second. [Unless quitting or winning game.]
%patch $9A6C $90

#Exit the game after looking at high scores.
%patch $9A70 $90

#name writing command; will show first name for all scores,
#the 2nd, 3rd, etc name being shorter by xx letters:
#$00, show first name for all scores
#$90 show only first name
%patch $9A08 $01 $00

#Don't show names
%patch $9A0B $90
#causing problems? Then try this:
%patch $9A0E $90
#Alright Mr fussy, then how about this:
%patch $9A10 $90 $90 $90

#teh highscore table is blankzorz!
%patch $9A3F $90
#Doesn't work? Try:
%patch $9A42 $90
#or this:
%patch $9A47 $90

#Same as above, But it has the highscore sprites.
%patch $9A16 $90
#or:
%patch $98BA $90

#Don't show scores
%patch $99FA $90 $90 $90
Problems? Try:
%patch $99F2 $90
#Or:
%patch $99CA $90

#Show Item 4 one square right of the others.
%patch $99BA $90

#Show everyones scores as zero. [hide the real score.]
%patch $99DD $90


Enjoy, and try to ignore the tortured scream of mangled code!
Last edited by levellord on Thu Feb 03, 2005 1:08 am, edited 1 time in total.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Hehe, nice stuff again. :) 90 seems to be your lucky number. Edit: Or actually 144..
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

$90 = NOP (no operation)
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Mmm, but I like to refer to it as the 'I can't be stuffed' variable.
90 seems to be your lucky number. Edit: Or actually 144..
My lucky number is 13, since 144 is 12 x 12, 144 is doubbly unlucky for me.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

$90 = NOP (no operation)
Yah, I know. But what I don't know, is why there actually is that kind of instruction.. (But thank heaven there is one!!)
User avatar
ckguy
Posts: 465
Joined: Tue Oct 14, 2003 11:20 am
Location: Wakefield, RI, US
Contact:

Post by ckguy »

KeenRush wrote:But what I don't know, is why there actually is that kind of instruction
<wildguess>
Prolly left over from a long time ago, when stuff was stored on magnetic tape.
</wildguess>
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Canyouimaginewhatlanguagewouldbelikewithoutanyspaces?Whatifyouwantedtoblankoutaword?Orspaceyourwords?Orsaveablankspaceforwritingsomethinglater?

$90 is, and always has been, a vital piece of the programing code.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

Hmmm, but IIRC the programs weren't written on computer, but on some punch-cards or something, and that required a lot planning. It may be because of that, though don't think so. And for those languages that can be written with computer, I assume there has always been certain character values for space and new line. But, it could be for blanking out some stuff on some really early phase, where it was hard to program. Dunno, and couldn't find any explanation from web either. :p
User avatar
levellord
Crazy pAtChEr
Posts: 1401
Joined: Thu Nov 20, 2003 11:35 pm
Location: NewZealand
Contact:

Post by levellord »

Read 'In the begginning there was information' it describes how all codes must have either a 'null letter' or 'null sequence', letters $90 or sequences [say $90 $EB $00] that mean 'do nothing' In english this is the ' ' in C this is $90.
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush »

I doubt I can find it anywhere.. :\ But ok then. (Although, I can't understand why there should be code that doesn't do anything, but I guess the book tells it.)
Post Reply