Open spairo1741 opened 11 months ago
Restart the device and enter monitor mode.
Grab a copy of the log.
idf.py monitor
what value is the SPI_Frequency
set to in driver.cpp ?
In the log for my esp32:
I (40) boot.esp32: SPI Speed : 40MHz
In your log
I (34) boot.esp32s3: Boot SPI Speed : 80MHz
I have ordered another ILI9341 so I can test it with one of my esp32s3 but i won't receive it until January.
i think color inversion is RGB/BGR thing
on line 398
spi_master_write_data_byte(dev, 0x08);
try replacing 0x08 with 0x00
if you set this value to 0x40 or 0x60 it should also cause the screen to rotate as per the doc.
From the image above, it is clear that the image is flipped horizontally, which something which a different combination of bits in Memory Access Control
can also fix. I don't have an ILI9341 hooked to an esp32 device to test at the moment. It is also possible that changing that setting (with the right combination of bits) can also fix the "square picture" things as it is the result of the image being drawn in the wrong orientation. Some experimentation is required here. @spairo1741
the colors are correct and horizontal flip is fixed.
The health bar doesn't show on level 1 (due to a possible bug). The code exits the loop early when the level is shorter than the screen height. Resulting in no health bar.
a sub-optimal quick fix can be to move the condition into the inner loop
attached is level 2
alternatively you can play the online version at this url to checkout the colors https://cfrankb.com/games/ems/cs3v2.html
or visit the level editor https://github.com/cfrankb/cs3-map-edit
-Thank you, the colors are set.
/*#if CONFIG_IDF_TARGET_ESP32
*/`
` uint16_t joy = JOY_NONE;
if (adc_vry > 3000) // extra org 50 { joy |= JOY_UP; } else if (adc_vry < 50) // extra org 3000 { joy |= JOY_DOWN; }
if (adc_vrx < 50) { joy |= JOY_LEFT; } else if (adc_vrx > 3000) { joy |= JOY_RIGHT; } `
-Thank you, the colors are set.
- is it possible to configure ADC channels and joystick parameters in the sdkconfig file?
- I use a Funduino joystick ver 2.0
- `#define EXAMPLE_ADC1_CHAN0 ADC_CHANNEL_0 // pin 35 (x) BROWN
define EXAMPLE_ADC1_CHAN1 ADC_CHANNEL_1 // pin 34 (y) WHITE
i'll add the channels to the config
/#if CONFIG_IDF_TARGET_ESP32 #define EXAMPLE_ADC1_CHAN0 ADC_CHANNEL_4 #define EXAMPLE_ADC1_CHAN1 ADC_CHANNEL_5 #else #define EXAMPLE_ADC1_CHAN0 ADC_CHANNEL_2 #define EXAMPLE_ADC1_CHAN1 ADC_CHANNEL_3 #endif /`
uint16_t joy = JOY_NONE; if (adc_vry > 3000) // extra org 50 { joy |= JOY_UP; } else if (adc_vry < 50) // extra org 3000 { joy |= JOY_DOWN; } if (adc_vrx < 50) { joy |= JOY_LEFT; } else if (adc_vrx > 3000) { joy |= JOY_RIGHT; }
my joystick is working in reverse apparently. one more thing to configure
- the fonts are not cut off at the top, is it the display's fault?
displays have a dead zone at the top and it varies per model. so we would have to set a y-offset for the font.
- is it possible to configure ADC channels and joystick parameters in the sdkconfig file?
@spairo1741 I have created another issue to track the joystick configuration https://github.com/cfrankb/esp-idf-cs3/issues/5
@spairo1741 does your generic ili9341 have a backlight? not having one could affect the colors.
The Adafrui display has 7 illuminating diodes, the second board has only one diode. But the changes are for the better!
@spairo1741 the only thing that i can think off is the merging of your driver.cpp
changes during the latest refactoring of the code.
- Does grandma have any weapons against monsters or does she just have to rely on her wits.
only her wits at the moment as there are no plans to add weapons as this would change the game mechanic completely.
however, new power-ups were added in the remake (invinvibility, fast speed, extra life etc). no level is taking advantage of them at the moment.
* is it possible to financially support the esp-idf-cs3 channel?
not at the moment but i'll update you
gameplay changes moved to https://github.com/cfrankb/esp-idf-cs3/issues/6
@spairo1741