|
Post by bobtrex on Oct 22, 2020 1:47:04 GMT -8
James
I had already pledged to the Dazzler but the campaign was sitting at 99% so could not resist and pledged for the Core pack.
Congratulations you are now 100% funded! Cant wait to play with these (love the 6502 thread).
In the mean time I will have to stick with my 7" Gameduino's 3x.
So for the Dazzler you must have updated the Gameduino Lib to work with the Metro M4. Is this updated on Github yet? I just downloaded the 1.3 version and there are loads of compile issues still.
Best regards Robert.
|
|
|
Post by jamesbowman on Nov 8, 2020 7:17:45 GMT -8
Hi Robert,
Thanks very much for being that backer!
The Metro is running with the Dazzler (and the other Gameduino3Xs) using CircuitPython.
I will take a look at compile issues with the M4 running Arduino. It all compiles cleanly on other 32- and 64-bit platforms, so it's probably just a matter of tweaking the ifdefs.
|
|
lexdm3
Junior Member

Posts: 13
|
Post by lexdm3 on May 5, 2021 5:19:29 GMT -8
Hi James. Any progress with making the GD2 library compile on SAMD processors like the M0 (SAMD21) and M4 (SAMD51)? I have developed a number of subsystems based on Arduino IDE-based software and I want to stick with that. No Python for me!
I create interactive systems and interfaces for kids with serious disabilities at a hospital. I now use SAMD processors for almost all of my work so I really hope the GD2 library can work on those very soon.
Thanks! --Dan
|
|
erv
New Member
Posts: 4
|
Post by erv on Aug 11, 2021 4:57:40 GMT -8
Hello (first post here). I got it to work with the metro M4, I'll post some updates about this later today (howto + lib code update)
|
|
erv
New Member
Posts: 4
|
Post by erv on Aug 11, 2021 23:10:39 GMT -8
so, for the most part :
- the metro has SPI1 hooked to pins 11-12-13, so no SPI dialog will occur with the gameduino shield as it is. SCLK, MISO and MOSI need to be re routed from the ISCP connector of the metro, I just bent pins on the shield and soldered wires on mine. It's the same mod suggested by James for the Leonardo and a few other boards, IIRC. I just had wished it was clearly stated / proposed for the M4, it would have saved a lot of time figuring out why transport wouldn't send anything
- couple of #defines to adjust in the lib so that SPI is initialized properly and to get it compiled
- cranked up SPI speed / freq to 24 MHz, which should work based on the fact SERCOMs are clocked at 48 MHz and there's (IIRC) a division by 2 in the peripheral
- EEPROM.h lib shouldn't be loaded in the sketches (comment), I don't think there's a functional implementation of this for the M4 (maybe... with the onboard QSPI flash but not sure it's 100% compatible with the stock arduino... Calibration storage could be achieved on the SD card regardless)
for now... video demos involving cube rotation and stuff are still crashing (but maybe because I'm on the small screen now and it's a large screen / GD3 demo).
Sprites are working well , widget demo too
Attached the updated lib. It's a crude mod. Hope this helps
|
|
erv
New Member
Posts: 4
|
Post by erv on Aug 12, 2021 0:14:40 GMT -8
to be noted : file loading is the problem currently (sd card). SD init works well, further actions (LBA reading and such) seems to be erratic and resources can't be loaded. Yet have to figure out
I was able to dump the first sector. Tried installing 10 MHz SPI freq, no change : bytes per sector & reserved sector reading is going wrong. Card is 4 GB formatted fat 32
[EDIT] I got it to work, seems the SD card driver doesn't do well with the old 4GB I was testing with. Latest version loads up properly on the Arduino UNO, file load and all. Still hiccups on the Metro, but at least no message resource couldn't be loaded
|
|
erv
New Member
Posts: 4
|
Post by erv on Aug 12, 2021 2:26:59 GMT -8
now all working, latest mod was to update the SPI freq for the M4. It seems my SD card can't be accessed at more than 12 MHz
in GD2.h, line 3#if defined(ESP8266)
SPI.setFrequency(40000000L); #elif defined(ESP32) SPI.setFrequency(25000000L); #elif defined(ARDUINO_ARCH_STM32) SPI.beginTransaction(SPISettings(18000000, MSBFIRST, SPI_MODE0)); #elif defined(__SAMD51J19A__) SPI.beginTransaction(SPISettings(12000000, MSBFIRST, SPI_MODE0)); // We might be able to cranck this up but I think SERCOMS are on 48 MHz and max avail freq is half of this #endif
|
|