thanks! i’ll let you know when i venture into beta territory. currently having trouble backing up my scenes. might have to manually transcribe :sob:

Ah, I see. Could still be useful, but I would love to enter data into tracker view without the full keyboard :slight_smile:

are the numpad +/- etc different keycodes? i thought you set up aliases for ADD SUB DIV etc?

Yep, I’ve switched all the keycodes over to using the defines from usb_protocol_hid.h

2 Likes

Honestly @tehn, you must have the patience of a saint to have written all the USB saving and loading code. It has driven me completely round the bend. Anyway…

I think I’ve gotten it very stable, but I’m not going to make any of the UI enhancements that have been suggested for the sake of my sanity and in case I chuck something out the window (it’s a long drop from the top of my house).

Instead I present some thoughts and ideas for the poor soul that comes after me.

At the moment the entire functionality is contained in one function that is about 370 lines long. The main task will be to break this down, in particular you’ll want to separate the serialisation parts of the code from the disk handling parts of the code.

I would suggest moving the serialisation code over to the src directory so that you can test it without having to use the module (being tied to the module constantly is what I find hardest…).

Perhaps 2 public functions like this (naturally, each would use many more private functions):

void tele_serialise(scene_state_t *src, char (*dest)[FIXED_SIZE]);
void tele_deserialise(char (*src)[FIXED_SIZE], scene_state_t *dest);

(Given that we know the maximum size of the resulting text file, it would be better to use statically allocated arrays instead of malloc IMO, but hey if you’re writing the code then you choose how you want to do it…)

Then we can leave the nasty file system code in module but hopefully without all the serialisation code in the way it will be easier to grok.

3 Likes

Beta 6 posted in the first post. The less dirty release.

Changes since beta 5.

  • USB saving and loading works at all times, not just at boot up. Your scene should pause while saving and loading takes place. Your unsaved scene should not be effected.

Given that the USB memory stick code works differently now, I’ve removed all of the artificial delays that were previously in code. Can people report back with any problematic USB sticks.

I have one USB stick that doesn’t work with the new code, but it also doesn’t work very well on my Mac either… A working USB stick will display “WRITING.....”, then “READING.....” on the screen.

3 Likes

Thanks for the hard work, Sam!

I’ll try this as soon as possible - just not sure what this means:

So tt saves all active scenes to USB and loads all saved scenes to the device when I insert a stick - just the active scene stays as it is and could be saved later to an empty slot?

Yes. That’s correct. What I’m trying to say (badly), is that you wont lose any unsaved data.

2 Likes

Param can jump between 2 values it the knob is just so (I have just seen this with my own eyes!) and the ADC is picking up a bit of noise.

Just a note that I’ve seen this on my Teletype 1.1 as well, so I do not believe it is a regression.

Not a great image, but I think you can see from this that there’s some issue with the loading from USB:

When I look at the scripts loaded, they don’t match the USB, but thewn they’re still the old TT 1.0 scripts. Any chance its getting confused by the deprecated commands?

Sorry, not quite sure what I’m looking at… is it that the text has extra stuff on the end? Could you have a look at an earlier scene, it looks like it might contain parts of the description from one of those. If that’s so, then I think I’ve thought what it might be.

Yes, most likely any line that has a II command on it will disappear.

Upload the tt0X.txt files if you want me to delve deeper.

Yes, exactly. So I have “Triangle Mountain”, then in slot 1, “Randomse Mountain”…

As you say, I’m assuming the II commands are getting dropped, which makes sense. Has anyone got 2.0 versions of the standard scenes?

The other good news is that the USB r/w seems much more reliable, and I’ve got it to work with USB keys that wouldn’t work on the 1.0/1.1 releases.

OK, loads fine (aside from the description pages) once the scripts have been fixed to remove II.

On the case now.

There is also an issue with descriptions being corrupted when saved.

New version coming up soon. Best not to use beta 6 if you haven’t flashed it.

Beta 7 in the first post.

Fixed the saving / loading glitches occurring in scene descriptions.

(Found and) fixed another bug whereby sometimes consecutive scenes would not be loaded.

Please when testing, can you check that scenes are being saved properly.

1 Like

Following this post as a new teletype user (although I can’t power it at the moment.) Just curious about flashing. Do you have to flash the teletype when installing the new releases? What is the difference between flashing/installing vs. just installing?

Looks like it fixed the description issue, and seems to be saving scenes ok. I am getting a crash with one of the scenes I have in my collection. I’ll send it on via PM.

Thanks to @GoneCaving and the script he provided, I’ve figured out another bug…

Basically, if a line of a script has an error, it’s imported as a blank line, which causes issues elsewhere.

The fix should be straightforward. I can stop blank lines crashing in the general case (even though they shouldn’t be allowed), and then we can try to skip broken lines on import rather than insert blank ones.

1 Like

Any chance there could be some indication that the script has a problem when loading? Bonus if it says which scene/script. Course, I guess this only occurs when the script is edited outside of TT.

I’ve been following along, eating some popcorn over in the corner. Ready to dive into this. What is the recommended way to absorb all of the changes? Flip through the different beta release change logs, or have new commands been compiled somewhere?

Thanks!