Page 2 of 3
#16 RE: What exactly is the hal timer problem? by infuscomus 18.04.2020 12:32

@YuriyCN

post #14 was a daniel_k modded hal that i still have

this one attached I just modded myself from the hal you uploaded

#17 RE: What exactly is the hal timer problem? by YuriyCN 18.04.2020 16:01

Zitat von infuscomus im Beitrag #16
@YuriyCN

post #14 was a daniel_k modded hal that i still have

this one attached I just modded myself from the hal you uploaded


Thanks! It is perfectly!
Windows starting stably with your file.

I compared the files, but why are there so many differences.
Earlier in the topic they wrote that it is enough to fix 2 bytes.



There is one problem.
GS_Caber stopped running with the patched file.
Although all other programs work fine.
Probably GS_Caber uses a timer non-standard?

With original hal.dll:



With patched hal.dll:



All files in the Files.zip - 500 KB, includes:
GS_Сaber_1.1.5.7
hal_orig.dll - original file
hal_mod.dll - your modification
https://www.upload.ee/files/11508670/Files.zip.html

#18 RE: What exactly is the hal timer problem? by infuscomus 18.04.2020 18:41

maybe it needs diderius6's patched intelppm.sys too?

attached

#19 RE: What exactly is the hal timer problem? by YuriyCN 18.04.2020 20:37

Zitat von infuscomus im Beitrag #18
maybe it needs diderius6's patched intelppm.sys too?

attached


It does not depend on the intelppm.sys.
The problem appears when replacing the hal.dll only.

Why are there so many patched bytes, maybe you will make a patch hal.dll
to a minimum (with a correction of 2 bytes only)?

#20 RE: What exactly is the hal timer problem? by infuscomus 18.04.2020 22:45

@YuriyCN

OK, I think I got it right this time

#21 RE: What exactly is the hal timer problem? by Andalu 18.04.2020 23:14

Are you sure that the failure of GS CAB'er can only be caused by the version of the hal.dll file in system32 folder? If so, the program that does not work with the patched hal.dll (SHA-1: 98026788984C5BA10644C0E451DD0D69A5F67A90) from the halplusintelppmXPSP3.rar package should not work even under sandboxie and instead it works:
https://ibb.co/DbY4vj8

#22 RE: What exactly is the hal timer problem? by YuriyCN 18.04.2020 23:53

Zitat von infuscomus im Beitrag #20
@YuriyCN

OK, I think I got it right this time


Now are really patched 2 bytes only, but this is enough for GS_CABer to stop starting. However, many other programs work fine. GS_CABer probably uses the timer in a non-standard way. This causes GS_CABer to fail with any patched hal.dll.

Zitat
Are you sure that the failure of GS CAB'er can only be caused by the version of the hal.dll file in system32 folder?



Yes! I change hal.dll only.

#23 RE: What exactly is the hal timer problem? by YuriyCN 19.04.2020 14:59

Zitat von infuscomus im Beitrag #20
@YuriyCN

OK, I think I got it right this time


Examination of this problem showed that GS_CABer stops starting when only 1 byte changes:
07B3C: 0xC3 - GS_CABer error on starting
07B3C: 0xC7 - GS_CABer is working fine



Pak_1.zip - https://www.upload.ee/files/11515068/Pak_1.zip.html
hal.dll and hal__Original.dll

How to solve this problem?
Are there any other values for cell "07B3C" where there will be no problem?

#24 RE: What exactly is the hal timer problem? by Andalu 19.04.2020 15:05

Zitat von YuriyCN im Beitrag #22
Yes! I change hal.dll only.

Have you seen the screenshot? GS_CABer also works with patched hal.dll but you need to start it under Sandboxie (do you know this software?).
So, I wonder if it is just a matter related to the patched hal.dll.

#25 RE: What exactly is the hal timer problem? by YuriyCN 19.04.2020 15:29

Zitat von Andalu im Beitrag #24
Zitat von YuriyCN im Beitrag #22
Yes! I change hal.dll only.

Have you seen the screenshot? GS_CABer also works with patched hal.dll but you need to start it under Sandboxie (do you know this software?).
So, I wonder if it is just a matter related to the patched hal.dll.


I know.
GS_CABer will start with patched hal.dll if you enable launch in "Windows 98" compatibility mode:



Probably, in this mode, the timer is "programmatically" emulated.
I want to deal with this problem and solve it, and not look for crutches.
Moreover, it can occur in other applications that also use this timer.

#26 RE: What exactly is the hal timer problem? by Robert 20.04.2020 00:27

This is very easy solution to fix this error clock watchdog timout in blue screen you can read article about it this website blog WindowsStation.com

#27 RE: What exactly is the hal timer problem? by Mov AX, 0xDEAD 20.04.2020 07:58

avatar

@YuriyCN,

Problem is bad written gs_caber, it have not tolerance with high values of PerformanceCounter/PerformanceFrequency(hal timer patch set it to cpu freq, so values > 2500 ). If we divide it to 1024 like win7 did, gs_caber start work, it show main window, but all text is "??????", i think this crap dont set right locale on non-russian windows, homework software :)
patch for hal is simple, need add two commands in two places in _HalpAcpiTimerQueryPerfCount@4 function:

1
2
3
4
5
6
7
8
 
shrd    eax, edx, 0Ah             ; dword shift to 10 bit = /1024
shr edx, 0Ah ; edx too
mov [ecx], eax
mov [ecx+4], edx
....
shrd eax, edx, 0Ah
shr edx, 0Ah
retn 4
 

#28 RE: What exactly is the hal timer problem? by YuriyCN 20.04.2020 10:44

Zitat von Mov AX, 0xDEAD im Beitrag #27
@YuriyCN,

Problem is bad written gs_caber, it have not tolerance with high values of PerformanceCounter/PerformanceFrequency(hal timer patch set it to cpu freq, so values > 2500 ). If we divide it to 1024 like win7 did, gs_caber start work, it show main window, but all text is "??????", i think this crap dont set right locale on non-russian windows, homework software :)
patch for hal is simple, need add two commands in two places in _HalpAcpiTimerQueryPerfCount@4 function



Спасибо за изучение проблемы. Я отвечу по русски, чтобы полностью передать суть. Я хочу использовать патченый hal.dll - поскольку с ним заметил +30% прирост скорости работы SSD диска при использовании драйвера "Intel RSTe AHCI/RAID driver v4.7.0.1117". С оригинальным файлом hal.dll скорость чтения 180 МБ/с, с патченым скорость чтения возрастает до 265 МБ/с. Также наблюдаю прирост до 1-2% для CPU - но это мизер на уровне погрешности. При этом другие файлы и настройки не изменяются.

После нескольких проверок установил, что достаточно исправить всего-лишь 1 байт по смещению 07B3C. Зачем патчатся другие байты я не понимаю, от них ничего не меняется.

В итоге:
С оригинальном hal.dll (07B3C: 0xC7) - GS_CABer работает отлично, но скорость чтения SSD = 180 МБ/с. С патченым (07B3C: 0xC3) - GS_CABer выдает ошибку при запуске, но скорость SSD = 265 МБ/с. При этом другие программы работают стабильно.

Возможно, проблема в криво написанном GS_CABer, но не факт что найдутся и другие подобные "кривые" программы. Здесь выкладывалось несколько вариантов патченого файла, но красиво работающего решения нет. Пожалуйста, сделайте корректный патч для hal.dll последней версии 5.1.2600.5687 - https://www.upload.ee/files/11521284/hal.zip.html

Очень хочется иметь красивое решение, чтобы и скорость SSD была высокой и GS_CABer запускался.

#29 RE: What exactly is the hal timer problem? by IntiMD 20.04.2020 14:33

avatar

English translation (via DeepL; fairly accurate IMO):

Zitat von YuriyCN im Beitrag #28
Thank you for studying the problem. I'll answer in Russian to give you a full description. I want to use the patched hal.dll - as I noticed +30% increase of the SSD disk speed with it when using the "Intel RSTe AHCI/RAID driver v4.7.0.1117". With the original hal.dll file the reading speed is 180 MB/s, with the patched file the reading speed increases to 265 MB/s. I also see an increase up to 1-2% for CPU - but this is a minuscule error level. At the same time, other files and settings do not change.

After several checks, I found that it is enough to fix only 1 byte at 07B3C offset. I do not understand why other bytes need to be patched, nothing changes with them.

In the end:
With the original hal.dll (07B3C: 0xC7) - GS_CABer works fine, but SSD read speed is 180 MB/s. With patched (07B3C: 0xC3) - GS_CABer gives an error at startup, but SSD read speed = 265 MB/s. At the same time, other programs are stable.

It is possible that the problem is in the crooked code of GS_CABer, but not the fact that there are other similar "crooked" programs. There were several variants of the patched file laid out here, but there is no beautifully working solution. Please make a correct patch for hal.dll of last version 5.1.2600.5687 - https://www.upload.ee/files/11521284/hal.zip.html.

I would like to have a beautiful solution, so that the SSD speed is also high and GS_CABer starts up.

#30 RE: What exactly is the hal timer problem? by Mov AX, 0xDEAD 20.04.2020 15:54

avatar

Zitat von YuriyCN im Beitrag #28

Возможно, проблема в криво написанном GS_CABer, но не факт что найдутся и другие подобные "кривые" программы


подробнее про эту проблему, но на инглише чтобы все могли прочитать:

- WinXP SP2+ uses acpi timer for getting incremental counter (acpi spec declare this counter as part of specification)
- WinXP detect existing this timer by checking special bit USE_PLATFORM_CLOCK in FACP ACPI table, this bit controlled by BIOS
- Skylake+ bioses by default disable this timer at hardware level (register "ACPI Timer Control (ACPI_TMR_CTL)" in southbridge, see PDF)
- Skylake+ bioses stiil set USE_PLATFORM_CLOCK=1 in acpi, i think purspose is to inform Win7+ about existing HPET timer (not acpi timer!)
- If WinXP uses broken acpi timer, counter value is negative, so many progs become "crazy"
- HAL_timer_fix cheat WinXP to read USE_PLATFORM_CLOCK always =0, so this onebyte patch force to not use disabled acpi timer (exactly it avoid overwrite offsets to 3 functions)
- 74/75->eb and mov xxx,yyyy->ret are equalent patches, first is preffered, don't need both
- WinAPI declare 8 bytes to store value of counter, so values 2500+MHZ is not problem for properly maked programs (my cpu 3600Mhz fit in 6 bytes i think)
- To solve issue with bad progs like gs_caber, counter need to devide to much lesser value, win7 just divide it to 1024, so timer frequency on 3600Ghz cpu is only 3.5xx Mhz, this is what "hal tsc timer frequency divider" do in my early post on this page

p.s. Hal version can also include DMA32 PAE fix, so theres can be many diff bytes. I do not share files on public, please do not ask, make patches yourself if it possible

Xobor Forum Software von Xobor
Datenschutz