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

Update to 0.11-dev (2cbbaea) #291

Open
wants to merge 100 commits into
base: master
Choose a base branch
from
Open

Update to 0.11-dev (2cbbaea) #291

wants to merge 100 commits into from

Conversation

Ryunam
Copy link

@Ryunam Ryunam commented Apr 21, 2024

Among other things, this is desirable for the audio fix implemented in 4fdadc5, which addresses a problem I encountered a few times with the current libretro core.

endrift and others added 30 commits February 7, 2024 01:44
- Old method was 2x. 3x looks quite a bit sharper in aspect-fit mode on
  non-O2DS as the width is an integer number of half-width pixels. Since
  resulting upscaling ratio is 3x:1.5x, this gives very good results,
  althought it might be too sharp for your liking (YMMV). Not as much of
  a difference in screen-fit mode
- Remove duplicate rendertarget as it was not necessary
Cameras still don't work though
Cameras still don't work though
Copy link
Collaborator

@endrift endrift left a comment

Choose a reason for hiding this comment

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

I recommend waiting a few days--I'm working on some resampling revamp that will affect the libretro core (and hopefully speed it up) that I'm hoping to get committed within the next 48 hours or so

@Ryunam
Copy link
Author

Ryunam commented Apr 22, 2024

Perfect, just let me know here when you think it's time to make the update and I will pull the rest of the commits.

@endrift
Copy link
Collaborator

endrift commented Apr 22, 2024

Should be done. Don't update past 2cbbaea right now or you'll have to do additional work to get it to compile, as I'm now working on refining individual features as being able to be turned on or off.

@Ryunam
Copy link
Author

Ryunam commented Apr 22, 2024

Unfortunately updating up to 2cbbaea is breaking compilation of the downstream core. It is stopping at:
No rule to make target 'src/third-party/blip_buf/blip_buf.o', needed by 'mgba_libretro.dll'.

I saw you removed blip_buf with fa2fe8e. Erasing line 117 from libretro-build\Makefile.common does make it go past that, but then compilation hangs again on multiple undefined references:

./src/core/sync.o:sync.c:(.text+0xac): undefined reference to `mAudioBufferAvailable'
./src/core/sync.o:sync.c:(.text+0xe5): undefined reference to `mAudioBufferAvailable'
./src/gb/audio.o:audio.c:(.text+0xda): undefined reference to `mAudioBufferInit'
./src/gb/audio.o:audio.c:(.text+0x354): undefined reference to `mAudioBufferClear'
./src/gb/audio.o:audio.c:(.text+0x115b): undefined reference to `mAudioBufferWrite'
./src/gb/audio.o:audio.c:(.text+0x1191): undefined reference to `mAudioBufferAvailable'
./src/gb/audio.o:audio.c:(.text+0x178): undefined reference to `mAudioBufferDeinit'
./src/gba/audio.o:audio.c:(.text+0x9d3): undefined reference to `mAudioBufferWrite'
./src/gba/audio.o:audio.c:(.text+0xa09): undefined reference to `mAudioBufferAvailable'
./src/platform/libretro/libretro.o:libretro.c:(.text+0x1ed8): undefined reference to `mAudioBufferRead'
./src/platform/libretro/libretro.o:libretro.c:(.text+0x405c): undefined reference to `mAudioBufferAvailable'
./src/platform/libretro/libretro.o:libretro.c:(.text+0x40c5): undefined reference to `mAudioBufferRead'

@endrift
Copy link
Collaborator

endrift commented Apr 22, 2024

Yes, you need to add util/audio-buffer.c

@Ryunam Ryunam changed the title Update to 0.11-dev (61791c9) Update to 0.11-dev (2cbbaea) Apr 23, 2024
@Ryunam
Copy link
Author

Ryunam commented Apr 23, 2024

Okay, should be all done. Tested briefly on Windows, as well. Let me know if this is good to go.

@endrift
Copy link
Collaborator

endrift commented Apr 30, 2024

So the initial version would have some issues. You should update again, but this might break trying to load from a filename instead of a ROM buffer, the thing I told you to avoid updating to avoid hitting. You may also need to dynamically change the sample rate for GBA games, a thing I'm not sure if you can do in libretro cores.

@endrift
Copy link
Collaborator

endrift commented May 8, 2024

Okay, just pushed the last needed fixes.

@Ryunam
Copy link
Author

Ryunam commented May 12, 2024

Thank you @endrift. I finally had some time today to pull the latest commits, but now I'm hitting a VFS-related issue when trying to compile the core:

src/util/vfs/vfs-fd.c: In function 'VFileOpenFD':
src/util/vfs/vfs-fd.c:63:16: warning: implicit declaration of function 'VFileFromFD' [-Wimplicit-function-declaration]
   63 |         return VFileFromFD(fd);
      |                ^~~~~~~~~~~
src/util/vfs/vfs-fd.c:63:16: warning: returning 'int' from a function with return type 'struct VFile *' makes pointer from integer without a cast [-Wint-conversion]
   63 |         return VFileFromFD(fd);
      |                ^~~~~~~~~~~~~~~
src/util/vfs/vfs-fd.c: At top level:
src/util/vfs/vfs-fd.c:66:15: error: conflicting types for 'VFileFromFD'; have 'struct VFile *(int)'
   66 | struct VFile* VFileFromFD(int fd) {
      |               ^~~~~~~~~~~
src/util/vfs/vfs-fd.c:63:16: note: previous implicit declaration of 'VFileFromFD' with type 'int()'
   63 |         return VFileFromFD(fd);
      |                ^~~~~~~~~~~

@endrift
Copy link
Collaborator

endrift commented May 31, 2024

You need to add -DENABLE_VFS_FD to get that file to work properly. A bunch of defines changed, so you might need to change a few. I'd need to see which all are used.

@endrift
Copy link
Collaborator

endrift commented Jun 23, 2024

It looks like you have HAVE_VFS_FD in the Makefile--that doesn't exist (anymore?) so you'll want to replace that with ENABLE_VFS_FD. You'll probably want to add ENABLE_VFS=1 as well, but I'm not 100% sure if that's needed in all configurations, or which if any it's needed in.

Otherwise, no other flags should have changed afaict. I dunno if you were waiting for me to confirm that, but I was waiting on you to get back with if that worked.

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.