GithubHelp home page GithubHelp logo

irixxxx / picodrive Goto Github PK

View Code? Open in Web Editor NEW

This project forked from notaz/picodrive

52.0 52.0 24.0 10.67 MB

Fast MegaDrive/MegaCD/32X emulator

License: Other

Makefile 0.83% C 86.98% Assembly 10.68% Shell 0.26% Batchfile 0.17% Objective-C 0.04% Perl 0.01% HTML 1.04%

picodrive's People

Contributors

akimanbengus avatar andres-asm avatar apaczer avatar ccawley2011 avatar chips-fr avatar cmitu avatar crashgg avatar davidgfnet avatar dinkc64 avatar exl avatar fjtrujy avatar hiroshica avatar ilag11111 avatar inactive123 avatar irixxxx avatar jdgleaver avatar jste0 avatar notaz avatar orbea avatar osirizx avatar pcercuei avatar phcoder avatar saulfabregwiivc avatar sndream avatar sydarn avatar techmetx11 avatar toadking avatar toke79 avatar zoltanvb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

picodrive's Issues

[PocketGo2 v2 / PicoDrive 1.96] Major performance drop in 32X games

Hardware: PocketGo2 v2
O/S: Rogue FW 1.0.9 for PocketGo2 v2
Software: PicoDrive 1.96

As discussed on Dingoonity, I noticed a huge performance drop with 32X games in the last 1.95 and 1.96 OPKs compared to how it ran with OPK built in November 30th (attached to this ticket).
The settings are the same through the different OPKs I tested. Note that the performance drop is also occurring with Genesis games but not very noticeable as it still runs at 60 fps. It's noticeable when using 'Fast forward' feature where the performance is way higher with the fast OPK (60/540 against 30/270).

Here is the video footage showing (in the 1st part) the game running fullspeed with the fast OPK and then, in the 2nd part, running slower (game and sound) with 1.96 OPK:
https://drive.google.com/file/d/13b03Z6mM6RBMXP_0NKnLobXvfPLlKGYS/view?usp=sharing

I also attached the zipped fast OPK for comparison:
picodrive_gcw0.zip

[Question] libretro-master branch lagging behind

Hello. I have noticed, the libretro-master branch is pretty stale, at 10 months old (pre-1.98 even). Is it because it's deprecated in favor of the libretro-picodrive repository? Or do you plan on updating it at some point?

Asking because some ELEC systems that use their Retroarch have the package.mk file with PKG_SITE variable pointing to this repo rather than libretro's one and PKG_VERSION matches the last commit on libretro-master branch... I don't know if I should ask these maintainers for appropiate changes instead...

[YM2612] High volume waveforms don't clip

Didn't test it on other platforms. Possible it's again, an ARM 32-bit only flaw. Still:
clipbug.zip - zip file with test ROM and recording of how should it sound like. On V90 Picodrive, it sounds like a sine wave, which isn't correct.

EDIT: x86_64 PC picodrive build is also affected

[PocketGo2 v2 / PicoDrive 1.96] Sprite corruption in savestate preview

Hardware: PocketGo2 v2
O/S: Rogue FW 1.0.9 for PocketGo2 v2
Software: PicoDrive 1.96

Preview of savestates are corrupt and shows sprite mosaic. This occurs when ingame sprites currently use different frames from what the savestate preview shows.

  1. Launch any game
  2. Save your progression
  3. Play a bit to display different sprite frames from what the savestate preview shows
  4. Enter Load/Save state menu
  5. Notice that the sprites are corrupt on savestate preview

Please see the attachment. Note that this issue does not occur with the fast 1.95 OPK I use.

save_corrupt_sprites

cmake in infinitive loop

trying to cross build uamqp on mips platform. I added SET(CMAKE_C_COMPILER /opt/mips64-sysroot/usr/bin/mips64-octeon-linux-gnu-gcc) in CMakeLists.txt then ran "cmake ..". It gives the following message and the configure goes on and on:

You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /usr/bin/cc
CMAKE_C_COMPILER= /usr/bin/cc

Not sure what "your cache" means, how do I get around this problem?

Hang when running Sega CD content

When running Sega CD content, Picodrive will hang randomly. The emulator does not crash - the menu can still be opened, and behaves normally - but while the game is running the display is blanked and the audio becomes either a flat tone or silence. This happens quite rarely, and seems to be associated with FMV playback (I have seen it a number of times during game intros). The issue only occurs reliably when playing Silpheed (USA) (Redump) - Picodrive will almost always hang at some point during the first level.

I have observed this behaviour on two platforms:

  • OpenDingux (RG350M) with both the standalone version of Picodrive and the RetroArch core.

  • Linux (OpenSUSE Leap 15.2) using the RetroArch core.

When running the RetroArch core, nothing is output to the log or terminal when the issue occurs, and the hung content can be closed normally.

This a RetroArch save state taken while a hang is in progress: Silpheed (USA).zip

Please let me know if I can help in any way with debugging this issue.

Battery saves not supported for Master System games

In testing in-game save functionality for all of the default emulators of the FunKey S, I noticed that PicoDrive, the default emulator used for Master System emulation, did not support the battery save functionality of Monopoly. In attempting to save in that game, one of the few Master System games with such a feature, the game itself spat out an error message, asking that the "cartridge" be checked.

Tag 1.98 release

Can you tag 1.98 release after dust has settled a bit around potential remaining issues ?

32x crashes on launch with recent dynarec changes

I filed this in the libretro fork (libretro#135), and it was recommended that I also raise this here.

It looks like the most recent few batches of dynarec changes have been causing crashes on 3DS, and possibly Vita and OpenDingux as well. Here's what I've been able to discover:

  • 8d2a03b will run games, minus some random svcBackdoor crashes that libretro#136 should fix.
  • In 90c7dbc, loading a 32x game will quit to the home menu with the message, "host register 1 is locked", but will not crash the system. This is after a large batch of commits on July 4.
  • In 5f95cd4, following another batch of dynarec commits, the core will crash when launching a rom.

Unfortunately I have not been able to bisect closer than that, because many of the intermediate commits won't build for me for 3DS without changes. Happy to help with symbols or lookups if necessary.

The crash happens because some code changes pc to point to the first element of blink_free, which is 0. I don't think blink_free should ever be executable code, so that seems incorrect. I haven't been able to find stack breadcrumbs or break anywhere close to the crash. The best clue I have is that it crashes sometime after hitting this block of code, where the registers look very similar to what they look like when it crashes:

   0x5f21a0 <tcache_default+416>:       ldrne   r2, [r11, #64]  ; 0x40
   0x5f21a4 <tcache_default+420>:       and     r1, r2, #1016   ; 0x3f8
   0x5f21a8 <tcache_default+424>:       add     r1, r11, r1
   0x5f21ac <tcache_default+428>:       strne   r2, [r1, #312]  ; 0x138
   0x5f21b0 <tcache_default+432>:       strne   r0, [r1, #316]  ; 0x13c
   0x5f21b4 <tcache_default+436>:       bxne    r0
   0x5f21b8 <tcache_default+440>:       mov     r0, r11
   0x5f21bc <tcache_default+444>:       ldr     r1, [r11, #120] ; 0x78
=> 0x5f21c0 <tcache_default+448>:       bl      0x3e0d3c <sh2_translate>

Here is the full crash dump:

Processor: Arm11 (core 0)
Exception type: prefetch abort
Fault status: Permission - Page
Current process: 3dsx_app (0004001000021100)

Register dump:

r0             00947000            r1             084f1ef8
r2             00000002            r3             00000000
r4             00503460            r5             000003f3
r6             00501ce0            r7             00501c00
r8             00000000            r9             00000000
r10            004f20f0            r11            00503460
r12            00000204            sp             0ffffe30
lr             00000000            pc             00967000

cpsr           000f0010            dfsr           000008ff
ifsr           0000000f            far            fbf7ffe6
fpexc          40000700            fpinst         eef47ac7
fpinst2        eef47ac7

Code dump:

  966fd4:       00000000        andeq   r0, r0, r0
  966fd8:       00000000        andeq   r0, r0, r0
  966fdc:       00000000        andeq   r0, r0, r0
  966fe0:       00000000        andeq   r0, r0, r0
  966fe4:       00000000        andeq   r0, r0, r0
  966fe8:       00000000        andeq   r0, r0, r0
  966fec:       00000000        andeq   r0, r0, r0
  966ff0:       00000000        andeq   r0, r0, r0
  966ff4:       00000000        andeq   r0, r0, r0
  966ff8:       00000000        andeq   r0, r0, r0
  966ffc:       00000000        andeq   r0, r0, r0
  967000:       00000000        andeq   r0, r0, r0


Stack dump:

0ffffe30:  60 34 50 00 f3 03 00 00  e0 1c 50 00 00 1c 50 00   |`4P.......P...P.|
0ffffe40:  60 34 50 00 d2 06 09 00  52 a0 00 00 80 66 08 00   |`4P.....R....f..|
0ffffe50:  00 00 00 00 4c 93 34 00  90 68 08 00 e0 2c 50 00   |....L.4..h...,P.|
0ffffe60:  e0 1c 50 00 b0 9c 2f 00  c0 36 00 00 d2 06 09 00   |..P.../..6......|
0ffffe70:  08 40 0d 06 20 00 00 00  d2 06 09 00 60 f3 4d 00   |.@.. .......`.M.|
0ffffe80:  00 bc 4b 00 29 22 00 00  00 1c 50 00 00 00 00 00   |..K.)"....P.....|
0ffffe90:  00 00 00 00 a8 c1 2f 00  62 07 00 02 76 01 00 00   |....../.b...v...|
0ffffea0:  b0 1f 40 00 60 f3 4d 00  29 22 00 00 1c 10 36 00   |..@.`.M.)"....6.|
0ffffeb0:  20 51 a1 00 58 c2 2f 00  a1 00 00 00 78 f1 31 00   | Q..X./.....x.1.|
0ffffec0:  60 f3 4d 00 a4 00 00 00  00 00 00 00 5a 00 00 00   |`.M.........Z...|
0ffffed0:  60 f3 4d 00 5c c1 4b 00  00 bc 4b 00 78 ab 2f 00   |`.M.\.K...K.x./.|
0ffffee0:  00 00 00 00 00 00 00 00  00 00 00 3f 01 00 3a 00   |...........?..:.|
0ffffef0:  88 b8 1d 00 00 00 00 00  00 00 00 00 0c 00 00 00   |................|
0fffff00:  d0 ab 4b 00 20 f9 3a 00  88 b8 1d 00 64 c1 4b 00   |..K. .:.....d.K.|
0fffff10:  01 00 00 00 5c c1 4b 00  96 8b 0d 00 64 d2 2d 00   |....\.K.....d.-.|
0fffff20:  a0 79 49 00 78 1b 36 00  30 ff ff 0f 00 00 00 00   |.yI.x.6.0.......|
0fffff30:  00 00 00 00 02 00 00 00  a0 79 49 00 01 00 00 00   |.........yI.....|
0fffff40:  ff ff ff ff 01 00 ff ff  a0 79 49 00 c0 24 00 08   |.........yI..$..|
0fffff50:  96 8b 0d 00 84 0c 2a 00  a0 b9 47 00 a0 29 4b 00   |......*...G..)K.|
0fffff60:  ff ff ff ff ff ff ff ff  01 00 ff ff 80 62 2d 00   |.............b-.|
0fffff70:  68 fb 44 00 98 86 7e fb  05 00 00 00 c0 e4 00 08   |h.D...~.........|
0fffff80:  00 00 00 00 00 00 00 00  94 f9 46 00 c0 24 00 08   |..........F..$..|
0fffff90:  96 8b 0d 00 a0 29 4b 00  02 00 00 00 00 00 00 00   |.....)K.........|
0fffffa0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
0fffffb0:  a0 89 49 00 a0 79 49 00  00 00 00 00 02 00 00 00   |..I..yI.........|
0fffffc0:  a0 24 00 08 a0 29 4b 00  00 00 00 00 20 6c 2d 00   |.$...)K..... l-.|
0fffffd0:  a0 24 00 08 00 00 00 00  1c 11 1b 00 02 00 00 00   |.$..............|
0fffffe0:  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   |................|
0ffffff0:  00 00 00 00 00 00 00 00  00 00 00 00 bc 05 10 00   |................|

Broken SH2 dynarec on x86 builds (in newer gcc?)

Turns out there is a bug... and has been there forever hidden in the gcc internals. As you can see the sh2_read_handler type lacks the regparm decorator, so in functions p32x_sh2_read8/16/32, the arguments are passed via stack. The functions expect the arguments to be passed via regs, so this would fail... Unless we get lucky and gcc happens to store the values in the same regs, out of chance!

And this is indeed what happens, just download the latest nightly binary and objdump'ed it to find:

000722b8 <p32x_sh2_read8@@Base>:
   722b8:       56                      push   %esi
   722b9:       89 c1                   mov    %eax,%ecx
[...]
   722e3:       8d 34 1b                lea    (%ebx,%ebx,1),%esi
   722e6:       52                      push   %edx
   722e7:       50                      push   %eax
   722e8:       ff d6                   call   *%esi
   722ea:       83 c4 10                add    $0x10,%esp
   722ed:       83 c4 04                add    $0x4,%esp
   722f0:       5b                      pop    %ebx
   722f1:       5e                      pop    %esi
   722f2:       c3                      ret
   722f3:       90                      nop

The regs eax and edx are pushed to the stack as arguments, but the function will ignore them and use eax, edx as args, lucky!
In my machine, using gcc 11 instead of gcc 9 I'm not that lucky at all:

00070810 <p32x_sh2_read8>:
   70810:       56                      push   %esi
   70811:       89 d1                   mov    %edx,%ecx
[...]
   70840:       83 ec 08                sub    $0x8,%esp
   70843:       8d 34 1b                lea    (%ebx,%ebx,1),%esi
   70846:       51                      push   %ecx
   70847:       50                      push   %eax
   70848:       ff d6                   call   *%esi
   7084a:       83 c4 10                add    $0x10,%esp
   7084d:       83 c4 04                add    $0x4,%esp
   70850:       5b                      pop    %ebx
   70851:       5e                      pop    %esi
   70852:       c3                      ret
   70853:       90                      nop

As you can see eax is correct (that's why my stack trace shows a correct reference to SH2* and doesn't really crash the emulator) but the address is passed via ecx (well, via stack, but it is also allocated in ecx) so it just reads whatever garbage edx has and doesn't work.

But wait a sec David, this doesn't really matter since we call the memory handlers from the DRC code, which knows how to use the right calling convention! And yeah you are right, except there's one very important call from C side (well actually a couple more): in sh2_reset we read the PC value from the reset vector of the CPU, which in this case makes the initial PC be garbage, and fun things happen (it starts from a weird addr and, amazingly, in some games it manages to display something on screen!)

TLDR: fun bug, I though I'd document it cause it's worth an explanation on why it has worked all this time if it's so obviously broken.

Snatcher (Sega CD) freezes at various points in the game.

When playing Snatcher for the Sega CD, the game will freeze for extended periods of time at certain point in the game. It'll take up to five or so minutes for gameplay to resume.

Known instances of freezing occur at the following points in Act One (SPOILERS AHEAD):

  • Leaving the Turbocycle after arriving at the Abandoned Factory. Music plays and the background is animated, but the text doesn't load for several minutes.
  • Leaving the Turbocycle after arriving at Alton Plaza. The Background is animated, but music does not play and the text does not load.
  • Leaving the Nielsen's Apartment after disposing of the first Snatcher. Music plays and the background is animated, but the text doesn't load for several minutes.

In all of these instances, the game is essentially frozen until the text finally appears. This issue occurs with both BIN/CUE and .CHD file formats. The version of PicoDrive I am using is the most recent version for the FunKey S. In addition, this issue seems non-existent when loading the BIN/CUE files on the Raspberry Pi version.

Attached are savestates to let you recreate the first instance of the freezing.

  • Savestate 1 is right outside the Turbocycle after getting the call from Gibson. You have no choice but to enter the Turbocycle and proceed to the Abandoned Factory.
  • Savestate 2 is inside the Turbocycle after arriving at the Abandoned Factory. You have no choice but to exit the Turbocycle, and to that extent, trigger the freezing at the Abandoned Factory.

Snatcher SaveStates.zip

Time for a new release (1.98) ?

I can see a lot of great work and bugfixed has been done between latest 1.97 release and git HEAD, have you plan to make a 1.98 release soon ?

[PocketGo2 v2 / PicoDrive 1.96] Freezes in 32X games.

Hardware: PocketGo2 v2
O/S: Rogue FW 1.0.9 for PocketGo2 v2
Software: PicoDrive 1.96
ROM: Virtua Racing Deluxe (JAP) 32X version
ROM MD5: 08cae0a96d9ee07001c6e1c247d407c6

At any moment (during a race or in menu) the game may freeze. The emulator keeps working though.
Sometimes you can get a freeze every 10 minutes, sometimes not during 1 hour. Really random.
Sometimes the emulator crashes too but that's very rare. All the OPKs I tested have this issue. I did not get freezes on other 32X games but I play much more to this game than others.

See the attachment (savestates during the freeze):
virtua_racing_32x_freezes_savestates.zip

Corrupted graphics in Dragon Ball: Final Bout unlicenced pirate game

Hello. There exists an unlicenced Mega Drive game that works perfectly fine in Kega Fusion, Genesis Plus GX, possibly BlastEm, yet under Picodrive 1.98, character selection screen looks like this:

Przechwycenie obrazu ekranu_2021-04-06_13-49-23

Rest of the game seems to work OK, but I didn't test everything in depth.

Demons of Asteborg fails initializing sram, and save state doesn't work between boots

Hi,

a newly released game for sega genesis/mega drive called Demons of Asteborg has a few problems. md5sum:
8c78f0ccd4a9006546d9f16cf11c5029

  1. While it does boot, it fails to initialize sram.
  2. Using save states only works within the same run, if you exit the emulator and restart the game and load the state the game is somehow corrupt: it does load but sound is bugged and when trying to enter next screen you get either glitchy graphics or black screen.

Error compiling

Hi!

When I try to compile I got some errors in config.log:

mipsel-linux-gcc -I~/git/RG350_buildroot/output/host/usr/include -I~/git/RG350_buildroot/output/target/usr/include/SDL -D__RG350__ /tmp/picodrive-conf--1392-.c -o /tmp/picodrive-conf--1392- --sysroot ~/git/RG350_buildroot/output/host/usr/mipsel-gcw0-linux-uclibc/sysroot -L~/git/RG350_buildroot/output/host/usr/lib /root/git/RG350_buildroot/output/host/usr/lib/gcc/mipsel-gcw0-linux-uclibc/5.4.0/../../../../mipsel-gcw0-linux-uclibc/bin/ld: cannot find crt1.o: No such file or directory /root/git/RG350_buildroot/output/host/usr/lib/gcc/mipsel-gcw0-linux-uclibc/5.4.0/../../../../mipsel-gcw0-linux-uclibc/bin/ld: cannot find crti.o: No such file or directory collect2: error: ld returned 1 exit status

Here is the command:
CROSS_COMPILE=mipsel-linux- CFLAGS="-I~/git/RG350_buildroot/output/host/usr/include -I~/git/RG350_buildroot/output/target/usr/include/SDL" LDFLAGS="--sysroot ~/git/RG350_buildroot/output/host/usr/mipsel-gcw0-linux-uclibc/sysroot -L~/git/RG350_buildroot/output/host/usr/lib" ./configure --platform=rg350

Can you give some help?

Thanks!

Buttons don´t work on miyoo realease

Hi!!

I'm testing the Miyoo binary version. The emulator normally loads the game but only the dpad works no buttons work .

I'm testing it on PowKiddy Q90 of MiyooCFW 1.3.3

Thanks!

[Miyoo/Pocket Go] Glitchy graphics in Sonic Triple Trouble intro

I have no idea why does that happen in my self-compiled Miyoo build and not on my x86 PC binary, but still:

20211103142446_IMG_20211103_140940 - as you can see there are some weird blue discolorations around the trees and some blue pixels in random areas. Doesn't happen on x86_64 builds 🤔

Maybe some other platforms are affected? Maybe the result of ARM build settings?

[Miyoo/PocketGo] Screen flickers during 32X rendering

It's very hard to describe it for me atm, will try my best though:

During stuff like playing Doom, or SEGA logo/opening sequence of Knuckles Chaotix, the screen flickers to black every 1/60th of a second (at least I presume). It doesn't happen during 2D gameplay, though. It might be a matter of triple buffering iirc? (once a miyoo cfw dev mentioned it to me)

EDIT: it also happens on Doom's intermission screen 🤔

Deactivating sound filters on ARM devices has no effect

Deactivating sound filters on ARM devices has no effect. Indeed, setting "Sound filter = 0" in config2.cfg does not do anything, the sound is still muffled and lowered like it was with "Sound filter = 1". That works well on RG350P though.
Tested on a FunKey S by compiling all the last source code. The issue should happen on ARM devices like the GP2X Wiz as well (will test it later).

Steps to reproduce

  1. Set "Sound filter = 0" in /FunKey/.picodrive/config2.cfg with a FunKey S device
  2. Launch any game
  3. Notice that sound is still muffled and lowered compared to 1.93 version (which did not have the sound filters)

Workaround
The only way I found to restore full audio volume was to comment all LPFILT and DCFILT lines in "mix_arm.S" but this has too many side effects (sound is broken is 32X games like Tempo and saturated on Sega logo in Virtua Fighter for instance).

[YM2612] Ladder effect emulation

Separate issue for that. Regarding y.txt patch #47 (comment) - I don't know if it's the same thing that got pushed into gh repo (I got error that it does not apply), but once again - I don't hear any ladder effect (maaaaybe some barely audible distortion, but it can also be my headset).

dingoo a320 runs without sound

My English is not good, so I used a translation site. I happen to have dingoo a320 in my hand. The new version was adapted to the dingoo a320, so I downloaded it and tried it out. The previous version didn't work, and the version after the fix worked but had no sound, so I came to reflect on the situation.
Fix or not, thank you very much for still adapting the new version of the emulator for JZ4760.

[Genesis] 6 button pad is only detected after entering controls menu

Software: irixxxx's latest code compiled for armv7a7 (FunKey S) and OPKs for RG350 (1.94 to 1.99).
Platform: FunKey S/RG350P

6 button pad for Genesis is only detected after entering controls menu, even if it was already set for the input device. I first thought it was a bug specific to the FunKey port but then I compiled a raw one from irixxxx's repo (without the FK additions) and tried the RG350 OPK and noticed it.
See the attached video:
https://drive.google.com/file/d/1LEcb6vfaqD99kK3912FHRc4IxdB5DfQF/view?usp=sharing
In this video you can see that Street Fighter II' acts like with a 3 button pad (X button does not work and Start button switches kick and punch) until you get into the "Configure controls" menu, whereas 6 button setting was already set. Entering another menu does not do the trick but only the controls one.
Please note that the bug has occured since 1.93 version at least (tested all RG350 OPKs and 1.93 on the FK).
EDIT: 6 button pad works fine by default on 32X though (X-Men proto), the issue seems to be only for Genesis here.

Workaround:
Entering "Configure controls" menu fixes the issue for PD ports that can access it.

Steps to reproduce:

  1. Set 6 button pad in "Configure controls" menu (on FunKey S if you have one build with menu enabled or RG350 OPK)
  2. Exit PicoDrive
  3. Launch Street Fighter II' for Genesis
  4. Do not enter controls menu and launch a game
  5. Notice that you have only 3 button available (punch by default) and Start button allows to switch punch/kick
  6. Enter "Configure controls" in PD menu without changing anything
  7. Exit this menu
  8. 6 button pad is now detected and Start button pauses the game

Z80 sound crash in Overdrive 2 techdemo

I know it might be out of scope of this emulator to ask about it, since it's meant to be more fast than 100% accurate, but anyway:

Overdrive 2 demo, while working much better than before the fork, has one problem: towards the end part, sound crashes. It either flatlines or goes silent. The rest of demo plays normal, though.

I don't recall it acting this way before the fork, the sound was playing till the very end (my memories may fail me)

configure broken on armv7l since commit 107cdd508bdeb79763bd3890581cacbe7b0964dd

Platform: Raspberry Pi 4
OS: Arch Linux (armv7l)

Commit 107cdd5 introduced this change to configure:

 check_define()
 {
-  $CC -E -dD $CFLAGS pico/arm_features.h | grep -q $1 || return 1
+  $CC -E -dD $CFLAGS pico/arm_features.h | grep -q "define[    ]*$1" || return 1
   return 0
 }

With gcc 10.2.0 on arm7l under Arch Linux, this causes configure to fail with:

$ ./configure
compiler test failed, please check config.log

Note: I am not setting any additional CFLAGS.

The contents of config.log is:

gcc -mfpu=vfp -mfloat-abi=softfp /tmp/picodrive-conf-31220-21535-4076.c -o /tmp/picodrive-conf-31294-21535-8438
/usr/bin/ld: error: /tmp/picodrive-conf-31294-21535-8438 uses VFP register arguments, /tmp/ccltKYl1.o does not
/usr/bin/ld: failed to merge target specific data of file /tmp/ccltKYl1.o
collect2: error: ld returned 1 exit status

If I use:

CFLAGS="-mfpu=neon -mfloat-abi=hard" ./configure

as suggested by @irixxxx the configure works.

Here is some additional information:

$ gcc -E -dD pico/arm_features.h
# 1 "pico/arm_features.h"
# 1 "<built-in>"
#define __STDC__ 1
#define __STDC_VERSION__ 201710L
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1
#define __STDC_HOSTED__ 1
#define __GNUC__ 10
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 0
#define __VERSION__ "10.2.0"
#define __ATOMIC_RELAXED 0
#define __ATOMIC_SEQ_CST 5
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_RELEASE 3
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_CONSUME 1
#define __pic__ 2
#define __PIC__ 2
#define __pie__ 2
#define __PIE__ 2
#define __FINITE_MATH_ONLY__ 0
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG__ 4
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_LONG_DOUBLE__ 8
#define __SIZEOF_SIZE_T__ 4
#define __CHAR_BIT__ 8
#define __BIGGEST_ALIGNMENT__ 8
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_PDP_ENDIAN__ 3412
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
#define __SIZEOF_POINTER__ 4
#define __SIZE_TYPE__ unsigned int
#define __PTRDIFF_TYPE__ int
#define __WCHAR_TYPE__ unsigned int
#define __WINT_TYPE__ unsigned int
#define __INTMAX_TYPE__ long long int
#define __UINTMAX_TYPE__ long long unsigned int
#define __CHAR16_TYPE__ short unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __SIG_ATOMIC_TYPE__ int
#define __INT8_TYPE__ signed char
#define __INT16_TYPE__ short int
#define __INT32_TYPE__ int
#define __INT64_TYPE__ long long int
#define __UINT8_TYPE__ unsigned char
#define __UINT16_TYPE__ short unsigned int
#define __UINT32_TYPE__ unsigned int
#define __UINT64_TYPE__ long long unsigned int
#define __INT_LEAST8_TYPE__ signed char
#define __INT_LEAST16_TYPE__ short int
#define __INT_LEAST32_TYPE__ int
#define __INT_LEAST64_TYPE__ long long int
#define __UINT_LEAST8_TYPE__ unsigned char
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __UINT_LEAST32_TYPE__ unsigned int
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __INT_FAST8_TYPE__ signed char
#define __INT_FAST16_TYPE__ int
#define __INT_FAST32_TYPE__ int
#define __INT_FAST64_TYPE__ long long int
#define __UINT_FAST8_TYPE__ unsigned char
#define __UINT_FAST16_TYPE__ unsigned int
#define __UINT_FAST32_TYPE__ unsigned int
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __INTPTR_TYPE__ int
#define __UINTPTR_TYPE__ unsigned int
#define __GXX_ABI_VERSION 1014
#define __SCHAR_MAX__ 0x7f
#define __SHRT_MAX__ 0x7fff
#define __INT_MAX__ 0x7fffffff
#define __LONG_MAX__ 0x7fffffffL
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __WCHAR_MAX__ 0xffffffffU
#define __WCHAR_MIN__ 0U
#define __WINT_MAX__ 0xffffffffU
#define __WINT_MIN__ 0U
#define __PTRDIFF_MAX__ 0x7fffffff
#define __SIZE_MAX__ 0xffffffffU
#define __SCHAR_WIDTH__ 8
#define __SHRT_WIDTH__ 16
#define __INT_WIDTH__ 32
#define __LONG_WIDTH__ 32
#define __LONG_LONG_WIDTH__ 64
#define __WCHAR_WIDTH__ 32
#define __WINT_WIDTH__ 32
#define __PTRDIFF_WIDTH__ 32
#define __SIZE_WIDTH__ 32
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __INTMAX_C(c) c ## LL
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __UINTMAX_C(c) c ## ULL
#define __INTMAX_WIDTH__ 64
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __SIG_ATOMIC_WIDTH__ 32
#define __INT8_MAX__ 0x7f
#define __INT16_MAX__ 0x7fff
#define __INT32_MAX__ 0x7fffffff
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __UINT8_MAX__ 0xff
#define __UINT16_MAX__ 0xffff
#define __UINT32_MAX__ 0xffffffffU
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define __INT_LEAST8_MAX__ 0x7f
#define __INT8_C(c) c
#define __INT_LEAST8_WIDTH__ 8
#define __INT_LEAST16_MAX__ 0x7fff
#define __INT16_C(c) c
#define __INT_LEAST16_WIDTH__ 16
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __INT32_C(c) c
#define __INT_LEAST32_WIDTH__ 32
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __INT64_C(c) c ## LL
#define __INT_LEAST64_WIDTH__ 64
#define __UINT_LEAST8_MAX__ 0xff
#define __UINT8_C(c) c
#define __UINT_LEAST16_MAX__ 0xffff
#define __UINT16_C(c) c
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __UINT32_C(c) c ## U
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __UINT64_C(c) c ## ULL
#define __INT_FAST8_MAX__ 0x7f
#define __INT_FAST8_WIDTH__ 8
#define __INT_FAST16_MAX__ 0x7fffffff
#define __INT_FAST16_WIDTH__ 32
#define __INT_FAST32_MAX__ 0x7fffffff
#define __INT_FAST32_WIDTH__ 32
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __INT_FAST64_WIDTH__ 64
#define __UINT_FAST8_MAX__ 0xff
#define __UINT_FAST16_MAX__ 0xffffffffU
#define __UINT_FAST32_MAX__ 0xffffffffU
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __INTPTR_MAX__ 0x7fffffff
#define __INTPTR_WIDTH__ 32
#define __UINTPTR_MAX__ 0xffffffffU
#define __GCC_IEC_559 2
#define __GCC_IEC_559_COMPLEX 2
#define __FLT_EVAL_METHOD__ 0
#define __FLT_EVAL_METHOD_TS_18661_3__ 0
#define __DEC_EVAL_METHOD__ 2
#define __FLT_RADIX__ 2
#define __FLT_MANT_DIG__ 24
#define __FLT_DIG__ 6
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX_10_EXP__ 38
#define __FLT_DECIMAL_DIG__ 9
#define __FLT_MAX__ 3.4028234663852886e+38F
#define __FLT_NORM_MAX__ 3.4028234663852886e+38F
#define __FLT_MIN__ 1.1754943508222875e-38F
#define __FLT_EPSILON__ 1.1920928955078125e-7F
#define __FLT_DENORM_MIN__ 1.4012984643248171e-45F
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_DIG__ 15
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX_10_EXP__ 308
#define __DBL_DECIMAL_DIG__ 17
#define __DBL_MAX__ ((double)1.7976931348623157e+308L)
#define __DBL_NORM_MAX__ ((double)1.7976931348623157e+308L)
#define __DBL_MIN__ ((double)2.2250738585072014e-308L)
#define __DBL_EPSILON__ ((double)2.2204460492503131e-16L)
#define __DBL_DENORM_MIN__ ((double)4.9406564584124654e-324L)
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 53
#define __LDBL_DIG__ 15
#define __LDBL_MIN_EXP__ (-1021)
#define __LDBL_MIN_10_EXP__ (-307)
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX_10_EXP__ 308
#define __DECIMAL_DIG__ 17
#define __LDBL_DECIMAL_DIG__ 17
#define __LDBL_MAX__ 1.7976931348623157e+308L
#define __LDBL_NORM_MAX__ 1.7976931348623157e+308L
#define __LDBL_MIN__ 2.2250738585072014e-308L
#define __LDBL_EPSILON__ 2.2204460492503131e-16L
#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __FLT32_MANT_DIG__ 24
#define __FLT32_DIG__ 6
#define __FLT32_MIN_EXP__ (-125)
#define __FLT32_MIN_10_EXP__ (-37)
#define __FLT32_MAX_EXP__ 128
#define __FLT32_MAX_10_EXP__ 38
#define __FLT32_DECIMAL_DIG__ 9
#define __FLT32_MAX__ 3.4028234663852886e+38F32
#define __FLT32_NORM_MAX__ 3.4028234663852886e+38F32
#define __FLT32_MIN__ 1.1754943508222875e-38F32
#define __FLT32_EPSILON__ 1.1920928955078125e-7F32
#define __FLT32_DENORM_MIN__ 1.4012984643248171e-45F32
#define __FLT32_HAS_DENORM__ 1
#define __FLT32_HAS_INFINITY__ 1
#define __FLT32_HAS_QUIET_NAN__ 1
#define __FLT64_MANT_DIG__ 53
#define __FLT64_DIG__ 15
#define __FLT64_MIN_EXP__ (-1021)
#define __FLT64_MIN_10_EXP__ (-307)
#define __FLT64_MAX_EXP__ 1024
#define __FLT64_MAX_10_EXP__ 308
#define __FLT64_DECIMAL_DIG__ 17
#define __FLT64_MAX__ 1.7976931348623157e+308F64
#define __FLT64_NORM_MAX__ 1.7976931348623157e+308F64
#define __FLT64_MIN__ 2.2250738585072014e-308F64
#define __FLT64_EPSILON__ 2.2204460492503131e-16F64
#define __FLT64_DENORM_MIN__ 4.9406564584124654e-324F64
#define __FLT64_HAS_DENORM__ 1
#define __FLT64_HAS_INFINITY__ 1
#define __FLT64_HAS_QUIET_NAN__ 1
#define __FLT32X_MANT_DIG__ 53
#define __FLT32X_DIG__ 15
#define __FLT32X_MIN_EXP__ (-1021)
#define __FLT32X_MIN_10_EXP__ (-307)
#define __FLT32X_MAX_EXP__ 1024
#define __FLT32X_MAX_10_EXP__ 308
#define __FLT32X_DECIMAL_DIG__ 17
#define __FLT32X_MAX__ 1.7976931348623157e+308F32x
#define __FLT32X_NORM_MAX__ 1.7976931348623157e+308F32x
#define __FLT32X_MIN__ 2.2250738585072014e-308F32x
#define __FLT32X_EPSILON__ 2.2204460492503131e-16F32x
#define __FLT32X_DENORM_MIN__ 4.9406564584124654e-324F32x
#define __FLT32X_HAS_DENORM__ 1
#define __FLT32X_HAS_INFINITY__ 1
#define __FLT32X_HAS_QUIET_NAN__ 1
#define __SFRACT_FBIT__ 7
#define __SFRACT_IBIT__ 0
#define __SFRACT_MIN__ (-0.5HR-0.5HR)
#define __SFRACT_MAX__ 0X7FP-7HR
#define __SFRACT_EPSILON__ 0x1P-7HR
#define __USFRACT_FBIT__ 8
#define __USFRACT_IBIT__ 0
#define __USFRACT_MIN__ 0.0UHR
#define __USFRACT_MAX__ 0XFFP-8UHR
#define __USFRACT_EPSILON__ 0x1P-8UHR
#define __FRACT_FBIT__ 15
#define __FRACT_IBIT__ 0
#define __FRACT_MIN__ (-0.5R-0.5R)
#define __FRACT_MAX__ 0X7FFFP-15R
#define __FRACT_EPSILON__ 0x1P-15R
#define __UFRACT_FBIT__ 16
#define __UFRACT_IBIT__ 0
#define __UFRACT_MIN__ 0.0UR
#define __UFRACT_MAX__ 0XFFFFP-16UR
#define __UFRACT_EPSILON__ 0x1P-16UR
#define __LFRACT_FBIT__ 31
#define __LFRACT_IBIT__ 0
#define __LFRACT_MIN__ (-0.5LR-0.5LR)
#define __LFRACT_MAX__ 0X7FFFFFFFP-31LR
#define __LFRACT_EPSILON__ 0x1P-31LR
#define __ULFRACT_FBIT__ 32
#define __ULFRACT_IBIT__ 0
#define __ULFRACT_MIN__ 0.0ULR
#define __ULFRACT_MAX__ 0XFFFFFFFFP-32ULR
#define __ULFRACT_EPSILON__ 0x1P-32ULR
#define __LLFRACT_FBIT__ 63
#define __LLFRACT_IBIT__ 0
#define __LLFRACT_MIN__ (-0.5LLR-0.5LLR)
#define __LLFRACT_MAX__ 0X7FFFFFFFFFFFFFFFP-63LLR
#define __LLFRACT_EPSILON__ 0x1P-63LLR
#define __ULLFRACT_FBIT__ 64
#define __ULLFRACT_IBIT__ 0
#define __ULLFRACT_MIN__ 0.0ULLR
#define __ULLFRACT_MAX__ 0XFFFFFFFFFFFFFFFFP-64ULLR
#define __ULLFRACT_EPSILON__ 0x1P-64ULLR
#define __SACCUM_FBIT__ 7
#define __SACCUM_IBIT__ 8
#define __SACCUM_MIN__ (-0X1P7HK-0X1P7HK)
#define __SACCUM_MAX__ 0X7FFFP-7HK
#define __SACCUM_EPSILON__ 0x1P-7HK
#define __USACCUM_FBIT__ 8
#define __USACCUM_IBIT__ 8
#define __USACCUM_MIN__ 0.0UHK
#define __USACCUM_MAX__ 0XFFFFP-8UHK
#define __USACCUM_EPSILON__ 0x1P-8UHK
#define __ACCUM_FBIT__ 15
#define __ACCUM_IBIT__ 16
#define __ACCUM_MIN__ (-0X1P15K-0X1P15K)
#define __ACCUM_MAX__ 0X7FFFFFFFP-15K
#define __ACCUM_EPSILON__ 0x1P-15K
#define __UACCUM_FBIT__ 16
#define __UACCUM_IBIT__ 16
#define __UACCUM_MIN__ 0.0UK
#define __UACCUM_MAX__ 0XFFFFFFFFP-16UK
#define __UACCUM_EPSILON__ 0x1P-16UK
#define __LACCUM_FBIT__ 31
#define __LACCUM_IBIT__ 32
#define __LACCUM_MIN__ (-0X1P31LK-0X1P31LK)
#define __LACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-31LK
#define __LACCUM_EPSILON__ 0x1P-31LK
#define __ULACCUM_FBIT__ 32
#define __ULACCUM_IBIT__ 32
#define __ULACCUM_MIN__ 0.0ULK
#define __ULACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-32ULK
#define __ULACCUM_EPSILON__ 0x1P-32ULK
#define __LLACCUM_FBIT__ 31
#define __LLACCUM_IBIT__ 32
#define __LLACCUM_MIN__ (-0X1P31LLK-0X1P31LLK)
#define __LLACCUM_MAX__ 0X7FFFFFFFFFFFFFFFP-31LLK
#define __LLACCUM_EPSILON__ 0x1P-31LLK
#define __ULLACCUM_FBIT__ 32
#define __ULLACCUM_IBIT__ 32
#define __ULLACCUM_MIN__ 0.0ULLK
#define __ULLACCUM_MAX__ 0XFFFFFFFFFFFFFFFFP-32ULLK
#define __ULLACCUM_EPSILON__ 0x1P-32ULLK
#define __QQ_FBIT__ 7
#define __QQ_IBIT__ 0
#define __HQ_FBIT__ 15
#define __HQ_IBIT__ 0
#define __SQ_FBIT__ 31
#define __SQ_IBIT__ 0
#define __DQ_FBIT__ 63
#define __DQ_IBIT__ 0
#define __TQ_FBIT__ 127
#define __TQ_IBIT__ 0
#define __UQQ_FBIT__ 8
#define __UQQ_IBIT__ 0
#define __UHQ_FBIT__ 16
#define __UHQ_IBIT__ 0
#define __USQ_FBIT__ 32
#define __USQ_IBIT__ 0
#define __UDQ_FBIT__ 64
#define __UDQ_IBIT__ 0
#define __UTQ_FBIT__ 128
#define __UTQ_IBIT__ 0
#define __HA_FBIT__ 7
#define __HA_IBIT__ 8
#define __SA_FBIT__ 15
#define __SA_IBIT__ 16
#define __DA_FBIT__ 31
#define __DA_IBIT__ 32
#define __TA_FBIT__ 63
#define __TA_IBIT__ 64
#define __UHA_FBIT__ 8
#define __UHA_IBIT__ 8
#define __USA_FBIT__ 16
#define __USA_IBIT__ 16
#define __UDA_FBIT__ 32
#define __UDA_IBIT__ 32
#define __UTA_FBIT__ 64
#define __UTA_IBIT__ 64
#define __REGISTER_PREFIX__
#define __USER_LABEL_PREFIX__
#define __GNUC_STDC_INLINE__ 1
#define __NO_INLINE__ 1
#define __CHAR_UNSIGNED__ 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __HAVE_SPECULATION_SAFE_VALUE 1
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __SSP_STRONG__ 3
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __ARM_FEATURE_DSP 1
#define __ARM_FEATURE_QBIT 1
#define __ARM_FEATURE_SAT 1
#undef __ARM_FEATURE_CRYPTO
# 1 "<built-in>"
#define __ARM_FEATURE_UNALIGNED 1
#undef __ARM_FEATURE_QRDMX
# 1 "<built-in>"
#undef __ARM_FEATURE_CRC32
# 1 "<built-in>"
#undef __ARM_FEATURE_DOTPROD
# 1 "<built-in>"
#undef __ARM_FEATURE_COMPLEX
# 1 "<built-in>"
#define __ARM_32BIT_STATE 1
#undef __ARM_FEATURE_MVE
# 1 "<built-in>"
#undef __ARM_FEATURE_CMSE
# 1 "<built-in>"
#undef __ARM_FEATURE_LDREX
# 1 "<built-in>"
#define __ARM_FEATURE_LDREX 15
#define __ARM_FEATURE_CLZ 1
#undef __ARM_FEATURE_NUMERIC_MAXMIN
# 1 "<built-in>"
#define __ARM_FEATURE_SIMD32 1
#define __ARM_SIZEOF_MINIMAL_ENUM 4
#define __ARM_SIZEOF_WCHAR_T 4
#undef __ARM_ARCH_PROFILE
# 1 "<built-in>"
#define __ARM_ARCH_PROFILE 65
#define __arm__ 1
#undef __ARM_ARCH
# 1 "<built-in>"
#define __ARM_ARCH 7
#define __ARM_ARCH_ISA_ARM 1
#define __APCS_32__ 1
#define __GCC_ASM_FLAG_OUTPUTS__ 1
#undef __thumb__
# 1 "<built-in>"
#undef __thumb2__
# 1 "<built-in>"
#undef __THUMBEL__
# 1 "<built-in>"
#undef __ARM_ARCH_ISA_THUMB
# 1 "<built-in>"
#define __ARM_ARCH_ISA_THUMB 2
#define __ARMEL__ 1
#define __VFP_FP__ 1
#undef __ARM_FP
# 1 "<built-in>"
#define __ARM_FP 12
#undef __ARM_FP16_FORMAT_IEEE
# 1 "<built-in>"
#undef __ARM_FP16_FORMAT_ALTERNATIVE
# 1 "<built-in>"
#undef __ARM_FP16_ARGS
# 1 "<built-in>"
#undef __ARM_FEATURE_FP16_SCALAR_ARITHMETIC
# 1 "<built-in>"
#undef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
# 1 "<built-in>"
#undef __ARM_FEATURE_FP16_FML
# 1 "<built-in>"
#undef __ARM_FEATURE_FMA
# 1 "<built-in>"
#undef __ARM_NEON__
# 1 "<built-in>"
#undef __ARM_NEON
# 1 "<built-in>"
#undef __ARM_NEON_FP
# 1 "<built-in>"
#define __THUMB_INTERWORK__ 1
#define __ARM_ARCH_7A__ 1
#define __ARM_PCS_VFP 1
#define __ARM_EABI__ 1
#undef __FDPIC__
# 1 "<built-in>"
#undef __ARM_ARCH_EXT_IDIV__
# 1 "<built-in>"
#undef __ARM_FEATURE_IDIV
# 1 "<built-in>"
#undef __ARM_ASM_SYNTAX_UNIFIED__
# 1 "<built-in>"
#undef __ARM_FEATURE_COPROC
# 1 "<built-in>"
#define __ARM_FEATURE_COPROC 15
#undef __ARM_FEATURE_CDE
# 1 "<built-in>"
#undef __ARM_FEATURE_CDE_COPROC
# 1 "<built-in>"
#undef __ARM_FEATURE_MATMUL_INT8
# 1 "<built-in>"
#undef __ARM_FEATURE_BF16_SCALAR_ARITHMETIC
# 1 "<built-in>"
#undef __ARM_FEATURE_BF16_VECTOR_ARITHMETIC
# 1 "<built-in>"
#undef __ARM_BF16_FORMAT_ALTERNATIVE
# 1 "<built-in>"
#define __GXX_TYPEINFO_EQUALITY_INLINE 0
#define __gnu_linux__ 1
#define __linux 1
#define __linux__ 1
#define linux 1
#define __unix 1
#define __unix__ 1
#define unix 1
#define __ELF__ 1
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 19 "/usr/include/stdc-predef.h" 3 4
#define _STDC_PREDEF_H 1
# 38 "/usr/include/stdc-predef.h" 3 4
#define __STDC_IEC_559__ 1







#define __STDC_IEC_559_COMPLEX__ 1
# 58 "/usr/include/stdc-predef.h" 3 4
#define __STDC_ISO_10646__ 201706L
# 32 "<command-line>" 2
# 1 "pico/arm_features.h"

#define __ARM_FEATURES_H__





#define HAVE_ARMV7
#define HAVE_ARMV6
#define HAVE_ARMV5
# 30 "pico/arm_features.h"
#define ESYM(name) name

#define FUNCTION(name) .globl name; .type name, %function; name




#define EXTRA_UNSAVED_REGS
# 54 "pico/arm_features.h"
#define PIC_XB(c,r,s) add ##c pc, r, s
#define PIC_BT(a) b a
# 64 "pico/arm_features.h"
#define PIC_LDR_INIT() .macro pic_ldr r t a; ldr \r, [pc, $.LD\@-.-8]; ldr \t, [pc, $.LD\@-.-4]; .LP\@:add \r, pc; ldr \r, [\r, \t]; add pc, $4; .LD\@:.word _GLOBAL_OFFSET_TABLE_-.LP\@-8; .word \a(GOT); .endm;
# 74 "pico/arm_features.h"
#define PIC_LDR(r,t,a) pic_ldr r, t, a

State not fully restored when loading a savestate before the complete game init

Software: irixxxx's latest code compiled for armv7a7: 1.99-funkey-S
Platform: FunKey S

After loading a rom, the user can load a savestate before the game init is complete if they open the menu as soon as they can. Then the game seems to behave fine until you try to reach another stage or sequence through your game, then it displays a black screen and it does not progress any further.
Note that it makes sense as only the savestate content (so the current stage) has been loaded while the whole game init has not been done so the next stage cannot be loaded.
If the user waits for the Sega logo after rom loading then there will be no problem after loading the savestate.
That's maybe not a major issue as waiting for the Sega logo is an easy workaround, but maybe the user should not be allowed to open the menu before the game init is done.
Please note that this bug occurs both on the FunKey S (with its own FunKey menu) and on RG350P too (PD menu) but not on old 1.93 for the FK: I couldn't reproduce it but it seems that we cannot call the menu as fast as with 1.99, that may be the reason, not sure.

EDIT: The bug first appeared in PicoDrive 1.96 (May 16th 2020) and is not present in 1.95 (November 19th 2019).

Attachments:

Workaround:
Wait for the Sega logo to appear then load your savestate.

Steps to reproduce:

  1. Select a rom in GMenu2X file selector (you can try Streets of Rage with the attached savestate above)
  2. As soon as you have the black screen, open PD menu
  3. Load a savestate
  4. Play until you complete your current stage
  5. You should be stuck on a black screen

[GKD350H/GKDMINI]v31 system can't run picodrive

The following content is translated from the translation website.
After some testing, we found that various versions of 1.99, 1.98 and 1.97 including the OD version cannot be run on v31 systems and will flash directly, but the 1.97 version compiled by gameblabla (https://gitlab.com/gameblabla/gameblabla-releases/-/blob/master/opk/350h/PicoDrive_350h.opk) can run, only the v30 version of the system can run the 1.99 version of the OD version of picodrive.
1
By the way, a small suggestion, gkdmini and gkd350h have some hardware differences, no joystick, increased L2R2 button, so gkdmini can have a dedicated version to hide the joystick-related settings options.
PS: A320 can still perfectly run the 1.99 version of picodrive, very good.

No sound on Dingoo a320's opendingux

Irixxxx,

I managed to run Picodrive 1.98 (PicoDrive-dge_1.98.zip) on OpenDingux from Dingoo A320. But it's completely muted.

Version 1.91 works normally

[GG][DrZ80] Crash during the intro of GG Shinobi

Software: irixxxx's latest code compiled (f8dba3f) for armv7a7 (FunKey S).
Platform: FunKey S
ROM: GG Shinobi for Game Gear. ROM MD5: 8fa7438dec1403f2e9d7b1ca60b29f1a.

A crash occurs with GG Shinobi on arm device with DrZ80 asm core (does not happen with CZ80). Nothing is written into the logs unfortunately. Happens on 1.99 tag as well, so not a very recent regression here.

Workaround:
Skip the intro by pressing Start button.

Steps to reproduce:

  1. Compile a binary for arm with Drz80 enabled or use this OPK on the FunKey S:
    picodrive_v1.99_45418cd_funkey-s.zip
  2. Launch GG Shinobi game (MD5 indicated above)
  3. Watch the intro
  4. Notice that it crashes very quickly
  5. Now try this OPK (DrZ80 disabled/CZ80 enabled):
    picodrive_v1.99_45418cd_funkey-s.zip
  6. Notice that the bug does not occur.

[PocketGo2 v2 / PicoDrive 1.96] Layer priority issue in Mickey Mouse - Castle Of Illusion on Genesis

Hardware: PocketGo2 v2
O/S: Rogue FW 1.0.9 for PocketGo2 v2
Software: PicoDrive 1.96
ROM: Mickey Mouse - Castle of Illusion (USA) Genesis version
ROM MD5: 24863151abd5baf28c9386d49ffe3c09

For instance, in 4th stage in 'candy land' sequence or against last boss, I noticed some issues with layer priority.

See the attachments (screenshots and savestates). Note that this issue does not occur with the fast 1.95 OPK I use.

Mickey.Mouse.-.Castle.of.Illusion.U.zip

[Genesis][ToeJam & Earl] Video hang when leaving the attract mode play a long time

Software: irixxxx's latest code compiled for armv7a7 (FunKey S) and OPKs for RG350 (1.96 to 1.99).
Platform: FunKey S/RG350P
ROM: ToeJam & Earl for Genesis (1st release only as the issue does not occur with Rev A of the game). ROM MD5 must be 0a6af20d9c5b3ec4e23c683f083b92cd to reproduce the bug.

A video hang occurs after about 2h of attract mode when playing the 1st release of the game (not Rev A). Sound continues playing though and the emulator menu can still be called. It can be easily achieved by enabling "Disable frame limiter" and setting FS to the max (16). Please note that this bug appeared in PD 1.96 (still on 1.99 so) and did not happen on 1.94 and 1.95.
Please note that this bug does not occur with other emulators like GX+ or Regen.

Workaround:
Use Rev A ROM instead where the bug does not occur.

Steps to reproduce

  1. Launch ToeJam & Earl with PD > 1.95 on the FunKey S or RG350
  2. Set "Disable frame limiter" to "ON" and set FS to "16"
  3. Leave the console play the attract mode for about 5 minutes
  4. You should notice the video freeze while the sound is still playing

[MCD] Lack of FM SFX in Sonic CD 0.02 proto build

This issue is very specific, down to just one version of one game (but still, it can be present in other titles or builds of Sonic CD). While the CD-DA tracks are playing fine, sound effects like jumping etc. are silent, when they shouldn't be. Unless I'm mistaken, the game uses FM synth for sound effects. What's weirder, final build of Sonic CD works perfectly, with all audio intact.

It's not a big deal personally, just wondering what's causing this behaviour.

Screen scaling on RG350M

The latest version PicoDrive-opendingux_1.98.opk doesn´t work well on my RG350M, the output is not scaled at all. It shows a small window in the middle of the screen. There is no option to scale the output to fullscreen.

Sega CD save states not properly restored

Software: PicoDrive version 1.99, compiled for MiyooCFW
Hardware: PowKiddy V90

In SEGA CD games, save states don't seem to work properly. Saving a state always succeeds, but loading a previously saved state fails in multiple ways. Some examples:

  • In The Terminator, loading a save state whilst in the same game session works perfectly. However, if you restart the emulator and therefore start a new game session, loading the save state does not work properly. The music plays, but the screen is frozen and no input works.
  • In the Lunar games, loading a save state also doesn't work within the same game session. Whenever a new area needs to load, a black screen is displayed and it does not progress any further. Other glitches occur as well: after loading the state, the music plays in a short loop instead of the entire track playing.

I have not found a workaround yet, hope there is one to be found.

Summary of Changes Post-Fork

I am posting this issue to suggest creating some sort of change log between the original PicoDrive and this fork. It seems the original is not very active, but much work has been done here. It would make it easier for the casual observer to know exactly what has changed, by having it all in one easy to read place instead of looking through the commit history.

Great work by the way, and I look forward to seeing continuous improvements.

[Miyoo/PocketGo] Gamepad input doesn't work

I don't know if it's the problem with device itself, OS it runs on, but anyway:

I tried to build Picodrive for Miyoo devices, the cheap handhelds running on ARM Allwinner F1C100s working with some kind of Linux OS. The version of emulator included in CFW was 1.93, no not good enough. Using the toolchain made for these devices, I managed to build it. Works really well, one problem:
the input doesn't work. Only dpad is functioning, but everything else, including the menu buttion is dead, so the only way out is the hard reset of the device.
Tried to run it via built-in terminal emulator:
input: new device #0 "sdl:keys"
input: async-only deviced detected
drv probed binds name
0 0 y y sdl:keys
buch of errors about font.png, selector.png, background.png
config_readsect: unhandled var: SRAM/BRAM saves or gzip savestates or status line in main menu aaand
input: bad key" 'R1' for device 'sdl:keys' the same repeated twice and for L1 and Start

[ARM 32 bit] [MD/GEN] Mortal Kombat Arcade Edition Rom Hack Crash after Title Screen

Mortal Kombat Arcade Edition Rom hack for the MegaDrive/Genesis was recently released:
http://www.romhacking.net/hacks/6446/
Using PicoDrive, the game crashes after the title screen, however using SDL Retro OPK with the "Genesis Plus GX" core, this rom hack works fine. Rom hack also works on real hardware using a cheap EverDrive clone flash cart.

Would it be possible to fix?

Below is the gmenu2x log file:

Turning audio amplifier ON
Applied keymap rom command: "keymap rom '/mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).bin'"
Quick_save_file: /mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).quicksave
warning: video overlay is not hardware accelerated, not going to use it.
cfg_file_rom: /mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).fkcfg
cfg_file_default: /mnt/Roms/Sega/MD/default_config.fkcfg
Loading configuration from '/mnt/Roms/Sega/MD/default_config.fkcfg'
Reading option: 'aspect_ratio', value: 'STRETCHED'
Reading option: 'aspect_ratio_factor_percent', value: '50'
Loading configuration from '/mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).fkcfg'
Reading option: 'aspect_ratio', value: 'STRETCHED'
Reading option: 'aspect_ratio_factor_percent', value: '50'
plat_sdl: using 320x240 as fullscreen resolution
Creating plat_sdl_screen surface: w=320, h=240
Creating plat_sdl_screen surface: g_menuscreen_w=320, g_menuscreen_h=240
plat_sdl: overlay: fmt 59565955, planes: 1, pitch: 640, hw: 0
Creating plat_sdl_screen surface: w=320, h=240
config_readsect: unhandled val for "Show FPS": "1]"
config_readsect: can't parse: ]
input: missing driver for 'sdl:keys]'
input: can't handle dev: sdl:keys]
config_readsect: can't parse: ]
config_readsect: loaded from /mnt/FunKey/.picodrive/config2.cfgwarning: failed to do hugetlb mmap (0x2000000, 4194308): 22

using sdl audio output driver
platform/libpicofe/readpng.c: failed to open: /usr/games/skin/font.png
platform/libpicofe/readpng.c: failed to open: /usr/games/skin/selector.png
emu_ReloadRom(/mnt/Roms/Sega/MD/Mortal Kombat - Arcade Edition (Rom Hack).bin)
config_readsect: unhandled val for "Show FPS": "1]"
config_readsect: can't parse: ]
input: missing driver for 'sdl:keys]'
input: can't handle dev: sdl:keys]
config_readsect: can't parse: ]
config_readsect: loaded from /mnt/FunKey/.picodrive/config2.cfg
config_readsect: unhandled val for "Show FPS": "1]"
config_readsect: can't parse: ]
input: missing driver for 'sdl:keys]'
input: can't handle dev: sdl:keys]
config_readsect: can't parse: ]
config_readsect: loaded from /mnt/FunKey/.picodrive/config2.cfg
00000:000: couldn't open carthw.cfg!
00000:000: sram: 200000 - 203fff; eeprom: 0

System Announce: Genesis, NTSC / 60FPS
PicoIn.AHW = 0, Pico.m.hardware=160
input: new device #0 "sdl:keys"
input: async-only devices detected..
.# drv probed binds name
0 0 y

[Miyoo/PocketGo] Incorrect SSG-EG sound

just like #43 - no idea why, x86 PC build works fine.
eg.zip - zip package with test ROM and recordings. wrongeg.mp3 is a recording from my Powkiddy V90 (sorry for not so good quality) and propereg.mp3 is from x86 build of Picodrive that is almost the same as MAME emulation - intended timbre that pretty much matches the original MD hardware. The difference is apparent. SSG emulation is enabled on Miyoo side, build with proper flags and CZ80 usage, no idea what makes these two differ.

Trying to a build classic_armv8_a35 libretro core

Hi Irixxxx,

I am trying to build a slightly modified target of classic_armv8_a35 in Makefile.libretro. Only thing I have changed are some flags that my compiler didn't like, namely: -marm -mfpu=neon-fp-armv8 -mfloat-abi=hard. I get errors when linking the library, example:

pico/memory.c:168:1: note: type 'u32' should match type 'uint16_t'
pico/memory.c:168:1: note: 'm68k_read16' was previously declared here
pico/memory.c:168:1: note: code may be misoptimized unless -fno-strict-aliasing is used
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o: in function `MAC_L':
<artificial>:(.text+0x740): undefined reference to `p32x_sh2_read32'
/usr/bin/ld: <artificial>:(.text+0x77c): undefined reference to `p32x_sh2_read32'
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o: in function `MAC_W':
<artificial>:(.text+0x8f8): undefined reference to `p32x_sh2_read16'
/usr/bin/ld: <artificial>:(.text+0x934): undefined reference to `p32x_sh2_read16'
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o: in function `scan_block':
<artificial>:(.text+0x3f64): undefined reference to `p32x_sh2_get_mem_ptr'
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o: in function `sh2_drc_mem_setup':
<artificial>:(.text+0x5848): undefined reference to `Pico32xMem'
/usr/bin/ld: <artificial>:(.text+0x5850): undefined reference to `Pico32xMem'
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o: in function `sh2_drc_flush_all':
<artificial>:(.text+0x58c8): undefined reference to `Pico32xMem'
/usr/bin/ld: <artificial>:(.text+0x58d8): undefined reference to `Pico32xMem'
/usr/bin/ld: <artificial>:(.text+0x5a10): undefined reference to `Pico32xMem'
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o:<artificial>:(.text+0x5b3c): more undefined references to `Pico32xMem' follow
/usr/bin/ld: /tmp/ccL31RkD.ltrans0.ltrans.o: in function `ILLEGAL':

The list goes on, but all seems related to 32x. Any idea what is wrong, or what I am doing wrong?
I am using a debian based arm64 qemu chroot, installed according to these instructions:
https://github.com/christianhaitian/arkos/wiki/Building#to-create-debian-based-chroots-in-a-linux-environment

EDIT: Full log is here: https://pastebin.com/HCvyuGJD

Minor RetroFW QOL Changes

Hello,
The current release is running great on my LDK running RetroFW. There are a couple things that would make it better, though.

  • The file filter is missing .chd support, so Sega CD games in .chd format won't appear by default in gmenu.
  • The default Section is set to "games", which causes it to appear alongside native games ported to the system in gmenu. It would be easier to find if it was set to "emulators", which would place it with the other emulators.

Both changes can be easily made by the user if they know how, so this is far from being a critical issue. Thanks for the release!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.