Newton FAQ


Part III: Newton OS

  1. System Versions
    1. What are the different versions of Newton OS?
    2. What system updates are available for my Newton?
      1. US & International English Updates
      2. German Updates
      3. French Updates
      4. Japanese Updates
      5. What is the update numbering system?
    3. How do I find out which version of Newton OS I have?
    4. What are the differences between Newton OS versions?
      1. How is Newton OS 2.x different from Newton OS 1.x?
      2. How is Newton OS 2.1 different from Newton OS 2.0?
      3. What does the 717260 update do?
      4. What does the 710031 update do?
      5. What does the 711000 update do?
      6. What does the 74J185 update do?
      7. What does the 737246 update do?
      8. What does the 73J186 update do?
  2. Using Newton OS
    1. How do I find the Newton’s built-in Help Book?
    2. What are the different ways to reset a Newton?
      1. Soft Reset
      2. Deep Reset
      3. Reset With Extensions Off
      4. MessagePad 2000/2100 Power Drain Reset
      5. Hard Reset (Brain Wipe)
      6. Cold Boot
    3. Transferring data to and from the Newton
      1. What are the various ways to input data on the Newton?
      2. How can I transfer data between my Newton and another computer?
      3. Can I use IrDA to transfer information between my Newton and another computer?
      4. How can I synchronize data between my Newton and another computer?
      5. What are the various terminal programs available for the Newton?
      6. How can I transfer data between my Newton and another PDA?
    4. What are alternatives to the built-in handwriting recognition?
    5. Can I change the fax cover page?
    6. How do I find out information about a package?
    7. How do I take screenshots?
    8. How do I find the Newton ID of my device?
    9. Are there any easter eggs in Newton OS?
    10. Are there any viruses that affect Newton OS?
    11. How do I freeze a package?
    12. How do I delete a package?
    13. Why do free space and used space not add up to the size of the internal store or storage card?
    14. Why do the internal store or storage card report they are full when there is still free space?
    15. Does fragmented storage slow down my Newton?
  3. Troubleshooting
    1. Is Newton Y2K compliant?
    2. Are there known bugs into Newton OS?
      1. What is the -10061 error?
      2. What is the Dates/Find bug?
      3. When I write, sometimes some strokes do not appear or disappear.
      4. When I do a find with Newton Works, the free memory amount falls.
      5. What is the -16022 error when I use my modem?
      6. What is the -10582 error when I insert a storage card?
      7. When I insert a flash storage card, it says the battery in the card needs to be replaced.
      8. I installed a new version of the backdrop application I’m using and I can’t see it.
      9. Why can’t I change between single and double page Newton Books?
      10. Why does the date always reset on my Newton?
    3. Why can’t I install packages?
      1. Why won’t the package installer recognize a .pkg file?
      2. When I download a .pkg via my Newton web browser, it’s not recognized as a package.
      3. How do I expand StuffIt archives?
      4. I have problems with a package on Windows
    4. Why does the InOut Box always open to Out Box? Can I change that?
    5. Why does the available memory decrease when the Newton is idle?
  4. How does Newton OS work?
    1. How is storage space calculated?
    2. How are packages compressed?
    3. How are processes managed?
    4. How is the memory organized?
    5. Does Newton OS have a file system?

A. System Versions

1. What are the different versions of Newton OS?

The Newton OS is burned into the ROM of each device, therefore the version depends on which model of Newton you have.

Refer to the Specification differences between models section for more information.

System updates can be applied to the Newton OS via software patches.

2. What system updates are available for my Newton?

System updates are Newton installer packages which auto-remove themselves after running. All updates include a version checking mechanism, so you cannot damage your Newton by installing the wrong update. It simply won’t install.

See the Newton OS: Versions & Updates support document for additional information.

Updates can be found on several mirrors.

a. US & International English Updates
b. German Updates
c. French Updates
d. Japanese Updates

1 The 710031 update for the MessagePad 2000 and MessagePad 2100 was created by Paul Guyot specifically to fix the Dates/Find bug and was the very first system patch not developed and released by Apple. Due to copyright concerns, Paul initially published the update as Mac OS and Windows updater applications, not a standalone package. The updater applications modified the official 717260 update to become the 710031 update.

2 The 711000 patch for the MessagePad 2000 and MessagePad 2100 (US), the 74J185 patch for the MessagePad 2100 (German), as well as the 73J186 patch for the eMate were created by Eckhart Köppen to correct the Year 2010 Problem.

3 Even though they share the same numbering, the 536205 update for the MessagePad 130 is not the same as the update for the MessagePad 120, although it fixes the same bugs. Although both the MessagePad 120 with Newton OS 2.0-D and MessagePad 130 with Newton OS 2.0-D have the same ROM, they have different “Gestalt Machine Type” designations.

4 Apple Support: MessagePad 120 2.0-J516205

5 Apple Support: MessagePad 130 2.0-J526205

e. What is the update numbering system?

A six-digit update numbering system was introduced with Newton OS 1.3 to alleviate some of the confusion with previous method of numbering. Adding to the confusion was the fact that the earlier ROM came in 1.0 and 1.1 releases. You can see this for yourself using this handy chart comparing ROM and update versions.

ROM Version Numbering Comparison

ROM Version 1.0 1.1
Update 1.00
1.02 1.1.0
1.03
1.04
1.1.1
1.05

This means the 1.02 update for the 1.0 ROM is equivalent to the 1.1.0 ROM, but the 1.05 update for the 1.0 ROM is more recent than the 1.1.1 update for the 1.1 ROM. Simple, right?

Here’s some background from Walter Smith:

“The numbering system originated as a response to customer irrationality. :-) Because each patch applies to a single ROM image, there are multiple patches that produce the same end result. The exact numbers may be off, but let’s say the Original MessagePad had version 1.0 software, then the MessagePad 100 came out with version 1.1. We released an update for the Original MessagePad that brought it up to date, and gave it version 1.01.

The problem here is that even though 1.01 and 1.1 are functionally equivalent, people with an Original MessagePad were unhappy because their version number was lower. There was lots of misinformation floating around about “upgrading” 1.01 to 1.1, meaningless though that actually was. It got even worse when 1.1 was patched, so you had 1.03 vs. 1.12.

To address this, we had to distinguish between the actual version number that tells tech support what software the customer has and the end-user version number that tells the customer what functionality they have. The six-digit number is unique to a particular update (software version), and the x.y number indicates what functionality you get when the update is applied (end-user version).

Unfortunately, some customers are a little too smart to fall for that, so there’s still all sorts of consternation over the supposedly meaningless system update numbers.

The actual scheme is some combination of the ROM version the update applies to and the date the patch was generated. I don’t remember the details.”

The following is Paul Guyot’s interpretation of the six-digit numbering system, partially based on Henry Cate’s reply to Walter Smith’s original post. Both Henry and Walter worked on the Newton engineering team at Apple.

Eckhart Köppen’s Year 2010 upgrade numbering system works like this:

6 Since the third digit indicates the last digit of the year, this assumes that the numbers 0 through 9 represent the years 1990 through 1999. Since the Newton is still around and viable, how do we represent the years after 1999? With the 710031 update, Paul Guyot coded year 2000 with a 0. However, this makes the 710031 upgrade a lower number than the older 717260 upgrade, which is a bit confusing. Avi Drissman suggested that the years 2000 through 2009 be represented as ‘A’ through ‘J’ instead. This is what Eckhart Köppen did with the 71J059, 74J185, and 73J186 updates, but threw it all out the window again with the final 711000 update.

3. How do I find out which version of Newton OS I have?

This depends on the version of Newton OS.

Newton OS 1.x

Newton OS 2.x

See the Newton OS: Determining Which OS Version & System Update is Installed support document for additional information.

4. What are the differences between Newton OS versions?

The Apple Wiki provides a reasonable overview of the Newton OS and it’s historical iterations.

a. How is Newton OS 2.x different from Newton OS 1.x?

The differences between Newton OS 1.x and 2.x are quite significant.

Apple published New Features of the Newton 2.0 Operating System listing many aspects of the updated operating system compared with earlier versions. (Also available from The Newted Community)

b. How is Newton OS 2.1 different from Newton OS 2.0?

Newton OS 2.1 adds the following features:

7 Sounds created under Newton OS 2.1 that use codecs or 16-bit data cannot be played on Newton OS 1.x or 2.0 systems.

The MessagePad 2100 User’s Manual contains Compatibility Information (Appendix C) comparing features and sharing information between Newton OS 2.1, Newton OS 2.0, and Newton OS 1.x devices. (Also available from The Newted Community)

c. What does the 717260 update do?

This is the last official system update released by Apple.

The 717260 update includes the following enhancements:

It applies to MesssagePad 2000 (US) and MessagePad 2100 (US) devices running Newton OS 2.1.

See the MessagePad 2000 Update 2.1 Read Me support document for additional information.

d. What does the 710031 update do?

Created by Paul Guyot, this was the very first system update not released by Apple.

The 710031 update incorporates the 717260 update and fixes the Dates/Find bug.

It applies to MesssagePad 2000 (US) and MessagePad 2100 (US) devices running Newton OS 2.1 only.

See Paul Guyot’s System Updates and Patches page for additional information.

e. What does the 711000 update do?

The 711000 update incorporates the 717260 update, fixes the Newton Year 2010 Problem, and corrects an issue with the previous 71J059 patch where the date would be reset to January 1st, 2008 after a power loss, reboot, or reset.

This update applies to MesssagePad 2000 (US) and MessagePad 2100 (US) devices running Newton OS 2.1 only.

See Eckhart Köppen’s Patch 711000 page for additional information.

f. What does the 74J185 update do?

The 74J185 update fixes the Newton Year 2010 Problem

It applies to MesssagePad 2100 (German) devices running Newton OS 2.1 only.

See Eckhart Köppen’s Patch 74J185 page for additional information.

g. What does the 737246 update do?

This is the last official system update released by Apple.

The 737246 update includes the following enhancements:

It applies to eMate 300 (US) devices running Newton OS 2.1 only.

See the eMate 300 Update 2.1 (737246) support document for additional information.

h. What does the 73J186 update do?

The 73J186 update fixes the Newton Year 2010 Problem.

It applies to eMate 300 (US) devices running Newton OS 2.1 only.

See Eckhart Köppen’s Patch 73J186 page for additional information.


B. Using Newton OS

1. How do I find the Newton’s built-in Help Book?

Tap the “i” button in the lower left hand corner of the screen, and then select “help”. This general Help Book is provided in all built-in programs. Some third-party programs can also access the built-in Help Book or their own application-specific help files via the “i” button.

You can also tap the “How Do I?” button in the Assist Drawer (Newton OS 2.x only) or tap one of the icons in the “Help” folder of the Extras Drawer.

2. What are the different ways to reset a Newton?

Pressing the power button does not “reset” or “restart” a Newton. In fact, the power button isn’t really a power button per se, it’s more of a “go to sleep” button. Unlike other computers, a Newton device never turns off completely. It’s more like being in a suspended or sleeping state, and is still able to receive beams, faxes, or wake you automatically.

There are a number of ways of resetting or rebooting a Newton device, with varying levels of severity. Four of these reset methods are described in the Apple Support article Newton MessagePad: Different Types of Reset.

a. Soft Reset

This is the most straightforward of the four resets. Just press the “Reset” button on the back of your Newton with your stylus. Alternatively, many software packages have the ability to perform a soft reset.

A soft reset can be helpful if the Newton becomes sluggish or runs out of heap memory. You will not lose any data doing a soft reset.

b. Deep Reset

The deep reset is similar to a soft reset. You press the reset button on the back of the Newton, but this time hold it down for about 20 seconds, until the Newton chimes. This reset is used when there’s a power problem with your Newton, or there’s a problem when doing a standard restart. It resets at a slightly lower level than a soft reset.

c. Reset With Extensions Off

A reset with extensions off allows you to start up your Newton without loading any packages. The effect is similar to freezing all packages and returning the Newton to an almost virgin state. This is useful if you’re having conflicts between two packages, a package has become corrupt, or when you need to maximize heap for a certain procedure. With no packages loaded, your Newton will have it’s maximum amount of heap available.

To perform a reset with extensions off, hit the reset button on the back of the Newton and then flip the Newton over so the screen is facing you. Immediately tap and hold your stylus (or your fingernail) halfway down the left edge of the screen, about a centimeter from the casing. Keep holding the pen there until a dialog box appears asking if you’d like to activate packages on the store “Internal”. Tap “No”. If you have any PC cards installed, return the pen to the left edge and keep holding it down. You’ll see the same dialog for each card installed. Tap “no” in each dialog. Once this procedure has been completed, your Newton will have been started up with no packages activated. You may now delete any corrupted or conflicting packages at this time.

You will not lose data doing a reset with extensions off. However, if you have a third-party application set as the backdrop, (such as Backdrop Plus or Avi’s Backdrop) it will be replaced with the Notepad. You’ll have to set the third-party application as the backdrop again.

d. MessagePad 2000/2100 Power Drain Reset

MessagePad 2000 and MessagePad 2100 devices have a special last-resort reset which cures most ills, but doesn’t lose any of your data. It’s simple: remove the batteries, cards, and the power adapter. Don’t worry, your data is safe. Let your Newton sit by itself for several hours. Then put in fresh batteries, plug in the power adapter, and press reset.

e. Hard Reset (Brain Wipe)

Before you perform a hard reset, first remove all PCMCIA cards from the Newton (this is really important, otherwise you may destroy the card!).

Warning: A hard reset will erase everything on your Newton. Use it with caution, and usually only as a last resort. If you are performing a backup and restore cycle, you will want to perform a hard reset after the backup and before the restore. Other than that, you will probably never perform one; unless you have major data corruption, or are selling your Newton.

To perform a hard reset, press the reset button, while holding down the power switch. You will be presented with a dialog box asking “Do you want to erase data completely”. Tap “Yes” if you want to perform the hard reset and erase everything on the Newton. You will be asked to confirm your selection, and then the data will be erased.

Note that performing a backup, hard reset, and restore cycle will defragment storage and potentially speed up your Newton device.

See also: How is storage space calculated?

f. Cold Boot

(From Apple’s article which only applies to the Original MessagePad and 1x0 models.)

A cold boot erases all data, any System Update installed, and sets the Newton OS back to factory defaults. There are two methods to do this.

WARNING: You should backup your data prior to a Cold Boot.

Method 1

  1. Disconnect any AC power.
  2. Remove the main batteries.
  3. Remove the round Lithium backup battery.
  4. Hold the power switch down for 5 seconds.
  5. Release the power switch.
  6. Repeat steps 4 and 5 four more times.

Method 2

  1. Disconnect any AC power.
  2. Remove the main batteries.
  3. Remove the round Lithium backup battery.
  4. Let the Apple MessagePad sit this way for 15 minutes.

Notes:

3. Transferring data to and from the Newton

a. What are the various ways to input data on the Newton?

There are several methods of entering data on a Newton Device.

b. How can I transfer data between my Newton and another computer?

Refer to Ben Truesdale’s Newton Connection FAQ for additional information.

c. Can I use IrDA to transfer information between my Newton and another computer?

Transferring information using infrared does not seem to be supported by Apple’s software, such as Newton Connection utilities.

It’s possible to use a terminal emulator and Sloup to communicate via IrDA

Kieran Miller put together a Newton IrDA Connection page discussing this issue.

You can also use Thomas Tempelmann’s Newton Data Browser to connect to the Dock application on a MessagePad 2000, MessagePad 2100, or eMate 300, although IrDA only works under Classic Mac OS (PPC).

d. How can I synchronize data between my Newton and another computer?

Most of the software packages listed below were designed to work with older operating systems. Please keep this in mind when attempting any synchronization tasks. Also, make sure your data is backed up.

Refer to Ben Truesdale’s Newton Connection FAQ for additional information.

e. What are the various terminal programs available for the Newton?
f. How can I transfer data between my Newton and another PDA?

4. What are alternatives to the built-in handwriting recognition?

You can use third-party software:

You can use software that improves or enhances the built-in handwriting recognition:

5. Can I change the fax cover page?

You can use Fax Cover Creator by Stand Alone to change the cover page. (Also available from UNNA)

6. How do I find out information about a package?

There are several utilities that will do this.

7. How do I take screenshots?

There are several ways to take a screenshot of the screen on a Newton device.

8. How do I find the Newton ID of my device?

Beginning with Newton OS 2.0, every Newton device has a unique hardware identification number (Newton ID) which is accessible through software. The easiest way to obtain the Newton ID of a device is to use Adam Tow’s NewtonID package.

The Newton ID has no direct link with the serial number of a device, but it does uniquely identify the device, even if the serial number sticker is missing.

On Newton OS 2.1 devices, the Newton ID is stored in a special chip, the Dallas Semiconductor DS2401 Serial Number ROM. If the motherboard of the device is replaced, the Newton ID of the device will be changed as well.

9. Are there any easter eggs in Newton OS?

There are plenty of easter eggs hidden in the Newton OS. Some of the more well-known are:

Here are some resources for easter eggs and methods of activating them. Note that many easter eggs are specific to certain versions or releases of Newton OS.

10. Are there any viruses that affect Newton OS?

No.

However, as Paul Guyot explained on NewtonTalk several years ago, it’s certainly possible in theory.

11. How do I freeze a package?

When you “freeze” a package, you are selectively deactivating it and any functionality provided by the package is disabled. When a package is “frozen” it does not use any heap memory, although it still takes up storage room. The opposite of “freezing” a package is “thawing” or reactivating it.

There are a number of utilities that enable freezing:

12. How do I delete a package?

There are two different ways to delete packages from the Extras Drawer.

If you are in overview mode (list view), tap the checkbox beside the package name, and then select “Delete” from the routing (or envelope) menu.

If you are in icon mode, tap and hold a package icon until you hear a “squeak” sound, drag over the icon until it is highlighted, and then select “Delete” from the routing menu. You can also simply “scrub” or “zig-zag” over the package icon to delete it. This works the same way as when you are scrubbing out or deleting text.

Why do free space and used space not add up to the size of the internal store or storage card?

See: How is storage space calculated?

Why do the internal store or storage card report they are full when there is still free space?

See: How is storage space calculated?

Does fragmented storage slow down my Newton?

See: How is storage space calculated?


C. Troubleshooting

1. Is the Newton Y2K compliant?

Apparently so, according to this Apple Support article: Newton OS: Year 2000 (Y2K) Compliance

However, different date and time related problems might occur starting in 2010, 2099, and 2924. (Should you be so lucky to be alive, with a functioning Newton). These problems are discussed on Steve Weyer’s page, The Times, They Are a Changin’.

Avi Drissman created an experimental fix for the Year 2010 problem.

2. Are there known bugs in the Newton OS?

There are several known bugs.

a. What is the -10061 error?

This error only occurs on devices with 4 MB DRAM memory, specifically MessagePad 2100, upgraded MessagePad 2000, and upgraded eMate devices.

Information regarding this error can be found in Frank Wegener’s article What Newton OS Error -10061 really is — translated by George Oehl.

The following patches and fixes are available:

Since these fixes take different approaches to the -10061 problem, there is generally no issue with installing several of the packages on the same device.

b. What is the Dates/Find bug?

This bug only occurs on devices running Newton OS 2.1. To recreate the bug, open up the Date Book application. Tap “Find” and search for anything that will be found in your dates, for example the letter “e”. From the list of results, select several items. When you try to print, fax, or even preview these items, the process will fail.

This bug has been fixed in the 710031 update for MesssagePad 2000 (US) and MessagePad 2100 (US) devices.

Avi Drissman’s Dates/Find Bugfix package also addresses this issue.

c. When I write, sometimes pen strokes either do not appear or disappear.

This is a known bug. However, as far as I know, nobody has fixed it yet.

d. When I do a find with Newton Works, the free memory amount falls.

This is a bug in Newton OS 2.1 protoTXViewFinder.FindString method. It is in ROM. However, a workaround fix exists (for Works only). It has been designed by Paul Guyot and can be freely downloaded from Kallisys website: http://www.kallisys.com/newton/rustines/.

e. What is the -16022 error when I use my modem?

The -10582 error indicates that an operation has failed due to a missing resource. In this case, there is a bug in Newton OS 2.1 where the system is unable to automatically detect which slot a modem card is inserted into. This error only affects MessagePad 2000 and MessagePad 2100 devices, which have two PCMCIA slots.

To fix this error, insert the modem into either the bottom or top card slot. Open the Extras Drawer. Open “Prefs”. Tap on “Modem”. Change the “Connect Using” setting from “Default” to either “Bottom PC Card” or “Top PC Card”, depending on the slot you’re using.

If your Newton is set to display in landscape mode, the card slots will be referred to as “Left PC Card” and “Right PC Card” in the Modem preferences.

f. What is the -10582 error when I insert a storage card?

The -10582 error is triggered when an ATA-based storage card is inserted and the system cannot locate a “Master Boot Record” on the card. The card is not recognized as a valid store and cannot be used.

To avoid this error, install Paul Guyot’s ATA Support package.

See also: What storage cards can I use?

g. When I insert a flash storage card, it says the battery in the card needs to be replaced.

This is a known bug. The storage card likely doesn’t even have a battery. Install the latest system patch for your MessagePad 2000 or MessagePad 2100 to correct this error.

See also: What system updates are available for my Newton?

h. I installed a new version of the backdrop application I’m using and I can’t see it.

This is a known bug discovered by Victor Rehorst. Technically, you can on Newton OS have two packages with the same signature provided that they’re not on the same store. Normally, in such a case, the system shows the secondly loaded package with a big cross on it, to tell you that it hasn’t been activated. Additionally, the system doesn’t show the backdrop application in the Extras Drawer.

The bug is that it actually doesn’t show any package with the same signature than the backdrop application, and therefore, if you have two packages with the same signature and one is the backdrop application (therefore on the internal store), the other one (on a card) will be filtered nevertheless. The solution is to make another application (e.g. the Extras Drawer) the backdrop application, and then you’ll see both packages. This isn’t a very painful bug (on the contrary to the -10061), but I found it worth it to mention that there is another bug that was left in the OS ;)

i. Why can’t I change between single and double page Newton Books?

There is a bug in some versions of the built-in Newton Book Reader software. When you attempt to change the display of a double page book to single page in the Preferences, the Newton Book Reader will crash.

j. Why does the date always reset on my Newton?

This is known as the Year 2010 Problem

Devices running an unpatched version of Newton OS 2.1 cannot handle dates past 18:48:31 on January 5th, 2010. The bug is located in the NewtonScript interface of certain time functions and is caused by an integer value overflow.

Eckhart Köppen created several system updates to correct this bug.

Avi Drissman also created Fix2010, a less comprehensive patch for devices running Newton OS 2.0.

See also: What system updates are available for my Newton?

3. Why can’t I install packages?

a. Why won’t the package installer recognize a .pkg file?

The type and creator of the package file are not set properly. This can cause package files to be unrecognized by a package installer application such as Newton Package Installer or Newton Connection Utilities.

If you are running classic Mac OS, you can use ResEdit to change the the type to pkg  (including the trailing space) and the creator to pkgX.

pkgX is creator designation for the Newton Package Installer application. Packages can have other creator designations, such as 1NCU for Newton Connection Utilities.

There are also simple utilities which will change the file type and creator, including:

If you are running Mac OS X or later, the .pkg extension is used by the system. The file extension must be changed to .newtonpkg for Newton packages to be recognized by modern package installers such as Newton Connection for Mac OS X (NCX).

Pawel Piotrowski’s PKG to NewtonPKG Automator script can help with changing package file extensions in a batch.

b. When I download a .pkg via my Newton web browser, it’s not recognized as a package.

Assuming the package was uploaded to the web server as a binary file, then it’s likely that the server is not providing the correct MIME (Multipurpose Internet Mail Extensions) mapping for the .pkg file extension. The server administrator will need to add a MIME type of application/x-newton-compatible-pkg for the .pkg file extension. The specific method of setting the MIME type will depend on the web server software and platform being used.

If you are running Mac OS, you can add or adjust the file mapping entry for .pkg extensions using the Internet Config or Internet control panel.

See also: Why won’t the package installer recognize a .pkg file?

c. How do I expand StuffIt archives?

Use a current version of StuffIt Expander for your platform or The Unarchiver for Mac OS X.

d. I have problems with a package on Windows

If you have an error using Windows unstuff utilities where file does not appear to be package format, set the CROSS PLATFORM preference to NEVER for “Convert Text files to Windows format” and set to NEVER for “Save Macintosh files in MacBinary format”. (Otherwise, Mac resource fork is left in).

If you have unzipped a .pkg file on a PC and it isn’t recognized by the package installer, it might be MacBinary encoded. You may be able to strip the MacBinary header using Roger Milne’s Pkg Stripper utility.

4. Why does the InOut Box always open to Out Box? Can I change that?

There was a problem in older versions of Newt’s Cape (2.0a, 1.5) — if you selected a mailto: link, it created a message in your Out Box and opened to that directly.

Other software packages could also have changed the default setting of opening directly into the In Box. Steve Weyer’s InOut Box Fixer Form provides a fix that can be made using a soup editor or running the example directly in Newt’s Cape.

5. Why does the available memory decrease when the Newton is idle?

This kind of memory usage is perfectly normal in a system like Newton that does automatic memory management (also similar to Smalltalk, Lisp, Java). As the event loop runs or even idles, the Newton creates temporary objects. (ala Heisenberg, just observing the state of the Newton in order to update time or amount of heap, uses heap). When this gets to a certain threshold, the Newton reclaims memory by tracing/discarding items that aren’t being referenced anymore by any other object (aka “garbage collection”). [From a developer’s perspective, not having to worry about allocating and deallocating memory is great, compared to traditional language environments like C; things just eventually disappear if you stop referencing/using them]

A real “leak” happens if most of the heap isn’t reclaimed. This could happen if an application hangs onto extra, unnecessary stuff even when closed. And this sometimes can happen also during soup (database) processing when the heap becomes partitioned/fragmented (an unfortunate memory management bug that Apple never got around to fixing …)


D. How does Newton OS work?

1. How is storage space calculated?

The Newton OS storage space arithmetic shares with conventional filesystems storage arithmetic its weirdness. However, even if these rules remain a complete mystery for the human minds, they are very different.

There are actually two values returned by the system:

When the Extras drawer (or anything else) gives a value of the free space, it is just total minus used.

One can also compute or find other values, such as the nominal size of a store (what is written on a card or what you will find in the hardware section of the FAQ for the internal store), the sum of the size of all objects that a program can access and other similar things. Beware, don’t mix up system RAM installed and the internal store size.

See also: How is the memory organized?

All these values give you an idea of the situation, but you can’t simply add or subtract values, here are a couple of reasons:

Note: Linear and ATA stores follow different calculation methods.

Probably the most comprehensive source for information is Carsten Lemmen’s Memory Cards page. The data relies on speed values taken from the Nick’s Test It utility. While the time spent to do the test is probably the best comparison tool, even if it can change a lot due to various factors including pen input, software installed, etc., the speed given by Nick’s Test It does not mean much.

Indeed, Nick’s Test It creates a temporary soup (hence with at least an index on the unique ID) and then creates 335 entries with the following frame:

			{
				s : “ABC..YZabc...wxABC..YZabc...wxABC..YZabc...wxABC..YZabc...wx”
			}
			

which is 452 bytes; therefore if we count out the index, and the unique ID slot, we have 148 KB of useful data transferred.

Additionally, on a flash store, creating an entry actually means creating a transaction, i.e. copying 64 KB of data. So copying 335 entries means much more than 100 KB. I also think that if the store is nearly empty, the 64 KB aren’t copied when possible, hence the much higher value for freshly formatted cards.

Finally, defragmenting can be done by doing a full backup, erasing all data and restoring the backup. Since backups never hurt, defragmenting cannot hurt. Whether it helps getting some bytes back/improving speed depends on your belief.

2. How are packages compressed?

Packages are compressed when loaded on the Newton (i.e. when transfered from another computer). They are uncompressed on the fly when mapped on the Virtual Memory. This may result in a (little) slow down. The Newton OS compresses packages according to a flag called the compression bit. This flag is set by the programmer in NTK (NDE offers the same option). But it can be set on some packages that were not designed to be compressed.

Moreover, Newton OS 2.x packages also have a fast compression bit. Having it set reduces the compression gain, but it is said to speed up things. I have never felt an important change, however.

Some packages must not be compressed (as explained in the Newton Formats document) because they need to stay resident. This is very rare, so you may want to compress the uncompressed packages. This can be accomplished on Mac OS using PackageFlag Changer by Tomoyoshi Murai.

NewtPackageFlags by Victor Rehorst is a Windows utility to manipulate the various package options stored within the header of a Newton package file.

Jonathan Kipling Knight of Prism Research enabled the compression bit on some common uncompressed packages and made them available to download.

3. How are processes managed?

There are two kinds of processes on the Newton. First, there are lower-level operating system processes (such as handwriting recognition or the NewtonScript interpreter). Such processes are usually written in C++, though some have been written in assembly code. As of Newton OS 2.0, third-party developers can write some (but not all) of their program code in this low-level C++ fashion as well.

The other kind of process is a “NewtonScript application”. NewtonScript applications are not actually applications — they’re better thought of as plug-ins to the NewtonScript interpreter. Just like Java applications on other platforms, NewtonScript applications can be in a pcode format to be interpreted by the interpreter (slow), or can be compiled directly into machine code. The Newton even has a compiler built-in; it’s possible to use this compiler to build NewtonScript applications directly on the Newton without ever using another computer. Nearly all the icons you see in the Extras Drawer are NewtonScript applications. There’s a lot of NewtonScript stuff in the background too.

Does the Newton multitask? Yes and no. As we understand it, the Newton’s underlying operating system has a preemptive multithreaded process manager; the inker, handwriting recognition, low-level I/O, and NewtonScript interpreter all run in separate processes. However, NewtonScript “applications” (like the Notepad, or a third-party calculator, or the Button Bar, etc.) are not multitasked in any sense of the term. In fact, they are in essence different functions in the same big computer program hosted by the NewtonScript interpreter. They all share the same memory and run together in a single process. Any one application can hog all the processor power if it wants to. From a user’s perspective, no, the Newton doesn’t have preemptive multitasking. However, when two cards are inserted at the same time, maybe two NS tasks run at the same time.

The main way that NewtonScript applications “share” processor time is using an event model. Events (keystrokes, pen taps, incoming serial port information, etc.) are piled up at a low level into an event queue where they await processing by appropriate applications. NewtonScript applications register callback functions to be called when certain events occur that are germane to that application. NewtonScript calls these functions “scripts”. When a callback function has been called and has completed its work, the processor is released from duty and some callback function is called for the next event in the queue. When no events are in the queue, the processor sleeps. Applications may register for timer events which occur periodically (once an hour, week, day, etc.). Applications may also register for “idle” events — if there is no event presently in the queue, the processor every once in a while queues up an “idle” event and hands it off to a registered callback function. This allows applications to do work in the background all by themselves. Besides, since there is only one Event Loop, the system stops when there is nothing to do, awaiting for any event (including a clock change) which will wake it up. This allows the Newton to consume very few power.

4. How is the memory organized?

The Newton processor can access memory for 32 bits, i.e. 4 GB. All this memory is not used. There is globally five chunks dedicated to specific tasks:

The last area of memory is where the Newton’s “File System” (so to speak) is managed. This area consists of internal DRAM on some early units, internal Flash RAM on others, and of course all of the Flash or DRAM on inserted RAM cards. Flash RAM is not useful for the other chunks of memory, because it is far too slow to hold executing computer code or dynamic memory allocation. Flash RAM also can only be accessed in hunks of (16K) memory at a time, similar to a hard disk’s sectors. But Flash RAM is excellent for storing archival information, since it does not require battery backup.

When the user presses the reset button on a Newton, certain chunks of the DRAM are wiped clean and the system is restarted. This basically means the RAM which holds the executing computer code, the allocated C++ memory, and the NewtonScript heap. The low-level system areas and the “file system” storage of course remain intact.

5. Does Newton OS have a file system?

The Newton does not have a file system per se. It has a shallow database system. The Newton considers its internal store, and each inserted card, as a separate “store” (a volume). On any store may be placed either read/write “soups” (databases), or read-only objects called “packages”.

Packages are roughly equivalent to application programs, though they may also be storage areas or plug-ins. They consist of bundles of “parts”. A “part” might be a chunk of executable computer code, a set of large binary objects, a read-only embedded soup, etc. Packages can be stored in compressed or uncompressed format on the Newton. They are always uncompressed on desktop and laptop computers.

A soup is a simple one-table database of “entries” which may be indexed in many ways and over which a variety of queries may be made. Various soups store the Newton’s equivalent of “documents” or “files”. The Newton has a rich set of indexing and querying mechanisms for soups. One important index is the “tags” index. Soup entries may be “tagged” with some user-defined string; applications use these tags to give the illusion of filing entries into “folders”, one folder per user-defined string. This is for example the case when filing programs in the Extras Drawer.

Soups have an accompanying ID symbol which represents a soup of that “kind”; this ID is assigned to a soup by the application which created it and uses it. For example, Hemlock maintains two soups, each with a different ID. One soup holds Hemlock’s search engines, and the other holds Hemlock’s current query results.

Soups on different stores may have the same ID, meaning that they are the same kind of soup, just spread out on different cards. When applications access soups, they usually do so by querying and accessing a “union soup” object. From an application’s perspective, union soups merge all the soups of a given ID on different stores into one unified soup for that ID. This happens dynamically; when a user adds or removes cards, the union soup changes automatically, each application is notified, and they update their presentation to the user to reflect this. For example, when the user yanks a card containing a Notepad soup, the appropriate soup entries (hence “notes”) in the Notepad’s union soup automatically disappear, the Notepad is notified, and its display is updated to show that these entries are now gone. It is this general philosophy of treating documents as database entries in a global union soup which is why the Newtons are so graceful at handling multiple cards yanked and inserted while applications are running.

There are a few global soups which all applications use; the most important one is the “System” Soup, which stores global information for applications, commonly application preferences. When applications are installed they often will insert an entry into this soup to store their preferences, but when they are deleted they very often forget to remove this entry. As a result the System soup grows and grows. Some users have reported a bloated System soup as a key culprit in the “squiggles”, a Newton condition where the Newton cannot properly register the location of the pen.