PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

STR directly to screen = termination?

Hello.

I'm playing with an IPAQ 3600 series. I wrote an assembler routine to copy a buffer directly into the screen memory, and I'm having some "issues".

If I do:

Code:
(r0 = screen address
(r1 = random)
strb r1,[r0],#1
strb r1,[r0],#1
strb r1,[r0],#1
strb r1,[r0],#1


or

Code:
(r0 = screen address
(r1 = random)
strh r1,[r0],#2
strh r1,[r0],#2
strh r1,[r0],#2
strh r1,[r0],#2


It works fine (plotting 2 and 4 pixels respectively).

The minute I try to write a single 32-bit word (or 2,3,4, .. 12,13,14 :wink: ), it either does nothing or the application terminates. I'm presuming that the framebuffer memory is 16-bit and something is objecting to the 32-bit writes?

If so, is this kind of thing documented anywhere?

Cheers,

Refractor.
Make sure you are writing to a 32-bit aligned address when you write 32 bits of data.
refractor · 05 Feb 2002, 22:04 UTC — Thanks!
Digby, I love you :P !

You're absolutely correct - I'd only tried it with the address that GXBeginDraw() had originally passed me, 0xac05029e ... which is the final pixel of the first row and not with the *actual* start address of the video display (ugh!). :oops:

Thanks very much indeed,

Refractor.