Continuing to untangle shared.h

This commit is contained in:
SergioMartin86 2024-03-29 16:15:48 +01:00
parent 2739f993b9
commit 7ad8fe1e92
29 changed files with 60 additions and 16 deletions

View File

@ -36,6 +36,8 @@
*
****************************************************************************************/
#include <osd.h>
#include <fileio.h>
#include "shared.h"
#define TYPE_PRO1 0x12

View File

@ -39,6 +39,8 @@
*
****************************************************************************************/
#include <osd.h>
#include <fileio.h>
#include "shared.h"
static struct

View File

@ -41,6 +41,9 @@
*
****************************************************************************************/
#include <osd.h>
#include <fileio.h>
#include <config.h>
#include "shared.h"
#include "eeprom_i2c.h"
#include "eeprom_spi.h"

View File

@ -39,6 +39,8 @@
*
****************************************************************************************/
#include <config.h>
#include <zlib.h>
#include "shared.h"
#include "eeprom_93c.h"
#include "terebi_oekaki.h"
@ -375,7 +377,7 @@ static const rominfo_t game_list[] =
{0xD29889AD, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Fantasy Zone: The Maze */
{0xA4AC35D8, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Galaxy Force */
{0x6C827520, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Galaxy Force (U) */
{0x1890F407, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Game Box Série Esportes Radicais (BR) */
{0x1890F407, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Game Box S<EFBFBD>rie Esportes Radicais (BR) */
{0xB746A6F5, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Global Defense */
{0x91A0FC4E, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Global Defense [Proto] */
{0x48651325, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Golfamania */
@ -386,7 +388,7 @@ static const rominfo_t game_list[] =
{0xE8511B08, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Lord of The Sword */
{0x0E333B6E, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Miracle Warriors - Seal of The Dark Lord */
{0x301A59AA, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Miracle Warriors - Seal of The Dark Lord [Proto] */
{0x01D67C0B, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Mônica no Castelo do Dragão (BR) */
{0x01D67C0B, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* M<EFBFBD>nica no Castelo do Drag<61>o (BR) */
{0x5589D8D2, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Out Run */
{0xE030E66C, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Parlour Games */
{0xF97E9875, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Penguin Land */
@ -401,7 +403,7 @@ static const rominfo_t game_list[] =
{0x1A390B93, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Tennis Ace */
{0xAE920E4B, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Thunder Blade */
{0x51BD14BE, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Time Soldiers */
{0x22CCA9BB, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Turma da Mônica em: O Resgate (BR) */
{0x22CCA9BB, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Turma da M<EFBFBD>nica em: O Resgate (BR) */
{0xB52D60C8, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Ultima IV */
{0xDE9F8517, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Ultima IV [Proto] */
{0xDFB0B161, 0, 1, 0, MAPPER_SEGA, SYSTEM_SMS, REGION_USA}, /* Vigilante */
@ -826,7 +828,7 @@ int sms_cart_region_detect(void)
/* compute CRC */
uint32 crc = crc32(0, cart.rom, cart.romsize);
/* Turma da Mônica em: O Resgate & Wonder Boy III enable FM support on japanese hardware only */
/* Turma da M<EFBFBD>nica em: O Resgate & Wonder Boy III enable FM support on japanese hardware only */
if (config.ym2413 && ((crc == 0x22CCA9BB) || (crc == 0x679E1676)))
{
return REGION_JAPAN_NTSC;

View File

@ -36,6 +36,7 @@
*
****************************************************************************************/
#include <zlib.h>
#include "shared.h"
T_SRAM sram;

View File

@ -35,6 +35,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************************/
#include <config.h>
#include <stdlib.h>
#include "shared.h"
#include "megasd.h"
@ -790,7 +793,7 @@ int cdd_load(char *filename, char *header)
/* read CD image header + security code */
int status = cdStreamRead(header, 0x210, 1, cdd.toc.tracks[0].fd);
if (status < 0) { fprintf(stderr, "Error reading from CD Stream.\n"); exit(-1); }
cdStreamSeek(cdd.toc.tracks[0].fd, 0, SEEK_SET);
}
}

View File

@ -35,6 +35,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
#define PCM_SCYCLES_RATIO (384 * 4)

View File

@ -39,6 +39,9 @@
*
****************************************************************************************/
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include "shared.h"
#ifdef USE_DYNAMIC_ALLOC

View File

@ -37,6 +37,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
#include "gamepad.h"
#include "lightgun.h"

View File

@ -36,6 +36,7 @@
*
****************************************************************************************/
#include <stdlib.h>
#include "shared.h"
/************************************************************************************/

View File

@ -39,6 +39,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
#include "gamepad.h"
#include "lightgun.h"

View File

@ -37,6 +37,8 @@
*
****************************************************************************************/
#include <osd.h>
#include <fileio.h>
#include <ctype.h>
#include "shared.h"

View File

@ -40,6 +40,8 @@
#ifndef _LOADROM_H_
#define _LOADROM_H_
#include "types.h"
#ifndef MAXROMSIZE
#define MAXROMSIZE 10485760
#endif

View File

@ -37,6 +37,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
/*--------------------------------------------------------------------------*/

View File

@ -37,9 +37,9 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
t_zbank_memory_map zbank_memory_map[256];
/*

View File

@ -39,6 +39,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"

View File

@ -1,8 +1,6 @@
#ifndef _SHARED_H_
#define _SHARED_H_
#include "types.h"
#include "osd.h"
#include "macros.h"
#include "loadrom.h"
#include "m68k.h"

View File

@ -40,6 +40,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
#include "blip_buf.h"

View File

@ -37,6 +37,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
#include "blip_buf.h"

View File

@ -36,6 +36,7 @@
*
****************************************************************************************/
#include <config.h>
#include "shared.h"
int state_load(unsigned char *state)

View File

@ -36,8 +36,9 @@
*
****************************************************************************************/
#ifndef _STATE_H_
#define _STATE_H_
#pragma once
#include <string.h>
#define STATE_SIZE 0xfd000
#define STATE_VERSION "GENPLUS-GX 1.7.6"
@ -53,5 +54,3 @@
/* Function prototypes */
extern int state_load(unsigned char *state);
extern int state_save(unsigned char *state);
#endif

View File

@ -39,6 +39,9 @@
*
****************************************************************************************/
#include <string.h>
#include <config.h>
#include <osd.h>
#include "shared.h"
#include "eq.h"

View File

@ -39,6 +39,8 @@
*
****************************************************************************************/
#include <string.h>
#include <config.h>
#include "shared.h"
#include "hvc.h"

View File

@ -40,6 +40,9 @@
*
****************************************************************************************/
#include <stdlib.h>
#include <string.h>
#include <config.h>
#include "shared.h"
#include "md_ntsc.h"
#include "sms_ntsc.h"

View File

@ -125,6 +125,7 @@
* http://www.msxnet.org/tech/z80-documented.pdf
*****************************************************************************/
#include "shared.h"
#include "string.h"
#include "z80.h"
/* execute main opcodes inside a big switch statement */

View File

@ -1,9 +1,9 @@
#include "shared.h"
#include "config.h"
t_config config;
void set_config_defaults(void)
{
int i;

View File

@ -3,6 +3,7 @@
#define _CONFIG_H_
#include "types.h"
#include <main.h>
/****************************************************************************
* Config Option

View File

@ -40,8 +40,12 @@
*
****************************************************************************************/
#include "shared.h"
#include <stdlib.h>
#include <unzip.h>
#include <zlib.h>
#include "shared.h"
#include "types.h"
static int check_zip(char *filename);

View File

@ -1,5 +1,8 @@
#include "SDL.h"
#include "SDL_thread.h"
#include <SDL.h>
#include <SDL_thread.h>
#include <config.h>
#include <error.h>
#include <osd.h>
#include "shared.h"
#include "sms_ntsc.h"