grumpycoders / grumpycoders/pcsx-redux
Difference between RCOS output on Nugget vs original PsyQ
- Dominant language
- C++
- Stars
- 994
- Forks
- 151
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 18
Description
### Describe the bug
The **rcos** in the Nugget implementation outputs different values than the _rcos_ function in the original PsyQ 32-bit. I am including in this submission:
- A CSV file with the values of angles comparing the different output of RCOS from Nugget and PsyQ [rcos.csv](https://github.com/grumpycoders/pcsx-redux/files/14317931/rcos.csv)
- A .zip file with the binaries generated by both the Nugget build and the binary generated with the 32-bit PsyQ [binaries.zip](https://github.com/grumpycoders/pcsx-redux/files/14317934/binaries.zip)
Both binaries were generated using the same code. They contain a simple for-loop iterating angles from -8192 to 8192 outputting their **rcos**.
```
for (a = -8192; a <= 8192; a++) {
printf("rcos(%d) = %d", a, rcos(a));
}
```
### Expected behavior
I would expect the output of both functions to output be the same values given the same input.
### Steps to reproduce the bug
Compile and build two projects. One using Nugget with a modern toolchain and one using Windows XP 32-bit original PsyQ.
They run the same code:
```
for (a = -8192; a <= 8192; a++) {
printf("rcos(%d) = %d", a, rcos(a));
}
```
### Operating System
Windows 11
### PCSX-Redux version
This is not emulator-specific.
### CPU model
Intel Core i5 8th Gen
### GPU model & Drivers
Integrated/On-Board Graphics
### BIOS version
OpenBIOS
### Options
- [ ] Dynarec CPU
- [ ] 8MB
- [ ] OpenGL GPU
- [ ] Fastboot
- [ ] Debugger
### Iso checks
_No response_
### Logs
_No response_
### Additional information
Hopefully, with both binaries provided, it will be possible to disassemble and see the cosine table offsets and check what is going on.
Contributor guide
Assessment
This issue has not been assessed yet.