| 1 | #include "projinc.h" |
|---|
| 2 | #include "bchp_rdc.h" |
|---|
| 3 | #include "bint.h" |
|---|
| 4 | #include "bos.h" |
|---|
| 5 | #include "bchp_bvnf_intr2_0.h" |
|---|
| 6 | #include "bchp_bvnf_intr2_1.h" |
|---|
| 7 | #include "bchp_hif_cpu_intr1.h" |
|---|
| 8 | #include "bchp_sun_top_ctrl.h" |
|---|
| 9 | #include "bchp_gio.h" |
|---|
| 10 | #include "bchp_xpt_cfg.h" |
|---|
| 11 | #include "bchp_xpt_int.h" |
|---|
| 12 | #include "bchp_xpt_dpcr0.h" |
|---|
| 13 | #include "bchp_sun_gisb_arb.h" |
|---|
| 14 | #include "bchp_fmisc.h" |
|---|
| 15 | #include "cache_util.h" |
|---|
| 16 | #include "bdispatch.h" |
|---|
| 17 | #include "bsettop.h" |
|---|
| 18 | #include "rul_defs.h" |
|---|
| 19 | #include "ruls.h" |
|---|
| 20 | |
|---|
| 21 | extern int drawtest(unsigned char* osd_mem,unsigned int* osd_palette, |
|---|
| 22 | int osd_width,int osd_height,int osd_pitch); |
|---|
| 23 | |
|---|
| 24 | void test_init(void) |
|---|
| 25 | { |
|---|
| 26 | bdisplay_t display; |
|---|
| 27 | bgraphics_t graphics; |
|---|
| 28 | void *buffer; /* [out] address of framebuffer memory */ |
|---|
| 29 | unsigned int *palette; /* [out] address of palette */ |
|---|
| 30 | int width; /* [out] width of the OSD surface */ |
|---|
| 31 | int height; /* [out] height of the OSD surface */ |
|---|
| 32 | int pitch; /* [out] pitch of the OSD surface */ |
|---|
| 33 | |
|---|
| 34 | bsettop_init(0); |
|---|
| 35 | display = bdisplay_open(B_ID(0)); |
|---|
| 36 | graphics = bgraphics_open(B_ID(0),display); |
|---|
| 37 | bgraphics_get_framebuffer(graphics,&buffer,&palette,&width,&height,&pitch); |
|---|
| 38 | palette[0x0] = 0xFF000000; |
|---|
| 39 | palette[0x1] = 0xFFFF0000; |
|---|
| 40 | palette[0x2] = 0xFF00FF00; |
|---|
| 41 | palette[0x3] = 0xFF0000FF; |
|---|
| 42 | palette[0x4] = 0xFFFFFF00; |
|---|
| 43 | palette[0x5] = 0xFF00FFFF; |
|---|
| 44 | palette[0x6] = 0xFFFF00FF; |
|---|
| 45 | palette[0x7] = 0xFFF0F0F0; |
|---|
| 46 | palette[0x8] = 0xFF0F0F0F; |
|---|
| 47 | palette[0x9] = 0xF0000000; |
|---|
| 48 | palette[0xa] = 0xF0FF0000; |
|---|
| 49 | palette[0xb] = 0xF000FF00; |
|---|
| 50 | palette[0xc] = 0xF00000FF; |
|---|
| 51 | palette[0xd] = 0xF0FFFF00; |
|---|
| 52 | palette[0xe] = 0xF000FFFF; |
|---|
| 53 | palette[0xf] = 0xF0FFFFFF; |
|---|
| 54 | //bos_sleep(16); |
|---|
| 55 | bgraphics_load_palette(graphics); |
|---|
| 56 | drawtest(buffer,palette,720,480,360); |
|---|
| 57 | |
|---|
| 58 | } |
|---|