minors modifications on cycle count, re-add correct svn:keywords and update correct source file headers

This commit is contained in:
godzil 2008-02-23 17:35:15 +00:00
parent 02a8b24523
commit 79ac4c42f1
58 changed files with 761 additions and 650 deletions

View File

@ -101,5 +101,5 @@
- Premiere version public, ne sert que de démonstration. - Premiere version public, ne sert que de démonstration.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
$Id: Changements.txt 29 2007-04-03 14:34:02Z mtrapier $ $Id$
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -123,5 +123,5 @@
- Premiere version public, ne sert que de dŽmonstration. - Premiere version public, ne sert que de dŽmonstration.
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
$Id: Changes.txt 51 2007-05-22 16:33:04Z mtrapier $ $Id$
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -229,5 +229,5 @@ Vous pouvez aussi essayer de visiter un de mes sites :
http://www.godzil.net http://www.godzil.net
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
$Id: LisezMoi.txt 17 2007-03-27 09:25:23Z mtrapier $ $Id$
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/NESCarts.c $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -2,13 +2,13 @@
* Allegro Sound Driver for EMULib Sound system - The TI-NESulator Project * Allegro Sound Driver for EMULib Sound system - The TI-NESulator Project
* SndAlleg.C * SndAlleg.C
* *
* Created by Manoël Trapier * Created by Manoel Trapier
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-03-28 15:50:50 +0200 (mer, 28 mar 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/types.h $ * $HeadURL$
* $Revision: 25 $ * $Revision$
* *
*/ */
#include <Sound.h> #include <Sound.h>

View File

@ -11,6 +11,13 @@
/** commercially. Please, notify me, if you make any **/ /** commercially. Please, notify me, if you make any **/
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*/
#include "Sound.h" #include "Sound.h"
#include <stdio.h> #include <stdio.h>

View File

@ -12,10 +12,10 @@
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/* /*
* $LastChangedDate: 2007-05-31 18:01:41 +0200 (jeu, 31 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/Codes.h $ * $HeadURL$
* $Revision: 57 $ * $Revision$
*/ */
case 0x10: case 0x10:
@ -91,7 +91,7 @@ break; /* BVS * REL */
case 0x40: case 0x40:
M_POP(R->P); M_POP(R->P);
R->P |= R_FLAG; //R->P |= R_FLAG;
M_POP(R->PC.B.l); M_POP(R->PC.B.l);
M_POP(R->PC.B.h); M_POP(R->PC.B.h);
@ -197,7 +197,7 @@ if ((R->IRequest != INT_NONE) && ((I ^ R->P) & ~I & I_FLAG))
R->ICount = 1; R->ICount = 1;
} }
R->P = I | R_FLAG | B_FLAG; R->P = I /*| R_FLAG*/ | B_FLAG;
break; break;

View File

@ -13,10 +13,10 @@
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/* /*
* $LastChangedDate: 2007-04-19 18:18:57 +0200 (jeu, 19 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/Debug.c $ * $HeadURL$
* $Revision: 43 $ * $Revision$
*/ */
#include "M6502.h" #include "M6502.h"

View File

@ -14,10 +14,10 @@
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/* /*
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/M6502.c $ * $HeadURL$
* $Revision: 39 $ * $Revision$
*/ */
#include "M6502.h" #include "M6502.h"
@ -201,7 +201,7 @@ INLINE byte Op6502(register word A) { return(Page[A>>13][A&0x1FFF]); }
void Reset6502(M6502 *R) void Reset6502(M6502 *R)
{ {
R->A=R->X=R->Y=0x00; R->A=R->X=R->Y=0x00;
R->P=Z_FLAG|R_FLAG; R->P=Z_FLAG;
R->S=0xFF; R->S=0xFF;
R->PC.B.l=Rd6502(0xFFFC); R->PC.B.l=Rd6502(0xFFFC);
R->PC.B.h=Rd6502(0xFFFD); R->PC.B.h=Rd6502(0xFFFD);
@ -245,7 +245,7 @@ void Int6502(M6502 *R,byte Type)
R->ICount-=7; R->ICount-=7;
M_PUSH(R->PC.B.h); M_PUSH(R->PC.B.h);
M_PUSH(R->PC.B.l); M_PUSH(R->PC.B.l);
M_PUSH(R->P&~B_FLAG); M_PUSH(R->P & ~(B_FLAG|R_FLAG));
R->P&=~D_FLAG; R->P&=~D_FLAG;
if(R->IAutoReset&&(Type==R->IRequest)) R->IRequest=INT_NONE; if(R->IAutoReset&&(Type==R->IRequest)) R->IRequest=INT_NONE;
if(Type==INT_NMI) J.W=0xFFFA; else { R->P|=I_FLAG;J.W=0xFFFE; } if(Type==INT_NMI) J.W=0xFFFA; else { R->P|=I_FLAG;J.W=0xFFFE; }
@ -402,6 +402,9 @@ int DAsmCAP(char *S, word A)
return (B - A); return (B - A);
} }
extern unsigned short ScanLine;
#endif #endif
/** Run6502() ************************************************/ /** Run6502() ************************************************/
@ -413,7 +416,7 @@ word Run6502(M6502 *R)
{ {
register pair J,K; register pair J,K;
register byte I; register byte I;
byte nb_of_cycle;
for(;;) for(;;)
{ {
#ifdef DEBUG #ifdef DEBUG
@ -444,21 +447,16 @@ word Run6502(M6502 *R)
} }
#endif #endif
I=Op6502(R->PC.W++); I=Op6502(R->PC.W++);
R->ICount-=Cycles[I]; nb_of_cycle = Cycles[I];
//#ifdef DEBUG //#ifdef DEBUG
// pushop(I); // pushop(I);
//#endif //#endif
icount++; icount++;
switch(I) switch(I)
{ {
#include "Codes.h" #include "Codes.h"
} }
#ifdef TRACE_EXECUTION #ifdef TRACE_EXECUTION
while(1) while(1)
{ {
@ -478,15 +476,18 @@ word Run6502(M6502 *R)
printf("%c", F & 0x80 ? FA[J] : '.'); printf("%c", F & 0x80 ? FA[J] : '.');
printf("], Stack[%02x, %02x, %02x]\n", printf("], Stack[%02x, %02x, %02x], %03d, %03d\n",
Rd6502(0x0100 + (byte) (R->S + 1)), Rd6502(0x0100 + (byte) (R->S + 1)),
Rd6502(0x0100 + (byte) (R->S + 2)), Rd6502(0x0100 + (byte) (R->S + 2)),
Rd6502(0x0100 + (byte) (R->S + 3))); Rd6502(0x0100 + (byte) (R->S + 3)),
R->ICount,
ScanLine
);
break; break;
} }
#endif #endif
R->ICount-= nb_of_cycle;
/* If cycle counter expired... */ /* If cycle counter expired... */
if(R->ICount<=0) if(R->ICount<=0)
{ {

View File

@ -12,10 +12,10 @@
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/* /*
* $LastChangedDate: 2007-04-23 18:55:35 +0200 (lun, 23 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/M6502.h $ * $HeadURL$
* $Revision: 45 $ * $Revision$
*/ */
#ifndef M6502_H #ifndef M6502_H

View File

@ -13,10 +13,10 @@
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/* /*
* $LastChangedDate: 2007-05-24 15:07:13 +0200 (jeu, 24 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/Tables.h $ * $HeadURL$
* $Revision: 52 $ * $Revision$
*/ */
static byte Cycles[256] = static byte Cycles[256] =

View File

@ -11,6 +11,12 @@
/** commercially. Please, notify me, if you make any **/ /** commercially. Please, notify me, if you make any **/
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*/
{ -36, 8063 },{ -12, 8063 },{ -3, 8298 },{ 3, 8358 }, { -36, 8063 },{ -12, 8063 },{ -3, 8298 },{ 3, 8358 },
{ 8, 8201 },{ 12, 8063 },{ 15, 8054 },{ 17, 8238 }, { 8, 8201 },{ 12, 8063 },{ 15, 8054 },{ 17, 8238 },

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/NESCarts.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
*/ */
#ifndef NESCARTS_H #ifndef NESCARTS_H

View File

@ -11,6 +11,12 @@
/** commercially. Please, notify me, if you make any **/ /** commercially. Please, notify me, if you make any **/
/** changes to this file. **/ /** changes to this file. **/
/*************************************************************/ /*************************************************************/
/*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*/
#ifndef SOUND_H #ifndef SOUND_H
#define SOUND_H #define SOUND_H

View File

@ -2,13 +2,13 @@
* 6502 Memory manager - The TI-NESulator Project * 6502 Memory manager - The TI-NESulator Project
* memory.h - Taken from the Quick6502 project * memory.h - Taken from the Quick6502 project
* *
* Created by Manoël Trapier on 18/09/06. * Created by Manoel Trapier on 18/09/06.
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-05 16:30:20 +0200 (jeu, 05 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/memory.h $ * $HeadURL$
* $Revision: 31 $ * $Revision$
* *
*/ */
#ifndef MEMORY_H #ifndef MEMORY_H

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/paddle.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -1,5 +1,10 @@
/* Generated data file from file 'stdin' */ /* Generated data file from file 'stdin' */
/*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*/
PALETTE basicPalette = { PALETTE basicPalette = {
{ 0x1E, 0x1E, 0x1E, 0x07 }, { 0x1E, 0x1E, 0x1E, 0x07 },

View File

@ -2,13 +2,13 @@
* PPU debug utilities - The TI-NESulator Project * PPU debug utilities - The TI-NESulator Project
* ppu.debug.h * ppu.debug.h
* *
* Created by Manoël Trapier on 12/04/07. * Created by Manoel Trapier on 12/04/07.
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-24 15:11:55 +0200 (jeu, 24 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu/ppu.debug.h $ * $HeadURL$
* $Revision: 53 $ * $Revision$
* *
*/ */

View File

@ -7,10 +7,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-26 18:47:34 +0200 (jeu, 26 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu.h $ * $HeadURL$
* $Revision: 46 $ * $Revision$
* *
*/ */

View File

@ -2,13 +2,13 @@
* PPU Memory manager - The TI-NESulator Project * PPU Memory manager - The TI-NESulator Project
* ppu.memory.h - Inspired from the memory manager of the Quick6502 Project. * ppu.memory.h - Inspired from the memory manager of the Quick6502 Project.
* *
* Created by Manoël Trapier on 12/04/07. * Created by Manoel Trapier on 12/04/07.
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-24 15:11:55 +0200 (jeu, 24 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu/ppu.memory.h $ * $HeadURL$
* $Revision: 53 $ * $Revision$
* *
*/ */

View File

@ -2,13 +2,13 @@
* Base type definitions - The TI-NESulator Project * Base type definitions - The TI-NESulator Project
* types.h - Taken from the Quick6502 project * types.h - Taken from the Quick6502 project
* *
* Created by Manoël Trapier on 18/09/06. * Created by Manoel Trapier on 18/09/06.
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-03-28 15:50:50 +0200 (mer, 28 mar 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/types.h $ * $HeadURL$
* $Revision: 25 $ * $Revision$
* *
*/ */

View File

@ -195,7 +195,7 @@ void LoadPalette(char *filename, PALETTE pal)
fread(&v, 1, 1, fp); fread(&v, 1, 1, fp);
fread(&b, 1, 1, fp); fread(&b, 1, 1, fp);
/* r = (r * 64) / 255; /* r = (r * 64) / 255;
v = (v * 64) / 255; v = (v * 64) / 255;
b = (b * 64) / 255;*/ b = (b * 64) / 255;*/
@ -341,10 +341,10 @@ void *signalhandler(int sig)
Rd6502(0x0100 + (byte) (R->S + 2)), Rd6502(0x0100 + (byte) (R->S + 2)),
Rd6502(0x0100 + (byte) (R->S + 3))); Rd6502(0x0100 + (byte) (R->S + 3)));
showlastop(fp); showlastop(fp);
// fprintf(fp, "PPU: CR1: 0x%02X (NT:%d AI:%d SP:%d BP:%d SS:%d NMI:%d)\n",ppu.ControlRegister1.b, ppu.ControlRegister1.s.NameTblAddr, ppu.ControlRegister1.s.AddrIncrmt, ppu.ControlRegister1.s.SptPattern, ppu.ControlRegister1.s.BgPattern, ppu.ControlRegister1.s.SpriteSize, ppu.ControlRegister1.s.VBlank_NMI); // fprintf(fp, "PPU: CR1: 0x%02X (NT:%d AI:%d SP:%d BP:%d SS:%d NMI:%d)\n",ppu.ControlRegister1.b, ppu.ControlRegister1.s.NameTblAddr, ppu.ControlRegister1.s.AddrIncrmt, ppu.ControlRegister1.s.SptPattern, ppu.ControlRegister1.s.BgPattern, ppu.ControlRegister1.s.SpriteSize, ppu.ControlRegister1.s.VBlank_NMI);
// fprintf(fp, "PPU: CR2: 0x%02X (FBC/CI:%d SV:%d BV:%d SC:%d BC:%d DT:%d)\n",ppu.ControlRegister2.b,ppu.ControlRegister2.s.Colour,ppu.ControlRegister2.s.SpriteVisibility,ppu.ControlRegister2.s.BgVisibility,ppu.ControlRegister2.s.SpriteClipping,ppu.ControlRegister2.s.BgClipping,ppu.ControlRegister2.s.DisplayType); // fprintf(fp, "PPU: CR2: 0x%02X (FBC/CI:%d SV:%d BV:%d SC:%d BC:%d DT:%d)\n",ppu.ControlRegister2.b,ppu.ControlRegister2.s.Colour,ppu.ControlRegister2.s.SpriteVisibility,ppu.ControlRegister2.s.BgVisibility,ppu.ControlRegister2.s.SpriteClipping,ppu.ControlRegister2.s.BgClipping,ppu.ControlRegister2.s.DisplayType);
// fprintf(fp, "PPU: SR: 0x%02X (VB:%d S0:%d SSC:%d VWF:%d)\n", ppu.StatusRegister.b,ppu.StatusRegister.s.VBlankOccur,ppu.StatusRegister.s.Sprite0Occur,ppu.StatusRegister.s.SprtCount,ppu.StatusRegister.s.VRAMProtect); // fprintf(fp, "PPU: SR: 0x%02X (VB:%d S0:%d SSC:%d VWF:%d)\n", ppu.StatusRegister.b,ppu.StatusRegister.s.VBlankOccur,ppu.StatusRegister.s.Sprite0Occur,ppu.StatusRegister.s.SprtCount,ppu.StatusRegister.s.VRAMProtect);
// fprintf(fp, "PPU: M:%d ST:%d VRAMPtr:0x%04X T:0x%04X\n",ppu.MirrorDir,ppu.ScreenType,ppu.VRAMAddrReg2.W,ppu.TmpVRamPtr); // fprintf(fp, "PPU: M:%d ST:%d VRAMPtr:0x%04X T:0x%04X\n",ppu.MirrorDir,ppu.ScreenType,ppu.VRAMAddrReg2.W,ppu.TmpVRamPtr);
//MapperDump(fp); //MapperDump(fp);
@ -451,7 +451,7 @@ void WrHook4000Multiplexer(byte addr, byte value)
#endif #endif
Sound(0, (int) SQ/22, (0xFF/0x0F) * SQ1V); Sound(0, (int) SQ/22, (0xFF/0x0F) * SQ1V);
// printf("40%02X: 0x%02X (SQ1P:%d SQ:%f (%d))\n", addr, value, SQ1P, SQ, (int) SQ); // printf("40%02X: 0x%02X (SQ1P:%d SQ:%f (%d))\n", addr, value, SQ1P, SQ, (int) SQ);
Sq1_reg2 = value; Sq1_reg2 = value;
break; break;
@ -569,7 +569,7 @@ void WrHook4000Multiplexer(byte addr, byte value)
case 0x15: case 0x15:
/* DMC, Noise, Triangle, Sq 2, Sq 1 */ /* DMC, Noise, Triangle, Sq 2, Sq 1 */
//SetChannels(0, (value&0x01)?0x01:0); //SetChannels(0, (value&0x01)?0x01:0);
/* printf("40%02X: 0x%02X [%c%c%c%c%c]\n", addr, value, /* printf("40%02X: 0x%02X [%c%c%c%c%c]\n", addr, value,
(value&0x10)?'d':'.', (value&0x10)?'d':'.',
(value&0x08)?'n':'.', (value&0x08)?'n':'.',
(value&0x04)?'t':'.', (value&0x04)?'t':'.',
@ -577,7 +577,7 @@ void WrHook4000Multiplexer(byte addr, byte value)
(value&0x01)?'1':'.');*/ (value&0x01)?'1':'.');*/
break; break;
#endif #endif
case 0x14: case 0x14:
ppu_fillSprRamDMA(value); ppu_fillSprRamDMA(value);
break; break;
@ -588,15 +588,15 @@ void WrHook4000Multiplexer(byte addr, byte value)
break; break;
case 0x17: case 0x17:
// printf("40%02X: 0x%02X\n", addr, value); // printf("40%02X: 0x%02X\n", addr, value);
if (value == 0x00) if (value == 0x00)
Int6502(&MainCPU,INT_IRQ); Int6502(&MainCPU,INT_IRQ);
break; break;
// default: // default:
//Page40[addr] = value; //Page40[addr] = value;
// printf("40%02X: 0x%02X\n", addr, value); // printf("40%02X: 0x%02X\n", addr, value);
// printf("pAPU: 0x%X @ 0x40%X\n", value, addr); // printf("pAPU: 0x%X @ 0x40%X\n", value, addr);
} }
} }
@ -850,6 +850,12 @@ int main(int argc, char *argv[])
for( i = 0x100 ; i < 0x200 ; i++ ) { for( i = 0x100 ; i < 0x200 ; i++ ) {
Wr6502(i, 0x00); Wr6502(i, 0x00);
} }
for( i = 0x000 ; i < 0x800 ; i++ ) {
Wr6502(i, 0x00);
}
printf("[ OK ]\n"); printf("[ OK ]\n");
if (START_WITH_FDS) if (START_WITH_FDS)
@ -1025,7 +1031,7 @@ int main(int argc, char *argv[])
Reset6502(&MainCPU); Reset6502(&MainCPU);
MainCPU.Trace = 1; MainCPU.Trace = 0;
if (START_DEBUG) if (START_DEBUG)
MainCPU.Trace = 1; MainCPU.Trace = 1;
@ -1107,7 +1113,7 @@ byte Loop6502(register M6502 * R)
if (ScanLine == 241) if (ScanLine == 241)
frame++; frame++;
if (ScanLine >= 240 + VBLANK_TIME) if (ScanLine >= (240 + VBLANK_TIME - 1))
{ /* End of VBlank Time */ { /* End of VBlank Time */
/* Sync at 60FPS */ /* Sync at 60FPS */
/* Get current time in microseconds */ /* Get current time in microseconds */

View File

@ -1,9 +1,14 @@
/* /*
* Mapper manager - The TI-NESulator Project
* manager.c * manager.c
* TI-NESulator.X
* *
* Created by Manoël Trapier on 07/10/07. * Created by Manoel TRAPIER.
* Copyright 2007-2008 986 Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-26 18:47:34 +0200 (jeu, 26 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/aorom.h $ * $HeadURL$
* $Revision: 46 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-26 18:47:34 +0200 (jeu, 26 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/aorom.h $ * $HeadURL$
* $Revision: 46 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/cnrom.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/cnrom.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/genericmapper.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/iremh3001.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/iremh3001.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc1.h $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc1.h $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc3.h $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc3.h $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2007-2008 986Corp. All rights reserved. * Copyright (c) 2007-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-31 18:00:41 +0200 (jeu, 31 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc4.h $ * $HeadURL$
* $Revision: 56 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2007-2008 986Corp. All rights reserved. * Copyright (c) 2007-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-31 18:00:41 +0200 (jeu, 31 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc4.h $ * $HeadURL$
* $Revision: 56 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/unrom.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/unrom.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/unrom.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/unrom.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -1,9 +1,14 @@
/* /*
* Mapper list - The TI-NESulator Project
* mappers_list.h * mappers_list.h
* TI-NESulator.X
* *
* Created by Manoël Trapier on 25/10/07. * Created by Manoel TRAPIER on 25/10/07.
* Copyright 2007-2008 986 Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-16 01:55:35 +0200 (lun, 16 avr 2007) $ * $LastChangedDate$
* $Author: godzil $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/genericmapper.h $ * $HeadURL$
* $Revision: 39 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mmc1.h $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */
unsigned char MMC1_reg0; unsigned char MMC1_reg0;

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-31 18:00:41 +0200 (jeu, 31 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/mappers.c $ * $HeadURL$
* $Revision: 56 $ * $Revision$
* *
*/ */

View File

@ -2,13 +2,13 @@
* 6502 Memory manager - The TI-NESulator Project * 6502 Memory manager - The TI-NESulator Project
* memory.c - Taken from the Quick6502 project * memory.c - Taken from the Quick6502 project
* *
* Created by Manoël Trapier on 18/09/06. * Created by Manoel Trapier on 18/09/06.
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/memory.c $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -5,10 +5,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-02 18:37:41 +0200 (mer, 02 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/paddle.c $ * $HeadURL$
* $Revision: 50 $ * $Revision$
* *
*/ */

View File

@ -1,3 +1,17 @@
/*
* Code Breaker plugin - The TI-NESulator Project
* gamegenie.c: Hack your games with unlimited lives of add new powers!
*
* Created by Manoel Trapier.
* Copyright 2003-2008 986 Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*
*/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <allegro.h> #include <allegro.h>

View File

@ -1,2 +1,16 @@
/*
* Code Breaker plugin - The TI-NESulator Project
* gamegenie.h
*
* Created by Manoel Trapier.
* Copyright 2003-2008 986 Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*
*/
int gg_Init(); int gg_Init();
int gg_Deinit(); int gg_Deinit();

View File

@ -1,3 +1,17 @@
/*
* Plugin Manager plugint list - The TI-NESulator Project
* plugins_list.h
*
* Created by Manoel Trapier.
* Copyright 2003-2008 986 Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*
*/
/* This file could be generated from the plugins directory... */ /* This file could be generated from the plugins directory... */
#include "plugins/gamegenie.h" #include "plugins/gamegenie.h"

View File

@ -1,3 +1,17 @@
/*
* PPU Debug utilities - The TI-NESulator Project
* ppu.debug.c
*
* Created by Manoel Trapier.
* Copyright 2003-2008 986 Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*
*/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -9,10 +9,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-03-29 12:05:12 +0200 (jeu, 29 mar 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/oldppu.c $ * $HeadURL$
* $Revision: 28 $ * $Revision$
* *
*/ */
#include <allegro.h> #include <allegro.h>

View File

@ -7,10 +7,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-06 17:17:01 +0200 (ven, 06 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu.c $ * $HeadURL$
* $Revision: 32 $ * $Revision$
* *
*/ */

View File

@ -7,10 +7,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-31 18:02:16 +0200 (jeu, 31 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu.c $ * $HeadURL$
* $Revision: 58 $ * $Revision$
* *
*/ */
@ -757,7 +757,7 @@ E = HT
} }
if (scanline >= (240 + VBLANK_TIME)) if (scanline >= (240 + VBLANK_TIME - 1))
{ {
/*for ( i = 0; i < 256; i++) /*for ( i = 0; i < 256; i++)
for ( j = 0; j < 256; j++) for ( j = 0; j < 256; j++)
@ -773,9 +773,9 @@ E = HT
textprintf(Buffer, font, 260, 3, 4, "FPS : %d (CPU@~%2.2fMhz : %d%%)", FPS, (float) (((float) IPS) / 1000000.0), (int) ((((float) IPS) / 1770000.0) * 100.0)); textprintf(Buffer, font, 260, 3, 4, "FPS : %d (CPU@~%2.2fMhz : %d%%)", FPS, (float) (((float) IPS) / 1000000.0), (int) ((((float) IPS) / 1770000.0) * 100.0));
//printf("(SL:%d) FPS : %d IPS : %d\n", scanline, FPS, IPS); //printf("(SL:%d) FPS : %d IPS : %d\n", scanline, FPS, IPS);
ppu_dumpPalette(0, 241); //ppu_dumpPalette(0, 241);
ppu_dumpPattern(280, 150); //ppu_dumpPattern(280, 150);
ppu_dumpNameTable(256,0); //ppu_dumpNameTable(256,0);
//ppu_dumpAttributeTable(257, 0); //ppu_dumpAttributeTable(257, 0);
blit(VideoBuffer, Buffer, 0, 0, 0, 0, 256, 240); blit(VideoBuffer, Buffer, 0, 0, 0, 0, 256, 240);

View File

@ -5,10 +5,10 @@
* Created by Manoël Trapier on 12/04/07. * Created by Manoël Trapier on 12/04/07.
* Copyright 2003-2008 986 Corp. All rights reserved. * Copyright 2003-2008 986 Corp. All rights reserved.
* *
* $LastChangedDate: 2007-05-24 15:11:55 +0200 (jeu, 24 mai 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu/ppu.memory.c $ * $HeadURL$
* $Revision: 53 $ * $Revision$
* *
*/ */

View File

@ -7,10 +7,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-04 18:46:30 +0200 (mer, 04 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu.c $ * $HeadURL$
* $Revision: 30 $ * $Revision$
* *
*/ */

View File

@ -7,10 +7,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-06 17:17:01 +0200 (ven, 06 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu.c $ * $HeadURL$
* $Revision: 32 $ * $Revision$
* *
*/ */

View File

@ -7,10 +7,10 @@
* Created by Manoel TRAPIER. * Created by Manoel TRAPIER.
* Copyright (c) 2003-2008 986Corp. All rights reserved. * Copyright (c) 2003-2008 986Corp. All rights reserved.
* *
* $LastChangedDate: 2007-04-06 17:17:01 +0200 (ven, 06 avr 2007) $ * $LastChangedDate$
* $Author: mtrapier $ * $Author$
* $HeadURL: file:///media/HD6G/SVNROOT/trunk/TI-NESulator/src/ppu.c $ * $HeadURL$
* $Revision: 32 $ * $Revision$
* *
*/ */

View File

@ -1,3 +1,17 @@
/*
* bin to header - Part of The TI-NESulator Project
* bin2h.c: Convert a binary file to a table of byte in a C header file.
*
* Created by Manoel Trapier.
* Copyright 2003-2008 986 Corp. All rights reserved.
*
* $LastChangedDate$
* $Author$
* $HeadURL$
* $Revision$
*
*/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>