Newton OS |
Newton Books |
Part VII: Development
- What are Apple’s tools to develop software on the Newton?
- Newton Toolkit (NTK)
- Newton C++ Toolbox (NCT)
- What are the solutions to develop directly on my Newton?
- Newton Dev Environment (NDE)
- Are there other programming languages for the Newton?
- NS Basic
- Is Java available on the Newton?
- C/C++ on other platforms
- Are there any other tools to develop Newton Packages?
- Where can I find documentation?
- Apple standard manuals
- Apple additional docs
- Articles and additional documentation
- The Newton Bowels Project
- Wow, that’s a huge list! Where do I start?
- Sample Code
- Sources for Apple’s Sample Code modules
- The list of Apple’s Sample Code modules
1) What are Apple’s tools to develop software on the Newton?
a) Newton Toolkit (NTK)
Newton Toolkit allows you to develop programs in NewtonScript on Mac OS or Windows and to install them onto a Newton device. There is also a cross-platform debugger for NewtonScript programs.
You can find it on Apple’s FTP site: [Dead Link] ftp://ftp.apple.com/developer/Newton_Development/tools/ntk/
It was also on Planet Newton, now on UNNA’s mirror: http://guelph.unna.org/mirrors/download.planetnewton.com/download/programming/appledesktoptools.htm
NTK is also included as part of NewtonDev, the archive of essential development tools and documentation for Mac OS (and Basilisk II): http://www.unna.org/unna/development/NewtonDev/.
Note: NTK might not work on Mac OS X under classic if it cannot find a serial port. To fix this problem or to use NTK over EtherTalk under Mac OS X (this is the only way), you might need to create/define a serial port.
To do this, you can use PortShare Demo http://www.stalker.com/pub/PortShareDemo.sit.hqx
- Install “PortShare Demo”
- Boot under 9.x. Open PortShare Demo control panel and create a new port.
- Start NTK and select this port
- Boot under X. NTK does work (under Classic).
Or you can use TCPSerial (which is freeware) and can be found here: http://tucows.sympatico.ca/mac/preview/205826.shtml
b) Newton C++ Toolbox (NCT)
The Newton C++ Toolbox is divided into several parts available at various places on the internet:
The core archive was available at Planet Newton, it’s now at the mirror on UNNA: http://guelph.unna.org/mirrors/download.planetnewton.com/download/programming/applec++tools.htm
You can find additional SDK to design drivers (DDK) on UNNA site: http://www.unna.org/unna/apple/development/DDKs/
There is the Lantern DDK. It is the DDK for ethernet cards drivers. It includes Hammer and Newtsbug, the low level debuggers. It can be found on UNNA: http://www.unna.org/unna/apple/development/DDKs/FullLanternDDK.sit
NCT requires MPW which only runs on Mac OS:
You can find all that without MPW and a Basilisk II image with MPW into NewtonDev which is on UNNA: http://www.unna.org/unna/development/NewtonDev/. NewtonDev includes additions and bug fixes of the NCT. It also includes NTK, other tools and the most important documentation.
2) What are the solutions to develop directly on my Newton?
a) Newton Dev Environment (NDE)
Steve Weyer’s Newton Dev Environment allows you to build packages directly on the Newton.
Here is a comparison between NTK and NDE I made. It only involves my [PG] responsibility.
- develop directly on your Newt
- save applications as packages
- play with the turtle
- easier to incorporate Help Books (typically created with Newt’s Cape)
- continued support from Steve
- no graphical interface to develop your pro GUI, but VisualNewt (from Serg Koren) provides a graphical layout editor. http://www.visualnewt.com/
- 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 such)
- no debugger (but you can use ViewFrame)
- Purpose: all software that does not require resources (you must import them) and too complex GUI. But you can also use Newt’s Cape to write form-based applications.
- graphical interface (like RAD) allow C++ code with NCT.
- allow native functions.
- debugger (with breakpoints and steps) is available (for NewtonScript code only)
- cross development (i.e. develop on your Mac or your Windows device)
- discontinued software
- can be exported from Mac OS to Windows only
- Purpose: all software, including these that require big resources and complex GUI.
Prism Research’s nsScribe allows you to execute NewtonScript code from the Notepad, the Assistant or Newton Works.
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.
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. [cf. VIIA3a]
Once a commercial application, George Henne has released NewtCard and its source code on GitHub.
Archived NewtCard Demo files are also available.
- LittleLisp by David Benn [Dead Link]. http://www.adelaide.net.au/~dbenn/LittleLisp/LittleLispDocs/ Updated by Daniel Padilla
- Lisp by by Jonathan Millen
e) Is Java available on the Newton?
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 NTK or to generate and pack a P-Class.
All the documentation required to make a tool to convert from link output to NTK is available, but no such tool exists. Therefore, with a C/C++ suite, you will have to use NCT anyway. The other solution is to use Roger Milne’s tool. http://roger.trideja.com/newton/newtonasm.html.
The format of the P-Class encapsulated programs is unknown.
Finally, the low level debuggers (Newtsbug and Hammer) only run on Mac OS. Apparently, they are based on RDI, but nobody succeeded to write a compatible low level debugger.
There are several C/C++ compilers for ARM, here are just the most common ones:
BTW, you can use NCT on Basilisk II which you’ll find at http://www.uni-mainz.de/~bauec002/B2Main.html It’s a Mac 68K emulator for Windows NT, BeOS, UNIX with X11 and AmigaOS.
4) Are there any other tools to develop Newton Packages?
Yes, there is Pinehill AppGen that can be found on UNNA: http://www.unna.org/unna/development/AppGeneratorV3/.
It lets you create simple data collection applications on your Newton and export the data to a PC (using PineHill Mover).
1) Where can I find documentation?
a) Apple standard manuals
Apple published Find Info, a PDF listing information about where to locate Newton development documentation.
Although the Newton Programmers Guide (NPG) is the first source, it is not necessarily the most complete or up to date. There are a number of additional places you can search for information on the Newton Platform APIs.
Below is a simplified version of that document with links added.
- Newton Programmers Guide 2.0 & Newton Programmers Reference 2.0
This is the primary source of information. Start here when searching. All the other sources of documentation supplement this guide.
- Programmers Guide:
- Programmers Reference:
- Newton Programmers Guide 2.1
This is a supplement to the Newton Programmers Guide/Reference. It is the main source for the new APIs in Newton OS 2.1. Like NPG, this is a primary source of information.
- NewtonScript Reference
This is the primary reference for the NewtonScript language and related support functions.
- NewtonScript Programming Language:
- Newton 2.x OS Q & As (Q_AND_AS)
New and updated information on APIs and extra explanation. This is one of the best sources of information apart from the Newton Programmers Guide. They can be found on UNNA: http://www.unna.org/unna/apple/documentation/developer/QAs-2.x/
- Platform File Functions (PLATFUNC)
This contains documentation on APIs that are included as part of the Platform File. The APIs are either new APIs or replacements for ones already in the ROM.
- Sample Code (SAMPCODE)
In addition to showing you how to use particular features, some pieces of sample code contain interim documentation.
- NTK 1.6 User’s Guide (WINNTK16.PDF)
In addition to documenting Newton Toolkit, this guide also contains valuable information on both debugging your application and performance tuning.
b) Additional Apple docs
Apple published additional books. These can be found on Newton Gurus’ sites.
c) Articles and additional documentation
There were a lot of articles written by Apple and third-party developers. They were published in the Newton Technology Journal, in the PIE Developers and other journals.
You can also consult the documentation concerning the processor (ARMs). Please note that this is useless to the NewtonScript developer. It is only useful for assembly development and sometimes C++ development.
- The ARM Architecture Reference Manual by D. Jaggar. You can order the paper version from any good (internet) library. You can get the electronic version by ordering a free evaluation copy of the ARM Development Suite at http://www.arm.com/sitearchitek/devtools.ns4/html/ads_eval?OpenDocument You’ll find in this book a (simple) diagram of the Runt based MessagePads. There are other reference manuals for the ARM such as the ARM System-on-Chip Architecture by S. Furber and The ARM RISC Chip, A Programmer’s Guide by A. van Someron & C. Atack.
- The ARM SDT Reference Manual. This manual isn’t a manual to the processor but a manual to the ARM SDT which the Newton C++ Toolbox is a MPW port of. The SDT changed a lot, but it’s there that you’ll find information about the compiler’s behavior (e.g. data size).
- You can find additional documentation on ARM’s website. They are not very interesting for Newton development, though, except the Quick reference guide. http://www.arm.com/Documentation/
- Intel has several application notes and technical documents about the StrongARM, including one on the memory management (one of the sources about the ARM MMU). They can be downloaded from the Intel’s developer website: http://developer.intel.com/design/strong/
d) The Newton Bowels Project
The Newton Internals are not documented. But several developers made discoveries when digging the system to interface with it. There is a repository for these documents and thrill seekers tools, called The Newton Bowels Project. It can be found on Kallisys website: http://www.kallisys.com/newton/bowels/.
2) Wow, that’s a huge list! Where do I start?
My advice is to start with the examples. Try the examples that comes with NDE or those on Apple’s FTP site.
You can also try the interactive tutorial book NewtATut to create a simple app: https://communicrossings.com/html/newton/newtpkgs.htm#NewtATut
C) Sample Code
1) Sources for Apple’s Sample Code modules
Most of them, in their latest version, can be found on UNNA at: http://www.unna.org/unna/apple/development/Examples/.
2) The list of Apple’s Sample Code modules
There is a list on Rochester FTP. It has the advantage to include keywords and description.
However, it is not complete, with latest versions. Here is a more complete list:
- Application Design
- Altered States-6
- True Grid-5
- Controls and Other Protos
- Data Storage
- Desktop Connectivity
- Developer Tools
- Digital Books
- Beyond Help-5
- Book Maker Examples-1
- Drawing and Graphics
- Photo Album-1
- Up In Smoke-33&2/3
- Basic LlamaTalk-1
- Basic Modem-2
- Basic Serial-2
- Comms FSM-6
- Tool Time-2
- Modem Setup
- Pickers, Popups, and Overviews
- Bitchin’ Piano-3
- Sound Advice-3
- Sound Tricks-4
- System Data and Built-in Apps
- Cardfile Extensions-1
- Extra Change-3
- Party Time-1
- System Services
- Text Input
- User Interface
- Paragraph Scroll-4
Newton OS |
Newton Books |
Copyright © 1999–2021 The Newton FAQ Group