[Cosmetics]
- Update some headers that was incorrect - Reformat the code in all files to match the same code style - Removal of unwanted/unneeded files
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
* Cart manager - The peTI-NESulator Project
|
||||
* NESCart.h
|
||||
*
|
||||
* Created by Manoel TRAPIER.
|
||||
* Created by Manoël TRAPIER.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
#define iNES_4SCREEN 0x08
|
||||
|
||||
typedef struct NesCart_
|
||||
{
|
||||
{
|
||||
uint32_t PROMSize, /* Size of PROM */
|
||||
VROMSize; /* Size of VROM */
|
||||
char MapperID; /* Mapper Type */
|
||||
uint8_t Flags;
|
||||
char *FileName;
|
||||
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(FILE *out, NesCart * cart);
|
||||
int LoadCart(const char *filename, NesCart * cart);
|
||||
void DumpCartProperties(FILE *out, NesCart *cart);
|
||||
int LoadCart(const char *filename, NesCart *cart);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,232 +0,0 @@
|
||||
/** EMULib Emulation Library *********************************/
|
||||
/** **/
|
||||
/** Sound.h **/
|
||||
/** **/
|
||||
/** This file defines standard sound generation API and **/
|
||||
/** functions needed to log soundtrack into a MIDI file. **/
|
||||
/** See Sound.c and the sound drivers for the code. **/
|
||||
/** **/
|
||||
/** Copyright (C) Marat Fayzullin 1996-2007 **/
|
||||
/** You are not allowed to distribute this software **/
|
||||
/** commercially. Please, notify me, if you make any **/
|
||||
/** changes to this file. **/
|
||||
/*************************************************************/
|
||||
/*/
|
||||
|
||||
#ifndef SOUND_H
|
||||
#define SOUND_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* SetSound() arguments: */
|
||||
#define SND_MELODIC 0 /* Melodic sound (default) */
|
||||
#define SND_RECTANGLE 0 /* Rectangular wave */
|
||||
#define SND_QS_DU0 5
|
||||
#define SND_QS_DU1 6
|
||||
#define SND_QS_DU2 7
|
||||
#define SND_QS_DU3 8
|
||||
#define SND_TRIANGLE 1 /* Triangular wave (1/2 rect.)*/
|
||||
#define SND_NOISE 2 /* White noise */
|
||||
#define SND_PERIODIC 3 /* Periodic noise (not im-ed) */
|
||||
#define SND_WAVE 4 /* Wave sound set by SetWave()*/
|
||||
#define SND_MIDI 0x100 /* MIDI instrument (ORable) */
|
||||
|
||||
/* Drum() arguments: */
|
||||
#define DRM_CLICK 0 /* Click (default) */
|
||||
#define DRM_MIDI 0x100 /* MIDI drum (ORable) */
|
||||
|
||||
/* MIDI characteristics: */
|
||||
#define MIDI_CHANNELS 16 /* Number of MIDI channels */
|
||||
#define MIDI_MINFREQ 9 /* Min MIDI frequency (Hz) */
|
||||
#define MIDI_MAXFREQ 12285 /* Max MIDI frequency (Hz) */
|
||||
#define MIDI_DIVISIONS 1000 /* Number of ticks per second */
|
||||
|
||||
/* MIDILogging() arguments: */
|
||||
#define MIDI_OFF 0 /* Turn MIDI logging off */
|
||||
#define MIDI_ON 1 /* Turn MIDI logging on */
|
||||
#define MIDI_TOGGLE 2 /* Toggle MIDI logging */
|
||||
#define MIDI_QUERY 3 /* Query MIDI logging status */
|
||||
|
||||
/** TrashSound() *********************************************/
|
||||
/** Shut down sound driver. Each driver implements its own **/
|
||||
/** TrashSound() function. **/
|
||||
/*************************************************************/
|
||||
void TrashSound(void);
|
||||
|
||||
/** Sound() **************************************************/
|
||||
/** Generate sound of given frequency (Hz) and volume **/
|
||||
/** (0..255) via given channel. Setting Freq=0 or Volume=0 **/
|
||||
/** turns sound off. **/
|
||||
/*************************************************************/
|
||||
void Sound(int Channel,int Freq,int Volume);
|
||||
|
||||
/** Drum() ***************************************************/
|
||||
/** Hit a drum of given type with given force (0..255). **/
|
||||
/** MIDI drums can be used by ORing their numbers with **/
|
||||
/** SND_MIDI. **/
|
||||
/*************************************************************/
|
||||
void Drum(int Type,int Force);
|
||||
|
||||
/** SetSound() ***********************************************/
|
||||
/** Set sound type at a given channel. MIDI instruments can **/
|
||||
/** be set directly by ORing their numbers with SND_MIDI. **/
|
||||
/*************************************************************/
|
||||
void SetSound(int Channel,int NewType);
|
||||
|
||||
/** SetChannels() ********************************************/
|
||||
/** Set master volume (0..255) and switch channels on/off. **/
|
||||
/** Each channel N has corresponding bit 2^N in Switch. Set **/
|
||||
/** or reset this bit to turn the channel on or off. **/
|
||||
/*************************************************************/
|
||||
void SetChannels(int Volume,int Switch);
|
||||
|
||||
/** SetWave() ************************************************/
|
||||
/** Set waveform for a given channel. The channel will be **/
|
||||
/** marked with sound type SND_WAVE. Set Rate=0 if you want **/
|
||||
/** waveform to be an instrument or set it to the waveform **/
|
||||
/** own playback rate. **/
|
||||
/*************************************************************/
|
||||
void SetWave(int Channel,signed char *Data,int Length,int Rate);
|
||||
|
||||
/** GetWave() ************************************************/
|
||||
/** Get current read position for the buffer set with the **/
|
||||
/** SetWave() call. Returns 0 if no buffer has been set, or **/
|
||||
/** if there is no playrate set (i.e. wave is instrument). **/
|
||||
/*************************************************************/
|
||||
const signed char *GetWave(int Channel);
|
||||
|
||||
/** InitMIDI() ***********************************************/
|
||||
/** Initialize soundtrack logging into MIDI file FileName. **/
|
||||
/** Repeated calls to InitMIDI() will close current MIDI **/
|
||||
/** file and continue logging into a new one. **/
|
||||
/*************************************************************/
|
||||
void InitMIDI(const char *FileName);
|
||||
|
||||
/** TrashMIDI() **********************************************/
|
||||
/** Finish logging soundtrack and close the MIDI file. **/
|
||||
/*************************************************************/
|
||||
void TrashMIDI(void);
|
||||
|
||||
/** MIDILogging() ********************************************/
|
||||
/** Turn soundtrack logging on/off and return its current **/
|
||||
/** status. Possible values of Switch are MIDI_OFF (turn **/
|
||||
/** logging off), MIDI_ON (turn logging on), MIDI_TOGGLE **/
|
||||
/** (toggle logging), and MIDI_QUERY (just return current **/
|
||||
/** state of logging). **/
|
||||
/*************************************************************/
|
||||
int MIDILogging(int Switch);
|
||||
|
||||
/** MIDITicks() **********************************************/
|
||||
/** Log N 1ms MIDI ticks. **/
|
||||
/*************************************************************/
|
||||
void MIDITicks(int N);
|
||||
|
||||
//#ifdef UNIX
|
||||
#define SND_CHANNELS 4 /* Number of channels */
|
||||
#define SND_SAMPLESIZE 256 /* Max. SetWave() sample size */
|
||||
#define SND_BUFSIZE 256 /* Buffer size, <= 2^SND_BITS */
|
||||
#define SND_BITS 8 /* Number of bits in a fragment */
|
||||
#define SND_BUFFERS 64 /* Number of fragments, >= 2 */
|
||||
/* Bigger value results in better behaviour on loaded */
|
||||
/* but output gets more delayed. */
|
||||
|
||||
/** InitSound() **********************************************/
|
||||
/** Initialize Unix sound driver with given synthesis rate. **/
|
||||
/** Returns Rate on success, 0 otherwise. Pass Rate=0 to **/
|
||||
/** skip initialization and be silent. Pass Verbose!=0 to **/
|
||||
/** see initialization messages. **/
|
||||
/*************************************************************/
|
||||
int InitSound(int Rate,int Verbose);
|
||||
|
||||
/** StopSound() **********************************************/
|
||||
/** Temporarily suspend sound. **/
|
||||
/*************************************************************/
|
||||
void StopSound(void);
|
||||
|
||||
/** ResumeSound() ********************************************/
|
||||
/** Resume sound after StopSound(). **/
|
||||
/*************************************************************/
|
||||
void ResumeSound(void);
|
||||
//#endif /* UNIX */
|
||||
|
||||
#ifdef MSDOS
|
||||
#define SND_CHANNELS 16 /* Number of sound channels */
|
||||
#define OPL_CHANNELS 7 /* Number of Adlib channels */
|
||||
#define SND_SAMPLESIZE 256 /* Max. SetWave() sample size */
|
||||
#define SND_BUFSIZE 512 /* Buffer size for DMA */
|
||||
#define SND_MAXDELAY 10 /* Maximal sound delay 1/n s */
|
||||
|
||||
/** InitSound() **********************************************/
|
||||
/** Initialize sound. Returns Rate on success, 0 otherwise. **/
|
||||
/** Rate=0 to skip initialization (will be silent). **/
|
||||
/*************************************************************/
|
||||
int InitSound(uint32_t Rate,uint32_t Latency);
|
||||
#endif /* MSDOS */
|
||||
|
||||
#ifdef WINDOWS
|
||||
#define SND_CHANNELS 16 /* Number of channels */
|
||||
#define SND_SAMPLESIZE 256 /* Max. SetWave() sample size */
|
||||
#define SND_BUFSIZE 512 /* Size of a wave buffer */
|
||||
#define SND_BUFFERS 32 /* Number of wave buffers */
|
||||
|
||||
#include <Windows.h>
|
||||
|
||||
/** InitSound() **********************************************/
|
||||
/** Initialize Windows sound driver with given synthesis **/
|
||||
/** rate. Returns Rate on success, 0 otherwise. Pass Rate=0 **/
|
||||
/** to skip initialization and be silent. Pass Rate=1 to **/
|
||||
/** use MIDI (midiOut). Pass Rate=8192..44100 to use wave **/
|
||||
/** synthesis (waveOut). Number of wave synthesis buffers **/
|
||||
/** must be in 2..SND_BUFFERS range. **/
|
||||
/*************************************************************/
|
||||
uint32_t InitSound(uint32_t Rate,uint32_t Delay);
|
||||
#endif /* WINDOWS */
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
#ifndef MSDOS
|
||||
#ifndef WINDOWS
|
||||
#ifndef UNIX
|
||||
#define SND_CHANNELS MIDI_CHANNELS /* Default number */
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** InitSound() **********************************************/
|
||||
/** Initialize Series60 sound driver with given synthesis **/
|
||||
/** rate. Returns Rate on success, 0 otherwise. Pass Rate=0 **/
|
||||
/** to skip initialization and be silent. **/
|
||||
/*************************************************************/
|
||||
uint32_t InitSound(uint32_t Rate,uint32_t Delay);
|
||||
#endif
|
||||
|
||||
/** RenderAudio() ********************************************/
|
||||
/** Render given number of melodic sound samples. Returns **/
|
||||
/** number of samples actually rendered. **/
|
||||
/*************************************************************/
|
||||
uint32_t RenderAudio(uint32_t Samples);
|
||||
|
||||
/** SndDriver ************************************************/
|
||||
/** Each sound driver should fill this structure with **/
|
||||
/** pointers to hardware-dependent handlers. This has to be **/
|
||||
/** done inside the InitSound() function. **/
|
||||
/*************************************************************/
|
||||
struct SndDriverStruct
|
||||
{
|
||||
void (*SetSound)(int Channel,int NewType);
|
||||
void (*Drum)(int Type,int Force);
|
||||
void (*SetChannels)(int Volume,int Switch);
|
||||
void (*Sound)(int Channel,int NewFreq,int NewVolume);
|
||||
void (*SetWave)(int Channel,signed char *Data,int Length,int Freq);
|
||||
const signed char *(*GetWave)(int Channel);
|
||||
};
|
||||
extern struct SndDriverStruct SndDriver;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SOUND_H */
|
||||
@@ -2,7 +2,7 @@
|
||||
* APU emulation - The peTI-NESulator Project
|
||||
* apu.h
|
||||
*
|
||||
* Created by Manoel TRAPIER.
|
||||
* Created by Manoël TRAPIER.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -2,18 +2,13 @@
|
||||
* ANSI Color definition - The Quick6502 Project
|
||||
* include/color.h
|
||||
*
|
||||
* Created by Manoel Trapier on 25/06/10
|
||||
* Created by Manoël Trapier on 25/06/10
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
* $LastChangedDate:$
|
||||
* $Author:$
|
||||
* $HeadURL:$
|
||||
* $Revision:$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef COLOR_H
|
||||
#define COLOR_H
|
||||
#define COLOR_H
|
||||
|
||||
#define ALLOW_COLORS
|
||||
|
||||
@@ -44,5 +39,5 @@
|
||||
|
||||
#define CNORMAL ANSI_COLOR("0")
|
||||
|
||||
#endif /* COLOR_H */
|
||||
#endif /* COLOR_H */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* CoreCPU - The Quick6502 Project
|
||||
* corecpu.h
|
||||
*
|
||||
* Created by Manoel Trapier on 24/02/08
|
||||
* Created by Manoël Trapier on 24/02/08
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -37,52 +37,52 @@ typedef void (*quick6502_MemoryWriteFunction)(uint16_t addr, uint8_t value);
|
||||
|
||||
typedef struct quick6502_cpu_
|
||||
{
|
||||
/* 6502 registers */
|
||||
uint8_t reg_A, reg_X, reg_Y;
|
||||
uint8_t reg_P, reg_S;
|
||||
uint16_t reg_PC;
|
||||
/* 6502 registers */
|
||||
uint8_t reg_A, reg_X, reg_Y;
|
||||
uint8_t reg_P, reg_S;
|
||||
uint16_t reg_PC;
|
||||
|
||||
/* Read/Write memory functions */
|
||||
quick6502_MemoryReadFunction memory_read;
|
||||
quick6502_MemoryWriteFunction memory_write;
|
||||
quick6502_MemoryReadFunction memory_page0_read;
|
||||
quick6502_MemoryWriteFunction memory_page0_write;
|
||||
quick6502_MemoryReadFunction memory_stack_read;
|
||||
quick6502_MemoryWriteFunction memory_stack_write;
|
||||
quick6502_MemoryReadFunction memory_opcode_read;
|
||||
/* Read/Write memory functions */
|
||||
quick6502_MemoryReadFunction memory_read;
|
||||
quick6502_MemoryWriteFunction memory_write;
|
||||
quick6502_MemoryReadFunction memory_page0_read;
|
||||
quick6502_MemoryWriteFunction memory_page0_write;
|
||||
quick6502_MemoryReadFunction memory_stack_read;
|
||||
quick6502_MemoryWriteFunction memory_stack_write;
|
||||
quick6502_MemoryReadFunction memory_opcode_read;
|
||||
|
||||
/* Timing related */
|
||||
long cycle_done;
|
||||
uint8_t exit_loop;
|
||||
uint8_t int_pending;
|
||||
/* Timing related */
|
||||
long cycle_done;
|
||||
uint8_t exit_loop;
|
||||
uint8_t int_pending;
|
||||
|
||||
/* Other config options */
|
||||
uint8_t running; /* This field is used to prevent cpu free if this cpu is running */
|
||||
uint8_t page_crossed;
|
||||
|
||||
/* TODO add support for Inst/MemAccess breakpoints */
|
||||
|
||||
/* Other config options */
|
||||
uint8_t running; /* This field is used to prevent cpu free if this cpu is running */
|
||||
uint8_t page_crossed;
|
||||
|
||||
/* TODO add support for Inst/MemAccess breakpoints */
|
||||
|
||||
} quick6502_cpu;
|
||||
|
||||
typedef struct quick6502_cpuconfig_
|
||||
{
|
||||
/* Read/Write memory functions */
|
||||
quick6502_MemoryReadFunction memory_read;
|
||||
quick6502_MemoryWriteFunction memory_write;
|
||||
quick6502_MemoryReadFunction memory_page0_read;
|
||||
quick6502_MemoryWriteFunction memory_page0_write;
|
||||
quick6502_MemoryReadFunction memory_stack_read;
|
||||
quick6502_MemoryWriteFunction memory_stack_write;
|
||||
quick6502_MemoryReadFunction memory_opcode_read;
|
||||
/* Read/Write memory functions */
|
||||
quick6502_MemoryReadFunction memory_read;
|
||||
quick6502_MemoryWriteFunction memory_write;
|
||||
quick6502_MemoryReadFunction memory_page0_read;
|
||||
quick6502_MemoryWriteFunction memory_page0_write;
|
||||
quick6502_MemoryReadFunction memory_stack_read;
|
||||
quick6502_MemoryWriteFunction memory_stack_write;
|
||||
quick6502_MemoryReadFunction memory_opcode_read;
|
||||
} quick6502_cpuconfig;
|
||||
|
||||
/*** Signal that we can send to the CPU ***/
|
||||
typedef enum
|
||||
{
|
||||
Q6502_NO_SIGNAL = 0,
|
||||
Q6502_IRQ_SIGNAL,
|
||||
Q6502_NMI_SIGNAL,
|
||||
Q6502_STOPLOOP_SIGNAL
|
||||
Q6502_NO_SIGNAL = 0,
|
||||
Q6502_IRQ_SIGNAL,
|
||||
Q6502_NMI_SIGNAL,
|
||||
Q6502_STOPLOOP_SIGNAL
|
||||
} quick6502_signal;
|
||||
|
||||
/*** Some 6502 related definitions ***/
|
||||
@@ -134,7 +134,7 @@ void quick6502_reset(quick6502_cpu *cpu);
|
||||
*
|
||||
* int: (Number of cycle really done) - (Number of cycle asked)
|
||||
*/
|
||||
int quick6502_run(quick6502_cpu *cpu, int cycles);
|
||||
uint32_t quick6502_run(quick6502_cpu *cpu, uint32_t cycles);
|
||||
|
||||
/** Loop CPU until explicit quit */
|
||||
void quick6502_loop(quick6502_cpu *cpu);
|
||||
@@ -146,13 +146,14 @@ void quick6502_exec(quick6502_cpu *cpu);
|
||||
void quick6502_int(quick6502_cpu *cpu, quick6502_signal signal);
|
||||
|
||||
/** Dump CPU State to the given file */
|
||||
void quick6502_dump(quick6502_cpu *cpu, FILE * fp);
|
||||
void quick6502_dump(quick6502_cpu *cpu, FILE *fp);
|
||||
|
||||
/** Get current instruction name at specified address and put it into buffer */
|
||||
#define MINE
|
||||
|
||||
int quick6502_getinstruction(quick6502_cpu *cpu, char interpret,
|
||||
uint16_t addr, char *buffer, int *strlength);
|
||||
|
||||
/**
|
||||
* Free the CPU
|
||||
*
|
||||
|
||||
@@ -2,18 +2,13 @@
|
||||
* Log Facility - The Quick6502 Project
|
||||
* include/log.h
|
||||
*
|
||||
* Created by Manoel Trapier on 19/05/10
|
||||
* Created by Manoël Trapier on 19/05/10
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
* $LastChangedDate:$
|
||||
* $Author:$
|
||||
* $HeadURL:$
|
||||
* $Revision:$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LOG_H
|
||||
#define _LOG_H
|
||||
#define _LOG_H
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -38,5 +33,5 @@ void log_real(int level, char *user, char *fmt, ...);
|
||||
if ((_level <= MAX_DEBUG_LEVEL) || (_level <= LOG_PANIC)) \
|
||||
do { _code; printf("\n"); } while(0)
|
||||
|
||||
#endif /* _LOG_H */
|
||||
#endif /* _LOG_H */
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
* Mappers manager & facilities - The peTI-NESulator Project
|
||||
* mappers.h
|
||||
*
|
||||
* Created by Manoel TRAPIER.
|
||||
* Copyright (c) 2003-2008 986Corp. All rights reserved.
|
||||
* Created by Manoël TRAPIER.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -14,11 +14,10 @@
|
||||
#include <stdio.h>
|
||||
#include <NESCarts.h>
|
||||
|
||||
typedef int (*MapperInit) (NesCart * cart);
|
||||
typedef int (*MapperWriteHook) (register uint16_t Addr,
|
||||
register uint8_t Value);
|
||||
typedef int (*MapperIRQ) (int cycledone);
|
||||
typedef void (*MapperDump) (FILE *fp);
|
||||
typedef int (*MapperInit)(NesCart *cart);
|
||||
typedef int (*MapperWriteHook)(register uint16_t Addr, register uint8_t Value);
|
||||
typedef int (*MapperIRQ)(int cycledone);
|
||||
typedef void (*MapperDump)(FILE *fp);
|
||||
|
||||
#ifdef __TINES_MAPPERS__
|
||||
|
||||
@@ -33,24 +32,25 @@ extern NesCart *Cart;
|
||||
#define GETLAST16KBANK(c) ((c->PROMSize>>14)-1)
|
||||
#define GETLAST32KBANK(c) ((c->PROMSize>>15)-1)
|
||||
|
||||
void set_vrom_bank_1k(uint16_t addr,int slot);
|
||||
void set_vrom_bank_2k(uint16_t addr,int slot);
|
||||
void set_vrom_bank_4k(uint16_t addr,int slot);
|
||||
void set_vrom_bank_1k(uint16_t addr, int slot);
|
||||
void set_vrom_bank_2k(uint16_t addr, int slot);
|
||||
void set_vrom_bank_4k(uint16_t addr, int slot);
|
||||
void set_vrom_bank_8k(uint16_t addr, int slot);
|
||||
|
||||
void set_prom_bank_8k(uint16_t addr,int slot);
|
||||
void set_prom_bank_16k(uint16_t addr,int slot);
|
||||
void set_prom_bank_32k(uint16_t addr,int slot);
|
||||
void set_prom_bank_8k(uint16_t addr, int slot);
|
||||
void set_prom_bank_16k(uint16_t addr, int slot);
|
||||
void set_prom_bank_32k(uint16_t addr, int slot);
|
||||
|
||||
#else /* __TINES_MAPPERS__ */
|
||||
|
||||
/* Available functions outside of mappers */
|
||||
|
||||
void mapper_list();
|
||||
int mapper_init(NesCart *cart);
|
||||
|
||||
extern MapperIRQ mapper_irqloop;
|
||||
extern MapperDump mapper_dump;
|
||||
int mapper_init(NesCart *cart);
|
||||
|
||||
extern MapperIRQ mapper_irqloop;
|
||||
extern MapperDump mapper_dump;
|
||||
extern MapperWriteHook mapper_hook;
|
||||
|
||||
#endif /* __TINES_MAPPERS__ */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* 6502 Memory manager - The peTI-NESulator Project
|
||||
* memory.h - Taken from the Quick6502 project
|
||||
*
|
||||
* Created by Manoel Trapier on 18/09/06.
|
||||
* Created by Manoël Trapier on 18/09/06.
|
||||
* Copyright 2003-2008 986 Corp. All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -19,6 +19,7 @@
|
||||
#define ATTR_PAGE_MAPPED 0x01
|
||||
|
||||
typedef uint8_t (*func_rdhook)(uint8_t /* addr */);
|
||||
|
||||
typedef void (*func_wrhook)(uint8_t addr, uint8_t data);
|
||||
|
||||
/* Functions to manage pages data */
|
||||
@@ -29,35 +30,23 @@ void set_page_ptr_4k(uint8_t page, uint8_t *ptr);
|
||||
void set_page_ptr_8k(uint8_t page, uint8_t *ptr);
|
||||
void set_page_ptr_16k(uint8_t page, uint8_t *ptr);
|
||||
void set_page_ptr_32k(uint8_t page, uint8_t *ptr);
|
||||
|
||||
uint8_t *get_page_ptr(uint8_t page);
|
||||
|
||||
|
||||
/* Functions to set pages attributes */
|
||||
|
||||
void set_page_rd_hook(uint8_t page, func_rdhook func);
|
||||
|
||||
void set_page_wr_hook(uint8_t page, func_wrhook func);
|
||||
|
||||
void set_page_readable(uint8_t page, uint8_t value);
|
||||
|
||||
void set_page_writeable(uint8_t page, uint8_t value);
|
||||
|
||||
void set_page_ghost(uint8_t page, uint8_t value, uint8_t ghost);
|
||||
|
||||
uint8_t get_page_attributes(uint8_t page);
|
||||
|
||||
func_rdhook get_page_rdhook(uint8_t page);
|
||||
|
||||
func_wrhook get_page_wrhook(uint8_t page);
|
||||
|
||||
/* Generalist functions */
|
||||
|
||||
void InitMemory();
|
||||
|
||||
uint8_t ReadMemory(uint8_t page, uint8_t addr);
|
||||
void WriteMemory(uint8_t page, uint8_t addr, uint8_t value);
|
||||
|
||||
void DumpMemoryState(FILE *fp);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* OS Dependent functions - The peTI-NESulator Project
|
||||
* os_dependent.h
|
||||
*
|
||||
* Created by Manoel TRAPIER on 08/05/08.
|
||||
* Created by Manoël TRAPIER on 08/05/08.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ int graphics_drawline(long x, long y, long x1, long y1, long color);
|
||||
|
||||
typedef struct Palette_t
|
||||
{
|
||||
uint8_t r,g,b,a;
|
||||
uint8_t r, g, b, a;
|
||||
} Palette;
|
||||
|
||||
int getKeyStatus(int key);
|
||||
@@ -29,17 +29,17 @@ int getKeyStatus(int key);
|
||||
/* Sound related functions */
|
||||
|
||||
/* IO functions */
|
||||
void *LoadFilePtr(char * filename);
|
||||
void *LoadFilePtr(char *filename);
|
||||
|
||||
/* Console functions */
|
||||
typedef enum ConsoleLevel_t
|
||||
{
|
||||
Console_Error = 0,
|
||||
Console_Warning,
|
||||
Console_Alert,
|
||||
Console_Default,
|
||||
Console_Verbose,
|
||||
Console_Debug,
|
||||
Console_Error = 0,
|
||||
Console_Warning,
|
||||
Console_Alert,
|
||||
Console_Default,
|
||||
Console_Verbose,
|
||||
Console_Debug,
|
||||
} ConsoleLevel;
|
||||
|
||||
int console_init(ConsoleLevel DefaultLevel);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Paddle manager - The peTI-NESulator Project
|
||||
* paddle.h
|
||||
*
|
||||
* Created by Manoel TRAPIER.
|
||||
* Created by Manoël TRAPIER.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -10,22 +10,14 @@
|
||||
#ifndef PADDLE_H
|
||||
#define PADDLE_H
|
||||
|
||||
typedef struct Paddle_
|
||||
typedef struct Paddle_
|
||||
{
|
||||
|
||||
uint8_t Bit;
|
||||
|
||||
uint8_t LastWrite;
|
||||
|
||||
} Paddle;
|
||||
|
||||
|
||||
uint8_t ReadPaddle(Paddle * pdl);
|
||||
|
||||
|
||||
void InitPaddle(Paddle * pdl);
|
||||
|
||||
void WritePaddle(Paddle * pdl, uint8_t val);
|
||||
|
||||
uint8_t ReadPaddle(Paddle *pdl);
|
||||
void InitPaddle(Paddle *pdl);
|
||||
void WritePaddle(Paddle *pdl, uint8_t val);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,260 +1,260 @@
|
||||
/* Generated data file from file 'stdin' */
|
||||
|
||||
Palette basicPalette[] = {
|
||||
{ 0x1E, 0x1E, 0x1E, 0x07 },
|
||||
{ 0x03, 0x09, 0x28, 0xB7 },
|
||||
{ 0x0A, 0x04, 0x2B, 0x0D },
|
||||
{ 0x17, 0x02, 0x28, 0x00 },
|
||||
{ 0x22, 0x00, 0x1D, 0xB7 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0xB7 },
|
||||
{ 0x1B, 0x09, 0x01, 0xB7 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0x00 },
|
||||
{ 0x01, 0x17, 0x02, 0xB7 },
|
||||
{ 0x00, 0x14, 0x0B, 0xBF },
|
||||
{ 0x01, 0x11, 0x1B, 0xBF },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x2F, 0x30, 0x2F, 0xB7 },
|
||||
{ 0x05, 0x1A, 0x37, 0xBF },
|
||||
{ 0x12, 0x10, 0x3B, 0xBF },
|
||||
{ 0x23, 0x09, 0x38, 0xB7 },
|
||||
{ 0x31, 0x06, 0x2E, 0xBF },
|
||||
{ 0x35, 0x08, 0x18, 0xB7 },
|
||||
{ 0x35, 0x0D, 0x08, 0x00 },
|
||||
{ 0x2D, 0x16, 0x03, 0xB7 },
|
||||
{ 0x22, 0x1E, 0x01, 0x00 },
|
||||
{ 0x0E, 0x24, 0x01, 0x00 },
|
||||
{ 0x05, 0x26, 0x06, 0x00 },
|
||||
{ 0x02, 0x26, 0x16, 0xB7 },
|
||||
{ 0x02, 0x22, 0x2A, 0xBF },
|
||||
{ 0x0B, 0x0B, 0x0B, 0xBF },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0x00 },
|
||||
{ 0x12, 0x2C, 0x3E, 0xB7 },
|
||||
{ 0x22, 0x25, 0x3F, 0xB7 },
|
||||
{ 0x30, 0x1E, 0x3E, 0xB7 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0xBF },
|
||||
{ 0x3D, 0x1D, 0x2E, 0xB7 },
|
||||
{ 0x3D, 0x20, 0x1B, 0xB7 },
|
||||
{ 0x3B, 0x28, 0x11, 0x07 },
|
||||
{ 0x35, 0x30, 0x08, 0x01 },
|
||||
{ 0x26, 0x35, 0x08, 0x00 },
|
||||
{ 0x14, 0x37, 0x11, 0x00 },
|
||||
{ 0x0F, 0x37, 0x25, 0x00 },
|
||||
{ 0x0A, 0x36, 0x37, 0xB7 },
|
||||
{ 0x18, 0x19, 0x19, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0xB7 },
|
||||
{ 0x2D, 0x37, 0x3E, 0xB7 },
|
||||
{ 0x33, 0x34, 0x3F, 0x10 },
|
||||
{ 0x37, 0x31, 0x3E, 0x00 },
|
||||
{ 0x3C, 0x30, 0x3D, 0x00 },
|
||||
{ 0x3D, 0x30, 0x38, 0x00 },
|
||||
{ 0x3D, 0x33, 0x30, 0x00 },
|
||||
{ 0x3D, 0x36, 0x2B, 0x00 },
|
||||
{ 0x3B, 0x39, 0x26, 0x00 },
|
||||
{ 0x34, 0x3B, 0x27, 0x00 },
|
||||
{ 0x2E, 0x3C, 0x2D, 0x00 },
|
||||
{ 0x2C, 0x3C, 0x36, 0x00 },
|
||||
{ 0x29, 0x3C, 0x3C, 0x00 },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x1E, 0x1E, 0x1E, 0xB7 },
|
||||
{ 0x03, 0x09, 0x28, 0xB7 },
|
||||
{ 0x0A, 0x04, 0x2B, 0xBF },
|
||||
{ 0x17, 0x02, 0x28, 0xB7 },
|
||||
{ 0x22, 0x00, 0x1D, 0xB7 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0x00 },
|
||||
{ 0x1B, 0x09, 0x01, 0x00 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0xB7 },
|
||||
{ 0x01, 0x17, 0x02, 0x00 },
|
||||
{ 0x00, 0x14, 0x0B, 0xB7 },
|
||||
{ 0x01, 0x11, 0x1B, 0x50 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x2F, 0x30, 0x2F, 0xBF },
|
||||
{ 0x05, 0x1A, 0x37, 0xB7 },
|
||||
{ 0x12, 0x10, 0x3B, 0xB7 },
|
||||
{ 0x23, 0x09, 0x38, 0x20 },
|
||||
{ 0x31, 0x06, 0x2E, 0xBF },
|
||||
{ 0x35, 0x08, 0x18, 0xB7 },
|
||||
{ 0x35, 0x0D, 0x08, 0xBF },
|
||||
{ 0x2D, 0x16, 0x03, 0xBF },
|
||||
{ 0x22, 0x1E, 0x01, 0xB7 },
|
||||
{ 0x0E, 0x24, 0x01, 0xBF },
|
||||
{ 0x05, 0x26, 0x06, 0xB7 },
|
||||
{ 0x02, 0x26, 0x16, 0xBF },
|
||||
{ 0x02, 0x22, 0x2A, 0xBF },
|
||||
{ 0x0B, 0x0B, 0x0B, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0xBF },
|
||||
{ 0x12, 0x2C, 0x3E, 0x53 },
|
||||
{ 0x22, 0x25, 0x3F, 0x54 },
|
||||
{ 0x30, 0x1E, 0x3E, 0x46 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0x31 },
|
||||
{ 0x3D, 0x1D, 0x2E, 0x3A },
|
||||
{ 0x3D, 0x20, 0x1B, 0x32 },
|
||||
{ 0x3B, 0x28, 0x11, 0x54 },
|
||||
{ 0x35, 0x30, 0x08, 0x30 },
|
||||
{ 0x26, 0x35, 0x08, 0x00 },
|
||||
{ 0x14, 0x37, 0x11, 0x00 },
|
||||
{ 0x0F, 0x37, 0x25, 0x00 },
|
||||
{ 0x0A, 0x36, 0x37, 0x00 },
|
||||
{ 0x18, 0x19, 0x19, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0x00 },
|
||||
{ 0x2D, 0x37, 0x3E, 0x00 },
|
||||
{ 0x33, 0x34, 0x3F, 0x00 },
|
||||
{ 0x37, 0x31, 0x3E, 0x00 },
|
||||
{ 0x3C, 0x30, 0x3D, 0x00 },
|
||||
{ 0x3D, 0x30, 0x38, 0x00 },
|
||||
{ 0x3D, 0x33, 0x30, 0xB7 },
|
||||
{ 0x3D, 0x36, 0x2B, 0xB7 },
|
||||
{ 0x3B, 0x39, 0x26, 0x00 },
|
||||
{ 0x34, 0x3B, 0x27, 0xBF },
|
||||
{ 0x2E, 0x3C, 0x2D, 0xB7 },
|
||||
{ 0x2C, 0x3C, 0x36, 0xB7 },
|
||||
{ 0x29, 0x3C, 0x3C, 0xB7 },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x1E, 0x1E, 0x1E, 0x07 },
|
||||
{ 0x03, 0x09, 0x28, 0xB7 },
|
||||
{ 0x0A, 0x04, 0x2B, 0x0D },
|
||||
{ 0x17, 0x02, 0x28, 0x00 },
|
||||
{ 0x22, 0x00, 0x1D, 0xB7 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0xB7 },
|
||||
{ 0x1B, 0x09, 0x01, 0xB7 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0x00 },
|
||||
{ 0x01, 0x17, 0x02, 0xB7 },
|
||||
{ 0x00, 0x14, 0x0B, 0x00 },
|
||||
{ 0x01, 0x11, 0x1B, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x2F, 0x30, 0x2F, 0xB7 },
|
||||
{ 0x05, 0x1A, 0x37, 0xBF },
|
||||
{ 0x12, 0x10, 0x3B, 0xB7 },
|
||||
{ 0x23, 0x09, 0x38, 0xB7 },
|
||||
{ 0x31, 0x06, 0x2E, 0x00 },
|
||||
{ 0x35, 0x08, 0x18, 0xBF },
|
||||
{ 0x35, 0x0D, 0x08, 0xB7 },
|
||||
{ 0x2D, 0x16, 0x03, 0xB7 },
|
||||
{ 0x22, 0x1E, 0x01, 0xB7 },
|
||||
{ 0x0E, 0x24, 0x01, 0x00 },
|
||||
{ 0x05, 0x26, 0x06, 0x00 },
|
||||
{ 0x02, 0x26, 0x16, 0xB7 },
|
||||
{ 0x02, 0x22, 0x2A, 0x06 },
|
||||
{ 0x0B, 0x0B, 0x0B, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0xB7 },
|
||||
{ 0x12, 0x2C, 0x3E, 0xB7 },
|
||||
{ 0x22, 0x25, 0x3F, 0xB7 },
|
||||
{ 0x30, 0x1E, 0x3E, 0xB7 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0x00 },
|
||||
{ 0x3D, 0x1D, 0x2E, 0x00 },
|
||||
{ 0x3D, 0x20, 0x1B, 0xB7 },
|
||||
{ 0x3B, 0x28, 0x11, 0xB7 },
|
||||
{ 0x35, 0x30, 0x08, 0x03 },
|
||||
{ 0x26, 0x35, 0x08, 0xB7 },
|
||||
{ 0x14, 0x37, 0x11, 0xBF },
|
||||
{ 0x0F, 0x37, 0x25, 0x00 },
|
||||
{ 0x0A, 0x36, 0x37, 0xB7 },
|
||||
{ 0x18, 0x19, 0x19, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0x00 },
|
||||
{ 0x2D, 0x37, 0x3E, 0x00 },
|
||||
{ 0x33, 0x34, 0x3F, 0xB7 },
|
||||
{ 0x37, 0x31, 0x3E, 0xB7 },
|
||||
{ 0x3C, 0x30, 0x3D, 0x00 },
|
||||
{ 0x3D, 0x30, 0x38, 0x00 },
|
||||
{ 0x3D, 0x33, 0x30, 0xB7 },
|
||||
{ 0x3D, 0x36, 0x2B, 0xB7 },
|
||||
{ 0x3B, 0x39, 0x26, 0xB7 },
|
||||
{ 0x34, 0x3B, 0x27, 0xBF },
|
||||
{ 0x2E, 0x3C, 0x2D, 0xBF },
|
||||
{ 0x2C, 0x3C, 0x36, 0xB7 },
|
||||
{ 0x29, 0x3C, 0x3C, 0xBF },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x1E, 0x1E, 0x1E, 0xB7 },
|
||||
{ 0x03, 0x09, 0x28, 0x08 },
|
||||
{ 0x0A, 0x04, 0x2B, 0xBF },
|
||||
{ 0x17, 0x02, 0x28, 0xB7 },
|
||||
{ 0x22, 0x00, 0x1D, 0x08 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0x08 },
|
||||
{ 0x1B, 0x09, 0x01, 0xB7 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0xBF },
|
||||
{ 0x01, 0x17, 0x02, 0xB7 },
|
||||
{ 0x00, 0x14, 0x0B, 0xB7 },
|
||||
{ 0x01, 0x11, 0x1B, 0x08 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x08 },
|
||||
{ 0x2F, 0x30, 0x2F, 0x01 },
|
||||
{ 0x05, 0x1A, 0x37, 0x08 },
|
||||
{ 0x12, 0x10, 0x3B, 0x0D },
|
||||
{ 0x23, 0x09, 0x38, 0x00 },
|
||||
{ 0x31, 0x06, 0x2E, 0xB7 },
|
||||
{ 0x35, 0x08, 0x18, 0xB7 },
|
||||
{ 0x35, 0x0D, 0x08, 0xB7 },
|
||||
{ 0x2D, 0x16, 0x03, 0xB7 },
|
||||
{ 0x22, 0x1E, 0x01, 0x00 },
|
||||
{ 0x0E, 0x24, 0x01, 0x00 },
|
||||
{ 0x05, 0x26, 0x06, 0xB7 },
|
||||
{ 0x02, 0x26, 0x16, 0x00 },
|
||||
{ 0x02, 0x22, 0x2A, 0xB7 },
|
||||
{ 0x0B, 0x0B, 0x0B, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x08 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0xB7 },
|
||||
{ 0x12, 0x2C, 0x3E, 0xBF },
|
||||
{ 0x22, 0x25, 0x3F, 0xBF },
|
||||
{ 0x30, 0x1E, 0x3E, 0xB7 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0xBF },
|
||||
{ 0x3D, 0x1D, 0x2E, 0xB7 },
|
||||
{ 0x3D, 0x20, 0x1B, 0x00 },
|
||||
{ 0x3B, 0x28, 0x11, 0xB7 },
|
||||
{ 0x35, 0x30, 0x08, 0x00 },
|
||||
{ 0x26, 0x35, 0x08, 0x00 },
|
||||
{ 0x14, 0x37, 0x11, 0x00 },
|
||||
{ 0x0F, 0x37, 0x25, 0xB7 },
|
||||
{ 0x0A, 0x36, 0x37, 0xB7 },
|
||||
{ 0x18, 0x19, 0x19, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0x00 },
|
||||
{ 0x2D, 0x37, 0x3E, 0xB7 },
|
||||
{ 0x33, 0x34, 0x3F, 0x00 },
|
||||
{ 0x37, 0x31, 0x3E, 0xB7 },
|
||||
{ 0x3C, 0x30, 0x3D, 0xBF },
|
||||
{ 0x3D, 0x30, 0x38, 0xB7 },
|
||||
{ 0x3D, 0x33, 0x30, 0x08 },
|
||||
{ 0x3D, 0x36, 0x2B, 0x01 },
|
||||
{ 0x3B, 0x39, 0x26, 0x01 },
|
||||
{ 0x34, 0x3B, 0x27, 0x00 },
|
||||
{ 0x2E, 0x3C, 0x2D, 0xB7 },
|
||||
{ 0x2C, 0x3C, 0x36, 0xB7 },
|
||||
{ 0x29, 0x3C, 0x3C, 0x08 },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0x08 },
|
||||
{ 0x01, 0x01, 0x01, 0xBF },
|
||||
};
|
||||
{ 0x1E, 0x1E, 0x1E, 0x07 },
|
||||
{ 0x03, 0x09, 0x28, 0xB7 },
|
||||
{ 0x0A, 0x04, 0x2B, 0x0D },
|
||||
{ 0x17, 0x02, 0x28, 0x00 },
|
||||
{ 0x22, 0x00, 0x1D, 0xB7 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0xB7 },
|
||||
{ 0x1B, 0x09, 0x01, 0xB7 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0x00 },
|
||||
{ 0x01, 0x17, 0x02, 0xB7 },
|
||||
{ 0x00, 0x14, 0x0B, 0xBF },
|
||||
{ 0x01, 0x11, 0x1B, 0xBF },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x2F, 0x30, 0x2F, 0xB7 },
|
||||
{ 0x05, 0x1A, 0x37, 0xBF },
|
||||
{ 0x12, 0x10, 0x3B, 0xBF },
|
||||
{ 0x23, 0x09, 0x38, 0xB7 },
|
||||
{ 0x31, 0x06, 0x2E, 0xBF },
|
||||
{ 0x35, 0x08, 0x18, 0xB7 },
|
||||
{ 0x35, 0x0D, 0x08, 0x00 },
|
||||
{ 0x2D, 0x16, 0x03, 0xB7 },
|
||||
{ 0x22, 0x1E, 0x01, 0x00 },
|
||||
{ 0x0E, 0x24, 0x01, 0x00 },
|
||||
{ 0x05, 0x26, 0x06, 0x00 },
|
||||
{ 0x02, 0x26, 0x16, 0xB7 },
|
||||
{ 0x02, 0x22, 0x2A, 0xBF },
|
||||
{ 0x0B, 0x0B, 0x0B, 0xBF },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0x00 },
|
||||
{ 0x12, 0x2C, 0x3E, 0xB7 },
|
||||
{ 0x22, 0x25, 0x3F, 0xB7 },
|
||||
{ 0x30, 0x1E, 0x3E, 0xB7 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0xBF },
|
||||
{ 0x3D, 0x1D, 0x2E, 0xB7 },
|
||||
{ 0x3D, 0x20, 0x1B, 0xB7 },
|
||||
{ 0x3B, 0x28, 0x11, 0x07 },
|
||||
{ 0x35, 0x30, 0x08, 0x01 },
|
||||
{ 0x26, 0x35, 0x08, 0x00 },
|
||||
{ 0x14, 0x37, 0x11, 0x00 },
|
||||
{ 0x0F, 0x37, 0x25, 0x00 },
|
||||
{ 0x0A, 0x36, 0x37, 0xB7 },
|
||||
{ 0x18, 0x19, 0x19, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0xB7 },
|
||||
{ 0x2D, 0x37, 0x3E, 0xB7 },
|
||||
{ 0x33, 0x34, 0x3F, 0x10 },
|
||||
{ 0x37, 0x31, 0x3E, 0x00 },
|
||||
{ 0x3C, 0x30, 0x3D, 0x00 },
|
||||
{ 0x3D, 0x30, 0x38, 0x00 },
|
||||
{ 0x3D, 0x33, 0x30, 0x00 },
|
||||
{ 0x3D, 0x36, 0x2B, 0x00 },
|
||||
{ 0x3B, 0x39, 0x26, 0x00 },
|
||||
{ 0x34, 0x3B, 0x27, 0x00 },
|
||||
{ 0x2E, 0x3C, 0x2D, 0x00 },
|
||||
{ 0x2C, 0x3C, 0x36, 0x00 },
|
||||
{ 0x29, 0x3C, 0x3C, 0x00 },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x1E, 0x1E, 0x1E, 0xB7 },
|
||||
{ 0x03, 0x09, 0x28, 0xB7 },
|
||||
{ 0x0A, 0x04, 0x2B, 0xBF },
|
||||
{ 0x17, 0x02, 0x28, 0xB7 },
|
||||
{ 0x22, 0x00, 0x1D, 0xB7 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0x00 },
|
||||
{ 0x1B, 0x09, 0x01, 0x00 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0xB7 },
|
||||
{ 0x01, 0x17, 0x02, 0x00 },
|
||||
{ 0x00, 0x14, 0x0B, 0xB7 },
|
||||
{ 0x01, 0x11, 0x1B, 0x50 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x2F, 0x30, 0x2F, 0xBF },
|
||||
{ 0x05, 0x1A, 0x37, 0xB7 },
|
||||
{ 0x12, 0x10, 0x3B, 0xB7 },
|
||||
{ 0x23, 0x09, 0x38, 0x20 },
|
||||
{ 0x31, 0x06, 0x2E, 0xBF },
|
||||
{ 0x35, 0x08, 0x18, 0xB7 },
|
||||
{ 0x35, 0x0D, 0x08, 0xBF },
|
||||
{ 0x2D, 0x16, 0x03, 0xBF },
|
||||
{ 0x22, 0x1E, 0x01, 0xB7 },
|
||||
{ 0x0E, 0x24, 0x01, 0xBF },
|
||||
{ 0x05, 0x26, 0x06, 0xB7 },
|
||||
{ 0x02, 0x26, 0x16, 0xBF },
|
||||
{ 0x02, 0x22, 0x2A, 0xBF },
|
||||
{ 0x0B, 0x0B, 0x0B, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0xBF },
|
||||
{ 0x12, 0x2C, 0x3E, 0x53 },
|
||||
{ 0x22, 0x25, 0x3F, 0x54 },
|
||||
{ 0x30, 0x1E, 0x3E, 0x46 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0x31 },
|
||||
{ 0x3D, 0x1D, 0x2E, 0x3A },
|
||||
{ 0x3D, 0x20, 0x1B, 0x32 },
|
||||
{ 0x3B, 0x28, 0x11, 0x54 },
|
||||
{ 0x35, 0x30, 0x08, 0x30 },
|
||||
{ 0x26, 0x35, 0x08, 0x00 },
|
||||
{ 0x14, 0x37, 0x11, 0x00 },
|
||||
{ 0x0F, 0x37, 0x25, 0x00 },
|
||||
{ 0x0A, 0x36, 0x37, 0x00 },
|
||||
{ 0x18, 0x19, 0x19, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0x00 },
|
||||
{ 0x2D, 0x37, 0x3E, 0x00 },
|
||||
{ 0x33, 0x34, 0x3F, 0x00 },
|
||||
{ 0x37, 0x31, 0x3E, 0x00 },
|
||||
{ 0x3C, 0x30, 0x3D, 0x00 },
|
||||
{ 0x3D, 0x30, 0x38, 0x00 },
|
||||
{ 0x3D, 0x33, 0x30, 0xB7 },
|
||||
{ 0x3D, 0x36, 0x2B, 0xB7 },
|
||||
{ 0x3B, 0x39, 0x26, 0x00 },
|
||||
{ 0x34, 0x3B, 0x27, 0xBF },
|
||||
{ 0x2E, 0x3C, 0x2D, 0xB7 },
|
||||
{ 0x2C, 0x3C, 0x36, 0xB7 },
|
||||
{ 0x29, 0x3C, 0x3C, 0xB7 },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x1E, 0x1E, 0x1E, 0x07 },
|
||||
{ 0x03, 0x09, 0x28, 0xB7 },
|
||||
{ 0x0A, 0x04, 0x2B, 0x0D },
|
||||
{ 0x17, 0x02, 0x28, 0x00 },
|
||||
{ 0x22, 0x00, 0x1D, 0xB7 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0xB7 },
|
||||
{ 0x1B, 0x09, 0x01, 0xB7 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0x00 },
|
||||
{ 0x01, 0x17, 0x02, 0xB7 },
|
||||
{ 0x00, 0x14, 0x0B, 0x00 },
|
||||
{ 0x01, 0x11, 0x1B, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x2F, 0x30, 0x2F, 0xB7 },
|
||||
{ 0x05, 0x1A, 0x37, 0xBF },
|
||||
{ 0x12, 0x10, 0x3B, 0xB7 },
|
||||
{ 0x23, 0x09, 0x38, 0xB7 },
|
||||
{ 0x31, 0x06, 0x2E, 0x00 },
|
||||
{ 0x35, 0x08, 0x18, 0xBF },
|
||||
{ 0x35, 0x0D, 0x08, 0xB7 },
|
||||
{ 0x2D, 0x16, 0x03, 0xB7 },
|
||||
{ 0x22, 0x1E, 0x01, 0xB7 },
|
||||
{ 0x0E, 0x24, 0x01, 0x00 },
|
||||
{ 0x05, 0x26, 0x06, 0x00 },
|
||||
{ 0x02, 0x26, 0x16, 0xB7 },
|
||||
{ 0x02, 0x22, 0x2A, 0x06 },
|
||||
{ 0x0B, 0x0B, 0x0B, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x00, 0x00, 0x00, 0x00 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0xB7 },
|
||||
{ 0x12, 0x2C, 0x3E, 0xB7 },
|
||||
{ 0x22, 0x25, 0x3F, 0xB7 },
|
||||
{ 0x30, 0x1E, 0x3E, 0xB7 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0x00 },
|
||||
{ 0x3D, 0x1D, 0x2E, 0x00 },
|
||||
{ 0x3D, 0x20, 0x1B, 0xB7 },
|
||||
{ 0x3B, 0x28, 0x11, 0xB7 },
|
||||
{ 0x35, 0x30, 0x08, 0x03 },
|
||||
{ 0x26, 0x35, 0x08, 0xB7 },
|
||||
{ 0x14, 0x37, 0x11, 0xBF },
|
||||
{ 0x0F, 0x37, 0x25, 0x00 },
|
||||
{ 0x0A, 0x36, 0x37, 0xB7 },
|
||||
{ 0x18, 0x19, 0x19, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0x00 },
|
||||
{ 0x2D, 0x37, 0x3E, 0x00 },
|
||||
{ 0x33, 0x34, 0x3F, 0xB7 },
|
||||
{ 0x37, 0x31, 0x3E, 0xB7 },
|
||||
{ 0x3C, 0x30, 0x3D, 0x00 },
|
||||
{ 0x3D, 0x30, 0x38, 0x00 },
|
||||
{ 0x3D, 0x33, 0x30, 0xB7 },
|
||||
{ 0x3D, 0x36, 0x2B, 0xB7 },
|
||||
{ 0x3B, 0x39, 0x26, 0xB7 },
|
||||
{ 0x34, 0x3B, 0x27, 0xBF },
|
||||
{ 0x2E, 0x3C, 0x2D, 0xBF },
|
||||
{ 0x2C, 0x3C, 0x36, 0xB7 },
|
||||
{ 0x29, 0x3C, 0x3C, 0xBF },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0xB7 },
|
||||
{ 0x1E, 0x1E, 0x1E, 0xB7 },
|
||||
{ 0x03, 0x09, 0x28, 0x08 },
|
||||
{ 0x0A, 0x04, 0x2B, 0xBF },
|
||||
{ 0x17, 0x02, 0x28, 0xB7 },
|
||||
{ 0x22, 0x00, 0x1D, 0x08 },
|
||||
{ 0x24, 0x01, 0x0A, 0xB7 },
|
||||
{ 0x24, 0x04, 0x02, 0x08 },
|
||||
{ 0x1B, 0x09, 0x01, 0xB7 },
|
||||
{ 0x11, 0x10, 0x01, 0x00 },
|
||||
{ 0x05, 0x15, 0x01, 0xBF },
|
||||
{ 0x01, 0x17, 0x02, 0xB7 },
|
||||
{ 0x00, 0x14, 0x0B, 0xB7 },
|
||||
{ 0x01, 0x11, 0x1B, 0x08 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x08 },
|
||||
{ 0x2F, 0x30, 0x2F, 0x01 },
|
||||
{ 0x05, 0x1A, 0x37, 0x08 },
|
||||
{ 0x12, 0x10, 0x3B, 0x0D },
|
||||
{ 0x23, 0x09, 0x38, 0x00 },
|
||||
{ 0x31, 0x06, 0x2E, 0xB7 },
|
||||
{ 0x35, 0x08, 0x18, 0xB7 },
|
||||
{ 0x35, 0x0D, 0x08, 0xB7 },
|
||||
{ 0x2D, 0x16, 0x03, 0xB7 },
|
||||
{ 0x22, 0x1E, 0x01, 0x00 },
|
||||
{ 0x0E, 0x24, 0x01, 0x00 },
|
||||
{ 0x05, 0x26, 0x06, 0xB7 },
|
||||
{ 0x02, 0x26, 0x16, 0x00 },
|
||||
{ 0x02, 0x22, 0x2A, 0xB7 },
|
||||
{ 0x0B, 0x0B, 0x0B, 0xB7 },
|
||||
{ 0x00, 0x00, 0x00, 0x08 },
|
||||
{ 0x00, 0x00, 0x00, 0xB7 },
|
||||
{ 0x3D, 0x3D, 0x3E, 0xB7 },
|
||||
{ 0x12, 0x2C, 0x3E, 0xBF },
|
||||
{ 0x22, 0x25, 0x3F, 0xBF },
|
||||
{ 0x30, 0x1E, 0x3E, 0xB7 },
|
||||
{ 0x3A, 0x1B, 0x3B, 0xBF },
|
||||
{ 0x3D, 0x1D, 0x2E, 0xB7 },
|
||||
{ 0x3D, 0x20, 0x1B, 0x00 },
|
||||
{ 0x3B, 0x28, 0x11, 0xB7 },
|
||||
{ 0x35, 0x30, 0x08, 0x00 },
|
||||
{ 0x26, 0x35, 0x08, 0x00 },
|
||||
{ 0x14, 0x37, 0x11, 0x00 },
|
||||
{ 0x0F, 0x37, 0x25, 0xB7 },
|
||||
{ 0x0A, 0x36, 0x37, 0xB7 },
|
||||
{ 0x18, 0x19, 0x19, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x01, 0x01, 0x01, 0x00 },
|
||||
{ 0x3E, 0x3E, 0x3E, 0x00 },
|
||||
{ 0x2D, 0x37, 0x3E, 0xB7 },
|
||||
{ 0x33, 0x34, 0x3F, 0x00 },
|
||||
{ 0x37, 0x31, 0x3E, 0xB7 },
|
||||
{ 0x3C, 0x30, 0x3D, 0xBF },
|
||||
{ 0x3D, 0x30, 0x38, 0xB7 },
|
||||
{ 0x3D, 0x33, 0x30, 0x08 },
|
||||
{ 0x3D, 0x36, 0x2B, 0x01 },
|
||||
{ 0x3B, 0x39, 0x26, 0x01 },
|
||||
{ 0x34, 0x3B, 0x27, 0x00 },
|
||||
{ 0x2E, 0x3C, 0x2D, 0xB7 },
|
||||
{ 0x2C, 0x3C, 0x36, 0xB7 },
|
||||
{ 0x29, 0x3C, 0x3C, 0x08 },
|
||||
{ 0x32, 0x31, 0x32, 0xB7 },
|
||||
{ 0x01, 0x01, 0x01, 0x08 },
|
||||
{ 0x01, 0x01, 0x01, 0xBF },
|
||||
};
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
* Plugins manager - The peTI-NESulator Project
|
||||
* plugins.h
|
||||
*
|
||||
* Created by Manoel TRAPIER on 02/04/07.
|
||||
* Copyright (c) 2003-2008 986Corp. All rights reserved.
|
||||
* Created by Manoël TRAPIER on 02/04/07.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PLUGINS_H
|
||||
#define PLUGINS_H
|
||||
#ifndef PLUGINS_H
|
||||
#define PLUGINS_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
/* Function pointer for prototyping function that plugins may export */
|
||||
typedef int (*PluginInit) (void);
|
||||
typedef int (*PluginDeinit) (void);
|
||||
typedef void (*PluginKeypress) (void);
|
||||
typedef int (*PluginInit)(void);
|
||||
typedef int (*PluginDeinit)(void);
|
||||
typedef void (*PluginKeypress)(void);
|
||||
|
||||
#ifdef __TINES_PLUGINS__
|
||||
|
||||
@@ -30,12 +30,9 @@ int plugin_keypress(uint8_t key);
|
||||
|
||||
/* Real Prototype: TBD */
|
||||
void plugin_list();
|
||||
|
||||
int plugin_load(int id);
|
||||
|
||||
int plugin_unload(int id);
|
||||
|
||||
|
||||
#endif /* __TINES_PLUGINS__ */
|
||||
|
||||
#endif /* PLUGINS_H */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* PPU debug utilities - The peTI-NESulator Project
|
||||
* ppu.debug.h
|
||||
*
|
||||
* Created by Manoel Trapier on 12/04/07.
|
||||
* Created by Manoël Trapier on 12/04/07.
|
||||
* Copyright 2003-2008 986 Corp. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Define and emulate the PPU (Picture Processing Unit) of the real NES
|
||||
*
|
||||
* Created by Manoel TRAPIER.
|
||||
* Created by Manoël TRAPIER.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -26,13 +26,9 @@ typedef struct PPU_Sprite_
|
||||
PPU must be initialized after memory initialisation..
|
||||
*/
|
||||
int ppu_init();
|
||||
|
||||
int ppu_hblank(uint16_t scanline);
|
||||
|
||||
uint8_t ppu_readReg(uint8_t id);
|
||||
|
||||
void ppu_writeReg(uint8_t id, uint8_t val);
|
||||
|
||||
void ppu_fillSprRamDMA(uint8_t value);
|
||||
|
||||
#define PPU_MIRROR_HORIZTAL 0
|
||||
@@ -50,13 +46,9 @@ void ppu_fillSprRamDMA(uint8_t value);
|
||||
void ppu_setMirroring(uint8_t direction);
|
||||
void ppu_setSingleScreen(uint8_t screen);
|
||||
void ppu_setScreenMode(uint8_t mode);
|
||||
|
||||
|
||||
PPU_Sprite ppu_getSprite(uint16_t i);
|
||||
|
||||
uint8_t ppu_memoryRead(uint8_t page, uint8_t addr);
|
||||
void ppu_memoryWrite(uint8_t page, uint8_t addr, uint8_t value);
|
||||
|
||||
void ppu_memoryWrite(uint8_t page, uint8_t addr, uint8_t value);
|
||||
void ppu_debugSprites();
|
||||
void ppu_debugColor();
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* PPU Memory manager - The peTI-NESulator Project
|
||||
* ppu.memory.h - Inspired from the memory manager of the Quick6502 Project.
|
||||
*
|
||||
* Created by Manoel Trapier on 12/04/07.
|
||||
* Created by Manoël Trapier on 12/04/07.
|
||||
* Copyright 2003-2008 986 Corp. All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -11,17 +11,14 @@
|
||||
|
||||
int ppu_initMemory();
|
||||
|
||||
void ppu_setPagePtr (uint8_t page, uint8_t *ptr);
|
||||
void ppu_setPagePtr(uint8_t page, uint8_t *ptr);
|
||||
void ppu_setPagePtr1k(uint8_t page, uint8_t *ptr);
|
||||
void ppu_setPagePtr2k(uint8_t page, uint8_t *ptr);
|
||||
void ppu_setPagePtr4k(uint8_t page, uint8_t *ptr);
|
||||
void ppu_setPagePtr8k(uint8_t page, uint8_t *ptr);
|
||||
|
||||
void ppu_memoryDumpState(FILE *fp);
|
||||
|
||||
uint8_t ppu_readMemory(uint8_t page, uint8_t addr);
|
||||
void ppu_writeMemory(uint8_t page, uint8_t addr, uint8_t value);
|
||||
|
||||
void ppu_setPageGhost(uint8_t page, uint8_t value, uint8_t ghost);
|
||||
|
||||
#else
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Base type definitions - The peTI-NESulator Project
|
||||
* types.h - Taken from the Quick6502 project
|
||||
*
|
||||
* Created by Manoel Trapier on 18/09/06.
|
||||
* Created by Manoël Trapier on 18/09/06.
|
||||
* Copyright (c) 2003-2018 986-Studio. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user