George Caswell [Tue, 22 Apr 2025 07:50:52 +0000 (03:50 -0400)]
Fixed a bug in unicode_tolower() - Unicode range detection was broken by some of the code size reduction changes
George Caswell [Sun, 6 Apr 2025 02:54:25 +0000 (22:54 -0400)]
Rearranged help text to order options by functional groups rather than alphabetically. Dropped 'quiet' option from NO_SOUND builds. Removed 'Ignore Errors' option as it's unimplemented in the DOS build. Simplified basename logic in dosinit.c os_process_arguments(). (384 bytes reduction in EXE size)
George Caswell [Sun, 6 Apr 2025 00:14:34 +0000 (20:14 -0400)]
Error counting is no longer supported if NO_DEBUG is set. Command line option for display mode setting is again allowed if TEXTMODE_ONLY is set, but only allows selecting modes 0 and 1 (104 bytes EXE size reduction)
George Caswell [Sat, 5 Apr 2025 23:35:42 +0000 (19:35 -0400)]
"Seed random numbers" hotkey is now disabled if NO_DEBUG is set (180 byte reduction in EXE file)
George Caswell [Sat, 5 Apr 2025 23:09:14 +0000 (19:09 -0400)]
Disabled in-game tab completion (EXE file size reduced by 336 bytes)
George Caswell [Sat, 5 Apr 2025 07:47:33 +0000 (03:47 -0400)]
On non-unicode builds, disabled the unicode downcasing tables in unicode_tolower, and replaced the table for latin-1 with range test logic. EXE file reduction of 640 bytes
George Caswell [Fri, 4 Apr 2025 07:07:12 +0000 (03:07 -0400)]
Implemented "Undo memstate bitmap" - a data structure which is updated with every Z-machine memory write and used to make creation of undo snapshots faster (approx +1kB exe size)
George Caswell [Thu, 3 Apr 2025 14:05:58 +0000 (10:05 -0400)]
Initial load of game header now loads directly to the z_header struct. Byte swapping code for z_header struct now loops over most of the fields rather than loading each field individually from the program memory. Program memory no longer requires realloc. Approx 500 byte code size reduction
George Caswell [Wed, 2 Apr 2025 06:06:56 +0000 (02:06 -0400)]
Quetzal save/restore and the undo system now use the same memory diff/undiff code (saving 1.2k in exe size). Added code to set the buffer size on file pointers opened by os_load_story (but using file descriptor read() is still faster for opening the story file)
George Caswell [Sat, 29 Mar 2025 01:51:41 +0000 (21:51 -0400)]
More changes to reduce EXE size: "Expand abbrev text" feature can now be disabled by macro. Story file identification info is now ifdef'ed out for cases where identification of those story files is only relevant to certain features (sound/graphics). Factored out common portions of z_inc/z_inc_chk and z_dec/z_dec_chk
George Caswell [Fri, 28 Mar 2025 05:16:39 +0000 (01:16 -0400)]
Error messages in quetzal code are made more generic (to save memory) if NO_DEBUG is set
George Caswell [Fri, 28 Mar 2025 05:08:09 +0000 (01:08 -0400)]
Updates to DOS os_read_file_name: Corrected memory leak in "restricted path" code (strdup) as well as a "jailbreak" when the file path uses forward slashes and a failure to append the file extension if the path contains a dot. PATH_SEPARATOR is now defined in the OS directories (as OS_PATH_SEPARATOR) rather than in the common directory.
George Caswell [Fri, 28 Mar 2025 05:04:08 +0000 (01:04 -0400)]
Changed CFLAGS for Borland build to use compact memory model and eliminate duplicate strings
George Caswell [Fri, 28 Mar 2025 00:42:29 +0000 (20:42 -0400)]
Frotz: Pared down various pieces of functionality to make the code smaller and faster on an early DOS PC
David Griffith [Wed, 5 Mar 2025 17:51:03 +0000 (09:51 -0800)]
Fixed potential out-of-bounds read in gen_blorb_init().
Thanks go to Petter Sjölund for pointing out that Address Sanitizer
flagged that line as problematic.
David Griffith [Thu, 27 Feb 2025 05:00:14 +0000 (21:00 -0800)]
Modified Makefile to use "which" if "command -v" isn't available.
NHOrus [Wed, 26 Feb 2025 08:55:00 +0000 (12:55 +0400)]
Replace `which` with POSIX-mandated portable `command -v`
One is a program that needs installing, other is part of the shell
See, eg. https://lwn.net/Articles/874049/
Stephen Kitt [Mon, 3 Feb 2025 06:31:37 +0000 (07:31 +0100)]
Fix "auxiliary" typo
Signed-off-by: Stephen Kitt <steve@sk2.org>
David Griffith [Tue, 11 Feb 2025 18:27:12 +0000 (10:27 -0800)]
Added blurb to ux_audio.h
David Griffith [Tue, 11 Feb 2025 18:05:41 +0000 (10:05 -0800)]
Fix odd indentation in snavig.pl.
David Griffith [Sun, 9 Feb 2025 18:43:24 +0000 (10:43 -0800)]
Fixed nonstandard pkgconf variable names.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1095250
David Griffith [Thu, 6 Feb 2025 20:25:56 +0000 (12:25 -0800)]
Implemented script-from-start for dumb interface.
This can be helpful when doing bugtesting runs. Simply doing
dfrotz < input.txt > output.txt
will not put anything the player types into output.txt. By using the
new -T flag, a transcript of the session is started immediately. Using
the new -n flag, the name of the transcript file can be set at the
command line.
David Griffith [Sat, 8 Feb 2025 03:09:03 +0000 (19:09 -0800)]
Removed useless $(DEFINES) in PHONY target.
David Griffith [Fri, 7 Feb 2025 03:16:11 +0000 (19:16 -0800)]
Fixed potential SDL interface build failure when using "make -j".
David Griffith [Fri, 7 Feb 2025 03:15:03 +0000 (19:15 -0800)]
Shifted to development and created a new release section in ChangeLog.
FeRD (Frank Dana) [Sat, 1 Feb 2025 22:36:37 +0000 (14:36 -0800)]
curses: Make ux_defines.h a prereq of object files
FeRD (Frank Dana) [Sat, 1 Feb 2025 22:25:20 +0000 (14:25 -0800)]
Add two missing includes, to fix builds on Fedora Rawhide (GCC 15.0.1)
David Griffith [Sat, 1 Feb 2025 21:56:41 +0000 (13:56 -0800)]
Quelled some warnings from Turbo C GUI compilation.
David Griffith [Sat, 1 Feb 2025 21:07:33 +0000 (13:07 -0800)]
Added Turbo C for 16-bit DOS fix for 64k boundary crossing.
The LOW_WORD() macro for TurboC can't handle a zword passed as the
address because that macro assumes the first parameter is a 16-bit
value. Maybe someday I'll find a clean way to rewrite that macro.
David Griffith [Sat, 1 Feb 2025 05:03:34 +0000 (21:03 -0800)]
Updated Makefiles for Turbo C and Open Watcom C.
David Griffith [Sat, 1 Feb 2025 04:08:21 +0000 (20:08 -0800)]
Updated ChangeLog and Makefile in preparation for new release.
David Griffith [Sat, 1 Feb 2025 04:01:21 +0000 (20:01 -0800)]
Updated dates in manpages again.
David Griffith [Mon, 27 Jan 2025 23:44:48 +0000 (15:44 -0800)]
Fatal error instead of segfault when writing a string that crosses the 64k mark.
Static and dynamic memory is restricted to below $0ffff (64k). Past
this mark is high memory. Frotz previously stored the address for
printing a string in a zword variable (unsigned short). An unsigned
short is two bytes and therefore loops back to zero after passing
0xffff. When decode_text() was given a string that straddles the 64k
boundary, the address variable looped back to zero, which then provoked
a segfault.
Per the Z-machine Standard, the proper action to take when crossing that
boundary is undefined. If the value in the address variable is copied
to a zlong variable (unsigned long) before proceeding, printing one of
these naughty strings will succeed without complaint. Allowing that to
happen is in direct opposition to why segfaults happen in the first
place: when a program starts writing outside your allocated memory,
that's a clear indication that the program has aquired a faulty picture
of what should be happening. Therefore I have Frotz throw a fatal error
when encountering such a print attempt.
FeRD (Frank Dana) [Thu, 23 Jan 2025 00:34:30 +0000 (19:34 -0500)]
Add src/sdl/sf_defines.h to gitignore
David Griffith [Fri, 10 Jan 2025 07:46:25 +0000 (23:46 -0800)]
Updated manpages.
David Griffith [Thu, 9 Jan 2025 06:55:18 +0000 (22:55 -0800)]
Updated ChangeLog with filename extension stuff.
David Griffith [Thu, 9 Jan 2025 06:48:23 +0000 (22:48 -0800)]
Reworked dumb interface to add appropriate filename extensions for all files.
This reworks
915e385.
David Griffith [Thu, 9 Jan 2025 06:05:56 +0000 (22:05 -0800)]
Reworked curses interface to add appropriate filename extensions for all files.
This reworks
25d5cfc.
David Griffith [Thu, 9 Jan 2025 05:41:46 +0000 (21:41 -0800)]
Reworked SDL interface to add appropriate filename extensions for all files.
This reworks
1e70ac9 and
40fc04b.
David Griffith [Tue, 7 Jan 2025 05:56:28 +0000 (21:56 -0800)]
For X11 interface, add appropriate filename extensions if not already there.
David Griffith [Sat, 4 Jan 2025 01:26:08 +0000 (17:26 -0800)]
For saving in dumb interface, append ".qzl" to filename if not already there.
David Griffith [Thu, 2 Jan 2025 06:21:03 +0000 (22:21 -0800)]
For saving in curses interface, append ".qzl" to filename if not already there.
David Griffith [Thu, 2 Jan 2025 04:51:36 +0000 (20:51 -0800)]
Fixed potential source of trouble when reading file names.
David Griffith [Wed, 1 Jan 2025 20:57:37 +0000 (12:57 -0800)]
For saving in SDL interface, append ".qzl" to filename if not already there.
David Griffith [Wed, 1 Jan 2025 06:48:20 +0000 (22:48 -0800)]
Updated ChangeLog.
David Griffith [Wed, 1 Jan 2025 06:33:44 +0000 (22:33 -0800)]
Ifdef'ed code to check if a short > 16 bits for only TOPS20.
There's reason to call s16() other than for compilation on a PDP10. It
was introduced originally by Andam Thornton to ensure that Frotz is
36-bit clean.
James Le Cuirot [Wed, 1 Jan 2025 04:57:24 +0000 (20:57 -0800)]
Fix stray $ that breaks the frotz filename when specifying LDFLAGS
David Griffith [Fri, 30 Aug 2024 19:21:31 +0000 (12:21 -0700)]
Fixed spurious complaint of missing graphics when Z-code is in the Blorb file.
For curses, dumb, sdl, x11, and dos interfaces.
Note: The code I removed from os_load_story() wasn't doing anything.
David Griffith [Fri, 30 Aug 2024 20:11:48 +0000 (13:11 -0700)]
Removed m_exitPause from SDL as it caused problems without being useful.
David Griffith [Sat, 8 Jun 2024 19:42:21 +0000 (12:42 -0700)]
Ensured complaint about missing graphics if blorb file is garbage.
David Griffith [Sat, 8 Jun 2024 17:21:42 +0000 (10:21 -0700)]
Moved X11 pkgconf calls to X11 Makefile and allow for no pkgconf present.
David Griffith [Mon, 3 Jun 2024 18:37:29 +0000 (11:37 -0700)]
Fixed X11 interface build calling pkg-config directly.
David Griffith [Mon, 3 Jun 2024 18:30:33 +0000 (11:30 -0700)]
Moved SDL pkgconf calls to SDL Makefile to avoid spurious complaints.
Otherwise the build process would throw warnings of SDL libraries not
being found when building some other interface on a machine without SDL
installed.
David Griffith [Sun, 2 Jun 2024 17:17:01 +0000 (10:17 -0700)]
Removed commented out stuff left over from sdl_nosound implementation.
David Griffith [Tue, 28 May 2024 07:16:46 +0000 (00:16 -0700)]
Implemented sdl_nosound build target.
David Griffith [Mon, 27 May 2024 20:29:41 +0000 (13:29 -0700)]
Reworked "make help" output.
David Griffith [Mon, 27 May 2024 07:45:56 +0000 (00:45 -0700)]
Redid declaration of "avail" to satisfy ANSI. Open Watcom C for DOS complained.
Previously Open Watcom C for DOS didn't have a problem with this.
David Griffith [Mon, 27 May 2024 07:41:36 +0000 (00:41 -0700)]
Added some commentary for the common defines.
David Griffith [Mon, 27 May 2024 06:53:20 +0000 (23:53 -0700)]
Moved ux_defines.h generation to src/curses/Makefile.
David Griffith [Mon, 20 May 2024 19:29:50 +0000 (12:29 -0700)]
Added dummy functions for no sound support.
David Griffith [Sat, 18 May 2024 03:20:51 +0000 (20:20 -0700)]
Saved the computed Blorb filename for later use.
This ensures that if a V6 game is started and we're using one of the
default Blorb filenames, a complaint about a missing Blorb file won't be
printed.
David Griffith [Thu, 16 May 2024 06:17:46 +0000 (23:17 -0700)]
Fixed potential NULL references in the curses interface.
David Griffith [Thu, 16 May 2024 06:08:52 +0000 (23:08 -0700)]
Fixed potential NULL references in the curses interface.
These are the same places that caused segfaults for the X11 interface.
Who knows why they didn't cause trouble for the curses interface.
David Griffith [Wed, 15 May 2024 19:50:10 +0000 (12:50 -0700)]
Fixed many NULL references when X11 interface loads V6 without resource.
These caused xfrotz to segfault instead of continue and complain if a V6
game is loaded but no Blorb file is provided.
curiousdannii [Sun, 12 May 2024 05:12:24 +0000 (05:12 +0000)]
Update Makefile to account for no pkgconf
Before this it would try to run libpng as a program, resulting in lots of "make: libpng: No such file or directory" messages
David Griffith [Sat, 11 May 2024 07:23:02 +0000 (00:23 -0700)]
Redid warnings for missing graphics.
The previous attempt wasn't very good. This time around, it's not as
kludgey and the warning will appear with all combinations of Infocom's
V6 games and Frotz interfaces.
David Griffith [Tue, 14 May 2024 04:21:16 +0000 (21:21 -0700)]
Removed superfluous include of execinfo.h.
David Griffith [Sat, 11 May 2024 04:36:23 +0000 (21:36 -0700)]
Added ifndef NO_EXECINFO_H around include of execinfo.h.
David Griffith [Sat, 11 May 2024 01:11:47 +0000 (18:11 -0700)]
Fixed $(EXTENSION) applied twice to executables.
David Griffith [Tue, 7 May 2024 23:47:22 +0000 (16:47 -0700)]
Added runtime warnings when sound or graphics are used but no Blorb is loaded.
David Griffith [Tue, 7 May 2024 06:11:34 +0000 (23:11 -0700)]
Directed players to the IF Archive to get graphics and sound for Infocom games.
David Griffith [Tue, 7 May 2024 05:17:50 +0000 (22:17 -0700)]
Fixed typo.
David Griffith [Fri, 1 Mar 2024 02:01:24 +0000 (18:01 -0800)]
Put my_strdup() and my_strndup() into separate ifdefs.
David Griffith [Fri, 1 Mar 2024 01:50:49 +0000 (17:50 -0800)]
Moved my_strrchr() to src/common/missing.c and made my_basename().
I'm not sure why I didn't implement my_basename() until now.
David Griffith [Thu, 29 Feb 2024 23:47:25 +0000 (15:47 -0800)]
Removed CC declaration in SDL interface Makefile.
David Griffith [Thu, 29 Feb 2024 22:26:13 +0000 (14:26 -0800)]
Ensured that either pkgconf or pkg-config can be used.
Lately pkgconf is functionally the same as pkg-config. The latter name
is deprecated. These changes ensure that pkgconf will be tried first,
then pkg-config. If neither are found, some defaults will be tried, the
build may or may not succeed.
David Griffith [Thu, 29 Feb 2024 19:32:30 +0000 (11:32 -0800)]
Simplified means of not including stdint.h for DOS targets.
David Griffith [Thu, 29 Feb 2024 19:05:56 +0000 (11:05 -0800)]
Finalized (for now) Randomization Test Suite.
David Griffith [Mon, 8 Jan 2024 05:44:22 +0000 (21:44 -0800)]
Reordered display_spread() to make a little more sense.
David Griffith [Fri, 5 Jan 2024 18:55:21 +0000 (10:55 -0800)]
Getting ChangeLog a bit more ready for release.
David Griffith [Fri, 5 Jan 2024 18:53:55 +0000 (10:53 -0800)]
Extended the name of the randomization test to randomization test SUITE.
David Griffith [Fri, 5 Jan 2024 01:36:38 +0000 (17:36 -0800)]
Laid foundation for spread test to automatically increase granularity.
David Griffith [Fri, 5 Jan 2024 00:47:35 +0000 (16:47 -0800)]
Removed useless parameters fed to _bellcurve() functions.
David Griffith [Fri, 5 Jan 2024 00:32:01 +0000 (16:32 -0800)]
Parked cursor out of the way for the spread test.
David Griffith [Fri, 5 Jan 2024 00:27:36 +0000 (16:27 -0800)]
Cleaned up printing of bar segments and removed @set_colour calls.
David Griffith [Fri, 5 Jan 2024 00:15:18 +0000 (16:15 -0800)]
Consolidated the two bin and count arrays into a single Count array.
Only one was in use at any time: one for one test and the other for the
other test.
David Griffith [Fri, 5 Jan 2024 00:11:08 +0000 (16:11 -0800)]
Spread test width is now the terminal width.
David Griffith [Thu, 4 Jan 2024 23:44:31 +0000 (15:44 -0800)]
Put back the Lanes variable as a Global.
David Griffith [Thu, 4 Jan 2024 23:34:02 +0000 (15:34 -0800)]
Added intro to spread test.
David Griffith [Wed, 3 Jan 2024 02:25:43 +0000 (18:25 -0800)]
Committed a new build of the (now named) Z-machine Randomization Test.
David Griffith [Wed, 3 Jan 2024 02:24:44 +0000 (18:24 -0800)]
Commented out Serial in random.inf since this is not yet ready for release.
David Griffith [Wed, 3 Jan 2024 02:23:11 +0000 (18:23 -0800)]
Added optimzations to random.inf. 6656 bytes reduced to 4096 bytes.
David Griffith [Wed, 3 Jan 2024 02:19:47 +0000 (18:19 -0800)]
Changed name of randomization test to Z-machine Randomization Test
Inform hasn't much to do with this program as it's intended to
test an interpreter's behavior.
David Griffith [Wed, 3 Jan 2024 02:04:40 +0000 (18:04 -0800)]
Eliminated LANES from the global variables in random.inf.
David Griffith [Wed, 3 Jan 2024 00:52:47 +0000 (16:52 -0800)]
Now setting Height and Width only in Main() in random.inf.
David Griffith [Tue, 2 Jan 2024 08:43:41 +0000 (00:43 -0800)]
Corrected pausing goofs for the bellcurve test in random.inf.
David Griffith [Mon, 1 Jan 2024 00:19:12 +0000 (16:19 -0800)]
Fixed problem with being unable to exit the spread test.
David Griffith [Mon, 1 Jan 2024 00:06:12 +0000 (16:06 -0800)]
Updated copyright and signon stuff and put random.inf in public domain.
David Griffith [Sun, 31 Dec 2023 22:14:56 +0000 (14:14 -0800)]
Moved printing of the last drop count in display_bellcurve() to before the loop.
David Griffith [Sun, 31 Dec 2023 21:30:20 +0000 (13:30 -0800)]
Added release and serial number display to random.inf.