Closed LouDnl closed 8 months ago
Although the ino file tells otherwise, I haven't tried this project with platformio. But the missing reference is here, maybe the linker doesn't see the cpp files and more src filters are needed in the platformio.ini?
Does it compile in Arduino IDE?
Compiling in Arduino IDE doesn't work either, but gives an error on wifimanager:
In file included from D:\loud\Documents\Arduino\libraries\gob_json\src/gob_json_handler.hpp:8,
from D:\loud\Documents\Arduino\libraries\gob_json\src/gob_json.hpp:17,
from d:\loud\documents\arduino\libraries\sid6581\src\modules\deepsid\deepsid.hpp:6,
from D:\loud\Documents\Arduino\libraries\SID6581\src/modules/Player/SID_Player.hpp:42,
from D:\loud\Documents\Arduino\libraries\SID6581\src/SID6581.hpp:931,
from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\config.h:118,
from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.hpp:3,
from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.cpp:1:
D:\loud\Documents\Arduino\libraries\gob_json\src/gob_json_element_path.hpp:22:18: note: #pragma message: [gob_json] Key length as default
# pragma message "[gob_json] Key length as default"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\loud\Documents\Arduino\libraries\gob_json\src/gob_json_element_path.hpp:30:18: note: #pragma message: [gob_json] Stack max depth as default
# pragma message "[gob_json] Stack max depth as default"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from d:\loud\documents\arduino\libraries\sid6581\src\modules\deepsid\deepsid.hpp:6,
from D:\loud\Documents\Arduino\libraries\SID6581\src/modules/Player/SID_Player.hpp:42,
from D:\loud\Documents\Arduino\libraries\SID6581\src/SID6581.hpp:931,
from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\config.h:118,
from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.hpp:3,
from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.cpp:1:
D:\loud\Documents\Arduino\libraries\gob_json\src/gob_json.hpp:40:18: note: #pragma message: [gob_json] Buffer length as default
# pragma message "[gob_json] Buffer length as default"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.cpp: In function 'void WiFiManagerNS::setup()':
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.cpp:32:38: error: too few arguments to function 'void WiFiManagerNS::init(WiFiManager*, std::function<void()>)'
WiFiManagerNS::init( wifiManager );
^
In file included from E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\WiFiManager\WiFiManagerHooks.cpp:4:
D:\loud\Documents\Arduino\libraries\WiFiManagerTz\src/WiFiManagerTz.h:126:10: note: declared here
void init(WiFiManager *manager, std::function<void()> webserverPreCallback)
^~~~
Multiple libraries were found for "SD.h"
Used: C:\Users\loud\AppData\Local\Arduino15\packages\esp32\hardware
Step by step, new issues
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:8:13: error: 'TouchButtonAction_t' in namespace 'UI_Utils' does not name a type
UI_Utils::TouchButtonAction_t UIBtns[8] = {
^~~~~~~~~~~~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp: In function 'HIDControls readTouch()':
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:109:24: error: 'touchSpriteOffset' is not a member of 'UI_Utils'
tp.y-= UI_Utils::touchSpriteOffset; // translate to sprite position
^~~~~~~~~~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:112:30: error: 'touchSpriteOffset' is not a member of 'UI_Utils'
if( tp.y!= -(UI_Utils::touchSpriteOffset+1)) lasttouchy = tp.y;
^~~~~~~~~~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:115:19: error: 'tbWrapper' is not a member of 'UI_Utils'
UI_Utils::tbWrapper.handlePressed( UIBtns[i].button, pressed, tp.x, tp.y );
^~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:115:44: error: 'UIBtns' was not declared in this scope
UI_Utils::tbWrapper.handlePressed( UIBtns[i].button, pressed, tp.x, tp.y );
^~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:115:44: note: suggested alternative: 'UI_Utils'
UI_Utils::tbWrapper.handlePressed( UIBtns[i].button, pressed, tp.x, tp.y );
^~~~~~
UI_Utils
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:118:19: error: 'tbWrapper' is not a member of 'UI_Utils'
UI_Utils::tbWrapper.handleJustPressed( UIBtns[i].button, (char*)UIBtns[i].label );
^~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:118:48: error: 'UIBtns' was not declared in this scope
UI_Utils::tbWrapper.handleJustPressed( UIBtns[i].button, (char*)UIBtns[i].label );
^~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:118:48: note: suggested alternative: 'UI_Utils'
UI_Utils::tbWrapper.handleJustPressed( UIBtns[i].button, (char*)UIBtns[i].label );
^~~~~~
UI_Utils
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:121:23: error: 'tbWrapper' is not a member of 'UI_Utils'
if( UI_Utils::tbWrapper.justReleased( UIBtns[i].button, pressed, (char*)UIBtns[i].label ) ) {
^~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:121:47: error: 'UIBtns' was not declared in this scope
if( UI_Utils::tbWrapper.justReleased( UIBtns[i].button, pressed, (char*)UIBtns[i].label ) ) {
^~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:121:47: note: suggested alternative: 'UI_Utils'
if( UI_Utils::tbWrapper.justReleased( UIBtns[i].button, pressed, (char*)UIBtns[i].label ) ) {
^~~~~~
UI_Utils
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:126:25: error: 'UIBtns' was not declared in this scope
return_action = UIBtns[released_button].action;
^~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:126:25: note: suggested alternative: 'UI_Utils'
return_action = UIBtns[released_button].action;
^~~~~~
UI_Utils
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:141:17: error: 'releaseTouchButtons' is not a member of 'UI_Utils'
UI_Utils::releaseTouchButtons();
^~~~~~~~~~~~~~~~~~~
E:\workspaces\ArduinoIDE\ESP32-SIDView\src\helpers\HID\Touch\HID_Touch.cpp:145:15: error: 'drawTouchButtons' is not a member of 'UI_Utils'
UI_Utils::drawTouchButtons();
^~~~~~~~~~~~~~~~
for some reason that macro is evaluated to false, that was probably a bad choice to put that context check in a cpp file
maybe comment out every HID_* config option except HID_SERIAL to see what the next error is made of ?
Not working unfortunately, for some reason its constantly thinking HAS_TOUCH is defined. It even made my Arduino IDE crash (which isnt that hard to do). Trying to figure out the compile error in platformio
HAS_TOUCH is inherited from chimera-core and is enabled only when the selected board uses touch (e.g. M5Core2)
if your setup has a touchscreen then you can fix ESP32-SIDView by using #if 1
instead of #if DEFINED HAS_TOUCH
in the cpp files giving you the error
otherwise just select a different board from the arduino menu (e.g. LoLin D32 Pro) and the HAS_TOUCH
macro won't be declared by chimera core
Trying that now, had some issue with ArduinoIDE being sketchy.
Am unable to fix the undefined reference to
error in PlatformIO. No clue why it does that.
Got it to compile in ArduinoIDE, but now the sketch is too large haha
what partition scheme are you using? LoLin D32 Pro (the model used for this project) has 16MB flash and this should fit in Minimal (2MB) partitions sheme
[edit] here's a partition editor just in case https://github.com/serifpersia/esp32partitiontool
what partition scheme are you using? LoLin D32 Pro (the model used for this project) has 16MB flash and this should fit in Minimal (2MB) partitions sheme
[edit] here's a partition editor just in case https://github.com/serifpersia/esp32partitiontool
Thats exactly what I though about this morning, will try that this evening! Thanks for the link.
Compile went flawlessly now. Still want to know why platform io is complaining tho
what partition scheme are you using? LoLin D32 Pro (the model used for this project) has 16MB flash and this should fit in Minimal (2MB) partitions sheme
[edit] here's a partition editor just in case https://github.com/serifpersia/esp32partitiontool
Compiled, flashed and a blinking drive on the display asking for an sd card ๐ช๐ป Now to wire up all the other stuff.
please post a pic of your build for posterity :p
please post a pic of your build for posterity :p
I will as soon as it produces musaq ;)
Getting closer step by step
And then I realised the displays I bought arent 128x128 but 128x160
Cant seem to find where the resolution is defined in config.h?
if you're using LoLinD32 Pro profile, then you need to adjust display width/height before init occurs (triggered by M5.begin), otherwise the board name will auto select the default display for this device in LovyanGFX auto detect, which is 128*128 indeed.
it's untested but you should be able to do this in our setup()
void setup() {
auto _cfg = M5.Lcd.getPanel()->config();
_cfg.panel_width = _cfg.memory_width = 132; // or 128
_cfg.panel_height = _cfg.memory_height = 162; // or 160 or 132
M5.Lcd.getPanel()->config(_cfg);
M5.begin();
static SIDExplorer *Explorer = new SIDExplorer();
}
other panel cfg values you can play with:
cfg.offset_x = 0; // ใใใซใฎXๆนๅใชใใปใใ้
cfg.offset_y = 0; // ใใใซใฎYๆนๅใชใใปใใ้
cfg.offset_rotation = 0; // ๅ่ปขๆนๅใฎๅคใฎใชใใปใใ 0~7 (4~7ใฏไธไธๅ่ปข)
cfg.dummy_read_pixel = 8; // ใใฏใปใซ่ชญๅบใๅใฎใใใผใชใผใใฎใใใๆฐ
cfg.dummy_read_bits = 1; // ใใฏใปใซไปฅๅคใฎใใผใฟ่ชญๅบใๅใฎใใใผใชใผใใฎใใใๆฐ
cfg.readable = true; // ใใผใฟ่ชญๅบใใๅฏ่ฝใชๅ ดๅ trueใซ่จญๅฎ
cfg.invert = false; // ใใใซใฎๆๆใๅ่ปขใใฆใใพใๅ ดๅ trueใซ่จญๅฎ
cfg.rgb_order = false; // ใใใซใฎ่ตคใจ้ใๅ
ฅใๆฟใใฃใฆใใพใๅ ดๅ trueใซ่จญๅฎ
btw what SID clone are you going to use on the south side of your build?
I don't see any 74HC on the breadboard, either you're not there yet, or I wasn't clear enough on the fact that ESP32 does not emulate the SID: ESP32 only emulates the CPU and speaks to a SID (preferably a clone) using a couple of 74HC.
btw what SID clone are you going to use on the south side of your build?
I don't see any 74HC on the breadboard, either you're not there yet, or I wasn't clear enough on the fact that ESP32 does not emulate the SID: ESP32 only emulates the CPU and speaks to a SID (preferably a clone) using a couple of 74HC.
Am indeed not at that point, want to get SIDView working first, but when I do it's a SIDKickPico for now :)
Display doesn't seem to accept the new config settings, even if I undefine the auto init. And even if I set LCDEnable to false then set the config and init it with Lcd.begin it still uses 128x128 ๐คฃ
Ps. Found out why it didn't compile in Platformio. Was missing some recursive checks.
although SIDKick modules are sold as drop-in replacement, you can't just drop it in an expect it'll work as a SID, some wiring is required to provide the clock signal from one of the broken out pins
I tried both Teensy and Pico versions btw, none of those worked 'out of the box' with ESP32-SIDView. I didn't have a chance to plug them into a real C64 and look into the configuration though, but one thing is sure: not all 28 pins are routed to the socket connector, some are just ignored
real drop-in replacement modules that worked as expected when tested with ESP32-SIDView: FPGASID, SwinSID, X-SID
Display doesn't seem to accept the new config settings, even if I undefine the auto init.
if you feel like baking your own LGFX config as those in lgfx_user folder, you can bypass the default LovyanGFX loader from chimera core with a macro and create your custom config from virtually anywhere the compiler has access
e.g. if you define that macro from your sketch folder, it will have to be the absolute full path to your custom LGFX config file
Thanks for the tip, got a little further. I can see that the config is being compiled, it's just not yet being applied.
Here's a serial log output:
ESP32-Chimera-Core started
1 ~ SID Player CONFIG w*h: 128*128
1 ~ SID Player CONFIG w*h: 240*240
SID Player UI: 128*128
And the corresponding lines from main.cpp setup():
auto _cfg = M5.Lcd.getPanel()->config();
M5.Lcd.getPanel()->config(_cfg);
M5.begin();
Serial.printf("1 ~ SID Player CONFIG w*h: %d*%d\n", M5.Lcd.width(), M5.Lcd.height() );
Serial.printf("1 ~ SID Player CONFIG w*h: %d*%d\n", _cfg.panel_width, _cfg.panel_height );
static SIDExplorer *Explorer = new SIDExplorer();
This means the custom config I made does get read, but not applied
I have #define ECC_LGFX_EXT_CONF "conf_ESP32.hpp"
at the top of config.h
If I don't set the following, the compile fails due to M5Display not being defined.
#define LGFX LGFX_ESP32Custom
using M5Display = LGFX_ESP32Custom;
Before you ask, yes #define ESP32_CUSTOM_BOARD
is defined above ECC_LGFX_EXT_CONF
Here's the config:
#pragma once
#if defined ESP32_CUSTOM_BOARD
#define LGFX_USE_V1
#include <LovyanGFX.hpp>
// Setting example when using LovyanGFX with unique settings on ESP32
/*
Copy this file, give it a new name, and change the settings to suit your environment.
It can be used by including the created file from the user program.
You can use the duplicated file by placing it in the lgfx_user folder of the library, but
In that case, please note that it may be deleted when updating the library.
If you want to operate safely, please create a backup or place it in the user project folder.
//*/
// Create a class that derives from LGFX_Device to perform your own settings.
class LGFX_ESP32Custom : public lgfx::LGFX_Device
{
/*
You can change the class name from "LGFX" to another name.
When used together with AUTODETECT, "LGFX" is already in use, so change it to a name other than LGFX.
Also, if you use multiple panels at the same time, give each one a different name.
*If you change the class name, you must also change the constructor name to the same name.
You can choose the name as you like, but in case the number of settings increases,
For example, if you configure ILI9341 with SPI connection using ESP32 DevKit-C,
LGFX_DevKitC_SPI_ILI9341
By using a name like , and matching the file name and class name, it will be difficult to get confused when using it.
*/
lgfx::Panel_ST7735S _panel_instance; // Prepare an instance that matches the type of panel to be connected.
lgfx::Bus_SPI _bus_instance; // SPI bus instance
lgfx::Light_PWM _light_instance; // Prepare an instance if backlight control is possible. (Delete if unnecessary)
public:
// Create a constructor and configure various settings here.
// If you change the class name, please specify the same name for the constructor.
LGFX_ESP32Custom(void)
{
{ // Configure bus control settings.
auto cfg = _bus_instance.config(); // Get the bus configuration structure.
cfg.spi_host = VSPI_HOST; // Select the SPI to use ESP32-S2,C3: SPI2_HOST or SPI3_HOST / ESP32: VSPI_HOST or HSPI_HOST
cfg.spi_mode = 0; // Set SPI communication mode (0 ~ 3)
cfg.freq_write = 40000000; // SPI clock during transmission (maximum 80MHz, rounded to 80MHz divided by an integer)
cfg.freq_read = 16000000; // SPI clock when receiving
cfg.spi_3wire = true; // Set true if receiving is done via MOSI pin
cfg.use_lock = true; // Set true to use transaction lock
cfg.dma_channel = SPI_DMA_CH_AUTO; // Set the DMA channel to use (0=DMA not used / 1=1ch / 2=ch / SPI_DMA_CH_AUTO=automatic setting)
cfg.pin_sclk = 18; // Set SPI SCLK pin number
cfg.pin_mosi = 23; // Set the SPI MOSI pin number
cfg.pin_miso = 19; // Set SPI MISO pin number (-1 = disable)
cfg.pin_dc = 27; // Set SPI D/C pin number (-1 = disable)
_bus_instance.config(cfg); // Apply the settings to the bus.
_panel_instance.setBus(&_bus_instance); // Set the bus to the panel.~
}
{ // Configure display panel control settings.
auto cfg = _panel_instance.config(); // Get the structure for display panel settings.
cfg.pin_cs = 14; // Pin number to which CS is connected (-1 = disable)
cfg.pin_rst = 33; // Pin number to which RST is connected (-1 = disable)
cfg.pin_busy = -1; // Pin number to which BUSY is connected (-1 = disable)
cfg.panel_width = 128; // Actual displayable width
cfg.panel_height = 160; // Actual display height
cfg.offset_x = 0; // Panel X direction offset amount
cfg.offset_y = 0; // Panel Y direction offset amount
cfg.offset_rotation = 0; // Offset of rotation direction value 0~7 (4~7 are upside down)
cfg.dummy_read_pixel = 8; // Number of bits for dummy read before pixel reading
cfg.dummy_read_bits = 1; // Number of bits for dummy read before reading data other than pixels
cfg.readable = true; // Set to true if data reading is possible
cfg.invert = false; // Set to true if the brightness of the panel is inverted
cfg.rgb_order = false; // Set to true if the red and blue colors of the panel are swapped
cfg.dlen_16bit = false; // Set to true for panels that transmit data length in 16-bit units using 16-bit parallel or SPI
cfg.bus_shared = true; // Set to true when sharing the bus with the SD card (control the bus using drawJpgFile, etc.)
// Please set the following only if the display is shifted with a variable number of pixels driver such as ST7735 or ILI9163.
cfg.memory_width = 128; // Maximum width supported by the driver IC
cfg.memory_height = 160; // Maximum height supported by the driver IC
_panel_instance.config(cfg);
}
{ // Set backlight control. (Delete if unnecessary)
auto cfg = _light_instance.config(); // Get the structure for backlight configuration.
cfg.pin_bl = 32; // Pin number to which the backlight is connected
cfg.invert = false; // true to invert the backlight brightness
cfg.freq = 44100; // Backlight PWM frequency
cfg.pwm_channel = 7; // PWM channel number to use
_light_instance.config(cfg);
_panel_instance.setLight(&_light_instance); // Set the backlight on the panel.
}
setPanel(&_panel_instance); // Set the panel to use.
}
};
#define LGFX LGFX_ESP32Custom
using M5Display = LGFX_ESP32Custom;
#endif
Okay, got it to work! Moved the new config to conf_exts and added #define ECC_LGFX_EXT_CONF "ext_confs/conf_ESP32.hpp"
to Config.h for Chimera-Core
Boot log:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
E (433) psram: PSRAM ID read error: 0xffffffff
ESP32-Chimera-Core initializing [Board=WEMOS LOLIN D32 PRO] [Variant=d32_pro]
ESP32-Chimera-Core started
M5 ~ SID Player CONFIG w*h: 128*160
_cfg ~ SID Player CONFIG w*h: 128*160
_cfg ~ SID Player CONFIG w*h: 128*160
_cfg ~ SID Player CONFIG w*h: 128*160
_cfg ~ Pins: pin_cs 14 pin_rst 33 pin_busy -1
SID Player UI: 128*160
[ 2134][E][vfs_api.cpp:105] open(): /sd/md5/Songlengths.full.md5 does not exist, no permits for creation
[ 2134][E][SID_HVSC_Indexer.cpp:308] buildSIDPathIndex(): Fatal: could not open md5 file
[ 2140][E][SID_HVSC_Indexer.cpp:488] MD5FileParser(): Fatal error, aborting
[ 2148][E][SID6581.cpp:151] begin(): Failed to init psram, crash will probably occur
[ 2170][E][Preferences.cpp:460] getString(): nvs_get_str len fail: path NOT_FOUND
define ESP32_CUSTOM_BOARD is defined above ECC_LGFX_EXT_CONF
it probably isn't enough, chimera-core and lovyangfx config inherit their useful arduino macros via compile flags
if the macro is local to the sketch, it is eventually overridden by some default profile in chimera-core's Config.h
so far the only macros that survive nesting are the ones corresponding to the board name as seen in boards.txt build.board
value becomes prefixed by ARDUINO_
and becomes ARDUINO_LOLIN_D32_PRO
which is then passed as -DARDUINO_LOLIN_D32_PRO
compilation flag.
So if the selected board in arduin ide is lolin d32pro, you should use #if defined ARDUINO_LOLIN_D32_PRO
instead of testing #if defined ESP32_CUSTOM_BOARD
in your custom configuration, and make sure the declaration of ECC_LGFX_EXT_CONF
if made from chimera-core`s Config.h file, in the lolin d32 pro conditional block.
.... or if using platformio just add -DESP32_CUSTOM_BOARD
to your build flags so that it propagates successfully
Onto the next step ๐
Songlengths.full.md5
<<<< just pick the official md5 file from HVSC and put it where it's expected
Failed to init psram, crash will probably occur
<<<< yup very crashy without psram, Deepsid will probably fail after the second use of TLS
Songlengths.full.md5
<<<< just pick the official md5 file from HVSC and put it where it's expected
Failed to init psram, crash will probably occur
<<<< yup very crashy without psram, Deepsid will probably fail after the second use of TLS
Yes, I noticed thanks. When buying 2 boards I misread thinking I had bought 2 wrover boards. For now it is okay, I have some other esp32cam board that has psram which I will take off and solder here. Will buy some wrover soon.
if you plan on getting more dev boards, the lolin s3 pro is very decent and is compatible with a couple of spi displays that come with their own spi connector, saving a lot of hassle with the wiring, plus they're auto detected by lovyangfx
Firmware on wrover with psram and I have everything hooked up, shift registers, sidkickpico, etc. Unfortunately the player crashes after selecting a song to play, any ideas?
[ 3223][D][SIDVirtualFolders.cpp:93] pushListItem(): [Count:10 ][SID File] Commando.sid : /Commando.sid
[ 3233][D][SIDExplorer.cpp:721] getFolder(): Items count: 11, Nav size: 10
[ 3250][D][SIDExplorer.cpp:232] HIDTask(): Running HID Task from core #0 with priority 0
[ 3251][D][SIDExplorer.cpp:213] mainTask(): Running SIDExplorer from core #1 with priority 16
[ 3255][D][SIDExplorer.cpp:172] loop(): UI Mode Change, was: 0, is: 1
[ 4001][D][SIDExplorer.cpp:587] processHID(): HID Action #12 = PROMPT_Y
[ 4001][W][SIDExplorer.cpp:606] processHID(): Unhandled button combination: C
[ 11494][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[ 11792][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[ 11804][D][ScrollableItem.cpp:64] setup(): text:System Volume Information, xpos:14, ypos:58, width:114, height:12, delay:30, invert:1, smooth
[ 12100][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[ 12399][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[ 12413][D][ScrollableItem.cpp:64] setup(): text:99_Luftballons.sid, xpos:14, ypos:82, width:114, height:12, delay:30, invert:1, smooth
[ 12844][D][SIDExplorer.cpp:587] processHID(): HID Action #5 = PLAYSTOP
[ 13717][V][SID_Player.cpp:224] getInfoFromSIDFile(): Fetching meta into preallocated pointer for path /99_Luftballons.sid
[ 13717][V][SID_Player.cpp:652] SIDTune(): Re-using 396 bytes for song /99_Luftballons.sid
[ 13724][V][SID_Player.cpp:1050] getMetaFromFile(): songinfo has no durations as expected
[ 13732][D][SID_Player.cpp:1060] getMetaFromFile(): Fetching trackinfo for /99_Luftballons.sid
[ 14314][E][SID_HVSC_Indexer.cpp:564] getOffsetFromSIDPath(): MD5 Index file is missing, aborting
[ 14314][D][SID_Player.cpp:1160] getMetaFromFile(): [136016] HVSC SID Path lookup success for song '99 Luftballons' : 1 durations extracted
[ 14324][D][SID_Player.cpp:507] playSID(): Deleting old SIDTune object
[ 14330][V][SID_Player.cpp:652] SIDTune(): Re-using 396 bytes for song /99_Luftballons.sid
[ 14882][D][SID_Player.cpp:983] loadFromFile(): [136016] Fetching durations from HVSC
[ 15434][E][SID_HVSC_Indexer.cpp:564] getOffsetFromSIDPath(): MD5 Index file is missing, aborting
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ /99_Luftballons.sid โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Title 99 Luftballons โ
โ Author <?> โ
โ Released 1984 <?> โ
โ โ
โ Load Address $7580 Number of tunes 1 โ
โ Init Address $7580 Default tune 1 โ
โ Play Address $00000001 Speed $00000001 โ
โ RelocStartPage $0000 RelocPages 0 โ
โ โ
โ SID Model 6581 Clock UNKNOWN โ
โ โ
โ File Format PSID BASIC false โ
โ Format Version 2 PlaySID Specific false โ
โ โ
โ MD5 8f8edbe585532ff56591d0d8d1a0db8c โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Song# Speed Duration โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ #0 60 0 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[ 15641][D][SIDExplorer.cpp:661] eventCallback(): [136016] SID_NEW_FILE: /99_Luftballons.sid (1 songs)
[ 15651][D][SID_Player.cpp:361] playSongNumber(): [NOTIFYING] Sending TunePlay notification to SIDTunePlayerTask (core #1, songnumber=0)
[ 15662][D][SID_Player.cpp:390] SIDTunePlayerTask(): [NOTIFIED] Releasing core #0 : got TunePlay notification (songnumber=0), now resetting delta duration and looping tune
[ 15741][I][SID_Player.cpp:419] SIDTunePlayerTask(): play_addr preselected: $7587
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4011a5dd PS : 0x00060830 A0 : 0x00000000 A1 : 0x3ffbc0d0
A2 : 0x3ffb2330 A3 : 0x00000000 A4 : 0x3ffb2330 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x3ffb03d4 A8 : 0x8011a5d3 A9 : 0x3ffbc050
A10 : 0x3f418b7c A11 : 0x00000049 A12 : 0x3f418817 A13 : 0x000001a3
A14 : 0x3f41a0f8 A15 : 0x00007587 SAR : 0x00000015 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4008db81 LEND : 0x4008db91 LCOUNT : 0xfffffffb
Backtrace: 0x4011a5da:0x3ffbc0d0
ELF file SHA256: 7706115a95715ce7
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13232
load:0x40080400,len:3028
entry 0x400805e4
[ 4][D][conf_ESP32.hpp:62] LGFX_ESP32Custom(): Attached SPI bus instance
[ 4][D][conf_ESP32.hpp:90] LGFX_ESP32Custom(): Attached Panel instance
[ 6][D][conf_ESP32.hpp:103] LGFX_ESP32Custom(): Attached Light instance
[ 35][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 483][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
ESP32-Chimera-Core initializing [Board=WEMOS LOLIN D32 PRO] [Variant=d32_pro]
[ 543][D][ESP32-Chimera-Core.cpp:98] begin(): Enabling LCD
[ 1440][D][ESP32-Chimera-Core.cpp:306] sd_begin(): SD will use SPI
[ 1441][D][ESP32-Chimera-Core.cpp:311] sd_begin(): TFCARD_SPI_HOST=0, SPI_HOST=0, HSPI_HOST=1, VSPI_HOST=2 from core #1
[ 1456][D][ESP32-Chimera-Core.cpp:326] sd_begin(): SD Card Mount Success on pins scl/miso/mosi/cs 18/19/23/4 from core #1
ESP32-Chimera-Core started
[ 1467][D][main.cpp:52] setup(): M5 ~ SID Player CONFIG w*h: 128*160
[ 1467][D][main.cpp:53] setup(): _cfg ~ SID Player CONFIG w*h: 128*160
[ 1472][D][main.cpp:54] setup(): _cfg ~ SID Player CONFIG w*h: 128*160
[ 1478][D][main.cpp:55] setup(): _cfg ~ SID Player CONFIG w*h: 128*160
[ 1485][D][main.cpp:56] setup(): _cfg ~ Pins: pin_cs 14 pin_rst 33 pin_busy -1
[ 1492][D][main.cpp:58] setup(): Total heap: 293872
[ 1497][D][main.cpp:59] setup(): Free heap: 267340
[ 1501][D][main.cpp:60] setup(): Total PSRAM: 4192091
[ 1506][D][main.cpp:61] setup(): Free PSRAM: 4165155
[ 1511][I][SID_Player.cpp:78] SIDTunesPlayer(): Creating C64 memory buffer (65536 bytes)
[ 1519][I][SID_Player.cpp:91] SIDTunesPlayer(): SID Player Ready, play/pause core=0, audio core=0
SID Player UI: 128*160
Ps. It has the same issue when playing a sid from the sid folder
This is the backtrace address line where the crash occurs: https://github.com/hpwit/SID6581/blob/a098adb4c39405c5f6d448290837e85c3a214fba/src/modules/Player/SID_Player.cpp#L422
what's the config.h like for pins config? If those are shared then anything could happen
anyway there's a tool to decode exceptions and tell you more about the reason of the crash
Ill have a look at the pin config, but afaik I didnt change pin assignment.
I actually used the decoder to get the filename and line number, see above ๐ค
according to hvsc's md5 file, song with hash 8f8edbe585532ff56591d0d8d1a0db8c
should have a length of 2mn56s and should have the following path on the filesystem: /DEMOS/UNKNOWN/Master_Composer/99_Luftballons.sid
so maybe if the md5 index is rebuilt and the song played from the expected folder instead of the root folder, then the song length won't be null when the player evaluates its length
[ 15434][E][SID_HVSC_Indexer.cpp:564] getOffsetFromSIDPath(): MD5 Index file is missing, aborting
yup, get that file, put it on the sdcard in a folder named md5, then access that folder from the UI, and rebuild md5 cache
Okay, bad log example on my part. Here's the same error from a sid file inside /sid and after I rebuilt the md5 cache. Which is strange because the md5 index file is absolutely present and I have rebuilt the cache.
[500299][D][ScrollableItem.cpp:64] setup(): text:/sid/DEMOS/0-9, xpos:24, ypos:16, width:104, height:12, delay:30, invert:0, smooth
[503687][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[504735][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[505343][D][SIDExplorer.cpp:587] processHID(): HID Action #1 = DOWN
[506091][D][SIDExplorer.cpp:587] processHID(): HID Action #5 = PLAYSTOP
[508833][V][SID_Player.cpp:220] getInfoFromSIDFile(): Deleting old SIDTune object
[508833][V][SID_Player.cpp:224] getInfoFromSIDFile(): Fetching meta into preallocated pointer for path /sid/DEMOS/0-9/12345.sid
[508840][V][SID_Player.cpp:653] SIDTune(): Re-using 396 bytes for song /sid/DEMOS/0-9/12345.sid
[508849][V][SID_Player.cpp:1051] getMetaFromFile(): songinfo has no durations as expected
[508857][D][SID_Player.cpp:1061] getMetaFromFile(): Fetching trackinfo for /sid/DEMOS/0-9/12345.sid
[508875][E][SID_Player.cpp:1071] getMetaFromFile(): Unsupported SID Type: 'RSID' in file /sid/DEMOS/0-9/12345.sid
[515987][D][SIDExplorer.cpp:587] processHID(): HID Action #2 = UP
[516586][D][SIDExplorer.cpp:587] processHID(): HID Action #5 = PLAYSTOP
[519328][V][SID_Player.cpp:220] getInfoFromSIDFile(): Deleting old SIDTune object
[519328][V][SID_Player.cpp:224] getInfoFromSIDFile(): Fetching meta into preallocated pointer for path /sid/DEMOS/0-9/10_Orbyte.sid
[519336][V][SID_Player.cpp:653] SIDTune(): Re-using 396 bytes for song /sid/DEMOS/0-9/10_Orbyte.sid
[519345][V][SID_Player.cpp:1051] getMetaFromFile(): songinfo has no durations as expected
[519352][D][SID_Player.cpp:1061] getMetaFromFile(): Fetching trackinfo for /sid/DEMOS/0-9/10_Orbyte.sid
[519918][E][SID_HVSC_Indexer.cpp:564] getOffsetFromSIDPath(): MD5 Index file is missing, aborting
[519918][D][SID_Player.cpp:1161] getMetaFromFile(): [133156] HVSC SID Path lookup success for song '10 Orbyte' : 1 durations extracted
[519927][D][SID_Player.cpp:508] playSID(): Deleting old SIDTune object
[519934][V][SID_Player.cpp:653] SIDTune(): Re-using 396 bytes for song /sid/DEMOS/0-9/10_Orbyte.sid
[521593][D][SID_Player.cpp:984] loadFromFile(): [133156] Fetching durations from HVSC
[522143][E][SID_HVSC_Indexer.cpp:564] getOffsetFromSIDPath(): MD5 Index file is missing, aborting
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ /sid/DEMOS/0-9/10_Orbyte.sid โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Title 10 Orbyte โ
โ Author Michael Becker (Premium) โ
โ Released 2014 Tristar & Red Sector Inc. โ
โ โ
โ Load Address $1000 Number of tunes 1 โ
โ Init Address $1000 Default tune 1 โ
โ Play Address $00000000 Speed $00000000 โ
โ RelocStartPage $0000 RelocPages 0 โ
โ โ
โ SID Model 6581 Clock PAL โ
โ โ
โ File Format PSID BASIC false โ
โ Format Version 2 PlaySID Specific false โ
โ โ
โ MD5 5f08a730b280e54fd1e75a7046b93fdc โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Song# Speed Duration โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ #0 0 0 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[522350][D][SIDExplorer.cpp:661] eventCallback(): [133156] SID_NEW_FILE: /sid/DEMOS/0-9/10_Orbyte.sid (1 songs)
[522361][D][SID_Player.cpp:361] playSongNumber(): [NOTIFYING] Sending TunePlay notification to SIDTunePlayerTask (core #1, songnumber=0)
[522372][D][SID_Player.cpp:390] SIDTunePlayerTask(): [NOTIFIED] Releasing core #0 : got TunePlay notification (songnumber=0), now resetting delta duration and looping tune
[522387][I][SID_Player.cpp:419] SIDTunePlayerTask(): play_addr preselected: $1003
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40119307 PS : 0x00060630 A0 : 0x00000000 A1 : 0x3ffbc0d0
A2 : 0x3ffb2330 A3 : 0x00000000 A4 : 0x3ffb2330 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x3ffb113c A8 : 0x801192fd A9 : 0x3ffbc050
A10 : 0x3f418210 A11 : 0x00000049 A12 : 0x3f417eab A13 : 0x000001a3
A14 : 0x3f4196a0 A15 : 0x00001003 SAR : 0x0000001c EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4008db81 LEND : 0x4008db91 LCOUNT : 0xfffffffb
Backtrace: 0x40119304:0x3ffbc0d0
Same error from Stacktrace decoder:
0x40119307: SIDTunesPlayer::SIDTunePlayerTask(void*) at /root/Development/esp/ESP32-SIDView-revised/lib/SID6581/src/modules/Player/SID_Player.cpp:423
0x40119304: SIDTunesPlayer::SIDTunePlayerTask(void*) at /root/Development/esp/ESP32-SIDView-revised/lib/SID6581/src/modules/Player/SID_Player.cpp:423
I will format the sdcard tomorrow and copy the sid collection again
Wires, wires and more wires ๐คฃ
indeed it finds the length with a slow lookup ๐ค
[519918][D][SID_Player.cpp:1161] getMetaFromFile(): [133156] HVSC SID Path lookup success for song '10 Orbyte' : 1 durations extracted
I'm not sure what caused this, maybe bypass the issue with an if( true )
on the offending line
either tune->trackinfo
or tune->trackinfo->durations
is null before the crash occurs
if( true )
will force to default length (3nm) and will reveal the next error :p
Formatting the sdcard didnt help, but changing that line like you said actually did, it's playing! No sound yet, but thats solvable - issue resides on the sidkickpico side.
yay ! ๐ฅณ
cfg.invert
or cfg.rgb_order
panel settings to solve thatsid::setInvertedPins()
; it was added as a countermeasure to my own error in a kicad schematic where I had inverted a 75HC without updating the routes ๐ฌOoh thanks for the tips! Will try. I spent the day yesterday reversing the sidkickpico pcb to a schematic thats understandable as the code was not ๐คฃ๐ค
my guess is it has something to do with the additional address/signal lines (red pins)
maybe some sound will come out if you route one of those to the PHI pin on the ESP, or the clock pin on the 75HC ?
That would be this part:
SKpico pin | C64 (see images for alternative locations) -- | -- A5 | CPU Pin 12 (required for $d420) A8/IO | CPU Pin 15 (required for $d500) OR expansion port pin 7 or 10 for $de00/$df00 addresses OR external chip select-signalhttps://github.com/frntc/SIDKick-pico/blob/main/README.md#installing-sidkick-pico
There is crackling coming out of the speaker, so I'm close. Just compiled the firmware with your changes and flashing it now.
No working sound yet, but figured out why the md5 file wasn't found even though it was there.
It's looking for Songlengths.full.md5
and in the zip I downloaded it's called Songlengths.md5
That would be this part: SKpico pin | C64 (see images for alternative locations) -- | -- A5 | CPU Pin 12 (required for $d420) A8/IO | CPU Pin 15 (required for $d500) OR expansion port pin 7 or 10 for $de00/$df00 addresses OR external chip select-signal
https://github.com/frntc/SIDKick-pico/blob/main/README.md#installing-sidkick-pico
This is only if I want to add a second SID chip :)
If I set inverted to false I get no sound at all, so thats probably not it ๐คฃ Maybe its my i2s device. Will replace that.
Ps. I used your pcb schematic v2 as reference to hookup
After fixing the SID6581 issue everything seems to compile quite nicely until the last part where the linker should create the firmware. Have you seen this before?