WHAT IS THIS?
-------------
Unofficial Telegram Amiga: it uses the Telegram API and is part of the
Telegram ecosystem, but it is not made by Telegram.
Telegram Amiga brings real, live Telegram chat to the Amiga -- not through
a gateway, a proxy service or a web wrapper, but by speaking Telegram's
own MTProto protocol natively, from scratch, on your machine. You sign in
to your normal Telegram account, your chat list appears, and you talk to
people (and they talk back) on hardware that may well be older than they
are.
Everything is built in: RSA, Diffie-Hellman, AES, SHA and the SRP two-
factor login are implemented inside the program. Zero external
dependencies -- no MUI, no ixemul.library, no AmiSSL, no TCP helper
beyond your system's own bsdsocket stack.
One text/console client, built for the plain 68000:
TelegramAmiga-TUI - the full-screen text client. The Intuition GUI
needs a 68020 or better, so this package ships the
console face alone.
WHAT CAN I ACTUALLY DO WITH IT?
-------------------------------
This archive is the text client alone, built for a plain 68000 Amiga
(A500, A600, A1000, A2000, CDTV) with about 2 MB of free fast RAM: the
window, its renderer and the JPEG decoder are left out of the build, so
the whole program loads in about 1.5 MB.
Read and send messages in private chats, groups and channels, in a
full-screen console with colours and a word-wrapping composer of up to
three rows. Pick a chat from the list or with the F-keys, receive new
messages live, reply, edit and delete your own messages, see read
receipts, download received files (/getfile) and send files from disk
(/sendfile). The pinned Saved Messages chat doubles as a transfer drawer
between the Amiga and your phone or PC.
Limits of this build: 12 chats in the list, 8 messages per page, message
text up to 2 KB, downloads in 16 KB pieces. With a 68020 or better, take
the AmigaOS 3.x archive (TelegramAmiga.lha) instead: it has the window,
inline photos and emoji.
GETTING STARTED
---------------
1. Log in once on a FASTER Amiga (68020 or better) or in an emulator with
the normal archive: the login's key exchange is too much for a 68000.
2. Copy this drawer to a WRITABLE volume of the 68000 machine, then copy
telegram-auth.bin and the data drawer from the faster setup into it.
3. Double-click TelegramAmiga-TUI. The same account can stay logged in on
both machines.
telegram-auth.bin holds your login. Treat that file like a house key:
NEVER share it -- anyone who has it has your Telegram session. Full EN and
IT manuals are in the archive, including notes for the plain 68000.
WHAT IS NEW IN 0.0.96
---------------------
FIXED
- Typing in the window keeps up with the keys on a stock A1200. Since 0.0.8
only machines running AfA OS redrew just the text field after each key;
everywhere else every key redrew the whole window, which on a 14 MHz 68EC020
took about three seconds a letter. Every system now redraws the field alone
while its height stays the same, the way the blinking cursor already did,
and copies only that strip to the screen. While the keys are flowing, a new
message, someone typing or a photo step waits for a two-second pause before
it redraws the window, but only where such a redraw measured over 300 ms;
fast systems keep showing them at once.
- A drawer copied from a fast machine no longer opens a stock A1200 with
inline photos. Turning inline photos or emoji on or off saved that choice
for good, even when it only matched what the machine picks by itself, and
the choice travelled with the drawer. Such a choice is now saved as "auto",
so each machine applies its own default; a choice against the default is
still kept and travels as before. A file written by an older version keeps
its choice until it is changed once.
- A download that cannot fit is refused before its first byte, with the sizes:
"Need 4097 KB, only 2130 KB free in RAM:". A 4 MB file into RAM: on a stock
A1200 with the window open used to stop at 2.3 MB, minutes in, and the part
it had was removed. On the RAM disk the room is the free memory, since an
older ram-handler always reports itself full; a volume that reports no room
at all is left to try, as it may simply not know. When a write fails on a
full volume, the window and the text client now say "RAM: is full, stopped
at 2240 KB" instead of "Could not write to RAM:".
- The window opens at once, on the cached chat list, with "Connecting to
Telegram..." in the status bar, and connects from there. It used to connect
first and open only afterwards: on a stock A1200 with a stalled link that
meant two and a half minutes of nothing, which from Workbench looked like a
program that does not start. When the connection fails, the status bar says
why, for example "Offline: cannot reach Telegram"; the reason used to go to
a console that a Workbench launch does not have.
- Chats hidden from the list stay hidden when the window cannot connect. The
offline list read the chat cache directly and showed them again.
- Avatars no longer hold the window back on a slow machine. On a 68k below the
68040 the first paint shows initials and the avatars are built afterwards,
one per idle moment, four at a time on screen; elsewhere a paint builds them
for up to 300 ms and leaves the rest for later. Each processed 32x32 avatar
is kept next to its JPEG (avatars/*.rgb), so the next start skips the decode
that cost about four seconds an avatar on a stock A1200 and kept its window
away for a minute.
- The context menu follows the pointer on a stock A1200. Opening it and moving
to another item redrew the whole window, about three seconds each time, so
the highlight trailed far behind and the right item was hard to pick. Both
now redraw only the menu's own box.
- Typing and menus no longer stall while avatars arrive on a slow machine. An
avatar is built only after two seconds without input and with no menu or
popup open, and then only the chat list is redrawn; one full redraw follows
when all of them are done. On a 68k below the 68040 each avatar is built at
20x20, the size the chat list shows, with the JPEG decoded at 1/8 (block
averages, no IDCT) and 400 colour lookups instead of 1024. The
nearest-colour search behind avatars, photos and emoji now runs in the part
of the program the 68k builds compile at -O2, with a table of squares
instead of multiplications, and picks exactly the same pens. On a stock
A1200 an avatar took 4.5 s: 2.5 s to decode, 1.6 s for colours.
- Emoji keep their colours on a paletted screen such as a 32- or 64-colour AGA
Workbench, where the yellow faces came out brown. The emoji artwork uses 228
colours, mostly anti-aliased shades, and they were requested one by one in
palette order until the screen ran out of pens, so the main yellow got
whatever brown was left. Now the shades are grouped by tint and weighed by
the pixels they cover; the heaviest groups claim pens of their own before
the avatars do; and every colour then takes the screen pen nearest in tint,
read from the real palette, or a checkerboard of two pens where that mix
comes much closer. With --gui-live-debug the log says how many pens the
screen had free and what the main colours became. Truecolour screens are
unchanged.
- Changing the Workbench screen mode or colours no longer stalls while the
window is open. Intuition must close the Workbench screen for that, and
could not while our window stayed on it, so the prefs program kept asking to
close all windows. The window now closes when the system warns that the
Workbench is about to close, and opens again on the new screen when it is
back; the chats and the connection stay as they were. When another window
still holds the reset back (a Shell, for one), the window stays closed while
the prefs program names it, and opens again once the reset has gone through
or been cancelled: coming back at once only made the prefs program try again
and again. The window also closes as soon as the warning arrives, without
first running a click still queued behind it: on a stalled link such a click
kept the reset waiting for minutes. OS4 and AROS warn through Intuition,
MorphOS through its screennotify.library. On AROS Intuition says at once
when another window keeps the Workbench open, so there the window comes
straight back. On AmigaOS 3 the warning needs screennotify.library from
Aminet (util/libs/ScreenNotify10) in LIBS:; without it nothing changes, and
the own screen (Settings > Use own screen) avoids the problem.
- A window dragged down to its smallest size is remembered too. The size is
saved without the borders, and the floor for a saved size was the window's
own 320x200 minimum, which the inside of the smallest window never reaches.
- A link that has gone dead no longer holds the window for minutes. On AmigaOS
3 and 4 opening a connection had no time limit of its own and waited for the
TCP stack to give up, over a minute (one poll on a stock A1200 took 84 s);
it now stops after 15 s, or the longer limit a step already sets (MorphOS
and AROS had one already). Every network wait runs in one-second steps, and
once it has lasted two seconds a click on the close gadget or a Workbench
reset warning ends it, so the window closes or makes way at once (a Ctrl+C
break signal ends it too). When polls lose the connection twice or more in a
row, the next one waits longer, from 5 s doubling up to a minute, which
leaves the window usable in between.
- Typing in a busy chat on a stock A1200 no longer stalls behind long
repaints. Laying out the conversation measured each line again at every
character added, and every measured piece went through a byte-by-byte search
for emoji first: with one chat open, a repaint on a cycle-exact A1200 took 6
s and now takes 0.9 s, with the same line breaks (checked against the old
way on generated texts). The renderer is also built -O2 on the 68020 lane,
its self-tests passing on a 68020. While typing, a repaint asked for by a
new message or a typing notice now waits for a pause as long as the last
repaint took, up to 10 s, instead of 2 s, so a short pause no longer hands
the keyboard to it. With --gui-live-debug, a repaint of a second or more and
a key that took a fifth of a second to show each leave a line saying how
much text was measured and drawn.
- A repaint in a long chat measures only what changed. Each message keeps the
height worked out for it, with a key of everything that height depends on
(its text and parts, the column width, the font and the emoji setting), so a
repaint no longer wraps every loaded message again, twice: in a busy group
on a stock A1200 that was some 8500 measurements for 70 texts drawn. And
when someone in the open chat starts or stops typing, only the chat header
is redrawn; in a busy group that happens every few seconds, and each time it
cost a whole repaint.
- A window that opens again, after a Workbench reset, from its AppIcon or on
switching to or from the own screen, now shows what it will do. Its first
frame was drawn from the window that had closed, and only then were the text
field and the scroll positions reset: the field still looked active and the
status bar still said "Type - ENTER sends, ESC cancels", yet typing no
longer reached the field, and a Q or ESC typed into it closed the program.
The chat list and the conversation showed one scroll position and took
clicks for another, so a click could land on a different chat or message
from the one under the pointer. Now the field shows "Write a message..." or
the text not yet sent, which ENTER picks up again; the status bar shows the
usual keys; an emoji picker left open is closed; and the open chat stays in
view in the list.
- What you type on the login screen (phone number, code, password) sits in the
middle of its field. With emoji on, a line is as tall as an emoji and the
text was placed from the top of that taller line, which left it four pixels
low in the field; it is now centred the way the message field already was.
- A message bubble has as much room above its text as below its time, and the
time sits just under the text. With emoji on, every line is as tall as an
emoji: the first line started on the bubble's top edge, which left small
letters a few pixels from it, and the time sat at the foot of another
emoji-tall row, with a wide empty band above it. The padding now takes into
account the room the taller line already gives, and the time row is as tall
as its letters, so bubbles are also shorter with emoji on. Without emoji the
text no longer touches the top edge either.
- Message times on a machine whose clock nobody set, such as a stock A1200 or
A600 without a battery clock, show the time of day instead of 00:00. Times
follow the Workbench clock, and such a clock starts on 1 January 1978: every
message older than the last boot fell before that date, which the C library
turns into midnight. When the clock is further off than any time zone could
be, the times now come from Telegram's clock with the time zone set in the
Locale preferences, without summer time.
- On a 16-bit Workbench under AmigaOS 4 the message bubbles, the chat column
and the text field have their own background colour. The window asked for
its colours with the default precision, which lets the system hand out an
existing pen that is merely close, and there the window and the surface
colours both got the same pen: everything drawn on the surface vanished into
the window. On a screen with more than 256 colours, where pens are
plentiful, the window's colours, the tints behind the initials and the soft
corners are now asked for exactly; screens with a palette keep sharing pens
as before. With --gui-live-debug the log names the pens the window, the
surface and the selection got.
ADDED
- "Settings > Show avatars" turns the profile pictures in the chat list and
the chat header on and off. Off, the coloured initials stay, and nothing is
downloaded, decoded or matched to the palette for them: on a stock A1200
each picture cost over a second, and one kept on another datacenter could
first cost a minute-long key exchange with it. Like the inline photos and
the emoji, it starts off on native AGA/ECS/OCS screens and on 68k CPUs below
a 68040, on elsewhere, and a choice from the menu is saved in
data/telegram-avatars.txt (one equal to the machine's own default is saved
as "auto").
- A package for the plain 68000 (A500, A600, A1000, A2000, CDTV): the text
client alone, built to load in about 1.5 MB, so it runs with about 2 MB of
free fast RAM. It goes to GitHub and, as TelegramAmiga-68000.lha, to Aminet.
The first login is made on a faster Amiga or in an emulator, as its manual
explains, and telegram-auth.bin and the data drawer are then copied over. A
tester's A600 (68000, 2 MB chip and 4 MB fast, network on a PCMCIA card)
runs it.
CHANGED
- The window quits with Amiga+Q or its close gadget, as Amiga programs do, and
the status bar now says so, as does the line the program prints in the Shell
when the window opens. A plain Q quit too while the text field was not
active, so a message typed before clicking into the field closed the program
at its first q, and so did ESC one press after the ESC that cancels typing;
neither quits any longer. On the login screen ESC still gives up the login,
as the screen says.
- The AROS ARM64 package goes to Aminet too, as TelegramAmiga-ARM64.lha in
comm/tcp. Aminet's list of architectures has no ARM entry, so its readme
says "other", as other ARM AROS programs there do, and the file name and the
Requires line say what it is: AROS aarch64 on a Raspberry Pi 4, 400 or 5.
The 0.0.95 package went up on 2026-10-08 as the first one; from the next
release on it replaces itself like the other five.
A COMMUNITY PROJECT
-------------------
MIT licensed, non-commercial, written for the love of the platform.
Bug reports and wishes are very welcome -- testers on real hardware
(A1200s, A4000s, Pegasos, Sam, FPGA machines) are what moves this
project forward.
Thanks to Paolo Arus (DaRkHoRaCe): without his tenacity in testing,
round after round on his A600, the 68000 version would never have come
out.
The icon is our own design. Carlo Spadoni optimised it for each system,
put it on a standard drawer for the drawer icon, and let me ship his
versions.
Source + issues:
https://github.com/kaffeine1/telegram-amiga
Development diary:
https://androidlab.it/en/telegram-amiga-mtproto-client-development-diary/
|