Hey Vitalii,

Just to start off, I’ve never written any C code for the Teletype but I am an software engineer who writes a bit of C from time to time. So I’m sure others here can correct me where I’m wrong, or give better advice.

Yes, looks like the scene_serialization.c is responsible for taking the user typed script and saving it.

The itoa() function is responsible for taking an int type and turning it into a string type. Basically it takes the computers representation of some number like 42 (which in memory might be something like 0b00101010) and turns it into the text “42”. I can get more technical about that if you really care, but you probably don’t need that for what you’re doing.

The \n and \t are adding new-line and tab characters. I don’t know why they’re doing this. Maybe they’re trying to convert their in-memory representation of the user’s script back into what was typed? I don’t know, I’m just guessing.

While looking for other code involved I noticed that the serialize_scene() function in scene_serialization.c is only called from some test and usb_disk_mode.c. So that serializer may just be for writing to a USB drive and not to the internal memory.

That’s all I know about this. Hope it gets you a little further on your journey. Good luck.