- Environments
- Documentation
- Sample Code
- Source Code
A. Environments
1. What are Apple’s tools to develop software for the Newton?
a. Newton Toolkit
Newton Toolkit (NTK) allows you to develop programs in NewtonScript on Mac OS or Windows, installing them as packages onto a Newton device. There is also a cross-platform debugger for NewtonScript programs.
Installers and documentation for Newton Toolkit are available from Planet Newton’s Newton Programming Tools.
Newton Toolkit is also included as part of NewtonDev, an archive of essential development tools and documentation for classic Mac OS. NewtonDev also includes a bootable image for use with the Basilisk II emulator.
Be aware, that Newton Toolkit might not work in Classic under Mac OS X if it cannot find a serial port. To fix this problem, you might need to create or define a serial port using software.
To create a virtual serial port, you can try Stalker Software’s PortShare.
- Install “PortShare Demo”.
- Boot into Classic.
- Open the “PortShare Demo” control panel and create a new port.
- Start Newton Toolkit and select the port you created.
You can also use TCPSerial to simulate a serial port using a TCP/IP connection.
b. Newton C++ Toolbox
The Newton C++ Toolbox (NCT) is divided into several parts available at various places on the internet:
Installers and documentation are available from Planet Newton’s Newton C++ Tools.
Additional Driver Development Kits (DDKs) are available from UNNA.
There is also the Lantern DDK for developing ethernet card drivers. It includes the Hammer and Newtsbug low level debuggers.
Newton C++ Toolbox requires the Macintosh Programmer’s Workshop (MPW), which is available from Macintosh Garden and as part of NewtonDev.
NewtonDev includes documentation, additional support files, and bug fixes for Newton C++ Toolbox.
2. What tools let me develop directly on the Newton?
a. Newton Dev Environment
Steve Weyer’s Newton Dev Environment (NDE) allows you to build packages directly on the Newton.
Here’s a comparison of Newton Toolkit and Newton Dev Environment provided by Paul Guyot.
- Newton Dev Environment
- Pros:
- Develop directly on your Newt
- Save applications as packages
- Play with the turtle
- Easier to incorporate Help Books (typically created with Newt’s Cape)
- Still supported
- Cons:
- No graphical user interface to develop your application’s GUI (However, Serg Koren’s VisualNewt provides a graphical layout editor for this.)
- Direct text input for frames
- No way to compile C++ code on your Newton (But you can import libraries)
- No way to compile “native” NewtonScript (But you can import it)
- No integrated debugger (But you can use ViewFrame)
- Pros:
- Newton Toolkit
- Pros:
- Graphical user interface
- Allows use of C++ code
- Allows native functions
- Integrated debugger with breakpoints and steps (for NewtonScript code)
- Cross platform development (Mac OS and Windows)
- Cons:
- Projects can be exported from Mac OS to Windows, not the other way around
- No longer supported by Apple
- Pros:
b. nsScribe
Prism Research’s nsScribe allows you to execute NewtonScript code from the Notepad, the Assistant or Newton Works.
c. ViewFrame
Jason Harper’s ViewFrame is a very powerful tool for debugging directly on the Newton, inspect the Newton environment. However, it does not allow you to set breakpoints or to step.
3. Are there other programming languages for the Newton?
a. NS Basic
NS Basic is a complete implementation of the BASIC programming language, with extensions to take advantage of Newton OS.
Once a commercial application, George Henne has released NS Basic and its source code on GitHub.
b. NewtCard
NewtCard is a HyperCard-like environment for the Newton. It allows you to manage text and pictures as a collection of cards. Easily add text fields, check boxes, buttons, and other elements to the cards. Buttons can be scripted using NS Basic.
Once a commercial application, George Henne has released NewtCard and its source code on GitHub.
Archived NewtCard Demo files are also available.
c. Lisp
Jonathan K. Millen (with the help of Phil Torrone) wrote a minimal Lisp interpreter that implemented a subset of Lisp language.
LittleLisp is a Lisp interpreter for the Newton developed by David Benn.
A collection of LittleLisp example code is also available.
As well, the source code for LittleLisp is available on UNNA.
d. Assembler
Roger Milne succeeded in writing programs such as ModPlayer in assembly language on his PC with a GNU assembler. His process is documented in the article Writing Assembly for your Newton.
There is also the Compiler-Formerly-Known-As-ChARM (CFKAC) by Prism Research. It allows to compile and disassemble code directly on the Newton using nsScribe.
e. Java
Sean Luke, Steve Weyer, and several other contributors implemented a subset of Java called Waba on the Newton platform. The software is currently in beta release, with binaries and source code available on Sean’s Waba for the Newton page.
f. C/C++ on other platforms
C++ and other compiled languages can basically be used in two ways: as native functions and for P-Classes which are used in drivers. The Newton C++ Toolbox is more than a compiler and a linker. It also includes tools to use this C++ code, either to convert a link output to a Native Module, a file used by Newton Toolkit or to generate and pack a P-Class.
All the documentation required to make a tool to convert from link output to Newton Toolkit is available, but no such tool exists. Therefore, with a C/C++ suite, you will have to use Newton C++ Toolkit anyway. The other solution is to use Roger Milne’s MakePKG tool.
The format of the P-Class encapsulated programs is unknown.
Also, the low level debuggers (Newtsbug and Hammer) only run on Mac OS. Both are apparently based on RDI (Remote Debug Interface), a standard defined by ARM.
Documentation for the C++ for the ARM Software Development Toolkit (1997) is still available online.
You can also use Newton C++ Toolkit with Basilisk II, a 68k Mac OS emulator that runs on several platforms, including Mac OS X, Windows, BeOS, various flavours of UNIX with X11, and AmigaOS.
4. Are there any other tools to develop Newton packages?
AppGen from Pinehill Softworks lets you create simple data collection applications on your Newton and export the data to a PC using the PTK Mover utility.
B. Documentation
1. Where can I find documentation?
a. Apple Programming Reference
Apple provided several sources of information relating to the Newton platform and the associated APIs (Application Programming Interfaces) in a document called Find Info. Although the Newton Programmer’s Guide is listed as one of the primary sources of information, it is not necessarily the most complete or up to date.
Here is a simplified list of the documentation mentioned in the Find Info document.
- Newton Programmer’s Guide 2.0
Newton Programmer’s Reference 2.0
These two documents are the primary source of NewtonScript programming information. - Newton Programmer’s Guide: 2.1 OS Addendum
A supplement to the Newton Programmer’s Guide and Newton Programmer’s Reference. Describes changes and additions to Newton OS 2.1, including information regarding new APIs. Like the Newton Programmer’s Guide, this is a primary source of information. - NewtonScript Programming Language
The primary reference for the NewtonScript language and related support functions. - Newton 2.x OS Q&As
Information that addresses Newton 2.x OS development issues not found in the printed documentation. One of the best sources outside of the Newton Programmer’s Guide. - NTK Platform File Functions
Documentation of the APIs included as part of the Newton Toolkit Platform File. - Sample Code (Mac OS)
Sample Code (Windows)
In addition to demonstrating how to use particular Newton OS features, some sample code examples include additional (possibly interim) documentation. - Newton Toolkit User’s Guide
In addition to documenting Newton Toolkit, this guide also contains valuable information on debugging your application and performance tuning.
b. Other Apple Documents
- Newton 2.0 User Interface Guidelines
Describes how to create Newton software, optimizing the interaction between people and devices specifically through the Newton 2.0 interface. It also contains examples of how not to design human interfaces. - User Interface Guidelines for Newton OS 2.1 Keyboard Enhancements
This supplement to the Newton 2.0 User Interface Guidelines provides guidelines for the enhanced keyboard features found in Newton OS 2.1. - Newton OS 2.1 Engineering Documents
Describes the various changes and additions to Newton OS 2.1. - Newton Font Specifications
Describes the structure of Newton TrueType fonts. - Newton Formats
Describes the format of packages and stream objects. - Newton Toolkit 1.6.x File Formats
Describes the format of Newton Toolkit files on both Mac OS and Windows platforms. - Newton Toolkit Enhancements
Describes changes in version 1.6.4 of Newton Toolkit. - Newton Interconnect Port Hardware Specification for the MessagePad
Describes technical aspects of the Newton Interconnect Port.
c. Other Articles & Documentation
There were many articles and papers written by Apple staff and third-party developers.
- The Newton Technology Journal contains both general and developer information. Issues from February 1995 (Volume I, Issue 1) to March 1997 (Volume III, Issue 2) were published.
- Issues of the Newton Technology Journal are also available from the Higher Intellect Vintage Computing Wiki, including a couple of Japanese editions.
- Various articles and papers by members of the Newton developer support team.
- An archive of articles and source code from Apple’s Develop periodical can be found over at MacTech.
- The Handheld Systems Journal published excerpts from the magazine, including Newton-related articles. Thanks to Victor Rehorst, a copy of the Handheld Systems CD-ROM Archives is available via the Internet Archive.
- Ask The Llama articles are in the form of developer Q & A.
- Walter Smith — the father of NewtonScript — posted articles and papers on Newton OS and the NewtonScript language.
There is also a pile of documentation relating to the ARM processor. This is not very useful to the NewtonScript developer, but could be valuable when working with assembly language or C++.
- ARM Architecture Reference Manual (1996) by David Jaggar et al.
- ARM System Architecture (1996) by Steve Furber
- The ARM RISC Chip: A Programmer’s Guide (1994) by Alex Van Someren & Carol Atack
- ARM Software Development Toolkit Reference Guide (1998)
- ARM Software Development Toolkit User Guide (1998)
- C++ For the ARM Software Development Toolkit User and Reference Guide (1997)
- ARM SDT 2.50 User and Reference Guides Errata 01 (2000)
- Intel’s application notes and technical documents for the StrongARM processor.
d. The Newton Bowels Project
The inner workings of Newton OS are not well documented. However, several developers were able to discover certain useful details while digging around the system in their attempts to interface with it. The Newton Bowels Project is a repository of documents, sample code, and other “thrill-seeking” tools.
e. NewtonScript.org
A one-stop shop for all things related to the NewtonScript programming language. NewtonScript.org is a collaborative project hosted on GitHub, collecting all manner of NewtonScript development tools, documentation, libraries, sample code, and other resources.
2. Where’s a good place to start?
Our advice is to start with the code examples that come with Steve Weyer’s Newton Dev Environment or Apple’s Development Examples.
You can also try Steve Weyer’s interactive NewtATut (Newt Application Tutorial) that shows how to develop a simple application in NewtonScript directly on your Newton device.
C. Sample Code
1. Where can I find sample code?
Most of the sample code and developer examples distributed by Apple are available from UNNA as part of the Development Examples and NewtonDev collections.
You can also find sample and source code as part of NewtonScript.org and The Newton Bowels Project.
See also: Where can I find source code?
2. Where can I find a list of Apple’s sample code?
A complete list of Newton 2.x OS Sample Code with descriptions was published on the Newton Inc. website. (1997)
Unfortunately, this copy of the information located in the Internet Archive does not have valid links to the source code itself.
See: Where can I find sample code?
D. Source Code
1. Where can I find source code?
Eckhart Köppen includes the source code for every version of every package he’s created.
Adam Tow includes source code for most of his Newton software.
Steve Weyer published source code for much of his popular Newton software, including Newt’s Cape, NewtVNC, Sloup, Waba, Crypto, and NewtDevEnv.
George Henne published the source code for his NS Basic and NewtCard development tools.
Mason Mark published the source code for his incredibly powerful Dash Board enhancement.
Simon Bell supplies source code for his Mail V and SimpleMail email clients, as well as his Sudoku game.
Source code for David Benn’s LittleLisp is available on UNNA.
André Chichak includes source code with his Fast Times clock setting utility.
See also: Where can I find sample code?