summaryrefslogtreecommitdiff
path: root/apps/plugins/rockboy/rockmacros.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-01-20 13:05:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-01-20 13:05:52 +0000
commit137fb6cb9f0478303610443b95ae0a106f0a17d1 (patch)
tree9ac6685589536bc7c84962db8398fddf9d2b3154 /apps/plugins/rockboy/rockmacros.h
parentc05cd1676f323f1346099f436aaa0212fd18e178 (diff)
downloadrockbox-137fb6cb9f0478303610443b95ae0a106f0a17d1.tar.gz
rockbox-137fb6cb9f0478303610443b95ae0a106f0a17d1.zip
Karl Kurbjun's patch #1407719:
Here's another patch for rockboy that adds automatic frameskip (it's pretty rough as I haven't figured out an accurate timer), fullscreen support on the H300, and a bit of assembly and some IRAM stuff. I'm not sure if I'm doing the IRAM stuff correct though as it doesn't seem to make much of a difference if any. I've also added a statistics option that will show how many frames per second the gameboy is seeing (not what the player is getting) and what the frameskip is at. When you enable stats sometimes you have to go back into the menu and then come out to clear erronous values. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8397 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/rockboy/rockmacros.h')
-rw-r--r--apps/plugins/rockboy/rockmacros.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/apps/plugins/rockboy/rockmacros.h b/apps/plugins/rockboy/rockmacros.h
index c68223d478..bc9a0e8014 100644
--- a/apps/plugins/rockboy/rockmacros.h
+++ b/apps/plugins/rockboy/rockmacros.h
@@ -16,6 +16,8 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19#ifndef __ROCKMACROS_H__
20#define __ROCKMACROS_H__
19 21
20#include "plugin.h" 22#include "plugin.h"
21 23
@@ -28,7 +30,7 @@ extern struct plugin_api* rb;
28extern int shut,cleanshut; 30extern int shut,cleanshut;
29void vid_update(int scanline); 31void vid_update(int scanline);
30void vid_init(void); 32void vid_init(void);
31void vid_begin(void); 33inline void vid_begin(void);
32void vid_end(void); 34void vid_end(void);
33void die(char *message, ...); 35void die(char *message, ...);
34void setmallocpos(void *pointer); 36void setmallocpos(void *pointer);
@@ -38,7 +40,7 @@ int sys_elapsed(long *oldtick);
38void sys_sleep(int us); 40void sys_sleep(int us);
39int pcm_submit(void); 41int pcm_submit(void);
40void pcm_init(void); 42void pcm_init(void);
41void doevents(void); 43void doevents(void) ICODE_ATTR;
42void ev_poll(void); 44void ev_poll(void);
43int do_user_menu(void); 45int do_user_menu(void);
44void loadstate(int fd); 46void loadstate(int fd);
@@ -60,6 +62,8 @@ void savestate(int fd);
60#define mkdir(a,b) rb->sim_mkdir((a),(b)) 62#define mkdir(a,b) rb->sim_mkdir((a),(b))
61#undef open 63#undef open
62#define open(a,b) rb->sim_open((a),(b)) 64#define open(a,b) rb->sim_open((a),(b))
65#undef close
66#define close(a) rb->sim_close((a))
63#undef lseek 67#undef lseek
64#define lseek(a,b,c) rb->sim_lseek((a),(b),(c)) 68#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
65#else /* !SIMULATOR */ 69#else /* !SIMULATOR */
@@ -68,6 +72,7 @@ void savestate(int fd);
68#define mkdir(a,b) rb->mkdir((a),(b)) 72#define mkdir(a,b) rb->mkdir((a),(b))
69#define open(a,b) rb->open((a),(b)) 73#define open(a,b) rb->open((a),(b))
70#define lseek(a,b,c) rb->lseek((a),(b),(c)) 74#define lseek(a,b,c) rb->lseek((a),(b),(c))
75#define close(a) rb->close((a))
71#endif /* !SIMULATOR */ 76#endif /* !SIMULATOR */
72 77
73#define strcat(a,b) rb->strcat((a),(b)) 78#define strcat(a,b) rb->strcat((a),(b))
@@ -93,5 +98,13 @@ void savestate(int fd);
93/* Using #define isn't enough with GCC 4.0.1 */ 98/* Using #define isn't enough with GCC 4.0.1 */
94void* memcpy(void* dst, const void* src, size_t size); 99void* memcpy(void* dst, const void* src, size_t size);
95 100
96extern int frameskip; 101struct options {
97extern bool sound; 102 int A, B, START, SELECT, MENU;
103 int frameskip, fps, maxskip;
104 bool sound, fullscreen, showstats;
105};
106
107extern struct options options;
108#define savedir "/.rockbox/rockboy"
109
110#endif