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*)0xFFD4CBD8;
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 void **fb=(void **)0x6028;
22 unsigned char buff = *((unsigned char*)0x6038);
23 if (buff == 0) {
24 buff = 2;
25 }
26 else {
27 buff--;
28 }
29 return fb[buff];
30 }
31
32 void *vid_get_bitmap_fb()
33 {
34 return (void*)0x10361000;
35 }
36
37 void *vid_get_viewport_fb()
38 {
39 return (void*)0x10E81260;
40 }
41
42 void *vid_get_viewport_fb_d()
43 {
44 return (void*)(*(int*)0x6D048);
45 }
46
47 long vid_get_viewport_height()
48 {
49 return 240;
50 }
51
52 char *camera_jpeg_count_str()
53 {
54 return (char*)0x10F70;
55 }
56
57
58 int vid_get_palette_type() { return 1; }
59 int vid_get_palette_size() { return 16*4; }
60
61 void *vid_get_bitmap_active_palette() {
62 return (void *)0x45af8;
63 }
64
65 void *vid_get_bitmap_active_buffer()
66 {
67 return (void*)(*(int*)(0x8dc8));
68 }
69
70 extern int _GetVRAMHPixelsSize();
71 extern int _GetVRAMVPixelsSize();
72
73 int vid_get_viewport_width_proper() {
74 return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
75 }
76
77 int vid_get_viewport_height_proper() {
78 return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
79 }
80
81 int vid_get_viewport_fullscreen_height() {
82
83 return vid_get_viewport_height_proper();
84 }
85 int vid_get_viewport_fullscreen_width() {
86
87 return vid_get_viewport_width_proper();
88 }
89 int vid_get_viewport_display_xoffset_proper() {
90 return 0;
91 }
92 int vid_get_viewport_display_yoffset_proper() {
93 return 0;
94 }