diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-09-22 18:38:06 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-09-22 18:38:06 +0000 |
commit | a8b4a281c42c022147a984fa7aaf77ad149278c7 (patch) | |
tree | e405a6a742aba68094c2dcca2febfb6b21978a51 /emulators | |
parent | chinese/zh-librime: Update to 1.6.1 (diff) |
Fix build with -fno-common
Notes
Notes:
svn path=/head/; revision=549620
Diffstat (limited to 'emulators')
25 files changed, 438 insertions, 7 deletions
diff --git a/emulators/gngb/Makefile b/emulators/gngb/Makefile index 4441d2b4d87b..fb16ecf90560 100644 --- a/emulators/gngb/Makefile +++ b/emulators/gngb/Makefile @@ -3,7 +3,7 @@ PORTNAME= gngb PORTVERSION= 20060309 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= emulators MASTER_SITES= http://m.peponas.free.fr/gngb/download/ diff --git a/emulators/gngb/files/patch-src_emu.c b/emulators/gngb/files/patch-src_emu.c new file mode 100644 index 000000000000..3d30eeb06f0c --- /dev/null +++ b/emulators/gngb/files/patch-src_emu.c @@ -0,0 +1,11 @@ +--- src/emu.c.orig 2003-07-11 13:43:26 UTC ++++ src/emu.c +@@ -54,6 +54,8 @@ Uint8 jmap[8]={1,1,0,0,3,2,0,1}; + Sint16 *joy_axis; + Uint8 *joy_but; + ++GNGB_CONF conf; ++ + /* Configuration File */ + + #define UINTEGER8 1 diff --git a/emulators/gngb/files/patch-src_emu.h b/emulators/gngb/files/patch-src_emu.h new file mode 100644 index 000000000000..aa3fa6189639 --- /dev/null +++ b/emulators/gngb/files/patch-src_emu.h @@ -0,0 +1,17 @@ +--- src/emu.h.orig 2003-05-09 10:32:27 UTC ++++ src/emu.h +@@ -64,11 +64,11 @@ typedef struct { + Sint32 pal[5][4]; + }GNGB_CONF; + +-GNGB_CONF conf; ++extern GNGB_CONF conf; + +-SDL_Joystick *sdl_joy; ++extern SDL_Joystick *sdl_joy; + +-Uint16 key[SDLK_LAST]; ++extern Uint16 key[SDLK_LAST]; + extern Sint16 *joy_axis; + extern Uint8 *joy_but; + diff --git a/emulators/gngb/files/patch-src_interrupt.c b/emulators/gngb/files/patch-src_interrupt.c new file mode 100644 index 000000000000..0b51bef19621 --- /dev/null +++ b/emulators/gngb/files/patch-src_interrupt.c @@ -0,0 +1,12 @@ +--- src/interrupt.c.orig 2005-12-11 11:18:27 UTC ++++ src/interrupt.c +@@ -28,6 +28,9 @@ + + #define DELAY_CYCLE 24 + ++GBTIMER *gbtimer; ++GBLCDC *gblcdc; ++ + static const Uint16 lcd_cycle_tab[2][5]={{204,456,80,172,80}, /* GB */ + {204*2,456*2,80*2,172*2,80*2}}; /* CGB */ + diff --git a/emulators/gngb/files/patch-src_interrupt.h b/emulators/gngb/files/patch-src_interrupt.h new file mode 100644 index 000000000000..c27a075307c1 --- /dev/null +++ b/emulators/gngb/files/patch-src_interrupt.h @@ -0,0 +1,23 @@ +--- src/interrupt.h.orig 2003-05-09 05:25:27 UTC ++++ src/interrupt.h +@@ -68,9 +68,9 @@ typedef struct { + Uint8 *vram_pal_line[160]; + }GBLCDC; + +-GBLCDC *gblcdc; ++extern GBLCDC *gblcdc; + +-Uint8 vram_pal_line_temp[160][4]; ++extern Uint8 vram_pal_line_temp[160][4]; + extern Uint8 vram_init_pal; + + #define gb_set_pal_bck(v) { \ +@@ -98,7 +98,7 @@ typedef struct { + Sint32 cycle; + }GBTIMER; + +-GBTIMER *gbtimer; ++extern GBTIMER *gbtimer; + + void gblcdc_init(void); + void gblcdc_reset(void); diff --git a/emulators/gngb/files/patch-src_main.c b/emulators/gngb/files/patch-src_main.c new file mode 100644 index 000000000000..74d455ed6502 --- /dev/null +++ b/emulators/gngb/files/patch-src_main.c @@ -0,0 +1,11 @@ +--- src/main.c.orig 2003-07-11 17:11:56 UTC ++++ src/main.c +@@ -45,7 +45,7 @@ + #include "save.h" + + +-extern SDL_Joystick *sdl_joy; ++SDL_Joystick *sdl_joy; + + void exit_gngb(void) + { diff --git a/emulators/gngb/files/patch-src_memory.c b/emulators/gngb/files/patch-src_memory.c index 39918cf7327c..d783ec8ab672 100644 --- a/emulators/gngb/files/patch-src_memory.c +++ b/emulators/gngb/files/patch-src_memory.c @@ -1,6 +1,17 @@ --- src/memory.c.orig 2006-04-28 17:13:47 UTC +++ src/memory.c -@@ -67,7 +67,7 @@ Uint8 ram_mask; +@@ -33,6 +33,10 @@ + #include "message.h" + #include "sgb.h" + ++Uint16 key[SDLK_LAST]; ++ ++Uint8 vram_pal_line_temp[160][4]; ++ + static Uint8 gb_pad; + + Uint8 rom_mask; +@@ -67,7 +71,7 @@ Uint8 ram_mask; MEM_READ_ENTRY mem_read_tab[0x10]; MEM_WRITE_ENTRY mem_write_tab[0x10]; @@ -9,7 +20,7 @@ void (*select_rom_page)(Uint16 adr,Uint8 v); void (*select_ram_page)(Uint16 adr,Uint8 v); -@@ -742,6 +742,13 @@ __inline__ void update_gb_pad(void) { +@@ -742,6 +746,13 @@ __inline__ void update_gb_pad(void) { if (!conf.play_movie) { if (conf.use_joy) { @@ -23,7 +34,7 @@ if ((joy_but[jmap[PAD_START]]) || (key[kmap[PAD_START]])) gb_pad|=0x08; /* Start */ if ((joy_but[jmap[PAD_SELECT]]) || (key[kmap[PAD_SELECT]])) gb_pad|=0x04; /* Select */ if ((joy_but[jmap[PAD_A]]) || (key[kmap[PAD_A]])) gb_pad|=0x01; /* A */ -@@ -752,19 +759,11 @@ __inline__ void update_gb_pad(void) { +@@ -752,18 +763,10 @@ __inline__ void update_gb_pad(void) { if ((joy_axis[jmap[PAD_UP]]<-10000) || (key[kmap[PAD_UP]])) gb_pad|=0x40; if ((joy_axis[jmap[PAD_DOWN]]>10000) || (key[kmap[PAD_DOWN]])) gb_pad|=0x80;*/ @@ -34,12 +45,11 @@ if (joy_x_pos<joy_x_min) joy_x_min=joy_x_pos; if (joy_y_pos>joy_y_max) joy_y_max=joy_y_pos; if (joy_y_pos<joy_y_min) joy_y_min=joy_y_pos; - +- - Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2; - Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2; - Sint16 joy_x_qua=joy_x_mid / 2; - Sint16 joy_y_qua=joy_y_mid / 2; -- + if ((joy_x_pos<(joy_x_mid-joy_x_qua)) || (key[kmap[PAD_LEFT]])) gb_pad|=0x20; if ((joy_x_pos>(joy_x_mid+joy_x_qua)) || (key[kmap[PAD_RIGHT]])) gb_pad|=0x10; - if ((joy_y_pos<(joy_y_mid-joy_y_qua)) || (key[kmap[PAD_UP]])) gb_pad|=0x40; diff --git a/emulators/gngb/files/patch-src_menu.c b/emulators/gngb/files/patch-src_menu.c new file mode 100644 index 000000000000..367f7faa15b1 --- /dev/null +++ b/emulators/gngb/files/patch-src_menu.c @@ -0,0 +1,11 @@ +--- src/menu.c.orig 2004-01-15 06:32:11 UTC ++++ src/menu.c +@@ -45,6 +45,8 @@ + + int stop_all=0; + ++MENU *current_menu; ++ + Uint8 radio_group[256]; + SDL_Color buttonpal[]={{255,255,255},{214,214,214},{150,150,150},{0,0,0},{195,195,195}}; + diff --git a/emulators/gngb/files/patch-src_menu.h b/emulators/gngb/files/patch-src_menu.h new file mode 100644 index 000000000000..21139efd0d80 --- /dev/null +++ b/emulators/gngb/files/patch-src_menu.h @@ -0,0 +1,11 @@ +--- src/menu.h.orig 2003-04-03 13:27:29 UTC ++++ src/menu.h +@@ -49,7 +49,7 @@ typedef struct MENU{ + #define DRAW_WHEN_ACTIVE 1 + + extern MENU main_menu; +-MENU *current_menu; ++extern MENU *current_menu; + void loop_menu(MENU *m); + void display_menu(MENU *m); + diff --git a/emulators/gngb/files/patch-src_message.c b/emulators/gngb/files/patch-src_message.c new file mode 100644 index 000000000000..2aa5d32f1a67 --- /dev/null +++ b/emulators/gngb/files/patch-src_message.c @@ -0,0 +1,10 @@ +--- src/message.c.orig 2003-04-03 13:27:29 UTC ++++ src/message.c +@@ -34,6 +34,7 @@ static int tempo_mes; + + #define BUF_ALPHA 240 + ++int wl,hl,xm,ym; + char mes_buf[50]; + char info_buf[50]; + //extern SDL_Surface *gb_screen; diff --git a/emulators/gngb/files/patch-src_message.h b/emulators/gngb/files/patch-src_message.h new file mode 100644 index 000000000000..f6684345178f --- /dev/null +++ b/emulators/gngb/files/patch-src_message.h @@ -0,0 +1,11 @@ +--- src/message.h.orig 2003-06-28 08:42:03 UTC ++++ src/message.h +@@ -21,7 +21,7 @@ + + #include <SDL.h> + +-int wl,hl,xm,ym; ++extern int wl,hl,xm,ym; + //extern void (*draw_message)(int x,int y,char *mes); + extern SDL_Surface *fontbuf; + diff --git a/emulators/gngb/files/patch-src_rom.c b/emulators/gngb/files/patch-src_rom.c new file mode 100644 index 000000000000..11a837dd3000 --- /dev/null +++ b/emulators/gngb/files/patch-src_rom.c @@ -0,0 +1,12 @@ +--- src/rom.c.orig 2003-07-19 16:04:45 UTC ++++ src/rom.c +@@ -51,6 +51,9 @@ + Sint16 rom_type=UNKNOW_TYPE; + Uint8 rom_gb_type=UNKNOW; + ++char *rom_name; ++ROM_TIMER *rom_timer; ++ + int check_dir(char *dir_name) { + #ifdef WIN32 + BOOL res; diff --git a/emulators/gngb/files/patch-src_rom.h b/emulators/gngb/files/patch-src_rom.h new file mode 100644 index 000000000000..2efd26f11a7e --- /dev/null +++ b/emulators/gngb/files/patch-src_rom.h @@ -0,0 +1,20 @@ +--- src/rom.h.orig 2003-04-03 13:27:29 UTC ++++ src/rom.h +@@ -37,7 +37,7 @@ + #define SRAM 0x200 + #define HUC1 0x400 + +-char *rom_name; ++extern char *rom_name; + extern Sint16 rom_type; + + // rom_gb_suport +@@ -52,7 +52,7 @@ typedef struct { + Uint8 regl[5]; // register locked + }ROM_TIMER; // MBC3 + +-ROM_TIMER *rom_timer; ++extern ROM_TIMER *rom_timer; + + int open_rom(char *filename); + diff --git a/emulators/gngb/files/patch-src_serial.c b/emulators/gngb/files/patch-src_serial.c new file mode 100644 index 000000000000..b62cde810cf3 --- /dev/null +++ b/emulators/gngb/files/patch-src_serial.c @@ -0,0 +1,19 @@ +--- src/serial.c.orig 2003-07-27 16:20:30 UTC ++++ src/serial.c +@@ -51,11 +51,16 @@ + #define SOCKET int + #endif + ++Sint8 gblisten; ++ + SDL_Thread *thread; + int thread_fun(void *data); + + SOCKET dest_socket=-1; + SOCKET listen_socket=-1; ++ ++Sint16 serial_cycle_todo; ++gbserial_t gbserial; + + void gngb_closesocket(SOCKET s){ + #ifdef WIN32 diff --git a/emulators/gngb/files/patch-src_serial.h b/emulators/gngb/files/patch-src_serial.h new file mode 100644 index 000000000000..39f9f8224e5c --- /dev/null +++ b/emulators/gngb/files/patch-src_serial.h @@ -0,0 +1,27 @@ +--- src/serial.h.orig 2003-05-16 16:35:58 UTC ++++ src/serial.h +@@ -21,7 +21,7 @@ + + #include "global.h" + +-struct { ++typedef struct { + Sint16 cycle_todo; + Uint16 p; + Uint8 b; +@@ -29,10 +29,12 @@ struct { + Uint8 check; + Uint8 wait; + Uint8 ready2read; +-}gbserial; ++} gbserial_t; + +-Sint16 serial_cycle_todo; +-Sint8 gblisten; ++extern gbserial_t gbserial; ++ ++extern Sint16 serial_cycle_todo; ++extern Sint8 gblisten; + + void gbserial_init(int server_side,char *servername); + void gbserial_close(void); diff --git a/emulators/gngb/files/patch-src_sgb.c b/emulators/gngb/files/patch-src_sgb.c new file mode 100644 index 000000000000..18d197e26ebe --- /dev/null +++ b/emulators/gngb/files/patch-src_sgb.c @@ -0,0 +1,14 @@ +--- src/sgb.c.orig 2003-08-09 09:23:37 UTC ++++ src/sgb.c +@@ -28,6 +28,11 @@ + #define SGB_CMD_END() {sgb.cmd=0xff;sgb.nb_pack=-1;} + #define SGB_COLOR(c) ((((c)&0x7C00)>>10)|(((c)&0x3E0)<<1)|(((c)&0x1F)<<11)) + ++SGB sgb; ++Uint8 sgb_mask; ++ ++Uint16 sgb_pal[4][4]; /* 4 pallete of 4 colour */ ++Uint8 sgb_pal_map[20][18]; /* Map of Pallete Tiles */ + Uint8 sgb_tiles[256*32]; + Uint8 sgb_map[32*32]; + Uint8 sgb_att[32*32]; diff --git a/emulators/gngb/files/patch-src_sgb.h b/emulators/gngb/files/patch-src_sgb.h new file mode 100644 index 000000000000..d1d745a14eda --- /dev/null +++ b/emulators/gngb/files/patch-src_sgb.h @@ -0,0 +1,19 @@ +--- src/sgb.h.orig 2003-04-03 13:27:29 UTC ++++ src/sgb.h +@@ -39,12 +39,12 @@ typedef struct { + Uint8 player; + }SGB; + +-SGB sgb; ++extern SGB sgb; + +-Uint16 sgb_pal[4][4]; /* 4 pallete of 4 colour */ +-Uint8 sgb_pal_map[20][18]; /* Map of Pallete Tiles */ ++extern Uint16 sgb_pal[4][4]; /* 4 pallete of 4 colour */ ++extern Uint8 sgb_pal_map[20][18]; /* Map of Pallete Tiles */ + +-Uint8 sgb_mask; ++extern Uint8 sgb_mask; + + extern SDL_Surface *sgb_buf; + diff --git a/emulators/gngb/files/patch-src_sound.c b/emulators/gngb/files/patch-src_sound.c new file mode 100644 index 000000000000..54fd5ba92989 --- /dev/null +++ b/emulators/gngb/files/patch-src_sound.c @@ -0,0 +1,20 @@ +--- src/sound.c.orig 2003-04-03 13:27:29 UTC ++++ src/sound.c +@@ -53,10 +53,17 @@ Uint16 wduty[4][8] = + {0,0,0,-1,-1,-1,-1,-1 } + }; + ++SoundM1 snd_m1; ++SoundM2 snd_m2; ++SoundM3 snd_m3; ++SoundM4 snd_m4; ++SoundG snd_g; + + double freq_table[2048]; + double freq_table_m3[2048]; + long double freq_table_m4[256]; ++Uint32 sample_rate; ++Uint16 sample_per_update; + + float lastpos=0,curpos=0; + Uint32 buf_size; diff --git a/emulators/gngb/files/patch-src_sound.h b/emulators/gngb/files/patch-src_sound.h new file mode 100644 index 000000000000..530616c00beb --- /dev/null +++ b/emulators/gngb/files/patch-src_sound.h @@ -0,0 +1,60 @@ +--- src/sound.h.orig 2003-04-03 13:27:29 UTC ++++ src/sound.h +@@ -22,9 +22,9 @@ + + #include "global.h" + +-Uint32 sample_rate; +-Uint8 bit_per_sample; +-Uint16 sample_per_update; ++extern Uint32 sample_rate; ++extern Uint8 bit_per_sample; ++extern Uint16 sample_per_update; + + typedef struct SoundM1 + { +@@ -61,7 +61,7 @@ typedef struct SoundM1 + float sample_env_per_step; + float cp; + }SoundM1; +-SoundM1 snd_m1; ++extern SoundM1 snd_m1; + + typedef struct SoundM2 + { +@@ -92,7 +92,7 @@ typedef struct SoundM2 + float sample_env_per_step; + float cp; + }SoundM2; +-SoundM2 snd_m2; ++extern SoundM2 snd_m2; + + typedef struct SoundM3 + { +@@ -120,7 +120,7 @@ typedef struct SoundM3 + Uint16 sample_len; // durée en samples + float cp; + }SoundM3; +-SoundM3 snd_m3; ++extern SoundM3 snd_m3; + + typedef struct SoundM4 + { +@@ -149,7 +149,7 @@ typedef struct SoundM4 + float env_per_step; + float sample_env_per_step; + }SoundM4; +-SoundM4 snd_m4; ++extern SoundM4 snd_m4; + + /* Control general */ + typedef struct SoundG +@@ -177,7 +177,7 @@ typedef struct SoundG + Uint8 Sound3_On_Off ; + Uint8 Sound4_On_Off ; + }SoundG; +-SoundG snd_g; ++extern SoundG snd_g; + + + #define LEFT 1 diff --git a/emulators/gngb/files/patch-src_video__std.c b/emulators/gngb/files/patch-src_video__std.c new file mode 100644 index 000000000000..6288add7a078 --- /dev/null +++ b/emulators/gngb/files/patch-src_video__std.c @@ -0,0 +1,25 @@ +--- src/video_std.c.orig 2005-12-11 09:53:02 UTC ++++ src/video_std.c +@@ -30,14 +30,21 @@ + + static Uint32 std_flag; + SDL_Surface *back=NULL; ++Uint8 rb_on; ++Uint8 rb_shift; + +- + Sint8 rb_tab[2][RB_SIZE]={{0,-2,2,-2,2}, + {0,-1,-1,1,1}}; + + VIDEO_MODE video_std; + ++SDL_Rect scrR; ++SDL_Rect dstR; + SDL_Rect clip_rct; ++SDL_Rect ov_rect; ++ ++int scxoff,scyoff; ++ + Uint8 win_line=0; + + /* diff --git a/emulators/gngb/files/patch-src_video__std.h b/emulators/gngb/files/patch-src_video__std.h new file mode 100644 index 000000000000..b38f7d49a385 --- /dev/null +++ b/emulators/gngb/files/patch-src_video__std.h @@ -0,0 +1,15 @@ +--- src/video_std.h.orig 2003-04-03 13:27:29 UTC ++++ src/video_std.h +@@ -27,9 +27,9 @@ + extern Sint8 rb_tab[2][RB_SIZE]; + extern SDL_Surface *back; + +-Uint8 rb_shift; +-SDL_Rect dstR; +-SDL_Rect scrR; ++extern Uint8 rb_shift; ++extern SDL_Rect dstR; ++extern SDL_Rect scrR; + + void draw_screen_sgb_std(void); + void draw_screen_wb_std(void); diff --git a/emulators/gngb/files/patch-src_video__yuv.c b/emulators/gngb/files/patch-src_video__yuv.c new file mode 100644 index 000000000000..95c7bea2b069 --- /dev/null +++ b/emulators/gngb/files/patch-src_video__yuv.c @@ -0,0 +1,13 @@ +--- src/video_yuv.c.orig 2003-04-03 13:27:29 UTC ++++ src/video_yuv.c +@@ -25,6 +25,10 @@ + #include "memory.h" + #include "message.h" + ++Uint32 yuv_flag; ++SDL_Overlay *overlay; ++yuv_t rgb2yuv[65536]; ++ + void init_message_yuv(void) { + + } diff --git a/emulators/gngb/files/patch-src_video__yuv.h b/emulators/gngb/files/patch-src_video__yuv.h new file mode 100644 index 000000000000..585366b43091 --- /dev/null +++ b/emulators/gngb/files/patch-src_video__yuv.h @@ -0,0 +1,26 @@ +--- src/video_yuv.h.orig 2003-04-03 13:27:29 UTC ++++ src/video_yuv.h +@@ -21,16 +21,18 @@ + + #include "global.h" + +-SDL_Overlay *overlay; +-SDL_Rect ov_rect; +-Uint32 yuv_flag; ++extern SDL_Overlay *overlay; ++extern SDL_Rect ov_rect; ++extern Uint32 yuv_flag; + +-struct yuv{ ++typedef struct yuv{ + Uint16 y; + Uint8 u; + Uint8 v; + Uint32 yuy2; +-}rgb2yuv[65536]; ++} yuv_t; ++ ++extern yuv_t rgb2yuv[65536]; + + void init_message_yuv(void); + void init_rgb2yuv_table(void); diff --git a/emulators/gngb/files/patch-src_vram.c b/emulators/gngb/files/patch-src_vram.c new file mode 100644 index 000000000000..b2482cd847ca --- /dev/null +++ b/emulators/gngb/files/patch-src_vram.c @@ -0,0 +1,10 @@ +--- src/vram.c.orig 2003-05-09 05:26:00 UTC ++++ src/vram.c +@@ -30,6 +30,7 @@ + + SDL_Surface *gb_screen=NULL; + ++GB_SPRITE gb_spr[40]; + + Uint16 grey[4]; + Uint8 pal_bck[4]={0,3,3,3}; diff --git a/emulators/gngb/files/patch-src_vram.h b/emulators/gngb/files/patch-src_vram.h new file mode 100644 index 000000000000..58d3f6404335 --- /dev/null +++ b/emulators/gngb/files/patch-src_vram.h @@ -0,0 +1,24 @@ +--- src/vram.h.orig 2003-05-09 05:26:20 UTC ++++ src/vram.h +@@ -62,7 +62,7 @@ struct mask_shift { + + extern struct mask_shift tab_ms[8]; + extern Uint32 video_flag; +-int scxoff,scyoff; /* shift of the screen */ ++extern int scxoff,scyoff; /* shift of the screen */ + + extern Uint16 grey[4]; + extern Uint8 pal_bck[4]; +@@ -89,10 +89,10 @@ typedef struct { + Uint8 priority; + }GB_SPRITE; + +-GB_SPRITE gb_spr[40]; ++extern GB_SPRITE gb_spr[40]; + extern Uint8 nb_spr; + +-Uint8 rb_on; ++extern Uint8 rb_on; + + extern void (*draw_screen)(void); + |