Message from discussion Port EMU 48 to Palm OS?
From: Jonathan Purvis <n...@this.address>
Subject: Re: Port EMU 48 to Palm OS?
References: <F6D08.firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <aapvtf$covop$1@ID-88878.news.dfncis.de> <email@example.com>
User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
X-Original-Trace: 12 May 2002 22:47:10 +1200, 203-167-148-5.dialup.clear.net.nz
NNTP-Posting-Date: Sun, 12 May 2002 05:47:13 CDT
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
Date: Sun, 12 May 2002 10:47:13 GMT
In article <460a25b9.0205081451.5b394...@posting.google.com>,
rgd...@aol.com (Dylan Stewart) wrote:
> "HPhreacker 2002\(?\)" wrote in message:
> > If we can compact the rom [sic] ...
> This would be fairly hard to do. Apparently, you are limited to 256kB
> of heap, and I am guessing that the ROM of a 48 is more than 512kB.
> It would be nearly impossible to get 50% compression for something
> that is not very redundant. You could use a sort of paging system,
> but that would be excessively annoying.
> I am guessing that the biggest part of the OS, other than the normal
> math operations, is the UI, so it could be contained in one image and
> the other stuff in the other image. You do not exactly need most of
> the UI to be running when you are running a program (ex. filer, y=
> editor, etc.). If you page between the UI and the rest of the ROM,
> there should be little overlap. A better idea might be to make the
> math part of it as a data file. The emulator could lookup what to do
> as it encounters various math operations. This would make the
> emulator slower, but it would not require paging as much.
> Is the 256kB limit there is asm? If not, an emulator could be written
> in it and the entire ROM could be used.
PalmOS divides RAM into two sorts, dynamic and storage. The dynamic
heap is used for program stack, global variables and anything the
program allocates on the fly. It's 256KB on an 4 or 8MB device (128KB
on a 2MB device), though, the OS takes around 64KB of that. The storage
heap is used to store databases and is write-protected by the hardware.
To write to the storage heap, you have to go through OS functions which
check you're not overwriting anything you shouldn't be. Whilst you
couldn't allocate enough dynamic heap space to emulate more than a 48G+,
you can store the ROM image in a database and have full read only access
to it. In fact, i have 48G and 38G rom images stored on my TRGpro (8MB
PalmOS device with CF slot, see http://handera.com) and wrote a program
to check the CRCs. It takes about 20s to check one, but i'm sure it
could be speed up with some assembly language. (The C code uses about 3
dereferences, a test and a shift/mask per nibble.)
Email me at (jon AT purvis DOT co DOT nz) if you'd like a copy of the