Author Topic: Editing CKIT in DOSBOX  (Read 1262 times)

Offline Amarande

  • Newbie
  • *
  • Posts: 26
Editing CKIT in DOSBOX
« on: April 10, 2012, 06:07:24 PM »
Soo ....

What's the trick to get this working right, exactly? I'm using a Debian Squeeze system with DOSBOX 0.74.

I can edit basically anything but CKIT. Things like Brett Ladd's item editor function perfectly (and thus, I'm guessing that anything that edits a file that goes into the DSN directory in its edited form will work perfectly as well - i.e., anything but CKIT.EXE itself).

However, whenever I use any CKIT.EXE editor of any sort (so far I've tried TEXTEDIT and RC_EDIT), here's what happens:

* No error messages when launching the editor, nor from UASHELL afterwards. It all looks like it works properly.
* No errors during editing either, the editors go through the motions without any obvious problems. Though I have noticed that sometimes the save function is a little slow. I'm not exactly sure if that is the editor itself being slow or a harbinger of the problem.
* However, an attempt to make a further edit finds that the changes have mysteriously reverted/not been actually saved. DIFF.TBL is present, but has only 3 bytes (as an empty DIFF.TBL with no actual changes would contain).

Applying an existing design (like The Realm designs) that has a DIFF.TBL file works without a hitch, though.

What causes this, and how to fix/work around it? Is a separate disk partition with FreeDOS and a VM necessary, or can it be done with DOSBOX?

Offline nologgie

  • Non-resident Non-expert
  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 3465
Re: Editing CKIT in DOSBOX
« Reply #1 on: April 11, 2012, 06:24:25 AM »
UAShell's file comparator doesn't seem to play well with DOSBox. If you can run UAShell and the editors directly under Linux it will probably work.

If it doesn't, a diff.tbl can be made using a binary file comparator like fc.exe (DOS, WIN, UNIX, whatever), but it takes a little effort.
Some days it just doesn't pay to gnaw through the straps.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2179
    • Nol Drek's Web Site
Re: Editing CKIT in DOSBOX
« Reply #2 on: April 11, 2012, 01:05:48 PM »
UAShell uses the DOS Command FC. FC is one of the DOS Commands that is not yet supported by DOSBOX.

As nologgie said, if you can run CMD.EXE on your computer to get "actual DOS" instead of "emulated DOS", then you could type the following from the DOS prompt in your FRUA directory:


Note: The /B option is necessary to do a binary file comparison instead of an ASCII file comparison
Note: The > DIFFTBL.TXT redirects the output to a text file instead of the DOS screen
Note: The order of the files is important: FC old_file new_file /B > diff_file

This will create an enormous text file that contains all the differences between the two files. It also explains why the DIFF.TBL has the format [Hex address] [old value] [new value].

After you remove the leading zeros from the addresses, delete the colons after the addresses, and add a line with a single zero to the end of the file, you can rename your DIFFTBL.TXT file to DIFF.TBL (after making appropriate backups of all files).
"Into the Drachensgrab Mountains!"

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Editing CKIT in DOSBOX
« Reply #3 on: April 12, 2012, 03:36:12 AM »
Here is the printout of the help text for the File Compare function:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Control>FC /?
Compares two files or sets of files and displays the differences between them

FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]
   [drive1:][path1]filename1 [drive2:][path2]filename2
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2

  /A         Displays only first and last lines for each set of differences.
  /B         Performs a binary comparison.
  /C         Disregards the case of letters.
  /L         Compares files as ASCII text.
  /LBn       Sets the maximum consecutive mismatches to the specified number of lines.
  /N         Displays the line numbers on an ASCII comparison.
  /OFF[LINE] Do not skip files with offline attribute set.
  /T         Does not expand tabs to spaces.
  /U         Compare files as UNICODE text files.
  /W         Compresses white space (tabs and spaces) for comparison.
  /nnnn      Specifies the number of consecutive lines that must match after a mismatch.
             Specifies the first file or set of files to compare.
             Specifies the second file or set of files to compare.

Help shows a list of all commands available on the Command Prompt.
(Command name) /? will display a printout of the help text for this command.