Horizontal Scrolling: Easiest way?

This can’t be safe, can it? What if the surface is 1x1 in size and thus
only has three bytes of memory allocated to it?

In principle you are right, but no allocator works on byte granularity these
days. Besides, malloc() returns a block of memory that is guaranteed to be
suitable for storage of any object, so it’s at least 32-bit aligned.

Mattias Engdeg?rd wrote in message
news:200005251359.PAA03017 at cetus.nada.kth.se

This can’t be safe, can it? What if the surface is 1x1 in size and thus
only has three bytes of memory allocated to it?

In principle you are right, but no allocator works on byte granularity
these
days. Besides, malloc() returns a block of memory that is guaranteed to be
suitable for storage of any object, so it’s at least 32-bit aligned.

Would not a hardware surface allocator in 24 bit mode work in 24 bit
granularity?–
Rainer Deyke (root at rainerdeyke.com)
“In ihren Reihen zu stehen heisst unter Feinden zu kaempfen” - Abigor

Hi Dave,

I’m very interested in the Perl bindings as I’m writing an Intranet Admin
Utility at the moment and want a decent front end.
But tell me how it works. I presume it needs SDL installed on the admin
machine? How easy would it be to run it over a network, IE run the admin
tool from anywhere on the intranet?

Sorry for dumb questions, just starting in the wonderful world of Perl!

-Lea.

“David J. Goehrig” wrote:> Hello world,

    I have a near complete set of bindings for SDL-1.x.x for perl,

with a decent Object layer on top. I would really appreciate it if
people who are interested, would download it and then send me feedback.

    Basically, I wrote to help make small app, and custom web

based interfaces. It comes with a pair of sample image viewers and
a cdplayer app (since these are trivial to do…)

you will be able get the source at my homepage:

    http://www.buffnet.net/~goehrig/projects/SDL-sdlpl-1.00.tar.gz

I’ve only tested it on linux.

BTW if someone could give me some advice on compiling SDL-1.1.1 for
FreeBSD, I’d gladly get a port out asap.

                            Dave Goehrig

Would not a hardware surface allocator in 24 bit mode work in 24 bit
granularity?

Since we don’t use or modify the fourth byte, even an allocator with 1-byte
granularity is OK, as long as access control is paged (usually 4K or 8K).

On a perverted segmented architecture, you can get (slow) access
control with byte granularity. Nothing you are likely to use, unless
you are running in 286 protected mode.

Mattias Engdeg?rd wrote in message
news:200005251727.TAA03204 at cetus.nada.kth.se

Would not a hardware surface allocator in 24 bit mode work in 24 bit
granularity?

Since we don’t use or modify the fourth byte, even an allocator with
1-byte
granularity is OK, as long as access control is paged (usually 4K or 8K).

There is no guarantee that the fourth byte exists. Example: Memory
addresses 0x10000 to 0x3ffff are mapped to video memory. Adresses above
0x3ffff are not mapped to any physical memory and will cause an access
violation when read. You create a 1x1 hardware surface, which is allocated
at the end of video memory, address 0x3fffd. You can access the red byte at
0x3fffd, the green byte at 0xfffe, and the blue byte at 0x3ffff. If you try
to read a 32 bit value from 0x3fffd, you will attempt to read bytes at
0x3fffd, 0x3fffe, 0x3ffff, and 0x40000. 0x40000 is not readable, thus you
get an access violation - and this isn’t even considering processors which
physically cannot read non-aligned 32 bit values.–
Rainer Deyke (root at rainerdeyke.com)
“In ihren Reihen zu stehen heisst unter Feinden zu kaempfen” - Abigor

There is no guarantee that the fourth byte exists. Example: Memory
addresses 0x10000 to 0x3ffff are mapped to video memory. Adresses above
0x3ffff are not mapped to any physical memory and will cause an access
violation when read. You create a 1x1 hardware surface, which is allocated
at the end of video memory, address 0x3fffd.

I was assuming that hardware surfaces were allocated on at least 32-bit
aligned boundaries, just as software ones are. If we can’t rely on that,
then accessing it as a 32-bit word is wrong to begin with and we have
to assemble the pixel from bytes.

Hi,
where can I find IMGlib ?
I only found SDL_image on the SDL pages.

Regards,
Georg

“David J. Goehrig” wrote:>

Hello world,

    I have a near complete set of bindings for SDL-1.x.x for perl,

with a decent Object layer on top. I would really appreciate it if
people who are interested, would download it and then send me feedback.

    Basically, I wrote to help make small app, and custom web

based interfaces. It comes with a pair of sample image viewers and
a cdplayer app (since these are trivial to do…)

you will be able get the source at my homepage:

    http://www.buffnet.net/~goehrig/projects/SDL-sdlpl-1.00.tar.gz

I’ve only tested it on linux.

BTW if someone could give me some advice on compiling SDL-1.1.1 for
FreeBSD, I’d gladly get a port out asap.

                            Dave Goehrig


Georg.Waldschmidt at gmx.de
Georg.Waldschmidt at ruhr-uni-bochum.de

Hi,
where can I find IMGlib ?
I only found SDL_image on the SDL pages.

SDL_image is the new name for IMGlib.
SImilarly, SDL_mixer is the new name for mixer.

-bill!

Well then I’d like to propose changes to the documentation, which has
this (under the video function section):

Have you checked the latest CVS docs? I believe this is already changed.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software