Merge newcore branch into master/trunk. Correct lots of warning. (now warning are threat as error by default)
Signed-off-by: Godzil <godzil@godzil.net>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#ifndef NESCARTS_H
|
||||
#define NESCARTS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <types.h>
|
||||
|
||||
#define iNES_MIRROR 0x01
|
||||
@@ -23,14 +24,14 @@
|
||||
|
||||
typedef struct NesCart_
|
||||
{
|
||||
unsigned long PROMSize, /* Size of PROM */
|
||||
VROMSize; /* Size of VROM */
|
||||
char MapperID; /* Mapper Type */
|
||||
byte Flags;
|
||||
char *FileName;
|
||||
byte *File; /* Pointer on the file in memory */
|
||||
byte *PROMBanks; /* Pointer on the first PROM */
|
||||
byte *VROMBanks; /* Pointer on the first VROM */
|
||||
uint32_t PROMSize, /* Size of PROM */
|
||||
VROMSize; /* Size of VROM */
|
||||
char MapperID; /* Mapper Type */
|
||||
uint8_t Flags;
|
||||
char *FileName;
|
||||
uint8_t *File; /* Pointer on the file in memory */
|
||||
uint8_t *PROMBanks; /* Pointer on the first PROM */
|
||||
uint8_t *VROMBanks; /* Pointer on the first VROM */
|
||||
} NesCart;
|
||||
|
||||
void DumpCartProperties();
|
||||
|
||||
@@ -93,7 +93,7 @@ void SetChannels(int Volume,int Switch);
|
||||
/** waveform to be an instrument or set it to the waveform **/
|
||||
/** own playback rate. **/
|
||||
/*************************************************************/
|
||||
void SetWave(int Channel,const signed char *Data,int Length,int Rate);
|
||||
void SetWave(int Channel,signed char *Data,int Length,int Rate);
|
||||
|
||||
/** GetWave() ************************************************/
|
||||
/** Get current read position for the buffer set with the **/
|
||||
@@ -225,7 +225,7 @@ struct SndDriverStruct
|
||||
void (*Drum)(int Type,int Force);
|
||||
void (*SetChannels)(int Volume,int Switch);
|
||||
void (*Sound)(int Channel,int NewFreq,int NewVolume);
|
||||
void (*SetWave)(int Channel,const signed char *Data,int Length,int Freq);
|
||||
void (*SetWave)(int Channel,signed char *Data,int Length,int Freq);
|
||||
const signed char *(*GetWave)(int Channel);
|
||||
};
|
||||
extern struct SndDriverStruct SndDriver;
|
||||
|
||||
48
src/include/color.h
Normal file
48
src/include/color.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* ANSI Color definitiont - The Quick6502 Project
|
||||
* include/color.h
|
||||
*
|
||||
* Created by Manoel Trapier on 25/06/10
|
||||
* Copyright 2010 986 Corp. All rights reserved.
|
||||
*
|
||||
* $LastChangedDate:$
|
||||
* $Author:$
|
||||
* $HeadURL:$
|
||||
* $Revision:$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
#define ALLOW_COLORS
|
||||
|
||||
#ifdef ALLOW_COLORS
|
||||
#define __C(c) "\x1B[" c "m"
|
||||
#else
|
||||
#define __C(c) ""
|
||||
#endif
|
||||
|
||||
#define ANSI_COLOR __C
|
||||
#define FBLACK ANSI_COLOR("30")
|
||||
#define FRED ANSI_COLOR("31")
|
||||
#define FGREEN ANSI_COLOR("32")
|
||||
#define FYELLOW ANSI_COLOR("33")
|
||||
#define FBLUE ANSI_COLOR("34")
|
||||
#define FMAGENTA ANSI_COLOR("35")
|
||||
#define FCYAN ANSI_COLOR("36")
|
||||
#define FWHITE ANSI_COLOR("37")
|
||||
|
||||
#define BBLACK ANSI_COLOR("40")
|
||||
#define BRED ANSI_COLOR("41")
|
||||
#define BGREEN ANSI_COLOR("42")
|
||||
#define BYELLOW ANSI_COLOR("43")
|
||||
#define BBLUE ANSI_COLOR("44")
|
||||
#define BMAGENTA ANSI_COLOR("45")
|
||||
#define BCYAN ANSI_COLOR("46")
|
||||
#define BWHITE ANSI_COLOR("47")
|
||||
|
||||
#define CNORMAL ANSI_COLOR("0")
|
||||
|
||||
#endif /* COLOR_H */
|
||||
|
||||
@@ -18,22 +18,23 @@
|
||||
/* M6502 configuration
|
||||
*
|
||||
* Supported DEFINEs :
|
||||
* NO_DECIMAL Quick6502 will not support BDC arithemtic (used for NES)
|
||||
* CMOS_6502 Quick6502 will act as a CMOS 6502 (Not actually used)
|
||||
* Q6502_NO_DECIMAL Quick6502 will not support BDC arithemtic (used for NES)
|
||||
* Q6502_CMOS Quick6502 will act as a CMOS 6502 (Not actually used)
|
||||
* Q6502_DEBUGGER Quick6502 will be build with debugguer support. Add some KB to the binary
|
||||
* and may slowdown a bit the emulation.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef CMOS_6502
|
||||
#ifdef Q6502_CMOS
|
||||
//#warning Quick6502 CMOS support is actually desactivated, desactivate it
|
||||
#undef CMOS_6502
|
||||
#undef Q6502_CMOS
|
||||
#endif
|
||||
|
||||
#ifndef NO_DECIMAL
|
||||
#ifndef Q6502_NO_DECIMAL
|
||||
//#warning Quick6502 have actually no BCD support, fallback to no NO_DECIMAL
|
||||
#define NO_DECIMAL
|
||||
#define Q6502_NO_DECIMAL
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
|
||||
typedef byte (*quick6502_MemoryReadFunction)(unsigned short addr);
|
||||
@@ -63,6 +64,9 @@ typedef struct quick6502_cpu_
|
||||
/* Other config options */
|
||||
byte running; /* This field is used to prevent cpu free if this cpu is running */
|
||||
byte page_crossed;
|
||||
|
||||
/* TODO add support for Inst/MemAccess breakpoints */
|
||||
|
||||
} quick6502_cpu;
|
||||
|
||||
typedef struct quick6502_cpuconfig_
|
||||
@@ -150,8 +154,10 @@ void quick6502_int(quick6502_cpu *cpu, quick6502_signal signal);
|
||||
void quick6502_dump(quick6502_cpu *cpu, FILE * fp);
|
||||
|
||||
/** Get current instruction name at specified address and put it into buffer */
|
||||
void quick6502_getinstruction(quick6502_cpu *cpu, unsigned short addr, char *buffer);
|
||||
#define MINE
|
||||
|
||||
int quick6502_getinstruction(quick6502_cpu *cpu, char interpret,
|
||||
unsigned short addr, char *buffer, int *strlength);
|
||||
/**
|
||||
* Free the CPU
|
||||
*
|
||||
|
||||
42
src/include/log.h
Normal file
42
src/include/log.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Log Facility - The Quick6502 Project
|
||||
* include/log.h
|
||||
*
|
||||
* Created by Manoel Trapier on 19/05/10
|
||||
* Copyright 2010 986 Corp. All rights reserved.
|
||||
*
|
||||
* $LastChangedDate:$
|
||||
* $Author:$
|
||||
* $HeadURL:$
|
||||
* $Revision:$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LOG_H
|
||||
#define _LOG_H
|
||||
|
||||
enum
|
||||
{
|
||||
LOG_ALWAYS = -1,
|
||||
LOG_PANIC = 0,
|
||||
LOG_ERROR,
|
||||
LOG_WARNING,
|
||||
LOG_NORMAL,
|
||||
LOG_VERBOSE,
|
||||
LOG_DEBUG,
|
||||
};
|
||||
|
||||
#define TIME_STAMP_LOG
|
||||
|
||||
#define MAX_DEBUG_LEVEL LOG_PANIC
|
||||
#define log(_level, _user, _fmt, ...) if ((_level <= MAX_DEBUG_LEVEL) || (_level <= LOG_PANIC)) do { log_real(_level, _user, _fmt, ##__VA_ARGS__); } while(0)
|
||||
|
||||
void log_real(int level, char *user, char *fmt, ...);
|
||||
|
||||
#define LOG(_level, _str, ...) if ((_level <= MAX_DEBUG_LEVEL) || (_level <= LOG_PANIC)) do { puts(_str); } while(0)
|
||||
#define LOGCODE(_level, _user, _code) log(_level, _user, ""); \
|
||||
if ((_level <= MAX_DEBUG_LEVEL) || (_level <= LOG_PANIC)) \
|
||||
do { _code; printf("\n"); } while(0)
|
||||
|
||||
#endif /* _LOG_H */
|
||||
|
||||
@@ -63,6 +63,6 @@ void InitMemory();
|
||||
byte ReadMemory(byte page, byte addr);
|
||||
void WriteMemory(byte page, byte addr, byte value);
|
||||
|
||||
void DumpMemoryState();
|
||||
void DumpMemoryState(FILE *fp);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user