#ifndef ROUTINES_H
#define ROUTINES_H

//Voir routines.c
extern unsigned short *pOAM;

extern unsigned short *MemVideo;
extern unsigned short *Palette;
extern unsigned short *PaletteObj;
extern unsigned short *FrontBuffer;
extern unsigned short *BackBuffer;
extern volatile unsigned short *CompteurScanline;

#define nPalObj(x)  (PaletteObj+(x<<4))

typedef unsigned char car;

extern void AttendVSync();

extern void BasculePages();

extern void CopieDMA (void *source, void *dest, unsigned int nbval, unsigned int mode);

extern void MemSet (void *source, void *dest, unsigned int nbval, unsigned int mode);
extern void MemMove16bits (void *dest, void *source, unsigned int nbval);

extern void CopieDMA0 (void *source, void *dest, unsigned int nbval, unsigned int mode);

extern void InitTimers();

#define UtilCPU()  (R_TIM1COUNT)

extern void NouvelleTrame();

#endif

