File tree Expand file tree Collapse file tree 7 files changed +28
-4
lines changed
Expand file tree Collapse file tree 7 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
77
8+ ## v0.3.2
9+
10+ ### Added
11+
12+ - ` pso.set_sleep_hack_enabled(enabled) ` : ` true ` to patch the frame
13+ limiter to use ` Sleep(1) ` and reduce CPU usage dramatically. _ This
14+ tweak will cause Ephinea to instantly close the game. Sorry! It's
15+ out of our control._ The game normally calls ` Sleep(0) ` to yield to
16+ other threads, but Windows does not guarantee that the process
17+ gives up its timeslice. Using 1 millisecond is enough to get the
18+ desired effect without skewing timing. Since this doesn't work on
19+ Ephinea, there is no built-in UI to enable it.
20+
821## v0.3.1
922
1023A minor release to clean up clutter in PSOBB installations.
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ init = function()
1818 return {
1919 name = " Core - Addon List" ,
2020 author = " Eidolon" ,
21- version = " 0.3.1 " ,
21+ version = " 0.3.2 " ,
2222 description = " Shows a list of detected addons to the user." ,
2323 present = present ,
2424 toggleable = false ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ init = function()
1919 return {
2020 name = " Core - Log" ,
2121 author = " Eidolon" ,
22- version = " 0.3.1 " ,
22+ version = " 0.3.2 " ,
2323 description = " Provides a log window for all log items to the pso_on_log callback." ,
2424 present = present ,
2525 toggleable = false ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ init = function()
1616 return {
1717 name = " Core - Main Menu" ,
1818 author = " Eidolon" ,
19- version = " 0.3.1 " ,
19+ version = " 0.3.2 " ,
2020 description = " An addon main menu with hooks for adding buttons." ,
2121 present = present ,
2222 key_pressed = key_pressed ,
Original file line number Diff line number Diff line change 33 init = function ()
44 return {
55 name = " Util" ,
6- version = " 0.3.1 " ,
6+ version = " 0.3.2 " ,
77 author = " Eidolon" ,
88 description = " Core utilities" ,
99 toggleable = false
Original file line number Diff line number Diff line change @@ -70,6 +70,16 @@ static int psolua_print(lua_State *L) {
7070 return 0 ;
7171}
7272
73+ static void psolualib_set_sleep_hack_enabled (bool enabled) {
74+ uint8_t * location = (uint8_t *)(0x0042C47E + g_PSOBaseAddress);
75+ if (enabled) {
76+ location[1 ] = 0x01 ;
77+ }
78+ else {
79+ location[1 ] = 0x00 ;
80+ }
81+ }
82+
7383template <typename T> std::function<T(int )> read_t (void ) {
7484 auto pid = GetCurrentProcess ();
7585 return [=](int addr) {
@@ -104,6 +114,7 @@ void psolua_load_library(lua_State * L) {
104114 psoTable[" read_cstr" ] = psolualib_read_cstr;
105115 psoTable[" read_wstr" ] = psolualib_read_wstr;
106116 psoTable[" read_mem" ] = psolualib_read_mem;
117+ psoTable[" set_sleep_hack_enabled" ] = psolualib_set_sleep_hack_enabled;
107118 psoTable[" base_address" ] = g_PSOBaseAddress;
108119 psoTable[" list_addon_directories" ] = psolualib_list_addons;
109120 psoTable[" log_items" ] = lua.create_table ();
You can’t perform that action at this time.
0 commit comments