249bba03f1
This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
103 lines
3.3 KiB
C
103 lines
3.3 KiB
C
/***************************************************************************
|
|
* __________ __ ___.
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
* \/ \/ \/ \/ \/
|
|
* $Id$
|
|
*
|
|
* Copyright (C) 2005 Michiel van der Kolk, Jens Arnold
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
* KIND, either express or implied.
|
|
*
|
|
****************************************************************************/
|
|
#ifndef __ROCKMACROS_H__
|
|
#define __ROCKMACROS_H__
|
|
|
|
#include "plugin.h"
|
|
|
|
#define malloc(a) my_malloc(a)
|
|
void *my_malloc(size_t size);
|
|
|
|
extern int shut,cleanshut;
|
|
void vid_init(void);
|
|
void vid_begin(void);
|
|
void die(char *message, ...);
|
|
void doevents(void) ICODE_ATTR;
|
|
void ev_poll(void);
|
|
int do_user_menu(void);
|
|
void setvidmode(void);
|
|
#if defined(HAVE_LCD_COLOR)
|
|
void set_pal(void);
|
|
#else
|
|
void vid_update(int scanline);
|
|
#endif
|
|
#ifdef DYNAREC
|
|
extern struct dynarec_block newblock;
|
|
void dynamic_recompile (struct dynarec_block *newblock);
|
|
#endif
|
|
|
|
#define USER_MENU_QUIT -2
|
|
|
|
/* Disable IBSS when using dynarec since it won't fit */
|
|
#ifdef DYNAREC
|
|
#undef IBSS_ATTR
|
|
#define IBSS_ATTR
|
|
#endif
|
|
|
|
/* libc functions */
|
|
#define isdigit(c) ((c) >= '0' && (c) <= '9')
|
|
#define isalpha(c) (((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && ((c) <= 'Z')))
|
|
#define isalnum(c) (isdigit(c) || (isalpha(c)))
|
|
|
|
/* only 1 fixed argument for open, since variadic macros don't except empty
|
|
* variable parameters */
|
|
#define open(a, ...) rb->open((a), __VA_ARGS__)
|
|
#define lseek(a,b,c) rb->lseek((a),(b),(c))
|
|
#define close(a) rb->close((a))
|
|
#define read(a,b,c) rb->read((a),(b),(c))
|
|
#define write(a,b,c) rb->write((a),(b),(c))
|
|
#define strcat(a,b) rb->strcat((a),(b))
|
|
#define memset(a,b,c) rb->memset((a),(b),(c))
|
|
#define strcpy(a,b) rb->strcpy((a),(b))
|
|
#define strlcpy(a,b,c) rb->strlcpy((a),(b),(c))
|
|
#define strlen(a) rb->strlen((a))
|
|
#define strcmp(a,b) rb->strcmp((a),(b))
|
|
#define strchr(a,b) rb->strchr((a),(b))
|
|
#define strrchr(a,b) rb->strrchr((a),(b))
|
|
#define strcasecmp(a,b) rb->strcasecmp((a),(b))
|
|
#define srand(a) rb->srand((a))
|
|
#define rand() rb->rand()
|
|
#define atoi(a) rb->atoi((a))
|
|
#define strcat(a,b) rb->strcat((a),(b))
|
|
#define snprintf(...) rb->snprintf(__VA_ARGS__)
|
|
#define fdprintf(...) rb->fdprintf(__VA_ARGS__)
|
|
#define tolower(_A_) (isupper(_A_) ? (_A_ - 'A' + 'a') : _A_)
|
|
|
|
/* Using #define isn't enough with GCC 4.0.1 */
|
|
void* memcpy(void* dst, const void* src, size_t size) ICODE_ATTR;
|
|
|
|
struct options {
|
|
int A, B, START, SELECT, MENU;
|
|
int UP, DOWN, LEFT, RIGHT;
|
|
int frameskip, fps, maxskip;
|
|
int sound, scaling, showstats;
|
|
int autosave;
|
|
int rotate;
|
|
int pal;
|
|
int dirty;
|
|
};
|
|
|
|
extern bool plugbuf;
|
|
|
|
extern struct options options;
|
|
#define savedir ROCKBOX_DIR "/rockboy"
|
|
|
|
#endif
|