Teletype 3.0

thanks for the additional details! let’s continue it on the teletype 3.0 thread as the main discussion is there.

edit: looks like the posts were moved to this thread. it’s a bit confusing having them out of chronological order after they’re moved though…

tbh not sure why - flash files don’t reference grid in any way…

that would be great!

@tehn and i added some protection to the code yesterday. it will now display a warning before overwriting scenes, and you’ll need to explicitly confirm the action by pressing the front panel button. normally you will only ever have to do this the first time you run a beta version, official releases won’t be affected. and you should never see the warning again but in case there is a bug that somehow triggers this at least we’ll know about it, and this way you can opt out, which would hopefully leave your scenes intact. i’ve also added a boundary check to the flash write functions (@csboling - thanks for the idea!).

hopefully the above measures should prevent this from happening again, but in any case it would be good to investigate what might’ve caused it!

1 Like

do you have any scripts that might also be setting it?

Oh. You right. :crazy_face:

blanked_tt_120318.zip (216.9 KB)
Hex file, as promised.

2 Likes

a new beta with additional protection:

teletype.hex (568.5 KB)
teletype.zip (167.9 KB)

flashing this will overwrite your existing presets, make sure to do a backup first!
includes everything that was added since the official 3.0 release.

the 1st time you run it it will show you a warning that scenes are about to be overwritten - this is expected - this is the additional protection we added. since it’s a beta version you do want to overwrite, to confirm press the front panel button while the message is present. you should not see this message at any other point - if you do please pm me or post here. if you don’t press the button it will shut down, simply power cycle it to get the prompt again.

6 Likes

Be aware that the prompt disappears fairly quickly.

Thanks for getting this and for the info about the last thing TT was doing before it happened, and sorry about your scripts! My thought was that the scene data structure is large enough that, if the out-of-bounds hypothesis above were correct, we would still have most of a scene written to an area of flash that should never be written to from the same write that trashed the “fresh” field. If this were the case, I thought it might even be possible to recover the scripts saved to that scene, since they’re in the last part of the scene data.

…But it doesn’t seem like this happened. After the calibration defaults, everything else in flash is 0xFF - flash bits are typically set to 1 when erased. So it doesn’t seem like a bulk write did it, at least not off the end like that. If there was some other off-by-one condition I thought maybe the padding bytes used to align struct members could also wind up getting set, but those are 0xFF in this firmware image too.

So, sad to say after reading flash.c a half dozen more times, I got nothing. If it’s useful to anybody the ‘repl’ tool here is the program I used for sifting through the firmware image.

1 Like

thanks for checking, and thanks for the idea of doing boundary check on preset_no - i’ve added it in the latest beta!

i’ve also posted the latest beta in Teletype 3.+ feature requests and discussion thread to avoid confusion (as that’s currently the main thread for latest teletype betas).

I found a bug with… whichever flavor of 3.0 I’m running here (says 25E14EE on startup).

INIT.SCENE (and probably other INIT commands) resets the value of M but not the actual metronome tick rate.

E.g.:

M 150
INIT.SCENE
M

(result: 1000)

Set the M script to TR.P 1 and you’ll see it fire every 150ms.

Does INIT.DATA work?

Same thing, the value of M resets but the metronome keeps ticking at the old rate.

the issue is logged: https://github.com/monome/teletype/issues/174
and fixed, the latest beta posted here: Teletype 3.+ feature requests and discussion

the bug was also in INIT and INIT.DATA, fixed those as well.

5 Likes

Ah, I missed that. Thanks :slight_smile:

1 Like

posted new files - no change, just to update the commit version number.

My Teletype just blanked itself too. It was running fine last night and when I powered up this morning everything was gone. Guess I should get better at backing up.

I’m running 3.0 and the TT has an I2C backpack and is connected to a TXo and JF.

sorry to hear that, hopefully you didn’t lose too much…

everybody still running 3.0 firmware - i would strongly advise to do a backup and then update to the beta 3.+ version posted in this thread: Teletype 3.+ feature requests and discussion as it has additional protections against this bug.

4 Likes

I needed a fresh start, anyway – ha ha! But seriously, I’ll definitely be updating to the new beta tonight. Thanks!

Hey folks, the dreaded scene wipe got me yesterday / today as well. I had backed up recently, so not that big of a deal.

Just to provide some data about what I was doing:

  • I’d really only been working on a single scene.
  • Last night, I transitioned to a new scene.
  • I didn’t actually add anything to the new scene, but I’d run some commands from the Live view.
  • I powered down without saving the new scene.

That’s all I can think of as far as actual actions taken, sadly. Today I powered up and there were no scenes on the device.

I’ve already updated to the latest beta, so hopefully all save now.

1 Like

thanks for the info, and sorry you lost your scenes, glad you had a recent backup.
do you remember the scene numbers by any chance?

1 Like