Skip to content

Commit

Permalink
(libretro) update files
Browse files Browse the repository at this point in the history
  • Loading branch information
barbudreadmon committed Apr 20, 2024
1 parent b035b1b commit c821b10
Show file tree
Hide file tree
Showing 10 changed files with 792 additions and 91 deletions.
201 changes: 182 additions & 19 deletions dats/FinalBurn Neo (ClrMame Pro XML, Arcade only).dat

Large diffs are not rendered by default.

201 changes: 182 additions & 19 deletions dats/FinalBurn Neo (ClrMame Pro XML, Neogeo only).dat

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions dats/FinalBurn Neo (ClrMame Pro XML, PC-Engine only).dat
Original file line number Diff line number Diff line change
Expand Up @@ -1388,6 +1388,15 @@
<video type="raster" orientation="horizontal" width="512" height="240" aspectx="4" aspecty="3"/>
<driver status="good"/>
</game>
<game name="mainurse" sourcefile="pce/d_pce.cpp">
<comment>Homebrew</comment>
<description>Mai Nurse (HB)</description>
<year>2024</year>
<manufacturer>lunoka</manufacturer>
<rom name="Mai Nurse (2024)(lunoka).pce" size="262144" crc="c94e2bc6"/>
<video type="raster" orientation="horizontal" width="512" height="224" aspectx="4" aspecty="3"/>
<driver status="good"/>
</game>
<game name="mikkokue" cloneof="mikkoku" romof="mikkoku" sourcefile="pce/d_pce.cpp">
<comment>Hack</comment>
<description>Maison Ikkoku (Hack, English)</description>
Expand Down
201 changes: 182 additions & 19 deletions dats/light/FinalBurn Neo Light (ClrMame Pro XML, Arcade only).dat

Large diffs are not rendered by default.

201 changes: 182 additions & 19 deletions dats/light/FinalBurn Neo Light (ClrMame Pro XML, Neogeo only).dat

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions gamelist.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/burner/libretro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ The following "device type" also exist, but they won't be compatible with every
* **Mouse (full)** : same as above, but the buttons will be on the mouse
* **Pointer** : it will use "pointer" device (can be a mouse/trackball) to determine coordinates on screen, buttons will stay on retropad
* **Lightgun** : it will use lightgun to determine coordinates on screen, buttons will be on the lightgun too.
* **Analog Arcade Gun** : it will use the analog stick for gun games but in a different way than "Classic" and "Modern", it is particularily useful if you have a "fixed arcade gun" (arcade gun mounted on an analog control).

## Emulating consoles and computers

Expand Down
34 changes: 28 additions & 6 deletions src/burner/libretro/retro_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,21 @@ static inline void CinpDirectCoord(int port, int axis)
INT32 width, height;
BurnDrvGetVisibleSize(&width, &height);
// Check whether this axis is X or Y, update pointerValues accordingly
if ((nDeviceType[port] == RETRO_DEVICE_LIGHTGUN && sAxiBinds[axis].id == RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X) || (nDeviceType[port] == RETRO_DEVICE_POINTER && sAxiBinds[axis].id == RETRO_DEVICE_ID_POINTER_X))
pointerValues[port][0] = (INT32)(width * (double(val)/double(0x10000)));
else if ((nDeviceType[port] == RETRO_DEVICE_LIGHTGUN && sAxiBinds[axis].id == RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y) || (nDeviceType[port] == RETRO_DEVICE_POINTER && sAxiBinds[axis].id == RETRO_DEVICE_ID_POINTER_Y))
pointerValues[port][1] = (INT32)(height * (double(val)/double(0x10000)));
if (nDeviceType[port] == RETRO_DEVICE_LIGHTGUN)
{
if (sAxiBinds[axis].id == RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X) pointerValues[port][0] = (INT32)(width * (double(val)/double(0x10000)));
else if (sAxiBinds[axis].id == RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y) pointerValues[port][1] = (INT32)(height * (double(val)/double(0x10000)));
}
else if (nDeviceType[port] == RETRO_DEVICE_POINTER)
{
if (sAxiBinds[axis].id == RETRO_DEVICE_ID_POINTER_X) pointerValues[port][0] = (INT32)(width * (double(val)/double(0x10000)));
else if (sAxiBinds[axis].id == RETRO_DEVICE_ID_POINTER_Y) pointerValues[port][1] = (INT32)(height * (double(val)/double(0x10000)));
}
else if (nDeviceType[port] == RETROARCADE_GUN)
{
if (sAxiBinds[axis].id == RETRO_DEVICE_ID_ANALOG_X) pointerValues[port][0] = (INT32)(width * (double(val)/double(0x10000)));
else if (sAxiBinds[axis].id == RETRO_DEVICE_ID_ANALOG_Y) pointerValues[port][1] = (INT32)(height * (double(val)/double(0x10000)));
}
}
int player = port;
if ((BurnDrvGetHardwareCode() & HARDWARE_PUBLIC_MASK) == HARDWARE_NES || (strcmp(BurnDrvGetTextA(DRV_NAME), "cybertnk") == 0))
Expand Down Expand Up @@ -683,6 +694,15 @@ static INT32 GameInpSpecialOne(struct GameInp* pgi, INT32 nPlayer, char* szb, ch
}
}

if (nDeviceType[nPlayer] == RETROARCADE_GUN && BurnGunIsActive()) {
if (strcmp("x-axis", szb) == 0) {
GameInpAnalog2RetroInpAnalog(pgi, nPlayer, RETRO_DEVICE_ID_ANALOG_X, 0, description, GIT_DIRECT_COORD);
}
if (strcmp("y-axis", szb) == 0) {
GameInpAnalog2RetroInpAnalog(pgi, nPlayer, RETRO_DEVICE_ID_ANALOG_Y, 0, description, GIT_DIRECT_COORD);
}
}

if (nDeviceType[nPlayer] == RETRO_DEVICE_LIGHTGUN && BurnGunIsActive()) {
if (strcmp("x-axis", szb) == 0) {
GameInpAnalog2RetroInpAnalog(pgi, nPlayer, RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X, 0, description, GIT_DIRECT_COORD);
Expand Down Expand Up @@ -2825,7 +2845,8 @@ void SetControllerInfo()
{ "Mouse (ball only)", RETROMOUSE_BALL },
{ "Mouse (full)", RETROMOUSE_FULL },
{ "Pointer", RETRO_DEVICE_POINTER },
{ "Lightgun", RETRO_DEVICE_LIGHTGUN }
{ "Lightgun", RETRO_DEVICE_LIGHTGUN },
{ "Analog Arcade Gun", RETROARCADE_GUN }
};

// kludge for nes (some 1p game want to use p2 controls)
Expand Down Expand Up @@ -3250,7 +3271,8 @@ void retro_set_controller_port_device(unsigned port, unsigned device)
device != RETROMOUSE_BALL &&
device != RETROMOUSE_FULL &&
device != RETRO_DEVICE_POINTER &&
device != RETRO_DEVICE_LIGHTGUN)
device != RETRO_DEVICE_LIGHTGUN &&
device != RETROARCADE_GUN)
{
device = RETROPAD_CLASSIC;
HandleMessage(RETRO_LOG_INFO, "[FBNeo] Unknown device type for port %d, forcing \"Classic\" instead\n", port);
Expand Down
1 change: 1 addition & 0 deletions src/burner/libretro/retro_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ extern retro_input_state_t input_cb;
#define RETROPAD_6PANEL RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 0)
#define RETROPAD_MODERN RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 1)
#define RETROMOUSE_BALL RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 2)
#define RETROARCADE_GUN RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_ANALOG, 3)
#define RETROMOUSE_FULL RETRO_DEVICE_SUBCLASS(RETRO_DEVICE_MOUSE, 1)

#define GIT_SPECIAL_SWITCH (0x03)
Expand Down
24 changes: 18 additions & 6 deletions src/dep/generated/driverlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ DRV BurnDrvcv_2010p1;
DRV BurnDrvcv_2010p;
DRV BurnDrvcv_2010;
DRV BurnDrvmd_2020bb;
DRV BurnDrvBb2020cd;
DRV BurnDrvBb2020;
DRV BurnDrvBba2020;
DRV BurnDrvBbh2020;
Expand Down Expand Up @@ -232,6 +233,7 @@ DRV BurnSpecabusimpr;
DRV BurnDrvMSX_abusimbel;
DRV BurnSpecabusimprd;
DRV BurnDrvmd_abyssal;
DRV BurnDrvAbyssali;
DRV BurnSpecAce;
DRV BurnSpecAce2;
DRV BurnSpecAce2088;
Expand Down Expand Up @@ -9975,6 +9977,7 @@ DRV BurnDrvGunhohki;
DRV BurnDrvnes_minkymomo;
DRV BurnDrvnes_minkymomoj;
DRV BurnDrvgg_mainursegg;
DRV BurnDrvpce_mainurse;
DRV BurnDrvsms_mainurse;
DRV BurnSpecMaincourse;
DRV BurnDrvMainsnk;
Expand Down Expand Up @@ -10476,10 +10479,11 @@ DRV BurnDrvngpc_mslug2ndd;
DRV BurnDrvngpc_mslug2nd;
DRV BurnDrvMslug1v2;
DRV BurnDrvMslugfs;
DRV BurnDrvMslugfc2;
DRV BurnDrvMslugfc1;
DRV BurnDrvMslugdg;
DRV BurnDrvMsqyfc1;
DRV BurnDrvMslugqy;
DRV BurnDrvMslugfc2;
DRV BurnDrvMslugfc1;
DRV BurnDrvMslug;
DRV BurnDrvMs21v2;
DRV BurnDrvMslug2r;
Expand Down Expand Up @@ -20854,6 +20858,7 @@ static struct BurnDriver* pDriver[] = {
&BurnDrvcv_2010p, // 2010: The Graphic Action Game (Prototype v54)
&BurnDrvcv_2010, // 2010: The Graphic Action Game
&BurnDrvmd_2020bb, // 2020 Super Baseball (Euro, USA)
&BurnDrvBb2020cd, // 2020 Super Baseball (Neo CD conversion)
&BurnDrvBb2020, // 2020 Super Baseball (set 1)
&BurnDrvBba2020, // 2020 Super Baseball (set 2)
&BurnDrvBbh2020, // 2020 Super Baseball (set 3)
Expand Down Expand Up @@ -20966,6 +20971,7 @@ static struct BurnDriver* pDriver[] = {
&BurnDrvMSX_abusimbel, // Abu Simbel Profanation (Euro, Spanish)
&BurnSpecabusimprd, // Abu Simbel Profanation (Spanish) (48K)
&BurnDrvmd_abyssal, // Abyssal Infants (HB)
&BurnDrvAbyssali, // Abyssal Infants
&BurnSpecAce, // ACE - Air Combat Emulator (48K)
&BurnSpecAce2, // ACE 2 - The Ultimate Head to Head Conflict (128K)
&BurnSpecAce2088, // ACE 2088 (128K)
Expand Down Expand Up @@ -30709,6 +30715,7 @@ static struct BurnDriver* pDriver[] = {
&BurnDrvnes_minkymomo, // Mahou no Princess Minky Momo - Remember Dream (Hack, English)
&BurnDrvnes_minkymomoj, // Mahou no Princess Minky Momo - Remember Dream (Japan)
&BurnDrvgg_mainursegg, // Mai Nurse (HB)
&BurnDrvpce_mainurse, // Mai Nurse (HB)
&BurnDrvsms_mainurse, // Mai Nurse (HB)
&BurnSpecMaincourse, // Main Course - The Retro Cut (48K) (HB)
&BurnDrvMainsnk, // Main Event (1984)
Expand Down Expand Up @@ -31210,10 +31217,11 @@ static struct BurnDriver* pDriver[] = {
&BurnDrvngpc_mslug2nd, // Metal Slug - 2nd Mission (World)
&BurnDrvMslug1v2, // Metal Slug - Super Vehicle-001 (1v2 Mode, Hack)
&BurnDrvMslugfs, // Metal Slug - Super Vehicle-001 (Firepower Showdown, Hack)
&BurnDrvMslugfc2, // Metal Slug - Super Vehicle-001 (Item Random & Powerful Enemy Defense FC2, Hack)
&BurnDrvMslugfc1, // Metal Slug - Super Vehicle-001 (Item Random FC2, Hack)
&BurnDrvMslugdg, // Metal Slug - Super Vehicle-001 (Multifunction, Hack)
&BurnDrvMsqyfc1, // Metal Slug - Super Vehicle-001 (Origins Item Random, Hack)
&BurnDrvMslugqy, // Metal Slug - Super Vehicle-001 (Origins, Hack)
&BurnDrvMslugfc2, // Metal Slug - Super Vehicle-001 (Random Item & Powerful Enemy Defense, Hack)
&BurnDrvMslugfc1, // Metal Slug - Super Vehicle-001 (Random Item, Hack)
&BurnDrvMslug, // Metal Slug - Super Vehicle-001
&BurnDrvMs21v2, // Metal Slug 2 - Super Vehicle-001/II (1v2 Mode, Hack)
&BurnDrvMslug2r, // Metal Slug 2 - Super Vehicle-001/II (Enemy Remix, Hack)
Expand Down Expand Up @@ -41588,6 +41596,7 @@ static game_sourcefile_entry sourcefile_table[] = {
{ "cv_2010p", "coleco/d_coleco.cpp"},
{ "cv_2010", "coleco/d_coleco.cpp"},
{ "md_2020bb", "megadrive/d_megadrive.cpp"},
{ "2020bbcd", "neogeo/d_neogeo.cpp"},
{ "2020bb", "neogeo/d_neogeo.cpp"},
{ "2020bba", "neogeo/d_neogeo.cpp"},
{ "2020bbh", "neogeo/d_neogeo.cpp"},
Expand Down Expand Up @@ -41700,6 +41709,7 @@ static game_sourcefile_entry sourcefile_table[] = {
{ "msx_abusimbel", "msx/d_msx.cpp"},
{ "spec_abusimprd", "spectrum/d_spectrum.cpp"},
{ "md_abyssal", "megadrive/d_megadrive.cpp"},
{ "abyssali", "neogeo/d_neogeo.cpp"},
{ "spec_ace", "spectrum/d_spectrum.cpp"},
{ "spec_ace2", "spectrum/d_spectrum.cpp"},
{ "spec_ace2088", "spectrum/d_spectrum.cpp"},
Expand Down Expand Up @@ -51351,6 +51361,7 @@ static game_sourcefile_entry sourcefile_table[] = {
{ "nes_minkymomo", "nes/d_nes.cpp"},
{ "nes_minkymomoj", "nes/d_nes.cpp"},
{ "gg_mainursegg", "sms/d_sms.cpp"},
{ "pce_mainurse", "pce/d_pce.cpp"},
{ "sms_mainurse", "sms/d_sms.cpp"},
{ "spec_maincourse", "spectrum/d_spectrum.cpp"},
{ "mainsnk", "pre90s/d_mainsnk.cpp"},
Expand Down Expand Up @@ -51850,10 +51861,11 @@ static game_sourcefile_entry sourcefile_table[] = {
{ "ngp_mslug2nd", "pst90s/d_ngp.cpp"},
{ "mslug1v2", "neogeo/d_neogeo.cpp"},
{ "mslugfs", "neogeo/d_neogeo.cpp"},
{ "mslugfc2", "neogeo/d_neogeo.cpp"},
{ "mslugfc1", "neogeo/d_neogeo.cpp"},
{ "mslugdg", "neogeo/d_neogeo.cpp"},
{ "msqyfc1", "neogeo/d_neogeo.cpp"},
{ "mslugqy", "neogeo/d_neogeo.cpp"},
{ "mslugfc2", "neogeo/d_neogeo.cpp"},
{ "mslugfc1", "neogeo/d_neogeo.cpp"},
{ "mslug", "neogeo/d_neogeo.cpp"},
{ "ms21v2", "neogeo/d_neogeo.cpp"},
{ "mslug2r", "neogeo/d_neogeo.cpp"},
Expand Down

0 comments on commit c821b10

Please sign in to comment.