The rise and catastrophic fall of what was once Canada’s most valuable company is set for the big screen.

Blackberry will tell the story of Waterloo, Ont.-based Research in Motion (RIM), creators of the titular device, which for a time was the world’s most popular smartphone. The film stars Canadian actor Jay Baruchel as company co-founder Mike Lazaridis and It’s Always Sunny in Philadelphia’s Glenn Howerton as co-CEO Jim Balsillie. The film was adapted from the 2015 book Losing the Signal: The Spectacular Rise and Fall of BlackBerry, by Sean Silcoff and Jacquie McNish. Toronto’s Matt Johnson directs and also appears in the film as RIM’s other co-founder, Doug Fregin. The cast also includes Cary Elwes, Saul Rubinek and Michael Ironside.

RIM was founded in 1984 by business partners Lazaridis and Fregin, who had previously worked together on a failed LED sign business. After a decade of dabbling in various other technology projects, they turned their attention to the two-way communications systems that would become the foundation for the BlackBerry device.