Re: We need more memory Mr. Sulu!
FYI, MemGluePtrNew is pretty darned solid; I've been able to allocate 11MB in one shot on the T|T3 (pretty mcuh the entire heap), so I think in general you can allocate most of the heap in one shot (though perhaps it varies by licensee?) So while OS3.5 and later (prior to OS5) you could really only rely on 180k approx (due to PalmOne's units, as many Sony units had 500k or 1MB heap evne then), nowadays you can generally assume a lot more.. the T|T1 and T|T2 have 700k of heap, the T|T3 has almost 12MB of heap. Lets see.. I should build a table and FAQ one of these days, as I'm forever reposting this info, since its just so darned handy :) In fact, I've added this to my message board now, with a copy of this posting as a starting point; if you run MemTest (below) or have any idea about heap limits on various units, please post to my message board! http://shadow.skeleton.org/cgi-bin/mb/YaBB.cgi?board=hhgdev;action=display;num=1068648848 T|T1 and T|T2 700k T|T311MB NX807MB NX703.6MB NX603.?MB T|E 2MB T|C ?? UX50lots :) I can set up a topic in my message board if anyone wants to try for completeness and try every unit we can find :) I have a memory test tool which lkets you easily allocate ram in various chunks on the device until it errors, so you can find out how much heap a unit has without mucking around: http://www.codejedi.com/shadowplan/binaries/memtest10.zip Just enter the number of K to alloc, hit alloc until it errors, and it shows an accumulated title. So you can try large or small allocs (using MemGluePtrNew) until your'e blue in the face. Do a reset afterwards.. looks like MemGluePtrNew returns the memory as owned by the system, so it doesn't get free'd when you exit the app. jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Sample audio on T|T3
I'm seeing some oddities and I thought I'd see if maybe I'm just on crack here ;) I've got a couple apps which generate their own audio dynamicaly, and sound great on older units; but on the T|T3 they sound like hell. What I'm doing in these guys cases.. With the more recent SDK's, we get SndStreamCreateExtended(), which seems perfect for making up your high speed audio on the fly. On older devices (old!) like the T|T1, you could get nice tiny little buffers and update frequently.. in your callback it might ask for some value, and you can return and say your buffer is this and that size and so have a good control have how frequently you got callbacks and what size the buffers were. It would seem however that the T|T3 is much less generous.. it normally gives you a 4k buffer, and it seems you can shove back as little as 2k and it'll be happy. But if you go and say (for example) a 500b buffer is used, it goes right to hell.. all choppy and nasty. Well and good.. except I've found by comparison that going from 2k down to even 1k is significantly better for the audio quality (in my case anyway). (I've tested on oteh devices with smaller buffers and it sounds better, while using the same size buffer sounds the same as on the T|T3). With a 2k buffer, 8bit audio, 22kHz, theres a short but noticable delay on the audio even, which is annoying. Has anyone else run into similar, with any good fixes? (ie: I'll do some testing; perhaps converting to 44kHz instead of 22Khz, or using 16bit instead of 8bit, will let me tigthen the sound up, but its annoying when an app thats been around on the T|T1 for a year works peachy except on the T|T3 :/) jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Keyboard with EvtEventAvail()
This particular application is a realtime running game, so as such doesn't use the usual event loop -- instead of just staying in the loop, it chugs away then calls an arm loop funciton every few moments. The loop first does an EvtEventAvail() test to see if theres anything waiting, and if so, processes it in the normal fashion. If nothing is available, it exits and lets the game continue. (It doesn't matter, but the game is all ARM code, so calls back into PACE to do the event loop) The problem is that external keyboards (connected or IF keyboard) don't work while this is all going on; if you take out the EvtEventAvail() test and just stay in the loop, they work fine. With the test, everythign *else* works okay .. grafitti works, menus work, buttons work, etc etc... everythign except keyboards. Very odd. Anyone have any idea why keyboards stop working when you're testing for events coming in? ie: Its something like this.. event-loop { while ( EvtEventAvail() ) { EvtGetEvent ( event, 1 ); // normal processing } } If you take out the EvtEventAvail() and change it to (say) 1, then all is happy and keyboard events come through, but of course not really useful to me. I don't wish to just use EvtGetEvent(event,1) since 1 implies 1 tick, which is 1/200th of a second, which is too long a time interval to throw away for me ideally.. Of course, I can call this event loop much less frequently; throwing away 1 tick ever 1/3rd of a seocnd shouldnt' be too bad, but really I'd prefer to use EvtEventAvail() since it makes sense.. process them fast while they're there Any ideas why keyboards break? jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Palm OS coding contest
I'm hosting a little coding contest; please help spread the word by telling everyone you know! If you can help by linking to the page or helping sponsor, please let me know :) This is all in the spirit of fun and challenging ourselves. You're all welcome to submit an entry of course! http://www.codejedi.com/shadowplan/contest.html Cheers! jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
PIM from digest
Subject: Re: New PIM databases on T3 From: Ron Nicholson [EMAIL PROTECTED] Date: Wed, 8 Oct 2003 20:39:42 -0700 X-Message-Number: 63 Hmmm... I wonder if the old PIM DB's could be just shadow databases? Populated on open, then updating to the real databases on close. Do the legacy DatebookDB and ToDoDB change when the T3 PIM apps are used to add items? If not, they're probably just shadow DB's and not the real ones. I think both Palm and PalmSource have given developers warnings that the PIM DB's would change significantly. Looks like it's not just going to be once. Hopefully they'll publish enough exchange manager calls, notifications and/or launchcodes to give developers a portable way of searching, accessing and updating the public PIM data. MemoPad and Contacts/Addresses as well. It looks like the data goes to both; I've not had a chance to check yet, but I'm betting theres a Notifier being caught to handle db-open and db-close requests.. when you close the database then it copies stuff to the new one. It seems you can open the database and I don't believe any push occurs, but on a close, some checks are *always* done. ie: I have an app which only reads from the database.. but it opens, finds unique, reads, closes, and does it a few times if needed.. it slows to a *crawl*. I imagine if I change it to cache the opened database handle and re-use it, then it should minimize the speed hit.. but theresreally nothign I can do, to avoid all thwe speed hit, without trying to just talk to the main database. at the risk of having data not show up in the legacy one then, perhaps :/ jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
T3 Sim.. Gs?
Does anyone else notice spurious G's popping up all over the T3 sim? ie: Fire up the sim (using the correct EFIGS rom!), and go to the launcher. Toggle virtual grafitti up and down (in portrait mode) and you'll see a G appear in the top left. Perhaps its for debugging to show ehen VG is changing? However, sometimes when you run an application, the G will appear and stay, and after awhile you can have a whole slew of Gs trashign part of the display. Very weird. jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
New PIM databases.. hmm. Interesting.
For the curious, about 30 seconds of tooling seems to suggest... 1) Run a little app that adds a record to the old ToDo database; it opens the database, adds a record, and closes it; seems to work as normal.. pretty fast anyway. 2) Closing that app takes a moment 3) Checking with Filez, I can see that the record count in both ToDo and Tasks has gone up by one; did it occur when the app was closed? Or perhaps sneakily something while the database was closed? Perhaps Tasks watches for a notifier on database open and closing and slips in there. That would be interesting. Or perhaps it waits for the app to exit (another notifier). Curious. 30 seconds of toying.. I'll get serious and let everyone know what I find :) jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
New PIM databases on T3
A few questions about the new PIM databases.. 1) Are these final.. ie: Are they an open ended spec that will continue in OS6, or are we goign to see major changes for OS6 too? 2) It seems that working with the old PIM databases on the T3 can be exceptionally *slow* of all things; I've not looked at them yet, but I'm assuming they're just stubs into the new databases now; perhaps the PIM apps dump data into the old format databases on close (for example), and check for changes on open ... or perhaps theres some data in the old database and some new data in the wnew and they're associated by an ID or somesuch. *Shrug* Perhaps even the OS does some funky magic when you access the old format databases, though I doubt this. Regardless.. some apps that work on the old databases are suddenly very slow. I'll do some profiling and nab it, but curious if anyone has noticed anything.. jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
OS Bug and Workaround: Pulldown menu crash on Tungsten W
Awhile back I started getting issues in my support box from users of the Tungsten W and one of my apps; the application would just crash (wedge, or sometimes emit a Fatal) when they'd pull down a specific pulldown menu. You could use other pulldown menus in the app, but hitting the one menu would crash the device. The app has been in use for years and works on every Palm OS device out there until he T|W came out. (It works fine on OS2, 3, 4, 5 :) The issue is with really wide menus. (Aside form the fact its naughty to have menus too wide; so be it. But the fact is that wide menus work on all PAlm OS devices except the T|W :) As a test application, you can make a tall menu; if you fill the screen lengthwise, its okay.. the text will not be cut mid-word.. the bottom of the text will rest just above the bottom edge of the screen, and the menu border will be clipped. On every unit except the T|W, the left and right borders will be clipped, if you have to have a really wide menu. One of our menus was 3/4 the width of the screen. At some point, a shortcut was added to a wide item, which made the menu the full width of the screen. No problem.. it was fine on every unit (and we tested them all, and have a rigourous alpha and beta test). Just reducing the text of the menu fixed it. But the T|W would wedge on this wide menu; doing anything to reduce the width solves the problem. We were caught off guard when an app published years ago suddenly started acting up on an OS4.1 machine :) Seems like the OS has a bug for the T|W that no other device has. jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Sampled Stream Audio issue on OS5.2
Subject: Re: Sampled Stream Audio issue on OS5.2 From: Nicolas Pabion [EMAIL PROTECTED] Date: Wed, 9 Jul 2003 17:46:21 -0700 X-Message-Number: 33 The API is the same. The only difference is that T|T will give you the buffer size you asked while T|C and Zire tend to always return 4K. I would hope that you do use the framecount number in your callback. Everything else is the same. This occurred to me after some test results came in; the trick is that this isn't a useful value for a game.. the lag is too great and the frequency of callback too low. (I've allowed for a callback 30-150 times per second.. but was getting them less frequently). I discovered today that in the most recent OS5 SDK (DR2) there is an additional routine.. SndCreateStreamExtended, with a variable sized buffer callback. In theory that should let me specify how much data is available, and thus manage the callback rate, which should work. We'll see if it works out this way. (ie: Large stream buffers are good for mp3s, but bad for game realtime sound :) Thanks for the tip, jeff Jeff Mitchell [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks in advance for any assistance. I've got an application which is generating raw audio into callback buffers a la SndStreamCreate(); this works pretty well on OS5.0 (Tungsten|T). The same application when installed onto a Zire71 or Tungsten|C has terrible/incomprehensible sound. (garbage audio, or perhaps super fast looping? I don't have the devices myself, so I can't produce comparisons) Does anyone know if the sound API has changed for OS5.2 used in the Z71 and T|C? Is there some subtle difference that we need to know for these devices? -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Sampled Stream Audio issue on OS5.2
Thanks in advance for any assistance. I've got an application which is generating raw audio into callback buffers a la SndStreamCreate(); this works pretty well on OS5.0 (Tungsten|T). The same application when installed onto a Zire71 or Tungsten|C has terrible/incomprehensible sound. (garbage audio, or perhaps super fast looping? I don't have the devices myself, so I can't produce comparisons) Does anyone know if the sound API has changed for OS5.2 used in the Z71 and T|C? Is there some subtle difference that we need to know for these devices? jeff -- Have you played Atari today? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Palm OS 5 and built-in apps database access
Is there much information about OS5 API changes available publicly yet? (ie: For those of us who couldn't make it to Palmsource this year? :) More specifically, I have a few applications which delve into the various databases of the built-ins (like so many of us!). We've all relied on the header files provided to do so, and this of course locked Palm into being unable to extend these applications without breaking all our code. I'm hoping that in OS 5 the built-ins will be updated and also include an API, or guidelines, so that Palm can extend these apps to be more useful, and so we can interact with them in a standard and concistent fashion. Are any details published? I'm assuming my apps will break for OS5, due to directly accessing the built-ins databases.. and I'd really rather have everything fixed up beforehand :) Any ideas when the dev kits will arrive? When Metroworkds will pop out an update that does both ARM and the usuals? Can't wait to rebuild the apps for native ARM.. jeff -- It's murder out there. You can't even travel around in your own micro circuits without permission from 'Master Control Program'. I mean, sending *ME* down here to play games Who does he calculate he is? -- Peter Jurasik as Crom, _Tron_ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Rez/DeRez
People have asked long in the past, but I'm having trouble getting this together. I've taken to using CodeWarrior (R6 and now R8) for some projects. It uses Constructor for resource and GUI building and all that, and stores the files in .rsrc files (under Windows, anyway, and I'm using Windows under vmware in Unix :) I'm assuming I need to DeRez the rsrc file to get an .r file, but each time I do so I get a bunch of binary data chunks, rather than useful editable resource files. Rez can put them back together okay, though. (I found the Quicktime SDK which includes Rez and DeRez for Windows, and generates QTR files.. same format as any other resource file in Mac land? Or need I general purpose Rez and DeRez?) What steps need I perform to be able to DeRez a file, hack it up with a text editor, and Rez it up again? I'm using Windows (or Unix) in this case, though I can lay my hands on a Mac if needed. My goal is to Derez, edit and clean up the file (maybe massage with perl scripts, or modify for alternate language support, etc) and Rez back into a useful resource file that is good with Constructor and Code Warrior.. Jeff -- It's murder out there. You can't even travel around in your own micro circuits without permission from 'Master Control Program'. I mean, sending *ME* down here to play games Who does he calculate he is? -- Peter Jurasik as Crom, _Tron_ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Clie lockup; ideas?
One of my applications has a problem where when running in high res modes, it locks the unit up. Sadly, this does not occur under emulation, and Clie's are not available in Canada yet, so its difficult for me to observe and test around the problem. The lock up only occurs when a few options are enabled, though, so I can narrow down a little in the code. The options enabled cause at least these calls to be used: WinPushDrawState() WinPopDrawState() WinSetBackColor() WinSetDrawMode() WinPaintBitmap() Perhaps I am PainBitmap()ing off the edge of the display, and it is clipped by PalmOS but not by the high res assistant OS? Or perhaps the BackColor() cannot be handled correctly? Are there any known bugs or issues or more-sensitive-than-palm's issues with Clie's OS? Jeff -- It's murder out there. You can't even travel around in your own micro circuits without permission from 'Master Control Program'. I mean, sending *ME* down here to play games Who does he calculate he is? -- Peter Jurasik as Crom, _Tron_ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
SyncWriteRec ..
This is a dumb question, and I know the answer already.. but .. just hoping.. ;) SyncWriteRec cannot write to any specified index in a database; your only luxury is that you can write by unique-id, or request a new unique-id. 1) Is this still true, or are there any tricks to writing a record to a specific location in a db? 2) The record gets the first unused index, IIRC, in the database and a new unique-id is generated. Is this always the case? Or do different OS versions do it differently? Why do I ask? I found a nasty piece of code that has a lad doing all sorts of crazy SyncWriteRec()s, making assumptions about its location. I find it bewildering :P jeff -- It's murder out there. You can't even travel around in your own micro circuits without permission from 'Master Control Program'. I mean, sending *ME* down here to play games Who does he calculate he is? -- Peter Jurasik as Crom, _Tron_ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
Identifying device? (Clie, specifically)
Is there an easy way to determine what device you're running on? (ie: Not OS version, thats easy. I need to know if I'm running on a Symbol, or a Clie, or a Handera, etc). Its not a question of I should really just be checking for what services are available.. I actually need to know what device I'm on :) jeff -- It's murder out there. You can't even travel around in your own micro circuits without permission from 'Master Control Program'. I mean, sending *ME* down here to play games Who does he calculate he is? -- Peter Jurasik as Crom, _Tron_ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
How-to replace the launcher?
If I wish to have an app temporarily replace the launcher (for good and legitimate reasons!), how do I do so? Is their some resource setting, or some function to call to request my app to be the new launcher? I've come across this before, but I just can't seem to dig the info out of my long term memory :) jeff -- It's murder out there. You can't even travel around in your own micro circuits without permission from 'Master Control Program'. I mean, sending *ME* down here to play games Who does he calculate he is? -- Peter Jurasik as Crom, _Tron_ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/