Skip to content

Commit 8a4367c

Browse files
committed
Thu 20 Feb 2020 08:04:21 EST - with written concent from @ducalex, starting on testing retro-go integration. specifically nesemu and screen tearing
1 parent aaf322a commit 8a4367c

File tree

9 files changed

+10999
-0
lines changed

9 files changed

+10999
-0
lines changed

Components/retro-go/components/miniz/miniz.c

Lines changed: 7660 additions & 0 deletions
Large diffs are not rendered by default.

Components/retro-go/components/miniz/miniz.h

Lines changed: 1339 additions & 0 deletions
Large diffs are not rendered by default.

Components/retro-go/components/odroid/odroid_display.c

Lines changed: 953 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#pragma once
2+
3+
#include <stdint.h>
4+
5+
enum ODROID_SYS_ERROR {
6+
ODROID_SD_ERR_BADFILE = 1,
7+
ODROID_SD_ERR_NOCARD,
8+
ODROID_SD_ERR_NOBIOS,
9+
ODROID_EMU_ERR_CRASH,
10+
};
11+
12+
typedef enum
13+
{
14+
ODROID_BACKLIGHT_LEVEL0 = 0,
15+
ODROID_BACKLIGHT_LEVEL1 = 1,
16+
ODROID_BACKLIGHT_LEVEL2 = 2,
17+
ODROID_BACKLIGHT_LEVEL3 = 3,
18+
ODROID_BACKLIGHT_LEVEL4 = 4,
19+
ODROID_BACKLIGHT_LEVEL_COUNT = 5,
20+
} odroid_backlight_level;
21+
22+
typedef struct __attribute__((__packed__)) {
23+
uint8_t top;
24+
uint8_t repeat;
25+
short left;
26+
short width;
27+
} odroid_scanline;
28+
29+
void ili9341_init();
30+
void ili9341_poweroff();
31+
void ili9341_write_frame(uint16_t* buffer);
32+
void ili9341_write_frame_rectangleLE(short left, short top, short width, short height, uint16_t* buffer);
33+
void ili9341_write_frame_scaled(void* buffer, odroid_scanline* diff, short width, short height, short stride,
34+
short pixel_width, uint8_t pixel_mask, uint16_t* palette);
35+
void ili9341_fill_screen(uint16_t color);
36+
void ili9341_blank_screen();
37+
38+
int odroid_display_backlight_get();
39+
void odroid_display_backlight_set(int level);
40+
41+
void odroid_display_reset_scale(short width, short height);
42+
void odroid_display_set_scale(short width, short height, float aspect);
43+
44+
void odroid_display_drain_spi();
45+
void odroid_display_lock();
46+
void odroid_display_unlock();
47+
void odroid_display_show_error(int errNum);
48+
void odroid_display_show_hourglass();
49+
50+
void odroid_buffer_diff(void *buffer,
51+
void *old_buffer,
52+
uint16_t *palette,
53+
uint16_t *old_palette,
54+
short width, short height, short stride,
55+
short pixel_width, uint8_t pixel_mask,
56+
uint8_t palette_shift_mask,
57+
odroid_scanline *out_diff);

Components/retro-go/components/odroid/odroid_hud.c

Lines changed: 546 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
Debounce
3+
*/
4+
void debounce(int key);
5+
6+
/*
7+
Debug
8+
*/
9+
void hud_debug(char *string);
10+
11+
/*
12+
File
13+
*/
14+
void hud_prepare_delete(int del);
15+
void hud_delete_save(char *file_to_delete);
16+
void hud_check_saves(char *name);
17+
18+
/*
19+
Text
20+
*/
21+
int hud_letter(char letter);
22+
void hud_text(short x, short y, char *string, bool ext, bool current);
23+
24+
/*
25+
Mask
26+
*/
27+
void hud_mask(int x, int y, int w, int h);
28+
void hud_background();
29+
30+
/*
31+
Theme
32+
*/
33+
void hud_theme();
34+
35+
/*
36+
Init
37+
*/
38+
void hud_init();
39+
void hud_deinit();
40+
41+
/*
42+
Menu
43+
*/
44+
void hud_menu();
45+
46+
/*
47+
Display
48+
*/
49+
void hud_logo(void);
50+
void hud_progress(char *string, bool bar);
51+
void hud_options();

0 commit comments

Comments
 (0)