This source file includes following definitions.
- shutdown
- debug_led
- get_flash_params_count
- vid_get_viewport_height
- vid_get_palette_type
- vid_get_palette_size
- vid_get_viewport_width_proper
- vid_get_viewport_height_proper
- vid_get_viewport_fullscreen_height
- vid_get_viewport_fullscreen_width
1 #include "platform.h"
2
3 extern void my_debug_led();
4 void shutdown()
5 {
6
7 volatile long *p = (void*)0xc02200a0;
8
9 asm(
10 "MRS R1, CPSR\n"
11 "AND R0, R1, #0x80\n"
12 "ORR R1, R1, #0x80\n"
13 "MSR CPSR_cf, R1\n"
14 :::"r1","r0");
15
16 *p = 0x44;
17
18 while(1);
19 }
20
21
22 #define LED_PR 0xc02200C4
23
24 void debug_led(int state)
25 {
26 volatile long *p=(void*)LED_PR;
27 if (state)
28 p[0]=0x46;
29 else
30 p[0]=0x44;
31 }
32
33 #define LED_AF 0xc0220080
34
35 int get_flash_params_count(void){
36 return 114;
37 }
38
39 long vid_get_viewport_height()
40 {
41 return 240;
42 }
43
44
45
46 int vid_get_palette_type() { return 1; }
47 int vid_get_palette_size() { return 16*4; }
48
49 extern int _GetVRAMHPixelsSize();
50 extern int _GetVRAMVPixelsSize();
51
52
53 int vid_get_viewport_width_proper() {
54 return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
55 }
56 int vid_get_viewport_height_proper() {
57 return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
58 }
59
60 int vid_get_viewport_fullscreen_height() {
61
62 int m = mode_get();
63 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
64 return 240;
65 }
66 return vid_get_viewport_height_proper();
67 }
68 int vid_get_viewport_fullscreen_width() {
69
70 int m = mode_get();
71 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
72 return 720;
73 }
74 return vid_get_viewport_width_proper();
75 }
76