2018-02-14 18:03:15 +00:00
|
|
|
#define RAMSIZE 128*1024
|
|
|
|
extern unsigned char ram[RAMSIZE];
|
|
|
|
extern unsigned char a,y,x;
|
2018-02-14 18:10:01 +00:00
|
|
|
extern unsigned short sp;
|
|
|
|
extern unsigned int n,z,c,v;
|
|
|
|
|
2018-02-14 18:03:15 +00:00
|
|
|
unsigned short y_indirect(unsigned char base, unsigned char y);
|
2018-02-14 18:10:01 +00:00
|
|
|
int init_6502(void);
|
|
|
|
void adc(int value);
|
|
|
|
void sbc(int value);
|
2018-10-12 21:10:31 +00:00
|
|
|
void and(int value);
|
|
|
|
void and_mem(int addr);
|
|
|
|
void ora(int value);
|
|
|
|
void ora_mem(int addr);
|
2018-09-09 19:54:53 +00:00
|
|
|
void eor(int value);
|
2018-10-12 21:10:31 +00:00
|
|
|
void eor_mem(int addr);
|
2018-02-14 18:10:01 +00:00
|
|
|
void cmp(int value);
|
2018-07-02 16:06:11 +00:00
|
|
|
void cpy(int value);
|
|
|
|
void cpx(int value);
|
2018-02-14 18:10:01 +00:00
|
|
|
void pha(void);
|
|
|
|
void pla(void);
|
2018-02-14 20:30:57 +00:00
|
|
|
void lsr(void);
|
2018-07-02 03:06:08 +00:00
|
|
|
void asl(void);
|
|
|
|
void ror(void);
|
|
|
|
void rol(void);
|
2018-09-09 03:52:58 +00:00
|
|
|
void adc_mem(int addr);
|
|
|
|
void sbc_mem(int addr);
|
2018-07-02 17:39:24 +00:00
|
|
|
void asl_mem(int addr);
|
2018-07-02 03:06:08 +00:00
|
|
|
void ror_mem(int addr);
|
|
|
|
void rol_mem(int addr);
|
2018-07-02 16:06:11 +00:00
|
|
|
void dex(void);
|
|
|
|
void dey(void);
|
|
|
|
void inx(void);
|
|
|
|
void iny(void);
|
|
|
|
void tax(void);
|
|
|
|
void tay(void);
|
|
|
|
void txa(void);
|
|
|
|
void tya(void);
|
2018-07-02 17:39:24 +00:00
|
|
|
void bit(int value);
|
|
|
|
void bit_mem(int addr);
|
|
|
|
void lda(int addr);
|
|
|
|
void lda_const(int value);
|
|
|
|
void ldx(int addr);
|
|
|
|
void ldx_const(int value);
|
|
|
|
void ldy(int addr);
|
|
|
|
void ldy_const(int value);
|
2018-09-09 03:52:58 +00:00
|
|
|
void sta(int addr);
|
2018-09-09 19:54:53 +00:00
|
|
|
void inc_mem(int addr);
|
2018-02-23 05:16:43 +00:00
|
|
|
|
|
|
|
unsigned char high(int value);
|
|
|
|
unsigned char low(int value);
|
|
|
|
|