Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drastic-sa: add drastic layouts hook SDL lib for RGB30 #185

Closed
wants to merge 1 commit into from

Conversation

AveyondFly
Copy link
Contributor

Currently, drastic emulator only supports 2 display layouts and wastes lots of area for the RGB30 screen resolution of 720x720.

This commit hacks the functions called by drastic to re-organize the layouts with two different size. It provides 4 different two screen layouts to choose based on the background file names. User can choose two background files to replace the orignal layouts.

The source code can be found as following:
AveyondFly/SDL2-2.28.5_for_drastic_only@fa7da55

And the sample video from user as following:
https://www.bilibili.com/video/BV14i421y7rV/

I know this may not be the best way to integrate, but please consider to have additional patches for SDL2 and extra SDL2 lib for RGB30 drastic. Thanks.

@AveyondFly
Copy link
Contributor Author

AveyondFly commented May 6, 2024

Demo:
1715003258883
QQ截图20240506214840

@sydarn
Copy link
Collaborator

sydarn commented May 14, 2024

Did you test this?

Could you provide the details of how you built it? we may need to package a specific SDL2 for drastic in any case, so we do consider it. But I was not able to get this working.

Currently, drastic emulator only supports 2 display layouts and
wastes lots of area for the RGB30 screen resolution of 720x720.

This commit hacks the functions called by drastic to re-organize
the layouts with two different size. It provides 4 different
two screen layouts to choose based on the background file names.
User can choose two background files to replace the orignal
layouts.

The source code can be found as following:
AveyondFly/SDL2-2.28.5_for_drastic_only@fa7da55

And the sample video from user as following:
https://www.bilibili.com/video/BV14i421y7rV/

Signed-off-by: kk <[email protected]>
@AveyondFly
Copy link
Contributor Author

AveyondFly commented May 15, 2024

Did you test this?

Could you provide the details of how you built it? we may need to package a specific SDL2 for drastic in any case, so we do consider it. But I was not able to get this working.

The code was tested on jelos with RGB30 and rocknix with X55, but should work as well for both on rocknix as well.
I used the code below to build the lib and replace the lib for testing:
DEVICE_ROOT=RK3566 PROJECT=Rockchip DEVICE=RK3566 ARCH=aarch64 ./scripts/build SDL2

I have attached the source code in the PR.
Guess before formal integration, some work need to be done for build SDL twice with and without that patch or create another SDL2_drastic for that special lib.

I'm sorry I'm not an expert of this build system, so I can't deliver a ready to merge code in the PR. But need anyone from the team familiar with the build system to do some extra work to make it integraged.
Anyway, the patch should also be fine for someone who wants just to build by themself to give a try.

@sydarn
Copy link
Collaborator

sydarn commented May 29, 2024

Sorry for the long the delay.

Guess before formal integration, some work need to be done for build SDL twice with and without that patch or create another SDL2_drastic for that special lib.
Yes ideally we would build SDL from source with this patches specifically from drastic.

Since you submitted the PR we have started doing this for other reasons, we now have 2 gpu drivers on RK3326 and RK3566: libmali and panfrost.

libmali only support GLES and we build a specific SDL only compiled fir GLES for that driver, panfrost support both GL and GLES and we build a specific SDL for that.

The example how to build the GLES only SDL2 is here: https://github.com/ROCKNIX/distribution/blob/dev/packages/graphics/SDL2/SDL2_glesonly/package.mk

The best would be if you can create a similar SDL2_drastic package inside the drastic package, but with your patches.
If it's possible to apply the patches to latest SDL2 you can inherit from that package like SDL2_glesonly does. If not it's also ok to just create a clean package, probably copy the original SDL2/package.mk and modify that to point to your repo and build with GLES only.

I will draft this PR for the time being.

@sydarn sydarn marked this pull request as draft May 29, 2024 09:44
@sydarn
Copy link
Collaborator

sydarn commented Jul 25, 2024

Due inactivity I am closing this. Anyone feel free to reopen if they want to give it a shot.

@sydarn sydarn closed this Jul 25, 2024
rishooty pushed a commit to rishooty/distribution that referenced this pull request Aug 12, 2024
# This is the 1st commit message:

Remove DELETE EMPTY GAME DIRECTORIES options

# This is the commit message ROCKNIX#2:

Bump Kernel & Bump Mesa

# This is the commit message ROCKNIX#3:

remove mono/stere audio option from rk3399

causes issues and is not needed

# This is the commit message ROCKNIX#4:

Work on rebasing Dolphin-SA to upstream

# This is the commit message ROCKNIX#5:

Update rg552 ctrl guid in ES, which propagates through mkcontroller

# This is the commit message ROCKNIX#6:

rg552: fix gamecontrolledb guid

# This is the commit message ROCKNIX#7:

Revert "rg552: fix gamecontrolledb guid"

This reverts commit 7241db7.

# This is the commit message ROCKNIX#8:

Revert "Update rg552 ctrl guid in ES, which propagates through mkcontroller"

This reverts commit 0fe5192.

# This is the commit message ROCKNIX#9:

RG552: Restore original controller GUID

# This is the commit message ROCKNIX#10:

Some fixes for Retro Lite CM5

Fixes and quirks for sound, suspend/shutdown and battery level

# This is the commit message ROCKNIX#11:

rk817: remove battery calibration logic per suggestion from @macromorgan

# This is the commit message ROCKNIX#12:

RK3566: Power savings in device tree

- Lower vcc3v3_pmu voltage in suspend to 3.0V, as is done on BSP.
- Turn off vcc_3v3 regulator in suspend, nothing seems to need it.

# This is the commit message ROCKNIX#13:

Move to RTL8723DS out-of-tree driver

# This is the commit message ROCKNIX#14:

Fix X55 controls

# This is the commit message ROCKNIX#15:

Bump Kernel, bump mesa, bump wine, bump xwayland

# This is the commit message ROCKNIX#16:

Retro Lite CM5: fix brightness and fan PWMs, DP lanes mux

# This is the commit message ROCKNIX#17:

Update Mupen64Plus

# This is the commit message ROCKNIX#18:

RK3566: fix SDL gamecontroller, so that our definition gets loaded

# This is the commit message ROCKNIX#19:

Bump SDL2, bump Mesa, fix Mupen64-SA core

# This is the commit message ROCKNIX#20:

Make portmaster scripts executable

# This is the commit message ROCKNIX#21:

Bump Bifrost Mali kernel and vulkan driver to v50

# This is the commit message ROCKNIX#22:

Cleanup

# This is the commit message ROCKNIX#23:

Fix duckstation gamecontrolledb, add prefergles to more emu-pkgs

Removes outdated workaround for duckstation on rk3566

Clean duckstation resources on RK3566

# This is the commit message ROCKNIX#24:

Fix launching nanoboyadvance-sa

# This is the commit message ROCKNIX#25:

bumped fakeroot and bdf2psf to let build work properly.

# This is the commit message ROCKNIX#26:

bumped rclone from `1.65.0` to `1.67.0`

# This is the commit message ROCKNIX#27:

bumped rsync from `3.2.7` to `3.3.0`

# This is the commit message ROCKNIX#28:

updated references of JELOS to ROCKNIX

# This is the commit message ROCKNIX#29:

fixed references to JELOS and updated copyright year.

# This is the commit message ROCKNIX#30:

grammar cleanup and corrected `PKG_SHA256` for latest rsync

# This is the commit message ROCKNIX#31:

changed VFS cache mode to `off`

# This is the commit message ROCKNIX#32:

reduced sleep time from 3 to 1 to make sync appear quicker

# This is the commit message ROCKNIX#33:

various optimizations and changes to support consolidating around rclone

# This is the commit message ROCKNIX#34:

tweaked name of log file

# This is the commit message ROCKNIX#35:

additional changes to support simplifying `cloud_backup`

# This is the commit message ROCKNIX#36:

changes related to new cloud backup method

# This is the commit message ROCKNIX#37:

removed trailing slash on syncpath

# This is the commit message ROCKNIX#38:

various optimizations

# This is the commit message ROCKNIX#39:

restored information about backup source and remote destination

# This is the commit message ROCKNIX#40:

RK3588: Enable libmali gpu drivers

# This is the commit message ROCKNIX#41:

Bump Kernel and Mesa

# This is the commit message ROCKNIX#42:

Rework Dolphin-SA GC controls

# This is the commit message ROCKNIX#43:

Clean up Dolphin-SA Wii controls

# This is the commit message ROCKNIX#44:

bump zerotier-one to 1.14.0

# This is the commit message ROCKNIX#45:

new cloud restore method using  rclone

# This is the commit message ROCKNIX#46:

More Dolphin Controller updates, Add flycast-lr to RK3588

# This is the commit message ROCKNIX#47:

Update melonds-sa and clean up start script

# This is the commit message ROCKNIX#48:

generate_idtech.sh - Doom 3 and Quake III only for x86

# This is the commit message ROCKNIX#49:

Fix supermodel fullscreen

# This is the commit message ROCKNIX#50:

Update mupen64plus

# This is the commit message ROCKNIX#51:

Fix building mupen64plus-sa

# This is the commit message ROCKNIX#52:

Revert "remove mono/stere audio option from rk3399"

This reverts commit 735752c.

# This is the commit message ROCKNIX#53:

Revert "Fixes audio volume on rk3588, and startup mono/stereo on s922x"

This reverts commit fdfdce1.

# This is the commit message ROCKNIX#54:

Revert "source functions in 051-volume"

This reverts commit 43bc612.

# This is the commit message ROCKNIX#55:

Revert "rocknix/profile.d: add a virtual audio device function"

This reverts commit c002535.

# This is the commit message ROCKNIX#56:

Revert "rocknix: add startup script support for the new virtual audio devices"

This reverts commit 58d69c7.

# This is the commit message ROCKNIX#57:

Revert "pipewire: create 2 virtual audio devices and add user config for them"

This reverts commit 1d41280.

# This is the commit message ROCKNIX#58:

mupen64plus-sa-simplecore - remove unneeded 002-fix-arm.patch

# This is the commit message ROCKNIX#59:

gcc-14.1 and package updates

# This is the commit message ROCKNIX#60:

Fix building rk3588 kernel, and fix one issue with supermodel-sa

# This is the commit message ROCKNIX#61:

supermodel-sa builds

# This is the commit message ROCKNIX#62:

Remove -fomit-frame-pointer from optimization flags

It's included in -O1+

# This is the commit message ROCKNIX#63:

Update cmake

# This is the commit message ROCKNIX#64:

Support armv8.2-a optmisizations, with required pkg updates and fixes

# This is the commit message ROCKNIX#65:

RK3399: Bump u-boot to 2024.07

# This is the commit message ROCKNIX#66:

Fix printf command to use decimals

Behavior changed with %.0f formatter during gcc14 migration...

# This is the commit message ROCKNIX#67:

mupen64plus-sa-simplecore - disable Vulkan to fix build

# This is the commit message ROCKNIX#68:

Rockchip: Patches: rework libmali power init and fix unbalanced runtime
PM

Signed-off-by: Paul Reioux <[email protected]>

# This is the commit message ROCKNIX#69:

RK3326: power policy gpu coarse demand

# This is the commit message ROCKNIX#70:

wlroots 0.17.4 with rockchip patches

# This is the commit message ROCKNIX#71:

Update SDL, and misc fixes

* Remove no longer needed drastic hack
* Remove gamecontroller workaround, fixed in SDL now
* Add back to sway to start without input, should fix SBCs that can boot
  without controller

# This is the commit message ROCKNIX#72:

bump mainline linux to 6.10-rc6

# This is the commit message ROCKNIX#73:

mali-bifrost: fix building against linux 6.10

# This is the commit message ROCKNIX#74:

Only bump linuc on rk3566

# This is the commit message ROCKNIX#75:

RK3588 - use gl RA video driver / glslp shaders to cater for libmali

# This is the commit message ROCKNIX#76:

systemd: update for compatibility with linux 6.10

# This is the commit message ROCKNIX#77:

Fix fan control rg552 and Ace

# This is the commit message ROCKNIX#78:

Bump kernel to 6.9.8

# This is the commit message ROCKNIX#79:

rk3566: Add system-power-controller to rk817 in device tree

# This is the commit message ROCKNIX#80:

add rockchipt to system power controller

# This is the commit message ROCKNIX#81:

Fix up AMD64 build (still source only)

# This is the commit message ROCKNIX#82:

RK3566: Update rockchip blobs

# This is the commit message ROCKNIX#83:

More AMD64 fixes

# This is the commit message ROCKNIX#84:

Fix CPU temp in rocknix-info

# This is the commit message ROCKNIX#85:

Remove readme for depricated feature in automount

# This is the commit message ROCKNIX#86:

rk3566: update u-boot

# This is the commit message ROCKNIX#87:

Update AMD64 kernel config

# This is the commit message ROCKNIX#88:

Fix air pro fan control

# This is the commit message ROCKNIX#89:

Add initial support for the Aya Neo Flip DS & bump kernel

# This is the commit message ROCKNIX#90:

Clean up Idtech scripts

# This is the commit message ROCKNIX#91:

Bump xwayland, fix id-tech script

# This is the commit message ROCKNIX#92:

drastic_sense: reintroduce hack to display fullscreen when toggling view

the tuned version of the hack is still needed for some panels.

# This is the commit message ROCKNIX#93:

RK3566: Change menu controller combo to select + down

Note this is not the regular combo, select + X, but another one that
causes issues on the Arc.

# This is the commit message ROCKNIX#94:

Fix hash

Fixes ROCKNIX#381

Signed-off-by: Stephen Reaves <[email protected]>

# This is the commit message ROCKNIX#95:

arm: use separate var for extra packages

# This is the commit message ROCKNIX#96:

generic-dsi driver: fix buffer allocation, support read commands

# This is the commit message ROCKNIX#97:

generic-dsi: include import script in firmware

# This is the commit message ROCKNIX#98:

dtbocfg: a kernel module to live apply dtb overlays

# This is the commit message ROCKNIX#99:

starting work on more verbose messaging on backup

# This is the commit message ROCKNIX#100:

checks for network access before running cloud scripts

# This is the commit message ROCKNIX#101:

updated post-update script to add new cloud sync filters

# This is the commit message ROCKNIX#102:

update sway to 1.10 branch, wlroots to 0.18.0 also some deps

# This is the commit message ROCKNIX#103:

sway: fix extraction

# This is the commit message ROCKNIX#104:

Bind mount /dev/null over libGL.so when libmali is used

# This is the commit message ROCKNIX#105:

Arc: clean up quirks, add hypseus daphne mapping Thanks @jnags

# This is the commit message ROCKNIX#106:

RK3566: Bump linux to 6.10

# This is the commit message ROCKNIX#107:

Clean up unused quirk variables: DEVICE_BRIGHTNESS and DEVICE_POWER_LED

# This is the commit message ROCKNIX#108:

S922X - dolphin-sa - restore L1 and R1 for triggers

# This is the commit message ROCKNIX#109:

linux: bump Amlogic to 6.10

# This is the commit message ROCKNIX#110:

H700 update

# This is the commit message ROCKNIX#111:

Update wlr-randr

# This is the commit message ROCKNIX#112:

rk3326-elida-panel: fix refresh rates

# This is the commit message ROCKNIX#113:

H700 - Add gpu opp profiles

# This is the commit message ROCKNIX#114:

enable mesa opengl

# This is the commit message ROCKNIX#115:

Add support for more H700 devices, fix boot logo

# This is the commit message ROCKNIX#116:

rocknix-joypad: revert package bump

# This is the commit message ROCKNIX#117:

linux/H700: remove duplicated patches

# This is the commit message ROCKNIX#118:

enable INPUT_POLLDEV
# This is the commit message ROCKNIX#119:

bump retroarch to v1.19.1
# This is the commit message ROCKNIX#120:

H700: Add temperature reporting, fix rocknix-info

# This is the commit message ROCKNIX#121:

fix PPSSPP on H700
# This is the commit message ROCKNIX#122:

h700: rework kernel pathces

# This is the commit message ROCKNIX#123:

Bump wine, box86 and box64 package versions

# This is the commit message ROCKNIX#124:

S922X-PANFROST - use sway

# This is the commit message ROCKNIX#125:

add base package

# This is the commit message ROCKNIX#126:

add base configs

# This is the commit message ROCKNIX#127:

complete example

# This is the commit message ROCKNIX#128:

got most of the base config done, just need to figure out how to init, figure out how to access or write $ROOT to a config file somehow, and then test build once gitlab is up

# This is the commit message ROCKNIX#129:

hotkeygen

# This is the commit message ROCKNIX#130:

basic mapping

# This is the commit message ROCKNIX#131:

most of the template done, just need to figure out how to init

# This is the commit message ROCKNIX#132:

mostly setup, just need to figure out binding

# This is the commit message ROCKNIX#133:

move bindings to input sense, just notes for now

# This is the commit message ROCKNIX#134:

extra note

# This is the commit message ROCKNIX#135:

last commit before first build/testing

# This is the commit message ROCKNIX#136:

inlude waybar in wayland package as dep

# This is the commit message ROCKNIX#137:

add libsigcpp dep

# This is the commit message ROCKNIX#138:

rename

# This is the commit message ROCKNIX#139:

toss it in ES deps i guess

# This is the commit message ROCKNIX#140:

more deps needed

# This is the commit message ROCKNIX#141:

more deps

# This is the commit message ROCKNIX#142:

very close to compiling gtkmm

# This is the commit message ROCKNIX#143:

finally a clean build of waybar

# This is the commit message ROCKNIX#144:

improved config

# This is the commit message ROCKNIX#145:

sane install path

# This is the commit message ROCKNIX#146:

cleaned up and slightly updated some packages for rk3566

# This is the commit message ROCKNIX#147:

add gtk layer shell

# This is the commit message ROCKNIX#148:

this is the correct swaybar, so i guess its ssh debug time

# This is the commit message ROCKNIX#149:

more correct init, would need to diagnose waybar install itself from here

# This is the commit message ROCKNIX#150:

clean up sample

# This is the commit message ROCKNIX#151:

some corrections to try

# This is the commit message ROCKNIX#152:

fix boot sequence so i have es at least

# This is the commit message ROCKNIX#153:

es starts now, no sway errors, its just boot order and waybar itself now

# This is the commit message ROCKNIX#154:

fix service conflict, fix missing dependencies, tweak config to get it to overlay over fullscreen

# This is the commit message ROCKNIX#155:

swaybar init fixed but having trouble overlaying over fs apps

# This is the commit message ROCKNIX#156:

testing forced fullscreen fs patch

# This is the commit message ROCKNIX#157:

add floating to make it possible

# This is the commit message ROCKNIX#158:

start to set up bindings

# This is the commit message ROCKNIX#159:

windowed ra test

# This is the commit message ROCKNIX#160:

enable forced window size

# This is the commit message ROCKNIX#161:

more test cfg tweaks

# This is the commit message ROCKNIX#162:

fix floating window wackiness, now all that needs to be done is disable exclusive fs

# This is the commit message ROCKNIX#163:

fix floating window wackiness, now all that needs to be done is disable exclusive fs

# This is the commit message ROCKNIX#164:

try to rebind to 3 secs

# This is the commit message ROCKNIX#165:

activate immediately on 3 secs if it can

# This is the commit message ROCKNIX#166:

make sure it does not repeat

# This is the commit message ROCKNIX#167:

make sure it does not repeat

# This is the commit message ROCKNIX#168:

from weston support, keep it from killing itself

# This is the commit message ROCKNIX#169:

will hopefully let it re-trigger

# This is the commit message ROCKNIX#170:

try with file based state

# This is the commit message ROCKNIX#171:

 more file based state woo

# This is the commit message ROCKNIX#172:

 more file based state woo

# This is the commit message ROCKNIX#173:

add centering, hopefully will fix mupen64plus rice

# This is the commit message ROCKNIX#174:

clean up config, oh well gpu usage is better done thorugh opengl/vulkan

# This is the commit message ROCKNIX#175:

add wireplumber support

# This is the commit message ROCKNIX#176:

remove oncick

# This is the commit message ROCKNIX#177:

fix waybar migration

# This is the commit message ROCKNIX#178:

first custom module trial

# This is the commit message ROCKNIX#179:

move env variables to quirks

# This is the commit message ROCKNIX#180:

export preses

# This is the commit message ROCKNIX#181:

fix ipc

# This is the commit message ROCKNIX#182:

disable fs for ppsspp, set scummvm to opengl

# This is the commit message ROCKNIX#183:

source the vars directly

# This is the commit message ROCKNIX#184:

fix function b boolean logic and add actual output

# This is the commit message ROCKNIX#185:

game overrides test 1

# This is the commit message ROCKNIX#186:

mednafen test

# This is the commit message ROCKNIX#187:

revert mednaen for now, test more emus

# This is the commit message ROCKNIX#188:

more attempts to get mednafen working

# This is the commit message ROCKNIX#189:

correct config,kiosk again

# This is the commit message ROCKNIX#190:

more mednafen progress

# This is the commit message ROCKNIX#191:

working mednafen gptk

# This is the commit message ROCKNIX#192:

it needs to be pressed twice in flycast but it works

# This is the commit message ROCKNIX#193:

pico 8 support, revert input_sense retry

# This is the commit message ROCKNIX#194:

enable RK3326

# This is the commit message ROCKNIX#195:

reliability has improved greatly, but now toggling back on is broke probably due to wlroots update

# This is the commit message ROCKNIX#196:

bump waybar, sway ipc based toggle

# This is the commit message ROCKNIX#197:

actual IPC based toggle thank god

# This is the commit message ROCKNIX#198:

still file based but much less

# This is the commit message ROCKNIX#199:

bluetooth hiding for devices with no chip

# This is the commit message ROCKNIX#200:

le finishing touches

# This is the commit message ROCKNIX#201:

auto font scaling, module overflow prioritization for smaller screens, optimized KEYGUIDE_NONE for less space, added examples and a guide for portmaster and future native titles

# This is the commit message ROCKNIX#202:

cherry pick sway support and add support for s922x exclusive hotkehys

# This is the commit message ROCKNIX#203:

test pipewire

# This is the commit message ROCKNIX#204:

revert wireplumber, revert to pulseaudio auidio module

# This is the commit message ROCKNIX#205:

re-add patch

# This is the commit message ROCKNIX#206:

initial rg28xx support

# This is the commit message ROCKNIX#207:

R36s: Fix hotkeys in retroarch

# This is the commit message ROCKNIX#208:

docker build - handle volume mount for EMULATIONSTATION_SRC

# This is the commit message ROCKNIX#209:

emulationstation - MOONLIGHT build flag

# This is the commit message ROCKNIX#210:

Update linux.aarch64.conf

compile in kernel PANFROST and LCD PANEL
# This is the commit message ROCKNIX#211:

Added some RTL bluetooth drivers for RK3326

# This is the commit message ROCKNIX#212:

Bump Fakeroot package 1.35 -> 1.35.1

# This is the commit message ROCKNIX#213:

initial work related to adding a config file to customize cloud sync options

# This is the commit message ROCKNIX#214:

additional optimizations

# This is the commit message ROCKNIX#215:

optimizations to better handle empty directories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants