Yeah, video is working with `core_freq=400` I put an snes rom in it and the video looks fine
Images are refreshing correctly. The resolution looks a bit small but probably due to forcing it to be 320x240
The audio output in emulationstation was actually set to HDMI, changing it to PCM didn't change anything. I get video out of omxplayer but no audio and the HDMI screen is still disconnected. Listing the audio cards through aplay shows this:
07-16-2022, 11:14 AM (This post was last modified: 07-16-2022, 02:31 PM by smoscar01.)
I got sound coming out of it!!
I had to edit /usr/share/alsa/alsa.conf and change both `defaults.ctl.card` and `defaults.pcm.card` from 0 to 1
Moving on to joysticks. I don't remember exactly what I changed on my CM3 image to calibrate them and make them work (checking my old notes now) but I see the following error in dmesg.
Code:
[ 3.618236] mk_arcade_joystick_rpi: Freeplay Button Driver
[ 3.618267] mk_arcade_joystick_rpi: pad type requested : 4
[ 3.618279] mk_arcade_joystick_rpi: pad type : 4
Right now I am unable to get L2, R2 and the joysticks to work
Note: I am using the L2R2 Dual Analog (4 ADC) Add-On Board for them
Quick edit: I only know those are errors because they're shown in red in the console
It worked after adding the correct mk_arcade_joystick.conf
I'm getting a different output in dmesg than before, this made me think everything had been detected correctly through I2C yesterday. But then I took a closer look at the dmesg output:
Code:
pi@retropie:~ $ dmesg | grep mk
[ 3.634517] mk_arcade_joystick_rpi: loading out-of-tree module taints kernel.
[ 3.636086] mk_arcade_joystick_rpi: Freeplay Button Driver
[ 3.683198] mk_arcade_joystick_rpi: request_module i2c_bcm2835 returned 0
[ 3.683220] mk_arcade_joystick_rpi: I2C bus 1 NOT opened (sleeping and retrying)
[ 4.194358] mk_arcade_joystick_rpi: I2C bus 1 NOT opened (sleeping and retrying)
[ 4.714363] mk_arcade_joystick_rpi: I2C bus 1 NOT opened (sleeping and retrying)
[ 5.234362] mk_arcade_joystick_rpi: I2C bus 1 opened
[ 5.234381] mk_arcade_joystick_rpi: I2C bus timeout set to 10 ms
[ 5.234396] mk_arcade_joystick_rpi: Analog auto center disable
[ 5.234568] mk_arcade_joystick_rpi: X1 assigned to I2C address 0x48
[ 5.234701] mk_arcade_joystick_rpi: X1 chip not found
[ 5.234921] mk_arcade_joystick_rpi: Y1 assigned to I2C address 0x4D
[ 5.235037] mk_arcade_joystick_rpi: Y1 chip not found
[ 5.235240] mk_arcade_joystick_rpi: X2 assigned to I2C address 0x4B
[ 5.235352] mk_arcade_joystick_rpi: X2 chip not found
[ 5.235554] mk_arcade_joystick_rpi: Y2 assigned to I2C address 0x4F
[ 5.235681] mk_arcade_joystick_rpi: Y2 chip not found
[ 5.235822] mk_arcade_joystick_rpi: pad type requested : 4
[ 5.235842] mk_arcade_joystick_rpi: pad type : 4
[ 5.235906] mk_arcade_joystick_rpi: GPIO configured for pad0
Is it possible the i2c module changed for the cm4? Since I'm getting `request_module i2c_bcm2835 returned 0` in the dmesg too.
PS: ...I am using the exact same config I had in modprobe.d/mk_arcade_joystick.conf for the CM3 image:
Verifying that I2C is enabled through raspi-config, rebooted but still didn't see any devices connected to the bus. What's interesting is that listing the buses only shows this:
It could be baud rate, but it’s more likely that the CM4 is connected using different pins. We’d need to figure out what GPIO of the CM4 are connected to the Freeplay CM3 i2c pins.
I don’t have the documentation easily here available. Offhand, I feel like it was using 44 and 45 before (on CM3).
dtoverlay=i2c1,pins_44_45=1,combine=off
That’s what controls it, but the CM4 adapter board could be connecting different pins to those.
07-17-2022, 10:50 AM (This post was last modified: 07-17-2022, 11:45 AM by smoscar01.)
I believe they're the same, `raspi-gpio get` shows 44 is SDA1 AND 45 is SCL1. Here's what I see in the CM4 documentation:
Quote:2.9. I2C (SDA0 SCL0) This internal I2C bus is normally allocated to the CSI1 and DSI1, as these devices are controlled by the firmware. It can be used as a general I2C bus if the CSI1 ad DSI1 interfaces aren’t being used, or are being controlled by the firmware. For example libcamera runs on the ARM and doesn’t use the firmware, so in this case you may use CSI1 and this I2C bus. SDA0 is connected to GPIO44 on the BCM2711 and SCL0 is connected to GPIO45.
2.10. I2C (ID_SD ID_SC) This I2C bus is normally used for identifying HATs and controlling CSI0 and DSI0 devices. If the firmware isn’t using the I2C bus e.g. CSI0 and DSI0 aren’t being used then these pins may be used as GPIO 0 and GPIO 1 if required.
NOTE If these pins are used as GPIO pins, then to prevent the firmware from checking to see if there is a HAT EEPROM available, add force_eeprom_read=0 and disable_poe_fan=1 to the config.txt file.
Unsure about the Note by the end but could it mean we need to force that EEPROM read?
Edit: trying to verify if the board connects the pins correctly
I can’t look anything up at the moment, but what you would need to do is compare that against what the actual CM3 does. Then you would want to see where the CM3 would have had 44 and 45 and see what this new one has instead. There is also the opportunity to use software I to see, but it won’t be as fast. It might work fine though.