Exp_Cropped Driver [Fixed!]
#11
I didn't read all the messages, I am on the phone right now.

For OMX player, the standalone version or the Emulation Station plugin? The standalone need a specific arguments to play video fine.
This is due to a glitch that bug DispmanX when a screen resize happen.
BTW, here is the lines I used in Emulation Station 'es_systems.cfg' to add a "game system" to play videos/audios (can glitch if seek beyond limits) :
Code:
 <system>
   <name>media</name>
   <fullname>Media</fullname>
   <path>/home/pi/RetroPie/media</path>
   <extension>.avi .mp4 .mkv .mov .wmv .flv .mp3 .ogg .wav .wma .aac .flac .m3u .pls .AVI .MP4 .MKV .MOV .WMV .FLV .MP3 .OGG .WAV .WMA .AAC .FLAC .M3U .PLS</extension>
   <command>/opt/retropie/supplementary/runcommand/joy2key.py /dev/input/js0 kcub1 kcuf1 0x6B 0x6A 0x70 0x71 & omxplayer -b %ROM% -o alsa --live ; killall joy2key.py</command>
   <platform>media</platform>
   <theme>media</theme>
 </system>


As you said, when enable "sleep" on juj driver, when the screen black out, it require multiple new frames to wake up.
This is maybe due to the percentage of changing pixels variable (I will take a look when back home) but fine tuning this value will increase the CPU load.


I am not sure I commented all modified lines, I hope I will not miss a big amount...

In 'config.h':
ALL_TASKS_SHOULD_DMA //to uncomment
SAVE_BATTERY_BY_PREDICTING_FRAME_ARRIVAL_TIMES //to comment, framerate drop fix
DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE //to comment, I don't remember why
SAVE_BATTERY_BY_SLEEPING_WHEN_IDLE //is already not commented by default

In 'freeplaytech_waveshare32b.h': (also important as unmodified juj driver have not access to Freeplay screen config)
DISPLAY_NATIVE_COVERED_TOP_SIDE is left border of the screen
DISPLAY_NATIVE_COVERED_LEFT_SIDE is top border of the screen
DISPLAY_NATIVE_COVERED_RIGHT_SIDE is bottom border of the screen
DISPLAY_NATIVE_COVERED_BOTTOM_SIDE is right border of the screen

Cmake command: (DDMA_TX_CHANNEL and DDMA_RX_CHANNEL are set to allow me to play Reicast emulator)
cmake -DARMV8A=ON -DFREEPLAYTECH_WAVESHARE32B=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON -DUSE_DMA_TRANSFERS=ON -DDMA_TX_CHANNEL=2 -DDMA_RX_CHANNEL=5 -DSTATISTICS=0 ..

I hope this will help Smile
Reply
#12
Making a back-up of my current image, and I'll be giving all of this a try.

Thank you so much for the added help, Porcinus!
Reply
#13
(07-03-2019, 06:51 PM)Porcinus Wrote: As you said, when enable "sleep" on juj driver, when the screen black out, it require multiple new frames to wake up.
This is maybe due to the percentage of changing pixels variable (I will take a look when back home) but fine tuning this value will increase the CPU load.


I am not sure I commented all modified lines, I hope I will not miss a big amount...

In 'config.h':
ALL_TASKS_SHOULD_DMA //to uncomment
SAVE_BATTERY_BY_PREDICTING_FRAME_ARRIVAL_TIMES //to comment, framerate drop fix
DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE //to comment, I don't remember why
SAVE_BATTERY_BY_SLEEPING_WHEN_IDLE //is already not commented by default

In 'freeplaytech_waveshare32b.h': (also important as unmodified juj driver have not access to Freeplay screen config)
DISPLAY_NATIVE_COVERED_TOP_SIDE is left border of the screen
DISPLAY_NATIVE_COVERED_LEFT_SIDE is top border of the screen
DISPLAY_NATIVE_COVERED_RIGHT_SIDE is bottom border of the screen
DISPLAY_NATIVE_COVERED_BOTTOM_SIDE is right border of the screen

Cmake command: (DDMA_TX_CHANNEL and DDMA_RX_CHANNEL are set to allow me to play Reicast emulator)
cmake -DARMV8A=ON -DFREEPLAYTECH_WAVESHARE32B=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DDISPLAY_BREAK_ASPECT_RATIO_WHEN_SCALING=ON -DUSE_DMA_TRANSFERS=ON -DDMA_TX_CHANNEL=2 -DDMA_RX_CHANNEL=5 -DSTATISTICS=0 ..

I hope this will help Smile

Edit: Ok, so I think I have figured a little bit more out with this process, lol. So basically, what I have now is a fbcp-ili9341 folder in my /home/pi folder containing the before-mentioned config.h and freeplaytech_waveshare32b.h files in it, and used your cmake instructions. It seems like I have it built.

I see that I need to add "sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341 &" to rc.local to get it to initialize, and I think that's where I'm at a halt.

Basically, when I edit config.h and the other freeplaywaveshare file, it doesn't seem to make any changes. Not sure if it's actually running or not.
Reply
#14
This is because you still have Exp_Cropped driver running aside.

Can you try :
sudo systemctl stop fbcpCropped.service
sudo systemctl stop fbcpOld.service
sudo systemctl disable fbcpCropped.service
sudo systemctl disable fbcpOld.service

Once done still in SSH try to run 'sudo /home/pi/fbcp-ili9341/build/fbcp-ili9341' to see if you get something on screen (no need to restart at this point).
If this does work at this point, please post the output.

Please note: If fbcpOld.service was used, some modifications need to be make in /boot/config.txt:
"dtparam=spi=on" need to be commented.
Reply
#15
So as soon as I hit the first sudo you listed, the system locked up.

Restarted it by pulling the battery.

Booted back up, no visuals. I could hear the background music I have running in ES through livewire, though.
Reply
#16
Also, I had checked the config in /boot- "dtparam=spi=on" was actually already commented.
Reply
#17
I am at work right now Confused

What happen when you try to start the driver you compile thru SSH?
Reply
#18
Not sure if it helps any- but here is my config.txt.


# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=0
#overscan_right=0
#overscan_top=0
#overscan_bottom=0

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=4

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1

# BEGIN FREEPLAY MODS
framebuffer_width=1024
framebuffer_height=768
hdmi_force_hotplug=1
HDMI_FORCE_MODE=1
hdmi_group=2
hdmi_mode=4
hdmi_drive=1 #Normal DVI mode (No sound) (2 for HDMI with sound)
dtparam=audio=on
[pi0]
#Freeplay Zero
dtoverlay=audremap,swap_lr=off
dtoverlay=waveshare32b,speed=80000000,fps=60,rotate=270
[pi3]
#Freeplay CM3
dtoverlay=audremap,swap_lr=on
dtoverlay=waveshare32b,speed=99999999,fps=60,rotate=270
[pi2]
#Sometimes we test with Pi2
dtoverlay=audremap,swap_lr=on
dtoverlay=waveshare32b,speed=80000000,fps=60,rotate=270
[all]
dtoverlay=gpio-poweroff,gpiopin=21,active_low
# Disable the ACT LED on the Pi Zero.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=on
audio_pwm_mode=2
dtparam=watchdog=on # Enabling watchdog.
# remove # from following 2 lines to turn wifi and bluetooth off (if not needed, can Speed Up Pi Zero W)
#dtoverlay=pi3-disable-wifi
#dtoverlay=pi3-disable-bt
# END FREEPLAY MODS

[pi3]
dtparam=i2c1_baudrate=400000 #makes a big speed difference
dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6
[all]
[pi3]
dtparam=i2c1_baudrate=400000 #makes a big speed difference
dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6,combine=off
[all]
Reply
#19
Please comment all "dtoverlay=waveshare32b"

Theses lines are used to create '/dev/fb1', this are used to write data on the display but conflict with juj driver.
Reply
#20
Alright- started fresh with all of the above in mind- haven't gotten to the config.h and freeplaytech_waveshare32b.h edits because I'd want to see the driver running first, I suppose.

Just commented out:

[pi3]
#Freeplay CM3
dtoverlay=audremap,swap_lr=on
#dtoverlay=waveshare32b,speed=99999999,fps=60,rotate=270

And as per juj's site- do I need to do the following?:

hdmi_group=2
hdmi_mode=87
hdmi_cvt=320 240 60 1 0 0 0
hdmi_force_hotplug=1

If not- I'll leave that as it is.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)