Table of Contents

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:

The current version is 1.3 (9 November 2026). It fixes the LORD 4.06 codes: those from 1.1 and 1.2 were wrong, so if you used one of them for LORD 4.06, make a new set.

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
sbbs/lordkg.js A sysop-only door for Synchronet BBS (see below)
sbbs/lordkglb.js The door's code calculations
LORDKG.TXT The manual
FILE_ID.DIZ File description
COPYING The GNU General Public License, version 2

All three versions 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 -> 19255
-=-=-=-=-=-=-=-=-=-=-

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; #1 + #2 + #3 + half of #4 must be 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.

The Synchronet door

The sbbs folder in the zip has LORDKG as a JavaScript door for Synchronet BBS, with the same menu as LORDKG.EXE:

 Which LORD version is the key for?

   1) LORD 4.06
   2) LORD 4.07 / 4.08 Beta
   Q) Quit

Choose 1 for a random LORD 4.06 set, or 2 and type the sysop name and BBS name for LORD 4.07 (leave a name blank to go back). Each set of codes is shown with a reminder of where to type it in LORDCFG. It was tested on Synchronet 3.21 for Linux, and uses only Synchronet's standard JavaScript, so it should work the same on Windows.

The door is a sysop tool: make it sysop-only, so callers never see it.

Installing the door

  1. Make a folder xtrn/lordkg in your Synchronet directory (for example /sbbs/xtrn/lordkg or C:\SBBS\XTRN\LORDKG) and copy lordkg.js and lordkglb.js from the zip's sbbs folder into it. Keep the names in lower case: Synchronet on Linux looks for exactly these names.
  2. Run SCFG, choose External Programs, then Online Programs (Doors), pick a sysop-only section (the stock Operator section is one) and add a program:
Setting Value
Name LORDKG - LORD Registration Codes
Internal Code LORDKG
Start-up Directory ../xtrn/lordkg
Command Line ?lordkg.js
Access Requirements SYSOP
Execution Requirements SYSOP

Leave the other settings as they are. The ? at the start of the command line tells Synchronet that it is a JavaScript module.

If you edit ctrl/xtrn.ini by hand instead, the entry looks like this (OPERATOR is the section's internal code):

[prog:OPERATOR:LORDKG]
        name=LORDKG - LORD Registration Codes
        ars=SYSOP
        execution_ars=SYSOP
        cmd=?lordkg.js
        startup_dir=../xtrn/lordkg

Save and exit SCFG; Synchronet loads the change the next time a node is free. Log on as a sysop and find LORDKG under External Programs. The Kalgoorlie Retro BBS runs it in its Operator section.

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 / 2) + 29

Code 4 counts at half its value, rounded down: 6052 counts as 3026. Codes 1 to 4 must each be from 0 to 10000, and code 5 must be at least 1000. This was read from the checking code in LORDCFG.EXE 4.06 itself, and LORD.EXE 4.06 checks the codes again the same way each time it starts. 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. The Synchronet door's calculations were checked against the Python version on 3,001 name pairs.

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: LORDKG13.ZIP.

The same places also have LORD Keygen (lord-keygen_0.1.1_amd64.deb), a separate desktop app for Ubuntu and Debian (amd64) that makes LORD 4.06 codes only. You pick the first four numbers with sliders or at random, it works out the fifth, and it can check a code you type. Install it with sudo apt install ./lord-keygen_0.1.1_amd64.deb. Version 0.1.1 has the same LORD 4.06 fix as LORDKG 1.3: 0.1.0 counted all of the fourth number, so its codes were refused. LORD Keygen is free software under the GNU GPL (version 2 or later), and the package includes its Rust source.

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.