Home



me
deviantART facebook google myspace

My Blog

Show blog for which year?

Mon Feb 13, 2017

I’ve been lazy lately and been watching dvds. I’m a fan of sci-fi/fantasy/horror.

I don’t really have much interest in reviews, but I was happy with seasons 4 and 5 of BBC’s Primeval.

I also found a collection from Echo Bridge, "Croc Godzilla of the Swamp" with five movies:

It was a total of 440 minutes on a single sided DVD. The quality of the video was poor. The effects on "Chupacabra Vs. the Alamo" and "Dire Wolf" were poor, but the latter wasn’t a bad movie.

The other three movies were great and are actually worth rewatching. I’d consider purchasing those three movies separately if they could be found with decent quality. I was surpised at the ending of "Grizzly Rage".

Sun Feb 19, 2017

I started playing around with The Bard’s Tale a little. I spent about two weeks working on a character editor in FreeDos using MIX’s Power C.

I’d forgotten much about editting text in a DOS environment. VIM was broken, and E did not have undo. I ended up relying on a few editors in Windows 3.1 for a small amount of the editting.

Power C’s Project files leave something to be desired, so I downloaded some BSD tools for DOS including make.

The program will probably compile with any ANSI C compiler; but, it was written for a 16 bit compiler. So, char is 1 byte, int is 2 bytes and long is 4 bytes.

I don't believe prototypes were standard yet when the compiler was released. It looked like the compiler did not warn if it thought a function returned an int value when your function returned a long value. Which leads to some really fun bug tracking. I found it by using 65535 as a test value and found it was returning (-1). Coding the function before it is called resolves the issue; otherwise it will silently cast the int to a long.

I learned to program using top down design, before GUIs were ubiquitous, and prefer to use stdin and stdout, so the end result isn't terribly pretty. However, it will accept an input stream. Since the menu system is simple, I added the ability for the editor to accept comments, instead of a command.

I wrote a few batch files for curing the team and traversing all the TPW files in a directory and ran into a few problems. Apparently the FOR construct is not supported in FreeeDOS, and either pipes are broken or MORE is broken and does not accept piped input.

My piping requirements were minimal and redirecting to a temporary file was adequate. I needed to use DRDOS to work around the missing FOR construct though. If you have DRDOS, MSDOS or IBMDOS you can avoid the call to the shell. (I was not running DRDOS as my shell.)

I got the imformation for the file format from The Adventurers’ Guild, which was largely adequate. The spell levels are stored beginning at byte 81: sorceror, conjurer, magician, wizard.

The source code is available at http://mcsuper5.freeshell.org/dl/dos/btce/btce1_1.zip

Mon Feb 20, 2017

Updated my main programming page to include a link for the Bard’s Tale Chacter Editor. I didn’t bother to list all the source files because of the number, but did provide links for the header files, TPW.H and CHAR.H.

In the DOS version of Bard’s Tale the TPW files are used for both parties and characters. The last byte of the 17 byte header indicates if the file is for a party or character.

Parties are simply 6 16 byte fields with null terminated strings for the names of the party members.

The character data is a little more complicated, and some of the skipped bytes might be used for something. I did some range checking, but don’t know the maximum values for all of the fields. I tried watching string input to avoid any buffer overruns. I might try to clean the code up in the future, but FreeDOS might be okay for games, but it not the greatest for setting up a development environment.

Fri Feb 24, 2017

I was thinking about a file selector for the character editor, but think I may skip it.

In DOS apparently BardsTale will list all files ending in TPW; however, you can only select files of the format: "%d.TPW", where %d is in the range 0 to 32767.

The heuristic is simple enough, but wasn’t used in other versions.

Sat Feb 25, 2017

I fixed a few bugs I had in BTCE version 1.2 and released 1.3.

This blog has been viewed 2180 times.

Saturday 19 August 2017   Michael J. Chappell   Contact me at: mcsuper5@freeshell.org