Repository navigation
v0.0.26
repsp v0.0.26
sceKernelDelayThread의 최소 대기 시간.
| issue | 내용 | 커밋 |
|---|---|---|
| #57 | 실기에서는 아주 짧은 대기도 스레드 전환과 커널 타이머 때문에 요청보다 훨씬 오래 걸린다. 게스트의 폴링 루프는 이를 전제로 짜여 있다. 예를 들어 DelayThread(10 µs)를 1000번 부르며 다른 스레드를 기다리는 루프가 repsp에서는 29 ms만에 끝나 일찍 포기했다. 한 게임에서는 100 ms마다 확인하는 음악 스레드를 기다리는 루프라서, 채보가 음악보다 60~70 ms 먼저 시작했다. 이제 sceKernelDelayThread와 sceKernelDelayThreadCB는 적어도 200 µs를 기다린다. kernel_sched_probe가 등록된 대기 시간을 마감 시각으로 검사한다. 실기의 정확한 최소값은 미확인이며, 200 µs는 사용자 청취로 정했다. |
이 릴리스의 squash merge 커밋 |
측정(한 게임, 같은 입력 스크립트): 채보 시작과 음악 첫 블록이 0.3 ms 안에 맞았다(이전 59 ms 차이). 표시 간격과 음악 끊김은 그대로다. 사용자가 확인했다.
검증: Win64(Visual Studio·Ninja) Debug/Release, Linux x64 Debug/Release 빌드와 CTest.
repsp v0.0.26
A minimum duration for sceKernelDelayThread.
Issue #57:
- Why: on the PSP even a very short delay takes far longer than it asks for (thread switch and kernel timer), and guest polling loops rely on that.
- Example: a loop of 1000 ×
DelayThread(10 µs)waiting for another thread lasted 29 ms here and gave up early. In one title it waits for a music thread that checks every 100 ms, so the chart started 60-70 ms before the music. - Change:
sceKernelDelayThreadandsceKernelDelayThreadCBnow wait at least 200 µs. kernel_sched_probechecks the registered wait by its deadline.- The hardware's exact minimum is unconfirmed; 200 µs was chosen by the user's listening.
Measured (one title, same input script):
- Chart start and the first music block are within 0.3 ms of each other (59 ms before).
- Present interval and music underruns are unchanged.
Confirmed by the user.
Verified: build and CTest pass on Win64 (Visual Studio and Ninja) Debug/Release and Linux x64 Debug/Release.