retro-go icon indicating copy to clipboard operation
retro-go copied to clipboard

fix s3 error

Open FantasyGmm opened this issue 3 years ago • 11 comments
trafficstars

FantasyGmm avatar Sep 23 '22 12:09 FantasyGmm

doom still crash, i will fix it,may be next week

FantasyGmm avatar Sep 23 '22 12:09 FantasyGmm

While you're working on this, can you check if you could use gamepad driver 3 and remove 5? They're basically identical and 3 has constants that should allow you to configure it in your target file (check mrgc-g32.h).

If you don't think it's a good idea then it's fine too. But I like reusing code where possible :) .

ducalex avatar Sep 23 '22 19:09 ducalex

I tried it, but the current I2C reading will fail. Maybe when I fix the DOOM later, I will try to fix this problem, and some of my keys are directly connected to the GPIO. The GPIO is not initialized in the init, which may cause the key to fail to read the button correctly. I like reusing code where possible too

FantasyGmm avatar Sep 24 '22 07:09 FantasyGmm

Sure but we could just add the block. I did it in https://github.com/ducalex/retro-go/blob/fc5d8bf92bc1e8921847d0a44fb71599ab429211/components/retro-go/rg_input.c

But yeah that's your call, we won't do it.

Is your PR here ready to review? You didn't put any description so I'm not sure if it's a work on progress or if you want me to merge ASAP?

ducalex avatar Sep 25 '22 17:09 ducalex

I tried the latest code, I2C can not be read, I think these two codes are almost the same, but I don't know why this is so

========================================================
launcher Snes9x-1.60-dirty (Sep 26 2022 10:32:35)
 built for: ESPLAY-S3. aud=0 disp=0 pad=0 sd=0 cfg=0
========================================================

[info] rg_system_init: Chip info: model 9 rev0 (2 cores), reset reason: 1
[info] rg_system_init: Internal memory: free=324915, total=376731
[info] rg_system_init: External memory: free=8386191, total=8386191
I (804) gpio: GPIO[40]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (814) gpio: GPIO[41]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (824) gpio: GPIO[39]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
[info] rg_storage_init: Storage mounted at /sd. driver=2
[info] rg_settings_init: Settings loaded from /sd/retro-go/config/retro-go.json.
[info] rg_i2c_init: I2C driver ready (SDA:47 SCL:48).
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rg_input_init: Input ready. driver='MRGC-I2C', state=00000000 00000000
[info] rg_display_init: Initialization...
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCA0EF8
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCA18FC
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCA2300
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCA2D04
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCA3708
[info] rg_alloc: SIZE=2560, CAPS=DMA|8BIT, PTR=3FCA410C
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] lcd_set_backlight: backlight set to 60.00%
[info] rg_display_init: Display ready.
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rg_alloc: SIZE=12800, CAPS=SPIRAM|8BIT, PTR=3D8025E8
[info] rg_gui_set_font_type: Font set to: points=12, scaling=1.00
[info] rg_gui_set_theme: Theme set to '(none)'!
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
I (1294) I2S: DMA Malloc info, datalen=blocksize=2136, dma_buf_count=8
I (1314) I2S: I2S0, MCLK output by GPIO0
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rg_audio_init: Audio ready. sink='Ext DAC', samplerate=32000, volume=45
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rtc_time_init: Time loaded from storage
[info] rtc_time_init: Time is now: Thu Sep  8 06:26:19 2022

[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] rg_system_init: Retro-Go ready.

[info] rg_alloc: SIZE=153600, CAPS=SPIRAM|8BIT, PTR=3D80583C
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] gui_add_tab: Tab 'nes' added at index 0
[info] gui_add_tab: Tab 'snes' added at index 1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] gui_add_tab: Tab 'gb' added at index 2
[info] gui_add_tab: Tab 'gbc' added at index 3
[info] gui_add_tab: Tab 'sms' added at index 4
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] gui_add_tab: Tab 'gg' added at index 5
[info] gui_add_tab: Tab 'md' added at index 6
[info] gui_add_tab: Tab 'col' added at index 7
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] gui_add_tab: Tab 'pce' added at index 8
[info] gui_add_tab: Tab 'lnx' added at index 9
[info] application: Application 'Atari 2600' (stella-go) not present, skipping
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] application: Application 'Neo Geo Pocket Color' (ngpocket-go) not present, skipping
[info] gui_add_tab: Tab 'doom' added at index 10
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] application: Application 'Bootstrap' (bootstrap) not present, skipping
[info] gui_add_tab: Tab 'favorite' added at index 11
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[info] gui_add_tab: Tab 'recent' added at index 12
[info] gui_resize_list: Resized list 'recent' from 0 to 13 items (new capacity: 23)
[info] gui_add_tab: Tab 'themes' added at index 13
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1
[error] rg_i2c_read: Read from 0x20 failed. reg=-1, err=0xffffffff, init=1

FantasyGmm avatar Sep 26 '22 03:09 FantasyGmm

I re-tested the code in my warehouse, but I still can't read I2C. I will find a time to fix this problem in a few days and migrate it to the existing code

FantasyGmm avatar Sep 26 '22 04:09 FantasyGmm

Don't waste your time if it doesn't work, it's only a few lines duplicated.

Just let me know when this PR is ready to be merged :) .

ducalex avatar Sep 28 '22 14:09 ducalex

Yes, but now the keys don't work. I'm trying to find out what the problem is. The ESP can't read the i2c, and all the keys are invalid

FantasyGmm avatar Oct 06 '22 14:10 FantasyGmm

I'd like to make some PR suggestions.

Work based on the latest commit of the main branch of ducalex/retro-go to minimize conflicts.

After forking the main branch of ducalex/retro-go, keep the main branch unchanged, create your dev branch based on the main branch, and keep the minimum code changes under the premise of achieving the purpose.

For example a change to targets/esplay-s3.h, maybe it is not necessary to replace all GPIO_NUM.

Indicate the reason for the change of each file one by one in the commit, or add multiple commits.

If the multi-line information of the commit bothers you, it should be no problem to explain it directly in the conversation of the PR.

If you have any other doubts, please let me know and we can discuss it.

Wind-stormger avatar Jan 06 '23 01:01 Wind-stormger

Yes, I plan to restart this project in the near future. I didn't have time to repair it because of my studies

FantasyGmm avatar Jan 07 '23 09:01 FantasyGmm

I recently restarted this project, but based on the fw file compiled with the latest code, the odroid-go-multi-firmware cannot be flashed to display invalid firmware.

FantasyGmm avatar Mar 31 '23 06:03 FantasyGmm

This is not really relevant anymore and the build system has diverged too much for this PR.

Still happy to merge fixes for your target if needed, just make a new PR!

ducalex avatar May 03 '24 15:05 ducalex

This is not really relevant anymore and the build system has diverged too much for this PR.

Still happy to merge fixes for your target if needed, just make a new PR!

I forgot about this pr, I'll take the time to make a new version of the hardware, the previous one has been having some reset issues, sometimes it doesn't boot up properly

FantasyGmm avatar May 04 '24 02:05 FantasyGmm