Re: [AD] Trying to get embedded...

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> So, besides my "strange" platform, is there any
> documentation or samples of how to begin a port to a
> new platform?

Unfortunately, we lack a porting guide or something like that.

I think that looking at the header files contained in the include/allegro 
directory might be a good starting point because, for various reasons, they 
contain the interfaces with the platform-dependent code:
- system.h: struct SYSTEM_DRIVER
- gfx.h: struct GFX_DRIVER
- joystick.h: struct JOYSTICK_DRIVER 
- keyboard.h: struct KEYBOARD_DRIVER
- digi.h: struct DIGI_DRIVER
- midi.h: struct MIDI_DRIVER 
- mouse.h: struct MOUSE_DRIVER
- timer.h struct TIMER_DRIVER

You might want to start by creating one file for each structure, copying the 
template from the header file and filling it with empty fields, and making 
sure they are recognized by the platform-independent code. Then you 
incrementally implement the methods needed for each driver.

Or you can do it the other way around: select a relatively self-contained 
port (for example the DOS port) and remove all the superfluous bits in order 
to keep only the skeleton, which should match that of the previous method.

That said, I have myself never written a port from scratch so the advices 
above may be totally dumb.

Maybe those who previously did it could help ? Angelo, are you around there ?

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/