Fix build with -fno-common
This commit is contained in:
parent
9df995e98b
commit
a8b4a281c4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=549620
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
PORTNAME= gngb
|
PORTNAME= gngb
|
||||||
PORTVERSION= 20060309
|
PORTVERSION= 20060309
|
||||||
PORTREVISION= 9
|
PORTREVISION= 10
|
||||||
CATEGORIES= emulators
|
CATEGORIES= emulators
|
||||||
MASTER_SITES= http://m.peponas.free.fr/gngb/download/
|
MASTER_SITES= http://m.peponas.free.fr/gngb/download/
|
||||||
|
|
||||||
|
11
emulators/gngb/files/patch-src_emu.c
Normal file
11
emulators/gngb/files/patch-src_emu.c
Normal file
@ -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
|
17
emulators/gngb/files/patch-src_emu.h
Normal file
17
emulators/gngb/files/patch-src_emu.h
Normal file
@ -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;
|
||||||
|
|
12
emulators/gngb/files/patch-src_interrupt.c
Normal file
12
emulators/gngb/files/patch-src_interrupt.c
Normal file
@ -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 */
|
||||||
|
|
23
emulators/gngb/files/patch-src_interrupt.h
Normal file
23
emulators/gngb/files/patch-src_interrupt.h
Normal file
@ -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);
|
11
emulators/gngb/files/patch-src_main.c
Normal file
11
emulators/gngb/files/patch-src_main.c
Normal file
@ -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)
|
||||||
|
{
|
@ -1,6 +1,17 @@
|
|||||||
--- src/memory.c.orig 2006-04-28 17:13:47 UTC
|
--- src/memory.c.orig 2006-04-28 17:13:47 UTC
|
||||||
+++ src/memory.c
|
+++ 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_READ_ENTRY mem_read_tab[0x10];
|
||||||
MEM_WRITE_ENTRY mem_write_tab[0x10];
|
MEM_WRITE_ENTRY mem_write_tab[0x10];
|
||||||
|
|
||||||
@ -9,7 +20,7 @@
|
|||||||
|
|
||||||
void (*select_rom_page)(Uint16 adr,Uint8 v);
|
void (*select_rom_page)(Uint16 adr,Uint8 v);
|
||||||
void (*select_ram_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.play_movie) {
|
||||||
|
|
||||||
if (conf.use_joy) {
|
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_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_SELECT]]) || (key[kmap[PAD_SELECT]])) gb_pad|=0x04; /* Select */
|
||||||
if ((joy_but[jmap[PAD_A]]) || (key[kmap[PAD_A]])) gb_pad|=0x01; /* A */
|
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_UP]]<-10000) || (key[kmap[PAD_UP]])) gb_pad|=0x40;
|
||||||
if ((joy_axis[jmap[PAD_DOWN]]>10000) || (key[kmap[PAD_DOWN]])) gb_pad|=0x80;*/
|
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_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_max) joy_y_max=joy_y_pos;
|
||||||
if (joy_y_pos<joy_y_min) joy_y_min=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_x_mid=(joy_x_max-joy_x_min) / 2;
|
||||||
- Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2;
|
- Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2;
|
||||||
- Sint16 joy_x_qua=joy_x_mid / 2;
|
- Sint16 joy_x_qua=joy_x_mid / 2;
|
||||||
- Sint16 joy_y_qua=joy_y_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_LEFT]])) gb_pad|=0x20;
|
||||||
if ((joy_x_pos>(joy_x_mid+joy_x_qua)) || (key[kmap[PAD_RIGHT]])) gb_pad|=0x10;
|
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;
|
|
||||||
|
11
emulators/gngb/files/patch-src_menu.c
Normal file
11
emulators/gngb/files/patch-src_menu.c
Normal file
@ -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}};
|
||||||
|
|
11
emulators/gngb/files/patch-src_menu.h
Normal file
11
emulators/gngb/files/patch-src_menu.h
Normal file
@ -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);
|
||||||
|
|
10
emulators/gngb/files/patch-src_message.c
Normal file
10
emulators/gngb/files/patch-src_message.c
Normal file
@ -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;
|
11
emulators/gngb/files/patch-src_message.h
Normal file
11
emulators/gngb/files/patch-src_message.h
Normal file
@ -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;
|
||||||
|
|
12
emulators/gngb/files/patch-src_rom.c
Normal file
12
emulators/gngb/files/patch-src_rom.c
Normal file
@ -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;
|
20
emulators/gngb/files/patch-src_rom.h
Normal file
20
emulators/gngb/files/patch-src_rom.h
Normal file
@ -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);
|
||||||
|
|
19
emulators/gngb/files/patch-src_serial.c
Normal file
19
emulators/gngb/files/patch-src_serial.c
Normal file
@ -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
|
27
emulators/gngb/files/patch-src_serial.h
Normal file
27
emulators/gngb/files/patch-src_serial.h
Normal file
@ -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);
|
14
emulators/gngb/files/patch-src_sgb.c
Normal file
14
emulators/gngb/files/patch-src_sgb.c
Normal file
@ -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];
|
19
emulators/gngb/files/patch-src_sgb.h
Normal file
19
emulators/gngb/files/patch-src_sgb.h
Normal file
@ -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;
|
||||||
|
|
20
emulators/gngb/files/patch-src_sound.c
Normal file
20
emulators/gngb/files/patch-src_sound.c
Normal file
@ -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;
|
60
emulators/gngb/files/patch-src_sound.h
Normal file
60
emulators/gngb/files/patch-src_sound.h
Normal file
@ -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
|
25
emulators/gngb/files/patch-src_video__std.c
Normal file
25
emulators/gngb/files/patch-src_video__std.c
Normal file
@ -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;
|
||||||
|
|
||||||
|
/*
|
15
emulators/gngb/files/patch-src_video__std.h
Normal file
15
emulators/gngb/files/patch-src_video__std.h
Normal file
@ -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);
|
13
emulators/gngb/files/patch-src_video__yuv.c
Normal file
13
emulators/gngb/files/patch-src_video__yuv.c
Normal file
@ -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) {
|
||||||
|
|
||||||
|
}
|
26
emulators/gngb/files/patch-src_video__yuv.h
Normal file
26
emulators/gngb/files/patch-src_video__yuv.h
Normal file
@ -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);
|
10
emulators/gngb/files/patch-src_vram.c
Normal file
10
emulators/gngb/files/patch-src_vram.c
Normal file
@ -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};
|
24
emulators/gngb/files/patch-src_vram.h
Normal file
24
emulators/gngb/files/patch-src_vram.h
Normal file
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user