You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ljs...@us...> - 2011-12-04 01:42:45
|
Revision: 742 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=742&view=rev Author: ljsebald Date: 2011-12-04 01:42:38 +0000 (Sun, 04 Dec 2011) Log Message: ----------- Hopefully this should fix the maple brokenness in SDL... Modified Paths: -------------- kos-ports/SDL/base/src/joystick/dc/SDL_sysjoystick.c kos-ports/SDL/base/src/video/dc/SDL_dcevents.c Modified: kos-ports/SDL/base/src/joystick/dc/SDL_sysjoystick.c =================================================================== --- kos-ports/SDL/base/src/joystick/dc/SDL_sysjoystick.c 2011-08-18 02:11:58 UTC (rev 741) +++ kos-ports/SDL/base/src/joystick/dc/SDL_sysjoystick.c 2011-12-04 01:42:38 UTC (rev 742) @@ -23,12 +23,15 @@ Sam Lantinga sl...@li... + + Modified by Lawrence Sebald <blu...@ne...> */ /* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */ #include <stdlib.h> #include <stdio.h> /* For the definition of NULL */ +#include <string.h> #include "SDL_error.h" #include "SDL_joystick.h" @@ -46,44 +49,39 @@ #define JOYNAMELEN 8 /* array to hold joystick ID values */ -static uint8 SYS_Joystick_addr[MAX_JOYSTICKS]; +static maple_device_t *SYS_Joystick_addr[MAX_JOYSTICKS]; /* The private structure used to keep track of a joystick */ -struct joystick_hwdata -{ - cont_cond_t prev_cond; - int prev_buttons; -}; +typedef struct joystick_hwdata { + cont_state_t prev_state; +} jhwdata_t; /* Function to scan the system for joysticks. * This function should set SDL_numjoysticks to the number of available * joysticks. Joystick 0 should be the system default joystick. * It should return 0, or -1 on an unrecoverable fatal error. */ -int SDL_SYS_JoystickInit(void) -{ - int numdevs; +int SDL_SYS_JoystickInit(void) { + int numdevs = 0, i; + maple_device_t *dev; - int p,u; + for(i = 0; i < MAX_JOYSTICKS; ++i) { + if((dev = maple_enum_type(i, MAPLE_FUNC_CONTROLLER))) { + SYS_Joystick_addr[numdevs++] = dev; + } + } - numdevs = 0; - for(p=0;p<MAPLE_PORT_COUNT;p++) { - for(u=0;u<MAPLE_UNIT_COUNT;u++) { - if (maple_device_func(p,u)&MAPLE_FUNC_CONTROLLER) { - SYS_Joystick_addr[numdevs] = maple_addr(p,u); - numdevs++; - } - } - } - - return(numdevs); + return numdevs; } /* Function to get the device-dependent name of a joystick */ -const char *SDL_SYS_JoystickName(int index) -{ +const char *SDL_SYS_JoystickName(int index) { maple_device_t *dev; - if (maple_compat_resolve(SYS_Joystick_addr[index],&dev,MAPLE_FUNC_CONTROLLER)!=0) return NULL; + + if(index > MAX_JOYSTICKS || !(dev = SYS_Joystick_addr[index])) { + return NULL; + } + return dev->info.product_name; } @@ -92,22 +90,23 @@ This should fill the nbuttons and naxes fields of the joystick structure. It returns 0, or -1 if there is an error. */ -int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) -{ - /* allocate memory for system specific hardware data */ - joystick->hwdata = (struct joystick_hwdata *) malloc(sizeof(*joystick->hwdata)); - if (joystick->hwdata == NULL) - { - SDL_OutOfMemory(); - return(-1); - } - memset(joystick->hwdata, 0, sizeof(*joystick->hwdata)); +int SDL_SYS_JoystickOpen(SDL_Joystick *joystick) { + /* allocate memory for system specific hardware data */ + joystick->hwdata = (struct joystick_hwdata *)malloc(sizeof(jhwdata_t)); - /* fill nbuttons, naxes, and nhats fields */ - joystick->nbuttons = MAX_BUTTONS; - joystick->naxes = MAX_AXES; - joystick->nhats = MAX_HATS; - return(0); + if(joystick->hwdata == NULL) { + SDL_OutOfMemory(); + return(-1); + } + + memset(joystick->hwdata, 0, sizeof(jhwdata_t)); + + /* fill nbuttons, naxes, and nhats fields */ + joystick->nbuttons = MAX_BUTTONS; + joystick->naxes = MAX_AXES; + joystick->nhats = MAX_HATS; + + return 0; } @@ -117,94 +116,94 @@ * and update joystick device state. */ -void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick) -{ -/* -const int sdl_buttons[] = { - CONT_C, - CONT_B, - CONT_A, - CONT_START, - CONT_Z, - CONT_Y, - CONT_X, - CONT_D +static const int sdl_buttons[] = { + CONT_A, + CONT_B, + CONT_X, + CONT_Y, + CONT_START, + CONT_C, + CONT_D, + CONT_Z, }; -*/ -const int sdl_buttons[] = { - CONT_A, - CONT_B, - CONT_X, - CONT_Y, - CONT_START, - CONT_C, - CONT_D, - CONT_Z, -}; - uint8 addr; - cont_cond_t cond,*prev_cond; - int buttons,prev_buttons,i,changed; +void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick) { + maple_device_t *dev; + cont_state_t *state, *prev_state; + int buttons, i, changed, hat; - addr = SYS_Joystick_addr[joystick->index]; - if (cont_get_cond(addr,&cond)<0) return; + dev = SYS_Joystick_addr[joystick->index]; - buttons = cond.buttons ^0xffff; - prev_buttons = joystick->hwdata->prev_buttons; - changed = buttons^prev_buttons; + if(!(state = (cont_state_t *)maple_dev_status(dev))) { + return; + } - if ((changed)&(CONT_DPAD_UP|CONT_DPAD_DOWN|CONT_DPAD_LEFT|CONT_DPAD_RIGHT)) { - int hat = SDL_HAT_CENTERED; - if (buttons&CONT_DPAD_UP) hat|=SDL_HAT_UP; - if (buttons&CONT_DPAD_DOWN) hat|=SDL_HAT_DOWN; - if (buttons&CONT_DPAD_LEFT) hat|=SDL_HAT_LEFT; - if (buttons&CONT_DPAD_RIGHT) hat|=SDL_HAT_RIGHT; + buttons = state->buttons; + prev_state = &joystick->hwdata->prev_state; + changed = buttons ^ prev_state->buttons; + + if(changed & (CONT_DPAD_UP | CONT_DPAD_DOWN | CONT_DPAD_LEFT | + CONT_DPAD_RIGHT)) { + hat = SDL_HAT_CENTERED; + + if(buttons & CONT_DPAD_UP) + hat |= SDL_HAT_UP; + if(buttons & CONT_DPAD_DOWN) + hat |= SDL_HAT_DOWN; + if(buttons & CONT_DPAD_LEFT) + hat |= SDL_HAT_LEFT; + if(buttons & CONT_DPAD_RIGHT) + hat |= SDL_HAT_RIGHT; + SDL_PrivateJoystickHat(joystick, 0, hat); } - if ((changed)&(CONT_DPAD2_UP|CONT_DPAD2_DOWN|CONT_DPAD2_LEFT|CONT_DPAD2_RIGHT)) { - int hat = SDL_HAT_CENTERED; - if (buttons&CONT_DPAD2_UP) hat|=SDL_HAT_UP; - if (buttons&CONT_DPAD2_DOWN) hat|=SDL_HAT_DOWN; - if (buttons&CONT_DPAD2_LEFT) hat|=SDL_HAT_LEFT; - if (buttons&CONT_DPAD2_RIGHT) hat|=SDL_HAT_RIGHT; + if(changed & (CONT_DPAD2_UP | CONT_DPAD2_DOWN | CONT_DPAD2_LEFT | + CONT_DPAD2_RIGHT)) { + hat = SDL_HAT_CENTERED; + + if(buttons & CONT_DPAD2_UP) + hat |= SDL_HAT_UP; + if(buttons & CONT_DPAD2_DOWN) + hat |= SDL_HAT_DOWN; + if(buttons & CONT_DPAD2_LEFT) + hat |= SDL_HAT_LEFT; + if(buttons & CONT_DPAD2_RIGHT) + hat |= SDL_HAT_RIGHT; + SDL_PrivateJoystickHat(joystick, 1, hat); } - for(i=0;i<sizeof(sdl_buttons)/sizeof(sdl_buttons[0]);i++) { - if (changed & sdl_buttons[i]) { - SDL_PrivateJoystickButton(joystick, i, (buttons & sdl_buttons[i])?SDL_PRESSED:SDL_RELEASED); + for(i = 0; i < sizeof(sdl_buttons) / sizeof(sdl_buttons[0]); ++i) { + if(changed & sdl_buttons[i]) { + SDL_PrivateJoystickButton(joystick, i, (buttons & sdl_buttons[i]) ? + SDL_PRESSED : SDL_RELEASED); } } - prev_cond = &joystick->hwdata->prev_cond; - if (cond.joyx!=prev_cond->joyx) - SDL_PrivateJoystickAxis(joystick, 0, cond.joyx-128); - if (cond.joyy!=prev_cond->joyy) - SDL_PrivateJoystickAxis(joystick, 1, cond.joyy-128); - if (cond.rtrig!=prev_cond->rtrig) - SDL_PrivateJoystickAxis(joystick, 2, cond.rtrig); - if (cond.ltrig!=prev_cond->ltrig) - SDL_PrivateJoystickAxis(joystick, 3, cond.ltrig); - if (cond.joy2x!=prev_cond->joy2x) - SDL_PrivateJoystickAxis(joystick, 4, cond.joy2x-128); - if (cond.joy2y!=prev_cond->joy2y) - SDL_PrivateJoystickAxis(joystick, 5, cond.joy2y-128); + if(state->joyx != prev_state->joyx) + SDL_PrivateJoystickAxis(joystick, 0, state->joyx); + if(state->joyy != prev_state->joyy) + SDL_PrivateJoystickAxis(joystick, 1, state->joyy); + if(state->rtrig != prev_state->rtrig) + SDL_PrivateJoystickAxis(joystick, 2, state->rtrig); + if(state->ltrig != prev_state->ltrig) + SDL_PrivateJoystickAxis(joystick, 3, state->ltrig); + if(state->joy2x != prev_state->joy2x) + SDL_PrivateJoystickAxis(joystick, 4, state->joy2x); + if(state->joy2y != prev_state->joy2y) + SDL_PrivateJoystickAxis(joystick, 5, state->joy2y); - joystick->hwdata->prev_buttons = buttons; - joystick->hwdata->prev_cond = cond; + joystick->hwdata->prev_state = *state; } /* Function to close a joystick after use */ -void SDL_SYS_JoystickClose(SDL_Joystick *joystick) -{ - if (joystick->hwdata != NULL) { - /* free system specific hardware data */ - free(joystick->hwdata); - } +void SDL_SYS_JoystickClose(SDL_Joystick *joystick) { + if (joystick->hwdata != NULL) { + /* free system specific hardware data */ + free(joystick->hwdata); + } } /* Function to perform any system-specific joystick related cleanup */ -void SDL_SYS_JoystickQuit(void) -{ - return; +void SDL_SYS_JoystickQuit(void) { } Modified: kos-ports/SDL/base/src/video/dc/SDL_dcevents.c =================================================================== --- kos-ports/SDL/base/src/video/dc/SDL_dcevents.c 2011-08-18 02:11:58 UTC (rev 741) +++ kos-ports/SDL/base/src/video/dc/SDL_dcevents.c 2011-12-04 01:42:38 UTC (rev 742) @@ -27,140 +27,122 @@ Modified by Lawrence Sebald <blu...@ne...> */ -/* Being a null driver, there's no event stream. We just define stubs for - most of the API. */ - #include "SDL.h" #include "SDL_sysevents.h" #include "SDL_events_c.h" #include "SDL_dcvideo.h" #include "SDL_dcevents_c.h" -#include <kos.h> #include <dc/maple.h> #include <dc/maple/mouse.h> #include <dc/maple/keyboard.h> const static unsigned short sdl_key[]= { - /*0*/ 0, 0, 0, 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', - 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', - 'u', 'v', 'w', 'x', 'y', 'z', - /*1e*/ '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - /*28*/ SDLK_RETURN, SDLK_ESCAPE, SDLK_BACKSPACE, SDLK_TAB, SDLK_SPACE, SDLK_MINUS, SDLK_PLUS, SDLK_LEFTBRACKET, - SDLK_RIGHTBRACKET, SDLK_BACKSLASH , 0, SDLK_SEMICOLON, SDLK_QUOTE, - /*35*/ '~', SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_CAPSLOCK, - SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8, SDLK_F9, SDLK_F10, SDLK_F11, SDLK_F12, - /*46*/ SDLK_PRINT, SDLK_SCROLLOCK, SDLK_PAUSE, SDLK_INSERT, SDLK_HOME, SDLK_PAGEUP, SDLK_DELETE, SDLK_END, SDLK_PAGEDOWN, SDLK_RIGHT, SDLK_LEFT, SDLK_DOWN, SDLK_UP, - /*53*/ SDLK_NUMLOCK, SDLK_KP_DIVIDE, SDLK_KP_MULTIPLY, SDLK_KP_MINUS, SDLK_KP_PLUS, SDLK_KP_ENTER, - SDLK_KP1, SDLK_KP2, SDLK_KP3, SDLK_KP4, SDLK_KP5, SDLK_KP6, - /*5f*/ SDLK_KP7, SDLK_KP8, SDLK_KP9, SDLK_KP0, SDLK_KP_PERIOD, 0 /* S3 */ + /*0*/ 0, 0, 0, 0, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', + 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', + /*1e*/ '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + /*28*/ SDLK_RETURN, SDLK_ESCAPE, SDLK_BACKSPACE, SDLK_TAB, SDLK_SPACE, SDLK_MINUS, SDLK_PLUS, SDLK_LEFTBRACKET, + SDLK_RIGHTBRACKET, SDLK_BACKSLASH , 0, SDLK_SEMICOLON, SDLK_QUOTE, + /*35*/ '~', SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH, SDLK_CAPSLOCK, + SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8, SDLK_F9, SDLK_F10, SDLK_F11, SDLK_F12, + /*46*/ SDLK_PRINT, SDLK_SCROLLOCK, SDLK_PAUSE, SDLK_INSERT, SDLK_HOME, SDLK_PAGEUP, SDLK_DELETE, SDLK_END, SDLK_PAGEDOWN, SDLK_RIGHT, SDLK_LEFT, SDLK_DOWN, SDLK_UP, + /*53*/ SDLK_NUMLOCK, SDLK_KP_DIVIDE, SDLK_KP_MULTIPLY, SDLK_KP_MINUS, SDLK_KP_PLUS, SDLK_KP_ENTER, + SDLK_KP1, SDLK_KP2, SDLK_KP3, SDLK_KP4, SDLK_KP5, SDLK_KP6, + /*5f*/ SDLK_KP7, SDLK_KP8, SDLK_KP9, SDLK_KP0, SDLK_KP_PERIOD, 0 /* S3 */ }; const static unsigned short sdl_shift[] = { - SDLK_LCTRL,SDLK_LSHIFT,SDLK_LALT,0 /* S1 */, - SDLK_RCTRL,SDLK_RSHIFT,SDLK_RALT,0 /* S2 */, + SDLK_LCTRL,SDLK_LSHIFT,SDLK_LALT,0 /* S1 */, + SDLK_RCTRL,SDLK_RSHIFT,SDLK_RALT,0 /* S2 */, }; #define MOUSE_WHEELUP (1<<4) #define MOUSE_WHEELDOWN (1<<5) -static void mouse_update(void) -{ -const static char sdl_mousebtn[] = { - MOUSE_WHEELUP, - MOUSE_LEFTBUTTON, - MOUSE_SIDEBUTTON, - MOUSE_RIGHTBUTTON, - MOUSE_WHEELDOWN +const static char sdl_mousebtn[] = { + MOUSE_WHEELUP, + MOUSE_LEFTBUTTON, + MOUSE_SIDEBUTTON, + MOUSE_RIGHTBUTTON, + MOUSE_WHEELDOWN }; - uint8 addr; - mouse_cond_t cond; +static void mouse_update(void) { + static int prev_buttons; + maple_device_t *dev; + mouse_state_t *state; + int buttons, changed; + int i; - static int prev_buttons; - int buttons,changed; - int i; + if(!(dev = maple_enum_type(0, MAPLE_FUNC_MOUSE)) || + !(state = maple_dev_status(dev))) + return; - if ((addr = maple_first_mouse())==0 || mouse_get_cond(addr, &cond)<0) return; + buttons = state->buttons; + if(state->dz < 0) + buttons |= MOUSE_WHEELUP; + if(state->dz > 0) + buttons |= MOUSE_WHEELDOWN; - buttons = cond.buttons^0xff; - if (cond.dz<0) buttons|=MOUSE_WHEELUP; - if (cond.dz>0) buttons|=MOUSE_WHEELDOWN; + if(state->dx || state->dy) + SDL_PrivateMouseMotion(0, 1, state->dx, state->dy); - if (cond.dx||cond.dy) SDL_PrivateMouseMotion(0,1,cond.dx,cond.dy); + changed = buttons ^ prev_buttons; - changed = buttons^prev_buttons; - for(i=0;i<sizeof(sdl_mousebtn);i++) { - if (changed & sdl_mousebtn[i]) { - SDL_PrivateMouseButton((buttons & sdl_mousebtn[i])?SDL_PRESSED:SDL_RELEASED,i,0,0); - } - } - prev_buttons = buttons; + for(i = 0; i < sizeof(sdl_mousebtn); ++i) { + if(changed & sdl_mousebtn[i]) { + SDL_PrivateMouseButton((buttons & sdl_mousebtn[i]) ? + SDL_PRESSED : SDL_RELEASED, i, 0, 0); + } + } + + prev_buttons = buttons; } -static void keyboard_update(void) -{ - static kbd_state_t old_state; - static uint8 old_addr; +static void keyboard_update(void) { + static kbd_state_t old_state; + kbd_state_t *state; + maple_device_t *dev; + int shiftkeys; + SDL_keysym keysym; + int i; - kbd_state_t *state; - maple_device_t *dev; - uint8 addr; - int port,unit; + if(!(dev = maple_enum_type(0, MAPLE_FUNC_KEYBOARD))) + return; - int shiftkeys; - SDL_keysym keysym; + state = maple_dev_status(dev); - int i; + if(!state) + return; - addr = maple_first_kb(); + shiftkeys = state->shift_keys ^ old_state.shift_keys; + for(i = 0; i < sizeof(sdl_shift); ++i) { + if((shiftkeys >> i) & 1) { + keysym.sym = sdl_shift[i]; + SDL_PrivateKeyboard(((state->shift_keys >> i) & 1) ? + SDL_PRESSED : SDL_RELEASED, &keysym); + } + } - if (addr==0) return; + for(i = 0; i < sizeof(sdl_key); ++i) { + if(state->matrix[i] != old_state.matrix[i]) { + int key = sdl_key[i]; + if(key) { + keysym.sym = key; + SDL_PrivateKeyboard(state->matrix[i] ? + SDL_PRESSED : SDL_RELEASED, &keysym); + } + } + } - if (addr!=old_addr) { - old_addr = addr; - memset(&old_state,0,sizeof(old_state)); - } - - maple_raddr(addr,&port,&unit); - - maple_compat_resolve(addr, &dev, MAPLE_FUNC_KEYBOARD); - //state = kbd_get_state(port,unit); - state = maple_dev_status(dev); - - if (!state) return; - - shiftkeys = state->shift_keys ^ old_state.shift_keys; - for(i=0;i<sizeof(sdl_shift);i++) { - if ((shiftkeys>>i)&1) { - keysym.sym = sdl_shift[i]; - SDL_PrivateKeyboard(((state->shift_keys>>i)&1)?SDL_PRESSED:SDL_RELEASED,&keysym); - } - } - - for(i=0;i<sizeof(sdl_key);i++) { - if (state->matrix[i]!=old_state.matrix[i]) { - int key = sdl_key[i]; - if (key) { - keysym.sym = key; - SDL_PrivateKeyboard(state->matrix[i]?SDL_PRESSED:SDL_RELEASED,&keysym); - } - } - } - - old_state = *state; + old_state = *state; } -void DC_PumpEvents(_THIS) -{ - keyboard_update(); - mouse_update(); +void DC_PumpEvents(_THIS) { + keyboard_update(); + mouse_update(); } -void DC_InitOSKeymap(_THIS) -{ - /* do nothing. */ +void DC_InitOSKeymap(_THIS) { } - -/* end of SDL_dcevents.c ... */ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-08-18 02:12:05
|
Revision: 741 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=741&view=rev Author: ljsebald Date: 2011-08-18 02:11:58 +0000 (Thu, 18 Aug 2011) Log Message: ----------- Documentation of threading stuff... Modified Paths: -------------- kos/include/kos/thread.h kos/kernel/arch/dreamcast/include/dc/ubc.h Modified: kos/include/kos/thread.h =================================================================== --- kos/include/kos/thread.h 2011-08-17 16:02:51 UTC (rev 740) +++ kos/include/kos/thread.h 2011-08-18 02:11:58 UTC (rev 741) @@ -19,206 +19,515 @@ #include <sys/queue.h> #include <sys/reent.h> -/* Priority values */ +/** \file kos/thread.h + \brief Threading support. + + This file contains the interface to the threading system of KOS. Timer + interrupts are used to reschedule threads within the system while in + preemptive mode. There is also some support for a cooperative threading + mode (where each thread must manually give up its timeslice to swap out + threads). + + The thread scheduler itself is a relatively simplistic priority scheduler. + There is no provision for priorities to erode over time, so keep that in + mind. That practically means that if you have 2 high priority threads that + are always runnable and one low priority thread that is always runnable, the + low priority thread will never actually run (since it will never get to the + front of the run queue because of the high priority threads). + + The scheduler supports two distinct types of threads: joinable and detached + threads. A joinable thread is one that can return a value to the creating + thread (or for that matter, any other thread that wishes to join it). A + detached thread is one taht is completely detached from the rest of the + system and cannot return values by "normal" means. Detached threads + automatically clean up all of the internal resources associated with the + thread when it exits. Joinable threads, on the other hand, must keep some + state available for the ability to return values. To make sure that all + memory allocated by the thread's internal structures gets freed, you must + either join with the thread (with thd_join()) or detach it (with + thd_detach()). The old KOS threading system only had what would be + considered detached threads. + + \author Dan Potter + \author Lawrence Sebald + \see arch/timer.h + \see kos/genwait.h + \see kos/mutex.h + \see kos/once.h + \see kos/recursive_lock.h + \see kos/rwsem.h + \see kos/sem.h + \see kos/tls.h +*/ + +/** \brief Maximal thread priority. + This macro defines the maximum value for a thread's priority. Note that the + larger this number, the lower the priority of the thread. +*/ #define PRIO_MAX 4096 + +/** \brief Default thread priority. + Threads are created by default with the priority specified. +*/ #define PRIO_DEFAULT 10 /* Pre-define list/queue types */ struct kthread; + +/* \cond */ TAILQ_HEAD(ktqueue, kthread); LIST_HEAD(ktlist, kthread); +/* \endcond */ -/* Structure describing one running thread */ +/** \brief Structure describing one running thread. + + Each thread has one of this structure assigned to it, which hold all the + data associated with the thread. There are various functions to manipulate + the data in here, so you shouldn't generally do so manually. + + \headerfile dc/thread.h +*/ typedef struct kthread { - /* Thread list handle */ - LIST_ENTRY(kthread) t_list; + /** \brief Thread list handle. Not a function. */ + LIST_ENTRY(kthread) t_list; - /* Run/Wait queue handle */ - TAILQ_ENTRY(kthread) thdq; + /** \brief Run/Wait queue handle. Once again, not a function. */ + TAILQ_ENTRY(kthread) thdq; - /* Timer queue handle (if applicable) */ - TAILQ_ENTRY(kthread) timerq; + /** \brief Timer queue handle (if applicable). Also not a function. */ + TAILQ_ENTRY(kthread) timerq; - /* Kernel thread id */ - tid_t tid; + /** \brief Kernel thread id. */ + tid_t tid; - /* Static priority: 0..PRIO_MAX (higher means lower priority) */ - prio_t prio; + /** \brief Static priority: 0..PRIO_MAX (higher means lower priority). */ + prio_t prio; - /* Flags */ - uint32 flags; + /** \brief Thread flags. + \see thd_flags */ + uint32 flags; - /* Process state */ - int state; + /** \brief Process state. + \see thd_states */ + int state; - /* Generic wait target and message, if applicable */ - void * wait_obj; - const char * wait_msg; + /** \brief Generic wait target, if waiting. + \see kos/genwait.h */ + void * wait_obj; - /* Wait timeout callback: if the genwait times out, this function - will be called. This allows hooks for things like fixing up - semaphore count values, etc. */ - void (*wait_callback)(void * obj); + /** \brief Generic wait message, if waiting. + \see kos/genwait.h */ + const char * wait_msg; - /* Next scheduled time; used for sleep and timed block - operations. This value is in milliseconds since the start of - timer_ms_gettime(). This should be enough for something like - 2 million years of wait time ;) */ - uint64 wait_timeout; + /** \brief Wait timeout callback. - /* Thread label; used when printing out a user-readable - process listing. */ - /* XXX: Move to TLS */ - char label[256]; + If the genwait times out while waiting, this function will be called. + This allows hooks for things like fixing up semaphore count values, etc. - /* Current file system path */ - /* XXX: Move to TLS */ - char pwd[256]; + \param obj The object that we were waiting on. + */ + void (*wait_callback)(void * obj); - /* Register store; used to save thread context */ - irq_context_t context; + /** \brief Next scheduled time. + This value is used for sleep and timed block operations. This value is + in milliseconds since the start of timer_ms_gettime(). This should be + enough for something like 2 million years of wait time. ;) */ + uint64 wait_timeout; - /* Thread private stack; this should be a pointer to the base - of a stack page. */ - uint32 *stack; - uint32 stack_size; + /** \brief Thread label. + This value is used when printing out a user-readable process listing. */ + char label[256]; - /* Our errno variable */ - /* XXX: Move to TLS */ - int thd_errno; + /** \brief Current file system path. */ + char pwd[256]; - /* Our re-ent struct for newlib */ - struct _reent thd_reent; + /** \brief Register store -- used to save thread context. */ + irq_context_t context; - /* Thread-local storage */ - struct kthread_tls_kv_list tls_list; + /** \brief Thread private stack. + This should be a pointer to the base of a stack page. */ + uint32 *stack; - /* Return value of the thread function */ - void *rv; + /** \brief Size of the thread's stack, in bytes. */ + uint32 stack_size; + + /** \brief Thread errno variable. */ + int thd_errno; + + /** \brief Our reent struct for newlib. */ + struct _reent thd_reent; + + /** \brief Thread-local storage. + \see kos/tls.h */ + struct kthread_tls_kv_list tls_list; + + /** \brief Return value of the thread function. + This is only used in joinable threads. */ + void *rv; } kthread_t; -/* Thread flag values */ -#define THD_DEFAULTS 0 /* Defaults: no flags */ -#define THD_USER 1 /* Thread runs in user mode */ -#define THD_QUEUED 2 /* Thread is in the run queue */ -#define THD_DETACHED 4 /* Thread is detached */ +/** \defgroup thd_flags Thread flag values -/* Thread state values */ -#define STATE_ZOMBIE 0x0000 /* Waiting to die */ -#define STATE_RUNNING 0x0001 /* Process is "current" */ -#define STATE_READY 0x0002 /* Ready to be scheduled */ -#define STATE_WAIT 0x0003 /* Blocked on a genwait */ -#define STATE_FINISHED 0x0004 /* Finished execution */ + These are possible values for the flags field on the kthread_t structure. + These can be ORed together. -/* Are threads cooperative or pre-emptive? */ + @{ +*/ +#define THD_DEFAULTS 0 /**< \brief Defaults: no flags */ +#define THD_USER 1 /**< \brief Thread runs in user mode */ +#define THD_QUEUED 2 /**< \brief Thread is in the run queue */ +#define THD_DETACHED 4 /**< \brief Thread is detached */ +/** @} */ + +/** \defgroup thd_states Thread states + + Each thread in the system is in exactly one of this set of states. + + @{ +*/ +#define STATE_ZOMBIE 0x0000 /**< \brief Waiting to die */ +#define STATE_RUNNING 0x0001 /**< \brief Process is "current" */ +#define STATE_READY 0x0002 /**< \brief Ready to be scheduled */ +#define STATE_WAIT 0x0003 /**< \brief Blocked on a genwait */ +#define STATE_FINISHED 0x0004 /**< \brief Finished execution */ +/** @} */ + +/** \brief Are threads cooperative or preemptive? + + Do not modify this variable directly. Instead, use the thd_set_mode() + function to switch threading modes. + + \see thd_modes +*/ extern int thd_mode; -#define THD_MODE_NONE -1 /* Threads not running */ -#define THD_MODE_COOP 0 -#define THD_MODE_PREEMPT 1 -/* The currently executing thread */ +/** \defgroup thd_modes Threading system modes + + The thd_mode variable will always have one of this set of values. This + represents the type of scheduling done by the system (or the special case of + threads not having been initialized yet). + + @{ +*/ +#define THD_MODE_NONE -1 /**< \brief Threads not running */ +#define THD_MODE_COOP 0 /**< \brief Cooperative threading mode */ +#define THD_MODE_PREEMPT 1 /**< \brief Preemptive threading mode */ +/** @} */ + +/** \brief The currently executing thread. + + Do not manipulate this variable directly! +*/ extern kthread_t *thd_current; -/* "Jiffy" count; just counts context switches */ +/** \brief "Jiffy" count. + + This variable counts the number of context switches done by the threading + system. Do not manipulate this variable directly! +*/ extern vuint32 jiffies; -/* Blocks the calling thread and performs a reschedule as if a context - switch timer had been executed. This is useful for, e.g., blocking - on sync primitives. The param 'mycxt' should point to the calling - thread's context block. This is implemented in arch-specific code. - The meaningfulness of the return value depends on whether the - unblocker set a return value or not. */ +/** \brief Block the current thread. + + Blocks the calling thread and performs a reschedule as if a context switch + timer had been executed. This is useful for, e.g., blocking on sync + primitives. The param 'mycxt' should point to the calling thread's context + block. This is implemented in arch-specific code. + + The meaningfulness of the return value depends on whether the unblocker set + a return value or not. + + \param mycxt The IRQ context of the calling thread. + + \return Whatever the unblocker deems necessary to return. +*/ int thd_block_now(irq_context_t * mycxt); -/* This function looks at the state of the system and returns a new - thread context to swap in. This is called from thd_block_now() and - from the pre-emptive context switcher. Note that thd_current might - be NULL on entering this function, if the caller blocked itself. - It is assumed that by the time this returns, the irq_srt_addr and - thd_current will be updated.*/ +/** \brief Find a new thread to swap in. + + This function looks at the state of the system and returns a new thread + context to swap in. This is called from thd_block_now() and from the + preemptive context switcher. Note that thd_current might be NULL on entering + this function, if the caller blocked itself. + + It is assumed that by the time this returns, the irq_srt_addr and + thd_current will be updated. + + \return The IRQ context of the thread selected. +*/ irq_context_t * thd_choose_new(); -/* Given a thread ID, locates the thread structure */ +/** \brief Given a thread ID, locates the thread structure. + \param tid The thread ID to retrieve. + + \return The thread on success, NULL on failure. +*/ kthread_t *thd_by_tid(tid_t tid); -/* Enqueue a process in the runnable queue; adds it right after the - process group of the same priority if front_of_line is zero, - otherwise queues it at the front of its priority group. */ +/** \brief Enqueue a process in the runnable queue. + + This function adds a thread to the runnable queue after the process group of + the same priority if front_of_line is zero, otherwise queues it at the front + of its priority group. Generally, you will not have to do this manually. + + \param t The thread to queue. + \param front_of_line Set to 1 to put this thread in front of other + threads of the same priority, 0 to put it behind the + other threads (normal behavior). +*/ void thd_add_to_runnable(kthread_t *t, int front_of_line); -/* Removes a thread from the runnable queue, if it's there. */ +/** \brief Removes a thread from the runnable queue, if it's there. + + This function removes a thread from the runnable queue, if it is currently + in that queue. Generally, you shouldn't have to do this manually, as waiting + on synchronization primitives and the like will do this for you if needed. + + \param thd The thread to remove from the runnable queue. + + \retval 0 On success, or if the thread isn't runnable. +*/ int thd_remove_from_runnable(kthread_t *thd); -/* New thread function; given a routine address, it will create a - new kernel thread with a default stack. When the routine - returns, the thread will exit. Returns the new thread id. */ +/** \brief Create a new thread. + + This function creates a new kernel thread with default parameters to run the + given routine. The thread will terminate and clean up resources when the + routine completes if the thread is created detached, otherwise you must + join the thread with thd_join() to clean up after it. + + \param detach Set to 1 to create a detached thread. Set to 0 to + create a joinable thread. + \param routine The function to call in the new thread. + \param param A parameter to pass to the function called. + + \return The new thread on success, NULL on failure. +*/ kthread_t *thd_create(int detach, void *(*routine)(void *param), void *param); -/* Given a thread id, this function removes the thread from - the execution chain. */ +/** \brief Brutally kill the given thread. + + This function kills the given thread, removing it from the execution chain, + cleaning up thread-local data and other internal structures. You should + never call this function on the current thread. In general, you shouldn't + call this function at all. + + \param thd The thread to destroy. + \retval 0 On success. +*/ int thd_destroy(kthread_t *thd); -/* Thread exit syscall (for use in user-mode processes, but can be used - anywhere). */ +/** \brief Exit the current thread. + + This function ends the execution of the current thread, removing it from all + execution queues. This function will never return to the thread. Returning + from the thread's function is equivalent to calling this function. + + \param rv The return value of the thread. +*/ void thd_exit(void *rv) __noreturn; -/* Force a re-schedule; for most cases, you'll want to set front_of_line - to zero, but read the comments in kernel/thread/thread.c for more - info, especially if you need to guarantee low latencies. This just - updates irq_srt_addr and thd_current. Set 'now' to non-zero if you want - thd_schedule() to use a particular system time for checking timeouts. */ +/** \brief Force a thread reschedule. + + This function is the thread scheduler, and is generally called from a timer + interrupt, at least in preemptive mode. You will most likely never have a + reason to call this function directly. + + For most cases, you'll want to set front_of_line to zero, but read the + comments in kernel/thread/thread.c for more info, especially if you need to + guarantee low latencies. This function just updates irq_srt_addr and + thd_current. Set 'now' to non-zero if you want to use a particular system + time for checking timeouts. + + \param front_of_line Set to 0, unless you have a good reason not to. + \param now Set to 0, unless you have a good reason not to. +*/ void thd_schedule(int front_of_line, uint64 now); -/* Force a given thread to the front of the queue */ +/** \brief Force a given thread to the front of the queue. + + This function promotes the given thread to be the next one that will be + swapped in by the scheduler. This function is only callable inside an + interrupt context (it simply returns otherwise). +*/ void thd_schedule_next(kthread_t *thd); -/* Throw away the curren thread's timeslice */ +/** \brief Throw away the current thread's timeslice. + + This function manually yields the current thread's timeslice to the system, + forcing a reschedule to occur. +*/ void thd_pass(); -/* Sleep for a given number of milliseconds */ +/** \brief Sleep for a given number of milliseconds. + + This function puts the current thread to sleep for the specified amount of + time. The thread will be removed from the runnable queue until the given + number of milliseconds passes. That is to say that the thread will sleep for + at least the given number of milliseconds. If another thread is running, it + will likely sleep longer. + + \param ms The number of milliseconds to sleep. +*/ void thd_sleep(int ms); -/* Set a thread's priority value; if it is scheduled already, it will be - rescheduled with the new priority value. */ +/** \brief Set a thread's priority value. + + This function is used to change the priority value of a thread. If the + thread is scheduled already, it will be rescheduled with the new priority + value. + + \param thd The thread to change the priority of. + \param prio The priority value to assign to the thread. + + \retval 0 On success. +*/ int thd_set_prio(kthread_t *thd, prio_t prio); -/* Return the current thread's kthread struct */ +/** \brief Retrieve the current thread's kthread struct. + \return The current thread's structure. +*/ kthread_t *thd_get_current(); -/* Retrive / set thread label */ +/** \brief Retrieve the thread's label. + \param thd The thread to retrieve from. + + \return The human-readable label of the thread. +*/ const char *thd_get_label(kthread_t *thd); + +/** \brief Set the thread's label. + + This function sets the label of a thread, which is simply a human-readable + string that is used to identify the thread. These labels aren't used for + anything internally, and you can give them any label you want. These are + mainly seen in the printouts from thd_pslist() or thd_pslist_queue(). + + \param thd The thread to set the label of. + \param label The string to set as the label. +*/ void thd_set_label(kthread_t *thd, const char *label); -/* Retrieve / set thread pwd */ +/** \brief Retrieve the thread's current working directory. + + This function retrieves the working directory of a thread. Generally, you + will want to use either fs_getwd() or one of the standard C functions for + doing this, but this is here in case you need it when the thread isn't + active for some reason. + + \param thd The thread to retrieve from. + + \return The thread's working directory. +*/ const char *thd_get_pwd(kthread_t *thd); + +/** \brief Set the thread's current working directory. + + This function will set the working directory of a thread. Generally, you + will want to use either fs_chdir() or the standard C chdir() function to + do this, but this is here in case you need to do it while the thread isn't + active for some reason. + + \param thd The thread to set the working directory of. + \param pwd The directory to set as active. +*/ void thd_set_pwd(kthread_t *thd, const char *pwd); -/* Retrieve a pointer to the thread errno */ +/** \brief Retrieve a pointer to the thread errno. + + This function retrieves a pointer to the errno value for the thread. You + should generally just use the errno variable to access this. + + \param thd The thread to retrieve from. + + \return A pointer to the thread's errno. +*/ int * thd_get_errno(kthread_t *thd); -/* Retrieve a pointer to the thread reent struct */ +/** \brief Retrieve a pointer to the thread reent struct. + + This function is used to retrieve some internal state that is used by + newlib to provide a reentrant libc. + + \param thd The thread to retrieve from. + + \return The thread's reent struct. +*/ struct _reent * thd_get_reent(kthread_t *thd); -/* Change threading modes */ +/** \brief Change threading modes. + + This function changes the current threading mode of the system. + + \param mode One of the \ref thd_modes values. + + \return The old mode of the threading system. +*/ int thd_set_mode(int mode); -/* Wait for a thread to exit */ +/** \brief Wait for a thread to exit. + + This function "joins" a joinable thread. This means effectively that the + calling thread blocks until the speified thread completes execution. It is + invalid to join a detached thread, only joinable threads may be joined. + + \param thd The joinable thread to join. + \param value_ptr A pointer to storage for the thread's return value, + or NULL if you don't care about it. + + \return 0 on success, or less than 0 if the thread is + non-existant or not joinable. +*/ int thd_join(kthread_t * thd, void **value_ptr); -/* Detach a joinable thread */ +/** \brief Detach a joinable thread. + + This function switches the specified thread's mode from THD_MODE_JOINABLE + to THD_MODE_DETACHED. This will ensure that the thread cleans up all of its + internal resources when it exits. + + \param thd The joinable thread to detach. + + \return 0 on success or less than 0 if the thread is + non-existant or already detached. + \see thd_join() +*/ int thd_detach(kthread_t *thd); -/* Print a list of all threads using the given print function. */ +/** \brief Print a list of all threads using the given print function. + + \param pf The printf-like function to print with. + + \retval 0 On success. +*/ int thd_pslist(int (*pf)(const char *fmt, ...)); -/* Print a list of all queued threads using the given print function. */ +/** \brief Print a list of all queued threads using the given print function. + + \param pf The printf-like function to print with. + + \retval 0 On success. +*/ int thd_pslist_queue(int (*pf)(const char *fmt, ...)); -/* Init */ +/** \brief Initialize the threading system. + + This is normally done for you by default when KOS starts. This will also + initialize all the various synchronization primitives. + + \param mode One of the \ref thd_modes values. + + \retval -1 If threads are already initialized. + \retval 0 On success. +*/ int thd_init(int mode); -/* Shutdown */ +/** \brief Shutdown the threading system. + + This is done for you by the normal shutdown procedure of KOS. This will + also shutdown all the various synchronization primitives. +*/ void thd_shutdown(); __END_DECLS Modified: kos/kernel/arch/dreamcast/include/dc/ubc.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/ubc.h 2011-08-17 16:02:51 UTC (rev 740) +++ kos/kernel/arch/dreamcast/include/dc/ubc.h 2011-08-18 02:11:58 UTC (rev 741) @@ -77,7 +77,8 @@ } /** \brief Set a UBC instruction access breakpoint at the given address. - \param address The address to set the breakpoint at + \param address The address to set the breakpoint at. + \param use_dbr Use the DBR register as the base for the exception. */ static inline void ubc_break_inst(uint32 address, int use_dbr) { BASRA = 0; /* ASID = 0 */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-08-17 16:02:57
|
Revision: 740 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=740&view=rev Author: ljsebald Date: 2011-08-17 16:02:51 +0000 (Wed, 17 Aug 2011) Log Message: ----------- A few small things in this commit: 1. Fix a mistake in the documenation of cdrom_locate_data_track. 2. Move the TLS structure to the tls.h header file. 3. Add a function for setting a UBC instruction breakpoint. Modified Paths: -------------- kos/include/kos/thread.h kos/include/kos/tls.h kos/kernel/arch/dreamcast/include/dc/cdrom.h kos/kernel/arch/dreamcast/include/dc/ubc.h Modified: kos/include/kos/thread.h =================================================================== --- kos/include/kos/thread.h 2011-07-18 03:45:25 UTC (rev 739) +++ kos/include/kos/thread.h 2011-08-17 16:02:51 UTC (rev 740) @@ -23,23 +23,6 @@ #define PRIO_MAX 4096 #define PRIO_DEFAULT 10 -/* Thread-local storage key-value pair. */ -typedef struct kthread_tls_kv { - /* List handle. */ - LIST_ENTRY(kthread_tls_kv) kv_list; - - /* The key associated with this data. */ - kthread_key_t key; - - /* The value of the data. */ - void *data; - - /* Optional destructor for the key. */ - void (*destructor)(void *); -} kthread_tls_kv_t; - -LIST_HEAD(kthread_tls_kv_list, kthread_tls_kv); - /* Pre-define list/queue types */ struct kthread; TAILQ_HEAD(ktqueue, kthread); Modified: kos/include/kos/tls.h =================================================================== --- kos/include/kos/tls.h 2011-07-18 03:45:25 UTC (rev 739) +++ kos/include/kos/tls.h 2011-08-17 16:02:51 UTC (rev 740) @@ -21,10 +21,39 @@ __BEGIN_DECLS +#include <sys/queue.h> + /** \brief Thread-local storage key type. */ typedef int kthread_key_t; +/** \brief Thread-local storage key-value pair. + + This is the structure that is actually used to store the specific value for + a thread for a single TLS key. + + You will not end up using these directly at all in programs, as they are + only used internally. +*/ +typedef struct kthread_tls_kv { + /** \brief List handle -- NOT a function. */ + LIST_ENTRY(kthread_tls_kv) kv_list; + + /** \brief The key associated with this data. */ + kthread_key_t key; + + /** \brief The value of the data. */ + void *data; + + /** \brief Optional destructor for the value (set per key). */ + void (*destructor)(void *); +} kthread_tls_kv_t; + /** \cond */ +/* TLS Key-Value pair list type. */ +LIST_HEAD(kthread_tls_kv_list, kthread_tls_kv); +/** \endcond */ + +/** \cond */ /* Retrieve the next key value (i.e, what key the next kthread_key_create will use). This function is not meant for external use (although it won't really hurt anything for you to call it). */ Modified: kos/kernel/arch/dreamcast/include/dc/cdrom.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/cdrom.h 2011-07-18 03:45:25 UTC (rev 739) +++ kos/kernel/arch/dreamcast/include/dc/cdrom.h 2011-08-17 16:02:51 UTC (rev 740) @@ -231,7 +231,7 @@ /** \brief Locate the sector of the data track. - This function will search the toc for the first entry that has a CTRL value + This function will search the toc for the last entry that has a CTRL value of 4, and return its FAD address. \param toc The TOC to search through. Modified: kos/kernel/arch/dreamcast/include/dc/ubc.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/ubc.h 2011-07-18 03:45:25 UTC (rev 739) +++ kos/kernel/arch/dreamcast/include/dc/ubc.h 2011-08-17 16:02:51 UTC (rev 740) @@ -76,6 +76,25 @@ ubc_pause(); } +/** \brief Set a UBC instruction access breakpoint at the given address. + \param address The address to set the breakpoint at +*/ +static inline void ubc_break_inst(uint32 address, int use_dbr) { + BASRA = 0; /* ASID = 0 */ + BARA = address; /* Break address */ + BAMRA = 4; /* Mask the ASID */ + + if(use_dbr) { + BRCR = 1; /* Use the DBR as the base for the IRQ */ + } + else { + BRCR = 0; + } + + BBRA = 0x1C; /* Instruction cycle, no size constraint */ + ubc_pause(); +} + /* More to come.... */ __END_DECLS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2011-07-18 03:45:32
|
Revision: 739 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=739&view=rev Author: atani Date: 2011-07-18 03:45:25 +0000 (Mon, 18 Jul 2011) Log Message: ----------- Added frame advance trigger that can advance the frame of a TexturedTile and reset the sleep animation. Modified Paths: -------------- tiki/include/Tiki/anims/sleep.h Added Paths: ----------- tiki/include/Tiki/triggers/frameadvance.h Modified: tiki/include/Tiki/anims/sleep.h =================================================================== --- tiki/include/Tiki/anims/sleep.h 2011-07-15 19:04:08 UTC (rev 738) +++ tiki/include/Tiki/anims/sleep.h 2011-07-18 03:45:25 UTC (rev 739) @@ -14,10 +14,10 @@ namespace Tiki { namespace GL { -/// Fades the alpha value of an object +/// Triggers an animation event after a determined number of frames class Sleep : public Animation { public: - Sleep(int frames) { assert(frames > 0); _frames = frames; } + Sleep(int frames) { resetFrames(frames); } virtual void nextFrame(Drawable *t, uint64 tm) { --_frames; @@ -25,7 +25,8 @@ { complete(t); } - } + } + void resetFrames(int frames) { assert(frames > 0); _frames = frames; } private: int _frames; }; Added: tiki/include/Tiki/triggers/frameadvance.h =================================================================== --- tiki/include/Tiki/triggers/frameadvance.h (rev 0) +++ tiki/include/Tiki/triggers/frameadvance.h 2011-07-18 03:45:25 UTC (rev 739) @@ -0,0 +1,61 @@ +/* + Tiki + + frameadvance.h + + Copyright (C)2011 Atani Softare +*/ +#ifndef __TIKI_TRIG_FRAMEADVANCE_H +#define __TIKI_TRIG_FRAMEADVANCE_H + + +#include "Tiki/trigger.h" +#include "Tiki/anims/sleep.h" +#include "Tiki/drawables/texturetile.h" + +namespace Tiki { + +namespace GL { + +/// Advances a frame in a TextureTile and resets the Sleep animation when triggered +class FrameAdvance : public Trigger +{ + public: + FrameAdvance( int frameCount, int maxFrames, int framesPerRow) : m_frameCount(frameCount), m_maxFrames(maxFrames), m_framesPerRow(framesPerRow) {}; + + virtual void trigger( Drawable *target, Animation *animation ) + { + static_cast<Sleep *>(animation)->resetFrames(m_frameCount); + int x = 0, y = 0; + m_currentFrame++; + m_currentFrame %= m_maxFrames; + if( m_currentFrame < m_framesPerRow) + { + x = m_currentFrame; + } + else + { + x = m_currentFrame % m_framesPerRow; + y = m_currentFrame / m_framesPerRow; + } + Tiki::Debug::printf("Selecting %d,%d\n", x, y); + static_cast<TextureTile *>(target)->selectTile(x, y); + + // re-add the animation + target->animAdd(animation); + + // the trigger does not get automatically removed since we are not calling Trigger::trigger() + } + + private: + int m_frameCount; + int m_maxFrames; + int m_framesPerRow; + int m_currentFrame; +}; + +}; +}; + + +#endif // __TIKI_TRIG_FRAMEADVANCE_H This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2011-07-15 19:04:14
|
Revision: 738 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=738&view=rev Author: atani Date: 2011-07-15 19:04:08 +0000 (Fri, 15 Jul 2011) Log Message: ----------- remove a few dead files (msvc), add new trigger animation Modified Paths: -------------- tiki/win32/tiki.cbp Modified: tiki/win32/tiki.cbp =================================================================== --- tiki/win32/tiki.cbp 2011-07-15 19:03:21 UTC (rev 737) +++ tiki/win32/tiki.cbp 2011-07-15 19:04:08 UTC (rev 738) @@ -422,7 +422,6 @@ <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\zlib\zutil.h" /> - <Unit filename="..\include\Tiki\TikiAll.h" /> <Unit filename="..\include\Tiki\animation.h" /> <Unit filename="..\include\Tiki\anims\alphafader.h" /> <Unit filename="..\include\Tiki\anims\alpharotate.h" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2011-07-15 19:03:31
|
Revision: 737 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=737&view=rev Author: atani Date: 2011-07-15 19:03:21 +0000 (Fri, 15 Jul 2011) Log Message: ----------- remove a few dead files (msvc), add new trigger animation Modified Paths: -------------- tiki/nds/tiki.cbp tiki/osx/Tiki.xcodeproj/project.pbxproj Added Paths: ----------- tiki/include/Tiki/triggers/bannerflip.h Removed Paths: ------------- tiki/include/Tiki/TikiAll.h tiki/win32/tiki.sln tiki/win32/tiki.vcproj Deleted: tiki/include/Tiki/TikiAll.h =================================================================== --- tiki/include/Tiki/TikiAll.h 2011-07-15 02:38:55 UTC (rev 736) +++ tiki/include/Tiki/TikiAll.h 2011-07-15 19:03:21 UTC (rev 737) @@ -1,46 +0,0 @@ -#include <Tiki/animation.h> -#include <Tiki/anims/alphafader.h> -#include <Tiki/anims/expxymover.h> -#include <Tiki/anims/logxymover.h> -#include <Tiki/anims/tintfader.h> -#include <Tiki/bspline.h> -#include <Tiki/color.h> -#include <Tiki/color3.h> -#include <Tiki/debug.h> -#include <Tiki/drawable.h> -#include <Tiki/drawables/banner.h> -#include <Tiki/drawables/label.h> -#include <Tiki/drawables/layer.h> -#include <Tiki/endian.h> -#include <Tiki/eventcollector.h> -#include <Tiki/file.h> -#include <Tiki/font.h> -#include <Tiki/genmenu.h> -#include <Tiki/gl.h> -#include <Tiki/hid.h> -#include <Tiki/image.h> -#include <Tiki/imgjpg.h> -#include <Tiki/imgpng.h> -#include <Tiki/list.h> -#include <Tiki/matrix.h> -#include <Tiki/object.h> -#include <Tiki/oggvorbis.h> -#include <Tiki/refcnt.h> -#include <Tiki/scene.h> -#include <Tiki/sound.h> -#include <Tiki/stream.h> -#include <Tiki/tee.h> -#include <Tiki/texture.h> -#include <Tiki/thread.h> -#include <Tiki/tiki.h> -#include <Tiki/tikimath.h> -#include <Tiki/tikitime.h> -#include <Tiki/timeline.h> -#include <Tiki/timepoint.h> -#include <Tiki/trigger.h> -#include <Tiki/triggers/birth.h> -#include <Tiki/triggers/chainanim.h> -#include <Tiki/triggers/death.h> -#include <Tiki/triggers/oneshot.h> -#include <Tiki/vector.h> -#include <Tiki/vector3.h> Added: tiki/include/Tiki/triggers/bannerflip.h =================================================================== --- tiki/include/Tiki/triggers/bannerflip.h (rev 0) +++ tiki/include/Tiki/triggers/bannerflip.h 2011-07-15 19:03:21 UTC (rev 737) @@ -0,0 +1,39 @@ +/* + Tiki + + bannerflip.h + + Copyright (C)2005 Atani Software +*/ + +#ifndef __TIKI_TRIG_BANNERFLIP_H +#define __TIKI_TRIG_BANNERFLIP_H + +#include "../animation.h" +#include "../refcnt.h" +#include "../trigger.h" +#include "../drawables/banner.h" +#include "../drawables/texture.h" + +namespace Tiki { +namespace GL { + +class BannerFlip : public Trigger +{ + public: + BannerFlip(Texture *dest) + { + assert(dest != NULL); + m_txr = dest; + } + virtual void trigger(Drawable *target, Animation *animation) + { + ((Banner *)target)->setTexture(m_txr); + } + private: + RefPtr<Texture> m_txr; +}; + +}; +}; +#endif // __TIKI_TRIG_BANNERFLIP_H Modified: tiki/nds/tiki.cbp =================================================================== --- tiki/nds/tiki.cbp 2011-07-15 02:38:55 UTC (rev 736) +++ tiki/nds/tiki.cbp 2011-07-15 19:03:21 UTC (rev 737) @@ -404,7 +404,6 @@ <Option compilerVar="CC" /> </Unit> <Unit filename="../3rdparty/zlib/zutil.h" /> - <Unit filename="../include/Tiki/TikiAll.h" /> <Unit filename="../include/Tiki/animation.h" /> <Unit filename="../include/Tiki/anims/alphafader.h" /> <Unit filename="../include/Tiki/anims/alpharotate.h" /> Modified: tiki/osx/Tiki.xcodeproj/project.pbxproj =================================================================== --- tiki/osx/Tiki.xcodeproj/project.pbxproj 2011-07-15 02:38:55 UTC (rev 736) +++ tiki/osx/Tiki.xcodeproj/project.pbxproj 2011-07-15 19:03:21 UTC (rev 737) @@ -400,7 +400,6 @@ C4B182860856B2E600B46BDA /* vorbisfile.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = vorbisfile.c; path = ../3rdparty/libvorbis/lib/vorbisfile.c; sourceTree = SOURCE_ROOT; }; C4B182870856B2E600B46BDA /* window.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = window.c; path = ../3rdparty/libvorbis/lib/window.c; sourceTree = SOURCE_ROOT; }; C4B5838C0794CFC7004D22F2 /* init_shutdown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = init_shutdown.cpp; path = src/init_shutdown.cpp; sourceTree = "<group>"; }; - C4EAEB1F08678F1F003F5342 /* TikiAll.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = TikiAll.h; path = ../include/Tiki/TikiAll.h; sourceTree = SOURCE_ROOT; }; C4ED4B97079CE776006E3DF0 /* sndoggvorbis.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sndoggvorbis.cpp; path = ../src/audio/oggvorbis/sndoggvorbis.cpp; sourceTree = SOURCE_ROOT; }; C4ED4B9E079CE7C0006E3DF0 /* oggvorbis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = oggvorbis.h; path = ../include/Tiki/oggvorbis.h; sourceTree = SOURCE_ROOT; }; C4F5148D0799FBA10001D0D0 /* endian.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = endian.cpp; path = ../src/base/endian.cpp; sourceTree = SOURCE_ROOT; }; @@ -816,7 +815,6 @@ C4ACBDA30837CFFD00FA287E /* scene.h */, C40D72F9083730CB0084B52D /* tee.h */, C472B702079AF7A300F0C00A /* thread.h */, - C4EAEB1F08678F1F003F5342 /* TikiAll.h */, C4AD50F10793ABA000E1B779 /* tikitime.h */, C40D72CE083729BD0084B52D /* timeline.h */, C40D72D108372B3A0084B52D /* timepoint.h */, Deleted: tiki/win32/tiki.sln =================================================================== --- tiki/win32/tiki.sln 2011-07-15 02:38:55 UTC (rev 736) +++ tiki/win32/tiki.sln 2011-07-15 19:03:21 UTC (rev 737) @@ -1,110 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiki", "tiki.vcproj", "{F2816CAC-B560-4ED9-8A73-9635F832943C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiSnake", "..\examples\console\TikiSnake\TikiSnake.vcproj", "{FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BasicNet", "..\examples\net\basic\basic.vcproj", "{7B823C96-860C-4578-95CC-1087A45AF1AA}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChatClient", "..\examples\net\chat\chat.vcproj", "{7B823C96-860C-4578-95DD-1087A45AF1AA}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChatServer", "..\examples\net\chatd\chatd.vcproj", "{7B823C96-860C-4578-95EE-1087A45AF1AA}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HttpClient", "..\examples\net\httpclient\httpclient.vcproj", "{7B823C96-861C-4578-95FF-1087A45AF1AA}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe02", "..\examples\nehe\lesson02\nehe02.vcproj", "{088EA2EE-469C-4306-905F-CB4AE857504D}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe03", "..\examples\nehe\lesson03\nehe03.vcproj", "{03954CA9-79FF-4A27-8A90-8984ABFA9307}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe04", "..\examples\nehe\lesson04\nehe04.vcproj", "{7B823C96-860C-4578-95FF-1087A45AF1AA}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NeHe05", "..\examples\nehe\lesson05\nehe05.vcproj", "{7B823C96-860C-4578-95BB-1087A45AF1AA}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TikiEvents", "..\examples\events\events.vcproj", "{16508E01-E2E1-47B1-9B3A-6991C0032E76}" - ProjectSection(ProjectDependencies) = postProject - {F2816CAC-B560-4ED9-8A73-9635F832943C} = {F2816CAC-B560-4ED9-8A73-9635F832943C} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug|Win32.ActiveCfg = Debug|Win32 - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Debug|Win32.Build.0 = Debug|Win32 - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.ActiveCfg = Release|Win32 - {F2816CAC-B560-4ED9-8A73-9635F832943C}.Release|Win32.Build.0 = Release|Win32 - {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.ActiveCfg = Debug|Win32 - {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Debug|Win32.Build.0 = Debug|Win32 - {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.ActiveCfg = Release|Win32 - {FCAE4EF3-7B5D-4C0D-8793-4157F7D8709F}.Release|Win32.Build.0 = Release|Win32 - {7B823C96-860C-4578-95CC-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B823C96-860C-4578-95CC-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 - {7B823C96-860C-4578-95CC-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 - {7B823C96-860C-4578-95CC-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 - {7B823C96-860C-4578-95DD-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B823C96-860C-4578-95DD-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 - {7B823C96-860C-4578-95DD-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 - {7B823C96-860C-4578-95DD-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 - {7B823C96-860C-4578-95EE-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B823C96-860C-4578-95EE-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 - {7B823C96-860C-4578-95EE-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 - {7B823C96-860C-4578-95EE-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 - {7B823C96-861C-4578-95FF-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B823C96-861C-4578-95FF-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 - {7B823C96-861C-4578-95FF-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 - {7B823C96-861C-4578-95FF-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 - {088EA2EE-469C-4306-905F-CB4AE857504D}.Debug|Win32.ActiveCfg = Debug|Win32 - {088EA2EE-469C-4306-905F-CB4AE857504D}.Debug|Win32.Build.0 = Debug|Win32 - {088EA2EE-469C-4306-905F-CB4AE857504D}.Release|Win32.ActiveCfg = Release|Win32 - {088EA2EE-469C-4306-905F-CB4AE857504D}.Release|Win32.Build.0 = Release|Win32 - {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Debug|Win32.ActiveCfg = Debug|Win32 - {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Debug|Win32.Build.0 = Debug|Win32 - {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Release|Win32.ActiveCfg = Release|Win32 - {03954CA9-79FF-4A27-8A90-8984ABFA9307}.Release|Win32.Build.0 = Release|Win32 - {7B823C96-860C-4578-95FF-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B823C96-860C-4578-95FF-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 - {7B823C96-860C-4578-95FF-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 - {7B823C96-860C-4578-95FF-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 - {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.ActiveCfg = Debug|Win32 - {7B823C96-860C-4578-95BB-1087A45AF1AA}.Debug|Win32.Build.0 = Debug|Win32 - {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.ActiveCfg = Release|Win32 - {7B823C96-860C-4578-95BB-1087A45AF1AA}.Release|Win32.Build.0 = Release|Win32 - {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Debug|Win32.ActiveCfg = Debug|Win32 - {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Debug|Win32.Build.0 = Debug|Win32 - {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Release|Win32.ActiveCfg = Release|Win32 - {16508E01-E2E1-47B1-9B3A-6991C0032E76}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal Deleted: tiki/win32/tiki.vcproj =================================================================== --- tiki/win32/tiki.vcproj 2011-07-15 02:38:55 UTC (rev 736) +++ tiki/win32/tiki.vcproj 2011-07-15 19:03:21 UTC (rev 737) @@ -1,2977 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="tiki" - ProjectGUID="{F2816CAC-B560-4ED9-8A73-9635F832943C}" - RootNamespace="tiki" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="Debug" - IntermediateDirectory="Debug" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - UseOfMFC="0" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib";"$(ProjectDir)\..\3rdparty\tinyxml"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500;_CRT_SECURE_NO_WARNINGS=1;_DEBUG=1" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="2" - PrecompiledHeaderThrough="pch.h" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/tiki.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - UseOfMFC="0" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(ProjectDir)\include";"$(ProjectDir)\..\include";"C:\Program Files\OpenAL 1.1 SDK\include";"$(ProjectDir)\..\3rdparty\libjpeg";"$(ProjectDir)\..\3rdparty\libogg\include";"$(ProjectDir)\..\3rdparty\libpng";"$(ProjectDir)\..\3rdparty\libvorbis\include";"$(ProjectDir)\..\3rdparty\zlib";"$(ProjectDir)\..\3rdparty\tinyxml"" - PreprocessorDefinitions="_WIN32_WINNT=0x0500; _CRT_SECURE_NO_WARNINGS=1" - RuntimeLibrary="0" - UsePrecompiledHeader="2" - PrecompiledHeaderThrough="pch.h" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLibrarianTool" - OutputFile="$(OutDir)/tiki.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Portable" - > - <Filter - Name="Source" - > - <Filter - Name="audio" - > - <File - RelativePath="..\src\audio\sound.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\src\audio\stream.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - ObjectFile="$(IntDir)/$(InputName)1.obj" - /> - </FileConfiguration> - </File> - <Filter - Name="oggvorbis" - > - <File - RelativePath="..\src\audio\oggvorbis\misc.h" - > - </File> - <File - RelativePath="..\src\audio\oggvorbis\sndoggvorbis.cpp" - > - </File> - </Filter> - </Filter> - <Filter - Name="base" - > - <File - RelativePath="..\src\base\debug.cpp" - > - </File> - <File - RelativePath="..\src\base\endian.cpp" - > - </File> - <File - RelativePath="..\src\base\file.cpp" - > - </File> - <File - RelativePath="..\src\base\init_flags_default.cpp" - > - </File> - <File - RelativePath="..\src\base\object.cpp" - > - </File> - <File - RelativePath="..\src\base\timeline.cpp" - > - </File> - <File - RelativePath="..\src\base\timepoint.cpp" - > - </File> - <File - RelativePath="..\src\base\version.cpp.in" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine=""c:\Program Files\TortoiseSVN\bin\SubWCRev.exe" . ..\src\base\version.cpp.in ..\src\base\version.cpp
" - Outputs="..\src\base\version.cpp" - /> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine=""c:\Program Files\TortoiseSVN\bin\SubWCRev.exe" . ..\src\base\version.cpp.in ..\src\base\version.cpp
" - Outputs="..\src\base\version.cpp" - /> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - - </File> - </Filter> - <Filter - Name="gl" - > - <File - RelativePath="..\src\gl\animation.cpp" - > - </File> - <File - RelativePath="..\src\gl\drawable.cpp" - > - </File> - <File - RelativePath="..\src\gl\font.cpp" - > - </File> - <File - RelativePath="..\src\gl\genmenu.cpp" - > - </File> - <File - RelativePath="..\src\gl\gl.cpp" - > - </File> - <File - RelativePath="..\src\gl\texture.cpp" - > - </File> - <File - RelativePath="..\src\gl\trigger.cpp" - > - </File> - <Filter - Name="anims" - > - <File - RelativePath="..\src\gl\anims\alphafader.cpp" - > - </File> - <File - RelativePath="..\src\gl\anims\expxymover.cpp" - > - </File> - <File - RelativePath="..\src\gl\anims\logxymover.cpp" - > - </File> - <File - RelativePath="..\src\gl\anims\tintfader.cpp" - > - </File> - </Filter> - <Filter - Name="drawables" - > - <File - RelativePath="..\src\gl\drawables\banner.cpp" - > - </File> - <File - RelativePath="..\src\gl\drawables\console.cpp" - > - </File> - <File - RelativePath="..\src\gl\drawables\cursor.cpp" - > - </File> - <File - RelativePath="..\src\gl\drawables\label.cpp" - > - </File> - <File - RelativePath="..\src\gl\drawables\pointerArrow.cpp" - > - </File> - <File - RelativePath="..\src\gl\drawables\texturetile.cpp" - > - </File> - </Filter> - <Filter - Name="triggers" - > - <File - RelativePath="..\src\gl\triggers\birth.cpp" - > - </File> - <File - RelativePath="..\src\gl\triggers\death.cpp" - > - </File> - </Filter> - </Filter> - <Filter - Name="hid" - > - <File - RelativePath="..\src\hid\eventcollector.cpp" - > - </File> - <File - RelativePath="..\src\hid\hid.cpp" - > - </File> - </Filter> - <Filter - Name="math" - > - <File - RelativePath="..\src\math\bspline.cpp" - > - </File> - <File - RelativePath="..\src\math\math.cpp" - > - </File> - <File - RelativePath="..\src\math\matrix.cpp" - > - </File> - <File - RelativePath="..\src\math\vector.cpp" - > - </File> - <File - RelativePath="..\src\math\vector3.cpp" - > - </File> - </Filter> - <Filter - Name="thread" - > - <File - RelativePath="..\src\thread\thread.cpp" - > - </File> - </Filter> - <Filter - Name="image" - > - <File - RelativePath="..\src\image\image.cpp" - > - </File> - <File - RelativePath="..\src\image\loadjpg.cpp" - > - </File> - <File - RelativePath="..\src\image\loadpng.cpp" - > - </File> - </Filter> - <Filter - Name="net" - > - <File - RelativePath="..\src\net\address.cpp" - > - </File> - <File - RelativePath="..\src\net\socket.cpp" - > - </File> - <File - RelativePath="..\src\net\tcpserversocket.cpp" - > - </File> - <File - RelativePath="..\src\net\tcpsocket.cpp" - > - </File> - <Filter - Name="http" - > - <File - RelativePath="..\src\net\http\cookiejar.cpp" - > - </File> - <File - RelativePath="..\src\net\http\request.cpp" - > - </File> - <File - RelativePath="..\src\net\http\response.cpp" - > - </File> - <File - RelativePath="..\src\net\http\useragent.cpp" - > - </File> - </Filter> - <Filter - Name="util" - > - <File - RelativePath="..\src\net\util\base64.cpp" - > - </File> - <File - RelativePath="..\src\net\util\date.cpp" - > - </File> - </Filter> - </Filter> - </Filter> - <Filter - Name="Include" - > - <File - RelativePath="..\include\Tiki\tiki.h" - > - </File> - <File - RelativePath="..\include\Tiki\TikiAll.h" - > - </File> - <Filter - Name="base" - > - <File - RelativePath="..\include\Tiki\debug.h" - > - </File> - <File - RelativePath="..\include\Tiki\file.h" - > - </File> - <File - RelativePath="..\include\Tiki\list.h" - > - </File> - <File - RelativePath="..\include\Tiki\object.h" - > - </File> - <File - RelativePath="..\include\Tiki\refcnt.h" - > - </File> - <File - RelativePath="..\include\Tiki\scene.h" - > - </File> - <File - RelativePath="..\include\Tiki\tee.h" - > - </File> - <File - RelativePath="..\include\Tiki\thread.h" - > - </File> - <File - RelativePath="..\include\Tiki\tikitime.h" - > - </File> - <File - RelativePath="..\include\Tiki\timeline.h" - > - </File> - <File - RelativePath="..\include\Tiki\timepoint.h" - > - </File> - </Filter> - <Filter - Name="hid" - > - <File - RelativePath="..\include\Tiki\eventcollector.h" - > - </File> - <File - RelativePath="..\include\Tiki\hid.h" - > - </File> - </Filter> - <Filter - Name="math" - > - <File - RelativePath="..\include\Tiki\bspline.h" - > - </File> - <File - RelativePath="..\include\Tiki\matrix.h" - > - </File> - <File - RelativePath="..\include\Tiki\tikimath.h" - > - </File> - <File - RelativePath="..\include\Tiki\vector.h" - > - </File> - <File - RelativePath="..\include\Tiki\vector3.h" - > - </File> - </Filter> - <Filter - Name="gl" - > - <File - RelativePath="..\include\Tiki\animation.h" - > - </File> - <File - RelativePath="..\include\Tiki\color.h" - > - </File> - <File - RelativePath="..\include\Tiki\color3.h" - > - </File> - <File - RelativePath="..\include\Tiki\drawable.h" - > - </File> - <File - RelativePath="..\include\Tiki\font.h" - > - </File> - <File - RelativePath="..\include\Tiki\genmenu.h" - > - </File> - <File - RelativePath="..\include\Tiki\gl.h" - > - </File> - <File - RelativePath="..\include\Tiki\texture.h" - > - </File> - <File - RelativePath="..\include\Tiki\trigger.h" - > - </File> - <Filter - Name="anims" - > - <File - RelativePath="..\include\Tiki\anims\alphafader.h" - > - </File> - <File - RelativePath="..\include\Tiki\anims\expxymover.h" - > - </File> - <File - RelativePath="..\include\Tiki\anims\logxymover.h" - > - </File> - <File - RelativePath="..\include\Tiki\anims\tintfader.h" - > - </File> - </Filter> - <Filter - Name="drawables" - > - <File - RelativePath="..\include\Tiki\drawables\banner.h" - > - </File> - <File - RelativePath="..\include\Tiki\drawables\label.h" - > - </File> - <File - RelativePath="..\include\Tiki\drawables\scene.h" - > - </File> - </Filter> - <Filter - Name="triggers" - > - <File - RelativePath="..\include\Tiki\triggers\birth.h" - > - </File> - <File - RelativePath="..\include\Tiki\triggers\chainanim.h" - > - </File> - <File - RelativePath="..\include\Tiki\triggers\death.h" - > - </File> - <File - RelativePath="..\include\Tiki\triggers\oneshot.h" - > - </File> - </Filter> - </Filter> - <Filter - Name="audio" - > - <File - RelativePath="..\include\Tiki\oggvorbis.h" - > - </File> - <File - RelativePath="..\include\Tiki\sound.h" - > - </File> - <File - RelativePath="..\include\Tiki\stream.h" - > - </File> - </Filter> - <Filter - Name="image" - > - <File - RelativePath="..\include\Tiki\image.h" - > - </File> - <File - RelativePath="..\include\Tiki\imgjpg.h" - > - </File> - <File - RelativePath="..\include\Tiki\imgpng.h" - > - </File> - </Filter> - <Filter - Name="net" - > - <File - RelativePath="..\include\Tiki\net\address.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\buffer.h" - > - </File> - <File - RelativePath="..\include\Tiki\net.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\socket.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\tcpserversocket.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\tcpsocket.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\udpsocket.h" - > - </File> - <Filter - Name="http" - > - <File - RelativePath="..\include\Tiki\net\http\cookie.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\http\cookiejar.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\http\request.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\http\response.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\http\useragent.h" - > - </File> - </Filter> - <Filter - Name="util" - > - <File - RelativePath="..\include\Tiki\net\util\base64.h" - > - </File> - <File - RelativePath="..\include\Tiki\net\util\date.h" - > - </File> - </Filter> - </Filter> - </Filter> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - </Filter> - <Filter - Name="Plat" - > - <Filter - Name="Source" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\src\init_shutdown.cpp" - > - </File> - <File - RelativePath=".\src\platgl.cpp" - > - </File> - <File - RelativePath=".\src\plathid.cpp" - > - </File> - <File - RelativePath=".\src\platnet.cpp" - > - </File> - <File - RelativePath=".\src\platthread.cpp" - > - </File> - <File - RelativePath=".\stdafx.cpp" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\src\tikitime.cpp" - > - </File> - </Filter> - <Filter - Name="Include" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - <File - RelativePath=".\include\Tiki\glhdrs.h" - > - </File> - <File - RelativePath=".\include\pch.h" - > - </File> - <File - RelativePath=".\include\Tiki\platnet.h" - > - </File> - <File - RelativePath=".\include\Tiki\platthread.h" - > - </File> - <File - RelativePath=".\include\Tiki\tikitypes.h" - > - </File> - </Filter> - <Filter - Name="libpng" - > - <File - RelativePath="..\3rdparty\libpng\png.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\png.h" - > - </File> - <File - RelativePath="..\3rdparty\libpng\pngconf.h" - > - </File> - <File - RelativePath="..\3rdparty\libpng\pngerror.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pnggccrd.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngget.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngmem.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngpread.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngread.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngrio.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngrtran.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngrutil.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngset.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngtrans.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngvcrd.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngwio.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngwrite.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngwtran.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libpng\pngwutil.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - </Filter> - <Filter - Name="zlib" - > - <File - RelativePath="..\3rdparty\zlib\adler32.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\compress.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\crc32.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\crc32.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\deflate.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\deflate.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\gzio.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\infback.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\inffast.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\inffast.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\inffixed.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\inflate.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\inflate.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\inftrees.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\inftrees.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\trees.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\trees.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\uncompr.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\zconf.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\zlib.h" - > - </File> - <File - RelativePath="..\3rdparty\zlib\zutil.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\zlib\zutil.h" - > - </File> - </Filter> - <Filter - Name="libjpeg" - > - <File - RelativePath="..\3rdparty\libjpeg\jcapimin.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcapistd.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jccoefct.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jccolor.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcdctmgr.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jchuff.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jchuff.h" - > - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcinit.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcmainct.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcmarker.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcmaster.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcomapi.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jconfig.h" - > - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcparam.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcphuff.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcprepct.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jcsample.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jctrans.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdapimin.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdapistd.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdatadst.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdatasrc.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdcoefct.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdcolor.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdct.h" - > - </File> - <File - RelativePath="..\3rdparty\libjpeg\jddctmgr.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdhuff.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdhuff.h" - > - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdinput.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdmainct.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdmarker.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdmaster.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdmerge.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdphuff.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdpostct.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdsample.c" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0" - /> - </FileConfiguration> - </File> - <File - RelativePath="..\3rdparty\libjpeg\jdtrans.c" - > - <FileConfiguratio... [truncated message content] |
From: <at...@us...> - 2011-07-15 02:39:01
|
Revision: 736 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=736&view=rev Author: atani Date: 2011-07-15 02:38:55 +0000 (Fri, 15 Jul 2011) Log Message: ----------- minor tweaks and fixing up debug logging to a file Modified Paths: -------------- tiki/examples/events/events.cbp tiki/examples/events/src/test.cpp tiki/examples/sound/sfx/src/main.cpp tiki/include/Tiki/debug.h tiki/include/Tiki/tiki.h tiki/src/base/debug.cpp tiki/src/base/init_flags_default.cpp tiki/src/gl/drawables/console.cpp tiki/win32/src/init_shutdown.cpp tiki/win32/src/platgl.cpp Modified: tiki/examples/events/events.cbp =================================================================== --- tiki/examples/events/events.cbp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/examples/events/events.cbp 2011-07-15 02:38:55 UTC (rev 736) @@ -8,7 +8,6 @@ <Build> <Target title="Debug"> <Option output="Debug\events" prefix_auto="1" extension_auto="1" /> - <Option working_dir="resources" /> <Option object_output=".objs\Debug" /> <Option external_deps="..\..\win32\Debug\libtiki.a;" /> <Option type="1" /> @@ -23,7 +22,6 @@ </Target> <Target title="Release"> <Option output="Release\events" prefix_auto="1" extension_auto="1" /> - <Option working_dir="resources" /> <Option object_output=".objs\Release" /> <Option external_deps="..\..\win32\Release\libtiki.a;" /> <Option type="0" /> Modified: tiki/examples/events/src/test.cpp =================================================================== --- tiki/examples/events/src/test.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/examples/events/src/test.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -14,7 +14,8 @@ using namespace Tiki; -TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_TO_FILE | TIKI_INIT_DEBUG_CONSOLE) +TIKI_DEBUG_LOG_FILE("debuglog.txt") extern "C" int tiki_main( int argc, char **argv ) { // Init Tiki Modified: tiki/examples/sound/sfx/src/main.cpp =================================================================== --- tiki/examples/sound/sfx/src/main.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/examples/sound/sfx/src/main.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -22,9 +22,7 @@ RefPtr<Sound> sound; RefPtr<Console> console; -RefPtr<Texture> console_font; - -TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) +RefPtr<Texture> console_font; volatile bool g_quitting = false; void tkCallback( const Event & evt, void * data ) { Modified: tiki/include/Tiki/debug.h =================================================================== --- tiki/include/Tiki/debug.h 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/include/Tiki/debug.h 2011-07-15 02:38:55 UTC (rev 736) @@ -11,7 +11,7 @@ namespace Tiki { namespace Debug { -void init( const char * logfile ); +void init( const std::string & logfile ); void shutdown(); int printf( const char * fmt, ... ); }; Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/include/Tiki/tiki.h 2011-07-15 02:38:55 UTC (rev 736) @@ -62,9 +62,11 @@ // Tiki initialization flags // defaults to INIT_HID_DEFAULT | INIT_VIDEO_DEFAULT | INIT_AUDIO_DEFAULT - extern uint32 g_tiki_init_flags; + extern uint32 g_tiki_init_flags; + extern std::string g_tiki_debug_file_name; - #define TIKI_INIT_FLAGS(flags) uint32 Tiki::g_tiki_init_flags = (flags); + #define TIKI_INIT_FLAGS(flags) uint32 Tiki::g_tiki_init_flags = (flags); + #define TIKI_DEBUG_LOG_FILE(file) std::string Tiki::g_tiki_debug_file_name = (file); typedef enum { // HID options TIKI_INIT_HID_KEYBOARD = 0x00000001, @@ -86,7 +88,8 @@ TIKI_INIT_AUDIO_DEFAULT = TIKI_INIT_AUDIO_STREAM | TIKI_INIT_AUDIO_SFX, TIKI_INIT_AUDIO_MASK = 0x00FF0000, - TIKI_INIT_DEBUG_CONSOLE = 0x01000000, + TIKI_INIT_DEBUG_CONSOLE = 0x01000000, + TIKI_INIT_DEBUG_TO_FILE = 0x02000000, TIKI_INIT_DEBUG_DEFAULT = 0x00000000, TIKI_INIT_DEBUG_MASK = 0xFF000000, Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/src/base/debug.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -22,7 +22,7 @@ } } -void Debug::init( const char * logfile ) { +void Debug::init( const std::string & logfile ) { logFileHandle = new File( logfile, "w+" ); } Modified: tiki/src/base/init_flags_default.cpp =================================================================== --- tiki/src/base/init_flags_default.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/src/base/init_flags_default.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -9,4 +9,5 @@ #include "pch.h" #include "Tiki/tiki.h" -TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS); +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS); +TIKI_DEBUG_LOG_FILE(""); Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/src/gl/drawables/console.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -58,8 +58,12 @@ clear(); } -Console::~Console() -{} +Console::~Console() +{ + m_texture = NULL; + m_charData.resize( 0, 0 ); + m_colorData.resize( 0, 0 ); +} void Console::setTexture( Texture * txr ) { Modified: tiki/win32/src/init_shutdown.cpp =================================================================== --- tiki/win32/src/init_shutdown.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/win32/src/init_shutdown.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -19,8 +19,8 @@ bool Tiki::init( int argc, char **argv ) { - if(g_tiki_init_flags & TIKI_INIT_DEBUG_MASK) { - Tiki::Debug::init( "debuglog.txt" ); + if(g_tiki_init_flags & TIKI_INIT_DEBUG_TO_FILE && !g_tiki_debug_file_name.empty()) { + Tiki::Debug::init( g_tiki_debug_file_name ); } // Let us run with millisecond precision if possible. Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2011-07-15 01:39:23 UTC (rev 735) +++ tiki/win32/src/platgl.cpp 2011-07-15 02:38:55 UTC (rev 736) @@ -34,7 +34,7 @@ static HANDLE m_hThread; static HDC m_hThreadDc; -static int m_targetFrameRate = 60, m_targetW = 640, m_targetH = 480; +static uint32 m_targetFrameRate = 60, m_targetW = 640, m_targetH = 480; typedef int ( APIENTRY * PFNWGLSWAPINTERVALEXTPROC ) ( int interval ); static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2011-07-15 01:39:29
|
Revision: 735 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=735&view=rev Author: atani Date: 2011-07-15 01:39:23 +0000 (Fri, 15 Jul 2011) Log Message: ----------- Forgot to add sfx.cbp Modified Paths: -------------- tiki/tiki.workspace Modified: tiki/tiki.workspace =================================================================== --- tiki/tiki.workspace 2011-07-14 23:12:17 UTC (rev 734) +++ tiki/tiki.workspace 2011-07-15 01:39:23 UTC (rev 735) @@ -7,5 +7,6 @@ <Project filename="examples/events/events.cbp" /> <Project filename="examples/menu/basic/basic.cbp" /> <Project filename="examples/menu/popup/popup.cbp" /> + <Project filename="examples/sound/sfx/sfx.cbp" /> </Workspace> </CodeBlocks_workspace_file> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2011-07-14 23:12:31
|
Revision: 734 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=734&view=rev Author: atani Date: 2011-07-14 23:12:17 +0000 (Thu, 14 Jul 2011) Log Message: ----------- More work towards win32 compilation via Code::Blocks.. It now mostly works, only the event system and the http client example are not working correctly it seems. Modified Paths: -------------- tiki/3rdparty/tinyxml/tinyxmlparser.cpp tiki/examples/console/TikiSnake/src/snake.cpp tiki/examples/events/events.cbp tiki/examples/events/src/test.cpp tiki/examples/net/httpclient/httpclient.cbp tiki/examples/sound/sfx/src/main.cpp tiki/include/Tiki/debug.h tiki/include/Tiki/net/http/cookie.h tiki/include/Tiki/tiki.h tiki/src/base/debug.cpp tiki/src/gl/drawables/console.cpp tiki/src/gl/texture.cpp tiki/tiki.workspace tiki/win32/include/Tiki/platnet.h tiki/win32/src/init_shutdown.cpp tiki/win32/src/platgl.cpp tiki/win32/tiki.cbp Added Paths: ----------- tiki/3rdparty/openal/win32/OpenAL32.dll tiki/examples/console/TikiSnake/tikisnake.cbp tiki/examples/menu/basic/basic.cbp tiki/examples/menu/popup/popup.cbp tiki/examples/sound/sfx/sfx.cbp Property Changed: ---------------- tiki/examples/console/TikiSnake/ tiki/examples/events/ tiki/examples/menu/basic/ tiki/examples/menu/popup/ tiki/examples/net/httpclient/ tiki/examples/sound/sfx/ tiki/win32/ Added: tiki/3rdparty/openal/win32/OpenAL32.dll =================================================================== (Binary files differ) Property changes on: tiki/3rdparty/openal/win32/OpenAL32.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: tiki/3rdparty/tinyxml/tinyxmlparser.cpp =================================================================== --- tiki/3rdparty/tinyxml/tinyxmlparser.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/3rdparty/tinyxml/tinyxmlparser.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -2,23 +2,23 @@ www.sourceforge.net/projects/tinyxml Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com) -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -3. This notice may not be removed or altered from any source +3. This notice may not be removed or altered from any source distribution. */ @@ -31,8 +31,8 @@ // Note tha "PutString" hardcodes the same list. This // is less flexible than it appears. Changing the entries -// or order will break putstring. -TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = { { "&", 5, '&' }, { "<", 4, '<' }, @@ -46,16 +46,16 @@ // Including the basic of this table, which determines the #bytes in the // sequence from the lead byte. 1 placed for invalid sequences -- // although the result will be junk, pass it through as much as possible. -// Beware of the non-characters in UTF-8: +// Beware of the non-characters in UTF-8: // ef bb bf (Microsoft "lead bytes") // ef bf be -// ef bf bf +// ef bf bf const unsigned char TIXML_UTF_LEAD_0 = 0xefU; const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; -const int TiXmlBase::utf8ByteTable[256] = +const int TiXmlBase::utf8ByteTable[256] = { // 0 1 2 3 4 5 6 7 8 9 a b c d e f 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 @@ -67,9 +67,9 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte @@ -83,7 +83,7 @@ const unsigned long BYTE_MARK = 0x80; const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - if (input < 0x80) + if (input < 0x80) *length = 1; else if ( input < 0x800 ) *length = 2; @@ -97,22 +97,22 @@ output += *length; // Scary scary fall throughs. - switch (*length) + switch (*length) { case 4: - --output; - *output = (char)((input | BYTE_MARK) & BYTE_MASK); + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 3: - --output; - *output = (char)((input | BYTE_MARK) & BYTE_MASK); + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 2: - --output; - *output = (char)((input | BYTE_MARK) & BYTE_MASK); + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); input >>= 6; case 1: - --output; + --output; *output = (char)(input | FIRST_BYTE_MARK[*length]); } } @@ -122,7 +122,7 @@ { // This will only work for low-ascii, everything else is assumed to be a valid // letter. I'm not sure this is the best approach, but it is quite tricky trying - // to figure out alhabetical vs. not across encoding. So take a very + // to figure out alhabetical vs. not across encoding. So take a very // conservative approach. // if ( encoding == TIXML_ENCODING_UTF8 ) @@ -143,7 +143,7 @@ { // This will only work for low-ascii, everything else is assumed to be a valid // letter. I'm not sure this is the best approach, but it is quite tricky trying - // to figure out alhabetical vs. not across encoding. So take a very + // to figure out alhabetical vs. not across encoding. So take a very // conservative approach. // if ( encoding == TIXML_ENCODING_UTF8 ) @@ -216,7 +216,7 @@ case '\r': // bump down to the next line ++row; - col = 0; + col = 0; // Eat the character ++p; @@ -258,11 +258,11 @@ // In these cases, don't advance the column. These are // 0-width spaces. if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) - p += 3; + p += 3; else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) - p += 3; + p += 3; else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) - p += 3; + p += 3; else { p +=3; ++col; } // A normal character. } @@ -314,10 +314,10 @@ while ( *p ) { const unsigned char* pU = (const unsigned char*)p; - + // Skip the stupid Microsoft UTF-8 Byte order marks if ( *(pU+0)==TIXML_UTF_LEAD_0 - && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) { p += 3; @@ -346,7 +346,7 @@ } else { - while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) + while ( *p && ( IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) ) ++p; } @@ -405,12 +405,12 @@ // After that, they can be letters, underscores, numbers, // hyphens, or colons. (Colons are valid ony for namespaces, // but tinyxml can't tell namespaces from names.) - if ( p && *p + if ( p && *p && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) { const char* start = p; while( p && *p - && ( IsAlphaNum( (unsigned char ) *p, encoding ) + && ( IsAlphaNum( (unsigned char ) *p, encoding ) || *p == '_' || *p == '-' || *p == '.' @@ -461,7 +461,7 @@ ucs += mult * (*q - 'a' + 10); else if ( *q >= 'A' && *q <= 'F' ) ucs += mult * (*q - 'A' + 10 ); - else + else return 0; mult *= 16; --q; @@ -484,7 +484,7 @@ { if ( *q >= '0' && *q <= '9' ) ucs += mult * (*q - '0'); - else + else return 0; mult *= 10; --q; @@ -563,10 +563,10 @@ return false; } -const char* TiXmlBase::ReadText( const char* p, - TIXML_STRING * text, - bool trimWhiteSpace, - const char* endTag, +const char* TiXmlBase::ReadText( const char* p, + TIXML_STRING * text, + bool trimWhiteSpace, + const char* endTag, bool caseInsensitive, TiXmlEncoding encoding ) { @@ -623,7 +623,7 @@ } } } - if ( p ) + if ( p ) p += strlen( endTag ); return p; } @@ -639,7 +639,7 @@ // This "pre-streaming" will never read the closing ">" so the // sub-tag can orient itself. - if ( !StreamTo( in, '<', tag ) ) + if ( !StreamTo( in, '<', tag ) ) { SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); return; @@ -661,7 +661,7 @@ if ( in->good() ) { - // We now have something we presume to be a node of + // We now have something we presume to be a node of // some sort. Identify it, and call the node to // continue streaming. TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); @@ -770,7 +770,7 @@ encoding = TIXML_ENCODING_UTF8; else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice - else + else encoding = TIXML_ENCODING_LEGACY; } @@ -788,7 +788,7 @@ } void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) -{ +{ // The first error in a chain is more accurate - don't set again! if ( error ) return; @@ -825,7 +825,7 @@ return 0; } - // What is this thing? + // What is this thing? // - Elements start with a letter or underscore, but xml is reserved. // - Comments: <!-- // - Decleration: <?xml @@ -913,7 +913,7 @@ return; } (*tag) += (char) c ; - + if ( c == '>' ) break; } @@ -923,7 +923,7 @@ // Okay...if we are a "/>" tag, then we're done. We've read a complete tag. // If not, identify and stream. - if ( tag->at( tag->length() - 1 ) == '>' + if ( tag->at( tag->length() - 1 ) == '>' && tag->at( tag->length() - 2 ) == '/' ) { // All good! @@ -941,7 +941,7 @@ StreamWhiteSpace( in, tag ); // Do we have text? - if ( in->good() && in->peek() != '<' ) + if ( in->good() && in->peek() != '<' ) { // Yep, text. TiXmlText text( "" ); @@ -974,7 +974,7 @@ document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); return; } - + if ( c == '>' ) break; @@ -1094,7 +1094,7 @@ // Empty tag. if ( *p != '>' ) { - if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding ); + if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding ); return 0; } return (p+1); @@ -1202,8 +1202,8 @@ LinkEndChild( textNode ); else delete textNode; - } - else + } + else { // We hit a '<' // Have we hit a new element or an end tag? This could also be @@ -1219,7 +1219,7 @@ { p = node->Parse( p, data, encoding ); LinkEndChild( node ); - } + } else { return 0; @@ -1233,7 +1233,7 @@ if ( !p ) { if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding ); - } + } return p; } @@ -1243,7 +1243,7 @@ { while ( in->good() ) { - int c = in->get(); + int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); @@ -1256,7 +1256,7 @@ if ( c == '>' ) { // All is well. - return; + return; } } } @@ -1301,7 +1301,7 @@ { while ( in->good() ) { - int c = in->get(); + int c = in->get(); if ( c <= 0 ) { TiXmlDocument* document = GetDocument(); @@ -1312,12 +1312,12 @@ (*tag) += (char) c; - if ( c == '>' + if ( c == '>' && tag->at( tag->length() - 2 ) == '-' && tag->at( tag->length() - 3 ) == '-' ) { // All is well. - return; + return; } } } @@ -1352,11 +1352,11 @@ // // from the XML spec: /* - [Definition: Comments may appear anywhere in a document outside other markup; in addition, - they may appear within the document type declaration at places allowed by the grammar. - They are not part of the document's character data; an XML processor MAY, but need not, - make it possible for an application to retrieve the text of comments. For compatibility, - the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity + [Definition: Comments may appear anywhere in a document outside other markup; in addition, + they may appear within the document type declaration at places allowed by the grammar. + They are not part of the document's character data; an XML processor MAY, but need not, + make it possible for an application to retrieve the text of comments. For compatibility, + the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity references MUST NOT be recognized within comments. An example of a comment: @@ -1371,7 +1371,7 @@ value.append( p, 1 ); ++p; } - if ( p ) + if ( p ) p += strlen( endTag ); return p; @@ -1414,7 +1414,7 @@ if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); return 0; } - + const char* end; const char SINGLE_QUOTE = '\''; const char DOUBLE_QUOTE = '\"'; @@ -1443,7 +1443,7 @@ { if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { // [ 1451649 ] Attribute values with trailing quotes not handled correctly - // We did not have an opening quote but seem to have a + // We did not have an opening quote but seem to have a // closing one. Give up and throw an error. if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); return 0; @@ -1460,8 +1460,8 @@ { while ( in->good() ) { - int c = in->peek(); - if ( !cdata && (c == '<' ) ) + int c = in->peek(); + if ( !cdata && (c == '<' ) ) { return; } @@ -1482,7 +1482,7 @@ // terminator of cdata. return; } - } + } } } #endif @@ -1521,7 +1521,7 @@ ++p; } - TIXML_STRING dummy; + TIXML_STRING dummy; p = ReadText( p, &dummy, false, endTag, false, encoding ); return p; } @@ -1595,19 +1595,19 @@ if ( StringEqual( p, "version", true, _encoding ) ) { TiXmlAttribute attrib; - p = attrib.Parse( p, data, _encoding ); + p = attrib.Parse( p, data, _encoding ); version = attrib.Value(); } else if ( StringEqual( p, "encoding", true, _encoding ) ) { TiXmlAttribute attrib; - p = attrib.Parse( p, data, _encoding ); + p = attrib.Parse( p, data, _encoding ); encoding = attrib.Value(); } else if ( StringEqual( p, "standalone", true, _encoding ) ) { TiXmlAttribute attrib; - p = attrib.Parse( p, data, _encoding ); + p = attrib.Parse( p, data, _encoding ); standalone = attrib.Value(); } else Property changes on: tiki/examples/console/TikiSnake ___________________________________________________________________ Modified: svn:ignore - Debug Release *.user *.nds *.ds.gba *.elf tikisnake build + Debug Release *.user *.nds *.ds.gba *.elf *.depend *.layout tikisnake build .objs Modified: tiki/examples/console/TikiSnake/src/snake.cpp =================================================================== --- tiki/examples/console/TikiSnake/src/snake.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/examples/console/TikiSnake/src/snake.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -55,7 +55,6 @@ extern "C" int tiki_main( int argc, char **argv ) { int x, y; - bool go = 1; bool dead = 0; //srand(time(NULL)); @@ -65,16 +64,19 @@ exit( -1 ); } Tiki::setName( "SnakeyGame", NULL ); - Hid::callbackReg( tkCallback, NULL ); + Hid::callbackReg( tkCallback, NULL ); + + // force frame rate to be 30FPS so that it matches on all platforms (this was originally written for the DC) + Tiki::GL::Frame::setFrameRateLimit( 30 ); //initialize the screen -#if TIKI_PLAT == TIKI_DC - RefPtr<Texture> cf = new Texture("/rd/pc-ascii.png", true); -#else - RefPtr<Texture> cf = new Texture("pc-ascii.png", true); -#endif +#if TIKI_PLAT == TIKI_DC + RefPtr<Texture> cf = new Texture("/rd/pc-ascii.png", true); +#else + RefPtr<Texture> cf = new Texture("pc-ascii.png", true); +#endif RefPtr<Console> ct = new Console( 80, 25, cf ); - + Vector screenExtents = Frame::getScreenExtents(); ct->setSize(screenExtents.x, screenExtents.y); screenExtents *= 0.5f; Added: tiki/examples/console/TikiSnake/tikisnake.cbp =================================================================== --- tiki/examples/console/TikiSnake/tikisnake.cbp (rev 0) +++ tiki/examples/console/TikiSnake/tikisnake.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="TikiSnake" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Debug"> + <Option output="Debug\TikiSnake" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Debug" /> + <Option external_deps="..\..\..\win32\Debug\libtiki.a;" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> + <Linker> + <Add directory="..\..\..\Win32\Debug" /> + </Linker> + </Target> + <Target title="Release"> + <Option output="Release\TikiSnake" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Release" /> + <Option external_deps="..\..\..\win32\Release\libtiki.a;" /> + <Option type="0" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add directory="..\..\..\Win32\Release" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Debug;Release;" /> + </VirtualTargets> + <Compiler> + <Add option="-Wall" /> + <Add directory="..\..\..\include" /> + <Add directory="..\..\..\win32\include" /> + <Add directory="..\..\..\3rdparty\libjpeg" /> + <Add directory="..\..\..\3rdparty\libogg\include" /> + <Add directory="..\..\..\3rdparty\libpng" /> + <Add directory="..\..\..\3rdparty\libvorbis\include" /> + <Add directory="..\..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\..\3rdparty\zlib" /> + <Add directory="..\..\..\3rdparty\openal\include" /> + </Compiler> + <Linker> + <Add library="tiki" /> + <Add library="gdi32" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="opengl32" /> + <Add library="glu32" /> + <Add library="comdlg32" /> + <Add library="ws2_32" /> + <Add library="winmm" /> + <Add library="openal32" /> + <Add library="wininet" /> + <Add directory="..\..\..\3rdparty\openal\win32\mingw" /> + </Linker> + <Unit filename="src\Controller.h" /> + <Unit filename="src\Controller.m" /> + <Unit filename="src\TikiSnake.cpp" /> + <Unit filename="src\snake.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Property changes on: tiki/examples/events ___________________________________________________________________ Modified: svn:ignore - Debug Release build *.user *.nds *.ds.gba tikievents + Debug Release build .objs *.user *.nds *.ds.gba *.layout *.depend tikievents Modified: tiki/examples/events/events.cbp =================================================================== --- tiki/examples/events/events.cbp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/examples/events/events.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -1,57 +1,81 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_project_file> +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> - <FileVersion major="1" minor="1"/> + <FileVersion major="1" minor="6" /> <Project> - <Option title="TikiEvents"/> - <Option makefile="Makefile"/> - <Option makefile_is_custom="0"/> - <Option compiler="0"/> + <Option title="events" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> <Build> - <Target title="default"> - <Option output="tikievents.exe"/> - <Option working_dir="."/> - <Option object_output=".objs"/> - <Option deps_output=".deps"/> - <Option type="0"/> - <Option compiler="0"/> - <Option projectResourceIncludeDirsRelation="0"/> + <Target title="Debug"> + <Option output="Debug\events" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Debug" /> + <Option external_deps="..\..\win32\Debug\libtiki.a;" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> + <Linker> + <Add directory="..\..\Win32\Debug" /> + </Linker> </Target> + <Target title="Release"> + <Option output="Release\events" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Release" /> + <Option external_deps="..\..\win32\Release\libtiki.a;" /> + <Option type="0" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add directory="..\..\Win32\Release" /> + </Linker> + </Target> </Build> + <VirtualTargets> + <Add alias="All" targets="Debug;Release;" /> + </VirtualTargets> <Compiler> - <Add directory="..\..\include"/> - <Add directory="..\..\win32\include"/> + <Add option="-Wall" /> + <Add directory="..\..\include" /> + <Add directory="..\..\win32\include" /> + <Add directory="..\..\3rdparty\libjpeg" /> + <Add directory="..\..\3rdparty\libogg\include" /> + <Add directory="..\..\3rdparty\libpng" /> + <Add directory="..\..\3rdparty\libvorbis\include" /> + <Add directory="..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\3rdparty\zlib" /> + <Add directory="..\..\3rdparty\openal\include" /> </Compiler> <Linker> - <Add library="gdi32"/> - <Add library="user32"/> - <Add library="kernel32"/> - <Add library="tiki"/> - <Add library="opengl32"/> - <Add library="alut"/> - <Add directory="..\..\win32"/> - <Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32"/> + <Add library="tiki" /> + <Add library="gdi32" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="opengl32" /> + <Add library="glu32" /> + <Add library="comdlg32" /> + <Add library="ws2_32" /> + <Add library="winmm" /> + <Add library="openal32" /> + <Add library="wininet" /> + <Add directory="..\..\3rdparty\openal\win32\mingw" /> </Linker> - <Unit filename="src\TikiEvents.cpp"> - <Option compilerVar="CPP"/> - <Option objectName="TikiEvents.obj"/> - <Option target="default"/> - </Unit> - <Unit filename="src\test.cpp"> - <Option compilerVar="CPP"/> - <Option objectName="test.obj"/> - <Option target="default"/> - </Unit> - <Unit filename="src\testobj.cpp"> - <Option compilerVar="CPP"/> - <Option objectName="testobj.obj"/> - <Option target="default"/> - </Unit> - <Unit filename="src\testobj.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="src\Controller.h" /> + <Unit filename="src\Controller.m" /> + <Unit filename="src\TikiEvents.cpp" /> + <Unit filename="src\test.cpp" /> + <Unit filename="src\testobj.cpp" /> + <Unit filename="src\testobj.h" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> </Project> </CodeBlocks_project_file> Modified: tiki/examples/events/src/test.cpp =================================================================== --- tiki/examples/events/src/test.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/examples/events/src/test.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -8,7 +8,9 @@ */ #include <Tiki/tiki.h> -#include "testobj.h" +#include "testobj.h" + +#include <stdlib.h> using namespace Tiki; Property changes on: tiki/examples/menu/basic ___________________________________________________________________ Modified: svn:ignore - Debug Release build *.user *.nds *.ds.gba menu_basic + Debug Release build .objs *.user *.nds *.ds.gba *.depend *.layout menu_basic Added: tiki/examples/menu/basic/basic.cbp =================================================================== --- tiki/examples/menu/basic/basic.cbp (rev 0) +++ tiki/examples/menu/basic/basic.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="BasicMenu" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Debug"> + <Option output="Debug\basic" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Debug" /> + <Option external_deps="..\..\..\win32\Debug\libtiki.a;" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> + <Linker> + <Add directory="..\..\..\Win32\Debug" /> + </Linker> + </Target> + <Target title="Release"> + <Option output="Release\basic" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Release" /> + <Option external_deps="..\..\..\win32\Release\libtiki.a;" /> + <Option type="0" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add directory="..\..\..\Win32\Release" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Debug;Release;" /> + </VirtualTargets> + <Compiler> + <Add option="-Wall" /> + <Add directory="..\..\..\include" /> + <Add directory="..\..\..\win32\include" /> + <Add directory="..\..\..\3rdparty\libjpeg" /> + <Add directory="..\..\..\3rdparty\libogg\include" /> + <Add directory="..\..\..\3rdparty\libpng" /> + <Add directory="..\..\..\3rdparty\libvorbis\include" /> + <Add directory="..\..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\..\3rdparty\zlib" /> + <Add directory="..\..\..\3rdparty\openal\include" /> + </Compiler> + <Linker> + <Add library="tiki" /> + <Add library="gdi32" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="opengl32" /> + <Add library="glu32" /> + <Add library="comdlg32" /> + <Add library="ws2_32" /> + <Add library="winmm" /> + <Add library="openal32" /> + <Add library="wininet" /> + <Add directory="..\..\..\3rdparty\openal\win32\mingw" /> + </Linker> + <Unit filename="src\Controller.h" /> + <Unit filename="src\Controller.m" /> + <Unit filename="src\MenuBasic.cpp" /> + <Unit filename="src\main.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Property changes on: tiki/examples/menu/popup ___________________________________________________________________ Modified: svn:ignore - build Debug Release *.user *.nds *.ds.gba menu_popup + build Debug Release .objs *.user *.nds *.ds.gba *.layout *.depend menu_popup Added: tiki/examples/menu/popup/popup.cbp =================================================================== --- tiki/examples/menu/popup/popup.cbp (rev 0) +++ tiki/examples/menu/popup/popup.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="PopupMenu" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Debug"> + <Option output="Debug\popup" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Debug" /> + <Option external_deps="..\..\..\win32\Debug\libtiki.a;" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> + <Linker> + <Add directory="..\..\..\Win32\Debug" /> + </Linker> + </Target> + <Target title="Release"> + <Option output="Release\popup" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Release" /> + <Option external_deps="..\..\..\win32\Release\libtiki.a;" /> + <Option type="0" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add directory="..\..\..\Win32\Release" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Debug;Release;" /> + </VirtualTargets> + <Compiler> + <Add option="-Wall" /> + <Add directory="..\..\..\include" /> + <Add directory="..\..\..\win32\include" /> + <Add directory="..\..\..\3rdparty\libjpeg" /> + <Add directory="..\..\..\3rdparty\libogg\include" /> + <Add directory="..\..\..\3rdparty\libpng" /> + <Add directory="..\..\..\3rdparty\libvorbis\include" /> + <Add directory="..\..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\..\3rdparty\zlib" /> + <Add directory="..\..\..\3rdparty\openal\include" /> + </Compiler> + <Linker> + <Add library="tiki" /> + <Add library="gdi32" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="opengl32" /> + <Add library="glu32" /> + <Add library="comdlg32" /> + <Add library="ws2_32" /> + <Add library="winmm" /> + <Add library="openal32" /> + <Add library="wininet" /> + <Add directory="..\..\..\3rdparty\openal\win32\mingw" /> + </Linker> + <Unit filename="src\Controller.h" /> + <Unit filename="src\Controller.m" /> + <Unit filename="src\MenuPopup.cpp" /> + <Unit filename="src\main.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Property changes on: tiki/examples/net/httpclient ___________________________________________________________________ Modified: svn:ignore - Debug Release *.user *.nds *.ds.gba httpclient + Debug Release *.user *.nds *.ds.gba *.layout *.depend httpclient .objs Modified: tiki/examples/net/httpclient/httpclient.cbp =================================================================== --- tiki/examples/net/httpclient/httpclient.cbp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/examples/net/httpclient/httpclient.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -6,17 +6,42 @@ <Option pch_mode="2" /> <Option compiler="gcc" /> <Build> - <Target title="default"> - <Option output="httpclient" prefix_auto="1" extension_auto="1" /> + <Target title="Debug"> + <Option output="Debug\httpclient" prefix_auto="1" extension_auto="1" /> <Option working_dir="resources" /> + <Option object_output=".objs\Debug" /> + <Option external_deps="..\..\..\win32\Debug\libtiki.a;" /> <Option type="1" /> <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> + <Linker> + <Add directory="..\..\..\Win32\Debug" /> + </Linker> </Target> + <Target title="Release"> + <Option output="Release\httpclient" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Release" /> + <Option external_deps="..\..\..\win32\Release\libtiki.a;" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add directory="..\..\..\Win32\Release" /> + </Linker> + </Target> </Build> <VirtualTargets> - <Add alias="All" targets="default;" /> + <Add alias="All" targets="Debug;Release;" /> </VirtualTargets> <Compiler> + <Add option="-Wall" /> <Add directory="..\..\..\include" /> <Add directory="..\..\..\win32\include" /> <Add directory="..\..\..\3rdparty\libjpeg" /> @@ -24,10 +49,11 @@ <Add directory="..\..\..\3rdparty\libpng" /> <Add directory="..\..\..\3rdparty\libvorbis\include" /> <Add directory="..\..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\..\3rdparty\openal\include" /> <Add directory="..\..\..\3rdparty\zlib" /> - <Add directory="C:\Program Files\OpenAL 1.1 SDK\include" /> </Compiler> <Linker> + <Add library="tiki" /> <Add library="gdi32" /> <Add library="kernel32" /> <Add library="user32" /> @@ -36,10 +62,9 @@ <Add library="comdlg32" /> <Add library="ws2_32" /> <Add library="winmm" /> - <Add library="OpenAL32" /> - <Add library="tiki" /> - <Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32" /> - <Add directory="..\..\..\Win32" /> + <Add library="openal32" /> + <Add library="wininet" /> + <Add directory="..\..\..\3rdparty\openal\win32\mingw" /> </Linker> <Unit filename="src\HttpClient.cpp" /> <Unit filename="src\main.cpp" /> @@ -47,6 +72,7 @@ <code_completion /> <envvars /> <debugger /> + <lib_finder disable_auto="1" /> </Extensions> </Project> </CodeBlocks_project_file> Property changes on: tiki/examples/sound/sfx ___________________________________________________________________ Modified: svn:ignore - build Debug Release *.nds *.ds.gba sound_fx + build Debug Release .objs *.nds *.ds.gba *.layout *.depend sound_fx Added: tiki/examples/sound/sfx/sfx.cbp =================================================================== --- tiki/examples/sound/sfx/sfx.cbp (rev 0) +++ tiki/examples/sound/sfx/sfx.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="SfxExample" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Debug"> + <Option output="Debug\sfxexample" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Debug" /> + <Option external_deps="..\..\..\win32\Debug\libtiki.a;" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> + <Linker> + <Add directory="..\..\..\Win32\Debug" /> + </Linker> + </Target> + <Target title="Release"> + <Option output="Release\sfxexample" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option object_output=".objs\Release" /> + <Option external_deps="..\..\..\win32\Release\libtiki.a;" /> + <Option type="0" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + <Add directory="..\..\..\Win32\Release" /> + </Linker> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="Debug;Release;" /> + </VirtualTargets> + <Compiler> + <Add option="-Wall" /> + <Add directory="..\..\..\include" /> + <Add directory="..\..\..\win32\include" /> + <Add directory="..\..\..\3rdparty\libjpeg" /> + <Add directory="..\..\..\3rdparty\libogg\include" /> + <Add directory="..\..\..\3rdparty\libpng" /> + <Add directory="..\..\..\3rdparty\libvorbis\include" /> + <Add directory="..\..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\..\3rdparty\zlib" /> + <Add directory="..\..\..\3rdparty\openal\include" /> + </Compiler> + <Linker> + <Add library="tiki" /> + <Add library="gdi32" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="opengl32" /> + <Add library="glu32" /> + <Add library="comdlg32" /> + <Add library="ws2_32" /> + <Add library="winmm" /> + <Add library="openal32" /> + <Add library="wininet" /> + <Add directory="..\..\..\3rdparty\openal\win32\mingw" /> + </Linker> + <Unit filename="src\SoundFX.cpp" /> + <Unit filename="src\main.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Modified: tiki/examples/sound/sfx/src/main.cpp =================================================================== --- tiki/examples/sound/sfx/src/main.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/examples/sound/sfx/src/main.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -22,7 +22,9 @@ RefPtr<Sound> sound; RefPtr<Console> console; -RefPtr<Texture> console_font; +RefPtr<Texture> console_font; + +TIKI_INIT_FLAGS(TIKI_INIT_DEFAULTS | TIKI_INIT_DEBUG_CONSOLE) volatile bool g_quitting = false; void tkCallback( const Event & evt, void * data ) { @@ -40,7 +42,7 @@ if(panning < -1.0f) { panning = -1.0f; } - + break; case Event::KeyRight: panning += 0.05f; @@ -59,19 +61,19 @@ if(volume > 1.0f) { volume = 1.0f; } - + break; case Event::KeyEsc: g_quitting = true; break; } - + } } extern "C" int tiki_main(int argc, char *argv[]) -{ +{ Tiki::init(argc, argv); Hid::callbackReg( tkCallback, NULL ); @@ -83,7 +85,7 @@ sound = new Sound("click.wav"); #endif console = new Console( 80, 25, console_font ); - + Vector screenExtents = Frame::getScreenExtents(); console->setSize(screenExtents.x, screenExtents.y); screenExtents *= 0.5f; @@ -91,26 +93,26 @@ console->enable( AUTO_WRAP ); console->enable( AUTO_SCROLL ); console->color( BLACK, GREY ); - console->clear(); - - while (!g_quitting) + console->clear(); + + while (!g_quitting) { console->clear(); console->printf("Press ESC to exit\n"); console->printf("Panning: %02.02f\n", panning); console->printf("Volume: %02.02f\n", volume); - + Frame::begin(); console->draw(Drawable::Opaque); Frame::transEnable(); console->draw(Drawable::Trans); Frame::finish(); } - + delete sound; delete console; delete console_font; - + Tiki::shutdown(); return 0; } Modified: tiki/include/Tiki/debug.h =================================================================== --- tiki/include/Tiki/debug.h 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/include/Tiki/debug.h 2011-07-14 23:12:17 UTC (rev 734) @@ -10,7 +10,9 @@ #define __TIKI_DEBUG_H namespace Tiki { -namespace Debug { +namespace Debug { +void init( const char * logfile ); +void shutdown(); int printf( const char * fmt, ... ); }; }; Modified: tiki/include/Tiki/net/http/cookie.h =================================================================== --- tiki/include/Tiki/net/http/cookie.h 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/include/Tiki/net/http/cookie.h 2011-07-14 23:12:17 UTC (rev 734) @@ -22,7 +22,7 @@ public: Cookie( string name, string value, string version = "1") : - m_name(name), m_value(value), m_maxage(0), m_version(version) { + m_name(name), m_value(value), m_version(version), m_maxage(0) { m_createTime = Tiki::Time::gettime(); }; @@ -66,11 +66,11 @@ m_path = path; } - long getMaxAge() const { + uint64 getMaxAge() const { return m_maxage; } - void setMaxAge(long age) { + void setMaxAge(uint64 age) { m_maxage = age; } @@ -94,7 +94,7 @@ string m_version; string m_domain; string m_comment; - long m_maxage; + uint64 m_maxage; string m_path; bool m_secure; uint64 m_createTime; Modified: tiki/include/Tiki/tiki.h =================================================================== --- tiki/include/Tiki/tiki.h 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/include/Tiki/tiki.h 2011-07-14 23:12:17 UTC (rev 734) @@ -35,7 +35,7 @@ // Bring in our custom types. #include "Tiki/tikitypes.h" -#if TIKI_PLAT==TIKI_WIN32 +#if TIKI_PLAT==TIKI_WIN32 && defined(_MSC_VER) #pragma comment(lib, "tiki.lib") #endif Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/src/base/debug.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -8,12 +8,30 @@ */ #include "pch.h" -#include "Tiki/debug.h" +#include "Tiki/debug.h" +#include "Tiki/file.h" #include <stdarg.h> #include <stdio.h> -using namespace Tiki::Debug; +using namespace Tiki::Debug; + +namespace Tiki{ +namespace Debug{ +Tiki::File *logFileHandle; +} +} + +void Debug::init( const char * logfile ) { + logFileHandle = new File( logfile, "w+" ); +} + +void Debug::shutdown() { + if ( logFileHandle != NULL && logFileHandle->isValid() ) { + logFileHandle->close(); + logFileHandle = NULL; + } +} int Debug::printf( const char * fmt, ... ) { if(g_tiki_init_flags & TIKI_INIT_DEBUG_MASK) { @@ -23,9 +41,12 @@ va_start( args, fmt ); int i = vsprintf( buffer, fmt, args ); va_end( args ); - - OutputDebugString( buffer ); - + OutputDebugString( buffer ); + + if ( logFileHandle != NULL && logFileHandle->isValid() ) + { + logFileHandle->write( buffer, i ); + } return i; #elif TIKI_PLAT == TIKI_NDS va_list args; @@ -42,6 +63,11 @@ va_start( args, fmt ); int i = vprintf( fmt, args ); va_end( args ); + + if ( logFileHandle != NULL && logFileHandle->isValid() ) + { + logFileHandle->write( buffer, i ); + } return i; #endif Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/src/gl/drawables/console.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -210,9 +210,9 @@ m_cursor_y = m_rows - 1; } - +#if defined(_DEBUG) assert( m_cursor_x >= 0 && m_cursor_y >= 0 && m_cursor_x < m_cols && m_cursor_y < m_rows ); - +#endif m_charData[ ( m_cursor_y * m_cols ) + m_cursor_x ] = buf[ i ]; m_colorData[ ( m_cursor_y * m_cols ) + m_cursor_x ] = m_attr; Modified: tiki/src/gl/texture.cpp =================================================================== --- tiki/src/gl/texture.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/src/gl/texture.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -280,7 +280,7 @@ } #endif - return true; + return err == GL_NO_ERROR; } bool Texture::createCanvas( int w, int h, Fmt fmt ) { @@ -330,7 +330,7 @@ #else // on the DS we only handle 16 bit textures, so use existing allocated space m_txrdata = m_ptr; - + uint8 tw, th; getTextureSize(w, h, &tw, &th); m_w = tw; Modified: tiki/tiki.workspace =================================================================== --- tiki/tiki.workspace 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/tiki.workspace 2011-07-14 23:12:17 UTC (rev 734) @@ -2,7 +2,10 @@ <CodeBlocks_workspace_file> <Workspace title="Workspace"> <Project filename="win32/tiki.cbp" /> - <Project filename="examples/net/httpclient/httpclient.cbp" /> - <Project filename="C:/Documents and Settings/mdunston.ST-USERS/Desktop/test/tikitest/tikitest.cbp" active="1" /> + <Project filename="examples/net/httpclient/httpclient.cbp" active="1" /> + <Project filename="examples/console/TikiSnake/tikisnake.cbp" /> + <Project filename="examples/events/events.cbp" /> + <Project filename="examples/menu/basic/basic.cbp" /> + <Project filename="examples/menu/popup/popup.cbp" /> </Workspace> </CodeBlocks_workspace_file> Property changes on: tiki/win32 ___________________________________________________________________ Modified: svn:ignore - tiki.depend tiki.layout tiki.ncb tiki.suo libtiki.a Debug Release *.user + tiki.depend tiki.layout tiki.ncb tiki.suo libtiki.a Debug Release *.user .objs Modified: tiki/win32/include/Tiki/platnet.h =================================================================== --- tiki/win32/include/Tiki/platnet.h 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/win32/include/Tiki/platnet.h 2011-07-14 23:12:17 UTC (rev 734) @@ -17,7 +17,9 @@ #include <winsock2.h> #include <wininet.h> +#if defined(_MSVC) #pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "wininet.lib") +#endif #endif // TIKI_PLATFORM_NET_H Modified: tiki/win32/src/init_shutdown.cpp =================================================================== --- tiki/win32/src/init_shutdown.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/win32/src/init_shutdown.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -9,11 +9,20 @@ #include <alc.h> #include <stdlib.h> -#include <MMSystem.h> +#include <MMSystem.h> + +// For MSVC we inline the required library includes +#if defined(_MSC_VER) #pragma comment(lib, "winmm.lib") -#pragma comment(lib, "OpenAL32.lib") +#pragma comment(lib, "OpenAL32.lib") +#endif -bool Tiki::init( int argc, char **argv ) { +bool Tiki::init( int argc, char **argv ) { + + if(g_tiki_init_flags & TIKI_INIT_DEBUG_MASK) { + Tiki::Debug::init( "debuglog.txt" ); + } + // Let us run with millisecond precision if possible. timeBeginPeriod( 1 ); @@ -26,8 +35,14 @@ ctx = alcCreateContext( dev, 0 ); if ( ctx != NULL ) { alcMakeContextCurrent( ctx ); - alcProcessContext( ctx ); - } // if + alcProcessContext( ctx ); + } + else { + Tiki::Debug::printf( "Failed to create OpenAL Context: %x", alGetError() ); + } // if + } + else { + Tiki::Debug::printf( "Failed to open OpenAL Audio device: %x", alGetError() ); } // if if(g_tiki_init_flags & TIKI_INIT_AUDIO_SFX) { Audio::Sound::initGlobal(); @@ -52,7 +67,9 @@ Audio::Sound::shutdownGlobal(); } - timeEndPeriod( 1 ); + timeEndPeriod( 1 ); + + Tiki::Debug::shutdown(); } void Tiki::setName( const char *name, const char *icon ) { Modified: tiki/win32/src/platgl.cpp =================================================================== --- tiki/win32/src/platgl.cpp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/win32/src/platgl.cpp 2011-07-14 23:12:17 UTC (rev 734) @@ -13,11 +13,16 @@ #include "Tiki/glhdrs.h" #include "Tiki/hid.h" #include "Tiki/tikitime.h" -#include "Tiki/gl.h" - +#include "Tiki/gl.h" + +#include <stdlib.h> + +// For MSVC we inline the required library includes +#if defined(_MSC_VER) #pragma comment(lib, "shell32.lib") #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "glu32.lib") +#endif using namespace Tiki::Hid; @@ -95,7 +100,18 @@ WindowRect.top += ( GetSystemMetrics( SM_CYSCREEN ) / 2 - m_targetH / 2 ); WindowRect.bottom += ( GetSystemMetrics( SM_CYSCREEN ) / 2 - m_targetH / 2 ); - m_hWndMain = CreateWindow( szAppName, szAppName, WS_POPUP | WS_CAPTION | WS_SYSMENU, WindowRect.left, WindowRect.top, WindowRect.right - WindowRect.left, WindowRect.bottom - WindowRect.top, NULL, NULL, m_hInstance, NULL ); + m_hWndMain = CreateWindowEx( 0, + szAppName, + szAppName, + WS_OVERLAPPEDWINDOW | WS_POPUP | WS_CAPTION | WS_SYSMENU, + WindowRect.left, + WindowRect.top, + WindowRect.right - WindowRect.left, + WindowRect.bottom - WindowRect.top, + NULL, + NULL, + m_hInstance, + NULL ); if ( !m_hWndMain ) return FALSE; @@ -174,7 +190,7 @@ // Fill in a pixel format descriptor. PIXELFORMATDESCRIPTOR pfd; - memset( &pfd, 0, sizeof( pfd ) ); + ZeroMemory( &pfd, sizeof( pfd ) ); pfd.nSize = sizeof( pfd ); pfd.nVersion = 1; pfd.dwFlags = PFD_DOUBLEBUFFER | @@ -188,7 +204,7 @@ int chosen = ChoosePixelFormat( hdc, &pfd ); // Check to see if we got accelerated. - memset( &pfd, 0, sizeof( pfd ) ); + ZeroMemory( &pfd, sizeof( pfd ) ); pfd.nSize = sizeof( pfd ); DescribePixelFormat( hdc, chosen, sizeof( pfd ), &pfd ); if ( pfd.dwFlags & PFD_GENERIC_FORMAT ) { @@ -265,8 +281,12 @@ m_hThreadDc = GetDC( m_hWndMain ); m_hThreadRc = wglCreateContext( m_hThreadDc ); wglShareLists( m_hrc, m_hThreadRc ); - wglMakeCurrent( m_hThreadDc, m_hThreadRc ); - + wglMakeCurrent( m_hThreadDc, m_hThreadRc ); + + // Short cut version of commented code below. These are dll exports according to mingw headers. + tiki_main( __argc, __argv ); + +/* int argc = 0; LPWSTR *args = CommandLineToArgvW( GetCommandLineW(), &argc ); // if we have 1 or more command line args, pass it down nicely to tiki_main @@ -287,7 +307,8 @@ delete [] argv; } else { tiki_main( 0, NULL ); - } + } +*/ wglDeleteContext( m_hThreadRc ); ReleaseDC( m_hWndMain, m_hThreadDc ); Modified: tiki/win32/tiki.cbp =================================================================== --- tiki/win32/tiki.cbp 2011-07-13 17:50:36 UTC (rev 733) +++ tiki/win32/tiki.cbp 2011-07-14 23:12:17 UTC (rev 734) @@ -1,1509 +1,573 @@ -<?xml version="1.0"?> -<!DOCTYPE CodeBlocks_project_file> +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_project_file> - <FileVersion major="1" minor="1"/> + <FileVersion major="1" minor="6" /> <Project> - <Option title="Tiki"/> - <Option makefile="Makefile"/> - <Option makefile_is_custom="0"/> - <Option compiler="0"/> + <Option title="Tiki" /> + <Option pch_mode="0" /> + <Option compiler="gcc" /> <Build> - <Target title="default"> - <Option output="libtiki.a"/> - <Option working_dir=""/> - <Option object_output=".objs"/> - <Option deps_output=".deps"/> - <Option type="2"/> - <Option compiler="0"/> - <Option projectResourceIncludeDirsRelation="2"/> + <Target title="Debug"> + <Option output="Debug\libtiki" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output=".objs\Debug" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="2" /> + <Compiler> + <Add option="-g" /> + <Add option="-D_DEBUG" /> + </Compiler> </Target> + <Target title="Release"> + <Option output="Release\libtiki" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output=".objs\Release" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option projectResourceIncludeDirsRelation="2" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + </Linker> + </Target> </Build> + <VirtualTargets> + <Add alias="All" targets="Debug;Release;" /> + </VirtualTargets> <Compiler> - <Add directory="..\include"/> - <Add directory="include"/> - <Add directory="..\3rdparty\libjpeg"/> - <Add directory="..\3rdparty\libogg\include"/> - <Add directory="..\3rdparty\libpng"/> - <Add directory="..\3rdparty\libvorbis\include"/> - <Add directory="..\3rdparty\zlib"/> - <Add directory="C:\Program Files\OpenAL 1.1 SDK\include"/> - <Add directory="..\3rdparty\libvorbis\lib"/> + <Add option="-Wall" /> + <Add directory="include" /> + <Add directory="..\include" /> + <Add directory="..\3rdparty\libjpeg" /> + <Add directory="..\3rdparty\libogg\include" /> + <Add directory="..\3rdparty\libpng" /> + <Add directory="..\3rdparty\libvorbis\include" /> + <Add directory="..\3rdparty\zlib" /> + <Add directory="..\3rdparty\libvorbis\lib" /> + <Add directory="..\3rdparty\tinyxml" /> + <Add directory="..\3rdparty\openal\include" /> </Compiler> <Linker> - <Add library="opengl32"/> - <Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32"/> + <Add library="opengl32" /> + <Add library="openal32" /> + <Add directory="..\3rdparty\openal\win32\mingw" /> </Linker> <Unit filename="..\3rdparty\libjpeg\jcapimin.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcapistd.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jccoefct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jccolor.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcdctmgr.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jchuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jchuff.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="..\3rdparty\libjpeg\jchuff.h" /> <Unit filename="..\3rdparty\libjpeg\jcinit.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcmainct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcmarker.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcmaster.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcomapi.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jconfig.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="..\3rdparty\libjpeg\jconfig.h" /> <Unit filename="..\3rdparty\libjpeg\jcparam.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcphuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcprepct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jcsample.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jctrans.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdapimin.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdapistd.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdatadst.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdatasrc.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdcoefct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdcolor.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdct.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="..\3rdparty\libjpeg\jdct.h" /> <Unit filename="..\3rdparty\libjpeg\jddctmgr.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdhuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jdhuff.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="..\3rdparty\libjpeg\jdhuff.h" /> <Unit filename="..\3rdparty\libjpeg\jdinput.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdmainct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdmarker.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdmaster.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdmerge.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdphuff.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdpostct.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdsample.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jdtrans.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jerror.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> - <Unit filename="..\3rdparty\libjpeg\jerror.h"> - <Option compilerVar=""/> - <Option compile="0"/> - <Option link="0"/> - <Option target="default"/> - </Unit> + <Unit filename="..\3rdparty\libjpeg\jerror.h" /> <Unit filename="..\3rdparty\libjpeg\jfdctflt.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jfdctfst.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jfdctint.c"> - <Option compilerVar="CC"/> - <Option target="default"/> + <Option compilerVar="CC" /> </Unit> <Unit filename="..\3rdparty\libjpeg\jidctflt.c"> - <Option compilerVar="CC"/> - ... [truncated message content] |
From: <at...@us...> - 2011-07-13 17:50:42
|
Revision: 733 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=733&view=rev Author: atani Date: 2011-07-13 17:50:36 +0000 (Wed, 13 Jul 2011) Log Message: ----------- add missing libopenal32.a file from rev732 Revision Links: -------------- http://cadcdev.svn.sourceforge.net/cadcdev/?rev=732&view=rev Added Paths: ----------- tiki/3rdparty/openal/win32/mingw/libopenal32.a Added: tiki/3rdparty/openal/win32/mingw/libopenal32.a =================================================================== (Binary files differ) Property changes on: tiki/3rdparty/openal/win32/mingw/libopenal32.a ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <at...@us...> - 2011-07-13 17:35:41
|
Revision: 732 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=732&view=rev Author: atani Date: 2011-07-13 17:35:33 +0000 (Wed, 13 Jul 2011) Log Message: ----------- fixing up code::blocks project on win32, added openal converted lib and headers for mingw Modified Paths: -------------- tiki/src/audio/sound.cpp tiki/src/base/debug.cpp tiki/src/gl/drawables/console.cpp tiki/src/net/http/cookiejar.cpp tiki/src/net/http/useragent.cpp tiki/src/net/util/date.cpp tiki/win32/src/init_shutdown.cpp tiki/win32/src/platnet.cpp tiki/win32/tiki.cbp Added Paths: ----------- tiki/3rdparty/openal/ tiki/3rdparty/openal/include/ tiki/3rdparty/openal/include/al.h tiki/3rdparty/openal/include/alc.h tiki/3rdparty/openal/win32/ tiki/3rdparty/openal/win32/mingw/ tiki/examples/net/httpclient/httpclient.cbp tiki/tiki.workspace Added: tiki/3rdparty/openal/include/al.h =================================================================== --- tiki/3rdparty/openal/include/al.h (rev 0) +++ tiki/3rdparty/openal/include/al.h 2011-07-13 17:35:33 UTC (rev 732) @@ -0,0 +1,732 @@ +#ifndef AL_AL_H +#define AL_AL_H + + + +#if defined(__cplusplus) +extern "C" { +#endif + +#if defined(_WIN32) && !defined(_XBOX) + /* _OPENAL32LIB is deprecated */ + #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB) + #define AL_API __declspec(dllexport) + #else + #define AL_API __declspec(dllimport) + #endif +#else + #define AL_API extern +#endif + +#if defined(_WIN32) + #define AL_APIENTRY __cdecl +#else + #define AL_APIENTRY +#endif + +#if TARGET_OS_MAC + #pragma export on +#endif + +/* The OPENAL, ALAPI, and ALAPIENTRY macros are deprecated, but are included for applications porting code + from AL 1.0 */ +#define OPENAL +#define ALAPI AL_API +#define ALAPIENTRY AL_APIENTRY + +#define AL_VERSION_1_0 +#define AL_VERSION_1_1 + + +/** 8-bit boolean */ +typedef char ALboolean; + +/** character */ +typedef char ALchar; + +/** signed 8-bit 2's complement integer */ +typedef char ALbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALsizei; + +/** enumerated 32-bit value */ +typedef int ALenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALdouble; + +/** void type (for opaque pointers only) */ +typedef void ALvoid; + + +/* Enumerant values begin at column 50. No tabs. */ + +/* bad value */ +#define AL_INVALID -1 + +#define AL_NONE 0 + +/* Boolean False. */ +#define AL_FALSE 0 + +/** Boolean True. */ +#define AL_TRUE 1 + +/** Indicate Source has relative coordinates. */ +#define AL_SOURCE_RELATIVE 0x202 + + + +/** + * Directional source, inner cone angle, in degrees. + * Range: [0-360] + * Default: 360 + */ +#define AL_CONE_INNER_ANGLE 0x1001 + +/** + * Directional source, outer cone angle, in degrees. + * Range: [0-360] + * Default: 360 + */ +#define AL_CONE_OUTER_ANGLE 0x1002 + +/** + * Specify the pitch to be applied, either at source, + * or on mixer results, at listener. + * Range: [0.5-2.0] + * Default: 1.0 + */ +#define AL_PITCH 0x1003 + +/** + * Specify the current location in three dimensional space. + * OpenAL, like OpenGL, uses a right handed coordinate system, + * where in a frontal default view X (thumb) points right, + * Y points up (index finger), and Z points towards the + * viewer/camera (middle finger). + * To switch from a left handed coordinate system, flip the + * sign on the Z coordinate. + * Listener position is always in the world coordinate system. + */ +#define AL_POSITION 0x1004 + +/** Specify the current direction. */ +#define AL_DIRECTION 0x1005 + +/** Specify the current velocity in three dimensional space. */ +#define AL_VELOCITY 0x1006 + +/** + * Indicate whether source is looping. + * Type: ALboolean? + * Range: [AL_TRUE, AL_FALSE] + * Default: FALSE. + */ +#define AL_LOOPING 0x1007 + +/** + * Indicate the buffer to provide sound samples. + * Type: ALuint. + * Range: any valid Buffer id. + */ +#define AL_BUFFER 0x1009 + +/** + * Indicate the gain (volume amplification) applied. + * Type: ALfloat. + * Range: ]0.0- ] + * A value of 1.0 means un-attenuated/unchanged. + * Each division by 2 equals an attenuation of -6dB. + * Each multiplicaton with 2 equals an amplification of +6dB. + * A value of 0.0 is meaningless with respect to a logarithmic + * scale; it is interpreted as zero volume - the channel + * is effectively disabled. + */ +#define AL_GAIN 0x100A + +/* + * Indicate minimum source attenuation + * Type: ALfloat + * Range: [0.0 - 1.0] + * + * Logarthmic + */ +#define AL_MIN_GAIN 0x100D + +/** + * Indicate maximum source attenuation + * Type: ALfloat + * Range: [0.0 - 1.0] + * + * Logarthmic + */ +#define AL_MAX_GAIN 0x100E + +/** + * Indicate listener orientation. + * + * at/up + */ +#define AL_ORIENTATION 0x100F + +/** + * Specify the channel mask. (Creative) + * Type: ALuint + * Range: [0 - 255] + */ +#define AL_CHANNEL_MASK 0x3000 + + +/** + * Source state information. + */ +#define AL_SOURCE_STATE 0x1010 +#define AL_INITIAL 0x1011 +#define AL_PLAYING 0x1012 +#define AL_PAUSED 0x1013 +#define AL_STOPPED 0x1014 + +/** + * Buffer Queue params + */ +#define AL_BUFFERS_QUEUED 0x1015 +#define AL_BUFFERS_PROCESSED 0x1016 + +/** + * Source buffer position information + */ +#define AL_SEC_OFFSET 0x1024 +#define AL_SAMPLE_OFFSET 0x1025 +#define AL_BYTE_OFFSET 0x1026 + +/* + * Source type (Static, Streaming or undetermined) + * Source is Static if a Buffer has been attached using AL_BUFFER + * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers + * Source is undetermined when it has the NULL buffer attached + */ +#define AL_SOURCE_TYPE 0x1027 +#define AL_STATIC 0x1028 +#define AL_STREAMING 0x1029 +#define AL_UNDETERMINED 0x1030 + +/** Sound samples: format specifier. */ +#define AL_FORMAT_MONO8 0x1100 +#define AL_FORMAT_MONO16 0x1101 +#define AL_FORMAT_STEREO8 0x1102 +#define AL_FORMAT_STEREO16 0x1103 + +/** + * source specific reference distance + * Type: ALfloat + * Range: 0.0 - +inf + * + * At 0.0, no distance attenuation occurs. Default is + * 1.0. + */ +#define AL_REFERENCE_DISTANCE 0x1020 + +/** + * source specific rolloff factor + * Type: ALfloat + * Range: 0.0 - +inf + * + */ +#define AL_ROLLOFF_FACTOR 0x1021 + +/** + * Directional source, outer cone gain. + * + * Default: 0.0 + * Range: [0.0 - 1.0] + * Logarithmic + */ +#define AL_CONE_OUTER_GAIN 0x1022 + +/** + * Indicate distance above which sources are not + * attenuated using the inverse clamped distance model. + * + * Default: +inf + * Type: ALfloat + * Range: 0.0 - +inf + */ +#define AL_MAX_DISTANCE 0x1023 + +/** + * Sound samples: frequency, in units of Hertz [Hz]. + * This is the number of samples per second. Half of the + * sample frequency marks the maximum significant + * frequency component. + */ +#define AL_FREQUENCY 0x2001 +#define AL_BITS 0x2002 +#define AL_CHANNELS 0x2003 +#define AL_SIZE 0x2004 + +/** + * Buffer state. + * + * Not supported for public use (yet). + */ +#define AL_UNUSED 0x2010 +#define AL_PENDING 0x2011 +#define AL_PROCESSED 0x2012 + + +/** Errors: No Error. */ +#define AL_NO_ERROR AL_FALSE + +/** + * Invalid Name paramater passed to AL call. + */ +#define AL_INVALID_NAME 0xA001 + +/** + * Invalid parameter passed to AL call. + */ +#define AL_ILLEGAL_ENUM 0xA002 +#define AL_INVALID_ENUM 0xA002 + +/** + * Invalid enum parameter value. + */ +#define AL_INVALID_VALUE 0xA003 + +/** + * Illegal call. + */ +#define AL_ILLEGAL_COMMAND 0xA004 +#define AL_INVALID_OPERATION 0xA004 + + +/** + * No mojo. + */ +#define AL_OUT_OF_MEMORY 0xA005 + + +/** Context strings: Vendor Name. */ +#define AL_VENDOR 0xB001 +#define AL_VERSION 0xB002 +#define AL_RENDERER 0xB003 +#define AL_EXTENSIONS 0xB004 + +/** Global tweakage. */ + +/** + * Doppler scale. Default 1.0 + */ +#define AL_DOPPLER_FACTOR 0xC000 + +/** + * Tweaks speed of propagation. + */ +#define AL_DOPPLER_VELOCITY 0xC001 + +/** + * Speed of Sound in units per second + */ +#define AL_SPEED_OF_SOUND 0xC003 + +/** + * Distance models + * + * used in conjunction with DistanceModel + * + * implicit: NONE, which disances distance attenuation. + */ +#define AL_DISTANCE_MODEL 0xD000 +#define AL_INVERSE_DISTANCE 0xD001 +#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 +#define AL_LINEAR_DISTANCE 0xD003 +#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 +#define AL_EXPONENT_DISTANCE 0xD005 +#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 + + +#if !defined(AL_NO_PROTOTYPES) + +/* + * Renderer State management + */ +AL_API void AL_APIENTRY alEnable( ALenum capability ); + +AL_API void AL_APIENTRY alDisable( ALenum capability ); + +AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability ); + + +/* + * State retrieval + */ +AL_API const ALchar* AL_APIENTRY alGetString( ALenum param ); + +AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data ); + +AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data ); + +AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data ); + +AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data ); + +AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param ); + +AL_API ALint AL_APIENTRY alGetInteger( ALenum param ); + +AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param ); + +AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param ); + + +/* + * Error support. + * Obtain the most recent error generated in the AL state machine. + */ +AL_API ALenum AL_APIENTRY alGetError( void ); + + +/* + * Extension support. + * Query for the presence of an extension, and obtain any appropriate + * function pointers and enum values. + */ +AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname ); + +AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname ); + +AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename ); + + +/* + * LISTENER + * Listener represents the location and orientation of the + * 'user' in 3D-space. + * + * Properties include: - + * + * Gain AL_GAIN ALfloat + * Position AL_POSITION ALfloat[3] + * Velocity AL_VELOCITY ALfloat[3] + * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors) +*/ + +/* + * Set Listener parameters + */ +AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value ); + +AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); + +AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values ); + +AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value ); + +AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 ); + +AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values ); + +/* + * Get Listener parameters + */ +AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value ); + +AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); + +AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values ); + +AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value ); + +AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); + +AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values ); + + +/** + * SOURCE + * Sources represent individual sound objects in 3D-space. + * Sources take the PCM data provided in the specified Buffer, + * apply Source-specific modifications, and then + * submit them to be mixed according to spatial arrangement etc. + * + * Properties include: - + * + * Gain AL_GAIN ALfloat + * Min Gain AL_MIN_GAIN ALfloat + * Max Gain AL_MAX_GAIN ALfloat + * Position AL_POSITION ALfloat[3] + * Velocity AL_VELOCITY ALfloat[3] + * Direction AL_DIRECTION ALfloat[3] + * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE) + * Reference Distance AL_REFERENCE_DISTANCE ALfloat + * Max Distance AL_MAX_DISTANCE ALfloat + * RollOff Factor AL_ROLLOFF_FACTOR ALfloat + * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat + * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat + * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat + * Pitch AL_PITCH ALfloat + * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE) + * MS Offset AL_MSEC_OFFSET ALint or ALfloat + * Byte Offset AL_BYTE_OFFSET ALint or ALfloat + * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat + * Attached Buffer AL_BUFFER ALint + * State (Query only) AL_SOURCE_STATE ALint + * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint + * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint + */ + +/* Create Source objects */ +AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources ); + +/* Delete Source objects */ +AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources ); + +/* Verify a handle is a valid Source */ +AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid ); + +/* + * Set Source parameters + */ +AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ); + +AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); + +AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values ); + +AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value ); + +AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); + +AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values ); + +/* + * Get Source parameters + */ +AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value ); + +AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); + +AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values ); + +AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value ); + +AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); + +AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values ); + + +/* + * Source vector based playback calls + */ + +/* Play, replay, or resume (if paused) a list of Sources */ +AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids ); + +/* Stop a list of Sources */ +AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids ); + +/* Rewind a list of Sources */ +AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids ); + +/* Pause a list of Sources */ +AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids ); + +/* + * Source based playback calls + */ + +/* Play, replay, or resume a Source */ +AL_API void AL_APIENTRY alSourcePlay( ALuint sid ); + +/* Stop a Source */ +AL_API void AL_APIENTRY alSourceStop( ALuint sid ); + +/* Rewind a Source (set playback postiton to beginning) */ +AL_API void AL_APIENTRY alSourceRewind( ALuint sid ); + +/* Pause a Source */ +AL_API void AL_APIENTRY alSourcePause( ALuint sid ); + +/* + * Source Queuing + */ +AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids ); + +AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids ); + + +/** + * BUFFER + * Buffer objects are storage space for sample data. + * Buffers are referred to by Sources. One Buffer can be used + * by multiple Sources. + * + * Properties include: - + * + * Frequency (Query only) AL_FREQUENCY ALint + * Size (Query only) AL_SIZE ALint + * Bits (Query only) AL_BITS ALint + * Channels (Query only) AL_CHANNELS ALint + */ + +/* Create Buffer objects */ +AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers ); + +/* Delete Buffer objects */ +AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers ); + +/* Verify a handle is a valid Buffer */ +AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid ); + +/* Specify the data to be copied into a buffer */ +AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); + +/* + * Set Buffer parameters + */ +AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value ); + +AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); + +AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values ); + +AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value ); + +AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); + +AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values ); + +/* + * Get Buffer parameters + */ +AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value ); + +AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); + +AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values ); + +AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value ); + +AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); + +AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values ); + + +/* + * Global Parameters + */ +AL_API void AL_APIENTRY alDopplerFactor( ALfloat value ); + +AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value ); + +AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value ); + +AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel ); + +#else /* AL_NO_PROTOTYPES */ + +typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability ); +typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability ); +typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability ); +typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param ); +typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data ); +typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data ); +typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data ); +typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data ); +typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param ); +typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param ); +typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param ); +typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param ); +typedef ALenum (AL_APIENTRY *LPALGETERROR)( void ); +typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname ); +typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname ); +typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename ); +typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value ); +typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); +typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values ); +typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value ); +typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 ); +typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values ); +typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value ); +typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); +typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values ); +typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value ); +typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); +typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values ); +typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources ); +typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources ); +typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); +typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values ); +typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); +typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values ); +typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value ); +typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); +typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values ); +typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value ); +typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); +typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values ); +typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids ); +typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid ); +typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids ); +typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids ); +typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers ); +typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers ); +typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid ); +typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); +typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); +typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values ); +typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); +typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values ); +typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value ); +typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); +typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values ); +typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value ); +typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); +typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values ); +typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value ); +typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value ); +typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value ); +typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel ); + +#endif /* AL_NO_PROTOTYPES */ + +#if TARGET_OS_MAC + #pragma export off +#endif + +#if defined(__cplusplus) +} /* extern "C" */ +#endif + +#endif /* AL_AL_H */ Added: tiki/3rdparty/openal/include/alc.h =================================================================== --- tiki/3rdparty/openal/include/alc.h (rev 0) +++ tiki/3rdparty/openal/include/alc.h 2011-07-13 17:35:33 UTC (rev 732) @@ -0,0 +1,281 @@ +#ifndef AL_ALC_H +#define AL_ALC_H + +#if defined(__cplusplus) +extern "C" { +#endif + +#if defined(_WIN32) && !defined(_XBOX) + /* _OPENAL32LIB is deprecated */ + #if defined(AL_BUILD_LIBRARY) || defined (_OPENAL32LIB) + #define ALC_API __declspec(dllexport) + #else + #define ALC_API __declspec(dllimport) + #endif +#else + #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY) + #define ALC_API __attribute__((visibility("default"))) + #else + #define ALC_API extern + #endif +#endif + +#if defined(_WIN32) + #define ALC_APIENTRY __cdecl +#else + #define ALC_APIENTRY +#endif + +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC + #pragma export on +#endif + +/* + * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are + * included for applications porting code from AL 1.0 + */ +#define ALCAPI ALC_API +#define ALCAPIENTRY ALC_APIENTRY +#define ALC_INVALID 0 + + +#define ALC_VERSION_0_1 1 + +typedef struct ALCdevice_struct ALCdevice; +typedef struct ALCcontext_struct ALCcontext; + + +/** 8-bit boolean */ +typedef char ALCboolean; + +/** character */ +typedef char ALCchar; + +/** signed 8-bit 2's complement integer */ +typedef char ALCbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALCubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALCshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALCushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALCint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALCuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALCsizei; + +/** enumerated 32-bit value */ +typedef int ALCenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALCfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALCdouble; + +/** void type (for opaque pointers only) */ +typedef void ALCvoid; + + +/* Enumerant values begin at column 50. No tabs. */ + +/* Boolean False. */ +#define ALC_FALSE 0 + +/* Boolean True. */ +#define ALC_TRUE 1 + +/** + * followed by <int> Hz + */ +#define ALC_FREQUENCY 0x1007 + +/** + * followed by <int> Hz + */ +#define ALC_REFRESH 0x1008 + +/** + * followed by AL_TRUE, AL_FALSE + */ +#define ALC_SYNC 0x1009 + +/** + * followed by <int> Num of requested Mono (3D) Sources + */ +#define ALC_MONO_SOURCES 0x1010 + +/** + * followed by <int> Num of requested Stereo Sources + */ +#define ALC_STEREO_SOURCES 0x1011 + +/** + * errors + */ + +/** + * No error + */ +#define ALC_NO_ERROR ALC_FALSE + +/** + * No device + */ +#define ALC_INVALID_DEVICE 0xA001 + +/** + * invalid context ID + */ +#define ALC_INVALID_CONTEXT 0xA002 + +/** + * bad enum + */ +#define ALC_INVALID_ENUM 0xA003 + +/** + * bad value + */ +#define ALC_INVALID_VALUE 0xA004 + +/** + * Out of memory. + */ +#define ALC_OUT_OF_MEMORY 0xA005 + + +/** + * The Specifier string for default device + */ +#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 +#define ALC_DEVICE_SPECIFIER 0x1005 +#define ALC_EXTENSIONS 0x1006 + +#define ALC_MAJOR_VERSION 0x1000 +#define ALC_MINOR_VERSION 0x1001 + +#define ALC_ATTRIBUTES_SIZE 0x1002 +#define ALC_ALL_ATTRIBUTES 0x1003 + +/** + * ALC_ENUMERATE_ALL_EXT enums + */ +#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012 +#define ALC_ALL_DEVICES_SPECIFIER 0x1013 + +/** + * Capture extension + */ +#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 +#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 +#define ALC_CAPTURE_SAMPLES 0x312 + + +/* + * Context Management + */ +ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist ); + +ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ); + +ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context ); + +ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context ); + +ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context ); + +ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void ); + +ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context ); + + +/* + * Device Management + */ +ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename ); + +ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device ); + + +/* + * Error support. + * Obtain the most recent Context error + */ +ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device ); + + +/* + * Extension support. + * Query for the presence of an extension, and obtain any appropriate + * function pointers and enum values. + */ +ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname ); + +ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname ); + +ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname ); + + +/* + * Query functions + */ +ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param ); + +ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data ); + + +/* + * Capture functions + */ +ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); + +ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device ); + +ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device ); + +ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device ); + +ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); + +/* + * Pointer-to-function types, useful for dynamically getting ALC entry points. + */ +typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist); +typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context ); +typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context ); +typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context ); +typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context ); +typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void ); +typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context ); +typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename ); +typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device ); +typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device ); +typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname ); +typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname ); +typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname ); +typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param ); +typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest ); +typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); +typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device ); +typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device ); +typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device ); +typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); + +#if defined(TARGET_OS_MAC) && TARGET_OS_MAC + #pragma export off +#endif + +#if defined(__cplusplus) +} +#endif + +#endif /* AL_ALC_H */ Added: tiki/examples/net/httpclient/httpclient.cbp =================================================================== --- tiki/examples/net/httpclient/httpclient.cbp (rev 0) +++ tiki/examples/net/httpclient/httpclient.cbp 2011-07-13 17:35:33 UTC (rev 732) @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="httpclient" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="default"> + <Option output="httpclient" prefix_auto="1" extension_auto="1" /> + <Option working_dir="resources" /> + <Option type="1" /> + <Option compiler="gcc" /> + </Target> + </Build> + <VirtualTargets> + <Add alias="All" targets="default;" /> + </VirtualTargets> + <Compiler> + <Add directory="..\..\..\include" /> + <Add directory="..\..\..\win32\include" /> + <Add directory="..\..\..\3rdparty\libjpeg" /> + <Add directory="..\..\..\3rdparty\libogg\include" /> + <Add directory="..\..\..\3rdparty\libpng" /> + <Add directory="..\..\..\3rdparty\libvorbis\include" /> + <Add directory="..\..\..\3rdparty\libvorbis\lib" /> + <Add directory="..\..\..\3rdparty\zlib" /> + <Add directory="C:\Program Files\OpenAL 1.1 SDK\include" /> + </Compiler> + <Linker> + <Add library="gdi32" /> + <Add library="kernel32" /> + <Add library="user32" /> + <Add library="opengl32" /> + <Add library="glu32" /> + <Add library="comdlg32" /> + <Add library="ws2_32" /> + <Add library="winmm" /> + <Add library="OpenAL32" /> + <Add library="tiki" /> + <Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32" /> + <Add directory="..\..\..\Win32" /> + </Linker> + <Unit filename="src\HttpClient.cpp" /> + <Unit filename="src\main.cpp" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> Modified: tiki/src/audio/sound.cpp =================================================================== --- tiki/src/audio/sound.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/src/audio/sound.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -11,14 +11,15 @@ #include "Tiki/sound.h" #include "Tiki/file.h" -#include <string.h> +#include <string.h> +#include <stdio.h> /* - + This port of the snd_sfx manager uses OpenAL to do its work. For simplicity's sake we just generate CHAN_CNT sources at start time, and one buffer per loaded sound effect. The rest works pretty much the same as the old snd_sfx API. - + */ using namespace Tiki::Audio; @@ -120,7 +121,7 @@ ALenum format; ALsizei size; - ALvoid* data; + uint8* data; ALsizei freq; char magic[ 4 ]; @@ -173,7 +174,7 @@ size = ( ALsizei ) len; freq = ( ALsizei ) hz; - data = malloc( len ); + data = new uint8[len]; if ( bitsize == 8 ) { wavFile.read( data, len ); } else { //byte swapping may be needed, depending on host endianness @@ -182,10 +183,10 @@ } } - alBufferData( m_buffer, format, data, size, freq ); + alBufferData( m_buffer, format, (ALvoid *)data, size, freq ); check(); - free( data ); + delete [] data; wavFile.close(); check(); Modified: tiki/src/base/debug.cpp =================================================================== --- tiki/src/base/debug.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/src/base/debug.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -10,7 +10,8 @@ #include "pch.h" #include "Tiki/debug.h" -#include <stdarg.h> +#include <stdarg.h> +#include <stdio.h> using namespace Tiki::Debug; Modified: tiki/src/gl/drawables/console.cpp =================================================================== --- tiki/src/gl/drawables/console.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/src/gl/drawables/console.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -11,7 +11,8 @@ #include "Tiki/tiki.h" #include "Tiki/drawables/console.h" -#include <stdarg.h> +#include <stdarg.h> +#include <stdlib.h> using namespace Tiki::GL; @@ -48,7 +49,7 @@ m_cursor_x = 0; m_cursor_y = 0; - + enable( BACKSPACE_PROCESSING | NEWLINE_PROCESSING | CARRIAGE_RETURN_PROCESSING ); enable( AUTO_SCROLL ); enable( AUTO_WRAP ); @@ -241,13 +242,13 @@ } color += m_palette[ attr & 0x07 ]; color.select(); - + glTexCoord2f(u/m_texture->getW(), (v+8)/m_texture->getH()); glVertex3f(tv.x - (m_w / 2), tv.y + h - (m_h / 2), tv.z); glTexCoord2f(u/m_texture->getW(), v/m_texture->getH()); - glVertex3f(tv.x - (m_w / 2), tv.y - (m_h / 2), tv.z); + glVertex3f(tv.x - (m_w / 2), tv.y - (m_h / 2), tv.z); glTexCoord2f((u+8)/m_texture->getW(), v/m_texture->getH()); - glVertex3f(tv.x + w - (m_w / 2), tv.y - (m_h / 2), tv.z); + glVertex3f(tv.x + w - (m_w / 2), tv.y - (m_h / 2), tv.z); glTexCoord2f((u+8)/m_texture->getW(), (v+8)/m_texture->getH()); glVertex3f(tv.x + w - (m_w / 2), tv.y + h - (m_h / 2), tv.z); } @@ -260,7 +261,7 @@ const Vector & tv = getPosition() + Vector( x, y, -0.0001f ); m_palette[ color ].select(); - + glVertex3f(tv.x - (m_w / 2), tv.y + h - (m_h / 2), tv.z); glVertex3f(tv.x - (m_w / 2), tv.y - (m_h / 2), tv.z); glVertex3f(tv.x + w - (m_w / 2), tv.y - (m_h / 2), tv.z); @@ -555,7 +556,7 @@ BG_PALETTE_SUB[ ( 16 * 13 ) + 1 ] = RGB15( 31, 0, 31 ); BG_PALETTE_SUB[ ( 16 * 14 ) + 1 ] = RGB15( 31, 31, 0 ); BG_PALETTE_SUB[ ( 16 * 15 ) + 1 ] = RGB15( 31, 31, 31 ); - + enable( ANSI_PROCESSING | AUTO_REFRESH ); } @@ -579,7 +580,7 @@ fg += 8; } char bg = ( m_colorData[ ( y * m_cols ) + x ] >> 8 ) & 0x07; - + if(x < 32) { bg1Map[ ( y * 32 ) + x ] = SOLID_FILL | TILE_PALETTE(bg); bg0Map[ ( y * 32 ) + x ] = m_charData[ ( y * m_cols ) + x ] | TILE_PALETTE(fg); Modified: tiki/src/net/http/cookiejar.cpp =================================================================== --- tiki/src/net/http/cookiejar.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/src/net/http/cookiejar.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -16,6 +16,7 @@ #include "tinyxml.h" #include <fstream> +#include <stdlib.h> namespace Tiki { @@ -154,7 +155,7 @@ } void CookieJar::removeCookie(Cookie *cookie) { - + // Use two loops here to remove cookies since STL does not like // it when you use std::list.erase() inside an iterated loop // this causes an exception to be thrown in the increment @@ -171,7 +172,7 @@ cookiesToDelete.push_back(iter); } } - + // if any cookies are to be removed, process the list to remove them if(!cookiesToDelete.empty()) { for(list< list< Cookie * >::iterator >::iterator iter = cookiesToDelete.begin(); @@ -186,7 +187,7 @@ for(list<Cookie *>::iterator iter = m_cookies.begin(); iter != m_cookies.end(); ++iter) { - + delete *iter; } } @@ -220,7 +221,7 @@ TiXmlDocument doc(filename.c_str()); Base64 b64; if(doc.LoadFile()) { - for(TiXmlNode *node = doc.FirstChildElement("CookieJar")->FirstChild("Cookie"); node != NULL; node = node->NextSibling()) { + for(TiXmlNode *node = doc.FirstChildElement("CookieJar")->FirstChild("Cookie"); node != NULL; node = node->NextSibling()) { Cookie *cookie; string name = node->ToElement()->Attribute("name"); TiXmlElement *valueNode = node->FirstChildElement("Value"); @@ -244,7 +245,7 @@ cookie->setPath(attr->Value()); } else if(!string(attr->Name()).compare("secure")) { - if(attr->Value()[0] == 't') { + if(attr->Value()[0] == 't') { cookie->setSecure(true); } } @@ -263,7 +264,7 @@ void CookieJar::saveToXML(string filename) { ofstream stream; stream.open(filename.c_str()); - + stream << "<?xml version=\"1.0\" ?>" << endl; stream << "<CookieJar>" << endl; Base64 b64; Modified: tiki/src/net/http/useragent.cpp =================================================================== --- tiki/src/net/http/useragent.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/src/net/http/useragent.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -20,6 +20,8 @@ namespace Http { +using namespace Tiki; +using namespace Tiki::Debug; using namespace Tiki::Net::TCP; using std::string; @@ -42,7 +44,7 @@ } Response *HttpUserAgent::get(Request *req) { - + Response *response = new Response(); response->setUrl(req->getUrl()); response->setResultCode(200); @@ -119,7 +121,7 @@ Tiki::Debug::printf("Sending request...\n"); socket->send(requestText); - + size_t maxSize = requestText.length(); size_t sentSize = maxSize; list<string> content = req->getContentPartNames(); @@ -130,11 +132,11 @@ if(buf->getUsedDataLen() > 0) { maxSize += buf->getUsedDataLen(); } - } + } if(content.size() > 1 || req->isForcedMultiPartUpload()) { string status = ""; socket->recv(status); - + for(list<string>::iterator iter = content.begin(); iter != content.end(); ++iter) { @@ -173,7 +175,7 @@ emit( "progressUpdate", progress ); delete progress; } - + } readResponse(response, socket); @@ -280,7 +282,7 @@ } else if(!mode.compare("POST") && content.size() == 1) { Buffer *buf = request->getContentPart(*content.begin()); - req << "Content-Type: " << buf->getContentType() << "\r\n"; + req << "Content-Type: " << buf->getContentType() << "\r\n"; req << "Content-Length: " << buf->getUsedDataLen() << "\r\n"; } req << "\r\n"; @@ -302,7 +304,7 @@ break; } } - + size_t responseSize = -1; size_t receivedSoFar = 0; while(1) { @@ -339,7 +341,7 @@ delete progress; } } - + Buffer *fullBuf; if(responseSize == -1) { @@ -402,7 +404,7 @@ emit( "progressUpdate", progress ); delete progress; } - needed -= chunkBuf2->getUsedDataLen(); + needed -= chunkBuf2->getUsedDataLen(); } delete chunkBuf2; } @@ -450,7 +452,7 @@ delete chunkBuf2; } fullBuf->append(chunkBuf); - + delete chunkBuf; } else { Modified: tiki/src/net/util/date.cpp =================================================================== --- tiki/src/net/util/date.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/src/net/util/date.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -13,6 +13,7 @@ #include <map> #include <time.h> +#include <stdlib.h> namespace Tiki { @@ -266,4 +267,4 @@ }; // namespace Net -}; // namespace Tiki \ No newline at end of file +}; // namespace Tiki Added: tiki/tiki.workspace =================================================================== --- tiki/tiki.workspace (rev 0) +++ tiki/tiki.workspace 2011-07-13 17:35:33 UTC (rev 732) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_workspace_file> + <Workspace title="Workspace"> + <Project filename="win32/tiki.cbp" /> + <Project filename="examples/net/httpclient/httpclient.cbp" /> + <Project filename="C:/Documents and Settings/mdunston.ST-USERS/Desktop/test/tikitest/tikitest.cbp" active="1" /> + </Workspace> +</CodeBlocks_workspace_file> Modified: tiki/win32/src/init_shutdown.cpp =================================================================== --- tiki/win32/src/init_shutdown.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/win32/src/init_shutdown.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -6,7 +6,8 @@ #include "Tiki/stream.h" #include <al.h> -#include <alc.h> +#include <alc.h> +#include <stdlib.h> #include <MMSystem.h> #pragma comment(lib, "winmm.lib") @@ -38,7 +39,7 @@ if(g_tiki_init_flags & TIKI_INIT_VIDEO_MASK) { } - + return Hid::init(); } Modified: tiki/win32/src/platnet.cpp =================================================================== --- tiki/win32/src/platnet.cpp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/win32/src/platnet.cpp 2011-07-13 17:35:33 UTC (rev 732) @@ -39,28 +39,36 @@ bool connect() { - BOOL state = InternetAutodial(0, Tiki::GetWin32Window()); + // This should really use the GetWin32Window() API but seems that C::B does not list InternetAutodial as (DWORD, HWND) but + // instead as (DWORD, DWORD) and it refuses to allow casting. MSVC does not suffer from this. + DWORD windowID = 0; + #if defined(_MSVC) + windowID = Tiki::GetWin32Window(); + #endif + BOOL state = InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED, windowID); return state == TRUE; } bool isConnected() { BOOL state = InternetGetConnectedState(&connectionFlags, 0); - if(connectionFlags & INTERNET_CONNECTION_CONFIGURED) { - Tiki::Debug::printf("INTERNET_CONNECTION_CONFIGURED is set\n"); + if(g_tiki_init_flags & TIKI_INIT_DEBUG_MASK) { + if(connectionFlags & INTERNET_CONNECTION_CONFIGURED) { + Tiki::Debug::printf("INTERNET_CONNECTION_CONFIGURED is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_LAN) { + Tiki::Debug::printf("INTERNET_CONNECTION_LAN is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_MODEM) { + Tiki::Debug::printf("INTERNET_CONNECTION_MODEM is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_OFFLINE) { + Tiki::Debug::printf("INTERNET_CONNECTION_OFFLINE is set\n"); + } + if(connectionFlags & INTERNET_CONNECTION_PROXY) { + Tiki::Debug::printf("INTERNET_CONNECTION_PROXY is set\n"); + } } - if(connectionFlags & INTERNET_CONNECTION_LAN) { - Tiki::Debug::printf("INTERNET_CONNECTION_LAN is set\n"); - } - if(connectionFlags & INTERNET_CONNECTION_MODEM) { - Tiki::Debug::printf("INTERNET_CONNECTION_MODEM is set\n"); - } - if(connectionFlags & INTERNET_CONNECTION_OFFLINE) { - Tiki::Debug::printf("INTERNET_CONNECTION_OFFLINE is set\n"); - } - if(connectionFlags & INTERNET_CONNECTION_PROXY) { - Tiki::Debug::printf("INTERNET_CONNECTION_PROXY is set\n"); - } return state == TRUE; } @@ -71,4 +79,4 @@ } // namespace Net -} // namespace Tiki \ No newline at end of file +} // namespace Tiki Modified: tiki/win32/tiki.cbp =================================================================== --- tiki/win32/tiki.cbp 2011-05-27 15:43:52 UTC (rev 731) +++ tiki/win32/tiki.cbp 2011-07-13 17:35:33 UTC (rev 732) @@ -27,13 +27,11 @@ <Add directory="..\3rdparty\libvorbis\include"/> <Add directory="..\3rdparty\zlib"/> <Add directory="C:\Program Files\OpenAL 1.1 SDK\include"/> - <Add directory="C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Include"/> <Add directory="..\3rdparty\libvorbis\lib"/> </Compiler> <Linker> <Add library="opengl32"/> <Add directory="C:\Program Files\OpenAL 1.1 SDK\libs\Win32"/> - <Add directory="C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Lib\x86"/> </Linker> <Unit filename="..\3rdparty\libjpeg\jcapimin.c"> <Option compilerVar="CC"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2011-05-27 15:44:05
|
Revision: 731 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=731&view=rev Author: lostgeneration Date: 2011-05-27 15:43:52 +0000 (Fri, 27 May 2011) Log Message: ----------- Removed trailing whitespace * This commit blindly removed whitespace at the end of lines and whitespace from lines without anything else. This shouldn't break anything. It still compiles (didn't try examples,) and doxygen still runs without issue. Hopefully there wasn't any documentation that depended on something stupid like whitespace at the end of the line, but I highly doubt it. Modified Paths: -------------- kos/addons/include/kos/bspline.h kos/addons/include/kos/img.h kos/addons/include/kos/netcfg.h kos/addons/include/kos/pcx.h kos/addons/include/kos/vector.h kos/addons/libkosutils/bspline.c kos/addons/libkosutils/img.c kos/addons/libkosutils/md5.c kos/addons/libkosutils/netcfg_icon.h kos/examples/dreamcast/2ndmix/2ndmix.c kos/examples/dreamcast/2ndmix/gfx/font14_256.h kos/examples/dreamcast/2ndmix/s3mplay.h kos/examples/dreamcast/basic/asserthnd/asserthnd.c kos/examples/dreamcast/basic/mmu/nullptr/nullptr.c kos/examples/dreamcast/basic/mmu/pvrmap/pvrmap.c kos/examples/dreamcast/basic/threading/general/general_threading_test.c kos/examples/dreamcast/basic/threading/tls/tls_test.c kos/examples/dreamcast/conio/adventure/crc.c kos/examples/dreamcast/conio/adventure/init.c kos/examples/dreamcast/conio/adventure/porthelper.c kos/examples/dreamcast/conio/basic/basic.c kos/examples/dreamcast/conio/kosh/kosh.c kos/examples/dreamcast/conio/wump/wump.c kos/examples/dreamcast/kgl/basic/gl/gltest.c kos/examples/dreamcast/kgl/basic/scissor/scissor.c kos/examples/dreamcast/kgl/basic/texenv/texenv.c kos/examples/dreamcast/kgl/basic/texwrap/texwrap.c kos/examples/dreamcast/kgl/basic/vfzclip/vfzclip.c kos/examples/dreamcast/kgl/basic/vq/vq-example.c kos/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c kos/examples/dreamcast/kgl/benchmarks/trimark/trimark.c kos/examples/dreamcast/kgl/demos/bubbles/bubbles.c kos/examples/dreamcast/kgl/demos/tunnel/menu.h kos/examples/dreamcast/kgl/nehe/nehe02/nehe02.c kos/examples/dreamcast/kgl/nehe/nehe05/nehe05.c kos/examples/dreamcast/kgl/nehe/nehe06/nehe06.c kos/examples/dreamcast/kgl/nehe/nehe08/nehe08.c kos/examples/dreamcast/kgl/nehe/nehe09/nehe09.c kos/examples/dreamcast/kgl/nehe/nehe16/nehe16.c kos/examples/dreamcast/kgl/nehe/nehe26/data/txt2bin.c kos/examples/dreamcast/kgl/nehe/nehe26/nehe26.c kos/examples/dreamcast/libdream/320x240/320x240.c kos/examples/dreamcast/libdream/640x480/640x480.c kos/examples/dreamcast/libdream/800x608/800x608.c kos/examples/dreamcast/libdream/keyboard/keyboard.c kos/examples/dreamcast/libdream/lcd/lcd.c kos/examples/dreamcast/libdream/mouse/mouse.c kos/examples/dreamcast/libdream/rgb888/rgb888.c kos/examples/dreamcast/libdream/spu/s3mplay.h kos/examples/dreamcast/libdream/spu/spu.c kos/examples/dreamcast/libdream/ta/ta.c kos/examples/dreamcast/libdream/vmu/vmu.c kos/examples/dreamcast/lua/basic/lua.c kos/examples/dreamcast/modem/basic/example1.c kos/examples/dreamcast/network/dcload-ip-lwip-test/main.c kos/examples/dreamcast/network/httpd/httpd.c kos/examples/dreamcast/parallax/bubbles/bubbles.c kos/examples/dreamcast/parallax/raster_melt/raster_melt.c kos/examples/dreamcast/parallax/serpent_dma/serpent.c kos/examples/dreamcast/png/example.c kos/examples/dreamcast/pvr/plasma/plasma.c kos/examples/dreamcast/pvr/pvrmark/pvrmark.c kos/examples/dreamcast/pvr/pvrmark_strips/pvrmark_strips.c kos/examples/dreamcast/pvr/pvrmark_strips_direct/pvrmark_strips_direct.c kos/examples/dreamcast/pvr/texture_render/ta.c kos/examples/dreamcast/sound/cdda/basic_cdda/basic_cdda.c kos/examples/dreamcast/sound/ghettoplay-vorbis/3dutils.c kos/examples/dreamcast/sound/ghettoplay-vorbis/bkg.c kos/examples/dreamcast/sound/ghettoplay-vorbis/ghettoplay.c kos/examples/dreamcast/sound/ghettoplay-vorbis/songmenu.c kos/examples/dreamcast/sound/ghettoplay-vorbis/texture.c kos/examples/dreamcast/sound/hello-ogg/vorbistest.c kos/examples/dreamcast/vmu/vmu_pkg/vmu.c kos/examples/gba/pogo-keen/pogo.c kos/examples/ps2/basic/hello/hello.c kos/include/endian.h kos/include/kos/cond.h kos/include/kos/dbgio.h kos/include/kos/elf.h kos/include/kos/exports.h kos/include/kos/fs_romdisk.h kos/include/kos/genwait.h kos/include/kos/limits.h kos/include/kos/mutex.h kos/include/kos/recursive_lock.h kos/include/kos/sem.h kos/include/kos/thread.h kos/include/netinet/in.h kos/include/pthread.h kos/kernel/arch/dreamcast/fs/dcload-commands.c kos/kernel/arch/dreamcast/fs/dcload-net.c kos/kernel/arch/dreamcast/fs/dcload-syscalls.c kos/kernel/arch/dreamcast/fs/fs_dclnative.c kos/kernel/arch/dreamcast/fs/fs_dcload.c kos/kernel/arch/dreamcast/fs/fs_dclsocket.c kos/kernel/arch/dreamcast/fs/fs_iso9660.c kos/kernel/arch/dreamcast/fs/fs_vmu.c kos/kernel/arch/dreamcast/fs/vmufs.c kos/kernel/arch/dreamcast/hardware/asic.c kos/kernel/arch/dreamcast/hardware/biosfont.c kos/kernel/arch/dreamcast/hardware/cdrom.c kos/kernel/arch/dreamcast/hardware/flashrom.c kos/kernel/arch/dreamcast/hardware/g2bus.c kos/kernel/arch/dreamcast/hardware/maple/dreameye.c kos/kernel/arch/dreamcast/hardware/maple/keyboard.c kos/kernel/arch/dreamcast/hardware/maple/maple_driver.c kos/kernel/arch/dreamcast/hardware/maple/maple_init_shutdown.c kos/kernel/arch/dreamcast/hardware/maple/maple_irq.c kos/kernel/arch/dreamcast/hardware/maple/maple_queue.c kos/kernel/arch/dreamcast/hardware/maple/maple_utils.c kos/kernel/arch/dreamcast/hardware/maple/purupuru.c kos/kernel/arch/dreamcast/hardware/maple/vmu.c kos/kernel/arch/dreamcast/hardware/modem/chainbuf.c kos/kernel/arch/dreamcast/hardware/modem/chainbuf.h kos/kernel/arch/dreamcast/hardware/modem/mintern.h kos/kernel/arch/dreamcast/hardware/network/broadband_adapter.c kos/kernel/arch/dreamcast/hardware/network/lan_adapter.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_buffers.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_dma.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_fog.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_fog_tables.h kos/kernel/arch/dreamcast/hardware/pvr/pvr_globals.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_init_shutdown.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_internal.h kos/kernel/arch/dreamcast/hardware/pvr/pvr_irq.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_mem.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.h kos/kernel/arch/dreamcast/hardware/pvr/pvr_misc.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_prim.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_scene.c kos/kernel/arch/dreamcast/hardware/pvr/pvr_texture.c kos/kernel/arch/dreamcast/hardware/scif.c kos/kernel/arch/dreamcast/hardware/spu.c kos/kernel/arch/dreamcast/hardware/spudma.c kos/kernel/arch/dreamcast/hardware/sq.c kos/kernel/arch/dreamcast/hardware/video.c kos/kernel/arch/dreamcast/include/arch/arch.h kos/kernel/arch/dreamcast/include/arch/cache.h kos/kernel/arch/dreamcast/include/arch/exec.h kos/kernel/arch/dreamcast/include/arch/gdb.h kos/kernel/arch/dreamcast/include/arch/irq.h kos/kernel/arch/dreamcast/include/arch/mmu.h kos/kernel/arch/dreamcast/include/arch/spinlock.h kos/kernel/arch/dreamcast/include/arch/stack.h kos/kernel/arch/dreamcast/include/arch/types.h kos/kernel/arch/dreamcast/include/dc/asic.h kos/kernel/arch/dreamcast/include/dc/biosfont.h kos/kernel/arch/dreamcast/include/dc/fs_dcload.h kos/kernel/arch/dreamcast/include/dc/g2bus.h kos/kernel/arch/dreamcast/include/dc/maple/controller.h kos/kernel/arch/dreamcast/include/dc/maple/purupuru.h kos/kernel/arch/dreamcast/include/dc/maple.h kos/kernel/arch/dreamcast/include/dc/modem/mconst.h kos/kernel/arch/dreamcast/include/dc/modem/modem.h kos/kernel/arch/dreamcast/include/dc/net/broadband_adapter.h kos/kernel/arch/dreamcast/include/dc/pvr.h kos/kernel/arch/dreamcast/include/dc/sound/sfxmgr.h kos/kernel/arch/dreamcast/include/dc/sq.h kos/kernel/arch/dreamcast/include/dc/vmufs.h kos/kernel/arch/dreamcast/include/navi/flash.h kos/kernel/arch/dreamcast/include/navi/ide.h kos/kernel/arch/dreamcast/kernel/gdb_stub.c kos/kernel/arch/dreamcast/kernel/init.c kos/kernel/arch/dreamcast/kernel/irq.c kos/kernel/arch/dreamcast/kernel/mm.c kos/kernel/arch/dreamcast/kernel/mmu.c kos/kernel/arch/dreamcast/kernel/ser_console.c kos/kernel/arch/dreamcast/kernel/timer.c kos/kernel/arch/dreamcast/navi/navi_flash.c kos/kernel/arch/dreamcast/navi/navi_ide.c kos/kernel/arch/dreamcast/sound/arm/aica.c kos/kernel/arch/dreamcast/sound/arm/aica_cmd_iface.h kos/kernel/arch/dreamcast/sound/arm/main.c kos/kernel/arch/dreamcast/sound/snd_iface.c kos/kernel/arch/dreamcast/sound/snd_mem.c kos/kernel/arch/dreamcast/sound/snd_sfxmgr.c kos/kernel/arch/dreamcast/sound/snd_stream.c kos/kernel/arch/dreamcast/util/screenshot.c kos/kernel/arch/dreamcast/util/vmu_pkg.c kos/kernel/arch/gba/include/arch/arch.h kos/kernel/arch/gba/include/arch/dbgio.h kos/kernel/arch/gba/include/arch/irq.h kos/kernel/arch/gba/include/arch/timer.h kos/kernel/arch/gba/include/arch/types.h kos/kernel/arch/gba/include/gba/dma.h kos/kernel/arch/gba/include/gba/keys.h kos/kernel/arch/gba/include/gba/sound.h kos/kernel/arch/gba/include/gba/sprite.h kos/kernel/arch/gba/include/gba/video.h kos/kernel/arch/gba/kernel/dbgio.c kos/kernel/arch/gba/kernel/main.c kos/kernel/arch/gba/kernel/mm.c kos/kernel/arch/ia32/include/arch/arch.h kos/kernel/arch/ia32/include/arch/cache.h kos/kernel/arch/ia32/include/arch/dbgio.h kos/kernel/arch/ia32/include/arch/exec.h kos/kernel/arch/ia32/include/arch/gdb.h kos/kernel/arch/ia32/include/arch/irq.h kos/kernel/arch/ia32/include/arch/mmu.h kos/kernel/arch/ia32/include/arch/spinlock.h kos/kernel/arch/ia32/include/arch/stack.h kos/kernel/arch/ia32/include/arch/timer.h kos/kernel/arch/ia32/include/arch/types.h kos/kernel/arch/ia32/include/ia32/ports.h kos/kernel/arch/ia32/kernel/dbgio.c kos/kernel/arch/ia32/kernel/irq.c kos/kernel/arch/ia32/kernel/mmu.c kos/kernel/arch/ps2/fs/fs_ps2load.c kos/kernel/arch/ps2/include/arch/arch.h kos/kernel/arch/ps2/include/arch/cache.h kos/kernel/arch/ps2/include/arch/dbgio.h kos/kernel/arch/ps2/include/arch/irq.h kos/kernel/arch/ps2/include/arch/types.h kos/kernel/arch/ps2/include/ps2/asmregs.h kos/kernel/arch/ps2/include/ps2/fs_ps2load.h kos/kernel/arch/ps2/include/ps2/ioports.h kos/kernel/arch/ps2/include/ps2/sbios.h kos/kernel/arch/ps2/kernel/atexit.c kos/kernel/arch/ps2/kernel/crtbegin.c kos/kernel/arch/ps2/kernel/crtend.c kos/kernel/arch/ps2/kernel/dbgio.c kos/kernel/arch/ps2/kernel/irq.c kos/kernel/arch/ps2/kernel/main.c kos/kernel/arch/ps2/kernel/mm.c kos/kernel/arch/ps2/kernel/timer.c kos/kernel/exports/library.c kos/kernel/exports/nmmgr.c kos/kernel/fs/elf.c kos/kernel/fs/fs.c kos/kernel/fs/fs_pty.c kos/kernel/fs/fs_ramdisk.c kos/kernel/fs/fs_romdisk.c kos/kernel/fs/fs_socket.c kos/kernel/fs/fs_utils.c kos/kernel/libc/koslib/atexit.c kos/kernel/libc/koslib/crtbegin.c kos/kernel/libc/koslib/crtend.c kos/kernel/libc/koslib/malloc.c kos/kernel/libc/koslib/memcpy2.c kos/kernel/libc/koslib/memcpy4.c kos/kernel/libc/koslib/memset2.c kos/kernel/libc/koslib/memset4.c kos/kernel/libc/newlib/newlib_gettimeofday.c kos/kernel/libc/pthreads/pthread_mutex.c kos/kernel/libc/pthreads/pthread_thd_attr.c kos/kernel/libc/pthreads/pthread_tls.c kos/kernel/mm/malloc_debug.c kos/kernel/net/net_arp.c kos/kernel/net/net_core.c kos/kernel/net/net_dhcp.c kos/kernel/net/net_icmp6.c kos/kernel/net/net_input.c kos/kernel/net/net_ipv4.c kos/kernel/net/net_thd.c kos/kernel/thread/recursive_lock.c kos/kernel/thread/sem.c kos/kernel/thread/thread.c kos/utils/bin2c/bin2c.c kos/utils/bincnv/bincnv.c kos/utils/gba-crcfix/gba-crcfix.c kos/utils/genromfs/genromfs.c kos/utils/gentexfont/gentexfont.c kos/utils/isotest/isotest.c kos/utils/kmgenc/get_image.c kos/utils/kmgenc/get_image.h kos/utils/kmgenc/get_image_jpg.c kos/utils/kmgenc/get_image_png.c kos/utils/kmgenc/kmgenc.c kos/utils/makejitter/makejitter.c kos/utils/rdtest/rdtest.c kos/utils/vqenc/get_image.c kos/utils/vqenc/get_image.h kos/utils/vqenc/get_image_jpg.c kos/utils/vqenc/get_image_png.c kos/utils/vqenc/vq_internal.h kos/utils/vqenc/vq_types.h kos/utils/vqenc/vqenc.c kos/utils/wav2adpcm/wav2adpcm.c Modified: kos/addons/include/kos/bspline.h =================================================================== --- kos/addons/include/kos/bspline.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/include/kos/bspline.h 2011-05-27 15:43:52 UTC (rev 731) @@ -24,7 +24,7 @@ Pass it an array of points and it will calculate a set of B-spline co-efficients for generating a curve. There must be at least one point before the "current" one, and at least two after the "current" one (a - total of four points required). These values will be used in the + total of four points required). These values will be used in the function below. */ void bspline_coeff(const point_t *pnt); Modified: kos/addons/include/kos/img.h =================================================================== --- kos/addons/include/kos/img.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/include/kos/img.h 2011-05-27 15:43:52 UTC (rev 731) @@ -1,5 +1,5 @@ /* KallistiOS ##version## - + kos/img.h (c)2002 Dan Potter Modified: kos/addons/include/kos/netcfg.h =================================================================== --- kos/addons/include/kos/netcfg.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/include/kos/netcfg.h 2011-05-27 15:43:52 UTC (rev 731) @@ -1,5 +1,5 @@ /* KallistiOS ##version## - + kos/netcfg.h Copyright (C)2003 Dan Potter Modified: kos/addons/include/kos/pcx.h =================================================================== --- kos/addons/include/kos/pcx.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/include/kos/pcx.h 2011-05-27 15:43:52 UTC (rev 731) @@ -1,5 +1,5 @@ /* KallistiOS ##version## - + kos/pcx.h (c)2000-2001 Dan Potter @@ -16,7 +16,7 @@ /* These first two versions are mainly for use with the GBA, and they are defined in the "pcx_small" file. They can be used on any architecture of course. */ - + /* Flat 15-bit BGR load of the PCX data into whatever buffer -- assumes the buffer is the same width as the PCX */ int pcx_load_flat(const char *fn, int *w_out, int *h_out, void *pic_out); Modified: kos/addons/include/kos/vector.h =================================================================== --- kos/addons/include/kos/vector.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/include/kos/vector.h 2011-05-27 15:43:52 UTC (rev 731) @@ -1,5 +1,5 @@ /* KallistiOS ##version## - + kos/vector.h (c)2002 Dan Potter Modified: kos/addons/libkosutils/bspline.c =================================================================== --- kos/addons/libkosutils/bspline.c 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/libkosutils/bspline.c 2011-05-27 15:43:52 UTC (rev 731) @@ -3,10 +3,10 @@ bspline.c (c)2000 Dan Potter - For generating B-Spline curves + For generating B-Spline curves This math info is from Leendert Ammeraal's "Programming Principles in - Computer Graphics". + Computer Graphics". */ #include <kos/bspline.h> @@ -14,19 +14,19 @@ /* Pass it an array of points and it will calculate a set of B-spline co-efficients for generating a curve. There must be at least one point before the "current" one, and at least two after the "current" one (a - total of four points required). These values will be used in the + total of four points required). These values will be used in the function below. */ static float bc_x[4], bc_y[4], bc_z[4]; void bspline_coeff(const point_t * pnt) { float a, b, c, d; - + /* First calculate the X coefficients */ a = pnt[-1].x; b = pnt[0].x; c = pnt[1].x; d = pnt[2].x; bc_x[3] = (-a+3*(b-c)+d) / 6.0f; bc_x[2] = (a-2*b+c)/2.0f; bc_x[1] = (c-a)/2.0f; bc_x[0] = (a+4*b+c)/6.0f; - + /* Next, the Y coefficients */ a = pnt[-1].y; b = pnt[0].y; c = pnt[1].y; d = pnt[2].y; bc_y[3] = (-a+3*(b-c)+d) / 6.0f; @@ -47,16 +47,16 @@ void bspline_get_point(float t, point_t *p) { /* Generate X */ p->x = ((bc_x[3]*t+bc_x[2])*t+bc_x[1])*t + bc_x[0]; - + /* Generate Y */ p->y = ((bc_y[3]*t+bc_y[2])*t+bc_y[1])*t + bc_y[0]; - + /* Generate Z */ p->z = ((bc_z[3]*t+bc_z[2])*t+bc_z[1])*t + bc_z[0]; } - - + + Modified: kos/addons/libkosutils/img.c =================================================================== --- kos/addons/libkosutils/img.c 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/libkosutils/img.c 2011-05-27 15:43:52 UTC (rev 731) @@ -10,11 +10,11 @@ #include <assert.h> #include <kos/img.h> -/* Free a kos_img_t which was created by an image loader; set struct_also to non-zero +/* Free a kos_img_t which was created by an image loader; set struct_also to non-zero if you want it to free the struct itself as well. */ void kos_img_free(kos_img_t *img, int struct_also) { assert( img != NULL ); - + /* Free the image data (if any) */ if (img->data && !(KOS_IMG_FMT_I(img->fmt) & KOS_IMG_NOT_OWNER)) free(img->data); Modified: kos/addons/libkosutils/md5.c =================================================================== --- kos/addons/libkosutils/md5.c 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/libkosutils/md5.c 2011-05-27 15:43:52 UTC (rev 731) @@ -54,7 +54,7 @@ printf("static const uint32 md5tab[64] = {"); - for(i = 0; i < 64; ++i) { + for(i = 0; i < 64; ++i) { if((i % 4) == 0) printf("\n "); Modified: kos/addons/libkosutils/netcfg_icon.h =================================================================== --- kos/addons/libkosutils/netcfg_icon.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/addons/libkosutils/netcfg_icon.h 2011-05-27 15:43:52 UTC (rev 731) @@ -5,73 +5,73 @@ */ const unsigned char netcfg_icon[544] ={ - 0x00, 0xf0, 0x11, 0xf1, 0x22, 0xf2, 0x33, 0xf3, - 0x44, 0xf4, 0x66, 0xf6, 0x5a, 0xf6, 0x77, 0xf7, - 0x88, 0xf8, 0x98, 0xf8, 0xa9, 0xf9, 0xaa, 0xfa, - 0xbb, 0xfb, 0xcc, 0xfc, 0xdd, 0xfd, 0xfe, 0xfe, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf3, 0x75, 0x75, 0x55, 0x7f, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf4, 0x58, 0x48, 0xaa, 0xa9, 0x7f, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf4, 0x55, 0x58, 0x57, 0x88, 0x98, 0x5f, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf4, 0x55, 0x54, 0x78, 0x57, 0x78, 0x88, - 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x77, 0x75, 0x55, 0x77, 0x55, 0x77, - 0x87, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x77, 0x77, 0x55, 0x55, 0x85, 0x55, - 0x77, 0x88, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x77, 0x77, 0x77, 0x55, 0x55, 0x95, - 0x57, 0x78, 0x99, 0x7f, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x58, 0x88, 0x77, 0x77, 0x55, 0x48, - 0x75, 0x78, 0x89, 0xaa, 0x8f, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x58, 0x88, 0x88, 0x77, 0x77, 0x75, - 0x59, 0x75, 0x89, 0xab, 0xbc, 0x55, 0x87, 0xff, - 0xff, 0xff, 0xf7, 0x98, 0x88, 0x88, 0x77, 0x75, - 0x55, 0x79, 0x78, 0x98, 0x87, 0xb8, 0x88, 0x5f, - 0xff, 0xff, 0xff, 0x99, 0x88, 0x88, 0x87, 0x78, - 0x77, 0x55, 0x89, 0xaa, 0x89, 0x9e, 0xee, 0x8f, - 0xff, 0xff, 0xff, 0x59, 0x99, 0x98, 0x88, 0x87, - 0x77, 0x77, 0x55, 0x7b, 0xee, 0xed, 0xee, 0x9f, - 0xff, 0xff, 0xff, 0xf8, 0x99, 0x99, 0x98, 0x88, - 0x87, 0x77, 0x75, 0x8e, 0xdb, 0xa9, 0x7a, 0x9f, - 0xff, 0xff, 0xf6, 0xff, 0x8a, 0xa9, 0x96, 0x66, - 0x88, 0x88, 0x77, 0x7d, 0x95, 0x43, 0x39, 0x9f, - 0xff, 0x66, 0x66, 0xff, 0xf7, 0xaa, 0x66, 0x66, - 0x68, 0x88, 0x88, 0x77, 0x31, 0x10, 0x28, 0x9f, - 0xff, 0xf6, 0x66, 0xff, 0xff, 0x56, 0xaa, 0x99, - 0x99, 0x98, 0x88, 0x87, 0x20, 0x00, 0x18, 0xaf, - 0xff, 0xf6, 0x66, 0xff, 0xff, 0x65, 0xaa, 0xaa, - 0x99, 0x99, 0x88, 0x78, 0x20, 0x00, 0x17, 0xaf, - 0xff, 0xf6, 0x66, 0xff, 0xf6, 0xff, 0x5a, 0xaa, - 0xaa, 0xa9, 0x99, 0x79, 0x20, 0x00, 0x37, 0xaf, - 0xff, 0xf6, 0x66, 0xff, 0x66, 0xff, 0xf5, 0xab, - 0xaa, 0xaa, 0x9a, 0x79, 0x41, 0x35, 0x8c, 0xaf, - 0xff, 0xf6, 0x66, 0xf6, 0x6f, 0xff, 0xff, 0xfa, - 0xba, 0xaa, 0xaa, 0x5b, 0x59, 0xde, 0xee, 0xaf, - 0xff, 0xf6, 0x66, 0x66, 0x66, 0xff, 0xff, 0xff, - 0xab, 0xba, 0xaa, 0x7e, 0xee, 0xee, 0xee, 0xaf, - 0xff, 0xf6, 0x66, 0xf6, 0x66, 0xff, 0xff, 0xff, - 0xf9, 0xbb, 0xba, 0x7e, 0xee, 0xee, 0xee, 0xaf, - 0xff, 0xf6, 0x66, 0xff, 0x66, 0x6f, 0xff, 0xff, - 0xff, 0x9b, 0xbb, 0x8d, 0xee, 0xee, 0xee, 0xbf, - 0xff, 0xf6, 0x66, 0xff, 0x66, 0x66, 0xff, 0xff, - 0xff, 0xf9, 0xcc, 0xb7, 0xee, 0xee, 0xee, 0xbf, - 0xff, 0xf6, 0x66, 0xff, 0xf6, 0x66, 0x6f, 0xff, - 0xff, 0xff, 0x8c, 0xc8, 0xee, 0xee, 0xee, 0xbf, - 0xff, 0xf6, 0x66, 0xff, 0xff, 0x66, 0x6f, 0xff, - 0xff, 0xff, 0xf7, 0xcc, 0x8e, 0xee, 0xee, 0x9f, - 0xff, 0xf6, 0x66, 0xff, 0xff, 0xf6, 0x66, 0xff, - 0xff, 0xff, 0xff, 0x7c, 0x8e, 0xed, 0x9f, 0xff, - 0xff, 0xf6, 0x66, 0xff, 0xff, 0xf6, 0x66, 0x6f, - 0xff, 0xff, 0xff, 0xff, 0x95, 0x8f, 0xff, 0xff, - 0xff, 0xf6, 0x66, 0xff, 0xff, 0x66, 0x66, 0x66, - 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - + 0x00, 0xf0, 0x11, 0xf1, 0x22, 0xf2, 0x33, 0xf3, + 0x44, 0xf4, 0x66, 0xf6, 0x5a, 0xf6, 0x77, 0xf7, + 0x88, 0xf8, 0x98, 0xf8, 0xa9, 0xf9, 0xaa, 0xfa, + 0xbb, 0xfb, 0xcc, 0xfc, 0xdd, 0xfd, 0xfe, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf3, 0x75, 0x75, 0x55, 0x7f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x58, 0x48, 0xaa, 0xa9, 0x7f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x55, 0x58, 0x57, 0x88, 0x98, 0x5f, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf4, 0x55, 0x54, 0x78, 0x57, 0x78, 0x88, + 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x77, 0x75, 0x55, 0x77, 0x55, 0x77, + 0x87, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x77, 0x77, 0x55, 0x55, 0x85, 0x55, + 0x77, 0x88, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x77, 0x77, 0x77, 0x55, 0x55, 0x95, + 0x57, 0x78, 0x99, 0x7f, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x58, 0x88, 0x77, 0x77, 0x55, 0x48, + 0x75, 0x78, 0x89, 0xaa, 0x8f, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x58, 0x88, 0x88, 0x77, 0x77, 0x75, + 0x59, 0x75, 0x89, 0xab, 0xbc, 0x55, 0x87, 0xff, + 0xff, 0xff, 0xf7, 0x98, 0x88, 0x88, 0x77, 0x75, + 0x55, 0x79, 0x78, 0x98, 0x87, 0xb8, 0x88, 0x5f, + 0xff, 0xff, 0xff, 0x99, 0x88, 0x88, 0x87, 0x78, + 0x77, 0x55, 0x89, 0xaa, 0x89, 0x9e, 0xee, 0x8f, + 0xff, 0xff, 0xff, 0x59, 0x99, 0x98, 0x88, 0x87, + 0x77, 0x77, 0x55, 0x7b, 0xee, 0xed, 0xee, 0x9f, + 0xff, 0xff, 0xff, 0xf8, 0x99, 0x99, 0x98, 0x88, + 0x87, 0x77, 0x75, 0x8e, 0xdb, 0xa9, 0x7a, 0x9f, + 0xff, 0xff, 0xf6, 0xff, 0x8a, 0xa9, 0x96, 0x66, + 0x88, 0x88, 0x77, 0x7d, 0x95, 0x43, 0x39, 0x9f, + 0xff, 0x66, 0x66, 0xff, 0xf7, 0xaa, 0x66, 0x66, + 0x68, 0x88, 0x88, 0x77, 0x31, 0x10, 0x28, 0x9f, + 0xff, 0xf6, 0x66, 0xff, 0xff, 0x56, 0xaa, 0x99, + 0x99, 0x98, 0x88, 0x87, 0x20, 0x00, 0x18, 0xaf, + 0xff, 0xf6, 0x66, 0xff, 0xff, 0x65, 0xaa, 0xaa, + 0x99, 0x99, 0x88, 0x78, 0x20, 0x00, 0x17, 0xaf, + 0xff, 0xf6, 0x66, 0xff, 0xf6, 0xff, 0x5a, 0xaa, + 0xaa, 0xa9, 0x99, 0x79, 0x20, 0x00, 0x37, 0xaf, + 0xff, 0xf6, 0x66, 0xff, 0x66, 0xff, 0xf5, 0xab, + 0xaa, 0xaa, 0x9a, 0x79, 0x41, 0x35, 0x8c, 0xaf, + 0xff, 0xf6, 0x66, 0xf6, 0x6f, 0xff, 0xff, 0xfa, + 0xba, 0xaa, 0xaa, 0x5b, 0x59, 0xde, 0xee, 0xaf, + 0xff, 0xf6, 0x66, 0x66, 0x66, 0xff, 0xff, 0xff, + 0xab, 0xba, 0xaa, 0x7e, 0xee, 0xee, 0xee, 0xaf, + 0xff, 0xf6, 0x66, 0xf6, 0x66, 0xff, 0xff, 0xff, + 0xf9, 0xbb, 0xba, 0x7e, 0xee, 0xee, 0xee, 0xaf, + 0xff, 0xf6, 0x66, 0xff, 0x66, 0x6f, 0xff, 0xff, + 0xff, 0x9b, 0xbb, 0x8d, 0xee, 0xee, 0xee, 0xbf, + 0xff, 0xf6, 0x66, 0xff, 0x66, 0x66, 0xff, 0xff, + 0xff, 0xf9, 0xcc, 0xb7, 0xee, 0xee, 0xee, 0xbf, + 0xff, 0xf6, 0x66, 0xff, 0xf6, 0x66, 0x6f, 0xff, + 0xff, 0xff, 0x8c, 0xc8, 0xee, 0xee, 0xee, 0xbf, + 0xff, 0xf6, 0x66, 0xff, 0xff, 0x66, 0x6f, 0xff, + 0xff, 0xff, 0xf7, 0xcc, 0x8e, 0xee, 0xee, 0x9f, + 0xff, 0xf6, 0x66, 0xff, 0xff, 0xf6, 0x66, 0xff, + 0xff, 0xff, 0xff, 0x7c, 0x8e, 0xed, 0x9f, 0xff, + 0xff, 0xf6, 0x66, 0xff, 0xff, 0xf6, 0x66, 0x6f, + 0xff, 0xff, 0xff, 0xff, 0x95, 0x8f, 0xff, 0xff, + 0xff, 0xf6, 0x66, 0xff, 0xff, 0x66, 0x66, 0x66, + 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + }; Modified: kos/examples/dreamcast/2ndmix/2ndmix.c =================================================================== --- kos/examples/dreamcast/2ndmix/2ndmix.c 2011-05-19 01:51:16 UTC (rev 730) +++ kos/examples/dreamcast/2ndmix/2ndmix.c 2011-05-27 15:43:52 UTC (rev 731) @@ -5,7 +5,7 @@ */ -/* +/* The good ol' 2ndmix example that just won't die ^_^ @@ -48,7 +48,7 @@ printf("Can't open file %s\r\n", fn); return; } - + idx = 0x10000; /* Load 2048 bytes at a time */ while ( (r=fs_read(fd, buffer, 2048)) > 0) { @@ -56,18 +56,18 @@ idx += r; } fs_close(fd); - + /* Switch channels to mono if holding down A */ /*if (check_for_btn(BTN_A)) { snd_dbg[1] = 1; } else { snd_dbg[1] = 0; }*/ - + //dc_serial_printf("Load OK, starting ARM\r\n"); printf("Loading ARM program\r\n"); spu_memload(0, s3mplay, sizeof(s3mplay)); - + printf("Start\r\n"); spu_enable(); @@ -76,7 +76,7 @@ while (*snd_dbg == 3) ; - + printf("Done\r\n"); } @@ -121,7 +121,7 @@ /* Draws a point using a triangle strip */ void poly_pnt(int x, int y, float z, float size, int color) { pvr_vertex_t vert; - + vert.flags = PVR_CMD_VERTEX; vert.x = x; vert.y = y + size; @@ -130,10 +130,10 @@ vert.argb = PVR_PACK_COLOR(1.0f, color / 256.0f, color / 256.0f, color / 256.0f); vert.oargb = 0; pvr_prim(&vert, sizeof(vert)); - + vert.y = y; pvr_prim(&vert, sizeof(vert)); - + vert.flags = PVR_CMD_VERTEX_EOL; vert.x = x + size; vert.y = y + size; @@ -195,7 +195,7 @@ -1, -1, 1, 1, -1, -1, 1, -1, 1, - + -1, 1, 1, /* Bottom plane */ -1, 1, -1, 1, 1, 1, @@ -224,7 +224,7 @@ ra = (rotang*2) % 256; ra = (ra + 42*which) % 256; /* heh */ ra2 = (rotang/2); - + /* If the current parameters don't make you motion sick, then try setting *32 on ytrans to something higher =) */ xtrans = mcos(ra) * 220; @@ -239,7 +239,7 @@ tx = (mcos(ra)*x - msin(ra)*y); ty = (mcos(ra)*y + msin(ra)*x); x = tx; y = ty; - + tz = (mcos(ra2)*z - msin(ra2)*y); ty = (mcos(ra2)*y + msin(ra2)*z); y = ty; z = tz; @@ -247,7 +247,7 @@ tx = (mcos(ra)*x - msin(ra)*z); tz = (mcos(ra)*z + msin(ra)*x); x = tx; z = tz; - + z += ztrans; xt = (x*zkonst) / (zkonst+z+mult); @@ -320,13 +320,13 @@ void cubes_one_frame() { pvr_poly_cxt_t tmp; - + if (!cubes_have_header) { pvr_poly_cxt_col(&tmp, PVR_LIST_TR_POLY); pvr_poly_compile(&cubes_header, &tmp); cubes_have_header = 1; } - + /* Send polygon header to the TA using store queues */ pvr_prim(&cubes_header, sizeof(cubes_header)); @@ -526,13 +526,13 @@ vert.argb = PVR_PACK_COLOR(color, 0.0f, 0.75f, 1.0f); vert.oargb = 0; pvr_prim(&vert, sizeof(vert)); - + vert.x = x1; vert.y = y1; vert.u = u1; vert.v = v1; pvr_prim(&vert, sizeof(vert)); - + vert.x = x1 + FONT_WIDTH*FONT_DOUBLE; vert.y = y1 + FONT_HEIGHT*FONT_DOUBLE; vert.u = u2; @@ -557,7 +557,7 @@ void font_next_screen() { int width; int y, y1, x; - + if (!scrollypos) scrollypos = scrolly; @@ -578,7 +578,7 @@ y1 += (int)(FONT_HEIGHT*FONT_DOUBLE+4); y++; } - + if (*scrollypos == '\a') { scrollypos = scrolly; } @@ -591,7 +591,7 @@ /* Debug code to draw the font texture */ void blit_font_texture() { vertex_ot_t vert; - + vert.flags = TA_VERTEX_NORMAL; vert.x = 50.0f; vert.y = 50.0f + 512.0f; @@ -620,7 +620,7 @@ vert.u = 1.0f; vert.v = 0.0f; ta_commit_vertex(&vert, sizeof(vert)); - + return; } #endif @@ -631,7 +631,7 @@ int done, y, actrows; actrows = 0; - + /* Start a textured polygon set (with the font texture) */ pvr_prim(&font_header, sizeof(font_header)); @@ -695,7 +695,7 @@ charmap = malloc(256); image = malloc(FONT_PIC_WIDTH * FONT_PIC_HEIGHT); pcxpal = pcxpall; - + if (!load_pcx(FONT_NAME)) { printf("Couldn't load PCX of font image\r\n"); return; @@ -713,7 +713,7 @@ *vtex++ = val; } } - + for (c=0; c<255; c++) charmap[c] = -1; for (c=0; c<strlen(font_map); c++) { @@ -723,11 +723,11 @@ #endif } charmap[' '] = -1; - + memset(font_rows, 0, sizeof(font_rows)); font_next_screen(); - + free(image); /* Make a polygon header */ @@ -757,11 +757,11 @@ /* Draw scrolly */ font_one_frame(); - + /* Finish up */ pvr_list_finish(); pvr_scene_finish(); - + framecnt++; } Modified: kos/examples/dreamcast/2ndmix/gfx/font14_256.h =================================================================== --- kos/examples/dreamcast/2ndmix/gfx/font14_256.h 2011-05-19 01:51:16 UTC (rev 730) +++ kos/examples/dreamcast/2ndmix/gfx/font14_256.h 2011-05-27 15:43:52 UTC (rev 731) @@ -1,283 +1,283 @@ uint8 font14_256_pcx[] = { -10, 5, 1, 8, 0, 0, 0, 0, 255, 0, 255, 0, 44, 1, 44, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0, 0, 0, 0, 0, 0, 0, 0, 0, 196, 255, 193, 249, 194, 0, 193, 249, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 194, 0, 193, -249, 196, 255, 193, 249, 194, 0, 193, 249, 197, 255, 193, 249, 0, 193, 249, 196, 255, 193, 249, 193, 242, 194, 0, 196, 255, 193, 249, 194, 0, -193, 249, 193, 255, 195, 0, 193, 255, 193, 249, 0, 194, 255, 195, 249, 194, 242, 198, 0, 193, 249, 193, 242, 0, 193, 249, 193, 255, 195, 0, -193, 249, 193, 242, 0, 193, 249, 193, 255, 198, 0, 193, 249, 193, 255, 193, 242, 0, 194, 255, 193, 249, 0, 193, 249, 196, 255, 193, 249, 195, -0, 196, 255, 193, 249, 194, 0, 193, 249, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 194, 0, 193, 249, 196, 255, 193, 249, 195, 0, 197, -255, 193, 249, 0, 194, 255, 195, 249, 194, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 242, 195, 0, 193, 255, -193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, -0, 193, 255, 193, 249, 0, 193, 249, 196, 255, 194, 249, 194, 0, 196, 255, 193, 249, 197, 0, 194, 249, 195, 0, 193, 249, 196, 255, 193, 249, -194, 0, 193, 249, 196, 255, 193, 249, 194, 0, 194, 249, 195, 0, 193, 255, 193, 249, 0, 193, 249, 197, 255, 193, 249, 0, 193, 255, 193, 249, -195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, -255, 193, 249, 194, 0, 193, 242, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, -193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 201, 0, 193, 255, 193, 242, 0, 193, 255, -193, 249, 194, 0, 193, 255, 193, 242, 194, 0, 193, 255, 193, 249, 198, 0, 193, 255, 194, 249, 193, 255, 193, 242, 193, 255, 193, 242, 0, 193, -255, 193, 242, 194, 0, 193, 242, 193, 249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, -255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, -200, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, -193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 242, 193, 249, 193, 242, 0, 193, 242, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, -0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 249, 200, 0, -193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, -193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, -195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, -0, 193, 249, 193, 242, 195, 0, 193, 255, 193, 242, 201, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, -255, 193, 242, 198, 0, 193, 255, 193, 242, 0, 193, 242, 0, 193, 249, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 0, 193, -255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, -242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 200, 0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 195, -0, 193, 255, 193, 242, 0, 194, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 194, 0, 193, 242, 193, -249, 193, 242, 193, 249, 193, 242, 194, 0, 194, 249, 193, 242, 0, 194, 249, 193, 242, 197, 0, 193, 242, 193, 255, 193, 242, 0, 193, 255, 193, -242, 194, 0, 194, 255, 193, 242, 195, 0, 194, 255, 193, 242, 200, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 0, 193, 255, 193, 242, -195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 198, 0, 194, 255, 193, 249, 194, 242, 194, 249, 0, 194, 255, 193, 249, 194, 242, 193, 249, -194, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 193, 249, 193, 255, 193, 249, 193, -242, 194, 0, 193, 255, 193, 242, 193, 249, 193, 255, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 194, 0, 194, 255, 193, 249, 0, 193, 255, -193, 242, 193, 249, 193, 255, 194, 249, 193, 242, 195, 0, 193, 255, 193, 242, 201, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 193, 255, 193, -249, 196, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, -0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 194, 255, 193, 249, 193, 242, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 195, 0, -193, 255, 193, 242, 0, 194, 255, 193, 249, 193, 242, 193, 249, 193, 242, 195, 0, 193, 255, 196, 249, 196, 0, 193, 255, 193, 242, 196, 0, 193, -255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 242, 193, 255, 193, 242, 0, 193, 249, 193, 255, 193, 242, 0, 193, 255, 193, 242, 0, 193, -255, 0, 193, 255, 193, 242, 195, 0, 193, 242, 193, 249, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, 193, 249, 193, 242, 195, 0, 193, 255, -195, 249, 193, 242, 194, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 196, 0, 193, 255, 194, -249, 193, 242, 193, 249, 196, 0, 193, 255, 193, 249, 193, 242, 193, 249, 194, 0, 193, 255, 193, 249, 194, 255, 194, 249, 193, 242, 0, 195, 249, -195, 242, 194, 0, 193, 255, 193, 249, 195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 194, 249, 0, 193, 255, 193, 249, 198, 0, -193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, -249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 201, 0, 193, 249, 193, 242, 0, 193, 255, 195, -249, 193, 242, 195, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 249, -193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, -0, 193, 255, 193, 249, 193, 242, 0, 193, 242, 193, 249, 193, 242, 197, 0, 193, 242, 194, 249, 195, 0, 193, 255, 193, 249, 196, 0, 193, 255, -193, 249, 195, 0, 193, 255, 193, 242, 194, 0, 194, 249, 0, 193, 255, 193, 249, 194, 0, 193, 255, 193, 249, 0, 193, 249, 0, 193, 255, 193, -242, 195, 0, 193, 255, 193, 249, 193, 242, 197, 0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 194, 249, 193, 242, 196, 0, 193, 255, 195, -249, 193, 242, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 195, 0, 193, 255, 194, 249, 193, 242, 201, 0, 194, 249, 198, 0, 193, 249, 193, -242, 196, 0, 193, 242, 193, 255, 194, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, -242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, -193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, 0, 193, -255, 193, 249, 196, 0, 193, 255, 193, 249, 195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, -255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, -249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, -0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 194, -0, 193, 242, 193, 255, 193, 242, 193, 255, 193, 242, 194, 0, 193, 255, 193, 249, 0, 193, 249, 0, 193, 255, 193, 242, 194, 0, 193, 255, 193, -249, 193, 242, 193, 249, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 197, 0, 193, 255, 193, 249, 194, -242, 0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 202, 0, 193, 255, 193, 242, 198, 0, 193, 255, -193, 242, 197, 0, 193, 255, 193, 249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, -193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, -0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, 0, -193, 255, 193, 249, 196, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 194, 0, 193, 255, 193, 249, 194, 0, 193, -255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, -249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 194, 0, 193, 255, 193, 249, 195, 0, -193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, 0, -193, 249, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 249, 0, 193, 255, 193, 242, 0, 194, 249, 193, 242, 0, 193, 255, 193, 249, -193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 197, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, 255, -193, 242, 196, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 202, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 197, 0, -193, 255, 193, 249, 193, 242, 0, 194, 249, 195, 0, 193, 249, 193, 242, 0, 194, 249, 195, 0, 193, 249, 193, 242, 0, 194, 249, 195, 0, 193, -249, 193, 242, 0, 194, 249, 194, 0, 193, 242, 193, 249, 193, 242, 0, 194, 249, 198, 0, 194, 249, 198, 0, 194, 249, 195, 0, 193, 249, 193, -242, 0, 194, 249, 195, 0, 193, 255, 193, 242, 195, 0, 194, 249, 196, 0, 193, 249, 193, 242, 195, 0, 193, 249, 193, 242, 0, 194, 249, 194, -0, 193, 242, 193, 255, 193, 242, 0, 194, 249, 198, 0, 194, 249, 195, 0, 193, 249, 193, 242, 0, 194, 249, 195, 0, 193, 249, 193, 242, 0, -194, 249, 195, 0, 193, 249, 193, 242, 0, 194, 249, 198, 0, 194, 249, 194, 0, 193, 255, 194, 249, 0, 194, 249, 195, 0, 193, 255, 193, 242, -197, 0, 193, 242, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 196, 0, 194, 249, 195, 0, 193, 249, 193, 242, 195, 0, 193, 242, 193, 255, -193, 242, 195, 0, 193, 255, 193, 249, 193, 255, 193, 249, 193, 242, 193, 249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, -0, 193, 255, 193, 249, 193, 242, 195, 0, 194, 249, 193, 242, 197, 0, 194, 249, 193, 242, 194, 0, 193, 249, 193, 242, 196, 0, 193, 255, 193, -249, 195, 0, 194, 249, 193, 242, 202, 0, 193, 249, 193, 242, 198, 0, 193, 255, 193, 242, 196, 0, 193, 242, 193, 255, 193, 249, 193, 242, 0, -194, 242, 195, 0, 194, 242, 0, 198, 242, 195, 0, 197, 242, 194, 0, 198, 242, 194, 0, 199, 242, 0, 194, 242, 199, 0, 197, 242, 194, 0, -194, 242, 195, 0, 193, 249, 193, 242, 0, 194, 255, 193, 249, 196, 242, 194, 0, 193, 249, 196, 242, 194, 0, 194, 242, 195, 0, 193, 249, 193, -242, 0, 199, 242, 0, 194, 242, 195, 0, 194, 242, 0, 194, 242, 195, 0, 194, 242, 194, 0, 197, 242, 194, 0, 194, 242, 199, 0, 195, 242, -193, 249, 194, 242, 0, 194, 242, 195, 0, 193, 249, 193, 242, 0, 198, 242, 196, 0, 193, 249, 193, 242, 197, 0, 197, 242, 197, 0, 193, 242, -197, 0, 197, 242, 194, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 195, 0, 193, 249, 194, 242, 195, 0, 199, 242, 194, 0, 197, 242, -194, 0, 194, 255, 194, 249, 195, 242, 0, 199, 242, 0, 198, 242, 199, 0, 193, 249, 193, 242, 0, 198, 242, 194, 0, 0, 196, 255, 193, 249, -194, 0, 193, 249, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 216, 0, 193, 255, -195, 0, 193, 255, 193, 249, 197, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 203, 0, 197, 255, 193, 249, 199, 0, 193, 255, 194, 0, 196, -255, 193, 249, 197, 0, 193, 255, 193, 242, 198, 0, 194, 255, 197, 0, 194, 255, 193, 249, 198, 0, 193, 242, 255, 0, 245, 0, 193, 255, 193, -249, 195, 0, 193, 255, 193, 242, 197, 0, 193, 242, 193, 249, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, -249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 214, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, -196, 0, 193, 249, 193, 242, 0, 193, 249, 193, 242, 197, 0, 193, 255, 0, 193, 255, 195, 0, 193, 255, 193, 249, 193, 255, 0, 193, 255, 196, -0, 193, 255, 193, 242, 194, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 197, 0, -193, 255, 193, 249, 201, 0, 193, 255, 193, 242, 197, 0, 193, 255, 236, 0, 194, 255, 211, 0, 194, 255, 203, 0, 195, 255, 203, 0, 194, 255, -200, 0, 194, 255, 201, 0, 194, 255, 0, 193, 255, 193, 242, 203, 0, 193, 249, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, -0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 199, 0, 193, 255, 193, 242, 199, -0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 193, 242, 206, 0, 193, 255, 0, 193, 255, 195, 0, 193, 255, 193, 242, 193, 255, 0, 193, -255, 196, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 193, 242, 0, 193, 255, 193, 242, 196, 0, 193, 242, 202, 0, 193, 255, 193, 249, 201, -0, 193, 255, 193, 242, 196, 0, 193, 242, 193, 255, 193, 242, 197, 0, 193, 255, 193, 249, 228, 0, 194, 255, 211, 0, 194, 255, 202, 0, 193, -255, 195, 0, 193, 255, 202, 0, 194, 255, 214, 0, 193, 255, 194, 242, 193, 249, 194, 255, 199, 0, 193, 249, 193, 242, 194, 0, 195, 249, 193, -255, 193, 249, 195, 0, 195, 249, 193, 255, 193, 249, 193, 242, 196, 0, 195, 249, 196, 0, 193, 249, 193, 242, 199, 0, 193, 249, 193, 242, 198, -0, 193, 255, 193, 249, 193, 242, 196, 0, 193, 255, 193, 242, 205, 0, 197, 255, 195, 0, 194, 255, 193, 249, 193, 255, 193, 249, 197, 0, 193, -255, 193, 249, 193, 242, 195, 0, 195, 249, 193, 255, 204, 0, 193, 255, 193, 249, 201, 0, 193, 249, 193, 242, 194, 0, 195, 255, 196, 249, 195, -0, 193, 255, 193, 242, 221, 0, 196, 255, 193, 249, 194, 0, 197, 255, 193, 249, 195, 0, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 193, -255, 194, 0, 197, 255, 194, 0, 193, 249, 193, 255, 195, 0, 193, 249, 193, 242, 194, 0, 196, 255, 193, 249, 194, 0, 193, 249, 193, 255, 200, -0, 194, 249, 201, 0, 193, 249, 193, 242, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, 249, 193, 242, 198, 0, 193, 249, 193, 242, 0, 193, -255, 193, 249, 193, 242, 194, 0, 193, 249, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 214, 0, 193, 255, 193, 249, 193, -242, 197, 0, 193, 255, 193, 242, 206, 0, 193, 255, 0, 193, 255, 197, 0, 193, 255, 0, 193, 255, 194, 249, 195, 0, 193, 255, 193, 249, 193, -242, 195, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, 249, 193, 242, 202, 0, 193, 255, 193, 242, 201, 0, 193, 255, 193, 242, 195, 0, 193, -255, 196, 249, 194, 0, 195, 255, 193, 242, 193, 255, 193, 249, 203, 0, 196, 255, 193, 249, 202, 0, 193, 249, 196, 0, 193, 255, 193, 249, 0, -193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 255, -193, 242, 196, 0, 193, 255, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 255, 193, 249, 196, 0, 193, -255, 193, 242, 201, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 0, 193, -255, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 199, -0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, 198, 0, 193, 249, 193, 242, 205, 0, 197, 255, 196, 0, 193, 255, 0, 194, 255, -193, 242, 194, 0, 193, 255, 193, 249, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 202, 0, 193, 255, 193, 242, -201, 0, 193, 255, 193, 242, 195, 0, 193, 242, 195, 249, 193, 242, 194, 0, 193, 249, 193, 242, 193, 255, 195, 242, 203, 0, 193, 249, 196, 242, -204, 0, 193, 249, 194, 255, 194, 249, 0, 194, 255, 195, 0, 193, 249, 193, 255, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 195, 0, -193, 255, 193, 242, 0, 193, 255, 193, 242, 193, 249, 193, 255, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 193, 249, 193, 255, 196, 0, 193, -255, 193, 242, 194, 0, 194, 255, 193, 249, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 195, 0, 193, 255, 193, 242, 201, 0, 193, 255, -193, 242, 0, 193, 255, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 193, 242, 194, 0, -193, 255, 193, 242, 198, 0, 193, 255, 193, 242, 203, 0, 193, 249, 193, 242, 198, 0, 193, 249, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, -215, 0, 193, 255, 0, 193, 255, 197, 0, 193, 255, 0, 194, 255, 193, 242, 0, 193, 255, 193, 249, 193, 242, 0, 193, 255, 193, 242, 194, 0, -193, 255, 193, 249, 193, 242, 193, 255, 0, 193, 255, 193, 242, 202, 0, 193, 255, 193, 242, 201, 0, 193, 255, 193, 242, 195, 0, 194, 249, 0, -194, 249, 196, 0, 193, 255, 193, 242, 221, 0, 193, 255, 195, 0, 194, 255, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, -193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, -249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 249, -195, 0, 193, 249, 193, 242, 0, 194, 249, 193, 242, 194, 0, 193, 249, 193, 242, 198, 0, 193, 249, 193, 242, 0, 194, 249, 193, 242, 194, 0, -193, 249, 193, 242, 197, 0, 193, 242, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 212, 0, 193, 249, 193, 242, 200, 0, 193, 255, 193, 242, -206, 0, 193, 255, 0, 193, 255, 197, 0, 193, 255, 0, 193, 255, 193, 249, 193, 242, 0, 193, 249, 193, 242, 194, 0, 193, 249, 193, 242, 194, -0, 194, 249, 193, 242, 0, 193, 255, 193, 249, 203, 0, 193, 249, 193, 242, 201, 0, 193, 249, 193, 242, 195, 0, 193, 249, 195, 0, 193, 249, -196, 0, 193, 249, 193, 242, 199, 0, 193, 255, 193, 242, 206, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 195, 0, 194, 255, 0, 193, -255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, -249, 198, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, -195, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 0, 0, 197, 242, 199, 0, 194, 242, 194, 0, 197, 242, -194, 0, 198, 242, 196, 0, 193, 249, 193, 242, 212, 0, 193, 242, 201, 0, 193, 249, 193, 242, 212, 0, 194, 242, 193, 255, 193, 242, 193, 255, -193, 242, 194, 0, 193, 242, 200, 0, 193, 242, 193, 249, 193, 242, 0, 193, 249, 193, 242, 203, 0, 195, 242, 197, 0, 195, 242, 213, 0, 193, -249, 193, 242, 207, 0, 193, 249, 193, 242, 196, 0, 193, 242, 195, 255, 193, 242, 193, 255, 0, 198, 242, 195, 0, 197, 242, 195, 0, 197, 242, -195, 0, 198, 242, 0, 194, 242, 199, 0, 197, 242, 194, 0, 194, 242, 195, 0, 193, 249, 193, 242, 195, 0, 193, 249, 193, 242, 197, 0, 193, -249, 196, 242, 194, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 194, 255, 199, 0, 193, 249, 193, 255, 255, 0, 246, 0, 193, 229, 193, -231, 193, 233, 193, 236, 193, 237, 193, 240, 193, 242, 193, 244, 202, 0, 195, 255, 255, 0, 236, 0, 193, 255, 193, 249, 199, 0, 194, 255, 255, -0, 194, 255, 244, 0, 194, 231, 193, 234, 193, 235, 193, 238, 193, 239, 193, 242, 193, 244, 201, 0, 193, 255, 195, 0, 193, 246, 255, 0, 235, -0, 193, 249, 193, 255, 195, 0, 193, 249, 193, 242, 194, 0, 193, 249, 193, 255, 198, 0, 193, 255, 193, 242, 0, 194, 255, 195, 0, 196, 255, -193, 249, 195, 0, 196, 255, 193, 249, 194, 0, 193, 249, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 195, 0, 196, 255, 193, 249, 195, 0, -197, 255, 193, 249, 0, 194, 255, 195, 249, 194, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 242, 195, 0, 193, -255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 255, 193, 249, -195, 0, 193, 255, 193, 249, 0, 193, 249, 196, 255, 194, 249, 0, 193, 233, 193, 234, 193, 233, 193, 236, 193, 237, 193, 240, 193, 242, 193, 244, -200, 0, 193, 255, 197, 0, 193, 255, 255, 0, 234, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 197, 0, 193, -255, 193, 242, 0, 193, 255, 0, 193, 249, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, -255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, -195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 200, 0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, -194, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 194, 0, 193, 242, 193, 249, 193, 242, 193, 249, 193, -242, 194, 0, 194, 249, 193, 242, 0, 194, 249, 193, 242, 197, 0, 193, 242, 193, 255, 193, 242, 0, 193, 236, 194, 235, 193, 237, 194, 240, 193, -242, 193, 244, 200, 0, 193, 255, 194, 0, 193, 255, 193, 246, 0, 193, 255, 255, 0, 234, 0, 193, 255, 193, 242, 193, 255, 193, 249, 197, 0, -193, 255, 193, 242, 197, 0, 193, 255, 193, 242, 0, 193, 255, 0, 193, 249, 193, 242, 0, 193, 255, 193, 242, 195, 0, 193, 249, 193, 242, 0, -193, 255, 193, 242, 195, 0, 193, 255, 193, 242, 0, 194, 255, 193, 249, 193, 242, 193, 249, 193, 242, 194, 0, 193, 255, 193, 242, 195, 0, 193, -255, 193, 242, 0, 194, 255, 199, 0, 193, 255, 196, 249, 196, 0, 193, 255, 193, 242, 196, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 242, -0, 193, 242, 193, 255, 193, 242, 0, 193, 249, 193, 255, 193, 242, 0, 193, 255, 193, 242, 0, 193, 255, 0, 193, 255, 193, 242, 195, 0, 193, -242, 193, 249, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, 193, 249, 193, 242, 195, 0, 193, 255, 195, 249, 193, 242, 194, 0, 193, 238, 194, -237, 194, 240, 193, 242, 193, 244, 193, 247, 200, 0, 193, 246, 0, 193, 255, 0, 193, 246, 0, 193, 255, 255, 0, 234, 0, 193, 255, 193, 249, -0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 197, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, -195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 195, 0, -193, 255, 193, 242, 0, 193, 255, 193, 249, 203, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 249, 195, 0, 193, -255, 193, 242, 194, 0, 193, 242, 193, 255, 193, 242, 193, 255, 193, 242, 194, 0, 193, 255, 193, 249, 0, 193, 249, 0, 193, 255, 193, 242, 194, -0, 193, 255, 193, 249, 193, 242, 193, 249, 193, 242, 196, 0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 197, 0, 196, -240, 193, 242, 194, 244, 193, 246, 200, 0, 193, 246, 0, 193, 246, 0, 193, 246, 0, 193, 255, 255, 0, 234, 0, 193, 255, 193, 249, 194, 0, -193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 197, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, -255, 193, 242, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 0, 193, 255, 193, 249, 198, 0, 193, 255, 193, 249, 194, 0, 194, 255, 194, -0, 193, 255, 193, 249, 203, 0, 193, 255, 193, 242, 195, 0, 193, 255, 193, 249, 196, 0, 193, 255, 193, 249, 195, 0, 193, 255, 193, 242, 195, -0, 193, 249, 193, 255, 193, 249, 195, 0, 193, 255, 193, 249, 0, 193, 249, 0, 193, 255, 193, 242, 0, 194, 249, 193, 242, 0, 193, 255, 193, -249, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 195, 0, 193, 255, 193, 249, 193, 242, 197, 0, 196, 242, 194, 244, 193, 247, 193, 248, 200, -0, 193, 246, 194, 0, 193, 246, 0, 193, 241, 255, 0, 235, 0, 194, 242, 195, 0, 193, 249, 193, 242, 194, 0, 196, 242, 195, 0, 194, 242, -195, 0, 194, 242, 0, 194, 242, 195, 0, 194, 242, 194, 0, 197, 242, 194, 0, 194, 242, 199, 0, 195, 242, 193, 249, 194, 242, 0, 194, 242, -198, 0, 198, 242, 196, 0, 193, 249, 193, 242, 197, 0, 197, 242, 197, 0, 193, 242, 197, 0, 197, 242, 194, 0, 193, 255, 193, 242, 195, 0, -193, 255, 193, 242, 195, 0, 193, 249, 194, 242, 195, 0, 199, 242, 0, 193, 245, 195, 244, 194, 246, 194, 249, 0, 196, 255, 193, 249, 195, 0, -193, 241, 255, 0, 239, 0, 255, 0, 255, 0, 194, 0, 195, 246, 193, 247, 193, 246, 193, 249, 193, 251, 193, 250, 0, 193, 249, 196, 242, 196, -0, 196, 241, 255, 0, 235, 0, 255, 0, 255, 0, 194, 0, 193, 248, 194, 249, 193, 248, 193, 249, 193, 250, 193, 251, 193, 253, 255, 0, 249, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, 0, 255, 0, 255, 0, 255, 0, 255, 0, 196, -0, 255, 0, 255,... [truncated message content] |
From: <ljs...@us...> - 2011-05-19 01:51:23
|
Revision: 730 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=730&view=rev Author: ljsebald Date: 2011-05-19 01:51:16 +0000 (Thu, 19 May 2011) Log Message: ----------- Document mmu.h. Modified Paths: -------------- kos/kernel/arch/dreamcast/include/arch/mmu.h Modified: kos/kernel/arch/dreamcast/include/arch/mmu.h =================================================================== --- kos/kernel/arch/dreamcast/include/arch/mmu.h 2011-05-19 01:21:53 UTC (rev 729) +++ kos/kernel/arch/dreamcast/include/arch/mmu.h 2011-05-19 01:51:16 UTC (rev 730) @@ -1,10 +1,46 @@ /* KallistiOS ##version## arch/dreamcast/include/arch/mmu.h - (c)2001 Dan Potter + Copyright (C) 2001 Dan Potter */ +/** \file arch/mmu.h + \brief Memory Management Unit and Translation Lookaside Buffer handling. + + This file defines the interface to the Memory Management Unit (MMU) in the + SH4. The MMU, while not used normally by KOS, is available for virtual + memory use, if you so desire. While using this functionality is probably + overkill for most homebrew, there are a few very interesting things that + this functionality could be used for (like mapping large files into memory + that wouldn't otherwise fit). + + The whole system is set up as a normal paged memory virtual->physical + address translation. KOS implements the page table as a sparse, two-level + page table. By default, pages are 4KB in size. Each top-level page table + entry has 512 2nd level entries (there are 1024 entries in the top-level + entry). This works out to about 2KB of space needed for one top-level entry. + + The SH4 itself has 4 TLB entries for instruction fetches, and 64 "unified" + TLB entries (for combined instructions + data). Essentially, the UTLB acts + both as the TLB for data accesses (from mov instructions) and as a cache for + entries for the ITLB. If there is no entry in the ITLB for an instruction + access, the UTLB will automatically be searched. If no entry is found still, + an ITLB miss exception will be generated. Data accesses are handled + similarly to this (although additional complications are involved due to + write accesses, and of course the ITLB doesn't play into data accesses). + + For more information about how the MMU works, refer to the Hitachi/Renesas + SH4 programming manual. It has much more detailed information than what is + in here, for obvious reasons. + + This functionality was ported over to mainline KOS from the KOS-MMU project + of Dan Potter. Unfortunately, KOS-MMU never reached a real phase of maturity + and usefulness, but this piece can be quite useful on its own. + + \author Dan Potter +*/ + #ifndef __ARCH_MMU_H #define __ARCH_MMU_H @@ -43,130 +79,262 @@ */ -#define MMU_TOP_SHIFT 21 -#define MMU_TOP_BITS 10 -#define MMU_TOP_MASK ((1 << MMU_TOP_BITS) - 1) -#define MMU_BOT_SHIFT 12 -#define MMU_BOT_BITS 9 -#define MMU_BOT_MASK ((1 << MMU_BOT_BITS) - 1) -#define MMU_IND_SHIFT 0 -#define MMU_IND_BITS 12 -#define MMU_IND_MASK ((1 << MMU_IND_BITS) - 1) +/** \defgroup mmu_bit_macros MMU address bit definitions -/* MMU TLB entry for a single page (one 32-bit word) */ + The MMU code uses these to determine the page of a request. + + @{ +*/ +#define MMU_TOP_SHIFT 21 /**< \brief Top-level shift */ +#define MMU_TOP_BITS 10 /**< \brief Top-level bits */ +#define MMU_TOP_MASK ((1 << MMU_TOP_BITS) - 1) /**< \brief Top-level mask */ +#define MMU_BOT_SHIFT 12 /**< \brief Bottom shift */ +#define MMU_BOT_BITS 9 /**< \brief Bottom bits */ +#define MMU_BOT_MASK ((1 << MMU_BOT_BITS) - 1) /**< \brief Bottom mask */ +#define MMU_IND_SHIFT 0 /**< \brief Index shift */ +#define MMU_IND_BITS 12 /**< \brief Index bits */ +#define MMU_IND_MASK ((1 << MMU_IND_BITS) - 1) /**< \brief Index mask */ +/** @} */ + +/** \defgroup mmu_prot_values MMU protection settings + + Each page mapped via the MMU can be protected in a couple of different ways, + as specified here. + + @{ +*/ +#define MMU_KERNEL_RDONLY 0 /**< \brief No user access, kernel read-only */ +#define MMU_KERNEL_RDWR 1 /**< \brief No user access, kernel full */ +#define MMU_ALL_RDONLY 2 /**< \brief Read-only user and kernel */ +#define MMU_ALL_RDWR 3 /**< \brief Full access, user and kernel */ +/** @} */ + +/** \defgroup mmu_cache_values MMU cacheability settings + + Each page mapped via the MMU can have its cacheability set individually. + + @{ +*/ +#define MMU_NO_CACHE 1 /**< \brief Cache disabled */ +#define MMU_CACHE_BACK 2 /**< \brief Write-back cacheing */ +#define MMU_CACHE_WT 3 /**< \brief Write-through cacheing */ +#define MMU_CACHEABLE MMU_CACHE_BACK /**< \brief Default cacheing */ +/** @} */ + +/** \brief MMU TLB entry for a single page. + + The TLB entries on the SH4 are a single 32-bit dword in length. We store + some other data here too for ease of use. + + \headerfile arch/mmu.h +*/ typedef struct mmupage { - /* Explicit pieces, used for reference */ - /*uint32 virtual; */ /* implicit */ - uint32 physical:18; /* Physical page ID -- 18 bits */ - uint32 prkey:2; /* Protection key data -- 2 bits */ - uint32 valid:1; /* Valid mapping -- 1 bit */ - uint32 shared:1; /* Shared between procs -- 1 bit */ - uint32 cache:1; /* Cacheable -- 1 bit */ - uint32 dirty:1; /* Dirty -- 1 bit */ - uint32 wthru:1; /* Write-thru enable -- 1 bit */ - uint32 blank:7; /* Reserved -- 7 bits */ + /* Explicit pieces, used for reference */ + /*uint32 virtual; */ /* implicit */ + uint32 physical:18; /**< \brief Physical page ID -- 18 bits */ + uint32 prkey:2; /**< \brief Protection key data -- 2 bits */ + uint32 valid:1; /**< \brief Valid mapping -- 1 bit */ + uint32 shared:1; /**< \brief Shared between procs -- 1 bit */ + uint32 cache:1; /**< \brief Cacheable -- 1 bit */ + uint32 dirty:1; /**< \brief Dirty -- 1 bit */ + uint32 wthru:1; /**< \brief Write-thru enable -- 1 bit */ + uint32 blank:7; /**< \brief Reserved -- 7 bits */ - /* Pre-compiled pieces. These waste a bit of ram, but they also - speed loading immensely at runtime. */ - uint32 pteh, ptel; + /* Pre-compiled pieces. These waste a bit of ram, but they also + speed loading immensely at runtime. */ + uint32 pteh; /**< \brief Pre-built PTEH value */ + uint32 ptel; /**< \brief Pre-built PTEL value */ } mmupage_t; -/* MMU sub-context type. We have two-level page tables on - SH-4, and each sub-context contains 512 entries. */ -#define MMU_SUB_PAGES 512 +/** \brief The number of pages in a sub-context. */ +#define MMU_SUB_PAGES 512 + +/** \brief MMU sub-context type. + + We have two-level page tables on SH4, and each sub-context contains 512 + entries. + + \headerfile arch/mmu.h +*/ typedef struct mmusubcontext { - mmupage_t page[MMU_SUB_PAGES]; /* 512 pages */ + mmupage_t page[MMU_SUB_PAGES]; /**< \brief 512 page entries */ } mmusubcontext_t; -/* MMU Context type */ -#define MMU_PAGES 1024 +/** \brief The number of sub-contexts in the main level context. */ +#define MMU_PAGES 1024 + +/** \brief MMU context type. + + This type is the top-level context that makes up the page table. There is + one of these, with 1024 sub-contexts. + + \headerfile arch/mmu.h +*/ typedef struct mmucontext { - mmusubcontext_t *sub[MMU_PAGES]; /* 1024 sub-contexts */ - int asid; /* Address Space ID */ + mmusubcontext_t *sub[MMU_PAGES]; /**< \brief 1024 sub-contexts */ + int asid; /**< \brief Address Space ID */ } mmucontext_t; -/* "Current" page tables (for TLB exception handling) */ +/** \brief "Current" page tables (for TLB exception handling). + + You should not modify this directly, but rather use the functions provided + to do so. +*/ extern mmucontext_t *mmu_cxt_current; -/* Set the "current" page tables for TLB handling */ +/** \brief Set the "current" page tables for TLB handling. + + This function is useful if you're trying to implement a process model or + something of the like on top of KOS. Essentially, this allows you to + completely boot the MMU context in use out and replace it with another. You + will need to call the mmu_switch_context() function afterwards to set the + address space id. + + \param context The context to make current. +*/ void mmu_use_table(mmucontext_t *context); -/* Allocate a new MMU context; each process should have exactly one of - these, and these should not exist without a process. */ +/** \brief Allocate a new MMU context. + + Each process should have exactly one of these, and these should not exist + without a process. Since KOS doesn't actually have a process model of its + own, that means you will only ever have one of these, if any. + + \param asid The address space ID of this process. + \return The newly created context. +*/ mmucontext_t *mmu_context_create(int asid); -/* Destroy an MMU context when a process is being destroyed. */ +/** \brief Destroy an MMU context when a process is being destroyed. + + This function cleans up a MMU context, deallocating any memory its using. + + \param context The context to clean up after. +*/ void mmu_context_destroy(mmucontext_t *context); -/* Using the given page tables, translate the virtual page ID to a - physical page ID. Return -1 on failure. */ +/** \brief Using the given page tables, translate the virtual page ID to a + physical page ID. + + \param context The context to look in. + \param virtpage The virtual page number to look for. + \return The physical page number, or -1 on failure. + \see mmu_phys_to_virt() +*/ int mmu_virt_to_phys(mmucontext_t *context, int virtpage); -/* Using the given page tables, translate the physical page ID to a - virtual page ID. Return -1 on failure. */ +/** \brief Using the given page tables, translate the physical page ID to a + virtual page ID. + + \param context The context to look in. + \param physpage The physical page number to look for. + \return The virtual page number, or -1 on failure. + \see mmu_virt_to_phys() +*/ int mmu_phys_to_virt(mmucontext_t *context, int physpage); -/* Switch to the given context; invalidate any caches as neccessary */ +/** \brief Switch to the given context. + + This function switches to the given context's address space ID. The context + should have already been made current with mmu_use_table(). + You are responsible for invalidating any caches as neccessary, as well as + invalidating any stale TLB entries. + + \param context The context to make current. +*/ void mmu_switch_context(mmucontext_t *context); -/* Set the given virtual page as invalid (unmap it) */ -void mmu_page_invalidate(mmucontext_t *context, int virtpage, int count); +/** \brief Set the given virtual page to map to the given physical page. -/* Set the given virtual page to map to the given physical page; implies - turning on the "valid" bit. Also sets the other named attributes.*/ + This implies turning on the "valid" bit. Also sets the other named + attributes as specified. + + \param context The context to modify. + \param virtpage The first virtual page to map. + \param physpage The first physical page to map. + \param count The number of sequential pages to map. + \param prot Memory protection for page (see + \ref mmu_prot_values). + \param cache Cache scheme for page (see \ref mmu_cache_values). + \param share Set to 1 to share between processes (meaningless), + otherwise set to 0. + \param dirty Set to 1 to mark the page as dirty, otherwise set to + 0. +*/ void mmu_page_map(mmucontext_t *context, int virtpage, int physpage, - int count, int prot, int cache, int share, int dirty); + int count, int prot, int cache, int share, int dirty); -/* Set the page protection to the given values */ -#define MMU_KERNEL_RDONLY 0 -#define MMU_KERNEL_RDWR 1 -#define MMU_ALL_RDONLY 2 -#define MMU_ALL_RDWR 3 -void mmu_page_protect(mmucontext_t *context, int virtpage, int count, - int prot); +/** \brief Copy a chunk of data from a process' address space into a kernel + buffer, taking into account page mappings. -/* Set the cacheing type to the given values */ -#define MMU_NO_CACHE 1 -#define MMU_CACHE_BACK 2 /* Write-back */ -#define MMU_CACHE_WT 3 /* Write-thru */ -#define MMU_CACHEABLE MMU_CACHE_BACK -void mmu_page_cache(mmucontext_t *context, int virtpage, int count, int cache); + \param context The context to use. + \param srcaddr Source, in the mapped memory space. + \param srccnt The number of bytes to copy. + \param buffer The kernel buffer to copy into (should be in P1). + \return The number of bytes copied. +*/ +int mmu_copyin(mmucontext_t *context, uint32 srcaddr, uint32 srccnt, + void *buffer); -/* Set a page as shared or not */ -#define MMU_NOT_SHARED 0 -#define MMU_SHARED 1 -void mmu_page_share(mmucontext_t *context, int virtpage, int count, int share); +/** \brief Copy a chunk of data from one process' address space to another + process' address space, taking into account page mappings. -/* Read the "dirty" bit of the page; potentially reset the bit. */ -#define MMU_NO_CHANGE 0 -#define MMU_CLEAN 1 -#define MMU_DIRTY 2 -int mmu_page_dirty(mmucontext_t *context, int virtpage, int count, int reset); - -/* Copy a chunk of data from a process' address space into a - kernel buffer, taking into account page mappings. */ -int mmu_copyin(mmucontext_t *context, uint32 srcaddr, uint32 srccnt, void *buffer); - -/* Copy a chunk of data from one process' address space to another - process' address space, taking into account page mappings. */ + \param context1 The source's context. + \param iov1 The scatter/gather array to copy from. + \param iovcnt1 The number of entries in iov1. + \param context2 The destination's context. + \param iov2 The scatter/gather array to copy to. + \param iovcnt2 The number of entries in iov2. +*/ int mmu_copyv(mmucontext_t *context1, iovec_t *iov1, int iovcnt1, mmucontext_t *context2, iovec_t *iov2, int iovcnt2); -/* MMU syscalls */ -void sc_mmu_mmap(uint32 dst, size_t len, uint32 src); +/** \brief MMU mapping handler. -/* Get/set thefunction to handle virt->phys page mapping; the function - should return a pointer to an mmupage_t on success, or NULL on - failure. */ + This type is used for functions that will take over the mapping for the + kernel. In general, there shouldn't be much use for taking this over + yourself, unless you want to change the size of the page table entries or + something of the like. + + \param context The context in use. + \param virtpage The virtual page to map. + \return The page table entry, or NULL if none exists. +*/ typedef mmupage_t * (*mmu_mapfunc_t)(mmucontext_t * context, int virtpage); + +/** \brief Get the current mapping function. + \return The current function that maps pages. +*/ mmu_mapfunc_t mmu_map_get_callback(); + +/** \brief Set a new MMU mapping handler. + + This function will allow you to set a new function to handle mapping for + memory pages. There's not much of a reason to do this unless you really do + not like the way KOS handles the page mapping internally. + + \param newfunc The new function to handle mapping. + \return The old function that did mapping. +*/ mmu_mapfunc_t mmu_map_set_callback(mmu_mapfunc_t newfunc); -/* Init / shutdown MMU */ +/** \brief Initialize MMU support. + + Unlike most things in KOS, the MMU is not initialized by a normal startup. + This is because for most homebrew, its not needed. + + \retval 0 On success (no error conditions defined). +*/ int mmu_init(); + +/** \brief Shutdown MMU support. + + Turn off the MMU after it was initialized. You should try to make sure this + gets done if you initialize the MMU in your program, so as to play nice with + loaders and the like (that will not expect that its on, in general). +*/ void mmu_shutdown(); __END_DECLS #endif /* __ARCH_MMU_H */ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-19 01:21:59
|
Revision: 729 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=729&view=rev Author: ljsebald Date: 2011-05-19 01:21:53 +0000 (Thu, 19 May 2011) Log Message: ----------- Document irq.h. Modified Paths: -------------- kos/kernel/arch/dreamcast/include/arch/irq.h Modified: kos/kernel/arch/dreamcast/include/arch/irq.h =================================================================== --- kos/kernel/arch/dreamcast/include/arch/irq.h 2011-05-15 04:24:11 UTC (rev 728) +++ kos/kernel/arch/dreamcast/include/arch/irq.h 2011-05-19 01:21:53 UTC (rev 729) @@ -1,10 +1,22 @@ /* KallistiOS ##version## arch/dreamcast/include/irq.h - (c)2000-2001 Dan Potter + Copyright (C) 2000-2001 Dan Potter */ +/** \file arch/irq.h + \brief Interrupt and exception handling. + + This file contains various definitions and declarations related to handling + interrupts and exceptions on the Dreamcast. This level deals with IRQs and + exceptions generated on the SH4, versus the asic layer which deals with + actually differentiating "external" interrupts. + + \author Dan Potter + \see dc/asic.h +*/ + #ifndef __ARCH_IRQ_H #define __ARCH_IRQ_H @@ -13,174 +25,351 @@ #include <arch/types.h> -/* The number of bytes required to save thread context. This should - include all general CPU registers, FP registers, and status regs (even - if not all of these are actually used). */ +/** \brief The number of bytes required to save thread context. + + This should include all general CPU registers, FP registers, and status regs + (even if not all of these are actually used). + + On the Dreamcast, we need 228 bytes for all of that, but we round it up to a + nicer number for sanity. +*/ #define REG_BYTE_CNT 256 /* Currently really 228 */ -/* Architecture-specific structure for holding the processor state (register - values, etc). The size of this structure should be less than or equal - to the above value. */ +/** \brief Architecture-specific structure for holding the processor state. + + This structure should hold register values and other important parts of the + processor state. The size of this structure should be less than or equal + to the REG_BYTE_CNT value. + + \headerfile arch/irq.h +*/ typedef struct irq_context { - uint32 r[16]; /* 16 general purpose regs */ - uint32 pc, pr, gbr, vbr; /* Various system words */ - uint32 mach, macl, sr; - uint32 frbank[16]; /* Secondary float regs */ - uint32 fr[16]; /* Primary float regs */ - uint32 fpscr, fpul; /* Float control regs */ + uint32 r[16]; /**< \brief 16 general purpose (integer) registers */ + uint32 pc; /**< \brief Program counter */ + uint32 pr; /**< \brief Procedure register (aka return address) */ + uint32 gbr; /**< \brief Global base register */ + uint32 vbr; /**< \brief Vector base register */ + uint32 mach; /**< \brief Multiply-and-accumulate register (high) */ + uint32 macl; /**< \brief Multiply-and-accumulate register (low) */ + uint32 sr; /**< \brief Status register */ + uint32 frbank[16]; /**< \brief Secondary floating poing registers */ + uint32 fr[16]; /**< \brief Primary floating point registers */ + uint32 fpscr; /**< \brief Floating-point status/control register */ + uint32 fpul; /**< \brief Floatint-point communication register */ } irq_context_t; /* A couple of architecture independent access macros */ -#define CONTEXT_PC(c) ((c).pc) -#define CONTEXT_FP(c) ((c).r[14]) -#define CONTEXT_SP(c) ((c).r[15]) -#define CONTEXT_RET(c) ((c).r[0]) +/** \brief Fetch the program counter from an irq_context_t. + \param c The context to read from. + \return The program counter value. +*/ +#define CONTEXT_PC(c) ((c).pc) +/** \brief Fetch the frame pointer from an irq_context_t. + \param c The context to read from. + \return The frame pointer value. +*/ +#define CONTEXT_FP(c) ((c).r[14]) + +/** \brief Fetch the stack pointer from an irq_context_t. + \param c The context to read from. + \return The stack pointer value. +*/ +#define CONTEXT_SP(c) ((c).r[15]) + +/** \brief Fetch the return value from an irq_context_t. + \param c The context to read from. + \return The return value. +*/ +#define CONTEXT_RET(c) ((c).r[0]) + +/** \defgroup irq_exception_codes SH4 exception codes + + These are all of the exceptions that can be raised on the SH4, and their + codes. They're divided into several logical groups. + + @{ +*/ /* Dreamcast-specific exception codes.. use these when getting or setting an exception code value. */ -/* Reset type */ -#define EXC_RESET_POWERON 0x0000 /* Power-on reset */ -#define EXC_RESET_MANUAL 0x0020 /* Manual reset */ -#define EXC_RESET_UDI 0x0000 /* Hitachi UDI reset */ -#define EXC_ITLB_MULTIPLE 0x0140 /* Instruction TLB multiple hit */ -#define EXC_DTLB_MULTIPLE 0x0140 /* Data TLB multiple hit */ +/** \defgroup irq_reset_codes Reset type -/* Re-Execution type */ -#define EXC_USER_BREAK_PRE 0x01e0 /* User break before instruction */ -#define EXC_INSTR_ADDRESS 0x00e0 /* Instruction address */ -#define EXC_ITLB_MISS 0x0040 /* Instruction TLB miss */ -#define EXC_ITLB_PV 0x00a0 /* Instruction TLB protection violation */ -#define EXC_ILLEGAL_INSTR 0x0180 /* Illegal instruction */ -#define EXC_SLOT_ILLEGAL_INSTR 0x01a0 /* Slot illegal instruction */ -#define EXC_GENERAL_FPU 0x0800 /* General FPU exception */ -#define EXC_SLOT_FPU 0x0820 /* Slot FPU exception */ -#define EXC_DATA_ADDRESS_READ 0x00e0 /* Data address (read) */ -#define EXC_DATA_ADDRESS_WRITE 0x0100 /* Data address (write) */ -#define EXC_DTLB_MISS_READ 0x0040 /* Data TLB miss (read) */ -#define EXC_DTLB_MISS_WRITE 0x0060 /* Data TLB miss (write) */ -#define EXC_DTLB_PV_READ 0x00a0 /* Data TLB P.V. (read) */ -#define EXC_DTLB_PV_WRITE 0x00c0 /* Data TLB P.V. (write) */ -#define EXC_FPU 0x0120 /* FPU exception */ -#define EXC_INITIAL_PAGE_WRITE 0x0080 /* Initial page write exception */ + These are exceptions that essentially cause a reset of the system. They + cannot actually be caught by normal means. They will all automatically cause + a branch to address 0xA0000000. These are pretty much fatal. -/* Completion type */ -#define EXC_TRAPA 0x0160 /* Unconditional trap */ -#define EXC_USER_BREAK_POST 0x01e0 /* User break after instruction */ + @{ +*/ +#define EXC_RESET_POWERON 0x0000 /**< \brief Power-on reset */ +#define EXC_RESET_MANUAL 0x0020 /**< \brief Manual reset */ +#define EXC_RESET_UDI 0x0000 /**< \brief Hitachi UDI reset */ +#define EXC_ITLB_MULTIPLE 0x0140 /**< \brief Instruction TLB multiple hit */ +#define EXC_DTLB_MULTIPLE 0x0140 /**< \brief Data TLB multiple hit */ +/** @} */ -/* Interrupt (completion type) */ -#define EXC_NMI 0x01c0 /* Nonmaskable interrupt */ -#define EXC_IRQ0 0x0200 /* External IRL requests */ -#define EXC_IRQ1 0x0220 -#define EXC_IRQ2 0x0240 -#define EXC_IRQ3 0x0260 -#define EXC_IRQ4 0x0280 -#define EXC_IRQ5 0x02a0 -#define EXC_IRQ6 0x02c0 -#define EXC_IRQ7 0x02e0 -#define EXC_IRQ8 0x0300 -#define EXC_IRQ9 0x0320 -#define EXC_IRQA 0x0340 -#define EXC_IRQB 0x0360 -#define EXC_IRQC 0x0380 -#define EXC_IRQD 0x03a0 -#define EXC_IRQE 0x03c0 -#define EXC_TMU0_TUNI0 0x0400 /* TMU0 underflow */ -#define EXC_TMU1_TUNI1 0x0420 /* TMU1 underflow */ -#define EXC_TMU2_TUNI2 0x0440 /* TMU2 underflow */ -#define EXC_TMU2_TICPI2 0x0460 /* TMU2 input capture */ -#define EXC_RTC_ATI 0x0480 -#define EXC_RTC_PRI 0x04a0 -#define EXC_RTC_CUI 0x04c0 -#define EXC_SCI_ERI 0x04e0 /* SCI Error receive */ -#define EXC_SCI_RXI 0x0500 /* Receive ready */ -#define EXC_SCI_TXI 0x0520 /* Transmit ready */ -#define EXC_SCI_TEI 0x0540 /* Transmit error */ -#define EXC_WDT_ITI 0x0560 /* Watchdog timer */ -#define EXC_REF_RCMI 0x0580 -#define EXC_REF_ROVI 0x05a0 -#define EXC_UDI 0x0600 /* Hitachi UDI */ -#define EXC_GPIO_GPIOI 0x0620 -#define EXC_DMAC_DMTE0 0x0640 -#define EXC_DMAC_DMTE1 0x0660 -#define EXC_DMAC_DMTE2 0x0680 -#define EXC_DMAC_DMTE3 0x06a0 -#define EXC_DMA_DMAE 0x06c0 -#define EXC_SCIF_ERI 0x0700 /* SCIF Error receive */ -#define EXC_SCIF_RXI 0x0720 -#define EXC_SCIF_BRI 0x0740 -#define EXC_SCIF_TXI 0x0760 +/** \defgroup irq_reexec_codes Re-Execution type -/* This is a software-generated one (double-fault) for when an exception - happens inside an ISR. */ + These exceptions will stop the currently processing instruction, and + transition into exception processing. After handling the exception (assuming + that it can be handled by the code), the offending instruction will be + re-executed from the start. + + @{ +*/ +#define EXC_USER_BREAK_PRE 0x01e0 /**< \brief User break before instruction */ +#define EXC_INSTR_ADDRESS 0x00e0 /**< \brief Instruction address */ +#define EXC_ITLB_MISS 0x0040 /**< \brief Instruction TLB miss */ +#define EXC_ITLB_PV 0x00a0 /**< \brief Instruction TLB protection violation */ +#define EXC_ILLEGAL_INSTR 0x0180 /**< \brief Illegal instruction */ +#define EXC_SLOT_ILLEGAL_INSTR 0x01a0 /**< \brief Slot illegal instruction */ +#define EXC_GENERAL_FPU 0x0800 /**< \brief General FPU exception */ +#define EXC_SLOT_FPU 0x0820 /**< \brief Slot FPU exception */ +#define EXC_DATA_ADDRESS_READ 0x00e0 /**< \brief Data address (read) */ +#define EXC_DATA_ADDRESS_WRITE 0x0100 /**< \brief Data address (write) */ +#define EXC_DTLB_MISS_READ 0x0040 /**< \brief Data TLB miss (read) */ +#define EXC_DTLB_MISS_WRITE 0x0060 /**< \brief Data TLB miss (write) */ +#define EXC_DTLB_PV_READ 0x00a0 /**< \brief Data TLB protection violation (read) */ +#define EXC_DTLB_PV_WRITE 0x00c0 /**< \brief Data TLB protection violation (write) */ +#define EXC_FPU 0x0120 /**< \brief FPU exception */ +#define EXC_INITIAL_PAGE_WRITE 0x0080 /**< \brief Initial page write exception */ +/** @} */ + +/** \defgroup irq_completion_codes Completion type + + These exceptions are actually handled in-between instructions, allowing the + instruction that causes them to finish completely. The saved PC thus is the + value of the next instruction. + + @{ +*/ +#define EXC_TRAPA 0x0160 /**< \brief Unconditional trap (trapa) */ +#define EXC_USER_BREAK_POST 0x01e0 /**< \brief User break after instruction */ +/** @} */ + +/** \defgroup irq_interrupt_codes Interrupt (completion type) + + These exceptions are caused by interrupt requests. These generally are from + peripheral devices, but NMIs, timer interrupts, and DMAC interrupts are also + included here. + + \note Not all of these have any meaning on the Dreamcast. Those that have + no meaning are only included for completeness. + @{ +*/ +#define EXC_NMI 0x01c0 /**< \brief Nonmaskable interrupt */ +#define EXC_IRQ0 0x0200 /**< \brief External IRQ request (level 0) */ +#define EXC_IRQ1 0x0220 /**< \brief External IRQ request (level 1) */ +#define EXC_IRQ2 0x0240 /**< \brief External IRQ request (level 2) */ +#define EXC_IRQ3 0x0260 /**< \brief External IRQ request (level 3) */ +#define EXC_IRQ4 0x0280 /**< \brief External IRQ request (level 4) */ +#define EXC_IRQ5 0x02a0 /**< \brief External IRQ request (level 5) */ +#define EXC_IRQ6 0x02c0 /**< \brief External IRQ request (level 6) */ +#define EXC_IRQ7 0x02e0 /**< \brief External IRQ request (level 7) */ +#define EXC_IRQ8 0x0300 /**< \brief External IRQ request (level 8) */ +#define EXC_IRQ9 0x0320 /**< \brief External IRQ request (level 9) */ +#define EXC_IRQA 0x0340 /**< \brief External IRQ request (level 10) */ +#define EXC_IRQB 0x0360 /**< \brief External IRQ request (level 11) */ +#define EXC_IRQC 0x0380 /**< \brief External IRQ request (level 12) */ +#define EXC_IRQD 0x03a0 /**< \brief External IRQ request (level 13) */ +#define EXC_IRQE 0x03c0 /**< \brief External IRQ request (level 14) */ +#define EXC_TMU0_TUNI0 0x0400 /**< \brief TMU0 underflow */ +#define EXC_TMU1_TUNI1 0x0420 /**< \brief TMU1 underflow */ +#define EXC_TMU2_TUNI2 0x0440 /**< \brief TMU2 underflow */ +#define EXC_TMU2_TICPI2 0x0460 /**< \brief TMU2 input capture */ +#define EXC_RTC_ATI 0x0480 /**< \brief RTC alarm interrupt */ +#define EXC_RTC_PRI 0x04a0 /**< \brief RTC periodic interrupt */ +#define EXC_RTC_CUI 0x04c0 /**< \brief RTC carry interrupt */ +#define EXC_SCI_ERI 0x04e0 /**< \brief SCI Error receive */ +#define EXC_SCI_RXI 0x0500 /**< \brief SCI Receive ready */ +#define EXC_SCI_TXI 0x0520 /**< \brief SCI Transmit ready */ +#define EXC_SCI_TEI 0x0540 /**< \brief SCI Transmit error */ +#define EXC_WDT_ITI 0x0560 /**< \brief Watchdog timer */ +#define EXC_REF_RCMI 0x0580 /**< \brief Memory refresh compare-match interrupt */ +#define EXC_REF_ROVI 0x05a0 /**< \brief Memory refresh counter overflow interrupt */ +#define EXC_UDI 0x0600 /**< \brief Hitachi UDI */ +#define EXC_GPIO_GPIOI 0x0620 /**< \brief I/O port interrupt */ +#define EXC_DMAC_DMTE0 0x0640 /**< \brief DMAC transfer end (channel 0) */ +#define EXC_DMAC_DMTE1 0x0660 /**< \brief DMAC transfer end (channel 1) */ +#define EXC_DMAC_DMTE2 0x0680 /**< \brief DMAC transfer end (channel 2) */ +#define EXC_DMAC_DMTE3 0x06a0 /**< \brief DMAC transfer end (channel 3) */ +#define EXC_DMA_DMAE 0x06c0 /**< \brief DMAC address error */ +#define EXC_SCIF_ERI 0x0700 /**< \brief SCIF Error receive */ +#define EXC_SCIF_RXI 0x0720 /**< \brief SCIF Receive ready */ +#define EXC_SCIF_BRI 0x0740 /**< \brief SCIF break */ +#define EXC_SCIF_TXI 0x0760 /**< \brief SCIF Transmit ready */ +/** @} */ + +/** \brief Double fault + + This exception is completely done in software (not represented on the CPU at + all). Its used for when an exception occurs during an IRQ service routine. +*/ #define EXC_DOUBLE_FAULT 0x0ff0 -/* Software-generated for unhandled exception */ +/** \brief Unhandled exception + + This exception is a software-generated exception for a generic unhandled + exception. +*/ #define EXC_UNHANDLED_EXC 0x0fe0 +/** @} */ -/* The following are a table of "type offsets" (see the Hitachi PDF). - These are the 0x000, 0x100, 0x400, and 0x600 offsets. */ -#define EXC_OFFSET_000 0 -#define EXC_OFFSET_100 1 -#define EXC_OFFSET_400 2 -#define EXC_OFFSET_600 3 +/** \brief irq_type_offsets Exception type offsets -/* The value of the timer IRQ */ + The following are a table of "type offsets" (see the Hitachi PDF). These are + the 0x000, 0x100, 0x400, and 0x600 offsets. + + @{ +*/ +#define EXC_OFFSET_000 0 /**< \brief Offset 0x000 */ +#define EXC_OFFSET_100 1 /**< \brief Offset 0x100 */ +#define EXC_OFFSET_400 2 /**< \brief Offset 0x400 */ +#define EXC_OFFSET_600 3 /**< \brief Offset 0x600 */ +/** @} */ + +/** \brief The value of the timer IRQ */ #define TIMER_IRQ EXC_TMU0_TUNI0 -/* The type of an interrupt identifier */ +/** \brief The type of an interrupt identifier */ typedef uint32 irq_t; -/* The type of an IRQ handler */ +/** \brief The type of an IRQ handler + \param source The IRQ that caused the handler to be called. + \param context The CPU's context. +*/ typedef void (*irq_handler)(irq_t source, irq_context_t *context); -/* Are we inside an interrupt handler? */ +/** \brief Are we inside an interrupt handler? + \retval 1 If interrupt handling is in progress. + \retval 0 If normal processing is in progress. +*/ int irq_inside_int(); -/* Pretend like we just came in from an interrupt and force - a context switch back to the "current" context. Make sure - you've called irq_set_context()! */ +/** \brief Pretend like we just came in from an interrupt and force + a context switch back to the "current" context. + + Make sure you've called irq_set_context() before doing this! +*/ void irq_force_return(); -/* Set a handler, or remove a handler (see codes above) */ +/** \brief Set or remove an IRQ handler. + + Passing a NULL value for hnd will remove the current handler, if any. + + \param source The IRQ type to set the handler for + (see \ref irq_exception_codes). + \param hnd A pointer to a procedure to handle the exception. + \retval 0 On success. + \retval -1 If the source is invalid. +*/ int irq_set_handler(irq_t source, irq_handler hnd); -/* Get the address of the current handler */ +/** \brief Get the address of the current handler for the IRQ type. + \param source The IRQ type to look up. + \return A pointer to the procedure to handle the exception. +*/ irq_handler irq_get_handler(irq_t source); -/* Set or remove a trapa handler */ +/** \brief Set or remove a handler for a trapa code. + \param code The value passed to the trapa opcode. + \param hnd A pointer to the procedure to handle the trap. + \retval 0 On success. + \retval -1 If the code is invalid (greater than 0xFF). +*/ int trapa_set_handler(irq_t code, irq_handler hnd); -/* Set a global exception handler */ +/** \brief Set a global exception handler. + + This function sets a global catch-all handler for all exception types. + + \param hnd A pointer to the procedure to handle the exception. + \retval 0 On success (no error conditions defined). + \note The specific handler will still be called for the + exception if one is set. If not, setting one of + these will stop the unhandled exception error. +*/ int irq_set_global_handler(irq_handler hnd); -/* Get the global exception handler */ +/** \brief Get the global exception handler. + + \return The global exception handler set with + irq_set_global_handler(), or NULL if none is set. +*/ irq_handler irq_get_global_handler(); -/* Switch out contexts (for interrupt return) */ +/** \brief Switch out contexts (for interrupt return). + + This function will set the processor state that will be restored when the + exception returns. + + \param regbank The values of all registers to be restored. +*/ void irq_set_context(irq_context_t *regbank); -/* Return the current IRQ context */ +/** \brief Get the current IRQ context. + + This will fetch the processor context prior to the exception handling during + an IRQ service routine. + + \return The current IRQ context. +*/ irq_context_t *irq_get_context(); -/* Fill a newly allocated context block for usage with supervisor/kernel - or user mode. The given parameters will be passed to the called routine (up - to the architecture maximum). */ +/** \brief Fill a newly allocated context block for usage with supervisor + or user mode. + + The given parameters will be passed to the called routine (up to the + architecture maximum). For the Dreamcast, this maximum is 4. + + \param context The IRQ context to fill in. + \param stack_pointer The value to set in the stack pointer. + \param routine The address of the program counter for the context. + \param args Any arguments to set in the registers. This cannot + be NULL, and must have enough values to fill in up + to the architecture maximum. + \param usermode 1 to run the routine in user mode, 0 for supervisor. +*/ void irq_create_context(irq_context_t *context, uint32 stack_pointer, - uint32 routine, uint32 *args, int usermode); + uint32 routine, uint32 *args, int usermode); /* Enable/Disable interrupts */ -int irq_disable(); /* Will leave exceptions enabled */ -void irq_enable(); /* Enables all ints including external */ +/** \brief Disable interrupts. + + This function will disable interrupts, but will leave exceptions enabled. + + \return The state of IRQs before calling the function. This + can be used to restore this state later on with + irq_restore(). +*/ +int irq_disable(); + +/** \brief Enable all interrupts. + + This function will enable ALL interrupts, including external ones. +*/ +void irq_enable(); + +/** \brief Restore IRQ state. + + This function will restore the interrupt state to the value specified. This + should correspond to a value returned by irq_disable(). + + \param v The IRQ state to restore. This should be a value + returned by irq_disable(). +*/ void irq_restore(int v); -/* Init routine */ +/** \brief Initialize interrupts. + \retval 0 On success (no error conditions defined). +*/ int irq_init(); -/* Shutdown */ +/** \brief Shutdown interrupts, restoring the state to how it was before + irq_init() was called. +*/ void irq_shutdown(); __END_DECLS #endif /* __ARCH_IRQ_H */ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-15 04:24:17
|
Revision: 728 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=728&view=rev Author: ljsebald Date: 2011-05-15 04:24:11 +0000 (Sun, 15 May 2011) Log Message: ----------- Document a few little files that really don't have much content to them. Modified Paths: -------------- kos/include/sys/_pthread.h kos/include/sys/sched.h kos/include/sys/stdio.h Modified: kos/include/sys/_pthread.h =================================================================== --- kos/include/sys/_pthread.h 2011-05-15 04:14:16 UTC (rev 727) +++ kos/include/sys/_pthread.h 2011-05-15 04:24:11 UTC (rev 728) @@ -1,3 +1,9 @@ +/** \file sys/_pthread.h + \brief Basic sys/_pthread.h file for newlib. + + This file specifies a few things to make sure pthreads stuff compiles. +*/ + #ifndef __SYS__PTHREAD_H #define __SYS__PTHREAD_H @@ -2,3 +8,6 @@ // Make sure pthreads compile ok. +/** \brief POSIX threads supported (sorta) */ #define _POSIX_THREADS + +/** \brief POSIX timeouts supported (sorta) */ #define _POSIX_TIMEOUTS Modified: kos/include/sys/sched.h =================================================================== --- kos/include/sys/sched.h 2011-05-15 04:14:16 UTC (rev 727) +++ kos/include/sys/sched.h 2011-05-15 04:24:11 UTC (rev 728) @@ -1,3 +1,9 @@ +/** \file sys/sched.h + \brief Basic sys/sched.h file for newlib. + + This file specifies a few things to make sure pthreads stuff compiles. +*/ + #ifndef __SYS_SCHED_H #define __SYS_SCHED_H @@ -6,18 +12,18 @@ // These are copied from Newlib to make stuff compile as expected. -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 +#define SCHED_OTHER 0 /**< \brief Other scheduling */ +#define SCHED_FIFO 1 /**< \brief FIFO scheduling */ +#define SCHED_RR 2 /**< \brief Round-robin scheduling */ -/* Scheduling Parameters, P1003.1b-1993, p. 249 - NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. */ - +/** \brief Scheduling Parameters, P1003.1b-1993, p. 249. + \note Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. + \headerfile sys/sched.h +*/ struct sched_param { - int sched_priority; /* Process execution scheduling priority */ + int sched_priority; /**< \brief Process execution scheduling priority */ }; - // And all this maps pthread types to KOS types for pthread.h. #include <kos/thread.h> #include <kos/sem.h> @@ -27,27 +33,45 @@ #include <kos/once.h> // Missing structs we don't care about in this impl. +/** \brief POSIX mutex attributes. + + Not implemented in KOS. + + \headerfile sys/sched.h +*/ typedef struct { // Empty } pthread_mutexattr_t; +/** \brief POSIX condition variable attributes. + + Not implemented in KOS. + + \headerfile sys/sched.h +*/ typedef struct { // Empty } pthread_condattr_t; +/** \brief POSIX thread attributes. + + Not implemented in KOS. + + \headerfile sys/sched.h +*/ typedef struct { // Empty } pthread_attr_t; // Map over KOS types. The mutex/condvar maps have to be pointers // because we allow _INIT #defines to work. -typedef kthread_t * pthread_t; -typedef mutex_t * pthread_mutex_t; -typedef condvar_t * pthread_cond_t; +typedef kthread_t * pthread_t; /**< \brief POSIX thread type */ +typedef mutex_t * pthread_mutex_t; /**< \brief POSIX mutex type */ +typedef condvar_t * pthread_cond_t; /**< \brief POSIX condition type */ // These, on the other hand, map right over. -typedef kthread_once_t pthread_once_t; -typedef kthread_key_t pthread_key_t; +typedef kthread_once_t pthread_once_t; /**< \brief POSIX once control */ +typedef kthread_key_t pthread_key_t; /**< \brief POSIX thread data key */ __END_DECLS Modified: kos/include/sys/stdio.h =================================================================== --- kos/include/sys/stdio.h 2011-05-15 04:14:16 UTC (rev 727) +++ kos/include/sys/stdio.h 2011-05-15 04:24:11 UTC (rev 728) @@ -1,3 +1,10 @@ +/** \file sys/stdio.h + \brief Basic sys/stdio.h file from newlib. + + This file simply defines locking for files as no-ops if they aren't defined + already. +*/ + #ifndef _NEWLIB_STDIO_H #define _NEWLIB_STDIO_H @@ -6,10 +13,16 @@ /* Internal locking macros, used to protect stdio functions. In the general case, expand to nothing. */ #if !defined(_flockfile) +/** \brief No-op lock on a file + \param fp The file to lock. +*/ # define _flockfile(fp) #endif #if !defined(_funlockfile) +/** \brief No-op unlock a file + \param fp The file to unlock. +*/ # define _funlockfile(fp) #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-15 04:14:22
|
Revision: 727 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=727&view=rev Author: ljsebald Date: 2011-05-15 04:14:16 +0000 (Sun, 15 May 2011) Log Message: ----------- Document arch.h. Modified Paths: -------------- kos/kernel/arch/dreamcast/include/arch/arch.h Modified: kos/kernel/arch/dreamcast/include/arch/arch.h =================================================================== --- kos/kernel/arch/dreamcast/include/arch/arch.h 2011-05-15 03:31:15 UTC (rev 726) +++ kos/kernel/arch/dreamcast/include/arch/arch.h 2011-05-15 04:14:16 UTC (rev 727) @@ -1,10 +1,19 @@ /* KallistiOS ##version## arch/dreamcast/include/arch.h - (c)2001 Dan Potter + Copyright (C) 2001 Dan Potter */ +/** \file arch/arch.h + \brief Dreamcast architecture specific options. + + This file has various architecture specific options defined in it. Also, any + functions that start with arch_ are in here. + + \author Dan Potter +*/ + #ifndef __ARCH_ARCH_H #define __ARCH_ARCH_H @@ -13,122 +22,211 @@ #include <dc/video.h> -/* Page size info (for MMU) */ -#define PAGESIZE 4096 -#define PAGESIZE_BITS 12 -#define PAGEMASK (PAGESIZE - 1) +#define PAGESIZE 4096 /**< \brief Page size (for MMU) */ +#define PAGESIZE_BITS 12 /**< \brief Bits for page size */ +#define PAGEMASK (PAGESIZE - 1) /**< \brief Mask for page offset */ -/* Page count variable; in this case it's static, so we can - optimize this quite a bit. */ -#define page_count ((16*1024*1024 - 0x10000) / PAGESIZE) +/** \brief Page count "variable". -/* Base address of available physical pages */ -#define page_phys_base 0x8c010000 + The number of pages is static, so we can optimize this quite a bit. */ +#define page_count ((16*1024*1024 - 0x10000) / PAGESIZE) -/* Number of timer ticks per second */ -#define HZ 100 +/** \brief Base address of available physical pages. */ +#define page_phys_base 0x8c010000 -/* Default thread stack size */ -#define THD_STACK_SIZE 8192 +/** \brief Number of timer ticks per second. */ +#define HZ 100 -/* Default video mode */ -#define DEFAULT_VID_MODE DM_640x480 -#define DEFAULT_PIXEL_MODE PM_RGB565 +/** \brief Default thread stack size. */ +#define THD_STACK_SIZE 8192 -/* Default serial parameters */ -#define DEFAULT_SERIAL_BAUD 57600 -#define DEFAULT_SERIAL_FIFO 1 +/** \brief Default video mode. */ +#define DEFAULT_VID_MODE DM_640x480 -/* Do we need symbol prefixes? */ -#define ELF_SYM_PREFIX "_" -#define ELF_SYM_PREFIX_LEN 1 +/** \brief Default pixel mode for video. */ +#define DEFAULT_PIXEL_MODE PM_RGB565 -/* Panic function */ +/** \brief Default serial bitrate. */ +#define DEFAULT_SERIAL_BAUD 57600 + +/** \brief Default serial FIFO behavior. */ +#define DEFAULT_SERIAL_FIFO 1 + +/** \brief Global symbol prefix in ELF files. */ +#define ELF_SYM_PREFIX "_" + +/** \brief Length of global symbol prefix in ELF files. */ +#define ELF_SYM_PREFIX_LEN 1 + +/** \brief Panic function. + + This function will cause a kernel panic, printing the specified message. + + \param str The error message to print. + \note This function will never return! +*/ void panic(const char *str) __noreturn; -/* Prototype for the portable kernel main() */ -int kernel_main(const char *args); - -/* Kernel C-level entry point */ +/** \brief Kernel C-level entry point. + \return The program's return value. +*/ int arch_main(); -/* Potential exit paths from the kernel on arch_exit() */ -#define ARCH_EXIT_RETURN 1 -#define ARCH_EXIT_MENU 2 -#define ARCH_EXIT_REBOOT 3 +/** \defgroup arch_retpaths Potential exit paths from the kernel on + arch_exit() -/* Set the exit path (default is RETURN) */ + @{ +*/ +#define ARCH_EXIT_RETURN 1 /**< \brief Return to loader */ +#define ARCH_EXIT_MENU 2 /**< \brief Return to system menu */ +#define ARCH_EXIT_REBOOT 3 /**< \brief Reboot the machine */ +/** @} */ + +/** \brief Set the exit path. + + The default, if you don't call this, is ARCH_EXIT_RETURN. + + \param path What arch_exit() should do. + \see arch_retpaths +*/ void arch_set_exit_path(int path); -/* Generic kernel "exit" point */ +/** \brief Generic kernel "exit" point. + \note This function will never return! +*/ void arch_exit() __noreturn; -/* Kernel "return" point */ +/** \brief Kernel "return" point. + \note This function will never return! +*/ void arch_return() __noreturn; -/* Kernel "abort" point */ +/** \brief Kernel "abort" point. + \note This function will never return! +*/ void arch_abort() __noreturn; -/* Kernel "reboot" call */ +/** \brief Kernel "reboot" call. + \note This function will never return! +*/ void arch_reboot() __noreturn; -/* Kernel "exit to menu" call */ +/** \brief Kernel "exit to menu" call. + \note This function will never return! +*/ void arch_menu() __noreturn; -/* Call to run all ctors / dtors */ +/** \brief Call to run all ctors. */ void arch_ctors(); + +/** \brief Call to run all dtors. */ void arch_dtors(); -/* Hook to ensure linking of crtend.c */ +/** \brief Hook to ensure linking of crtend.c. */ void __crtend_pullin(); /* These are in mm.c */ +/** \brief Initialize the memory management system. + \retval 0 On success (no error conditions defined). +*/ int mm_init(); + +/** \brief Request more core memory from the system. + \param increment The number of bytes requested. + \return A pointer to the memory. + \note This function will panic if no memory is available. +*/ void * mm_sbrk(unsigned long increment); -/* Use this macro to determine the level of initialization you'd like in - your program by default. The defaults line will be fine for most things. */ +/** \brief Use this macro to determine the level of initialization you'd like + in your program by default. + + The defaults line will be fine for most things. + + \param flags Parts of KOS to init. +*/ #define KOS_INIT_FLAGS(flags) uint32 __kos_init_flags = (flags) +/** \brief The init flags. Do not modify this directly! */ extern uint32 __kos_init_flags; -/* Defaults */ -#define INIT_DEFAULT \ - (INIT_IRQ | INIT_THD_PREEMPT) - -/* Define a romdisk for your program, if you'd like one */ +/** \brief Define a romdisk for your program, if you'd like one. + \param rd Pointer to the romdisk image in your code. +*/ #define KOS_INIT_ROMDISK(rd) void * __kos_romdisk = (rd) +/** \brief Built-in romdisk. Do not modify this directly! */ extern void * __kos_romdisk; -/* State that you don't want a romdisk */ +/** \brief State that you don't want a romdisk. */ #define KOS_INIT_ROMDISK_NONE NULL -/* Constants for the above */ -#define INIT_NONE 0x0000 /* Kernel enables */ -#define INIT_IRQ 0x0001 -#define INIT_THD_PREEMPT 0x0002 -#define INIT_NET 0x0004 -#define INIT_MALLOCSTATS 0x0008 -#define INIT_QUIET 0x0010 +/** \defgroup arch_initflags Available flags for initialization + These are the flags you can specify with KOS_INIT_FLAGS(). + @{ +*/ +/** \brief Default init flags (IRQs on, preemption enabled). */ +#define INIT_DEFAULT \ + (INIT_IRQ | INIT_THD_PREEMPT) + +#define INIT_NONE 0x0000 /**< \brief Don't init optional things */ +#define INIT_IRQ 0x0001 /**< \brief Enable IRQs at startup */ +#define INIT_THD_PREEMPT 0x0002 /**< \brief Enable thread preemption */ +#define INIT_NET 0x0004 /**< \brief Enable built-in networking */ +#define INIT_MALLOCSTATS 0x0008 /**< \brief Enable malloc statistics */ +#define INIT_QUIET 0x0010 /**< \brief Disable dbgio */ + /* DC-specific stuff */ -#define INIT_OCRAM 0x10000 -#define INIT_NO_DCLOAD 0x20000 +#define INIT_OCRAM 0x10000 /**< \brief Use half of the dcache as RAM */ +#define INIT_NO_DCLOAD 0x20000 /**< \brief Disable dcload */ +/** @} */ /* Dreamcast-specific arch init things */ +/** \brief Jump back to the bootloader. + + You generally shouldn't use this function, but rather use arch_exit() or + exit() instead. + + \note This function will never return! +*/ void arch_real_exit() __noreturn; + +/** \brief Initialize bare-bones hardware systems. + + This will be done automatically for you on start by the default arch_main(), + so you shouldn't have to deal with this yourself. + + \retval 0 On success (no error conditions defined). +*/ int hardware_sys_init(); + +/** \brief Initialize some peripheral systems. + + This will be done automatically for you on start by the default arch_main(), + so you shouldn't have to deal with this yourself. + + \retval 0 On success (no error conditions defined). +*/ int hardware_periph_init(); + +/** \brief Shut down hardware that was initted. + + This function will shut down anything initted with hardware_sys_init() and + hardware_periph_init(). This will be done for you automatically by the + various exit points, so you shouldn't have to do this yourself. +*/ void hardware_shutdown(); -void syscall_init(); -/* Dreamcast specific sleep mode function */ +/** \brief Dreamcast specific sleep mode "function". */ #define arch_sleep() do { \ __asm__ __volatile__("sleep"); \ } while(0) -/* DC specific function to get the return address from the current function */ +/** \brief DC specific "function" to get the return address from the current + function. + \return The return address of the current function. +*/ #define arch_get_ret_addr() ({ \ uint32 pr; \ __asm__ __volatile__("sts pr,%0\n" \ @@ -141,7 +239,11 @@ valid if you have compiled your code WITHOUT -fomit-frame-pointer. These are mainly useful for getting a stack trace from an error. */ -/* DC specific function to get the frame pointer from the current function */ +/** \brief DC specific "function" to get the frame pointer from the current + function. + \return The frame pointer from the current function. + \note This only works if you don't disable frame pointers. +*/ #define arch_get_fptr() ({ \ uint32 fp; \ __asm__ __volatile__("mov r14,%0\n" \ @@ -150,14 +252,28 @@ : "memory" ); \ fp; }) -/* Pass in a frame pointer value to get the return address for the given frame */ +/** \brief Pass in a frame pointer value to get the return address for the + given frame. + + \param fptr The frame pointer to look at. + \return The return address of the pointer. +*/ #define arch_fptr_ret_addr(fptr) (*((uint32*)fptr)) -/* Pass in a frame pointer value to get the previous frame pointer for the given frame */ +/** \brief Pass in a frame pointer value to get the previous frame pointer for + the given frame. + + \param fptr The frame pointer to look at. + \return The previous frame pointer. +*/ #define arch_fptr_next(fptr) (*((uint32*)(fptr+4))) -/* Returns true if the passed address is likely to be valid. Doesn't - have to be exact, just a sort of general idea. */ +/** \brief Returns true if the passed address is likely to be valid. Doesn't + have to be exact, just a sort of general idea. + + \return Whether the address is valid or not for normal + memory access. +*/ #define arch_valid_address(ptr) ((ptr_t)(ptr) >= 0x8c010000 && (ptr_t)(ptr) < 0x8d000000) __END_DECLS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-15 03:31:22
|
Revision: 726 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=726&view=rev Author: ljsebald Date: 2011-05-15 03:31:15 +0000 (Sun, 15 May 2011) Log Message: ----------- Document asic.h and make a few asic-related internal functions actually static. Modified Paths: -------------- kos/kernel/arch/dreamcast/hardware/asic.c kos/kernel/arch/dreamcast/include/dc/asic.h Modified: kos/kernel/arch/dreamcast/hardware/asic.c =================================================================== --- kos/kernel/arch/dreamcast/hardware/asic.c 2011-05-14 17:16:44 UTC (rev 725) +++ kos/kernel/arch/dreamcast/hardware/asic.c 2011-05-15 03:31:15 UTC (rev 726) @@ -183,7 +183,7 @@ } /* Initialize events */ -void asic_evt_init() { +static void asic_evt_init() { /* Clear any pending interrupts and disable all events */ asic_evt_disable_all(); ASIC_ACK_A = 0xffffffff; @@ -200,7 +200,7 @@ } /* Shutdown events */ -void asic_evt_shutdown() { +static void asic_evt_shutdown() { /* Disable all events */ asic_evt_disable_all(); @@ -219,8 +219,3 @@ void asic_shutdown() { asic_evt_shutdown(); } - - - - - Modified: kos/kernel/arch/dreamcast/include/dc/asic.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/asic.h 2011-05-14 17:16:44 UTC (rev 725) +++ kos/kernel/arch/dreamcast/include/dc/asic.h 2011-05-15 03:31:15 UTC (rev 726) @@ -1,10 +1,23 @@ /* KallistiOS ##version## dc/asic.h - (c)2001-2002 Dan Potter + Copyright (C) 2001-2002 Dan Potter */ +/** \file dc/asic.h + \brief Dreamcast ASIC event handling support. + + This file provides definitions of the events that the ASIC (a part of the + PVR) in the Dreamcast can trigger as IRQs, and ways to set responders for + those events. Pretty much, this covers all IRQs that aren't generated + internally in the SH4 (SCIF and the SH4 DMAC can generate their own IRQs, + as well as the trapa instruction, and various exceptions -- those are not + dealt with here). + + \author Dan Potter +*/ + #ifndef __DC_ASIC_H #define __DC_ASIC_H @@ -18,85 +31,174 @@ register to check is 0xa05f6900+4*regnum. The bottom integer is the bit index within that register. */ -/* Event codes for the PVR chip */ -#define ASIC_EVT_PVR_RENDERDONE 0x0002 /* Render completed */ -#define ASIC_EVT_PVR_SCANINT1 0x0003 /* Scanline interrupt 1 */ -#define ASIC_EVT_PVR_SCANINT2 0x0004 /* Scanline interrupt 2 */ -#define ASIC_EVT_PVR_VBLINT 0x0005 /* VBL interrupt */ -#define ASIC_EVT_PVR_OPAQUEDONE 0x0007 /* Opaque list completed */ -#define ASIC_EVT_PVR_OPAQUEMODDONE 0x0008 /* Opaque modifiers completed */ -#define ASIC_EVT_PVR_TRANSDONE 0x0009 /* Transparent list completed */ -#define ASIC_EVT_PVR_TRANSMODDONE 0x000a /* Transparent modifiers completed */ -#define ASIC_EVT_PVR_DMA 0x0013 /* PVR DMA complete */ -#define ASIC_EVT_PVR_PTDONE 0x0015 /* Punch-thrus completed */ -#define ASIC_EVT_PVR_PRIMOUTOFMEM 0x0202 /* Out of primitive memory */ -#define ASIC_EVT_PVR_MATOUTOFMEM 0x0203 /* Out of matrix memory */ +/** \defgroup asic_events ASIC event codes + @{ +*/ -/* Event codes for the GD controller */ -#define ASIC_EVT_GD_COMMAND 0x0100 /* GD-Rom Command Status */ -#define ASIC_EVT_GD_DMA 0x000e /* GD-Rom DMA complete */ -#define ASIC_EVT_GD_DMA_OVERRUN 0x020d /* GD-Rom DMA overrun */ -#define ASIC_EVT_GD_DMA_ILLADDR 0x020c /* GD-Rom DMA illegal address */ +/** \defgroup asic_pvr_evts Event codes for the PVR chip -/* Event codes for the Maple controller */ -#define ASIC_EVT_MAPLE_DMA 0x000c /* Maple DMA complete */ -#define ASIC_EVT_MAPLE_ERROR 0x000d /* Maple error (?) */ + These are events that the PVR itself generates that can be hooked. + @{ +*/ +#define ASIC_EVT_PVR_RENDERDONE 0x0002 /**< \brief Render completed */ +#define ASIC_EVT_PVR_SCANINT1 0x0003 /**< \brief Scanline interrupt 1 */ +#define ASIC_EVT_PVR_SCANINT2 0x0004 /**< \brief Scanline interrupt 2 */ +#define ASIC_EVT_PVR_VBLINT 0x0005 /**< \brief VBL interrupt */ +#define ASIC_EVT_PVR_OPAQUEDONE 0x0007 /**< \brief Opaque list completed */ +#define ASIC_EVT_PVR_OPAQUEMODDONE 0x0008 /**< \brief Opaque modifiers completed */ +#define ASIC_EVT_PVR_TRANSDONE 0x0009 /**< \brief Transparent list completed */ +#define ASIC_EVT_PVR_TRANSMODDONE 0x000a /**< \brief Transparent modifiers completed */ +#define ASIC_EVT_PVR_DMA 0x0013 /**< \brief PVR DMA complete */ +#define ASIC_EVT_PVR_PTDONE 0x0015 /**< \brief Punch-thrus completed */ +#define ASIC_EVT_PVR_PRIMOUTOFMEM 0x0202 /**< \brief Out of primitive memory */ +#define ASIC_EVT_PVR_MATOUTOFMEM 0x0203 /**< \brief Out of matrix memory */ +/** @} */ -/* Event codes for the SPU */ -#define ASIC_EVT_SPU_DMA 0x000f /* SPU (G2 chnl 0) DMA complete */ -#define ASIC_EVT_SPU_IRQ 0x0101 /* SPU interrupt */ +/** \defgroup asic_gd_evts Event codes for the GD controller -/* Event codes for G2 bus DMA */ -#define ASIC_EVT_G2_DMA0 0x000f /* G2 DMA chnl 0 complete */ -#define ASIC_EVT_G2_DMA1 0x0010 /* G2 DMA chnl 1 complete */ -#define ASIC_EVT_G2_DMA2 0x0011 /* G2 DMA chnl 2 complete */ -#define ASIC_EVT_G2_DMA3 0x0012 /* G2 DMA chnl 3 complete */ + These are events that the GD-ROM drive generates that can be hooked. + @{ +*/ +#define ASIC_EVT_GD_COMMAND 0x0100 /**< \brief GD-Rom Command Status */ +#define ASIC_EVT_GD_DMA 0x000e /**< \brief GD-Rom DMA complete */ +#define ASIC_EVT_GD_DMA_OVERRUN 0x020d /**< \brief GD-Rom DMA overrun */ +#define ASIC_EVT_GD_DMA_ILLADDR 0x020c /**< \brief GD-Rom DMA illegal address */ +/** @} */ -/* Event codes for the external port */ -#define ASIC_EVT_EXP_8BIT 0x0102 /* Modem / Lan Adapter */ -#define ASIC_EVT_EXP_PCI 0x0103 /* BBA IRQ */ +/** \defgroup asic_maple_evts Event codes for the Maple controller -/* ASIC registers */ -#define ASIC_IRQD_A (*(vuint32*)0xa05f6910) -#define ASIC_IRQD_B (*(vuint32*)0xa05f6914) -#define ASIC_IRQD_C (*(vuint32*)0xa05f6918) -#define ASIC_IRQB_A (*(vuint32*)0xa05f6920) -#define ASIC_IRQB_B (*(vuint32*)0xa05f6924) -#define ASIC_IRQB_C (*(vuint32*)0xa05f6928) -#define ASIC_IRQ9_A (*(vuint32*)0xa05f6930) -#define ASIC_IRQ9_B (*(vuint32*)0xa05f6934) -#define ASIC_IRQ9_C (*(vuint32*)0xa05f6938) + These are events that Maple generates that can be hooked. + @{ +*/ +#define ASIC_EVT_MAPLE_DMA 0x000c /**< \brief Maple DMA complete */ +#define ASIC_EVT_MAPLE_ERROR 0x000d /**< \brief Maple error (?) */ +/** @} */ -#define ASIC_ACK_A (*(vuint32*)0xa05f6900) -#define ASIC_ACK_B (*(vuint32*)0xa05f6904) -#define ASIC_ACK_C (*(vuint32*)0xa05f6908) +/** \defgroup asic_spu_evts Event codes for the SPU -/* ASIC IRQ priorities (pick one at hook time, or don't choose anything and - we'll choose a default) */ -#define ASIC_IRQ9 1 -#define ASIC_IRQB 2 -#define ASIC_IRQD 3 -#define ASIC_IRQ_DEFAULT 0 + These are events that the SPU (AICA) generates that can be hooked. + @{ +*/ +#define ASIC_EVT_SPU_DMA 0x000f /**< \brief SPU (G2 channel 0) DMA complete */ +#define ASIC_EVT_SPU_IRQ 0x0101 /**< \brief SPU interrupt */ +/** @} */ -/* The type of a ASIC event handler */ +/** \defgroup asic_g2dma_evts Event codes for G2 bus DMA + + These are events that G2 bus DMA generates that can be hooked. + @{ +*/ +#define ASIC_EVT_G2_DMA0 0x000f /**< \brief G2 DMA channel 0 complete */ +#define ASIC_EVT_G2_DMA1 0x0010 /**< \brief G2 DMA channel 1 complete */ +#define ASIC_EVT_G2_DMA2 0x0011 /**< \brief G2 DMA channel 2 complete */ +#define ASIC_EVT_G2_DMA3 0x0012 /**< \brief G2 DMA channel 3 complete */ +/** @} */ + +/** \defgroup asic_ext_evts Event codes for the external port + + These are events that external devices generate that can be hooked. + @{ +*/ +#define ASIC_EVT_EXP_8BIT 0x0102 /**< \brief Modem / Lan Adapter */ +#define ASIC_EVT_EXP_PCI 0x0103 /**< \brief BBA IRQ */ +/** @} + @} */ + +/** \defgroup asic_regs ASIC registers + + These are the locations in memory where the ASIC registers sit. + @{ +*/ +#define ASIC_IRQD_A (*(vuint32*)0xa05f6910) /**< \brief IRQD first register */ +#define ASIC_IRQD_B (*(vuint32*)0xa05f6914) /**< \brief IRQD second register */ +#define ASIC_IRQD_C (*(vuint32*)0xa05f6918) /**< \brief IRQD third register */ +#define ASIC_IRQB_A (*(vuint32*)0xa05f6920) /**< \brief IRQB first register */ +#define ASIC_IRQB_B (*(vuint32*)0xa05f6924) /**< \brief IRQB second register */ +#define ASIC_IRQB_C (*(vuint32*)0xa05f6928) /**< \brief IRQB third register */ +#define ASIC_IRQ9_A (*(vuint32*)0xa05f6930) /**< \brief IRQ9 first register */ +#define ASIC_IRQ9_B (*(vuint32*)0xa05f6934) /**< \brief IRQ9 second register */ +#define ASIC_IRQ9_C (*(vuint32*)0xa05f6938) /**< \brief IRQ9 third register */ + +#define ASIC_ACK_A (*(vuint32*)0xa05f6900) /**< \brief IRQD ACK register */ +#define ASIC_ACK_B (*(vuint32*)0xa05f6904) /**< \brief IRQB ACK register */ +#define ASIC_ACK_C (*(vuint32*)0xa05f6908) /**< \brief IRQ9 ACK register */ +/** @} */ + +/** \defgroup asic_irq_lv ASIC IRQ levels + + You can pick one at hook time, or don't choose anything and the default will + be used instead. + @{ +*/ +#define ASIC_IRQ9 1 /**< \brief IRQ level 9 */ +#define ASIC_IRQB 2 /**< \brief IRQ level B (11) */ +#define ASIC_IRQD 3 /**< \brief IRQ level D (13) */ +#define ASIC_IRQ_DEFAULT 0 /**< \brief Pick an IRQ level for me! */ +/** @} */ + +/** \brief ASIC event handler type. + + Any event handlers registered must be of this type. These will be run in an + interrupt context, so don't try anything funny. + + \param code The ASIC event code that generated this event. + \see asic_events +*/ typedef void (*asic_evt_handler)(uint32 code); -/* Set a handler, or remove a handler (see codes above); handler - functions have one parameter, which is the exception code. */ +/** \brief Set or remove an ASIC handler. + + This function will register an event handler for a given event code, or if + the handler is NULL, unregister any that is currently registered. + + \param code The ASIC event code to hook (see \ref asic_events). + \param handler The function to call when the event happens. + \retval 0 On success. + \retval -1 If an invalid code is specified. +*/ int asic_evt_set_handler(uint32 code, asic_evt_handler handler); -/* Enable/Disable ASIC events; only enable a given event on one irqlevel! */ +/** \brief Disable all ASIC events. + + This function will disable hooks for every event that has been hooked. In + order to reinstate them, you must individually re-enable them. Not a very + good idea to be doing this normally. +*/ void asic_evt_disable_all(); + +/** \brief Disable one ASIC event. + + This function will disable the hook for a specified code that was registered + at the given IRQ level. Generally, you will never have to do this yourself + unless you're adding in some new functionality. + + \param code The ASIC event code to unhook (see + \ref asic_events). + \param irqlevel The IRQ level it was hooked on (see + \ref asic_irq_lv). +*/ void asic_evt_disable(uint32 code, int irqlevel); + +/** \brief Enable an ASIC event. + + This function will enable the hook for a specified code and register it at + the given IRQ level. You should only register each event at a max of one + IRQ level (this will not check that for you), and this does not actually set + the hook function for the event, you must do that separately with + asic_evt_set_handler(). Generally, unless you're adding in new + functionality, you'll never have to do this. + + \param code The ASIC event code to hook (see \ref asic_events). + \param irqlevel The IRQ level to hook on (see \ref asic_irq_lv). + */ void asic_evt_enable(uint32 code, int irqlevel); -/* Init routine */ +/** \brief Init ASIC events. */ void asic_init(); -/* Shutdown */ +/** \brief Shutdown ASIC events, disabling all hooks. */ void asic_shutdown(); __END_DECLS #endif /* __DC_ASIC_H */ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-14 17:16:50
|
Revision: 725 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=725&view=rev Author: ljsebald Date: 2011-05-14 17:16:44 +0000 (Sat, 14 May 2011) Log Message: ----------- Clean up the cdrom.h documentation a bit, and rename set_sector_size() to cdrom_set_sector_size() for consistency. Modified Paths: -------------- kos/kernel/arch/dreamcast/hardware/cdrom.c kos/kernel/arch/dreamcast/include/dc/cdrom.h Modified: kos/kernel/arch/dreamcast/hardware/cdrom.c =================================================================== --- kos/kernel/arch/dreamcast/hardware/cdrom.c 2011-05-14 04:09:12 UTC (rev 724) +++ kos/kernel/arch/dreamcast/hardware/cdrom.c 2011-05-14 17:16:44 UTC (rev 725) @@ -73,7 +73,7 @@ static mutex_t * mutex = NULL; static int sector_size = 2048; /*default 2048, 2352 for raw data reading*/ -void set_sector_size (int size) { +void cdrom_set_sector_size(int size) { sector_size = size; cdrom_reinit(); } Modified: kos/kernel/arch/dreamcast/include/dc/cdrom.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/cdrom.h 2011-05-14 04:09:12 UTC (rev 724) +++ kos/kernel/arch/dreamcast/include/dc/cdrom.h 2011-05-14 17:16:44 UTC (rev 725) @@ -13,185 +13,277 @@ #include <arch/types.h> -/** - \file dc/cdrom.h - \brief cdrom access - \author Dan Potter +/** \file dc/cdrom.h + \brief CD access to the GD-ROM drive. + + This file contains the interface to the Dreamcast's GD-ROM drive. It is + simply called cdrom.h and cdrom.c because, by design, you cannot directly + use this code to read the high-density area of GD-ROMs. This is the way it + always has been, and always will be. + + The way things are set up, as long as you're using fs_iso9660 to access the + CD, it will automatically detect and react to disc changes for you. + + This file only facilitates reading raw sectors and doing other fairly low- + level things with CDs. If you're looking for higher-level stuff, like normal + file reading, consult with the stuff for the fs and for fs_iso9660. + + \author Dan Potter + \see kos/fs.h + \see dc/fs_iso9660.h */ -/** \defgroup cmd_codes Command codes (thanks maiwe) - @{ +/** \defgroup cd_cmd_codes CD-ROM syscall command codes + + These are the syscall command codes used to actually do stuff with the + GD-ROM drive. These were originally provided by thanks maiwe. + + @{ */ -#define CMD_PIOREAD 16 -#define CMD_DMAREAD 17 -#define CMD_GETTOC 18 -#define CMD_GETTOC2 19 -#define CMD_PLAY 20 -#define CMD_PLAY2 21 -#define CMD_PAUSE 22 -#define CMD_RELEASE 23 -#define CMD_INIT 24 -#define CMD_SEEK 27 -#define CMD_READ 28 -#define CMD_STOP 33 -#define CMD_GETSCD 34 -#define CMD_GETSES 35 +#define CMD_PIOREAD 16 /**< \brief Read via PIO */ +#define CMD_DMAREAD 17 /**< \brief Read via DMA */ +#define CMD_GETTOC 18 /**< \brief Read TOC */ +#define CMD_GETTOC2 19 /**< \brief Read TOC */ +#define CMD_PLAY 20 /**< \brief Play track */ +#define CMD_PLAY2 21 /**< \brief Play sectors */ +#define CMD_PAUSE 22 /**< \brief Pause playback */ +#define CMD_RELEASE 23 /**< \brief Resume from pause */ +#define CMD_INIT 24 /**< \brief Initialize the drive */ +#define CMD_SEEK 27 /**< \brief Seek to a new position */ +#define CMD_READ 28 /**< \brief Read raw sectors */ +#define CMD_STOP 33 /**< \brief Stop the disc from spinning */ +#define CMD_GETSCD 34 /**< \brief Get subcode data */ +#define CMD_GETSES 35 /**< \brief Get session */ /** @} */ -/** \defgroup cmd_response Command responses - @{ +/** \defgroup cd_cmd_response CD-ROM command responses + + These are the values that the various functions can return as error codes. + @{ */ -#define ERR_OK 0 -#define ERR_NO_DISC 1 -#define ERR_DISC_CHG 2 -#define ERR_SYS 3 -#define ERR_ABORTED 4 -#define ERR_NO_ACTIVE 5 +#define ERR_OK 0 /**< \brief No error */ +#define ERR_NO_DISC 1 /**< \brief No disc in drive */ +#define ERR_DISC_CHG 2 /**< \brief Disc changed, but not reinitted yet */ +#define ERR_SYS 3 /**< \brief System error */ +#define ERR_ABORTED 4 /**< \brief Command aborted */ +#define ERR_NO_ACTIVE 5 /**< \brief System inactive? */ /** @} */ -/** \defgroup cmd_status_response Command Status responses - @{ +/** \defgroup cd_cmd_status CD-ROM Command Status responses + + These are the raw values the status syscall returns. + @{ */ -#define FAILED -1 -#define NO_ACTIVE 0 -#define PROCESSING 1 -#define COMPLETED 2 -#define ABORTED 3 +#define FAILED -1 /**< \brief Command failed */ +#define NO_ACTIVE 0 /**< \brief System inactive? */ +#define PROCESSING 1 /**< \brief Processing command */ +#define COMPLETED 2 /**< \brief Command completed successfully */ +#define ABORTED 3 /**< \brief Command aborted before completion */ /** @} */ -/** \defgroup cdda_read_modes CDDA Read Modes - @{ +/** \defgroup cdda_read_modes CDDA read modes + + Valid values to pass to the cdrom_cdda_play() function for the mode + parameter. + @{ */ -#define CDDA_TRACKS 1 -#define CDDA_SECTORS 2 +#define CDDA_TRACKS 1 /**< \brief Play by track number */ +#define CDDA_SECTORS 2 /**< \brief Play by sector number */ /** @} */ -/** \defgroup status_values Status values - @{ +/** \defgroup cd_status_values CD-ROM status values + + These are the values that can be returned as the status parameter from the + cdrom_get_status() function. + @{ */ -#define CD_STATUS_BUSY 0 -#define CD_STATUS_PAUSED 1 -#define CD_STATUS_STANDBY 2 -#define CD_STATUS_PLAYING 3 -#define CD_STATUS_SEEKING 4 -#define CD_STATUS_SCANNING 5 -#define CD_STATUS_OPEN 6 -#define CD_STATUS_NO_DISC 7 +#define CD_STATUS_BUSY 0 /**< \brief Drive is busy */ +#define CD_STATUS_PAUSED 1 /**< \brief Disc is paused */ +#define CD_STATUS_STANDBY 2 /**< \brief Drive is in standby */ +#define CD_STATUS_PLAYING 3 /**< \brief Drive is currently playing */ +#define CD_STATUS_SEEKING 4 /**< \brief Drive is currently seeking */ +#define CD_STATUS_SCANNING 5 /**< \brief Drive is scanning */ +#define CD_STATUS_OPEN 6 /**< \brief Disc tray is open */ +#define CD_STATUS_NO_DISC 7 /**< \brief No disc inserted */ /** @} */ -/** \defgroup disk_types Disk types - @{ +/** \defgroup cd_disc_types CD-ROM drive disc types + + These are the values that can be returned as the disc_type parameter from + the cdrom_get_status() function. + @{ */ -#define CD_CDDA 0 -#define CD_CDROM 0x10 -#define CD_CDROM_XA 0x20 -#define CD_CDI 0x30 -#define CD_GDROM 0x80 +#define CD_CDDA 0 /**< \brief Audio CD (Red book) */ +#define CD_CDROM 0x10 /**< \brief CD-ROM or CD-R (Yellow book) */ +#define CD_CDROM_XA 0x20 /**< \brief CD-ROM XA (Yellow book extension) */ +#define CD_CDI 0x30 /**< \brief CD-i (Green book) */ +#define CD_GDROM 0x80 /**< \brief GD-ROM */ /** @} */ -/** TOC structure returned by the BIOS */ +/** \brief TOC structure returned by the BIOS. + + This is the structure that the CMD_GETTOC2 syscall command will return for + the TOC. Note the data is in FAD, not LBA/LSN. + + \headerfile dc/cdrom.h +*/ typedef struct { - uint32 entry[99]; - uint32 first, last; - uint32 leadout_sector; + uint32 entry[99]; /**< \brief TOC space for 99 tracks */ + uint32 first; /**< \brief Point A0 information (1st track) */ + uint32 last; /**< \brief Point A1 information (last track) */ + uint32 leadout_sector; /**< \brief Point A2 information (leadout) */ } CDROM_TOC; -/** \defgroup toc_access TOC access macros - @{ +/** \defgroup cd_toc_access CD-ROM TOC access macros + @{ */ +/** \brief Get the FAD address of a TOC entry. + \param n The actual entry from the TOC to look at. + \return The FAD of the entry. +*/ #define TOC_LBA(n) ((n) & 0x00ffffff) + +/** \brief Get the address of a TOC entry. + \param n The entry from the TOC to look at. + \return The entry's address. +*/ #define TOC_ADR(n) ( ((n) & 0x0f000000) >> 24 ) + +/** \brief Get the control data of a TOC entry. + \param n The entry from the TOC to look at. + \return The entry's control value. +*/ #define TOC_CTRL(n) ( ((n) & 0xf0000000) >> 28 ) + +/** \brief Get the track number of a TOC entry. + \param n The entry from the TOC to look at. + \return The entry's track. +*/ #define TOC_TRACK(n) ( ((n) & 0x00ff0000) >> 16 ) /** @} */ -/** - \brief Sets the sector size +/** \brief Set the sector size for read sectors. - \param size The size of the sector you're desiring + This function sets the sector size that the cdrom_read_sectors() function + will return. Be sure to set this to the correct value for the type of + sectors you're trying to read. Common values are 2048 (for reading CD-ROM + sectors) or 2352 (for reading raw sectors). + + \param size The size of the sector data. */ -void set_sector_size (int size); +void cdrom_set_sector_size(int size); -/** - \brief Command execution sequence +/** \brief Execute a CD-ROM command. - \return \ref cmd_response + This function executes the specified command using the BIOS syscall for + executing GD-ROM commands. + + \param cmd The command number to execute. + \param param Data to pass to the syscall. + + \return \ref cd_cmd_response */ int cdrom_exec_cmd(int cmd, void *param); -/** - \brief Gets the status of the the cdrom - \return the status of the drive as two integers (see constants) +/** \brief Get the status of the GD-ROM drive. + + \param status Space to return the drive's status. + \param disc_type Space to return the type of disc in the drive. + + \return \ref cd_cmd_response + \see cd_status_values + \see cd_disc_types */ int cdrom_get_status(int *status, int *disc_type); -/** - \brief Re-init the drive, e.g., after a disc change, etc +/** \brief Re-initialize the GD-ROM drive. - \return \ref cmd_response + This function is for reinitializing the GD-ROM drive after a disc change, + or something of the like. + + \return \ref cd_cmd_response */ int cdrom_reinit(); -/** - \brief Read the table of contents +/** \brief Read the table of contents from the disc. - \return \ref cmd_response + This function reads the TOC from the specified session of the disc. + + \param toc_buffer Space to store the returned TOC in. + \param session The session of the disc to read. + \return \ref cd_cmd_response */ int cdrom_read_toc(CDROM_TOC *toc_buffer, int session); -/** - \brief Read one or more sector +/** \brief Read one or more sector from a CD-ROM. - \return \ref cmd_response + This function reads the specified number of sectors from the disc, starting + where requested. This will respect the size of the sectors set with + cdrom_set_sector_size(). The buffer must have enough space to store the + specified number of sectors. + + \param buffer Space to store the read sectors. + \param sector The sector to start reading from. + \param cnt The number of sectors to read. + \return \ref cd_cmd_response */ int cdrom_read_sectors(void *buffer, int sector, int cnt); -/** - \brief Locate the LBA sector of the data track +/** \brief Locate the sector of the data track. + + This function will search the toc for the first entry that has a CTRL value + of 4, and return its FAD address. + + \param toc The TOC to search through. + \return The FAD of the track, or 0 if none is found. */ uint32 cdrom_locate_data_track(CDROM_TOC *toc); -/** - \brief Play CDDA audio tracks or sectors +/** \brief Play CDDA audio tracks or sectors. - \return \ref cmd_response + This function starts playback of CDDA audio. + + \param start The track or sector to start playback from. + \param end The track or sector to end playback at. + \param loops The number of times to repeat (max of 15). + \param mode The mode to play (see \ref cdda_read_modes). + \return \ref cd_cmd_response */ int cdrom_cdda_play(uint32 start, uint32 end, uint32 loops, int mode); -/* - \brief Pause CDDA audio playback +/** \brief Pause CDDA audio playback. - \return \ref cmd_response + \return \ref cd_cmd_response */ int cdrom_cdda_pause(); -/** - \brief Resume CDDA audio playback +/** \brief Resume CDDA audio playback after a pause. - \return \ref cmd_response + \return \ref cd_cmd_response */ int cdrom_cdda_resume(); -/** - \brief Spin down the CD +/** \brief Spin down the CD. - \return \ref cmd_response + This stops the disc in the drive from spinning until it is accessed again. + + \return \ref cd_cmd_response */ int cdrom_spin_down(); -/** - \brief Initialize cdrom +/** \brief Initialize the GD-ROM for reading CDs. - \return -1 if cdrom_init has already been called, otherwise 0 + This initializes the CD-ROM reading system, reactivating the drive and + handling initial setup of the disc. + + \retval 0 On success. + \retval -1 If cdrom_init() has already been called. */ int cdrom_init(); -/** - \brief Shutdown cdrom -*/ +/** \brief Shutdown the CD reading system. */ void cdrom_shutdown(); __END_DECLS #endif /* __DC_CDROM_H */ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-14 04:09:18
|
Revision: 724 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=724&view=rev Author: ljsebald Date: 2011-05-14 04:09:12 +0000 (Sat, 14 May 2011) Log Message: ----------- Document most of g2bus.h, with the exception of the DMA stuff for now. Modified Paths: -------------- kos/kernel/arch/dreamcast/include/dc/g2bus.h Modified: kos/kernel/arch/dreamcast/include/dc/g2bus.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/g2bus.h 2011-05-11 17:59:52 UTC (rev 723) +++ kos/kernel/arch/dreamcast/include/dc/g2bus.h 2011-05-14 04:09:12 UTC (rev 724) @@ -5,6 +5,26 @@ */ +/** \file dc/g2bus.h + \brief G2 bus memory interface. + + This file provides low-level support for accessing devices on the G2 bus in + the Dreamcast. The G2 bus contains the AICA, as well as the expansion port. + Generally, you won't be dealing with things at this level, but rather on the + level of the device you're actually interested in working with. Most of the + expansion port devices (the modem, bba, and lan adapter) all have their own + drivers that work off of this functionality. + + The G2 bus is notoroiously picky about a lot of things. You have to be + careful to use the right access size for whatever you're working with. Also + you can't be doing PIO and DMA at the same time. Finally, there's a FIFO to + contend with when you're doing PIO stuff as well. Generally, G2 is a pain in + the rear, so you really do want to be using the higher-level stuff related + to each device if at all possible! + + \author Dan Potter +*/ + #ifndef __DC_G2BUS_H #define __DC_G2BUS_H @@ -56,47 +76,153 @@ g2_dma_callback_t callback, ptr_t cbdata, uint32 dir, uint32 mode, uint32 g2chn, uint32 sh4chn); -/* Read one byte from G2 */ +/** \brief Read one byte from G2. + + This function reads a single byte from the specified address, taking all + necessary precautions that are required for accessing G2. + + \param address The address in memory to read. + \return The byte read from the address specified. +*/ uint8 g2_read_8(uint32 address); -/* Write one byte to G2 */ +/** \brief Write a single byte to G2. + + This function writes one byte to the specified address, taking all the + necessary precautions to ensure your write actually succeeds. + + \param address The address in memory to write to. + \param value The value to write to that address. +*/ void g2_write_8(uint32 address, uint8 value); -/* Read one word from G2 */ +/** \brief Read one 16-bit word from G2. + + This function reads a single word from the specified address, taking all + necessary precautions that are required for accessing G2. + + \param address The address in memory to read. + \return The word read from the address specified. +*/ uint16 g2_read_16(uint32 address); -/* Write one word to G2 */ +/** \brief Write a 16-bit word to G2. + + This function writes one word to the specified address, taking all the + necessary precautions to ensure your write actually succeeds. + + \param address The address in memory to write to. + \param value The value to write to that address. +*/ void g2_write_16(uint32 address, uint16 value); -/* Read one dword from G2 */ +/** \brief Read one 32-bit dword from G2. + + This function reads a single dword from the specified address, taking all + necessary precautions that are required for accessing G2. + + \param address The address in memory to read. + \return The dword read from the address specified. +*/ uint32 g2_read_32(uint32 address); -/* Write one dword to G2 */ +/** \brief Write a 32-bit dword to G2. + + This function writes one dword to the specified address, taking all the + necessary precautions to ensure your write actually succeeds. + + \param address The address in memory to write to. + \param value The value to write to that address. +*/ void g2_write_32(uint32 address, uint32 value); -/* Read a block of 8-bit values from G2 */ +/** \brief Read a block of bytes from G2. + + This function acts as memcpy() for copying data from G2 to system memory. It + will take the necessary precautions before accessing G2 for you as well. + + \param output Pointer in system memory to write to. + \param address The address in G2-space to read from. + \param amt The number of bytes to read. +*/ void g2_read_block_8(uint8 * output, uint32 address, int amt); -/* Write a block 8-bit values to G2 */ +/** \brief Write a block of bytes to G2. + + This function acts as memcpy() for copying data to G2 from system memory. It + will take the necessary precautions for accessing G2. + + \param input The pointer in system memory to read from. + \param address The address in G2-space to write to. + \param amt The number of bytes to write. +*/ void g2_write_block_8(const uint8 * input, uint32 address, int amt); -/* Read a block of 16-bit values from G2 */ +/** \brief Read a block of words from G2. + + This function acts as memcpy() for copying data from G2 to system memory, + but it copies 16 bits at a time. It will take the necessary precautions + before accessing G2 for you as well. + + \param output Pointer in system memory to write to. + \param address The address in G2-space to read from. + \param amt The number of words to read. +*/ void g2_read_block_16(uint16 * output, uint32 address, int amt); -/* Write a block of 16-bit values to G2 */ +/** \brief Write a block of words to G2. + + This function acts as memcpy() for copying data to G2 from system memory, + copying 16 bits at a time. It will take the necessary precautions for + accessing G2. + + \param input The pointer in system memory to read from. + \param address The address in G2-space to write to. + \param amt The number of words to write. +*/ void g2_write_block_16(const uint16 * input, uint32 address, int amt); -/* Read a block of 32-bit values from G2 */ +/** \brief Read a block of dwords from G2. + + This function acts as memcpy() for copying data from G2 to system memory, + but it copies 32 bits at a time. It will take the necessary precautions + before accessing G2 for you as well. + + \param output Pointer in system memory to write to. + \param address The address in G2-space to read from. + \param amt The number of dwords to read. +*/ void g2_read_block_32(uint32 * output, uint32 address, int amt); -/* Write a block of 32-bit values to G2 */ +/** \brief Write a block of dwords to G2. + + This function acts as memcpy() for copying data to G2 from system memory, + copying 32 bits at a time. It will take the necessary precautions for + accessing G2. + + \param input The pointer in system memory to read from. + \param address The address in G2-space to write to. + \param amt The number of dwords to write. +*/ void g2_write_block_32(const uint32 * input, uint32 address, int amt); -/* memset(), but for use on G2. */ +/** \brief Set a block of bytes to G2. + + This function acts as memset() for setting a block of bytes on G2. It will + take the necessary precautions for accessing G2. + + \param address The address in G2-space to write to. + \param c The byte to write. + \param amt The number of bytes to write. +*/ void g2_memset_8(uint32 address, uint8 c, int amt); -/* When writing to the SPU RAM, this is required at least every 8 32-bit - writes that you execute */ +/** \brief Wait for the G2 write FIFO to empty. + + This function will spinwait until the G2 FIFO indicates that it has been + drained. The FIFO is 32 bytes in length, and thus when accessing AICA you + must do this at least for every 8 32-bit writes that you execute. +*/ void g2_fifo_wait(); __END_DECLS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2011-05-11 17:59:58
|
Revision: 723 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=723&view=rev Author: lostgeneration Date: 2011-05-11 17:59:52 +0000 (Wed, 11 May 2011) Log Message: ----------- Added Doxygen comments to sys/dirent.h * I assume Dan was the author here since the C sources are by him. I also added the KOS header to the file. Modified Paths: -------------- kos/include/sys/dirent.h Modified: kos/include/sys/dirent.h =================================================================== --- kos/include/sys/dirent.h 2011-05-11 17:22:19 UTC (rev 722) +++ kos/include/sys/dirent.h 2011-05-11 17:59:52 UTC (rev 723) @@ -1,3 +1,18 @@ +/* KallistiOS ##version## + + dirent.h + Copyright (C)2003 Dan Potter + +*/ + +/** \file dirent.h + \brief Standard POSIX dirent functionality + + This partially implements the standard POSIX dirent.h functionality. + + \author Dan Potter +*/ + #ifndef __SYS_DIRENT_H #define __SYS_DIRENT_H @@ -5,36 +20,75 @@ #include <arch/types.h> #include <kos/fs.h> +/** \brief The POSIX dirent which describes a directory entry + */ struct dirent { - int d_ino; - off_t d_off; - uint16 d_reclen; - uint8 d_type; - char d_name[256]; + int d_ino; /**< \brief the file number */ + off_t d_off; /**< \brief the file offset */ + uint16 d_reclen; /**< \brief the record length */ + uint8 d_type; /**< \brief the type */ + char d_name[256]; /**< \brief the entry name */ }; -// In KOS, DIR* is just an fd. We'll use a real struct here anyway so we -// can store the POSIX dirent. +/** \brief the DIR structure in KOS + + In KOS, DIR * is just an fd, but we use a struct so we can also include the + POSIX dirent. +*/ typedef struct { - file_t fd; - struct dirent d_ent; + file_t fd; /**< \brief the file descriptor */ + struct dirent d_ent; /**< \brief the POSIX dirent */ } DIR; // Standard UNIX dir functions. Not all of these are fully functional // right now due to lack of support in KOS. // All of these work. +/** \brief Opens a directory based on the specified name + + The directory specified by name is opened if it exists and returns a + directory structure that must be later closed with closedir. + + \param name The string name of the dir to open. + \return A directory structure that can be used with readdir + \note I believe you can use relative paths with opendir, but it depends on + the current working directory (getcwd) + \see closedir + \see readdir +*/ DIR *opendir(const char *name); + +/** \brief Closes a currently opened directory + + Close a DIR that was previously opened with opendir. + + \param dir The DIR that was returned from an opendir. + \return 0 on success, or -1 on error. +*/ int closedir(DIR *dir); + +/** \brief Read the contents of an open directory + + Read the contents of an open directory and returns a pointer to the current + directory entry. Recurring calls to readdir return the next directory entry. + + \note Do not free the returned dirent + \param dir The directory structure that was returned from an opendir + \return A pointer to the current diretory entry or NULL when there are no + more entries. +*/ struct dirent *readdir(DIR *dir); -// None of these work. +/** \brief Not implemented */ void rewinddir(DIR *dir); +/** \brief Not implemented */ int scandir(const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **)); +/** \brief Not implemented */ void seekdir(DIR *dir, off_t offset); +/** \brief Not implemented */ off_t telldir(DIR *dir); #endif - + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2011-05-11 17:22:26
|
Revision: 722 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=722&view=rev Author: lostgeneration Date: 2011-05-11 17:22:19 +0000 (Wed, 11 May 2011) Log Message: ----------- Changed flashrom_write's NOTE to doxygen \note Modified Paths: -------------- kos/kernel/arch/dreamcast/include/dc/flashrom.h Modified: kos/kernel/arch/dreamcast/include/dc/flashrom.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/flashrom.h 2011-05-09 16:06:27 UTC (rev 721) +++ kos/kernel/arch/dreamcast/include/dc/flashrom.h 2011-05-11 17:22:19 UTC (rev 722) @@ -98,7 +98,7 @@ This function implements the FLASHROM_WRITE syscall; given a flashrom offset, an input buffer, and a count, this writes data to the flashrom. - NOTE: It is not possible to write ones to the flashrom over zeros. If you + \note It is not possible to write ones to the flashrom over zeros. If you want to do this, you must save the old data in the flashrom, delete it out, and save the new data back. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-09 16:06:34
|
Revision: 721 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=721&view=rev Author: ljsebald Date: 2011-05-09 16:06:27 +0000 (Mon, 09 May 2011) Log Message: ----------- Doxygen comments in maple.h. Modified Paths: -------------- kos/kernel/arch/dreamcast/include/dc/maple.h Modified: kos/kernel/arch/dreamcast/include/dc/maple.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/maple.h 2011-05-09 03:47:26 UTC (rev 720) +++ kos/kernel/arch/dreamcast/include/dc/maple.h 2011-05-09 16:06:27 UTC (rev 721) @@ -1,12 +1,36 @@ /* KallistiOS ##version## - kernel/arch/dreamcast/include/dc/maple.h - (C)2002 Dan Potter + dc/maple.h + Copyright (C) 2002 Dan Potter This new driver's design is based loosely on the LinuxDC maple bus driver. */ +/** \file dc/maple.h + \brief Maple Bus driver interface. + + This file provides support for accessing the Maple bus on the Dreamcast. + Maple is the bus that all of your controllers and memory cards and the like + connect to, so this is one of those types of things that are quite important + to know how to use. + + Each peripheral device registers their driver within this system, and can be + accessed through the functions here. Most of the drivers have their own + functionality that is implemented in their header files, as well. + + \author Dan Potter + \author Lawrence Sebald + + \see dc/maple/controller.h + \see dc/maple/dreameye.h + \see dc/maple/keyboard.h + \see dc/maple/mouse.h + \see dc/maple/purupuru.h + \see dc/maple/sip.h + \see dc/maple/vmu.h +*/ + #ifndef __DC_MAPLE_H #define __DC_MAPLE_H @@ -16,351 +40,623 @@ #include <arch/types.h> #include <sys/queue.h> -/* Enabling this line will add massive amounts of processing time - to the maple system, but it can verify DMA errors */ -#define MAPLE_DMA_DEBUG 0 +/** \brief Enable Maple DMA debugging. -/* Enabling this will turn on intra-interrupt debugging messages, which - can cause problems if you're using a dc-load console rather than raw - serial output. Disable for normal usage. */ + Changing this to a 1 will add massive amounts of processing time to the + maple system in general, but it can help in verifying DMA errors. In + general, for most purposes this should stay disabled. +*/ +#define MAPLE_DMA_DEBUG 0 + +/** \brief Enable Maple IRQ debugging. + + Changing this to a 1 will turn on intra-interrupt debugging messages, which + may cause issues if you're using dcload rather than a raw serial debug + terminal. You probably will never have a good reason to enable this, so keep + it disabled for normal use. +*/ #define MAPLE_IRQ_DEBUG 0 -/* Maple Bus registers */ -#define MAPLE_BASE 0xa05f6c00 -#define MAPLE_DMAADDR (MAPLE_BASE+0x04) -#define MAPLE_RESET2 (MAPLE_BASE+0x10) -#define MAPLE_ENABLE (MAPLE_BASE+0x14) -#define MAPLE_STATE (MAPLE_BASE+0x18) -#define MAPLE_SPEED (MAPLE_BASE+0x80) -#define MAPLE_RESET1 (MAPLE_BASE+0x8c) +/** \defgroup maple_regs Maple Bus register locations -/* Some register define values */ -#define MAPLE_RESET2_MAGIC 0 -#define MAPLE_ENABLE_ENABLED 1 -#define MAPLE_ENABLE_DISABLED 0 -#define MAPLE_STATE_IDLE 0 -#define MAPLE_STATE_DMA 1 -#define MAPLE_SPEED_2MBPS 0 -#define MAPLE_SPEED_TIMEOUT(n) ((n) << 16) -#define MAPLE_RESET1_MAGIC 0x6155404f + These are various registers related to the Maple Bus. In general, you + probably won't ever need to mess with these directly. -/* Command and response codes */ -#define MAPLE_RESPONSE_FILEERR -5 -#define MAPLE_RESPONSE_AGAIN -4 -#define MAPLE_RESPONSE_BADCMD -3 -#define MAPLE_RESPONSE_BADFUNC -2 -#define MAPLE_RESPONSE_NONE -1 -#define MAPLE_COMMAND_DEVINFO 1 -#define MAPLE_COMMAND_ALLINFO 2 -#define MAPLE_COMMAND_RESET 3 -#define MAPLE_COMMAND_KILL 4 -#define MAPLE_RESPONSE_DEVINFO 5 -#define MAPLE_RESPONSE_ALLINFO 6 -#define MAPLE_RESPONSE_OK 7 -#define MAPLE_RESPONSE_DATATRF 8 -#define MAPLE_COMMAND_GETCOND 9 -#define MAPLE_COMMAND_GETMINFO 10 -#define MAPLE_COMMAND_BREAD 11 -#define MAPLE_COMMAND_BWRITE 12 -#define MAPLE_COMMAND_BSYNC 13 -#define MAPLE_COMMAND_SETCOND 14 -#define MAPLE_COMMAND_MICCONTROL 15 -#define MAPLE_COMMAND_CAMCONTROL 17 + @{ +*/ +#define MAPLE_BASE 0xa05f6c00 /**< \brief Maple register base */ +#define MAPLE_DMAADDR (MAPLE_BASE+0x04) /**< \brief DMA address register */ +#define MAPLE_RESET2 (MAPLE_BASE+0x10) /**< \brief Reset register #2 */ +#define MAPLE_ENABLE (MAPLE_BASE+0x14) /**< \brief Enable register */ +#define MAPLE_STATE (MAPLE_BASE+0x18) /**< \brief Status register */ +#define MAPLE_SPEED (MAPLE_BASE+0x80) /**< \brief Speed register */ +#define MAPLE_RESET1 (MAPLE_BASE+0x8c) /**< \brief Reset register #1 */ +/** @} */ +/** \defgroup maple_reg_values Values to write to Maple Bus registers + + These are the values that are written to registers to get them to do their + thing. + + @{ +*/ +#define MAPLE_RESET2_MAGIC 0 /**< \brief 2nd reset value */ +#define MAPLE_ENABLE_ENABLED 1 /**< \brief Enable Maple */ +#define MAPLE_ENABLE_DISABLED 0 /**< \brief Disable Maple */ +#define MAPLE_STATE_IDLE 0 /**< \brief Idle state */ +#define MAPLE_STATE_DMA 1 /**< \brief DMA in-progress */ +#define MAPLE_SPEED_2MBPS 0 /**< \brief 2Mbps bus speed */ +#define MAPLE_SPEED_TIMEOUT(n) ((n) << 16) /**< \brief Bus timeout macro */ +#define MAPLE_RESET1_MAGIC 0x6155404f /**< \brief First reset value */ +/** @} */ + +/** \defgroup maple_cmds Maple commands and responses + + These are all either commands or responses to commands sent to or from Maple + in normal operation. + + @{ +*/ +#define MAPLE_RESPONSE_FILEERR -5 /**< \brief File error */ +#define MAPLE_RESPONSE_AGAIN -4 /**< \brief Try again later */ +#define MAPLE_RESPONSE_BADCMD -3 /**< \brief Bad command sent */ +#define MAPLE_RESPONSE_BADFUNC -2 /**< \brief Bad function code */ +#define MAPLE_RESPONSE_NONE -1 /**< \brief No response */ +#define MAPLE_COMMAND_DEVINFO 1 /**< \brief Device info request */ +#define MAPLE_COMMAND_ALLINFO 2 /**< \brief All info request */ +#define MAPLE_COMMAND_RESET 3 /**< \brief Reset device request */ +#define MAPLE_COMMAND_KILL 4 /**< \brief Kill device request */ +#define MAPLE_RESPONSE_DEVINFO 5 /**< \brief Device info response */ +#define MAPLE_RESPONSE_ALLINFO 6 /**< \brief All info response */ +#define MAPLE_RESPONSE_OK 7 /**< \brief Command completed ok */ +#define MAPLE_RESPONSE_DATATRF 8 /**< \brief Data transfer */ +#define MAPLE_COMMAND_GETCOND 9 /**< \brief Get condition request */ +#define MAPLE_COMMAND_GETMINFO 10 /**< \brief Get memory information */ +#define MAPLE_COMMAND_BREAD 11 /**< \brief Block read */ +#define MAPLE_COMMAND_BWRITE 12 /**< \brief Block write */ +#define MAPLE_COMMAND_BSYNC 13 /**< \brief Block sync */ +#define MAPLE_COMMAND_SETCOND 14 /**< \brief Set condition request */ +#define MAPLE_COMMAND_MICCONTROL 15 /**< \brief Microphone control */ +#define MAPLE_COMMAND_CAMCONTROL 17 /**< \brief Camera control */ +/** @} */ + +/** \defgroup maple_functions Maple device function codes + + This is the list of maple device types (function codes). Each device must + have at least one function to actually do anything. + + @{ +*/ + /* Function codes; most sources claim that these numbers are little endian, and for all I know, they might be; but since it's a bitmask it doesn't really make much different. We'll just reverse our constants from the "big-endian" version. */ -#define MAPLE_FUNC_PURUPURU 0x00010000 -#define MAPLE_FUNC_MOUSE 0x00020000 -#define MAPLE_FUNC_CAMERA 0x00080000 -#define MAPLE_FUNC_CONTROLLER 0x01000000 -#define MAPLE_FUNC_MEMCARD 0x02000000 -#define MAPLE_FUNC_LCD 0x04000000 -#define MAPLE_FUNC_CLOCK 0x08000000 -#define MAPLE_FUNC_MICROPHONE 0x10000000 -#define MAPLE_FUNC_ARGUN 0x20000000 -#define MAPLE_FUNC_KEYBOARD 0x40000000 -#define MAPLE_FUNC_LIGHTGUN 0x80000000 +#define MAPLE_FUNC_PURUPURU 0x00010000 /**< \brief Jump pack */ +#define MAPLE_FUNC_MOUSE 0x00020000 /**< \brief Mouse */ +#define MAPLE_FUNC_CAMERA 0x00080000 /**< \brief Camera (Dreameye) */ +#define MAPLE_FUNC_CONTROLLER 0x01000000 /**< \brief Controller */ +#define MAPLE_FUNC_MEMCARD 0x02000000 /**< \brief Memory card */ +#define MAPLE_FUNC_LCD 0x04000000 /**< \brief LCD screen */ +#define MAPLE_FUNC_CLOCK 0x08000000 /**< \brief Clock */ +#define MAPLE_FUNC_MICROPHONE 0x10000000 /**< \brief Microphone */ +#define MAPLE_FUNC_ARGUN 0x20000000 /**< \brief AR gun? */ +#define MAPLE_FUNC_KEYBOARD 0x40000000 /**< \brief Keyboard */ +#define MAPLE_FUNC_LIGHTGUN 0x80000000 /**< \brief Lightgun */ +/** @} */ +/* \cond */ /* Pre-define list/queue types */ struct maple_frame; TAILQ_HEAD(maple_frame_queue, maple_frame); struct maple_driver; LIST_HEAD(maple_driver_list, maple_driver); +/* \endcond */ -/* Maple frame to be queued for transport */ +/** \brief Maple frame to be queued for transport. + + Internal representation of a frame to be queued up for sending. + + \headerfile dc/maple.h +*/ typedef struct maple_frame { - /* Send queue handle */ - TAILQ_ENTRY(maple_frame) frameq; + /** \brief Send queue handle. NOT A FUNCTION! */ + TAILQ_ENTRY(maple_frame) frameq; - int cmd; /* Command (defined above) */ - int dst_port, dst_unit; /* Maple destination address */ - int length; /* Data transfer length in 32-bit words */ - volatile int state; /* Has this frame been sent / responded to? */ - volatile int queued; /* Are we on the queue? */ + int cmd; /**< \brief Command (see \ref maple_cmds) */ + int dst_port; /**< \brief Destination port */ + int dst_unit; /**< \brief Destination unit */ + int length; /**< \brief Data transfer length in 32-bit words */ + volatile int state; /**< \brief Has this frame been sent / responded to? */ + volatile int queued; /**< \brief Are we on the queue? */ - void *send_buf; /* The data which will be sent (if any) */ - uint8 *recv_buf; /* Points into recv_buf_arr, but 32-byte aligned */ + void *send_buf; /**< \brief The data which will be sent (if any) */ + uint8 *recv_buf; /**< \brief Points into recv_buf_arr, but 32-byte aligned */ - struct maple_device *dev; /* Does this belong to a device? */ + struct maple_device *dev; /**< \brief Does this belong to a device? */ - void (*callback)(struct maple_frame *); /* Response callback */ + void (*callback)(struct maple_frame *); /**< \brief Response callback */ #if MAPLE_DMA_DEBUG - uint8 recv_buf_arr[1024 + 1024 + 32]; /* Response receive area */ + uint8 recv_buf_arr[1024 + 1024 + 32]; /**< \brief Response receive area */ #else - uint8 recv_buf_arr[1024 + 32]; /* Response receive area */ + uint8 recv_buf_arr[1024 + 32]; /**< \brief Response receive area */ #endif } maple_frame_t; -#define MAPLE_FRAME_VACANT 0 /* Ready to be used */ -#define MAPLE_FRAME_UNSENT 1 /* Ready to be sent */ -#define MAPLE_FRAME_SENT 2 /* Frame has been sent, but no response yet */ -#define MAPLE_FRAME_RESPONDED 3 /* Frame has a response */ +/** \defgroup maple_frame_states States that frames can be in + @{ +*/ +#define MAPLE_FRAME_VACANT 0 /**< \brief Ready to be used */ +#define MAPLE_FRAME_UNSENT 1 /**< \brief Ready to be sent */ +#define MAPLE_FRAME_SENT 2 /**< \brief Frame has been sent, but no response yet */ +#define MAPLE_FRAME_RESPONDED 3 /**< \brief Frame has a response */ +/** @} */ -/* Maple device info structure (used by hardware) */ +/** \brief Maple device info structure. + + This structure is used by the hardware to deliver the response to the device + info request. + + \headerfile dc/maple.h +*/ typedef struct maple_devinfo { - uint32 functions; - uint32 function_data[3]; - uint8 area_code; - uint8 connector_direction; - char product_name[30]; - char product_license[60]; - uint16 standby_power; - uint16 max_power; + uint32 functions; /**< \brief Function codes supported */ + uint32 function_data[3]; /**< \brief Additional data per function */ + uint8 area_code; /**< \brief Region code */ + uint8 connector_direction; /**< \brief ? */ + char product_name[30]; /**< \brief Name of device */ + char product_license[60]; /**< \brief License statement */ + uint16 standby_power; /**< \brief Power consumption (standby) */ + uint16 max_power; /**< \brief Power consumption (max) */ } maple_devinfo_t; -/* Response frame structure (used by hardware) */ +/** \brief Maple response frame structure. + + This structure is used to deliver the actual response to a request placed. + The data field is where all the interesting stuff will be. + + \headerfile dc/maple.h +*/ typedef struct maple_response { - int8 response; /* Response */ - uint8 dst_addr; /* Destination address */ - uint8 src_addr; /* Source address */ - uint8 data_len; /* Data length (in 32-bit words) */ - uint8 data[0]; /* Data (if any) */ + int8 response; /**< \brief Response */ + uint8 dst_addr; /**< \brief Destination address */ + uint8 src_addr; /**< \brief Source address */ + uint8 data_len; /**< \brief Data length (in 32-bit words) */ + uint8 data[0]; /**< \brief Data (if any) */ } maple_response_t; -/* One maple device; note that we duplicate the port/unit info which - is normally somewhat implicit so that we can pass around a pointer - to a particular device struct. */ +/** \brief One maple device. + + Note that we duplicate the port/unit info which is normally somewhat + implicit so that we can pass around a pointer to a particular device struct. + + \headerfile dc/maple.h +*/ typedef struct maple_device { /* Public */ - int valid; /* Is this a valid device? */ - int port, unit; /* Maple address */ - maple_devinfo_t info; /* Device info struct */ + int valid; /**< \brief Is this a valid device? */ + int port; /**< \brief Maple bus port connected to */ + int unit; /**< \brief Unit number, off of the port */ + maple_devinfo_t info; /**< \brief Device info struct */ /* Private */ - int dev_mask; /* Device-present mask for unit 0's */ - maple_frame_t frame; /* Give each device one rx/tx frame */ - struct maple_driver * drv; /* Driver which handles this device */ + int dev_mask; /**< \brief Device-present mask for unit 0's */ + maple_frame_t frame; /**< \brief One rx/tx frame */ + struct maple_driver *drv; /**< \brief Driver which handles this device */ - volatile int status_valid; /* Have we got our first status update? */ - uint8 status[1024]; /* Status buffer (for pollable devices) */ + volatile int status_valid; /**< \brief Have we got our first status update? */ + uint8 status[1024]; /**< \brief Status buffer (for pollable devices) */ } maple_device_t; -/* One maple port; each maple port can contain up to 6 devices, the first - one of which is always the port itself. */ -#define MAPLE_PORT_COUNT 4 -#define MAPLE_UNIT_COUNT 6 +#define MAPLE_PORT_COUNT 4 /**< \brief Number of ports on the bus */ +#define MAPLE_UNIT_COUNT 6 /**< \brief Max number of units per port */ + +/** \brief Internal representation of a Maple port. + + each maple port can contain up to 6 devices, the first one of which is + always the port itself. + + \headerfile dc/maple.h +*/ typedef struct maple_port { - int port; /* Port ID */ - maple_device_t units[MAPLE_UNIT_COUNT]; /* Pointers to active units */ + int port; /**< \brief Port ID */ + maple_device_t units[MAPLE_UNIT_COUNT]; /**< \brief Pointers to active units */ } maple_port_t; -/* A maple device driver; anything which is added to this list is capable - of handling one or more maple device types. When a device of the given - type is connected (includes startup "connection"), the driver is - invoked. This same process happens for disconnection, response - receipt, and on a periodic interval (for normal updates). */ +/** \brief A maple device driver. + + Anything which is added to this list is capable of handling one or more + maple device types. When a device of the given type is connected (includes + startup "connection"), the driver is invoked. This same process happens for + disconnection, response receipt, and on a periodic interval (for normal + updates). + + \headerfile dc/maple.h +*/ typedef struct maple_driver { - /* Driver list handle */ - LIST_ENTRY(maple_driver) drv_list; + /** \brief Driver list handle. NOT A FUNCTION! */ + LIST_ENTRY(maple_driver) drv_list; - uint32 functions; /* One or more MAPLE_FUNC_* or'd together */ - const char * name; /* The driver name */ + uint32 functions; /**< \brief One or more MAPLE_FUNCs ORed together */ + const char *name; /**< \brief The driver name */ - /* Callbacks, to be filled in by the driver */ - void (*periodic)(struct maple_driver *drv); - int (*attach)(struct maple_driver *drv, maple_device_t *dev); - void (*detach)(struct maple_driver *drv, maple_device_t *dev); + /* Callbacks, to be filled in by the driver */ + + /** \brief Periodic polling callback. + + This callback will be called to update the status of connected devices + periodically. + + \param drv This structure for the driver. + */ + void (*periodic)(struct maple_driver *drv); + + /** \brief Device attached callback. + + This callback will be called when a new device of this driver is + connected to the system. + + \param drv This structure for the driver. + \param dev The device that was connected. + \return 0 on success, <0 on error. + */ + int (*attach)(struct maple_driver *drv, maple_device_t *dev); + + /** \brief Device detached callback. + + This callback will be called when a device of this driver is disconnected + from the system. + + \param drv This structure for the driver. + \param dev The device that was detached. + */ + void (*detach)(struct maple_driver *drv, maple_device_t *dev); } maple_driver_t; -/* Maple state structure; we put everything in here to keep from - polluting the global namespace too much */ +/** \brief Maple state structure. + + We put everything in here to keep from polluting the global namespace too + much. + + \headerfile dc/maple.h +*/ typedef struct maple_state_str { - /* Maple device driver list; NOTE: Do not manipulate directly */ - struct maple_driver_list driver_list; + /** \brief Maple device driver list. Do not manipulate directly! */ + struct maple_driver_list driver_list; - /* Maple frame submission queue; NOTE: Do not manipulate directly */ - struct maple_frame_queue frame_queue; + /** \brief Maple frame submission queue. Do not manipulate directly! */ + struct maple_frame_queue frame_queue; - /* Maple device info structure */ - maple_port_t ports[MAPLE_PORT_COUNT]; + /** \brief Maple device info structure */ + maple_port_t ports[MAPLE_PORT_COUNT]; - /* Interrupt counters */ - volatile int dma_cntr, vbl_cntr; + /** \brief DMA interrupt counter */ + volatile int dma_cntr; - /* DMA send buffer */ - uint8 *dma_buffer; - volatile int dma_in_progress; + /** \brief VBlank interrupt counter */ + volatile int vbl_cntr; - /* Next unit which will be auto-detected */ - int detect_port_next; - int detect_unit_next; - volatile int detect_wrapped; + /** \brief DMA send buffer */ + uint8 *dma_buffer; - /* Our vblank handler handle */ - int vbl_handle; + /** \brief Is a DMA running now? */ + volatile int dma_in_progress; + + /** \brief Next port that will be auto-detected */ + int detect_port_next; + + /** \brief Next unit which will be auto-detected */ + int detect_unit_next; + + /** \brief Did the detect wrap? */ + volatile int detect_wrapped; + + /** \brief Our vblank handler handle */ + int vbl_handle; } maple_state_t; -/* Maple DMA buffer size; increase if you do a _LOT_ of maple stuff - on every periodic interrupt */ +/** \brief Maple DMA buffer size. + + Increase if you do a _LOT_ of maple stuff on every periodic interrupt. +*/ #define MAPLE_DMA_SIZE 16384 /* Maple memory read/write functions; these are just hooks in case we need to do something else later */ +/** \brief Maple memory read macro. */ #define maple_read(A) ( *((vuint32*)(A)) ) + +/** \brief Maple memory write macro. */ #define maple_write(A, V) ( *((vuint32*)(A)) = (V) ) /* Return codes from maple access functions */ -#define MAPLE_EOK 0 -#define MAPLE_EFAIL -1 -#define MAPLE_EAGAIN -2 -#define MAPLE_EINVALID -3 -#define MAPLE_ENOTSUPP -4 -#define MAPLE_ETIMEOUT -5 +/** \defgroup maple_func_rvs Return values from Maple functions + @{ +*/ +#define MAPLE_EOK 0 /**< \brief No error */ +#define MAPLE_EFAIL -1 /**< \brief Command failed */ +#define MAPLE_EAGAIN -2 /**< \brief Try again later */ +#define MAPLE_EINVALID -3 /**< \brief Invalid command */ +#define MAPLE_ENOTSUPP -4 /**< \brief Command not suppoted by device */ +#define MAPLE_ETIMEOUT -5 /**< \brief Command timed out */ +/** @} */ /**************************************************************************/ /* maple_globals.c */ -/* Global state info */ +/** \brief Global state info. + + Do not manipulate this state yourself, as it will likely break things if you + do so. +*/ extern maple_state_t maple_state; /**************************************************************************/ /* maple_utils.c */ -/* Enable / Disable the bus */ +/** \brief Enable the Maple bus. + + This will be done for you autmatically at init time, and there's probably + not many reasons to be doing this during runtime. +*/ void maple_bus_enable(); + +/** \brief Disable the Maple bus. + + There's really not many good reasons to be mucking with this at runtime. +*/ void maple_bus_disable(); -/* Start / Stop DMA */ +/** \brief Start a Maple DMA. + + This stuff will all be handled internally, so there's probably no reason to + be doing this yourself. +*/ void maple_dma_start(); + +/** \brief Stop a Maple DMA. + + This stuff will all be handled internally, so there's probably no reason to + be doing this yourself. +*/ void maple_dma_stop(); + +/** \brief Is a Maple DMA in progress? + + \return Non-zero if a DMA is in progress. +*/ int maple_dma_in_progress(); -/* Set DMA address */ +/** \brief Set the Maple DMA address. + + Once again, you should not muck around with this in your programs. +*/ void maple_dma_addr(void *ptr); -/* Return a "maple address" for a port,unit pair */ +/** \brief Return a "maple address" for a port, unit pair. + + \param port The port to build the address for. + \param unit The unit to build the address for. + \return The Maple address of the pair. +*/ uint8 maple_addr(int port, int unit); -/* Decompose a "maple address" into a port,unit pair */ -/* WARNING: Won't work on multi-cast addresses! */ +/** \brief Decompose a "maple address" into a port, unit pair. + + WARNING: This function will not work with multi-cast addresses! + + \param addr The input address. + \param port Output space for the port of the address. + \param unit Output space for the unit of the address. +*/ void maple_raddr(uint8 addr, int * port, int * unit); -/* Return a string with the capabilities of a given driver; NOT THREAD SAFE */ +/** \brief Return a string with the capabilities of a given function code. + + This function is not re-entrant, and thus NOT THREAD SAFE. + + \param functions The list of function codes. + \return A string containting the capabilities. +*/ const char * maple_pcaps(uint32 functions); -/* Return a string representing the maple response code */ +/** \brief Return a string representing the maple response code. + + \param response The response code returned from the function. + \return A string containing a textual respresentation of the + response code. +*/ const char * maple_perror(int response); -/* Determine if a given device is valid */ +/** \brief Determine if a given device is valid. + \param p The port to check. + \param u The unit to check. + \return Non-zero if the device is valid. +*/ int maple_dev_valid(int p, int u); #if MAPLE_DMA_DEBUG /* Debugging help */ + +/** \brief Setup a sentinel for debugging DMA issues. + \param buffer The buffer to add the sentinel to. + \param bufsize The size of the data in the buffer. +*/ void maple_sentinel_setup(void * buffer, int bufsize); + +/** \brief Verify the presence of the sentine. + \param bufname A string to recognize the buffer by. + \param buffer The buffer to check. + \param bufsize The size of the buffer. +*/ void maple_sentinel_verify(const char * bufname, void * buffer, int bufsize); #endif /**************************************************************************/ /* maple_queue.c */ -/* Send all queued frames */ +/** \brief Send all queued frames. */ void maple_queue_flush(); -/* Submit a frame for queueing; this will generally be called inside the - periodic interrupt; however, if you need to do something asynchronously - (e.g., VMU access) then it might cause some problems. In this case, the - function will automatically do locking by disabling interrupts - temporarily. In any case, the callback will be done inside an IRQ context. */ +/** \brief Submit a frame for queueing. + + This will generally be called inside the periodic interrupt; however, if you + need to do something asynchronously (e.g., VMU access) then it might cause + some problems. In this case, the function will automatically do locking by + disabling interrupts temporarily. In any case, the callback will be done + inside an IRQ context. + + \param frame The frame to queue up. + \retval 0 On success. + \retval -1 If the frame is already queued. +*/ int maple_queue_frame(maple_frame_t *frame); -/* Remove a used frame from the queue; same semantics as above */ +/** \brief Remove a used frame from the queue. + + This will be done automatically when the frame is consumed. + + \param frame The frame to remove from the queue. + \retval 0 On success. + \retval -1 If the frame is not queued. +*/ int maple_queue_remove(maple_frame_t *frame); -/* Initialize a new frame to prepare it to be placed on the queue; call - this _before_ you fill it in */ +/** \brief Initialize a new frame to prepare it to be placed on the queue. + + You should call this before you fill in the frame data. + + \param frame The frame to initialize. +*/ void maple_frame_init(maple_frame_t *frame); -/* Lock a frame so that someone else can't use it in the mean time; if the - frame is already locked, an error will be returned. */ +/** \brief Lock a frame so that someone else can't use it in the mean time. + \retval 0 On success. + \retval -1 If the frame is already locked. +*/ int maple_frame_lock(maple_frame_t *frame); -/* Unlock a frame */ +/** \brief Unlock a frame. */ void maple_frame_unlock(maple_frame_t *frame); /**************************************************************************/ /* maple_driver.c */ -/* Register a maple device driver; do this before maple_init() */ +/** \brief Register a maple device driver. + + This should be done before calling maple_init(). + + \retval 0 On success (no error conditions defined). +*/ int maple_driver_reg(maple_driver_t *driver); -/* Unregister a maple device driver */ +/** \brief Unregister a maple device driver. + \retval 0 On success (no error conditions defined). +*/ int maple_driver_unreg(maple_driver_t *driver); -/* Attach a maple device to a driver, if possible */ +/** \brief Attach a maple device to a driver, if possible. + \param det The detection frame. + \retval 0 On success. + \retval -1 If no driver is available. +*/ int maple_driver_attach(maple_frame_t *det); -/* Detach an attached maple device */ +/** \brief Detach an attached maple device. + \param p The port of the device to detach. + \param u The unit of the device to detach. + \retval 0 On success. + \retval -1 If the device wasn't valid. +*/ int maple_driver_detach(int p, int u); -/* For each device which the given driver controls, call the callback */ +/** \brief For each device which the given driver controls, call the callback. + \param drv The driver to loop through devices of. + \param callback The function to call. The parameter is the device + that it is being called on. It should return 0 on + success, and <0 on failure. + \retval 0 On success. + \retval -1 If any callbacks return <0. +*/ int maple_driver_foreach(maple_driver_t *drv, int (*callback)(maple_device_t *)); /**************************************************************************/ /* maple_irq.c */ -/* Called on every VBL (~60fps) */ +/** \brief Called on every VBL (~60fps). + \param code The ASIC event code. +*/ void maple_vbl_irq_hnd(uint32 code); -/* Called after a Maple DMA send / receive pair completes */ +/** \brief Called after a Maple DMA send / receive pair completes. + \param code The ASIC event code. +*/ void maple_dma_irq_hnd(uint32 code); /**************************************************************************/ /* maple_enum.c */ -/* Return the number of connected devices */ +/** \brief Return the number of connected devices. + \return The number of devices connected. +*/ int maple_enum_count(); -/* Return a raw device info struct for the given device */ +/** \brief Get a raw device info struct for the given device. + \param p The port to look up. + \param u The unit to look up. + \return The device at that address, or NULL if no device is + there. +*/ maple_device_t * maple_enum_dev(int p, int u); -/* Return the Nth device of the requested type (where N is zero-indexed) */ +/** \brief Get the Nth device of the requested type (where N is zero-indexed). + \param n The index to look up. + \param func The function code to look for. + \return The device found, if any. NULL otherwise. +*/ maple_device_t * maple_enum_type(int n, uint32 func); -/* Return the Nth device that is of the requested type and supports the list of - capabilities given. Note, this only currently makes sense for controllers, - since some devices don't necessarily use the function data in the same manner - that controllers do (and controllers are the only devices where we have a - list of what all the bits mean at the moment). */ +/** \brief Return the Nth device that is of the requested type and supports the + list of capabilities given. + + Note, this only currently makes sense for controllers, since some devices + don't necessarily use the function data in the same manner that controllers + do (and controllers are the only devices where we have a list of what all + the bits mean at the moment). + + \param n The index to look up. + \param func The function code to look for. + \param cap Capabilities bits to look for. + \return The device found, if any. NULL otherwise. +*/ maple_device_t * maple_enum_type_ex(int n, uint32 func, uint32 cap); -/* Get the status struct for the requested maple device; wait until it's - valid before returning. Cast to the appropriate type you're expecting. */ +/** \brief Get the status struct for the requested maple device. + + This function will wait until the status is valid before returning. + You should cast to the appropriate type you're expecting. + + \param dev The device to look up. + \return The device's status. +*/ void * maple_dev_status(maple_device_t *dev); /**************************************************************************/ /* maple_init.c */ -/* Init / Shutdown */ -int maple_init(); -void maple_shutdown(); +/** \brief Initialize Maple. + \return 0 on success, <0 on failure. +*/ +int maple_init(); -/* Wait for the initial bus scan to complete */ -void maple_wait_scan(); +/** \brief Shutdown Maple. */ +void maple_shutdown(); +/** \brief Wait for the initial bus scan to complete. */ +void maple_wait_scan(); + /**************************************************************************/ /* Convienence macros */ @@ -377,6 +673,19 @@ (i.e., { code }) */ +/** \brief Begin a foreach loop over Maple devices. + + This macro (along with the MAPLE_FOREACH_END() one) implements a simple + foreach-style loop over the given type of devices. Essentially, it grabs the + status of the device, and leaves it to you to figure out what to do with it. + + The most common use of this would be to look for input on any controller. + + \param TYPE The function code of devices to look at. + \param VARTYPE The type to cast the return value of + maple_dev_status() to. + \param VAR The name of the result of maple_dev_status(). +*/ #define MAPLE_FOREACH_BEGIN(TYPE, VARTYPE, VAR) \ do { \ maple_device_t * __dev; \ @@ -387,15 +696,18 @@ while ( (__dev = maple_enum_type(__i, TYPE)) ) { \ VAR = (VARTYPE *)maple_dev_status(__dev); \ do { - + +/** \brief End a foreach loop over Maple devices. + + Each MAPLE_FOREACH_BEGIN() must be paired with one of these after the loop + body. +*/ #define MAPLE_FOREACH_END() \ } while(0); \ __i++; \ } \ } while(0); - __END_DECLS #endif /* __DC_MAPLE_H */ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <los...@us...> - 2011-05-09 03:47:32
|
Revision: 720 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=720&view=rev Author: lostgeneration Date: 2011-05-09 03:47:26 +0000 (Mon, 09 May 2011) Log Message: ----------- Documented a standard C header Modified Paths: -------------- kos/include/malloc.h Modified: kos/include/malloc.h =================================================================== --- kos/include/malloc.h 2011-05-09 02:02:00 UTC (rev 719) +++ kos/include/malloc.h 2011-05-09 03:47:26 UTC (rev 720) @@ -5,6 +5,14 @@ */ +/** \file malloc.h + \brief Standard C Malloc functionality + + This implements standard C heap allocation, deallocation, and stats. + + \author Dan Potter +*/ + #ifndef __MALLOC_H #define __MALLOC_H @@ -16,27 +24,108 @@ /* Unlike previous versions, we totally decouple the implementation from the declarations. */ -/* ANSI C functions */ +/** \brief ANSI C functions */ struct mallinfo { - int arena; /* non-mmapped space allocated from system */ - int ordblks; /* number of free chunks */ - int smblks; /* number of fastbin blocks */ - int hblks; /* number of mmapped regions */ - int hblkhd; /* space in mmapped regions */ - int usmblks; /* maximum total allocated space */ - int fsmblks; /* space available in freed fastbin blocks */ - int uordblks; /* total allocated space */ - int fordblks; /* total free space */ - int keepcost; /* top-most, releasable (via malloc_trim) space */ + /** \brief non-mmapped space allocated from system */ + int arena; + /** \brief number of free chunks */ + int ordblks; + /** \brief number of fastbin blocks */ + int smblks; + /** \brief number of mmapped regions */ + int hblks; + /** \brief space in mmapped regions */ + int hblkhd; + /** \brief maximum total allocated space */ + int usmblks; + /** \brief space available in freed fastbin blocks */ + int fsmblks; + /** \brief total allocated space */ + int uordblks; + /** \brief total free space */ + int fordblks; + /** \brief top-most, releasable (via malloc_trim) space */ + int keepcost; }; +/** \brief allocate memory + + This allocates the specified size of bytes onto the heap. This memory is not + freed automatically if the returned pointer goes out of scope. Thus you must + call \ref free to reclaim the used space when finished. + + \param size is the size in bytes to allocate + \return a pointer to the newly allocated address or NULL on errors. + \see free + \note the memory chunk is uninitialized + \note NULL may also be returned if size is 0 +*/ void * malloc(size_t size); + +/** \brief allocate memory on the heap and initialize it to 0 + + This allocates a chunk of memory of size * nmemb. In otherwords, an array + with nmemb elements of size or size[nmemb]. + + \param nmemb is the amount of elements + \param size the size of each element + \return a pointer to the newly allocated address or NULL on errors. + \see free + \note the memory chunk is set to zero + \note NULL may be returned if nmemb or size is 0 +*/ void * calloc(size_t nmemb, size_t size); + +/** \brief releases memory that was previous allocated + + frees the memory space that had previously been allocated by malloc or + calloc. + + \param ptr is a pointer to the address of allocated ram + \note no action is taken if NULL is passed + \note calling free on the same ptr more than once should not be expected to + behave in a reproducable maner as it is unpredictable. +*/ void free(void * ptr); + +/** \brief changes the size of previously allocated memory + + The size of ptr is changed to size. If data has already been placed in the + memory area at that location, it's preserved up to size. If size is larger + then the previously allocated memory, the new area will be unititialized. + + \param ptr the address pointer that's been previously returned by malloc/calloc + \param size the new size to give to the memory + \return a pointer to the new address + \note if ptr is NULL the call is basically a malloc(size) + \note if ptr is not NULL, and size is 0 the call is basically a free(ptr) +*/ void * realloc(void * ptr, size_t size); + +/** \brief allocate memory aligned memory + + Memory of size is allocated with the address being a multiple of alignment + + \param alignment a multiple of two that the memory address will be aligned to + \param size the size of the memory to allocate + \return a pointer to the newly allocated address (aligned to alignment) or + NULL on errors +*/ void * memalign(size_t alignment, size_t size); + +/** \brief allocates memory aligned to the system page size + + Memory is allocated of size and is aligned to the system page size. + This ends up basically being: memolign(PAGESIZE, size) + + \param size the size of the memory to allocate + \return a pointer to the newly allocated memory address + \see arch/arch.h +*/ void * valloc(size_t size); +/** \brief Sets tunable parameters for malloc related options. +*/ struct mallinfo mallinfo(); /* mallopt defines */ @@ -56,14 +145,20 @@ #define DEFAULT_MMAP_MAX 65536 int mallopt(int, int); -/* Debug function */ +/** \brief Debug function +*/ void malloc_stats(); -/* KOS specfic calls */ +/** \brief KOS specfic calls +*/ int malloc_irq_safe(); -/* Only available with KM_DBG */ +/** \brief Only available with KM_DBG +*/ int mem_check_block(void *p); + +/** \brief Only available with KM_DBG + */ int mem_check_all(); __END_DECLS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-09 02:02:06
|
Revision: 719 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=719&view=rev Author: ljsebald Date: 2011-05-09 02:02:00 +0000 (Mon, 09 May 2011) Log Message: ----------- Fixing header file references on some structs... Modified Paths: -------------- kos/include/kos/net.h kos/include/kos/once.h kos/include/sys/_types.h kos/kernel/arch/dreamcast/include/dc/flashrom.h kos/kernel/arch/dreamcast/include/dc/video.h kos/kernel/arch/dreamcast/include/dc/vmu_pkg.h kos/kernel/arch/dreamcast/include/dc/vmufs.h Modified: kos/include/kos/net.h =================================================================== --- kos/include/kos/net.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/include/kos/net.h 2011-05-09 02:02:00 UTC (rev 719) @@ -36,6 +36,8 @@ Each usable network device should have one of these describing it. These must be registered to the network layer before the device is useable. + + \headerfile kos/net.h */ typedef struct knetif { /** \brief Device list handle (not a function!) */ @@ -202,7 +204,9 @@ #define PACKED __attribute__((packed)) /* \endcond */ -/** \brief IPv4 Packet header */ +/** \brief IPv4 Packet header. + \headerfile kos/net.h +*/ typedef struct ip_hdr_s { uint8 version_ihl; /**< \brief IP version and header length */ uint8 tos; /**< \brief Type of Service */ @@ -216,7 +220,9 @@ uint32 dest; /**< \brief Destination IP address */ } PACKED ip_hdr_t; -/** \brief IPv6 Packet header */ +/** \brief IPv6 Packet header. + \headerfile kos/net.h +*/ typedef struct ipv6_hdr_s { uint8 version_lclass; /**< \brief Version and low-order class byte */ @@ -400,7 +406,10 @@ /** \brief IPv4 statistics structure. This structure holds some basic statistics about the IPv4 layer of the - stack, and can be retrieved with the appropriate function. */ + stack, and can be retrieved with the appropriate function. + + \headerfile kos/net.h +*/ typedef struct net_ipv4_stats { uint32 pkt_sent; /** \brief Packets sent out successfully */ uint32 pkt_send_failed; /** \brief Packets that failed to send */ @@ -538,7 +547,10 @@ /** \brief IPv6 statistics structure. This structure holds some basic statistics about the IPv6 layer of the - stack, and can be retrieved with the appropriate function. */ + stack, and can be retrieved with the appropriate function. + + \headerfile kos/net.h +*/ typedef struct net_ipv6_stats { uint32 pkt_sent; /**< \brief Packets sent out successfully */ uint32 pkt_send_failed; /**< \brief Packets that failed to send */ @@ -601,7 +613,10 @@ /** \brief UDP statistics structure. This structure holds some basic statistics about the UDP layer of the stack, - and can be retrieved with the appropriate function. */ + and can be retrieved with the appropriate function. + + \headerfile kos/net.h +*/ typedef struct net_udp_stats { uint32 pkt_sent; /**< \brief Packets sent out successfully */ uint32 pkt_send_failed; /**< \brief Packets that failed to send */ Modified: kos/include/kos/once.h =================================================================== --- kos/include/kos/once.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/include/kos/once.h 2011-05-09 02:02:00 UTC (rev 719) @@ -28,6 +28,8 @@ This object type should always be initialized with the KTHREAD_ONCE_INIT macro. + + \headerfile kos/once.h */ typedef struct { int initialized; Modified: kos/include/sys/_types.h =================================================================== --- kos/include/sys/_types.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/include/sys/_types.h 2011-05-09 02:02:00 UTC (rev 719) @@ -61,7 +61,9 @@ /** \endcond */ #ifndef __mbstate_t_defined -/** \brief Conversion state information. */ +/** \brief Conversion state information. + \headerfile sys/_types.h +*/ typedef struct { int __count; Modified: kos/kernel/arch/dreamcast/include/dc/flashrom.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/flashrom.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/kernel/arch/dreamcast/include/dc/flashrom.h 2011-05-09 02:02:00 UTC (rev 719) @@ -158,6 +158,8 @@ This structure is filled in with the settings set in the BIOS from the flashrom_get_syscfg() function. + + \headerfile dc/flashrom.h */ typedef struct flashrom_syscfg { int language; /**< \brief Language setting. @@ -259,6 +261,8 @@ This structure will be filled in by flashrom_get_ispcfg() (DreamPassport) or flashrom_get_pw_ispcfg() (PlanetWeb). Thanks to Sam Steele for the information about DreamPassport's ISP settings. + + \headerfile dc/flashrom.h */ typedef struct flashrom_ispcfg { int method; /**< \brief DHCP, Static, dialup(?), PPPoE Modified: kos/kernel/arch/dreamcast/include/dc/video.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/video.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/kernel/arch/dreamcast/include/dc/video.h 2011-05-09 02:02:00 UTC (rev 719) @@ -122,6 +122,8 @@ KOS maintains a list of valid video modes internally that correspond to the specific display modes enumeration. Each of them is built of one of these. + + \headerfile dc/video.h */ typedef struct vid_mode { int generic; /**< \brief Generic mode type for vid_set_mode() */ Modified: kos/kernel/arch/dreamcast/include/dc/vmu_pkg.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/vmu_pkg.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/kernel/arch/dreamcast/include/dc/vmu_pkg.h 2011-05-09 02:02:00 UTC (rev 719) @@ -29,6 +29,8 @@ Anyone wanting to package a VMU file should create one of these somewhere; eventually it will be turned into a flat file that you can save using fs_vmu. + + \headerfile dc/vmu_pkg.h */ typedef struct vmu_pkg { char desc_short[20]; /**< \brief Short file description */ @@ -47,6 +49,8 @@ /** \brief Final VMU package type. This structure will be written into the file itself, not vmu_pkg_t. + + \headerfile dc/vmu_pkg.h */ typedef struct vmu_hdr { char desc_short[16]; /**< \brief Space-padded short description */ Modified: kos/kernel/arch/dreamcast/include/dc/vmufs.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/vmufs.h 2011-05-09 01:31:02 UTC (rev 718) +++ kos/kernel/arch/dreamcast/include/dc/vmufs.h 2011-05-09 02:02:00 UTC (rev 719) @@ -33,7 +33,9 @@ #define __packed__ __attribute__((packed)) /* \endcond */ -/** \brief BCD timestamp, used several places in the vmufs. */ +/** \brief BCD timestamp, used several places in the vmufs. + \headerfile dc/vmufs.h +*/ typedef struct { uint8 cent; /**< \brief Century */ uint8 year; /**< \brief Year, within century */ @@ -45,7 +47,9 @@ uint8 dow; /**< \brief Day of week (0 = monday, etc) */ } __packed__ vmu_timestamp_t; -/** \brief VMU FS Root block layout. */ +/** \brief VMU FS Root block layout. + \headerfile dc/vmufs.h +*/ typedef struct { uint8 magic[16]; /**< \brief All should contain 0x55 */ uint8 use_custom; /**< \brief 0 = standard, 1 = custom */ @@ -63,7 +67,9 @@ uint8 unk2[430]; /**< \brief ??? */ } __packed__ vmu_root_t; -/** \brief VMU FS Directory entries, 32 bytes each. */ +/** \brief VMU FS Directory entries, 32 bytes each. + \headerfile dc/vmufs.h +*/ typedef struct { uint8 filetype; /**< \brief 0x00 = no file; 0x33 = data; 0xcc = a game */ uint8 copyprotect; /**< \brief 0x00 = copyable; 0xff = copy protected */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ljs...@us...> - 2011-05-09 01:31:09
|
Revision: 718 http://cadcdev.svn.sourceforge.net/cadcdev/?rev=718&view=rev Author: ljsebald Date: 2011-05-09 01:31:02 +0000 (Mon, 09 May 2011) Log Message: ----------- Finished documentaton of pvr.h and fixed a few things in net.h. Modified Paths: -------------- kos/include/kos/net.h kos/kernel/arch/dreamcast/include/dc/pvr.h Modified: kos/include/kos/net.h =================================================================== --- kos/include/kos/net.h 2011-05-09 01:30:10 UTC (rev 717) +++ kos/include/kos/net.h 2011-05-09 01:31:02 UTC (rev 718) @@ -398,6 +398,7 @@ /***** net_ipv4.c *********************************************************/ /** \brief IPv4 statistics structure. + This structure holds some basic statistics about the IPv4 layer of the stack, and can be retrieved with the appropriate function. */ typedef struct net_ipv4_stats { @@ -535,6 +536,7 @@ /***** net_ipv6.c *********************************************************/ /** \brief IPv6 statistics structure. + This structure holds some basic statistics about the IPv6 layer of the stack, and can be retrieved with the appropriate function. */ typedef struct net_ipv6_stats { @@ -597,6 +599,7 @@ /***** net_udp.c **********************************************************/ /** \brief UDP statistics structure. + This structure holds some basic statistics about the UDP layer of the stack, and can be retrieved with the appropriate function. */ typedef struct net_udp_stats { Modified: kos/kernel/arch/dreamcast/include/dc/pvr.h =================================================================== --- kos/kernel/arch/dreamcast/include/dc/pvr.h 2011-05-09 01:30:10 UTC (rev 717) +++ kos/kernel/arch/dreamcast/include/dc/pvr.h 2011-05-09 01:31:02 UTC (rev 718) @@ -523,139 +523,276 @@ #define PVR_MODIFIER_CHEAP_SHADOW 0 #define PVR_MODIFIER_NORMAL 1 -#define PVR_MODIFIER_OTHER_POLY 0 /* PM1 modifer instruction */ -#define PVR_MODIFIER_INCLUDE_LAST_POLY 1 /* ...in inclusion vol */ -#define PVR_MODIFIER_EXCLUDE_LAST_POLY 2 /* ...in exclusion vol */ +/** \defgroup pvr_mod_modes Modifier volume mode parameters + All triangles in a single modifier volume should be of the other poly type, + except for the last one. That should be either of the other two types, + depending on whether you want an inclusion or exclusion volume. -/* "Polygon header" -- this is the hardware equivalent of a rendering - context; you'll create one of these from your pvr_poly_context_t and - use it for submission to the hardware. */ + @{ +*/ +#define PVR_MODIFIER_OTHER_POLY 0 /**< \brief Not the last polygon in the volume */ +#define PVR_MODIFIER_INCLUDE_LAST_POLY 1 /**< \brief Last polygon, inclusion volume */ +#define PVR_MODIFIER_EXCLUDE_LAST_POLY 2 /**< \brief Last polygon, exclusion volume */ +/** @} */ + + +/** \brief PVR polygon header. + + This is the hardware equivalent of a rendering context; you'll create one of + these from your pvr_poly_cxt_t and use it for submission to the hardware. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 cmd; /* TA command */ - uint32 mode1, mode2, mode3; /* mode parameters */ - uint32 d1, d2, d3, d4; /* dummies */ + uint32 cmd; /**< \brief TA command */ + uint32 mode1; /**< \brief Parameter word 1 */ + uint32 mode2; /**< \brief Parameter word 2 */ + uint32 mode3; /**< \brief Parameter word 3 */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ + uint32 d3; /**< \brief Dummy value */ + uint32 d4; /**< \brief Dummy value */ } pvr_poly_hdr_t; -/* Polygon header with intensity color. This is the equivalent of - pvr_poly_hdr_t, but for use with intensity color. */ +/** \brief PVR polygon header with intensity color. + + This is the equivalent of pvr_poly_hdr_t, but for use with intensity color. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 cmd; /* TA command */ - uint32 mode1, mode2, mode3; /* mode parameters */ - float a, r, g, b; /* color */ + uint32 cmd; /**< \brief TA command */ + uint32 mode1; /**< \brief Parameter word 1 */ + uint32 mode2; /**< \brief Parameter word 2 */ + uint32 mode3; /**< \brief Parameter word 3 */ + float a; /**< \brief Face color alpha component */ + float r; /**< \brief Face color red component */ + float g; /**< \brief Face color green component */ + float b; /**< \brief Face color blue component */ } pvr_poly_ic_hdr_t; -/* Polygon header to be used with modifier volumes. This is the - equivalent of a pvr_poly_hdr_t for use when a polygon is to - be used with modifier volumes. */ +/** \brief PVR polygon header to be used with modifier volumes. + + This is the equivalent of a pvr_poly_hdr_t for use when a polygon is to be + used with modifier volumes. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 cmd; /* TA command */ - uint32 mode1; /* mode parameters */ - uint32 mode2_0, mode3_0; - uint32 mode2_1, mode3_1; - uint32 d1, d2; /* dummies */ + uint32 cmd; /**< \brief TA command */ + uint32 mode1; /**< \brief Parameter word 1 */ + uint32 mode2_0; /**< \brief Parameter word 2 (outside volume) */ + uint32 mode3_0; /**< \brief Parameter word 3 (outside volume) */ + uint32 mode2_1; /**< \brief Parameter word 2 (inside volume) */ + uint32 mode3_1; /**< \brief Parameter word 3 (inside volume) */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ } pvr_poly_mod_hdr_t; -/* Polygon header specifically for sprites. */ +/** \brief PVR polygon header specifically for sprites. + + This is the equivalent of a pvr_poly_hdr_t for use when a quad/sprite is to + be rendered. Note that the color data is here, not in the vertices. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 cmd; /* TA command */ - uint32 mode1, mode2, mode3; /* mode parameters */ - uint32 argb; /* sprite color */ - uint32 oargb; /* offset color */ - uint32 d1, d2; /* dummies */ + uint32 cmd; /**< \brief TA command */ + uint32 mode1; /**< \brief Parameter word 1 */ + uint32 mode2; /**< \brief Parameter word 2 */ + uint32 mode3; /**< \brief Parameter word 3 */ + uint32 argb; /**< \brief Sprite face color */ + uint32 oargb; /**< \brief Sprite offset color */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ } pvr_sprite_hdr_t; -/* Modifier volume header. */ +/** \brief Modifier volume header. + + This is the header that should be submitted when dealing with setting a + modifier volume. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 cmd; /* TA command */ - uint32 mode1; /* mode parameter */ - uint32 d1, d2, d3, d4, d5, d6; /* dummies */ + uint32 cmd; /**< \brief TA command */ + uint32 mode1; /**< \brief Parameter word 1 */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ + uint32 d3; /**< \brief Dummy value */ + uint32 d4; /**< \brief Dummy value */ + uint32 d5; /**< \brief Dummy value */ + uint32 d6; /**< \brief Dummy value */ } pvr_mod_hdr_t; -/* Generic vertex type; the PVR chip itself supports many more vertex - types, but this is the main one that can be used with both textured - and non-textured polygons, and is fairly fast. You can find other - variants below. */ +/** \brief Generic PVR vertex type. + + The PVR chip itself supports many more vertex types, but this is the main + one that can be used with both textured and non-textured polygons, and is + fairly fast. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 flags; /* vertex flags */ - float x, y, z; /* the coodinates */ - float u, v; /* texture coords */ - uint32 argb; /* vertex color */ - uint32 oargb; /* offset color */ + uint32 flags; /**< \brief TA command (vertex flags) */ + float x; /**< \brief X coordinate */ + float y; /**< \brief Y coordinate */ + float z; /**< \brief Z coordinate */ + float u; /**< \brief Texture U coordinate */ + float v; /**< \brief Texture V coordinate */ + uint32 argb; /**< \brief Vertex color */ + uint32 oargb; /**< \brief Vertex offset color */ } pvr_vertex_t; -/* Non-textured, packed color, affected by modifier volume. This - vertex type has two copies of colors. The second color is used when - enclosed within a modifier volume. */ +/** \brief PVR vertex type: Non-textured, packed color, affected by modifier + volume. + + This vertex type has two copies of colors. The second color is used when + enclosed within a modifier volume. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 flags; - float x, y, z; - uint32 argb0; - uint32 argb1; - uint32 d1, d2; + uint32 flags; /**< \brief TA command (vertex flags) */ + float x; /**< \brief X coordinate */ + float y; /**< \brief Y coordinate */ + float z; /**< \brief Z coordinate */ + uint32 argb0; /**< \brief Vertex color (outside volume) */ + uint32 argb1; /**< \brief Vertex color (inside volume) */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ } pvr_vertex_pcm_t; -/* Textured, packed color, affected by modifer volume. Note that this - vertex type has two copies of colors, offset colors and texture - coords. The second set of texture coords, colors, and offset colors - are used when enclosed within a modifer volume */ +/** \brief PVR vertex type: Textured, packed color, affected by modifer volume. + + Note that this vertex type has two copies of colors, offset colors, and + texture coords. The second set of texture coords, colors, and offset colors + are used when enclosed within a modifer volume. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 flags; /* vertex flags */ - float x, y, z; /* the coordinates */ - float u0, v0; /* texture coords 0 */ - uint32 argb0; /* vertex color 0 */ - uint32 oargb0; /* offset color 0 */ - float u1, v1; /* texture coords 1 */ - uint32 argb1; /* vertex color 1 */ - uint32 oargb1; /* offset color 1 */ - uint32 d1, d2, d3, d4; /* dummies */ + uint32 flags; /**< \brief TA command (vertex flags) */ + float x; /**< \brief X coordinate */ + float y; /**< \brief Y coordinate */ + float z; /**< \brief Z coordinate */ + float u0; /**< \brief Texture U coordinate (outside) */ + float v0; /**< \brief Texture V coordinate (outside) */ + uint32 argb0; /**< \brief Vertex color (outside) */ + uint32 oargb0; /**< \brief Vertex offset color (outside) */ + float u1; /**< \brief Texture U coordinate (inside) */ + float v1; /**< \brief Texture V coordinate (inside) */ + uint32 argb1; /**< \brief Vertex color (inside) */ + uint32 oargb1; /**< \brief Vertex offset color (inside) */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ + uint32 d3; /**< \brief Dummy value */ + uint32 d4; /**< \brief Dummy value */ } pvr_vertex_tpcm_t; -/* Textured sprite. This vertex type is to be used with the sprite - polygon header and the sprite related commands to draw textured - sprites. */ +/** \brief PVR vertex type: Textured sprite. + + This vertex type is to be used with the sprite polygon header and the sprite + related commands to draw textured sprites. Note that there is on fourth Z + coordinate. I suppose it just gets interpolated? + + The U/V coordinates in here are in the 16-bit per coordinate form. Also, + like the fourth Z value, there is no fourth U or V, so it must get + interpolated from the others. + + \headerfile dc/pvr.h +*/ typedef struct { - uint32 flags; - float ax, ay, az; - float bx, by, bz; - float cx, cy, cz; - float dx, dy; - uint32 dummy; - uint32 auv; - uint32 buv; - uint32 cuv; + uint32 flags; /**< \brief TA command (vertex flags) */ + float ax; /**< \brief First X coordinate */ + float ay; /**< \brief First Y coordinate */ + float az; /**< \brief First Z coordinate */ + float bx; /**< \brief Second X coordinate */ + float by; /**< \brief Second Y coordinate */ + float bz; /**< \brief Second Z coordinate */ + float cx; /**< \brief Third X coordinate */ + float cy; /**< \brief Third Y coordinate */ + float cz; /**< \brief Third Z coordinate */ + float dx; /**< \brief Fourth X coordinate */ + float dy; /**< \brief Fourth Y coordinate */ + uint32 dummy; /**< \brief Dummy value */ + uint32 auv; /**< \brief First U/V texture coordinates */ + uint32 buv; /**< \brief Second U/V texture coordinates */ + uint32 cuv; /**< \brief Third U/V texture coordinates */ } pvr_sprite_txr_t; -/* Untextured sprite. This vertex type is to be used with the sprite - polygon header and the sprite related commands to draw untextured - sprites (aka, quads). */ +/** \brief PVR vertex type: Untextured sprite. + + This vertex type is to be used with the sprite polygon header and the sprite + related commands to draw untextured sprites (aka, quads). +*/ typedef struct { - uint32 flags; - float ax, ay, az; - float bx, by, bz; - float cx, cy, cz; - float dx, dy; - uint32 d1, d2, d3, d4; + uint32 flags; /**< \brief TA command (vertex flags) */ + float ax; /**< \brief First X coordinate */ + float ay; /**< \brief First Y coordinate */ + float az; /**< \brief First Z coordinate */ + float bx; /**< \brief Second X coordinate */ + float by; /**< \brief Second Y coordinate */ + float bz; /**< \brief Second Z coordinate */ + float cx; /**< \brief Third X coordinate */ + float cy; /**< \brief Third Y coordinate */ + float cz; /**< \brief Third Z coordinate */ + float dx; /**< \brief Fourth X coordinate */ + float dy; /**< \brief Fourth Y coordinate */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ + uint32 d3; /**< \brief Dummy value */ + uint32 d4; /**< \brief Dummy value */ } pvr_sprite_col_t; -/* This vertex is only for modifer volumes */ +/** \brief PVR vertex type: Modifier volume. + + This vertex type is to be used with the modifier volume header to specify + triangular modifier areas. +*/ typedef struct { - uint32 flags; /* vertex flags */ - float ax, ay, az; /* 3 sets of coordinates */ - float bx, by, bz; - float cx, cy, cz; - uint32 d1, d2, d3, d4, d5, d6; /* dummies */ + uint32 flags; /**< \brief TA command (vertex flags) */ + float ax; /**< \brief First X coordinate */ + float ay; /**< \brief First Y coordinate */ + float az; /**< \brief First Z coordinate */ + float bx; /**< \brief Second X coordinate */ + float by; /**< \brief Second Y coordinate */ + float bz; /**< \brief Second Z coordinate */ + float cx; /**< \brief Third X coordinate */ + float cy; /**< \brief Third Y coordinate */ + float cz; /**< \brief Third Z coordinate */ + uint32 d1; /**< \brief Dummy value */ + uint32 d2; /**< \brief Dummy value */ + uint32 d3; /**< \brief Dummy value */ + uint32 d4; /**< \brief Dummy value */ + uint32 d5; /**< \brief Dummy value */ + uint32 d6; /**< \brief Dummy value */ } pvr_modifier_vol_t; -/* Small macro for packing float color values */ +/** \brief Pack four floating point color values into a 32-bit integer form. + + All of the color values should be between 0 and 1. + + \param a Alpha value + \param r Red value + \param g Green value + \param b Blue value + \return The packed color value +*/ #define PVR_PACK_COLOR(a, r, g, b) ( \ ( ((uint8)( a * 255 ) ) << 24 ) | \ ( ((uint8)( r * 255 ) ) << 16 ) | \ ( ((uint8)( g * 255 ) ) << 8 ) | \ ( ((uint8)( b * 255 ) ) << 0 ) ) -/* Small function for packing two 32-bit u/v values into - two 16-bit u/v values. */ +/** \brief Pack two floating point coordinates into one 32-bit value, + truncating them to 16-bits each. + + \param u First coordinate to pack + \param v Second coordinate to pack + \return The packed coordinates +*/ static inline uint32 PVR_PACK_16BIT_UV(float u, float v) { return ( ((*((uint32 *) &u)) >> 0 ) & 0xFFFF0000 ) | ( ((*((uint32 *) &v)) >> 16 ) & 0x0000FFFF ); @@ -663,17 +800,30 @@ /* ... other vertex structs omitted for now ... */ -/* Constants that apply to all primitives */ -#define PVR_CMD_POLYHDR 0x80840000 /* sublist, striplength=2 */ -#define PVR_CMD_VERTEX 0xe0000000 -#define PVR_CMD_VERTEX_EOL 0xf0000000 -#define PVR_CMD_USERCLIP 0x20000000 -#define PVR_CMD_MODIFIER 0x80000000 -#define PVR_CMD_SPRITE 0xA0000000 +/** \defgroup pvr_commands TA command values -/* Constants and bitmasks for handling polygon headers; note that thanks - to the arrangement of constants above, this is mainly a matter of bit - shifting to compile it... */ + These are are appropriate values for TA commands. Use whatever goes with the + primitive type you're using. + + @{ +*/ +#define PVR_CMD_POLYHDR 0x80840000 /**< \brief PVR polygon header. + Striplength set to 2 */ +#define PVR_CMD_VERTEX 0xe0000000 /**< \brief PVR vertex data */ +#define PVR_CMD_VERTEX_EOL 0xf0000000 /**< \brief PVR vertex, end of strip */ +#define PVR_CMD_USERCLIP 0x20000000 /**< \brief PVR user clipping area */ +#define PVR_CMD_MODIFIER 0x80000000 /**< \brief PVR modifier volume */ +#define PVR_CMD_SPRITE 0xA0000000 /**< \brief PVR sprite header */ +/** @} */ + +/** \defgroup pvr_bitmasks Constants and bitmasks for handling polygon + headers. + + Note that thanks to the arrangement of constants, this is mainly a matter of + bit shifting to compile headers... + + @{ +*/ #define PVR_TA_CMD_TYPE_SHIFT 24 #define PVR_TA_CMD_TYPE_MASK (7 << PVR_TA_CMD_TYPE_SHIFT) @@ -760,143 +910,206 @@ #define PVR_TA_PM3_TXRFMT_SHIFT 0 #define PVR_TA_PM3_TXRFMT_MASK 0xffffffff +/** @} */ - - /**** Register macros ***************************************************/ /* We use these macros to do all PVR register access, so that it's simple later on to hook them for debugging or whatnot. */ +/** \brief Retrieve a PVR register value + \param REG The register to fetch + \return The value of that register (32-bits) +*/ #define PVR_GET(REG) (* ( (uint32*)( 0xa05f8000 + (REG) ) ) ) + +/** \brief Set a PVR register value + \param REG The register to set + \param VALUE The value to set in the register (32-bits) +*/ #define PVR_SET(REG, VALUE) PVR_GET(REG) = (VALUE) /* The registers themselves; these are from Maiwe's powervr-reg.txt */ /* Note that 2D specific registers have been excluded for now (like vsync, hsync, v/h size, etc) */ -#define PVR_ID 0x0000 /* Chip ID */ -#define PVR_REVISION 0x0004 /* Chip revision */ -#define PVR_RESET 0x0008 /* Reset pins */ -#define PVR_ISP_START 0x0014 /* Start the ISP/TSP */ -#define PVR_UNK_0018 0x0018 /* ?? */ -#define PVR_ISP_VERTBUF_ADDR 0x0020 /* Vertex buffer address for scene rendering */ -#define PVR_ISP_TILEMAT_ADDR 0x002c /* Tile matrix address for scene rendering */ -#define PVR_SPANSORT_CFG 0x0030 /* ?? -- write 0x101 for now */ -#define PVR_FB_CFG_1 0x0044 /* Framebuffer config 1 */ -#define PVR_FB_CFG_2 0x0048 /* Framebuffer config 2 */ -#define PVR_RENDER_MODULO 0x004c /* Render modulo */ -#define PVR_RENDER_ADDR 0x0060 /* Render output address */ -#define PVR_RENDER_ADDR_2 0x0064 /* Output for strip-buffering */ -#define PVR_PCLIP_X 0x0068 /* Horizontal clipping area */ -#define PVR_PCLIP_Y 0x006c /* Vertical clipping area */ -#define PVR_CHEAP_SHADOW 0x0074 /* Cheap shadow control */ -#define PVR_OBJECT_CLIP 0x0078 /* Distance for polygon culling */ -#define PVR_UNK_007C 0x007c /* ?? -- write 0x0027df77 for now */ -#define PVR_UNK_0080 0x0080 /* ?? -- write 7 for now */ -#define PVR_TEXTURE_CLIP 0x0084 /* Distance for texture clipping */ -#define PVR_BGPLANE_Z 0x0088 /* Distance for background plane */ -#define PVR_BGPLANE_CFG 0x008c /* Background plane config */ -#define PVR_UNK_0098 0x0098 /* ?? -- write 0x00800408 for now */ -#define PVR_UNK_00A0 0x00a0 /* ?? -- write 0x20 for now */ -#define PVR_UNK_00A8 0x00a8 /* ?? -- write 0x15d1c951 for now */ -#define PVR_FOG_TABLE_COLOR 0x00b0 /* Table fog color */ -#define PVR_FOG_VERTEX_COLOR 0x00b4 /* Vertex fog color */ -#define PVR_FOG_DENSITY 0x00b8 /* Fog density coefficient */ -#define PVR_COLOR_CLAMP_MAX 0x00bc /* RGB Color clamp max */ -#define PVR_COLOR_CLAMP_MIN 0x00c0 /* RGB Color clamp min */ -#define PVR_GUN_POS 0x00c4 /* Light gun position */ -#define PVR_UNK_00C8 0x00c8 /* ?? -- write same as border H in 00d4 << 16 */ -#define PVR_VPOS_IRQ 0x00cc /* Vertical position IRQ */ -#define PVR_TEXTURE_MODULO 0x00e4 /* Output texture width modulo */ -#define PVR_VIDEO_CFG 0x00e8 /* Misc video config */ -#define PVR_SCALER_CFG 0x00f4 /* Smoothing scaler */ -#define PVR_PALETTE_CFG 0x0108 /* Palette format */ -#define PVR_SYNC_STATUS 0x010c /* V/H blank status */ -#define PVR_UNK_0110 0x0110 /* ?? -- write 0x93f39 for now */ -#define PVR_UNK_0114 0x0114 /* ?? -- write 0x200000 for now */ -#define PVR_UNK_0118 0x0118 /* ?? -- write 0x8040 for now */ -#define PVR_TA_OPB_START 0x0124 /* Object Pointer Buffer start for TA usage */ -#define PVR_TA_VERTBUF_START 0x0128 /* Vertex buffer start for TA usage */ -#define PVR_TA_OPB_END 0x012c /* OPB end for TA usage */ -#define PVR_TA_VERTBUF_END 0x0130 /* Vertex buffer end for TA usage */ -#define PVR_TA_OPB_POS 0x0134 /* Top used memory location in OPB for TA usage */ -#define PVR_TA_VERTBUF_POS 0x0138 /* Top used memory location in vertbuf for TA usage */ -#define PVR_TILEMAT_CFG 0x013c /* Tile matrix size config */ -#define PVR_OPB_CFG 0x0140 /* Active lists / list size */ -#define PVR_TA_INIT 0x0144 /* Initialize vertex reg. params */ -#define PVR_YUV_ADDR 0x0148 /* YUV conversion destination */ -#define PVR_YUV_CFG_1 0x014c /* YUV configuration */ -#define PVR_UNK_0160 0x0160 /* ?? */ -#define PVR_TA_OPB_INIT 0x0164 /* Object pointer buffer position init */ -#define PVR_FOG_TABLE_BASE 0x0200 /* Base of the fog table */ -#define PVR_PALETTE_TABLE_BASE 0x1000 /* Base of the palette table */ +/** \defgroup pvr_regs Offsets to registers of the PVR + @{ +*/ +#define PVR_ID 0x0000 /**< \brief Chip ID */ +#define PVR_REVISION 0x0004 /**< \brief Chip revision */ +#define PVR_RESET 0x0008 /**< \brief Reset pins */ +#define PVR_ISP_START 0x0014 /**< \brief Start the ISP/TSP */ +#define PVR_UNK_0018 0x0018 /**< \brief ?? */ +#define PVR_ISP_VERTBUF_ADDR 0x0020 /**< \brief Vertex buffer address for scene rendering */ +#define PVR_ISP_TILEMAT_ADDR 0x002c /**< \brief Tile matrix address for scene rendering */ +#define PVR_SPANSORT_CFG 0x0030 /**< \brief ?? -- write 0x101 for now */ +#define PVR_FB_CFG_1 0x0044 /**< \brief Framebuffer config 1 */ +#define PVR_FB_CFG_2 0x0048 /**< \brief Framebuffer config 2 */ +#define PVR_RENDER_MODULO 0x004c /**< \brief Render modulo */ +#define PVR_RENDER_ADDR 0x0060 /**< \brief Render output address */ +#define PVR_RENDER_ADDR_2 0x0064 /**< \brief Output for strip-buffering */ +#define PVR_PCLIP_X 0x0068 /**< \brief Horizontal clipping area */ +#define PVR_PCLIP_Y 0x006c /**< \brief Vertical clipping area */ +#define PVR_CHEAP_SHADOW 0x0074 /**< \brief Cheap shadow control */ +#define PVR_OBJECT_CLIP 0x0078 /**< \brief Distance for polygon culling */ +#define PVR_UNK_007C 0x007c /**< \brief ?? -- write 0x0027df77 for now */ +#define PVR_UNK_0080 0x0080 /**< \brief ?? -- write 7 for now */ +#define PVR_TEXTURE_CLIP 0x0084 /**< \brief Distance for texture clipping */ +#define PVR_BGPLANE_Z 0x0088 /**< \brief Distance for background plane */ +#define PVR_BGPLANE_CFG 0x008c /**< \brief Background plane config */ +#define PVR_UNK_0098 0x0098 /**< \brief ?? -- write 0x00800408 for now */ +#define PVR_UNK_00A0 0x00a0 /**< \brief ?? -- write 0x20 for now */ +#define PVR_UNK_00A8 0x00a8 /**< \brief ?? -- write 0x15d1c951 for now */ +#define PVR_FOG_TABLE_COLOR 0x00b0 /**< \brief Table fog color */ +#define PVR_FOG_VERTEX_COLOR 0x00b4 /**< \brief Vertex fog color */ +#define PVR_FOG_DENSITY 0x00b8 /**< \brief Fog density coefficient */ +#define PVR_COLOR_CLAMP_MAX 0x00bc /**< \brief RGB Color clamp max */ +#define PVR_COLOR_CLAMP_MIN 0x00c0 /**< \brief RGB Color clamp min */ +#define PVR_GUN_POS 0x00c4 /**< \brief Light gun position */ +#define PVR_UNK_00C8 0x00c8 /**< \brief ?? -- write same as border H in 00d4 << 16 */ +#define PVR_VPOS_IRQ 0x00cc /**< \brief Vertical position IRQ */ +#define PVR_TEXTURE_MODULO 0x00e4 /**< \brief Output texture width modulo */ +#define PVR_VIDEO_CFG 0x00e8 /**< \brief Misc video config */ +#define PVR_SCALER_CFG 0x00f4 /**< \brief Smoothing scaler */ +#define PVR_PALETTE_CFG 0x0108 /**< \brief Palette format */ +#define PVR_SYNC_STATUS 0x010c /**< \brief V/H blank status */ +#define PVR_UNK_0110 0x0110 /**< \brief ?? -- write 0x93f39 for now */ +#define PVR_UNK_0114 0x0114 /**< \brief ?? -- write 0x200000 for now */ +#define PVR_UNK_0118 0x0118 /**< \brief ?? -- write 0x8040 for now */ +#define PVR_TA_OPB_START 0x0124 /**< \brief Object Pointer Buffer start for TA usage */ +#define PVR_TA_VERTBUF_START 0x0128 /**< \brief Vertex buffer start for TA usage */ +#define PVR_TA_OPB_END 0x012c /**< \brief OPB end for TA usage */ +#define PVR_TA_VERTBUF_END 0x0130 /**< \brief Vertex buffer end for TA usage */ +#define PVR_TA_OPB_POS 0x0134 /**< \brief Top used memory location in OPB for TA usage */ +#define PVR_TA_VERTBUF_POS 0x0138 /**< \brief Top used memory location in vertbuf for TA usage */ +#define PVR_TILEMAT_CFG 0x013c /**< \brief Tile matrix size config */ +#define PVR_OPB_CFG 0x0140 /**< \brief Active lists / list size */ +#define PVR_TA_INIT 0x0144 /**< \brief Initialize vertex reg. params */ +#define PVR_YUV_ADDR 0x0148 /**< \brief YUV conversion destination */ +#define PVR_YUV_CFG_1 0x014c /**< \brief YUV configuration */ +#define PVR_UNK_0160 0x0160 /**< \brief ?? */ +#define PVR_TA_OPB_INIT 0x0164 /**< \brief Object pointer buffer position init */ +#define PVR_FOG_TABLE_BASE 0x0200 /**< \brief Base of the fog table */ +#define PVR_PALETTE_TABLE_BASE 0x1000 /**< \brief Base of the palette table */ +/** @} */ /* Useful memory locations */ -#define PVR_TA_INPUT 0x10000000 /* TA command input */ -#define PVR_RAM_BASE 0xa5000000 /* PVR RAM (raw) */ -#define PVR_RAM_INT_BASE 0xa4000000 /* PVR RAM (interleaved) */ -#define PVR_RAM_SIZE (8*1024*1024) /* RAM size in bytes */ -#define PVR_RAM_TOP (PVR_RAM_BASE + PVR_RAM_SIZE) /* Top of raw PVR RAM */ -#define PVR_RAM_INT_TOP (PVR_RAM_INT_BASE + PVR_RAM_SIZE) /* Top of int PVR RAM */ +#define PVR_TA_INPUT 0x10000000 /**< \brief TA command input */ +#define PVR_RAM_BASE 0xa5000000 /**< \brief PVR RAM (raw) */ +#define PVR_RAM_INT_BASE 0xa4000000 /**< \brief PVR RAM (interleaved) */ +#define PVR_RAM_SIZE (8*1024*1024) /**< \brief RAM size in bytes */ + +#define PVR_RAM_TOP (PVR_RAM_BASE + PVR_RAM_SIZE) /**< \brief Top of raw PVR RAM */ +#define PVR_RAM_INT_TOP (PVR_RAM_INT_BASE + PVR_RAM_SIZE) /**< \brief Top of int PVR RAM */ + /* Register content defines, as needed; these will be filled in over time as the implementation requires them. There's too many to do otherwise. */ -#define PVR_RESET_ALL 0xffffffff /* PVR_RESET */ -#define PVR_RESET_NONE 0x00000000 -#define PVR_RESET_TA 0x00000001 -#define PVR_RESET_ISPTSP 0x00000002 +/** \defgroup pvr_reset_vals Values used to reset parts of the PVR -#define PVR_ISP_START_GO 0xffffffff /* PVR_ISP_START */ + These values are written to the PVR_RESET register in order to reset the + system or to take it out of reset. -#define PVR_TA_INIT_GO 0x80000000 /* PVR_TA_INIT */ + @{ +*/ +#define PVR_RESET_ALL 0xffffffff /**< \brief Reset the wole PVR */ +#define PVR_RESET_NONE 0x00000000 /**< \brief Cancel reset state */ +#define PVR_RESET_TA 0x00000001 /**< \brief Reset only the TA */ +#define PVR_RESET_ISPTSP 0x00000002 /**< \brief Reset only the ISP/TSP */ +/** @} */ +#define PVR_ISP_START_GO 0xffffffff /**< \brief Write to the PVR_ISP_START register to start rendering */ +#define PVR_TA_INIT_GO 0x80000000 /**< \brief Write to the PVR_TA_INIT register to confirm settings */ + + /* Initialization ****************************************************/ /* Initialization and shutdown: stuff you should only ever have to do once in your program. */ -/* Bin sizes */ -#define PVR_BINSIZE_0 0 -#define PVR_BINSIZE_8 8 -#define PVR_BINSIZE_16 16 -#define PVR_BINSIZE_32 32 +/** \defgroup pvr_binsizes Available sizes for primitive bins + @{ +*/ +#define PVR_BINSIZE_0 0 /**< \brief 0-length (disables the list) */ +#define PVR_BINSIZE_8 8 /**< \brief 8-word (32-byte) length */ +#define PVR_BINSIZE_16 16 /**< \brief 16-word (64-byte) length */ +#define PVR_BINSIZE_32 32 /**< \brief 32-word (128-byte) length */ +/** @} */ -/* You'll fill in this structure before calling init */ +/** \brief PVR initialization structure + + This structure defines how the PVR initializes various parts of the system, + including the primitive bin sizes, the vertex buffer size, and whether + vertex DMA will be enabled. + + You essentially fill one of these in, and pass it to pvr_init(). + + \headerfile dc/pvr.h +*/ typedef struct { - /* Bin sizes: opaque polygons, opaque modifiers, translucent - polygons, translucent modifiers, punch-thrus */ - int opb_sizes[5]; + /** \brief Bin sizes. - /* Vertex buffer size (should be a nice round number) */ - int vertex_buf_size; + The bins go in the following order: opaque polygons, opaque modifiers, + translucent polygons, translucent modifiers, punch-thrus + */ + int opb_sizes[5]; - /* Non-zero if we want to enable vertex DMA mode. Note that - if this is set, then _all_ enabled lists need to have a - vertex buffer assigned. */ - int dma_enabled; + /** \brief Vertex buffer size (should be a nice round number) */ + int vertex_buf_size; - /* Non-zero if horizontal scaling is to be enabled. By enabling - this setting and stretching your image to double the native - screen width, you can get horizontal full-screen anti-aliasing. */ - int fsaa_enabled; + /** \brief Enable vertex DMA? + + Set to non-zero if we want to enable vertex DMA mode. Note that if this + is set, then _all_ enabled lists need to have a vertex buffer assigned, + even if you never use that list for anything. + */ + int dma_enabled; + + /** \brief Enable horizontal scaling? + + Set to non-zero if horizontal scaling is to be enabled. By enabling this + setting and stretching your image to double the native screen width, you + can get horizontal full-screen anti-aliasing. */ + int fsaa_enabled; } pvr_init_params_t; -/* Initialize the PVR chip to ready status, enabling the specified lists - and using the specified parameters; note that bins and vertex buffers - come from the texture memory pool! Expects that a 2D mode was - initialized already using the vid_* API. */ +/** \brief Initialize the PVR chip to ready status. + + This function enables the specified lists and uses the specified parameters. + Note that bins and vertex buffers come from the texture memory pool, so only + allocate what you actually need. Expects that a 2D mode was initialized + already using the vid_* API. + + \param params The set of parameters to initialize with + \retval 0 On success + \retval -1 If the PVR has already been initialized or the video + mode active is not suitable for 3D +*/ int pvr_init(pvr_init_params_t *params); -/* Simpler function which initializes the PVR using 16/16 for the opaque - and translucent lists, and 0's for everything else; 512k of vertex - buffer. This is equivalent to the old ta_init_defaults() for now. */ +/** \brief Simple PVR initialization. + + This simpler function initializes the PVR using 16/16 for the opaque + and translucent lists' bin sizes, and 0's for everything else. It sets 512KB + of vertex buffer. This is equivalent to the old ta_init_defaults() for now. + + \retval 0 On success + \retval -1 If the PVR has already been initialized or the video + mode active is not suitable for 3D +*/ int pvr_init_defaults(); -/* Shut down the PVR chip from ready status, leaving it in 2D mode as it - was before the init. */ +/** \brief Shut down the PVR chip from ready status. + + This essentially leaves the video system in 2D mode as it was before the + init. + + \retval 0 On success + \retval -1 If the PVR has not been initialized +*/ int pvr_shutdown(); @@ -905,30 +1118,58 @@ /* These are miscellaneous parameters you can set which affect the rendering process. */ -/* Set the background plane color (the area of the screen not covered by - any other polygons) */ +/** \brief Set the background plane color. + + This function sets the color of the area of the screen not covered by any + other polygons. + + \param r Red component of the color to set + \param g Green component of the color to set + \param b Blue component of the color to set +*/ void pvr_set_bg_color(float r, float g, float b); -/* Return the current VBlank count */ +/** \brief Retrieve the current VBlank count. + + This function retrieves the number of VBlank interrupts that have occurred + since the PVR was initialized. + + \return The number of VBlanks since init +*/ int pvr_get_vbl_count(); /* Statistics structure */ +/** \brief PVR statistics structure. + + This structure is used to hold various statistics about the operation of the + PVR since initialization. + + \headerfile dc/pvr.h +*/ typedef struct pvr_stats { - uint32 enabled_list_mask; /* Which lists are enabled? */ - uint32 vbl_count; /* VBlank count */ - int frame_last_time; /* Ready-to-Ready length for the last frame in milliseconds */ - float frame_rate; /* Current frame rate (per second) */ - int reg_last_time; /* Registration time for the last frame in milliseconds */ - int rnd_last_time; /* Rendering time for the last frame in milliseconds */ - int vtx_buffer_used; /* Number of bytes used in the vertex buffer for the last frame */ - int vtx_buffer_used_max; /* Number of bytes used in the vertex buffer for the largest frame */ - int buf_last_time; /* DMA buffer file time for the last frame in milliseconds */ - uint32 frame_count; /* Total number of rendered/viewed frames */ - /* ... more later as it's implemented ... */ + uint32 enabled_list_mask; /**< \brief Which lists are enabled? */ + uint32 vbl_count; /**< \brief VBlank count */ + int frame_last_time; /**< \brief Ready-to-Ready length for the last frame in milliseconds */ + float frame_rate; /**< \brief Current frame rate (per second) */ + int reg_last_time; /**< \brief Registration time for the last frame in milliseconds */ + int rnd_last_time; /**< \brief Rendering time for the last frame in milliseconds */ + int vtx_buffer_used; /**< \brief Number of bytes used in the vertex buffer for the last frame */ + int vtx_buffer_used_max;/**< \brief Number of bytes used in the vertex buffer for the largest frame */ + int buf_last_time; /**< \brief DMA buffer file time for the last frame in milliseconds */ + uint32 frame_count; /**< \brief Total number of rendered/viewed frames */ + /* ... more later as it's implemented ... */ } pvr_stats_t; -/* Fill in a statistics structure (above) from current data. This - is a super-set of frame count. */ +/** \brief Get the current statistics from the PVR. + + This function fills in the pvr_stats_t structure passed in with the current + statistics of the system. + + \param stat The statistics structure to fill in. Must not be + NULL + \retval 0 On success + \retval -1 If the PVR is not initialized +*/ int pvr_get_stats(pvr_stats_t *stat); @@ -939,17 +1180,44 @@ most of the time, but they can be useful for doing some interesting special effects, like the old cheap "worm hole". */ -/* Palette formats */ -#define PVR_PAL_ARGB1555 0 -#define PVR_PAL_RGB565 1 -#define PVR_PAL_ARGB4444 2 -#define PVR_PAL_ARGB8888 3 +/** \defgroup pvr_palfmts PVR palette formats -/* Set the palette format */ + Entries in the PVR's palettes can be of any of these formats. Note that you + can only have one format active at a time. + + @{ +*/ +#define PVR_PAL_ARGB1555 0 /**< \brief 16-bit ARGB1555 palette format */ +#define PVR_PAL_RGB565 1 /**< \brief 16-bit RGB565 palette format */ +#define PVR_PAL_ARGB4444 2 /**< \brief 16-bit ARGB4444 palette format */ +#define PVR_PAL_ARGB8888 3 /**< \brief 32-bit ARGB8888 palette format */ +/** @} */ + +/** \brief Set the palette format. + + This function sets the currently active palette format on the PVR. Each + entry in the palette table is 32-bits in length, regardless of what color + format is in use. + + Be sure to use care when using the PVR_PAL_ARGB8888 format. Rendering speed + is greatly affected (cut about in half) if you use any filtering with + paletted textures with ARGB8888 entries in the palette. + + \param fmt The format to use + \see pvr_palfmts +*/ void pvr_set_pal_format(int fmt); -/* Set a palette value; note that the format of the table is variable, - so for maximum speed we simply let the user decide what to do here. */ +/** \brief Set a palette value. + + Note that while the color format is variable, each entry is still 32-bits in + length regardless (and you only get a total of 1024 of them). If using one + of the 16-bit palette formats, only the low-order 16-bits of the entry are + valid, and the high bits should be filled in with 0. + + \param idx The index to set to (0-1023) + \param value The color value to set in that palette entry +*/ static inline void pvr_set_pal_entry(uint32 idx, uint32 value) { PVR_SET(PVR_PALETTE_TABLE_BASE + 4*idx, value); } @@ -959,25 +1227,79 @@ /* Thanks to Paul Boese for figuring this stuff out */ -/* Set the fog table color */ +/** \brief Set the table fog color. + + This function sets the color of fog for table fog. 0-1 range for all colors. + + \param a Alpha value of the fog + \param r Red value of the fog + \param g Green value of the fog + \param b Blue value of the fog +*/ void pvr_fog_table_color(float a, float r, float g, float b); -/* Set the fog vertex color */ +/** \brief Set the vertex fog color. + + This function sets the fog color for vertex fog. 0-1 range for all colors. + This function is currently not implemented, as vertex fog is not supported + by KOS. Calling this function will cause an assertion failure. + + \param a Alpha value of the fog + \param r Red value of the fog + \param g Green value of the fog + \param b Blue value of the fog +*/ void pvr_fog_vertex_color(float a, float r, float g, float b); -/* Set the fog far depth */ +/** \brief Set the fog far depth. + + This function sets the PVR_FOG_DENSITY register appropriately for the + specified value. + + \param d The depth to set +*/ void pvr_fog_far_depth(float d); -/* Initialize the fog table using an exp2 algorithm (like GL_EXP2) */ +/** \brief Initialize the fog table using an exp2 algorithm (like GL_EXP2). + + This function will automatically set the PVR_FOG_DENSITY register to + 259.999999 as a part of its processing, then set up the fog table. + + \param density Fog density value +*/ void pvr_fog_table_exp2(float density); -/* Initialize the fog table using an exp algorithm (like GL_EXP) */ +/** \brief Initialize the fog table using an exp algorithm (like GL_EXP). + + This function will automatically set the PVR_FOG_DENSITY register to + 259.999999 as a part of its processing, then set up the fog table. + + \param density Fog density value +*/ void pvr_fog_table_exp(float density); -/* Initialize the fog table using a linear algorithm (like GL_LINEAR) */ +/** \brief Initialize the fog table using a linear algorithm (like GL_LINEAR). + + This function will set the PVR_FOG_DENSITY register to the as appropriate + for the end value, and initialize the fog table for perspectively correct + linear fog. + + \param start Fog start point + \param end Fog end point +*/ void pvr_fog_table_linear(float start, float end); -/* Set a custom fog table from float values */ +/** \brief Set a custom fog table from float values + + This function allows you to specify whatever values you need to for your fog + parameters. All values should be clamped between 0 and 1, and its your + responsibility to set up the PVR_FOG_DENSITY register by calling + pvr_fog_far_depth() with an appropriate value. The table passed in should + have 129 entries, where the 0th entry is farthest from the eye and the last + entry is nearest. Higher values = heavier fog. + + \param tbl1 The table of fog values to set +*/ void pvr_fog_table_custom(float tbl1[]); @@ -986,25 +1308,49 @@ /* PVR memory management in KOS uses a modified dlmalloc; see the source file pvr_mem_core.c for more info. */ -/* Allocate a chunk of memory from texture space; the returned value - will be relative to the base of texture memory (zero-based) */ +/** \brief Allocate a chunk of memory from texture space. + + This function acts as the memory allocator for the PVR texture RAM pool. It + acts exactly as one would expect a malloc() function to act, returning a + normal pointer that can be directly written to if one desires to do so. All + allocations will be aligned to a 32-byte boundary. + + \param size The amount of memory to allocate + \return A pointer to the memory on success, NULL on error +*/ pvr_ptr_t pvr_mem_malloc(size_t size); -/* Free a previously allocated chunk of memory */ +/** \brief Free a block of allocated memory in the PVR RAM pool. + + This function frees memory previously allocated with pvr_mem_malloc(). + + \param chunk The location of the start of the block to free +*/ void pvr_mem_free(pvr_ptr_t chunk); -/* Return the number of bytes available still in the memory pool */ +/** \brief Return the number of bytes available still in the PVR RAM pool. + \return The number of bytes available +*/ uint32 pvr_mem_available(); -/* Reset the memory pool, equivalent to freeing all textures currently - residing in RAM. */ +/** \brief Reset the PVR RAM pool. + + This will essentially free any blocks allocated within the pool. There's + generally not many good reasons for doing this. +*/ void pvr_mem_reset(); -/* Check the memory block list to see what's allocated */ -/* Only available if you've enabled KM_DBG in pvr_mem.c */ +/** \brief Print the list of allocated blocks in the PVR RAM pool. + + This function only works if you've enabled KM_DBG in pvr_mem.c. +*/ void pvr_mem_print_list(); -/* Print some statistics (like mallocstats) */ +/** \brief Print statistics about the PVR RAM pool. + + This prints out statistics like what malloc_stats() provides. Also, if + KM_DBG is enabled in pvr_mem.c, it prints the list of allocated blocks. +*/ void pvr_mem_stats(); /* Scene rendering ***************************************************/ @@ -1047,126 +1393,217 @@ care of starting a frame rendering (after scene_finish()) and also flipping pages when appropriate. */ -/* Returns non-zero if vertex DMA was enabled at init time. */ +/** \brief Is vertex DMA enabled? + \return Non-zero if vertex DMA was enabled at init time +*/ int pvr_vertex_dma_enabled(); -/* Setup a vertex buffer for one of the list types. If the specified list type - already has a vertex buffer, it will be replaced by the new one; if NULL - is specified as a buffer location, the list type will be switched to direct - mode. The old buffer location will be returned (if any). Note that each - buffer should actually be twice as long (to hold two frames' worth of - data). The 'len' should be a multiple of 64, and the pointer should be - aligned to a 32-byte boundary. 'len' also may not be smaller than 128 - bytes, even if you have no intention of using the given list. Also you - should generally not try to do this at any time besides before a frame - is begin, or Bad Things May Happen. */ +/** \brief Setup a vertex buffer for one of the list types. + + If the specified list type already has a vertex buffer, it will be replaced + by the new one. Note that each buffer should actually be twice as long as + what you will need to hold two frames worth of data). + + You should generally not try to do this at any time besides before a frame + is begun, or Bad Things May Happen. + + \param list The primitive list to set the buffer for. + \param buffer The location of the buffer in main RAM. This must be + aligned to a 32-byte boundary. + \param len The length of the buffer. This must be a multiple of + 64, and must be at least 128 (even if you're not + using the list). + \return The old buffer location (if any) +*/ void * pvr_set_vertbuf(pvr_list_t list, void * buffer, int len); -/* Return a pointer to the current output location in the DMA buffer for - the requested list. DMA must globally be enabled for this to work. Data - may be added to this buffer by the user program directly. */ +/** \brief Retrieve a pointer to the current output location in the DMA buffer + for the requested list. + + Vertex DMA must globally be enabled for this to work. Data may be added to + this buffer by the user program directly; however, make sure to call + pvr_vertbuf_written() to notify the system of any such changes. + + \param list The primitive list to get the buffer for. + \return The tail of that list's buffer. +*/ void * pvr_vertbuf_tail(pvr_list_t list); -/* Notify the PVR system that data have been written into the output buffer - for the given list. This should always be done after writing data directly - to these buffers or it will get overwritten by other data. 'amt' is in - bytes and should _always_ be a multiple of 32. */ +/** \brief Notify the PVR system that data have been written into the output + buffer for the given list. + + This should always be done after writing data directly to these buffers or + it will get overwritten by other data. + + \param list The primitive list that was modified. + \param amt Number of bytes written. Must be a multiple of 32. +*/ void pvr_vertbuf_written(pvr_list_t list, uint32 amt); -/* Begin collecting data for a frame of 3D output to the off-screen - frame buffer */ +/** \brief Begin collecting data for a frame of 3D output to the off-screen + frame buffer. + + You must call this function (or pvr_scene_begin_txr()) for ever frame of + output. +*/ void pvr_scene_begin(); -/* Begin collecting data for a frame of 3D output to the specified texture; - pass in the size of the buffer in rx and ry, and the return values in - rx and ry will be the size actually used (if changed). Note that - currently this only supports screen-sized output! */ +/** \brief Begin collecting data for a frame of 3D output to the specified + texture. + + This function currently only supports outputting at the same size as the + actual screen. Thus, make sure rx and ry are at least large enough for that. + For a 640x480 output, rx will generally be 1024 on input and ry 512, as + these are the smallest values that are powers of two and will hold the full + screen sized output. + + \param txr The texture to render to. + \param rx Width of the texture buffer (in pixels). + \param ry Height of the texture buffer (in pixels). +*/ void pvr_scene_begin_txr(pvr_ptr_t txr, uint32 *rx, uint32 *ry); -/* Begin collecting data for the given list type. Lists do not have to be - submitted in any particular order, but all types of a list must be - submitted at once (unless vertex DMA mode is enabled). If the given list - has already been closed, then an error (-1) is returned. Note that there - is no need to call this function in DMA mode unless you want to make use - of pvr_prim for compatibility. */ +/** \brief Begin collecting data for the given list type. + + Lists do not have to be submitted in any particular order, but all types of + a list must be submitted at once (unless vertex DMA mode is enabled). + + Note that there is no need to call this function in DMA mode unless you want + to make use of pvr_prim() for compatibility. This function will + automatically call pvr_list_finish() if a list is already opened before + opening the new list. + + \param list The list to open. + \retval 0 On success. + \retval -1 If the specified list has already been closed. +*/ int pvr_list_begin(pvr_list_t list); -/* End collecting data for the current list type. Lists can never be opened - again within a single frame once they have been closed. Thus submitting - a primitive that belongs in a closed list is considered an error. Closing - a list that is already closed is also an error (-1). Note that if you open - a list but do not submit any primitives, a blank one will be submitted to - satisfy the hardware. If vertex DMA mode is enabled, then this simply - sets the current list pointer to no list, and none of the above restrictions - apply. */ +/** \brief End collecting data for the current list type. + + Lists can never be opened again within a single frame once they have been + closed. Thus submitting a primitive that belongs in a closed list is + considered an error. Closing a list that is already closed is also an error. + + Note that if you open a list but do not submit any primitives, a blank one + will be submitted to satisfy the hardware. If vertex DMA mode is enabled, + then this simply sets the current list pointer to no list, and none of the + above restrictions apply. + + \retval 0 On success. + \retval -1 On error. +*/ int pvr_list_finish(); -/* Submit a primitive of the _current_ list type; note that any values - submitted in this fashion will go directly to the hardware without any - sort of buffering, and submitting a primitive of the wrong type will - quite likely ruin your scene. Note that this also will not work if you - haven't begun any list types (i.e., all data is queued). If DMA is enabled, - the primitive will be appended to the end of the currently selected list's - buffer. Returns -1 for failure. */ +/** \brief Submit a primitive of the current list type. + + Note that any values submitted in this fashion will go directly to the + hardware without any sort of buffering, and submitting a primitive of the + wrong type will quite likely ruin your scene. Note that this also will not + work if you haven't begun any list types (i.e., all data is queued). If DMA + is enabled, the primitive will be appended to the end of the currently + selected list's buffer. + + \param data The primitive to submit. + \param size The length of the primitive, in bytes. Must be a + multiple of 32. + \retval 0 On success. + \retval -1 On error. +*/ int pvr_prim(void * data, int size); -/* Initialize a state variable for Direct Rendering; variable should be - of the type pvr_dr_state_t */ +/** \brief Direct Rendering state variable type. */ +typedef uint32 pvr_dr_state_t; + +/** \brief Initialize a state variable for Direct Rendering. + + \param vtx_buf_ptr A variable of type pvr_dr_state_t to init. +*/ #define pvr_dr_init(vtx_buf_ptr) do { \ (vtx_buf_ptr) = 0; \ QACR0 = ((((uint32)PVR_TA_INPUT) >> 26) << 2) & 0x1c; \ QACR1 = ((((uint32)PVR_TA_INPUT) >> 26) << 2) & 0x1c; \ } while (0) -#define pvr_dr_state_t uint32 -/* Obtain the target address for Direct Rendering; this will return a - write-only destination address where a primitive should be written to get - ready to submit it to the TA in DR mode. You must pass in a variable - which was initialized with pvr_dr_init(). */ +/** \brief Obtain the target address for Direct Rendering. + + \param vtx_buf_ptr State variable for Direct Rendering. Should be of + type pvr_dr_state_t, and must have been initialized + previously in the scene with pvr_dr_init(). + \return A write-only destination address where a primitive + should be written to get ready to submit it to the + TA in DR mode. +*/ #define pvr_dr_target(vtx_buf_ptr) \ ({ (vtx_buf_ptr) ^= 32; \ (pvr_vertex_t *)(0xe0000000 | (vtx_buf_ptr)); \ }) -/* Commit a primitive written into the Direct Rendering target address; pass - the address returned by pvr_dr_target(). */ +/** \brief Commit a primitive written into the Direct Rendering target address. + + \param addr The address returned by pvr_dr_target(), after you + have written the primitive to it. +*/ #define pvr_dr_commit(addr) __asm__ __volatile__("pref @%0" : : "r" (addr)) -/* Submit a primitive of the given list type; if the requested list is not - the current list, then the data will be queued in a vertex buffer if - available, otherwise it will be submitted directly. If a vertex buffer - doesn't exist when one is needed, an error (-1) is returned. */ +/** \brief Submit a primitive of the given list type. + + Data will be queued in a vertex buffer, thus one must be available for the + list specified (will be asserted by the code). + + \param list The list to submit to. + \param data The primitive to submit. + \param size The size of the primitive in bytes. This must be a + multiple of 32. + \retval 0 On success. + \retval -1 On error. +*/ int pvr_list_prim(pvr_list_t list, void * data, int size); -/* Called to flush buffered data of the given list type to the hardware - processor. If there is no vertex buffer for the given type, then an error - (-1) is returned. The list must have been started with pvr_begin_list(). - This is intended to be used later in a "hybrid" mode where both direct - and DMA TA submission is possible. */ +/** \brief Flush the buffered data of the given list type to the TA. + + This function is currently not implemented, and calling it will result in an + assertion failure. It is intended to be used later in a "hybrid" mode where + both direct and DMA TA submission is possible. + + \param list The list to flush. + \retval -1 On error (it is not possible to succeed). +*/ int pvr_list_flush(pvr_list_t list); -/* Call this after you have finished submitting all data for a frame; once - this has been called, you can not submit any more data until one of the - pvr_scene_begin() functions is called again. An error (-1) is returned if - you have not started a scene already. */ +/** \brief Call this after you have finished submitting all data for a frame. + + Once this has been called, you can not submit any more data until one of the + pvr_scene_begin() or pvr_scene_begin_txr() functions is called again. + + \retval 0 On success. + \retval -1 On error (no scene started). +*/ int pvr_scene_finish(); -/* Block the caller until the PVR system is ready for another frame to be - submitted. The PVR system allocates enough space for two frames: one in - data collection mode, and another in rendering mode. If a frame is - currently rendering, and another frame has already been closed, then the - caller cannot do anything else until the rendering frame completes. Note - also that the new frame cannot be activated except during a vertical - blanking period, so this essentially waits until a rendered frame is - complete _AND_ a vertical blank happens. Returns -1 if the wait times - out. Note that once this returns, the PVR system is ready for another - frame's data to be collected. */ +/** \brief Block the caller until the PVR system is ready for another frame to + be submitted. + + The PVR system allocates enough space for two frames: one in data collection + mode, and an... [truncated message content] |