Kalgoorlie Retro Docs

Documentation for the Kalgoorlie Retro BBS, its games and servers

User Tools

Site Tools


lordkg:start

This is an old revision of the document!


LORDKG

LORDKG makes the five registration codes that LORDCFG asks for when you register Legend of the Red Dragon. One program covers both kinds of LORD registration, and you choose which one when you run it:

  • LORD 4.06: the codes don't depend on any name. LORDKG makes a random set that LORDCFG accepts.
  • LORD 4.07 / 4.08 Beta: the codes depend on the sysop name and the BBS name. (The 2009 patch shows itself as “4.08 Beta”.)

The current version is 1.1 (8 November 2026).

Why it exists

Gameport sold the LORD registrations, but it has been unreachable for many years. Michael Preslar, the author of LORD 4.07, hasn't been able to contact them either. No one has been able to buy a code for more than ten years, so a sysop running LORD today has no other way to register it.

What's in the zip

File What it is
LORDKG.EXE The DOS program: any PC from an 8086 up, DOSBox, dosemu or FreeDOS
LORDKG.PY The Python 3 version, for Linux, Windows and macOS (no extra modules)
LORDKG.PAS The Free Pascal source of LORDKG.EXE
LORDKG.TXT The manual
FILE_ID.DIZ File description
COPYING The GNU General Public License, version 2

Both programs work the same way and give the same codes.

Using it

Run it with no parameters and it asks which LORD version the key is for:

C:\LORD> LORDKG
 Which LORD version is the key for?
   1) LORD 4.06
   2) LORD 4.07 / 4.08 Beta
 Choice (1 or 2) -> 2

 Sysop name -> Seth Able
 BBS name   -> The Red Dragon BBS

 LORD version -> 4.07 / 4.08 Beta
-=-=-=-=-=-=-=-=-=-=-
 Regcode #1 -> 48302
 Regcode #2 -> 60389
 Regcode #3 -> 1187
 Regcode #4 -> 6944
 Regcode #5 -> 1480
-=-=-=-=-=-=-=-=-=-=-

Choose 1 and it prints a LORD 4.06 set straight away. The numbers are different every time, and any of them work:

 LORD version -> 4.06
-=-=-=-=-=-=-=-=-=-=-
 Regcode #1 -> 1798
 Regcode #2 -> 5025
 Regcode #3 -> 9377
 Regcode #4 -> 6052
 Regcode #5 -> 22281
-=-=-=-=-=-=-=-=-=-=-

Command line

Command What it does
LORDKG /406 Random LORD 4.06 codes
LORDKG /406 1000 0 0 0 LORD 4.06 with your own first four numbers (0-10000, adding up to at least 971); LORDKG works out the fifth
LORDKG /407 “Sysop” “BBS Name” LORD 4.07 codes
LORDKG /407 /U Sysop BBS_Name The same, with _ for each space, for shells and menus that can't pass quotes
LORDKG “Sysop” “BBS Name” Two names and no switch mean LORD 4.07, as in version 1.0
LORDKG /? A short help screen

The Python version takes the same parameters: python3 lordkg.py /406.

Registering LORD 4.07 / 4.08 Beta

  1. Run LORDKG, choose 2, and type your sysop name and BBS name.
  2. Run LORDCFG.EXE in the LORD folder and choose to enter the registration information.
  3. Type the two names exactly as you gave them to LORDKG, then the five codes.
  4. The LORD title screen now says REGISTERED!

The names must match character for character. Capitals and spaces change the codes, so “Seth Able” and “SETH ABLE” get different ones. Names can be up to 30 characters; LORDKG ignores anything past that.

Registering LORD 4.06

  1. Run LORDKG and choose 1, or run LORDKG /406.
  2. Run LORDCFG.EXE, choose Register Lord, then Enter registration codes, and type the five numbers.
  3. LORDCFG says THE GAME IS NOW REGISTERED! Quit and save.

LORD 4.06 asks for no names, and the numbers aren't tied to your board: any set that passes the check works. LORDKG picks a random set so that different boards don't all use the same code.

How the codes are worked out

LORD 4.06

LORDCFG.EXE 4.06 only checks that the five numbers fit together:

Code 5 = Code 1 + Code 2 + Code 3 + Code 4 + 29

Codes 1 to 4 must each be from 0 to 10000, and code 5 must be at least 1000, so the first four must add up to at least 971. This was read from the checking code in LORDCFG.EXE 4.06 itself. LORDKG's random codes 1 to 4 are each from 1000 to 9999, which always passes.

LORD 4.07 / 4.08 Beta

LORDKG uses the same calculation as an older Windows program, lord47kg.exe (author unknown), worked out from its machine code. Both names are first padded to 10 characters with A, B, C… if they are shorter.

Code How it is made
1 The sysop name's characters added up, with every second character counted 256 times. Kept to 16 bits (0-65535).
2 The same, for the BBS name.
3 Characters taken in turn from the sysop name (1st, 3rd, 5th…) and the BBS name (2nd, 4th, 6th…), added up. The shorter name is padded with the bytes 0, 1, 2… to the longer length.
4 Half of each sysop name character (rounded down), added up, then doubled once for each space or capital letter A-Z in the padded name, at most 4 times.
5 Half of each BBS name character (rounded down), added up, kept to 16 bits, then doubled.

The Python and Pascal versions were checked against each other on 4,913 random and edge-case name pairs, and the DOS build in DOSBox. Both also give the sample codes that came with lord47kg.exe (sysop / bbs: 45788 29601 846 7216 782), and every LORD 4.06 set they make is checked against the rule above.

Building LORDKG.EXE

With the Free Pascal 3.2.2 i8086 cross compiler for the msdos target:

ppcross8086 -Tmsdos -WmLarge -O2 -XX -Xs LORDKG.PAS

The same source builds with ordinary Free Pascal for Linux or Windows: fpc -O2 LORDKG.PAS.

Downloads

From https://retro.theiguru.au/lordkg/, or the Heisenbergs Files area on the BBS: LORDKG11.ZIP.

Licence

LORDKG is Copyright (C) 2026 Michael Slater. It is free software under the GNU General Public License, version 2 or (at your option) any later version, and comes with no warranty.

Legend of the Red Dragon is by Seth Robinson (up to 4.06) and Michael Preslar (4.07). LORDKG has no connection with Gameport or with the authors of LORD.

See also: Version history, LORD FP, LORD Server.

lordkg/start.1794152005.txt.gz · Last modified: by 127.0.0.1