background preloader


Facebook Twitter

A.D.A. Amiga Demoscene Archive. Hi all.

A.D.A. Amiga Demoscene Archive

Some days ago i see in some old game called Mickey-Mania (1994) (sega-megadrive console) a nice easy effect which is widely used in games in the past and still. This effect used for the same reassons like fade in/out effects: i.e. change scenes not by 'static' way, but for making 'smooth' feeling. Effect looks like this: I.e. we have picture, and we have 'black area' which by 'circle' loop filled picture by black color (kind of fade down). steps are: full_pict,scene1,scene2,scene3,scene4,black_screen And in other way: we have fully black color screen, and then picture are drawing by circle way and refill by yourself black area. So, i have fucntion which draw a picture (x/y). I mean somethink like: void pict_2_black() { draw_picture(x,y); draw_black_area_circle; flip_for_double_buffer; } At moment i think only about drawing picture always in full size, and only change routine for black fill stuff.

The Demo Effects Collection.


The Art of Demomaking. Each video mode has it's resolution.

The Art of Demomaking

Statistically, right now you're at resolution 1024x768 :) This means that there are 1024 picture elements (more commonly known as pixels) per line and 768 per column. Each pixel can be considered as a variable, like a byte (8 bit modes), a word (16 bit modes) or a double word (32 bit modes). In our case, mode 13h has a resolution of 320x200 with 8 bits per pixel. These are not high specs by today's standards, but they are fine for an introduction. And as I said earlier, you could later easily move to any other interface, since most of the concepts you will learn are also applicable. The major advantage with mode 13h is that the video memory is always at the physical address A0000h, which means it can be found at the same place on any PC. Linux 2.2 Framebuffer Device Programming Tutorial. Index of /HOWTO/Framebuffer-HOWTO. C - Paint Pixels to Screen via Linux FrameBuffer.

Enabling the Linux Framebuffer. Bare metal framebuffer in C. Geordish wrote:Well, after I posted, I remembered something I was going to try.I updated the firmware files from the raspberry pi git repository, and tried again without kernel_old defined.

Bare metal framebuffer in C

Worked first time. I've spent a few hours trying to get that working! Thanks for your work, I'm now going to borrow it to help me out in my project Glad it's sorted. I was only ever using the recent firmware, so I've not tried it with the older versions - I know the tag mailbox way of doing things is newer, but I didn't know how recent the firmware had to be. I'll make a note in the README to ensure the firmware is reasonably up-to-date. The way it works at the moment: when the Pi boots, its framebuffer physical size and depth are set to the right values (eg, 1280x720 on my monitor, 16 bits/pixel), but the virtual size is set to 2x2. TestFrameBuffer. Raspberry Compote: Low-level Graphics on Raspberry Pi (part one)

The Raspberry Pi (RPi) comes built with hardware support - and supporting software programming libraries - for all the current state of the art standardised graphics goodies: OpenGL ES, OpenVG, EGL etc. and considering the performance gains of using the VideoCore GPU over the ARM CPU, it definitely makes sense to utilise these libraries to their full extent.

Raspberry Compote: Low-level Graphics on Raspberry Pi (part one)

However, one of the main ideologies of the Raspberry Pi Foundation - the people who conceived the crafty little appliance we now know as RPi - was to introduce new generations to 'what goes behind the scenes' of fancy applications and user-interfaces. In my opinion, this goes as well for the 'fancy' graphics libraries and technologies. Therefore I would like to think it makes sense to introduce also the lower level interfaces for programming graphics on the RPi (most principles and some of the code I will introduce apply to other systems as well).

A basic example to open the framebuffer device and query the current display settings: Memory Mapped Files. There comes a time when you want to read and write to and from files so that the information is shared between processes.

Memory Mapped Files

Think of it this way: two processes both open the same file and both read and write from it, thus sharing the information. The problem is, sometimes it's a pain to do all those fseek()s and stuff to get around. Wouldn't it be easier if you could just map a section of the file to memory, and get a pointer to it? Then you could simply use pointer arithmetic to get (and set) data in the file. Well, this is exactly what a memory mapped file is. 10.1. Before mapping a file to memory, you need to get a file descriptor for it by using the open() system call: int fd; fd = open("mapdemofile", O_RDWR); In this example, we've opened the file for read/write access.

To memory map a file, you use the mmap() system call, which is defined as follows: void *mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off); What a slew of parameters! 10.2.