This source file includes following definitions.
- hook_raw_fptr
- hook_raw_ret_addr
- hook_raw_image_addr
- vid_get_viewport_live_fb
- vid_get_bitmap_fb
- vid_get_viewport_fb
- vid_get_viewport_fb_d
- vid_get_viewport_height
- camera_jpeg_count_str
- vid_get_palette_type
- vid_get_palette_size
- vid_get_bitmap_active_palette
- vid_get_bitmap_active_buffer
- vid_get_viewport_width_proper
- vid_get_viewport_height_proper
- vid_get_viewport_fullscreen_height
- vid_get_viewport_fullscreen_width
- vid_get_viewport_display_xoffset_proper
- vid_get_viewport_display_yoffset_proper
1 #include "platform.h"
2 #include "keyboard.h"
3
4 void *hook_raw_fptr()
5 {
6 return (void*)0x440C0;
7 }
8
9 void *hook_raw_ret_addr()
10 {
11 return (void*)0xFFD4CBCC;
12 }
13
14 char *hook_raw_image_addr()
15 {
16 return (char*)(0x10800000+0x41000+0x260);
17 }
18
19 void *vid_get_viewport_live_fb()
20
21
22
23 {
24 void **fb=(void **)0x6028;
25 unsigned char buff = *((unsigned char*)0x6038);
26 if (buff == 0) {
27 buff = 2;
28 }
29 else {
30 buff--;
31 }
32 return fb[buff];
33 }
34
35 void *vid_get_bitmap_fb()
36 {
37 return (void*)0x10361000;
38 }
39
40 void *vid_get_viewport_fb()
41 {
42 return (void*)0x10E81260;
43 }
44
45 void *vid_get_viewport_fb_d()
46 {
47 return (void*)(*(int*)0x6D048);
48 }
49
50 long vid_get_viewport_height()
51 {
52 return 240;
53 }
54
55 char *camera_jpeg_count_str()
56 {
57 return (char*)0x10F70;
58 }
59
60
61 int vid_get_palette_type() { return 1; }
62 int vid_get_palette_size() { return 16*4; }
63
64 void *vid_get_bitmap_active_palette() {
65 return (void *)0x45af8;
66 }
67
68 void *vid_get_bitmap_active_buffer()
69 {
70 return (void*)(*(int*)(0x8dc8));
71 }
72
73 extern int _GetVRAMHPixelsSize();
74 extern int _GetVRAMVPixelsSize();
75
76 int vid_get_viewport_width_proper() {
77 return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
78 }
79
80 int vid_get_viewport_height_proper() {
81 return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
82 }
83
84 int vid_get_viewport_fullscreen_height() {
85
86 return vid_get_viewport_height_proper();
87 }
88 int vid_get_viewport_fullscreen_width() {
89
90 return vid_get_viewport_width_proper();
91 }
92 int vid_get_viewport_display_xoffset_proper() {
93 return 0;
94 }
95 int vid_get_viewport_display_yoffset_proper() {
96 return 0;
97 }