Commit graph

12 commits

Author SHA1 Message Date
Pedro Montes Alcalde
a29f3ba34c
timer: Overhaul the logic and callings (#290)
* meow

* miao

* :3

* aaaaaaa

* cheese

* bbbbbbbbb

* blehhhhhh

* miao

* :D

* nyan

* small

* splits

* last tick fix

* maybe

* hehe

* docstrings

* docs change

* Fix segfault on no splits

* remove asserts

* Dont run reset when not running

* actually reset this time i swear

* avoid reset desync

* suggestions

* meow

* miao

* format nyaaaa
2026-03-02 14:58:45 -03:00
Daniele Penazzo
17f8a208c6
Add getMaps function (#201)
* feat(auto-splitter): getMaps function

* docs(auto-splitter): Documented new getMaps function

* chore(style): Style fixes

* chore(style): Other style fixes
2026-01-16 17:48:40 -03:00
Daniele Penazzo
10cfa38fb1
Signature Scanning (#149)
* add signature scanning

* bug fixes

* offset handling

* Update signature.c

* convert sig scan result to hex before returning

* add sig_scan to docs

* add note about sig scan performance to docs

* fix docs formatting

* remove unused include

* properly handle FF bytes/integer underflow

* fix formatting

* update docs with sig_scan example

* Add info regarding Lua's string to number conversions.

* fix formatting (again)

* prefix return string with "0x" and improve error handling

* Update build.yml

* Revert build.yml

* Update docs

* docs(themes): Added how to hide sections

Created an FAQ section in the hopes of facilitating theme development

* docs(themes): Added how to use the GTK Debugger for theme development

It's mostly a stub, but we can easily make an animation for it, if
necessary

* fix(main): Load the theme variant from the right JSON setting

* chore(build): Update meson.build to include signature.c

* fix(signature.c): Offset the result by the process base_address

Or due to commit 2b4417f subsequent memory reads from the Lua Auto
Splitter will result in wrong reads (due to the auto-offsetting done by
readAddress) or even out-of-process reads

* docs(signature): Added some devdocs to the signature source files

* docs(signature): Update sig_scan documentation

* Allow for sig_scan to return negative values.

This is to allow readAddress to work when the main module (containing
the process name) happens to be "after" the address found by the
sig_scan. The memory is still held by the same PID but needs a negative
offset to be reachable by readAddress.

* Restored int type on offset

* Use intptr_t for offset

So we won't have to worry about big values.

* Make sig_scan return an integer to the Lua stack.

In Lua hex numbers are just integers, so returning an integer number
should work without the issues given by snprintf not supporting negative
numbers.

This also assumes that LuaJIT is able to contain the entirety of the
value inside of a C intptr_t without over/underflowing.

* docs(sig_scan): Fixes and improvements

* feat(auto-splitter): Add getBaseAddress function

Needs documentation and testing

* feat(auto-splitter): Added convenience function "sizeOf"

* fix(auto-splitter): Fix wrong ordering of pushing functions to Lua

* feat(auto-splitter): Allow getBaseAddress to be called without arguments

* docs(auto-splitter): Added documentation for new auto-splitter functions

Under the "experimental stuff" section, since they're untested.

* fix(memory): Better handling of Lua Stack

* docs(memory): Added docstrings to get_base_address and size_of

* fix(memory): Reduce downcasting where possible

This won't fix downcasting issues when we work with unsigned 64-bit
integers, but it shouldn't break stuff with uint32 as downcasting to int
may do.

See #158 for the full context

* docs(README): Remove leftover gsettings references

And redirect Wayland users to the settings_keybinds file for workarounds
for global keys.

* docs(themes): Remove leftover reference to gsettings

* Collapse gettop and isnil conditions for get_base_address

* Treat half-byte masks as full-byte masks

This allows to support stuff like in the VVVVVV auto splitter, where "0?" is used and treated as "??"

* Replace MemoryRegion with the more generic ProcessMap

* Update documentation to make it (hopefully) more readable

* The offset in sig_scan is actually not optional

It would be better if it were zero by default, but for now let's shape
the documentation to fit what the actual code is.

* Revert "fix(memory): Reduce downcasting where possible"

This reverts commit dc285cf0da.

---------

Co-authored-by: Loomeh <loombadoop@gmail.com>
Co-authored-by: Zane Holbrooke-Jones <67561520+Loomeh@users.noreply.github.com>
2025-12-16 22:57:16 -03:00
Daniele Penazzo
e791573822
Module size (at least for the first module) (#161)
* Prepare the ProcessMap struct to save the map size

* Define the getModuleSize function

Might need to think about getting all the module sizes for certain more
complicated auto splitters.

* Added some docs for getModuleSize

* Fixing getModuleSize behaviour to make it adherent to docs

* Added a small tag for the error when a module name is not found
2025-12-11 16:37:21 -03:00
Pedro Montes Alcalde
d1578bd231
lasr: Implement reading byte arrays from memory (#120) 2025-11-02 16:17:04 -03:00
Pedro Montes Alcalde
f2248ad1a6
docs: Add notice about isLoading when using GameTime (#92) 2025-10-15 10:25:41 -03:00
EXtremeExploit
3b9f9dabb1 docs: Add gameTime documentation 2025-10-12 11:32:15 -03:00
EXtremeExploit
bdd2c1cebe asl: Change maps cache cycles default to 1 2025-10-11 11:11:45 -03:00
wins1ey
60fbc7ad44
Merge branch 'main' into libresplit 2024-06-02 20:26:22 +01:00
EXtremeExploit
8d88cd17d6
Auto Splitters: Add optional cache for memory mappings 2024-05-13 15:14:09 -03:00
wins1ey
6c3779f89d Rename LAST to LibreSplit 2024-04-11 14:34:33 +01:00
wins1ey
815a127d47 Rename Auto-Splitters.md to auto-splitters.md 2024-04-08 14:10:12 +01:00
Renamed from docs/Auto-Splitters.md (Browse further)