Actually, that code won't work if the 68K compiler aligned the char
array on a 2-byte boundary, something that's quite possible because
the stack is only kept 2-byte aligned.  Declaring that byte array as a
global would be the safest bet.

On 5/16/06, Dmitry Grinberg <[EMAIL PROTECTED]> wrote:
ok then this


void enableWrites(Boolean enable){
   char code[]={0x01, 0x00, 0xA0, 0xE1, 0x04 0x10, 0x19, 0xE5, 0x4C,
0xF1, 0x91, 0xE5};
  PceNativeCall(code,enable);
}

call it with enable set to "true" to enable writes, "false" to disable
writes to data area.

this is GUARANTEED to work on all current palmos devices (tested)

in case you're wondering the arm code is as follows:


MOV R0,R1
LDR R1,[R9,#-4]
LDR PC,[R1,#0x14C]


On 5/16/06, Tinnus <[EMAIL PROTECTED]> wrote:
> I thought those calls didn't work on 100% of the OS5 devices?
>
> 2006/5/16, Dmitry Grinberg <[EMAIL PROTECTED]>:
> > hello,
> > memory semaphore disables task switching on PalmOS, as well as timers,
> > so any sound being played back in the background will stop. all system
> > services that run in a thread will stop (like NVFS!!!) so i would not
> > recomend this at all, instead try
> >
> > HwrEnableDataWrites() and HwrDisableDataWrites(). From what I know
> > pace allows those in 68k apps still. they do the same thing, but do
> > not stop other threads.
> >
>
>  -- For information on using the PalmSource Developer Forums, or to
> unsubscribe, please see
> http://www.palmos.com/dev/support/forums/


--
Best Regards,
Dmitry Grinberg

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/


--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to