Skip to content

Cdrom misc#1023

Closed
johnbaumann wants to merge 7 commits intogrumpycoders:mainfrom
johnbaumann:cdrom_misc
Closed

Cdrom misc#1023
johnbaumann wants to merge 7 commits intogrumpycoders:mainfrom
johnbaumann:cdrom_misc

Conversation

@johnbaumann
Copy link
Copy Markdown
Collaborator

Fixing up some cdrom behavior around command responses. The main focus is currently around disc type detection and to avoid sending the license string for a non-bootable disc, though ideally this would not prevent reading from "unlicensed" discs, i.e. an asset CD when paired with a manually launched binary.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 7, 2022

Codecov Report

❌ Patch coverage is 5.88235% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.39%. Comparing base (8955f1d) to head (02db7ef).
⚠️ Report is 2400 commits behind head on main.

Files with missing lines Patch % Lines
src/core/cdrom.cc 6.25% 45 Missing ⚠️
src/cdrom/cdriso.cc 0.00% 1 Missing ⚠️
src/cdrom/cdriso.h 0.00% 1 Missing ⚠️
src/core/cdrom.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1023      +/-   ##
==========================================
+ Coverage   16.38%   16.39%   +0.01%     
==========================================
  Files         362      362              
  Lines      115768   115785      +17     
==========================================
+ Hits        18971    18986      +15     
- Misses      96797    96799       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/core/cdrom.cc Outdated
m_result[1] = 0;
m_result[2] = 0;
m_result[3] = 0;
memset((char *)&m_result[1], 0, 7);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be easier / safer to do the following:

memset(m_result, 0, sizeof(m_result);
m_result[0] = m_statP;

Comment thread src/core/cdrom.cc
if (!psxexe->failed()) {
m_cdromId = "SLUS99999";
exename = "PSX.EXE;1";
m_bootable = true;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the check function should display a warning at the end that the disc isn't bootable in case this boolean is still false.

@nicolasnoble
Copy link
Copy Markdown
Member

FWIW, asset discs exist on the PS1. They'll usually contain a dummy binary that displays a warning about the disc being a "DLC".

For example, beatmania APPEND 3rdMIX.

@johnbaumann
Copy link
Copy Markdown
Collaborator Author

Superseded by #1129

Leaving branch/PR in-tact until the new code is mostly working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants