-
Notifications
You must be signed in to change notification settings - Fork 49
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
Libretro #377
Libretro #377
Conversation
fixes skylersaleh#377 one less point in skylersaleh#334 there are other bugs in code, at least now you are no longer stuck in /home
@@ -0,0 +1,4405 @@ | |||
/* Copyright (C) 2010-2020 The RetroArch team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you make any changes to this file for the SkyEmu port? Or is it just the straight header from the retro arch project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a straight copy
src/libretro.c
Outdated
#include "gba.h" | ||
#include "nds.h" | ||
|
||
#define SKYEMU_LIBRETRO_VERSION "0.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be based on the GIT_COMMIT_HASH define that we set in our CMake file?
That way we can correlate it back with the regular builds and have it automatically update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll look into that
src/libretro.c
Outdated
#define SKYEMU_LIBRETRO_VERSION "0.1.0" | ||
|
||
// necessary to resolve a linker error when loaded by retroarch | ||
bool se_load_bios_file(const char* name, const char* base_path, const char* file_name, uint8_t* data, size_t data_size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its probably better to make this a callback function in the cores that you can just set to NULL in the retro arch load rom commands. That way the cores are completely decoupled from the frontend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually quite like how this ended up, I made some changes to this function (that I have yet pushed), so this function is actually used at this point and I don't know if we should remove it still, in favour of a callback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets push your set of changes and go from there!
src/libretro.c
Outdated
|
||
/* ------------------ RETROARCH GB ----------------- */ | ||
|
||
static gb_scratch_t gb_scratch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should union the cores/scratch space for all the systems like the main frontend to save RAM.
src/libretro.c
Outdated
info->geometry.max_width = SB_LCD_W; | ||
info->geometry.base_height = info->geometry.max_height; | ||
info->geometry.base_width = info->geometry.max_width; | ||
info->timing.fps = 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
59.727 FPS
src/libretro.c
Outdated
info->geometry.max_height = GBA_LCD_H; | ||
info->geometry.base_width = info->geometry.max_width; | ||
info->geometry.base_height = info->geometry.max_height; | ||
info->timing.fps = 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
59.727
src/libretro.c
Outdated
info->geometry.max_height = NDS_LCD_H * 2; // (bottom and top screen) | ||
info->geometry.base_width = info->geometry.max_width; | ||
info->geometry.base_height = info->geometry.max_height; | ||
info->timing.fps = 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
59.8261
One observation is that if you drag from the bottom touch screen to a location overlapping the top touch screen of the NDS, it yields erratic touch points. I assume this is a result of not sanitizing the touch coordinates to only the region of the bottom touch screen. I also can't seem to get cheat codes to work correctly. Have you tested them out? |
What cheat codes are not working properly for you? |
Can you resolve the merge conflict please? |
a WIP pull request for libretro support. Not ready to be merged yet.