On 9/13/2020 10:06 AM, Brian K. White wrote:


Probably we should talk on either your repo or mine, because this will be 100% about Arduino and not at all about M100, until after it works and you start trying to change actual features. But I'll reply at least once here and let everyone else say if it gets too uninteresting/off-topic.
Well, hopefully, getting the board working is a quick fix, and then we can chat about more interesting things, but M100 stuff :-)

Sounds like you might be winding up in sendLoader(), which has an explicit reboot at the end. And if you don't have a LOADER.DO file on the sd card, then that reboot will happen immediately. And that will just happen over and over because the condition that got you there won't have changed for the next reboot so it'll just do it again.
OK, I do not have LOADER.DO on my card.  I guess I need to go find it...

I only just last night realized it was going in to sendLoader() if nothing was connected to the DSR pin at boot, which is when I added the pullup on dsr, which fixed it for me. I see you have merged that change, and I assume the uno has the same software-controllable internal pullup feature available on the pin, and so you shouldn't be tripping on that, but, the symptom does match. Maybe you didn't actually test after that change? Or maybe it isn't enough to prevent the behavior on uno, like maybe something else needs to change with the code like maybe my "if (!digitalRead(...));" is backwards on uno or you need to add a physical resistor or ???
I merged your changes after I sent the message, and then I crashed for the night.  I'll test today, though it sounds like I need to find LOADER.DO first.  Uno does have pullups on the pins, as the AVR does, so all should be fine.


Actually I will pull your additions, add those ifdefs, and you can pull that back so it makes a cleaner diff and simpler merge.
Thanks.

I'm currently also trying to get rid of that BOARD macro. I think it can detect the platform automatically from macros set by the IDE like #if defined(ARDUINO_AVR_UNO), etc.

You can look at another Arduino project in my repo for ideas (HEXTIr, for example).  I stole an idea from the Commodore sd2iec project and created a config.h file that has all the board specific stuff in it.  THere are two different types of customizations, though.   One if the type of board, and the other is the config of the board.  I think you'll continue to need the "BOARD" config setting, but you can change it a bit by moving all of the board type stuff out of it.  And, yes, on Arduino, things like:

#if defined ARDUINO_AVR_UNO || defined ARDUINO_AVR_PRO || defined ARDUINO_AVR_NANO

Cna be used to clean up stuff.




... and here is when I realized it was probably none of that ;)

I think it's the missing LOADER.DO and the non pulled up DSR pin.

Jim


--
RETRO Innovations, Contemporary Gear for Classic Systems
www.go4retro.com
store.go4retro.com

Reply via email to