pcsx-redux
                                
                                 pcsx-redux copied to clipboard
                                
                                    pcsx-redux copied to clipboard
                            
                            
                            
                        New CD-Rom code.
Codecov Report
Attention: Patch coverage is 55.26316% with 136 lines in your changes missing coverage. Please review.
Project coverage is 20.46%. Comparing base (
1e635d0) to head (32e74e5). Report is 4 commits behind head on main.
:exclamation: Current head 32e74e5 differs from pull request most recent head c25e5c3
Please upload reports for the commit c25e5c3 to get more accurate results.
| Files | Patch % | Lines | 
|---|---|---|
| src/core/sstate.cc | 0.00% | 65 Missing :warning: | 
| src/core/cdrom.h | 68.75% | 15 Missing :warning: | 
| src/gui/gui.cc | 0.00% | 9 Missing :warning: | 
| src/supportpsx/iec-60908b.h | 64.00% | 9 Missing :warning: | 
| src/core/psxinterpreter.cc | 81.81% | 6 Missing :warning: | 
| src/core/mdec.cc | 0.00% | 5 Missing :warning: | 
| src/core/luaiso.cc | 33.33% | 4 Missing :warning: | 
| src/core/psxdma.h | 20.00% | 4 Missing :warning: | 
| src/core/gte.cc | 0.00% | 2 Missing :warning: | 
| src/core/isoffi.lua | 0.00% | 2 Missing :warning: | 
| ... and 10 more | 
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1129       +/-   ##
===========================================
+ Coverage    9.94%   20.46%   +10.52%     
===========================================
  Files         448      449        +1     
  Lines      132699   132249      -450     
===========================================
+ Hits        13200    27069    +13869     
+ Misses     119499   105180    -14319     
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Walkthrough
This pull request makes extensive changes across build workflows, core modules, GUI components, and test suites. New steps in GitHub Actions now download and extract a UNIROM boot disc for building and testing. The CD-ROM handling has been enhanced with new methods, scheduling callbacks, and operator overloads for time (MSF) operations. Several interrupt and scheduling routines have been refactored to use a unified Schedule enum. The GUI now calls the updated parseIso() for ISO processing, and numerous new tests and Makefile simplifications for MIPS targets have been added.
Changes
| Files | Change Summary | 
|---|---|
| .github/workflows/linux-build.yml,.github/workflows/linux-coverage.yml | Added steps to download/unzip the UNIROM boot disc, build OpenBIOS, copy openbios.bin, and run pcsx-redux in test mode using Lua scripts. | 
| .gitignore,.vscode/c_cpp_properties.json | Updated ignore patterns (added *.cue,*.bak) and a new VS Code configuration property (configurationProvider). | 
| src/cdrom/cdriso.cc,src/cdrom/cdriso.h | Added methods getLocPandgetTrack; reintroducedfailed(); changedm_numtracksto unsigned; updatedgetTN()signature. | 
| src/core/DynaRec_aa64/recompiler.cc,src/core/DynaRec_x64/recompiler.cc | Introduced new variable extrafor tracking ROM instructions and updated cycle accounting logic accordingly. | 
| src/core/cdrom.h,src/core/gdb-server.cc,src/main/main.cc,src/gui/widgets/isobrowser.cc,src/gui/gui.cc | Replaced calls to check()withparseIso(); added lid control methods (openLid(),closeLid(),scheduleCloseLid()); restructured interrupt handling to use scheduling callbacks. | 
| src/core/psxemulator.h,src/core/r3000a.h,src/core/psxdma.h,src/core/psxinterpreter.cc | Refactored interrupt scheduling using a new Scheduleenum and scheduling/unscheduling methods; removed redundant type conversions in interpreter. | 
| src/core/sstate.cc,src/core/sstate.h | Updated save state fields from interrupt-based to schedule-based ( ScheduleMask,ScheduleTargetsField); simplified CD-ROM save state data. | 
| src/core/mdec.cc,src/core/mdec.h | Renamed interrupt methods to scheduled callbacks ( mdec0Interrupt→scheduledCallback0,mdec1Interrupt→scheduledCallback1). | 
| src/core/sio.cc,src/core/sio.h,src/core/sio1.cc,src/core/sio1.h | Renamed interrupt methods to scheduled callbacks; replaced direct interrupt register manipulation with scheduling/unscheduling calls. | 
| src/gui/widgets/log.cc,src/gui/widgets/registers.cc,src/lua/fileffimeta.lua | Added menu item for logging CD-ROM hardware access; updated GUI to display schedule mask instead of interrupt; added Lua FFI casting function. | 
| src/mips/tests/* | Added numerous new CD-ROM test files with Cester framework; created new Makefiles for CD-ROM tests; simplified existing Makefiles by removing redundant sources and flags. | 
| src/supportpsx/iec-60908b.h | Added operator overloads ( --,+,-,+=,-=) toMSFstruct; introduced newSubHeadersstruct with flag methods. | 
| src/supportpsx/iso9660-builder.cc | Added calls to compute_edcecc()inwriteSectorAtto compute error detection/correction codes. | 
| third_party/cueparser/cueparser.c,third_party/cueparser/cueparser.h | Added new cuttingvariable to adjust sector number calculations during cue parsing. | 
| tests/pcsxrunner/cdrom.cc,vsprojects/tests/pcsxrunner/pcsxrunner.vcxproj* | Added new test source file cdrom.ccwith tests for interpreter and dynarec modes; included it in project files. | 
Sequence Diagram(s)
sequenceDiagram
    participant Main
    participant CDROM
    participant GUI
    Main->>CDROM: setIso(file)
    CDROM-->>Main: parseIso()
    Main->>GUI: Update display (show scheduleMask)
sequenceDiagram
    participant CPU
    participant Peripheral
    CPU->>Peripheral: schedule(Schedule::XYZ, cycle)
    Peripheral-->>CPU: scheduledCallback() triggered
    CPU->>CPU: unschedule(Schedule::XYZ) after handling
Possibly related PRs
- grumpycoders/pcsx-redux#1898: Modifies calls to check()in the GUI for CD-ROM handling, directly relating to the updated use ofparseIso()in this PR.
Poem
Hopping through code with a bounce and a skip,
I’ve found new paths for CD-ROM’s trip.
Scheduling magic with each tiny cue,
Parsing ISO, fresh as morning dew.
My floppy ears celebrate changes so grand—
A rabbit’s cheer in our emu land!
🐇🌟
✨ Finishing Touches
- [ ] 📝 Generate Docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
- I pushed a fix in commit <commit_id>, please review it.
- Explain this complex logic.
- Open a follow-up GitHub issue for this discussion.
 
- Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitaiin a new review comment at the desired location with your query. Examples:- @coderabbitai explain this code block.
- @coderabbitai modularize this function.
 
- PR comments: Tag @coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
- @coderabbitai read src/utils.ts and explain its main purpose.
- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
- @coderabbitai help me debug CodeRabbit configuration file.
 
Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
- @coderabbitai pauseto pause the reviews on a PR.
- @coderabbitai resumeto resume the paused reviews.
- @coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- @coderabbitai full reviewto do a full review from scratch and review all the files again.
- @coderabbitai summaryto regenerate the summary of the PR.
- @coderabbitai generate docstringsto generate docstrings for this PR.
- @coderabbitai generate sequence diagramto generate a sequence diagram of the changes in this PR.
- @coderabbitai resolveresolve all the CodeRabbit review comments.
- @coderabbitai configurationto show the current CodeRabbit configuration for the repository.
- @coderabbitai helpto get help.
Other keywords and placeholders
- Add @coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed.
- Add @coderabbitai summaryto generate the high-level summary at a specific location in the PR description.
- Add @coderabbitaianywhere in the PR title to generate the title automatically.
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
