Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup of CDVDMAN/CDVDFSV #445

Merged
merged 7 commits into from
Jun 27, 2021
Merged

Conversation

uyjulian
Copy link
Member

Pull Request checklist

Note: these are not necessarily requirements

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

Cleanups to CDVDMAN/CDVDFSV, mainly to make it easier to work with.
Source files have been split up and definitions have been changed to the ps2sdk ones.

Use cd_file_t type instead of cdl_file_t, and move the extra flag entry into the RPC structure

Add ifdef guards on some include files

Move cdvdman default settings to ifdefs
This will make it easier to change it out to use sysclib when it is ready
Copy link
Member

@AKuHAK AKuHAK left a comment

Choose a reason for hiding this comment

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

Also 2 new warnings appear in the compilation log:

mipsel-ps2-irx-gcc -D_IOP -fno-builtin -Os -G0 -Wall -I../../network/common -I../common -I/usr/local/ps2dev/ps2sdk/iop/include -I/usr/local/ps2dev/ps2sdk/common/include -I. -Iinclude/ -DSMB_DRIVER -D__USE_DEV9 -msoft-float -mno-explicit-relocs -c device-smb.c -o obj.smb/device-smb.o
device-smb.c: In function 'DeviceFSInit':
device-smb.c:84:31: warning: taking address of packed member of 'struct cdvdman_settings_smb' may result in an unaligned pointer value [-Waddress-of-packed-member]
   84 |         smb_OpenAndX(tmp_str, &cdvdman_settings.FIDs[i++], 0);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
device-smb.c:93:35: warning: taking address of packed member of 'struct cdvdman_settings_smb' may result in an unaligned pointer value [-Waddress-of-packed-member]
   93 |             smb_OpenAndX(tmp_str, &cdvdman_settings.FIDs[i], 0);
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~

modules/iopcore/cdvdman/searchfile.c Outdated Show resolved Hide resolved
modules/iopcore/cdvdman/scmd.c Outdated Show resolved Hide resolved
@AKuHAK
Copy link
Member

AKuHAK commented Jun 26, 2021

Other looks good except for paranoid Codacy

@uyjulian
Copy link
Member Author

I made the mentioned changes, along with syncing the SCND/NCMD enumerations with ps2sdk.

@AKuHAK
Copy link
Member

AKuHAK commented Jun 26, 2021

Looks fine. If you dont plan to add something into this pr - it can be merged.

This should make it more clear that it is an operation related to the sector size.
The compiler should optimize it to bitshifts anyway
@uyjulian
Copy link
Member Author

This is probably all I'm going to add into this pull request.

@AKuHAK AKuHAK merged commit 6a5be80 into ps2homebrew:master Jun 27, 2021
AKuHAK added a commit that referenced this pull request Sep 30, 2021
citronalco pushed a commit to citronalco/OPL-Daily-Builds that referenced this pull request Sep 10, 2023
This pull request was closed.
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