Giter Club home page Giter Club logo

Comments (9)

drhelius avatar drhelius commented on May 18, 2024

I don't think I can control that programmaticaly. I mean, if the Pi detects an HDMI connection it will disable the RCA output.

Look: https://www.raspberrypi.org/forums/viewtopic.php?f=35&t=88265

from gearboy.

nicofossa avatar nicofossa commented on May 18, 2024

I faced the same issue, but it's not a problem of raspberry itself.
You can force SDL to use your external monitor by
export SDL_FBDEV=/dev/fb1
but there is an other problem: you will see a black window.
Looking at the source code included in "main.cpp" from the raspberry folder, it seems it uses hardware acceleration. Basically, the content of the windows is drawed using the GPU. As far as I know, the work of the GPU cannot be sent to a monitor linked with (for example) i2c, but only to HDMI or RCA (directly connected to GPU).
So, is there a way to disable hardware acceleration in raspberry build?

from gearboy.

drhelius avatar drhelius commented on May 18, 2024

You'll have to change the sources but this way will run slower. The Pi 2 may run that fine.
Let me check how this could be achieved and I can probably make the changes.

from gearboy.

nicofossa avatar nicofossa commented on May 18, 2024

I've rewritten successfully the code so now it doesn't use native GPU acceleration but only SDL acceleration. Now the problem is how to disable hardware acceleration and force sdl to use /dev/fb1 as main monitor

from gearboy.

drhelius avatar drhelius commented on May 18, 2024

That was fast!
If you're using sdl this should be helpful:

https://wiki.libsdl.org/SDL_CreateRenderer

from gearboy.

drhelius avatar drhelius commented on May 18, 2024

Set this two also:

SDL_putenv("SDL_FBDEV=/dev/fb1");
SDL_putenv("SDL_VIDEODRIVER =fbcon");

from gearboy.

nicofossa avatar nicofossa commented on May 18, 2024

Already tried these option, does not work. Moreover SDL_putenv is deprecated.
I compiled succesfully a version that blit "theScreenBuffer" directly on the screen (directly is non really correct, because I have to convert the pixels to the right format used by the screen). This is a very resource-eater operation, I can't find a solution to optimize it... By the way, with a rudimental frameskip 1/10 and no audio it is quite playable (I'm testing the emulator with pokemon yellow)
If you want, I can share my work with you; maybe togheter we can find a solution

from gearboy.

inktrebuchet avatar inktrebuchet commented on May 18, 2024

I have been messing with my pitft display for a bit now, trying to figure this out. I came across this page which has got gearboy working on the pitft display. https://learn.adafruit.com/running-opengl-based-games-and-emulators-on-adafruit-pitft-displays/pitft-setup

Surprisingly, I still can't quite figure out how to resize the emulator to fit the screen... I must be overlooking something simple.

Edit- just solved this. Once the above is set up you would just need to edit the hdmi_cvt line in the /boot/config.txt file to hdmi_cvt=587 440 60 1 0 0

Unfortunately, the PiTFTs resolutions are 320x240, which means increasing the size of the game screen causes blurry pixels.

from gearboy.

drhelius avatar drhelius commented on May 18, 2024

Now that you can use Gearboy through RetroArch this shouldn't be an issue.

from gearboy.

Related Issues (20)

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.