Editing the Loading Screen

Completed patches for Keen6.
Post Reply
Mink
Posts: 192
Joined: Sat Nov 03, 2007 4:08 pm
Location: Providence, RI, US

Editing the Loading Screen

Post by Mink »

This patch lets you change the text in the top box (the title and copyright notice) on the loading screen (the one with the purple boxes) that appears as soon as you start the game. Here it is:

Code: Select all

# Replace the loading screen
%patchfile $1FDCC loading.ck6

Then, put the following into a text file, and save it as loading.ck6:

Code: Select all

 ²²²²±±±°°°°  °°°°±±±²²²² Ûº] _C_o_m_m_a_n_d_e_r_ _K_e_e_n_ _i_n_._._._"_A_l_i_e_n_s_ _A_t_e_ _M_y_ _B_a_b_y_ _S_i_t_t_e_r_!_"_ ]º]  ²²²²±±±°°°°  °°°°±±±²²²² Ûº] ] ] ] ] ] ]C]o]p]y]r]i]g]h]t] ]1]9]9]2] ]I]d] ]S]o]f]t]w]a]r]e] ]I]n]c].] _(]v]1].]4])] ] ] ] ] ] ]º]  ²²²²±±±°°°°  °°°°±±±²²²² 



All you have to do now is edit the text in your loading.ck6 file, and enjoy your new loading screen!
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

Post by Shadow Master »

The same mistake I mentioned you in CK4 Patches...
User avatar
XkyRauh
Posts: 1114
Joined: Sun Aug 31, 2003 9:14 pm
Location: San Diego, California

Post by XkyRauh »

It's not a mistake, per se; it's a different method of achieving results.

At the very least, SM, you can explain in more detail how to do the changes in the method you prefer; I recall having no end of difficulty trying to find an ANSI editor that would actually interpret the screens.

This method, though visually jarring and initially confusing to look at, isn't tough to decode--the character before the letter is information relating to the colors and such, right? It's just a trial-and-error matter.

It really irks me when a community member is so negative. We're not all experts at this--many of us are doing this for recreation, and the posts we make aren't "Hey, check out my awesome hacking talents!" it's "Hey, I figured out how to do something that I didn't see covered! Cool!" :) Try to be a little more constructive, SM!
Mink
Posts: 192
Joined: Sat Nov 03, 2007 4:08 pm
Location: Providence, RI, US

Post by Mink »

All I was trying to do was change the title and the copyright notice. This patch isn't for changing the colors of the text (I think that is what the unreadable characters are); it's for editing the text itself. I tried to find an ANSI editor that would allow me to edit this screen, but I had no luck. Thus, I devised this method to go about doing that. To edit the screen, you just have to change the readable text in the loading.ck6 file. For example, if I wanted the screen to say 'Commander Keen in..."The Universe is Toast!"' I would edit my loading.ck6 file to say the following:

Code: Select all

 ²²²²±±±°°°°  °°°°±±±²²²² Ûº] _ _ _C_o_m_m_a_n_d_e_r_ _K_e_e_n_ _i_n_._._._"_T_h_e_ _U_n_i_v_e_r_s_e_ _i_s_ _T_o_a_s_t_!_"_ _ _ ]º]  ²²²²±±±°°°°  °°°°±±±²²²² Ûº] ] ] ] ] ] ]C]o]p]y]r]i]g]h]t] ]1]9]9]2] ]I]d] ]S]o]f]t]w]a]r]e] ]I]n]c].] _(]v]1].]4])] ] ] ] ] ] ]º]  ²²²²±±±°°°°  °°°°±±±²²²² 
The screen would then look like this.
EricMushroomWilson
Posts: 78
Joined: Mon Dec 18, 2006 9:52 pm
Location: Limbo

Post by EricMushroomWilson »

I've actually never seen (I don't think) anything about editing the loading screen before, so this could be useful.
User avatar
Napalm
Posts: 19
Joined: Sat Oct 27, 2007 6:49 am
Location: UK

Post by Napalm »

Not too bad, and yes the raw paste is rather silly.
Just thought I would clear up some facts regarding this topic.

Text in Mode-0 (80x25) graphics are pretty simple 4K per screen comprising of 2K attributes and 2K text interlaced together. In video memory this goes [Char|Attr|Char|Attr|Char|Attr|..]. I've examined an uncompressed Keen6 executable and the screen data is stored the same way with a prefixing WORD with the value 4000, this would obviously let the program know how much screen data follows. The attribute byte is explained here: http://www.osdever.net/FreeVGA/vga/vgat ... attributes

The examples of this data shown here and in the old linked topic seem to be incorrect in that they show an attribute before text. I would therefore assume that the offsets shown are all off by one.. the best way to find the start would be to locate the prefixing 0x1A0F (4000)

I've updated the TXTMODE.CK4 to reflect these changes and I've also created a simple editor for these text screens.. its windows console only but any linux developer should be able to implement the ncurses library and replace the windows specific system calls. Source code + Executable included.

Download: http://www.netcore2k.net/others/keen/KeenText.zip

Hope this helps,
Napalm
levellass
Posts: 3001
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass »

Very nicely done. I myself edit these screens the way I was taught, byte-by-byte as a .txt file that I can then rename and patch into the executable. However this will be absolutely perfect; I make no apologies that I am a die hard DOS fan and prefer my programs to be all numeric keypad controlled.
User avatar
Shadow Master
Posts: 129
Joined: Fri Oct 20, 2006 3:14 pm
Location: Santiago, Chile
Contact:

Post by Shadow Master »

XkyRauh wrote:It's not a mistake, per se; it's a different method of achieving results.

At the very least, SM, you can explain in more detail how to do the changes in the method you prefer; I recall having no end of difficulty trying to find an ANSI editor that would actually interpret the screens.

[...] It really irks me when a community member is so negative. We're not all experts at this--many of us are doing this for recreation, and the posts we make aren't "Hey, check out my awesome hacking talents!" it's "Hey, I figured out how to do something that I didn't see covered! Cool!" :) Try to be a little more constructive, SM!
Alright, apologies. And on this matter I recommend you to read the "Tools" section of the following article, it mentions a couple of programs that might help you edit existing text screens.

http://www.shikadi.net/moddingwiki/B800_Text

EDIT: Napalm beat me to it... but it has its source code published? Great, I'll check it immediately.
EDIT2: some weird code you use there for doing console operations; it's all Win32 API's way of doing things, but I think I can translate it to use ncurses nevertheless.
leandrotlz
Posts: 9
Joined: Fri Jun 06, 2008 11:14 am

Post by leandrotlz »

Mink wrote:I tried to find an ANSI editor that would allow me to edit this screen, but I had no luck. Thus, I devised this method to go about doing that.
TheDraw will do it (and as a pure DOS program, it'll run on Linux under DOSBOX). I started editing a little farther ahead (27 bytes, iirc) so I would get two whole lines in there (320 bytes). I saved the following to ck6scr.bin:
°°°°±±±²²²² Ûº] _C_o_m_m_a_n_d_e_r_ _K_e_e_n_ _i_n_._._._"_A_l_i_e_n_s_ _A_t_e_ _M_y_ _B_a_b_y_ _S_i_t_t_e_r_!_"_ ]º] ²²²²±±±°°°° °°°°±±±²²²² Ûº] ] ] ] ] ] ]C]o]p]y]r]i]g]h]t] ]1]9]9]2] ]I]d] ]S]o]f]t]w]a]r]e] ]I]n]c].] _(]v]1].]4])] ] ] ] ] ] ]º] ²²²²±±±°°°°
Then opened it with thedraw ck6.bin. It worked perfectly. I used the following patch file to apply it:
%ext ck6
%version 1.4

# Replace the loading screen
%patchfile $1FDE7 ck6scr.bin 0 320

%end
My patchfile line explicitly declares the number of bytes to load (320) because TheDraw saves 16K binary files. For final distribution is easy to trim that, but while editing I just leave the 16K file and let the patch file do the job.
Post Reply