diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-01-20 13:05:52 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-01-20 13:05:52 +0000 |
commit | 137fb6cb9f0478303610443b95ae0a106f0a17d1 (patch) | |
tree | 9ac6685589536bc7c84962db8398fddf9d2b3154 /apps/plugins/rockboy/rockmacros.h | |
parent | c05cd1676f323f1346099f436aaa0212fd18e178 (diff) | |
download | rockbox-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.h | 21 |
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; | |||
28 | extern int shut,cleanshut; | 30 | extern int shut,cleanshut; |
29 | void vid_update(int scanline); | 31 | void vid_update(int scanline); |
30 | void vid_init(void); | 32 | void vid_init(void); |
31 | void vid_begin(void); | 33 | inline void vid_begin(void); |
32 | void vid_end(void); | 34 | void vid_end(void); |
33 | void die(char *message, ...); | 35 | void die(char *message, ...); |
34 | void setmallocpos(void *pointer); | 36 | void setmallocpos(void *pointer); |
@@ -38,7 +40,7 @@ int sys_elapsed(long *oldtick); | |||
38 | void sys_sleep(int us); | 40 | void sys_sleep(int us); |
39 | int pcm_submit(void); | 41 | int pcm_submit(void); |
40 | void pcm_init(void); | 42 | void pcm_init(void); |
41 | void doevents(void); | 43 | void doevents(void) ICODE_ATTR; |
42 | void ev_poll(void); | 44 | void ev_poll(void); |
43 | int do_user_menu(void); | 45 | int do_user_menu(void); |
44 | void loadstate(int fd); | 46 | void 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 */ |
94 | void* memcpy(void* dst, const void* src, size_t size); | 99 | void* memcpy(void* dst, const void* src, size_t size); |
95 | 100 | ||
96 | extern int frameskip; | 101 | struct options { |
97 | extern bool sound; | 102 | int A, B, START, SELECT, MENU; |
103 | int frameskip, fps, maxskip; | ||
104 | bool sound, fullscreen, showstats; | ||
105 | }; | ||
106 | |||
107 | extern struct options options; | ||
108 | #define savedir "/.rockbox/rockboy" | ||
109 | |||
110 | #endif | ||