Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2020 18:38:06 +0000 (UTC)
From:      =?UTF-8?Q?Stefan_E=c3=9fer?= <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r549620 - in head/emulators/gngb: . files
Message-ID:  <202009221838.08MIc6IW009946@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Tue Sep 22 18:38:06 2020
New Revision: 549620
URL: https://svnweb.freebsd.org/changeset/ports/549620

Log:
  Fix build with -fno-common

Added:
  head/emulators/gngb/files/patch-src_emu.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_emu.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_interrupt.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_interrupt.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_main.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_menu.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_menu.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_message.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_message.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_rom.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_rom.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_serial.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_serial.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_sgb.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_sgb.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_sound.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_sound.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_video__std.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_video__std.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_video__yuv.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_video__yuv.h   (contents, props changed)
  head/emulators/gngb/files/patch-src_vram.c   (contents, props changed)
  head/emulators/gngb/files/patch-src_vram.h   (contents, props changed)
Modified:
  head/emulators/gngb/Makefile
  head/emulators/gngb/files/patch-src_memory.c

Modified: head/emulators/gngb/Makefile
==============================================================================
--- head/emulators/gngb/Makefile	Tue Sep 22 18:26:14 2020	(r549619)
+++ head/emulators/gngb/Makefile	Tue Sep 22 18:38:06 2020	(r549620)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gngb
 PORTVERSION=	20060309
-PORTREVISION=	9
+PORTREVISION=	10
 CATEGORIES=	emulators
 MASTER_SITES=	http://m.peponas.free.fr/gngb/download/
 

Added: head/emulators/gngb/files/patch-src_emu.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_emu.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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

Added: head/emulators/gngb/files/patch-src_emu.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_emu.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;
+ 

Added: head/emulators/gngb/files/patch-src_interrupt.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_interrupt.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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 */
+ 

Added: head/emulators/gngb/files/patch-src_interrupt.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_interrupt.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);

Added: head/emulators/gngb/files/patch-src_main.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_main.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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)
+ {

Modified: head/emulators/gngb/files/patch-src_memory.c
==============================================================================
--- head/emulators/gngb/files/patch-src_memory.c	Tue Sep 22 18:26:14 2020	(r549619)
+++ head/emulators/gngb/files/patch-src_memory.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;

Added: head/emulators/gngb/files/patch-src_menu.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_menu.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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}};
+ 

Added: head/emulators/gngb/files/patch-src_menu.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_menu.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);
+ 

Added: head/emulators/gngb/files/patch-src_message.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_message.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;

Added: head/emulators/gngb/files/patch-src_message.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_message.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;
+ 

Added: head/emulators/gngb/files/patch-src_rom.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_rom.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;

Added: head/emulators/gngb/files/patch-src_rom.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_rom.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);
+ 

Added: head/emulators/gngb/files/patch-src_serial.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_serial.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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

Added: head/emulators/gngb/files/patch-src_serial.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_serial.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);

Added: head/emulators/gngb/files/patch-src_sgb.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_sgb.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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];

Added: head/emulators/gngb/files/patch-src_sgb.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_sgb.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;
+ 

Added: head/emulators/gngb/files/patch-src_sound.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_sound.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;

Added: head/emulators/gngb/files/patch-src_sound.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_sound.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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

Added: head/emulators/gngb/files/patch-src_video__std.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_video__std.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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;
+ 
+ /*

Added: head/emulators/gngb/files/patch-src_video__std.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_video__std.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);

Added: head/emulators/gngb/files/patch-src_video__yuv.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_video__yuv.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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) {
+ 
+ }

Added: head/emulators/gngb/files/patch-src_video__yuv.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_video__yuv.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);

Added: head/emulators/gngb/files/patch-src_vram.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_vram.c	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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};

Added: head/emulators/gngb/files/patch-src_vram.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gngb/files/patch-src_vram.h	Tue Sep 22 18:38:06 2020	(r549620)
@@ -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);
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009221838.08MIc6IW009946>