+stephena Posted July 1, 2019 Author Share Posted July 1, 2019 I will leave it to the libretro guys that ported Stella to that platform to decide whether they want to use Stella's internal TV effects (as they currently do), or use their own. AFAIC, my main task is to make sure that the emulation core and related stuff can be interfaced on their end, and that changes on our end don't break on theirs. Beyond that, I honestly don't think I'll have the time to learn how libretro works in detail, and maintain a separate port. The reason I can maintain Linux/macOS/Windows/R77/etc myself is because it's all basically the same app. RetroArch changes this significantly, so I'll have to lean on their developers to extend for that platform (once we get the basics working, of course). 2 Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 1, 2019 Share Posted July 1, 2019 No problem it makes perfectly good sense. The only reason I brought up the weird display is because to me ( as someone who has worked with emulator ports to the xbox ) that the pitch value was off when copying over to the destination systems video buffer. And I was hoping to get input from you regarding that. But I'll report the issue to them for them to figure out. Libretro has a lot of options that have the potential to interact in all kinds of crazy ways. The threaded video has got to be one of the stranger things I've seen. That being said. I was able to go into the libretro options and "disable" Bilinear filtering. So things are ALMOST functioning the way they should AND I'm getting 60fps. So I'm a happy camper for now. It's really great to see how good these DPC games are. I've put off checking them out for a few years now. Quote Link to comment Share on other sites More sharing options...
+stephena Posted July 1, 2019 Author Share Posted July 1, 2019 Yep, should have mentioned right off the bat that it looks like a pitch mismatch. However, I still don't see how multi-threading could be influencing that. Best to run it by the libretro people, as you say. Quote Link to comment Share on other sites More sharing options...
+stephena Posted July 4, 2019 Author Share Posted July 4, 2019 On 6/29/2019 at 11:01 AM, Shannon said: Hi there again.. Here is a screeny of what the libretro version that someone compiled for me looks like with the TV effects turned off. Turning a TV effect on corrects the image. Unfortunately though the resources used by TV effect's slows down the frame rate on DPC based games. My question for now is would this be considered a libretro issue? Or a Stella Core issue? Reading previous posts it sounds like the former. In which case I would post a bug report over with the libretro guys? Thanks. I believe this is now fixed in Github. Please try a new build and see if it works for you. Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 4, 2019 Share Posted July 4, 2019 Oh wow... thanks for taking the time to mess with it although it is a retrolib. Happy 4th.. It may be a while but I'll ask them to compile. Quote Link to comment Share on other sites More sharing options...
+stephena Posted July 5, 2019 Author Share Posted July 5, 2019 Actually, the patch was submitted from a libretro user, so I can't take credit. That's also why I'd like you to test it, since I can't myself (not seeing the issue on my system). Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 5, 2019 Share Posted July 5, 2019 Hi sorry. Tried it this AM and no luck. The screen is still screwy if threaded video processing is turned off. In fact it looks worse than from the previous ( botttom half of screen does not even show like in my previously shown screenshot ). Quote Link to comment Share on other sites More sharing options...
israelg Posted July 5, 2019 Share Posted July 5, 2019 1 hour ago, Shannon said: Hi sorry. Tried it this AM and no luck. The screen is still screwy if threaded video processing is turned off. In fact it looks worse than from the previous ( botttom half of screen does not even show like in my previously shown screenshot ). The same also on the latest Android core... Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 10, 2019 Share Posted July 10, 2019 That pitch error bug looks a lot like one previously in snes9x libretro (android). Solution was to create 4-byte aligned frontend buffer. https://github.com/snes9xgit/snes9x/blob/52f521160a3fed88dcbf8050e41b3c4078fb04d4/libretro/libretro.cpp Stella is doing that here. https://github.com/stella-emu/stella/blob/master/src/libretro/libretro.cxx#L453 But the pitch needs to have the same value here. https://github.com/stella-emu/stella/blob/master/src/libretro/libretro.cxx#L622 Which looks like it doesn't match. https://github.com/stella-emu/stella/blob/master/src/libretro/StellaLIBRETRO.hxx#L84 If you fix above value, this might be a problem also; it's using a fixed-size framebuffer of 565x320. https://github.com/stella-emu/stella/blob/master/src/libretro/FrameBufferLIBRETRO.cxx#L50 So I guess you'll have to manually expand the 565 to 568 every frame? Then send that copy to frontend? https://github.com/stella-emu/stella/blob/master/src/libretro/StellaLIBRETRO.cxx#L304 Wonder how slow that'd be. Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 11, 2019 Share Posted July 11, 2019 (edited) Could someone try this commit on Android and PSP? https://github.com/snes2600/stella/tree/libretro Turns out, it wasn't much work and the speed hit is tiny for most machines. I suppose slower machines like Atoms could lose maybe 1.5 fps though. edit: Found an appveyor script for Android. Test builds will show here soon: https://ci.appveyor.com/project/snes2600/stella/builds/25894283/artifacts Edited July 11, 2019 by snes2600 appveyor script Quote Link to comment Share on other sites More sharing options...
+stephena Posted July 11, 2019 Author Share Posted July 11, 2019 Thanks for the followup on this libretro stuff; I will try to get it integrated soon. And now for something completely different: a shameless plug. There is a Stella fundraiser (dubbed 'Stella-thon') happening tomorrow, July 12. Info is available at Please consider a donation or making a bid on an item. 3 Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 11, 2019 Share Posted July 11, 2019 Nice! I hit up my PSC source compiling dude.. with any luck I'll know if it works for the PSC soon. Checking out stella-thon thread. Quote Link to comment Share on other sites More sharing options...
+stephena Posted July 11, 2019 Author Share Posted July 11, 2019 If that's all the problem is (width needs to be 32-bit aligned), then we can probably do that in Stella directly, at a lower level, and have it 'just work' for libretro. Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 17, 2019 Share Posted July 17, 2019 (edited) I want to say yes (32-bit aligned) but was waiting for any testers to confirm. Found out that the Android test builds could not work because the file names must match the buildbot ones. They are rebuilt with correct names. Any Android testers to verify pitch bug? https://ci.appveyor.com/project/snes2600/stella/builds/26044389/artifacts Edited July 17, 2019 by snes2600 Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 22, 2019 Share Posted July 22, 2019 Well assuming this contains the latest build for the PSC.. http://buildbot.libretro.com/nightly/linux/armv7-neon-hf/latest/ I tried it and no go. It still has issue with the screen display being wrong unless I either enable threaded video or one of the TV effects. Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 22, 2019 Share Posted July 22, 2019 Libretro buildbot does not have the full 32-bit alignment pitch fix. I haven't found anyone to test my appveyor build for Android and see if the picture gets fixed. Was thinking of installing Android in a vm and see if that goes anywhere. Currently sidetracked trying to backport libretro to Björn Spruck's Handy fork (Atari Lynx); keep everything in 1 nice repo. Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 22, 2019 Share Posted July 22, 2019 (edited) ok. But it says Stella 6.1 Beta2 39feee8 when I load it unlike the normal builds the modmyclassic guys release which say 3.9.3 6f4ba25. The last build where Stephena attempted to fix it it also said Stella 6.1 Beta2 and the crc number was the same as the "commit" id on the github. Also the date of the ".so" file on that site I linked only updates when changes are made ( AKA the build bot did not pick it up until the day you created your release ). So I'm pretty sure that one is it. But I have no way of confirming other than the crc number and version number it kicks out. Edited July 22, 2019 by Shannon Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 22, 2019 Share Posted July 22, 2019 https://github.com/stella-emu/stella/commits/master Checked history log but don't see any commit where the entire framebuffer is 32-bit aligned. https://github.com/stella-emu/stella/commit/daf4c0e71511c38008ddd38222dca0507744064d This one is not a full fbo alignment and likely caused the picture to skew even harder. https://github.com/snes2600/stella/tree/libretro My repo looks like this and contains further alignment changes for testing. This isn't in buildbot. Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 22, 2019 Share Posted July 22, 2019 (edited) I'll try and see about running retroarch on my phone. I couldn't do it on my old phone because it hogged way to much internal memory. But my new phone should be able to handle it. Once I have it running I'll try the version that you provided in the link. Edit: Update.. You're going to have to rely on someone else. I tried to load both arm version on my phone and my retroarch shows "no core" loaded when I do so. So unless I'm doing something wrong I can't get it to load. Edited July 22, 2019 by Shannon Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 23, 2019 Share Posted July 23, 2019 Built on Ubuntu Xenial 16.04, arm-linux-gnueabihf-g++. Which maybe matches the same compiler as libretro buildbot?? https://ci.appveyor.com/project/snes2600/stella/builds/26168176 Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 23, 2019 Share Posted July 23, 2019 1 hour ago, snes2600 said: Built on Ubuntu Xenial 16.04, arm-linux-gnueabihf-g++. Which maybe matches the same compiler as libretro buildbot?? https://ci.appveyor.com/project/snes2600/stella/builds/26168176 Sorry.. no luck with that one either. Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 23, 2019 Share Posted July 23, 2019 Ran in vmware. Libretro buildbot x86 android okay. Used appveyor core. No load. Get device root access. Use ES File Explorer. Set Root Explorer = on. Copy core to /data/data/com.retroarch/cores. Now restart Retroarch and load core. Then works. Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 23, 2019 Share Posted July 23, 2019 Ahh ok. Well I've yet to figure out how to root my phone. So I won't be much help there. Quote Link to comment Share on other sites More sharing options...
snes2600 Posted July 24, 2019 Share Posted July 24, 2019 @Shannon 1) Download latest Retroarch apk and install http://buildbot.libretro.com/nightly/android/ 2) Download snes2600 Stella appveyor core. Copy to Retroarch/downloads (no root needed) 3) Start Retroarch. Load core. Install core. Select Stella 4) If done correctly, it will show Stella but no git commit text 5) Try a game and pray a bit Quote Link to comment Share on other sites More sharing options...
Shannon Posted July 24, 2019 Share Posted July 24, 2019 Thanks. That did the trick. For some reason I did not see the "Retroarch" directory there. What I was doing was pointing the core emulator to another directory where I dropped the .so files. When it did not work I was thinking that maybe it didn't have the rights to run it from any directory other than the APPS directory which at the time I thought was unavailable to me. Everything appears to be in order with what is available on the appveyor core. Whatever it going through the buildbot for PSC ( and apparently android? ) 1.77 Stella 6.1_beta2 39feee8 appears to be the older non-working version. I'm not sure what it looks for to get the recent changes. So at this point I have no way of testing on the PSC. But the build you put on appveyor works fine on the android. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.