Development Resources

Talking about OS and emulation core development
Post Reply
crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Development Resources

Unread post by crashoverride » Fri Dec 27, 2019 5:12 pm

Last edited by crashoverride on Fri Jan 03, 2020 4:44 am, edited 1 time in total.
These users thanked the author crashoverride for the post (total 2):
kamots (Fri Jan 03, 2020 3:29 am) • Paspartout (Fri Jan 03, 2020 4:56 am)

User avatar
mad_ady
Posts: 7090
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 305 times
Been thanked: 209 times
Contact:

Re: Development Resources

Unread post by mad_ady » Fri Dec 27, 2019 8:46 pm

Well hello... What's that? Sounds nifty!

pmprog
Posts: 73
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 18 times
Been thanked: 1 time
Contact:

Re: Development Resources

Unread post by pmprog » Sun Dec 29, 2019 5:48 pm

Is libgo2 going to be the library for accessing display, inputs, gpio etc? Or will libraries like SDL work?

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Mon Dec 30, 2019 3:12 am

libgo2 provides simplified access to the hardware. It is similar in concept to the "odroid-go-common" provided for the original GO:
https://github.com/OtherCrashOverride/g ... nts/odroid

The library handles display (including hardware bitblit and backlight), input (gamepad), audio (including path and volume), and battery status.

SDL will work assuming the target dependencies are met (KMS, X11, Wayland).
These users thanked the author crashoverride for the post:
pmprog (Mon Dec 30, 2019 3:14 am)

pmprog
Posts: 73
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 18 times
Been thanked: 1 time
Contact:

Re: Development Resources

Unread post by pmprog » Mon Dec 30, 2019 3:29 am

Thanks. Will libgo2 be open source too?

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Mon Dec 30, 2019 3:38 am

pmprog wrote:
Mon Dec 30, 2019 3:29 am
Will libgo2 be open source too?
Yes! The github link will be posted in the first post of this thread when its released.
These users thanked the author crashoverride for the post:
pmprog (Mon Dec 30, 2019 5:39 am)

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Fri Jan 03, 2020 4:44 am

Updated first post with links to libgo2, emulationstation-go2, and retrorun-go2.
These users thanked the author crashoverride for the post (total 5):
Paspartout (Fri Jan 03, 2020 4:56 am) • pmprog (Fri Jan 03, 2020 5:47 am) • odroid (Fri Jan 03, 2020 9:05 am) • joy (Fri Jan 03, 2020 9:26 am) • rooted (Mon Jan 06, 2020 12:12 am)

SlappyMcPhee
Posts: 104
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: XU4 (3 of them)
Has thanked: 6 times
Been thanked: 4 times
Contact:

Re: Development Resources

Unread post by SlappyMcPhee » Sat Jan 04, 2020 7:49 am

thanks for the resources!
Owner The Retro Arena and Odroid Retro Arena

maker_gamer
Posts: 8
Joined: Tue Jan 07, 2020 2:50 pm
languages_spoken: english
ODROIDs: Odroid Go, Odroid Go Advanced (preordered)
Has thanked: 0
Been thanked: 3 times
Contact:

Re: Development Resources

Unread post by maker_gamer » Thu Jan 09, 2020 3:00 pm

Crash, will any of the "frontends" have bindings for scripting languages? I suspect Lua would be the easiest to bind out the gate given there's ton's of info on it ( https://www.google.com/search?q=how+to+ ... to+c%2B%2B )

Given this is on aarch64, a scripted language performance should be a non-impact for this machine.

Plus, having scripting bindings would be inviting for more folks to extend this platform. Personally, I've not done any C++ in 25yrs. Anymore I've to hammer things out in Bash, Python, Perl, Lua (and if necessary JavaScript) for my SysAdmin work.

Thanks for all your hard work. Looking forward to my Go Advance and seeing what I can do with it beyond just playing games.

Cheers, MG

pmprog
Posts: 73
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 18 times
Been thanked: 1 time
Contact:

Re: Development Resources

Unread post by pmprog » Fri Jan 10, 2020 12:43 am

crashoverride wrote:
Fri Dec 27, 2019 5:12 pm
Libgo2
https://github.com/OtherCrashOverride/libgo2
I was expecting to see some GPIO functions in here, but there don't seem to be any, will there be? or are there other references for that?

Also, am I correct in thinking that the go2_presenter_post is what pushes the screen buffer to the LCD?

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Fri Jan 10, 2020 8:57 am

maker_gamer wrote:
Thu Jan 09, 2020 3:00 pm
will any of the "frontends" have bindings for scripting languages?
I can only speak for the RetroRun frontend (since I wrote it). It is a command line program that can be called from a script language like BASH. It does not host any script engines.
pmprog wrote:
Fri Jan 10, 2020 12:43 am
I was expecting to see some GPIO functions in here, but there don't seem to be any, will there be?
There are not currently any GPIO functions. While they can certainly be added at a later date, I anticipated that developers would rather use a port of WIRING(PI).
These users thanked the author crashoverride for the post (total 2):
rooted (Fri Jan 10, 2020 1:40 pm) • pmprog (Fri Jan 10, 2020 4:11 pm)

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Fri Jan 10, 2020 10:29 am

pmprog wrote:
Fri Jan 10, 2020 12:43 am
Also, am I correct in thinking that the go2_presenter_post is what pushes the screen buffer to the LCD?
Yes.

A "display" and "presenter" are created:
https://github.com/OtherCrashOverride/r ... pp#L70-L71

Then a "surface" is created to draw on:
https://github.com/OtherCrashOverride/r ... eo.cpp#L92

After a "surface" is drawn on, it is given to the "presenter" to display with optional rotation:
https://github.com/OtherCrashOverride/r ... #L193-L197

The presenter makes a copy of the surface so that it can immediately be re-used without "tearing". The copy is then queued for display at the next VSYNC.
These users thanked the author crashoverride for the post:
pmprog (Fri Jan 10, 2020 4:12 pm)

User avatar
mad_ady
Posts: 7090
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 305 times
Been thanked: 209 times
Contact:

Re: Development Resources

Unread post by mad_ady » Fri Jan 10, 2020 3:55 pm

@crashoverride am I correct to assume the code is rockchip specific and can't be used to rotate the framebuffer on C2, right?

pmprog
Posts: 73
Joined: Thu Oct 18, 2018 4:01 am
languages_spoken: english
ODROIDs: ODROID-GO
Has thanked: 18 times
Been thanked: 1 time
Contact:

Re: Development Resources

Unread post by pmprog » Fri Jan 10, 2020 4:19 pm

crashoverride wrote:
Fri Jan 10, 2020 8:57 am
I anticipated that developers would rather use a port of WIRING(PI).
Thanks. I'll be happy to use whatever, just want sure what was available.
crashoverride wrote:
Fri Jan 10, 2020 10:29 am
After a "surface" is drawn on, it is given to the "presenter" to display with optional rotation:

The presenter makes a copy of the surface so that it can immediately be re-used without "tearing". The copy is then queued for display at the next VSYNC.
Forgive me then, but what's the "display" for? Why is it separate from the presenter?

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Fri Jan 10, 2020 4:47 pm

pmprog wrote:
Fri Jan 10, 2020 4:19 pm
what's the "display" for? Why is it separate from the presenter?
A "display" object wraps a Linux DRI display device (/dev/dri/card0). All surface allocations are made from this device per Linux KMS/DRM API. This API requires that a "surface" (GEM buffer) be attached to a "framebuffer" which can then be shown by a "display":
https://github.com/OtherCrashOverride/l ... play.h#L69
https://github.com/OtherCrashOverride/l ... play.h#L84
https://github.com/OtherCrashOverride/l ... play.h#L61

The "presenter" is effectively a mini-compositor that provides a simple way to drive the display. This eliminates the need for each program to have its own display management code. In addition to maintaining surface/framebuffer mappings, it also provides triple buffering (threaded operation) and rotation transparently. Applications may still directly drive the display using the above mentioned APIs. These are the same APIs used by the "presenter" itself.
These users thanked the author crashoverride for the post:
pmprog (Fri Jan 10, 2020 7:16 pm)

crashoverride
Posts: 4617
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 140 times
Contact:

Re: Development Resources

Unread post by crashoverride » Fri Jan 10, 2020 5:04 pm

mad_ady wrote:
Fri Jan 10, 2020 3:55 pm
am I correct to assume the code is rockchip specific and can't be used to rotate the framebuffer on C2, right?
libgo2 uses Linux DRI/KMS/DRM APIs. These are not available on the C2 (or N2) currently. It also uses Rockchip's librga for rotation.

The libgo2 API could theoretically be adapted to C2/N2 in the future. However, at the moment, it is Rockchip specific.
These users thanked the author crashoverride for the post (total 2):
mad_ady (Fri Jan 10, 2020 5:50 pm) • joy (Fri Jan 10, 2020 6:24 pm)

Post Reply

Return to “Platform development”

Who is online

Users browsing this forum: No registered users and 0 guests