Commit Graph

210 Commits

Author SHA1 Message Date
maj00r
06513537f0 fix(tapes): a tape followed live reads only what was added, and a stall, a shared black box or a gap are told right
At a higher time speed the simulator's log grows many times faster, and the
live view read and split the whole file every two seconds. A followed tape now
keeps its reader and reads only the bytes added; one begun anew (shorter, its
end no longer what was read, or its time going back) is read whole.

From the review: a gap is over two seconds, above the frame the simulator
holds to a second, so a stall is driving or standing; a black box's time ends
by the start of the next one, as a downloaded one was last written later; the
summary shows what was recorded and what wasn't, and the trace breaks off at
a gap; the cab panel's wheels compare signed speeds and stay clear of the
gauges; each box's name is parsed once per listing.
2026-11-15 23:34:53 +01:00
maj00r
1398545ff2 feat(tapes): "live" follows the tapes of the black box, which it writes as the simulator runs
The simulator's black box writes the tapes of the player's vehicles every two seconds now, like the physics
logs, which no longer keep their files open.

- "Live" follows the player's tape with either one on; the tip that it waited for the closing is gone.
- The descriptions of the two settings say how they write now, in the five languages.
- A tape of a run the starter didn't launch goes with the black box recording when it was written: the
  tape of a vehicle the player left ends before the run does, and could be taken for a run of its own.
2026-11-14 00:50:03 +01:00
maj00r
45105e7b9c fix(tapes): a command is not taken for the header, and a gap in a tape is neither driving nor distance
- The header is the line that doesn't start with a figure. A line whose command, which is free text, says
  "Security" was taken for it, moving the alerter's column and dropping the line.
- A tape the black box writes goes on after a gap when the player comes back to its vehicle. A step of
  more than twenty usual steps between two lines (a second at least) is time not recorded: no distance
  over it, and neither running nor standing time; the average with the stops leaves it out too.
2026-11-14 00:50:02 +01:00
maj00r
4429eff4ef feat(tapes): tape recording turns the black box on, not the physics log of every vehicle
The simulator now records the black box on its own ("blackbox yes") and writes the .dat tapes of the
vehicles the player was in when it closes, so the tapes no longer need "physicslog yes", which keeps a
log of every vehicle of the scenery open and written twenty times a second (some 500 files on
Tomaszewo, past what the runtime allowed).

- The settings have a box of their own for the black box and its tapes, next to the physics log of
  every vehicle, which stays for diagnostics.
- "Turn on recording" of the tapes' window turns the black box on.
- The key is read as the simulator reads it: with no line of its own it goes with the physics log. It
  is written where it says more than the physics log or where the file has it already, so an ini
  without it stays so.
- A launch is noted for the tapes with either one on; "live" follows a tape only with the physics log,
  as the black box writes its tapes at the end, and its tip says so.
2026-11-14 00:05:06 +01:00
maj00r
1ef630b1b6 fix(tapes): the alerter of a physics log is read where its header puts it
The simulator's log has had a column of the vehicle's speed at its end since 2026-11 (master), and the
alerter, counted six columns from the end past the free-text command, was read from the wheel slip
instead. Its place from the end is taken from the "Security" heading of the file's header, and only a
log with no header falls back to the old 25 columns.
2026-11-14 00:05:05 +01:00
maj00r
744720d922 Merge pull request #44 from MaSzyna-EU07/fix/dotted-model-names
fix: a dot in a model name is part of the name, not an extension
2026-11-12 21:33:51 +01:00
maj00r
b5ba67430f fix: a dot in a model name is part of the name, not an extension
The 9-107 and 9-110 coal wagons (9-107.13.fiz and the like) found no physics, so no load could be set on them.
2026-11-12 20:57:36 +01:00
maj00r
3aa6a256a5 fix: the version is the number alone, with no public beta after it 2026-11-12 19:38:11 +01:00
maj00r
95c510b3ac Merge pull request #41 from MaSzyna-EU07/fix/version-in-title
The version in the window's title
2026-11-12 17:44:17 +01:00
maj00r
5af567be7f Merge pull request #40 from MaSzyna-EU07/feature/blackbox
Black box player: the simulator's recording of a run on a map, with the cab, the timetable and a summary
2026-11-12 17:44:02 +01:00
maj00r
36df14abee fix(scenarios): the vehicle started in is framed, and no line of the background shows between two vehicles at a scale such as 125 % 2026-11-11 19:01:57 +01:00
maj00r
59dbd9cc0d fix(tapes): a refresh of the list leaves the paper of an unreadable tape hidden 2026-11-11 18:51:47 +01:00
maj00r
3ef630459c fix(tapes): a session with no tape shows no blank paper beside the words 2026-11-11 18:51:04 +01:00
maj00r
b7eefcd0ed fix(tapes): a session picked with no tape stays picked when the list refreshes, and an empty one says it has no black box either 2026-11-11 18:25:54 +01:00
maj00r
9b5848042a fix(tapes): a tape written after another run began is not the launch's before it, and a session with only a black box shows no other session's tape 2026-11-11 18:21:27 +01:00
maj00r
ef551a4ee7 fix(tapes): a scenery named with letters outside ASCII matches its black box on Linux too, where each byte of them is a '_' 2026-11-11 18:14:44 +01:00
maj00r
cf5cea26ad fix(tapes): a black box goes with the launch it started after and of its own scenery, not every one written after the last launch 2026-11-11 18:12:11 +01:00
maj00r
91158ebf72 fix(tapes): the moment asked while a file is read goes to the window still open, not one closed meanwhile 2026-11-11 18:05:45 +01:00
maj00r
cdc35c44e5 fix(tapes): no mark from a closed black box, the mark kept right through a view changed or a stop, the moment asked while a file is read kept, no jump back on a live re-read, the hint where it fits 2026-11-11 18:04:43 +01:00
maj00r
fa36284de1 feat(tapes): a click on the tape takes the black box of its session to that moment, and where the black box plays is marked on the tape 2026-11-11 17:55:56 +01:00
maj00r
da5a1efea1 fix: the version in the window's title, where it has room at any width 2026-11-11 17:53:01 +01:00
maj00r
532875fc7b Black box: the queries of the user's train worked out once a read, lights as the driver checks them
- The stations, the signals passed, the horn points, the couplings, the
  consists and the timetable progress of the user's train are kept until
  a read adds something; the views asked for them every frame, which on
  a long session with many trains took the window down. A read that adds
  nothing no longer counts as a change.
- The lights are checked against the lamps the vehicles at the ends have
  (written by the simulator from now on), as its driver checks them: Pc 1
  without the upper headlight, with the auxiliary lamps, Pc 5 with the
  rear-end signals. Only while the user drives: the autopilot's lights
  are its own.
- A train off the platform counts at both ends: its head past the stop
  point as well as its tail before the platform's end.
- A recording without the couplings keeps the timetable for any vehicle
  of the user.
- A signal passed at danger is ringed on the map only once it was.
- In the tapes window a black box opens on a click or Enter, not when
  the arrow keys go over it.
- The viewer's screenshot of a window not laid out saves nothing and
  still closes.
2026-11-11 00:57:57 +01:00
maj00r
e530b95352 Play back the black box of the simulator: map, cab, timeline, timetable and a summary
The simulator writes a black box of each run to physicslog/*.blackbox
(blackbox_doc.md in the maszyna repository). Three new projects read and
show it:

- Eu07.BlackBox: the reader of the records, the recording as a whole
  (the user's vehicle and consist at a time, the timetable shown, the
  progress along it with arrival and departure delays, whether the
  train stood at the platform), the light patterns Pc 1, Pc 2, Pc 5 and
  Tb 1 with the ones the run asks for, and a summary of the driving.
- Eu07.BlackBox.Views: the player window, with the scenery map (tracks,
  signals, W4 stop points with their heading and W32, the train, the
  cameras), the cab, the timeline of speed against the AI's reference,
  the events, the timetable and the summary.
- Eu07.BlackBox.Viewer: the window on its own, with options for the
  time, following the train and screenshots.

The tapes window of the starter lists the black boxes of each session
beside the Hasler tapes and opens them in the player.
2026-11-11 00:39:35 +01:00
maj00r
cb092784ae Put the comment of FullPath back on it
It stayed above DlssLibraries, which then had two summaries, when that method
went in between.
2026-11-03 21:51:58 +01:00
maj00r
d68999dfb7 Look at each source file of a scenery once
The watch of scenery files asked three times per file, whether it is there,
its time and its size, every two seconds for every source of every scenery.
One look gives all three.
2026-11-03 21:51:56 +01:00
maj00r
9eb10fc9bd Let the signatures of saved trainsets go with their sceneries
They were kept by the trainset's text for the whole session, behind one lock,
and every reload added more. They are now kept as long as a trainset holds
that text.
2026-11-03 21:51:55 +01:00
maj00r
71c32c5b9a Read the old starter's key descriptions in code page 1250 too
Its language files are code page 1250 as often as UTF-8. Read as UTF-8 only,
Czech and Polish descriptions came out with replacement characters.
2026-11-03 21:51:55 +01:00
maj00r
cf1ba319c1 Leave the settings as they are when they are written
Writing the settings put them right for the simulator, DLSS to TAA on OpenGL
and the like, in the object given. A preview of the changes or a look at the
levels goes through the same write and changed the held settings. A copy is
put right now.
2026-11-03 21:51:54 +01:00
maj00r
02ea1277fc Read the last run's log before a start has to
A start notes down which vehicles the player drove in the run before, as the
log begins anew. With the tape window never opened nothing of a long run's log
had been read yet, and Start waited on the whole of it. It is now read off the
UI thread when the simulator exits and when the starter opens.
2026-11-03 21:51:54 +01:00
maj00r
306bdc44df Write the list of launches beside the tapes in one move
The tape window reads starter-launch.txt every two seconds. Written in place,
the file could be read half written, and a crash during the write lost the
launches noted before.
2026-11-03 21:51:54 +01:00
maj00r
d95182f17c List a key taken out of eu07.ini once
A uart or uarttune the settings no longer write was found missing twice, as a
key of set length and as one the file had, and showed twice among the changes.
2026-11-03 21:51:54 +01:00
maj00r
c10d771f00 Save a profile without taking it for a save of eu07.ini
A profile went through the save of eu07.ini with another path: what the store
holds of the file took the changes the file never got, and the list of changes
was empty after it. A profile is now written as an export, from a copy. Like a
save, an export is not written from defaults when the settings could not be
read.
2026-11-03 21:51:53 +01:00
maj00r
2cfb4e4fec Tell the tapes the simulator runs only while the starter watches it
The tapes looked for any process named as the chosen exe, every two seconds
off the UI thread. Under Wine the process is eu07.exe and never matched, so a
run never showed as running and the tape window did not follow the driven
vehicle, while a simulator started some other way was taken for the last
launch. The starter's own watch of the process it started now says it.
2026-11-03 21:51:53 +01:00
maj00r
a8f8cb0b74 Keep each file's encoding in the copy written for a start
The copy carries the scenario includes put in place of their include lines,
read as UTF-8 where they are, and it was written all in code page 1250. A name
with a Polish letter in a UTF-8 include then no longer matched the same name in
the files the simulator reads apart, and what 1250 lacks became '?'. Each part
now goes out in the encoding of the file it came from, the scenery's own file
too, as a save of a trainset already did.
2026-11-03 21:51:52 +01:00
maj00r
32d7417c22 Read the processor once and take FMA into the AVX2 check
/arch:AVX2 lets the compiler use FMA as well, so a processor that reports AVX2
without it would still stop the simulator. The comment on OSXSAVE no longer
says more than the bit does.
2026-11-03 20:42:28 +01:00
maj00r
39d4ef0bc4 Read AVX2 from the processor
Avx2.IsSupported says whether the starter's own code may use AVX2, and the AOT
compiler fixes that at build time to its baseline, which has none. A published
starter told every player that their processor lacked AVX2. The check now reads
CPUID: AVX2 in leaf 7, AVX and OSXSAVE in leaf 1.
2026-11-03 20:29:18 +01:00
maj00r
6d8a6c36e7 Put what only the new simulator reads in one panel
The rows of keys the public simulator does not read sat among the others in
Graphics and Effects, where a player with that exe could not tell them apart. They
are now one section at the end of Advanced, with a note that an older exe skips
them. Graphics and Effects hold what that exe reads.

Buffer scale and anti-aliasing stay in Graphics, as an older exe reads them through
other keys. The level list of the atmosphere rows goes with them; the whole levels
still set that group. With its rows gone, the nature section is called Smoke.
2026-11-01 22:32:11 +01:00
maj00r
96cfe2503e Shorten the experimental renderer's warning
It says what can go wrong and what to do then. That the renderer is still being
developed helps nobody choosing it.
2026-11-01 22:32:11 +01:00
maj00r
b12189b2d5 Center the text of buttons
Buttons have a minimum height but kept their text at the top of it.
2026-11-01 22:32:09 +01:00
maj00r
42b2259b7c Show the graphics card beside the levels
Its name and memory, with the other cards in the tooltip. Windows has them in the
registry. On Linux the name comes from the driver or pci.ids and the memory from
amdgpu or nvidia-smi; without either there is only the name. A card in a processor
says shared memory, as what it reports is a share set in the firmware.

No rating of the card against the settings: what a ride takes depends on the
textures of its scenery and vehicles, which are not known before it starts.
2026-11-01 20:54:01 +01:00
maj00r
a7c9cdb97f Take the rest of feat/opengl-vulkan's settings
What the merge left out, now on this branch's own six levels:
- GraphicsRules, which say what a renderer or an anti-aliasing mode rules out,
  and the notes that show it
- the settings split into Graphics and Effects tabs
- the DLSS library check beside the exe
- eu07.ini import and export
- one list of renderers: the backend follows from the renderer chosen

The post-processing part of the levels is gone, as three switches cannot tell six
levels apart. Bloom goes with the whole level.

Still a transitional variant. The old renderers, their keys and their rows stay
on the page, as the exe a player runs may be an old one or may have no Vulkan.
That branch's five-level list and its removal of the old renderers stay out.
2026-11-01 20:54:01 +01:00
maj00r
0d2e5de110 Keep the gaps of the bottom bar equal
The editor button had a margin of its own on top of the grid's spacing.
2026-11-01 20:54:00 +01:00
maj00r
1f231423f3 Ask once when the settings file changes
The window is activated again as the question closes, before the answer is in,
so a changed eu07.ini was asked about three times in a row.
2026-11-01 20:53:59 +01:00
maj00r
b60c176533 Merge feat/opengl-vulkan: settings for the OpenGL 4.6 and Vulkan 1.4 simulator
A transitional variant, since the exe a player runs may not have the new
renderers. The old renderers stay in the list and the old keys are still written
next to the new ones. A new exe without Vulkan starts OpenGL by itself, an old one
reads the word as its legacy renderer, and both pass over the keys they do not know.

Taken from Hirek193's branch:
- the new keys as rows of a section of their own, with their texts
- their values on the graphics levels, in steps over the six levels here, with
  High as what the simulator does with nothing set
- Vulkan 1.4 in the list of renderers, and its own keys marked as idle without it
- gfx.buffer.percent next to the old buffer keys, read before them
- gfx.antialiasing saved below multisampling, for the later line to count

Keys checked against feat/gl46-migration of the simulator.

Left out, as this branch has its own or does not need them: the rewritten settings
page and its five levels, GraphicsRules, the DLSS library check, eu07.ini import and
export, and the removal of the old renderers.
2026-11-01 19:43:46 +01:00
maj00r
212e11278f Move to Avalonia 12.1.4
12.1.3 stops drawing a stretched PathGeometry, which took the Discord icon, so
this goes one patch past the version Dependabot offered.

Three things follow from the new version. A combo box placeholder keeps its full
opacity. The consist strip's padding, ignored until now, is gone, as it would
take 4 px from the panels above. A scenery picked from code is brought into view.
2026-11-01 18:59:57 +01:00
maj00r
81c7e8ba95 Find an old starter's language file on Linux too
The list of languages holds codes in lower case, so lang-ZH.txt was not found
on a case-sensitive file system and its key descriptions stayed empty.
2026-11-01 16:16:39 +01:00
maj00r
b56a2a0ae6 Raise the version to 1.5 2026-11-01 16:12:02 +01:00
maj00r
80115b7a7e Set the start and editor button pairs apart
Each button stays close to its arrow, with a clear gap between the two pairs.
Both arrows are the same size.
2026-11-01 16:12:02 +01:00
maj00r
ceab05462a Fit the main window to small screens and wire up the new services
Pages scroll below the size they are laid out for and Start stays in view. The
crash window shows this session's log only.
2026-11-01 16:06:16 +01:00
maj00r
2ebff91316 Start the scenery editor from its own button and note launches
With no scenery selected the button starts a new one in the editor. Each launch
notes the scenery, the timetable number and the vehicles for the tapes. Tools
work on the selected scenery, and an emptied consist stays listed.
2026-11-01 16:06:16 +01:00