Tuesday, October 10, 2023

Force Engine - Mac data

Mac rendered at 640x480 apposed to Dos at 320xsomething

Maybe not 480, probably 400? Menu says 640x400...640x395 measured?

600x400 doubled pixels, so 300x200?

Anyway, 384x200 is "teensy":

Most parts are the same, but

  • the loading screen was 640x480
  • hud textures were double resolution 
  • weapons data stored in WEAPONS.GOB, but otherwise the same content
  • minor differences in levels
  • fonts smoother(extra Glowing!.fnt ?)
  • music same/different. music is stored in resource fork?
  • cutscenes: same except for AGENTMNU.LFD and MENU.LFD (font was upscaled, the button names were changed from "DOS" to "QUIT", and a mysterious widening of two parallel red lines.

 



The big changes below are not changes, just re-ordered arm1 <-> arm2 messages


Hotkeys, quit hotkey changed to qQ from dD

NARSHADA.O is missing an object(missing the remote sprite), and extra LOGIC: ANIM in nava card:



SECBASE.O only has an extra LOGIC: ANIM similar to the one in NARSHADA



TEXT.MSG is mac-ified:

The midi instruments are stored in instruments1,2, all in the resource fork(I think that is all that and menu/icon things are all the resource fork data):




instruments in 2 are roughly double the size of 1 so probably 16bit?

Stereo Panning? ... listens. It seems to work. dos version doesn't have an option for it, but it seems to work by default.

I don't know if there is a way to send the midi data out of the mac version, or if the instruments provided are all we get.

cutscenes (extracted with DF2.exe in dosbox, probably could have used lfdtool.py in win):

 

python ..\..\..\..\..\dftools-master\delttool.py AGENTDLG_11.DELT ..\AGENTMNU.PLT


MAC 324x182
Dos 323x188

I think I need some more context.

All the other AGENTDLG_##.DELT are just various menu ui bits, "are you sure you want to quit", "yes", "no" buttons and such.

AGENTMENU.ANIM
D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data\Cutscenes\AGENTMNU>python ..\..\..\..\dftools-master\animtool.py extract AGENTMNU.ANM AGENTMNU
Extracting "D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data\Cutscenes\AGENTMNU\AGENTMNU.ANM" into directory "D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data\Cutscenes\AGENTMNU\AGENTMNU"





Macified text.


D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU>python ..\..\..\..\dftools-master\fnttool.py FONT8.FON
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 4, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU>pip install Pillow
Collecting Pillow
  Downloading Pillow-10.0.1-cp39-cp39-win_amd64.whl (2.5 MB)
     |████████████████████████████████| 2.5 MB 3.2 MB/s
Installing collected packages: Pillow
Successfully installed Pillow-10.0.1
WARNING: You are using pip version 21.0; however, version 23.2.1 is available.
You should consider upgrading via the 'c:\python39\python.exe -m pip install --upgrade pip' command.

D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU>python ..\..\..\..\dftools-master\fnttool.py FONT8.FON
Loaded built-in palette "SECBASE"
Converting "D:\Games\TheForceEngine-v1.09.530\ModPrep\Dark Forces Data-dos\LFD\MENU\FONT8.FON"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 44, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 40, in main
    from_fnt(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\fnttool.py", line 23, in from_fnt
    fnt.to_image(fnt.read(image), rgb_palette).save(f'{imageName}.png')
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\formats\fnt.py", line 23, in read
    raise Exception('File does not have FNT magic identifier.')
Exception: File does not have FNT magic identifier.

oh it isn't a 'fnt' it is a 'font'


\(〇_o)/
Gimp to the rescue
Mac - Dos

The mission briefing uses a different font:


Jan looks a bit smoother

Yep, some of those pixels have been al/tered.

I cant find the upscaled jan and mon mothma images. TFE looks like it is

s_menuActor = lactorAnim_load(bgAnim, &bounds, 0, 0, 0);

which does a:

sprintf(animName, "%s.ANIM", name);

name -> bgAnim ->  brief -> bgAnim -> &s_sharedState.briefingList.briefing[briefingIndex];

list gets loaded in with:
if (!parseBriefingList(&s_sharedState.briefingList, "briefing.lst"))

which is in DARK.GOB. I probably should have guess that,

LEV: SECBASE    LFD: dfbrief.lfd ANI: brf-mon PAL: brf-jan
DFBRIEF.LFD ... meld showed them as identical, but I'll check 'brf-mon' or 'brf-jan' or 'brf-nil'
brf-jan.anim -> brf-jan_0.DELT has the background, but it is the same as the dos version 311x200.

 

I'm still not sure where the extra pixels come from.


Thursday, October 5, 2023

Dark forces edit/mod

TLDR: png -> BM_converter.exe -> gobtool.py -> mods/texture/TEXTURE.GOB

I noticed a texture seemed odd. 

I thought it might be a glitch, I went back and checked the mac version in sheepsaver, and it shows there too.
 
 It is that way in a map editor wdfuse. 

 Given it's name, ZPMARBB1.BM, I guess it is "marble" something.

I grabbed a marble looking image from the internet. and saved it as 256x256 PNG, and imported it into "BM_Converter.exe" found on df-21.net

Next to create a TEXTURE.GOB with the file in it was a bit tricky. I found some python scripts to do it, https://github.com/njankowski/dftools , The documentation seems wrong


D:\Games\TheForceEngine-v1.09.530\dftools-master>python gobtool.py archive "TEXTURES.GOB" "..\TEXTURES"
Archiving "D:\Games\TheForceEngine-v1.09.530\dftools-master\TEXTURES.GOB" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 66, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 62, in main
    args.func(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 13, in archive
    entries = bulkrw.read_files(args.directory, args.recursive)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\util\bulkrw.py", line 23, in read_files
    for file in os.listdir(directory):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:\\Games\\TheForceEngine-v1.09.530\\dftools-master\\TEXTURES.GOB'

D:\Games\TheForceEngine-v1.09.530\dftools-master>cd ..

D:\Games\TheForceEngine-v1.09.530>python dftools-master\gobtool.py archive "TEXTURES.GOB" "TEXTURES"
Archiving "D:\Games\TheForceEngine-v1.09.530\TEXTURES.GOB" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 66, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 62, in main
    args.func(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 13, in archive
    entries = bulkrw.read_files(args.directory, args.recursive)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\util\bulkrw.py", line 23, in read_files
    for file in os.listdir(directory):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'D:\\Games\\TheForceEngine-v1.09.530\\TEXTURES.GOB'

D:\Games\TheForceEngine-v1.09.530>python dftools-master\gobtool.py archive "TEXTURES.GOB" "TEXTURES"
Archiving "D:\Games\TheForceEngine-v1.09.530\TEXTURES.GOB" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES"
Traceback (most recent call last):
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 66, in <module>
    main()
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 62, in main
    args.func(args)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\gobtool.py", line 13, in archive
    entries = bulkrw.read_files(args.directory, args.recursive)
  File "D:\Games\TheForceEngine-v1.09.530\dftools-master\util\bulkrw.py", line 23, in read_files
    for file in os.listdir(directory):
NotADirectoryError: [WinError 267] The directory name is invalid: 'D:\\Games\\TheForceEngine-v1.09.530\\TEXTURES.GOB'

D:\Games\TheForceEngine-v1.09.530>python dftools-master\gobtool.py archive "TEXTURES" "TEXTURES.gob"
Archiving "D:\Games\TheForceEngine-v1.09.530\TEXTURES" into GOB "D:\Games\TheForceEngine-v1.09.530\TEXTURES.gob"
Done

D:\Games\TheForceEngine-v1.09.530>

It seems that the arguments for the "make a gob" section were backwards.

Placing the resultant TEXTURE.GOB into a new TheForceEngine-v1.09.530\Mods\textures folder

And it seems to load and work:
before reference

Now that I put that in I see the replacement texture everywhere in that level.


Wednesday, August 16, 2023

Star Trek: Klingon on linux via wine

Requires Video for Windows but won't install due to "Video for Windows does not run on Windows NT 3.1. Please upgrade your version of Winodws." Despite having winecfg set to Windows XP.

Copy the /media/cdrom0/vfw11ea folder somewhere and edit setup.mst. Remove lines 67-74. nope it is win nt kernel, so probably just 69-73

Then it will start up, and not display video. 😢

Bonus, copying the video files from the disk to C:\ and changing klingon.ini disk drive to C:\ removes the need to have the cd in the drive.

Sunday, June 11, 2023

torani syrup popsicle recipie

TLDR: 20%-30% syrup

6 popcicles -> 10oz or 275ml volume

55mL Syrup/220mL water
to
82.5mL syrup/192.5mL water

methodology

50mL water -> add syrup until taste

Peach
watertaste
2.5mLwater
5mLwatery
10mLpeachy
15mL✔
15/(50+15)=23% syrup
raspberry
watertaste
10mLwatery
15mLalmost
20mL✔
20/(50+20)=29% syrup

Tuesday, May 17, 2022

apt upgrade errors with "The group `systemd-journal' already exists and is not a system group. Exiting."


stephen@Dell-DM051:~$ grep "SYSTEM" /etc/adduser.conf
# FIRST_SYSTEM_[GU]ID to LAST_SYSTEM_[GU]ID inclusive is the range for UIDs
FIRST_SYSTEM_UID=100
LAST_SYSTEM_UID=999
FIRST_SYSTEM_GID=100
LAST_SYSTEM_GID=999
stephen@Dell-DM051:~$ grep "systemd" /etc/group
systemd-journal:x:101:
systemd-network:x:102:
systemd-resolve:x:103:
systemd-coredump:x:117:
stephen@Dell-DM051:~$ groups
stephen adm dialout fax cdrom floppy tape sudo audio dip video plugdev lpadmin scanner sambashare mythtv users administrators localadmin sudo wireshark adm systemd-journal
stephen@Dell-DM051:~$ getent group systemd-journal
systemd-journal:*:1000007:stephen
stephen@Dell-DM051:~$ 

edit the group in LDAP to be gid:101

sudo nscd --invalidate=group

success

Friday, October 8, 2021

Migrate from LinuxMint 19(32bit) to Debian 11(32bit)

 Linux Mint 32bit is dead. Long live Debian 32bit

1) Remove mint specific packages but not mint-common/mintsources/mint-translations, those try to remove gdebi, and say "potentially harmful"...

2) Remove un-needed stuff, libreoffice/nvidia-prime-applet/hexchat/transmission-gtk/thunderbird/firefox?/etc.

3) Check for other mint-only/ubuntu-only package with something like: https://pkgs.org/search/?q=mintreport search for mint specific packages with apt list --installed | grep tricia, can do the same thing with ubuntu packages https://pkgs.org/search/?q=kerneloops.

add debian to sources.list.d/ https://wiki.debian.org/SourcesList

deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian-security/ bullseye-security main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

obtain debian keys (I copied from debian install)

cp trusted.gpg.d/debian-archive-* /etc/apt/trusted.gpg.d/

remove ubuntu/mint sources

sudo mv /etc/apt/sources.list.d/official-package-repositories.list{,.bak}
sudo apt update

We get a new section in synaptic "Installed (local or obsolete)". Some of them can be "Packages menu => Force Version (ctrl-E)" to switch from mint to debian. like:

  • base-files

Others need similar sounding replacements:like

  • iso-flag-png -> iso-flags-png-320x240 or iso-flags-svg (idk maybe remove that one? I'm not sure why it was marked as manual install)
  • linux-kernel-generic 5.0.0-32 -> linux-image-686 -- version 5.10.46-5 (thats a whole 0.10.45-27 better)

Some things will just get handled by:

sudo apt upgrade
1212 upgraded, 209 newly installed, 0 to remove and 289 not upgraded
Need to get 659 MB of archives.
After this operation, 784 MB of additional disk space will be used.
Do you want to continue[Y/n] ^C

or since "the following packages have been kept back" is large (https://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it):

sudo apt --with-new-pkgs upgrade
1212 upgraded, 209 newly installed, 0 to remove and 289 not upgraded
Need to get 659 MB of archives.
After this operation, 784 MB of additional disk space will be used.
Do you want to continue[Y/n] ^C

or since that didn't change anything:

sudo apt dist-upgrade
1499 upgraded, 457 newly installed, 55 to remove and 1 not upgraded
Need to get 1,027 MB of archives.
After this operation, 1,221 MB of additional disk space will be used.
Do you want to continue[Y/n] y

Watch a bunch of:
dpkg: ...: dependency problems, but removing anyways as you requested

perl-modules-5.26
libperl5.26 depends on perl-modules
perl depends on perl-modules5.26

libsensors4
libsnmp30 depends on libsensors4

aptitude depends on libapt-pkg5.0 (probably delete aptitude)
...
python-apt depends on ... (probably delete I'm not sure why it was top level?)
ubuntu-advantage-tools ... (probably should have deleted before starting)

unable to delete "/var/lib/initramfs-tools" not empty

python-samba depends on python-tdb
python-samba depends on libldb1
python-ldb depends on liblbd1

python depends on libpythonstdlib

python depends on python-minimal

xed-common depends on python
... million thing depend on python
python-xdg
python-psutils
python-gtk2
python-goobject-2
python-glade2
python-dbus
python-crypto
python-cairo
nslcd-utils
gir1.2-xapp-1.0
compizconfig-settings-manager

/etc/depmods.d not empty

/etc/polkit-1/nullbackend.conf.d not empty

/etc/calendar not empty

compiz-gnome depends on gnome-settings-daemon-schemas

/etc/resolveconf/update-libc.d not empty

/etc/resolveconf not empty

/etc/bash_completion.d not empty

considering deconfiguration of manpages-dev which would be broken by installation of manpages
...
de-configuration manpages-dev

/etc/apparmor.d.cache not empty

/etc/cryptsetup-initramfs not empty

/usr/share/fonts/truetype/openoffice not empty

/usr/lib/python2.7/dist-packages/gi not empty

trying to overwrite /usr/lib/i386-linux-gnu/libgstbasecamerabinsrc-1.0 which is also in package libgstreamer-plugins-good1.0.0:i386 1.14.5-0ubuntu!18.04.2

/etc/apt/event.d not empty

/var/log/lightdm not empty

/var/lib/lightdm-data not empty

/var/cache/lightdm not empty

/etc/neofetch not empty

Errors were encountered while processing
  /tmp/apt-dpkg-install-.../###-libgstreamer-plugins-bad1.0-0...

I think I don't need any of the things with the dependency issues, Autoremove removes most/all of them, I think, and also removes gstreamer1.0-plugins-bad(which threw the error), but also has more depends issues:
man-db depends on bsdextrautils | bsdmaiutils

I also ignored: error in firmware-linux-firemware-free tyring to overwrite /lib/firmware/av7110/bootcode.bin which is also in linux-firmware

Can always mark packages for re-install.

The rest of the leftovers in "Installed (Local or Obsolete)", IDK delete? Except for the ones that show "also marked for removal" of things that are actually useful (I think I want to keep apt, xfwm4, etc), switch those versions to debian sources. Maybe mark as "automatically installed" too.

Check "Installed (Manual)". there seem to be a lot of manually installed lib*. Compare against fresh debian install? Default install has about 200 manually installed packages. Upgraded has >550. apt-mark showmanual differs slightly from synaptic "Installed (manual)" (shows about 30 fewer in synaptic). or just mark as "automatically installed", and see what is actually a dependency. It seems weird that anything titled "lib*" would be manually installed anyway, but they exist in default install (about 100).

Re-add missing firmware-non-free realtek (for r8169).

Now running at about 90 "manually" installed packages. Works fine <fingers crossed>.

✔Success? Firefox seems faster in the Mint to Debian install, over the clean install? Either the pae kernel is slowing it down, or there is some extra/missing package. 🤷‍♂️