Removed unused functions
This commit is contained in:
parent
a5e914de4b
commit
623bec2127
35
src/cpu.c
35
src/cpu.c
@ -4,12 +4,9 @@
|
|||||||
* Modified by Gabriel Weingardt *
|
* Modified by Gabriel Weingardt *
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "memory.h"
|
||||||
|
|
||||||
//externally supplied functions
|
|
||||||
extern uint8_t read6502(uint16_t address);
|
|
||||||
extern void write6502(uint16_t address, uint8_t value);
|
|
||||||
|
|
||||||
//6502 defines
|
//6502 defines
|
||||||
#define FLAG_CARRY 0x01
|
#define FLAG_CARRY 0x01
|
||||||
@ -724,28 +721,6 @@ void irq6502() {
|
|||||||
pc = (uint16_t)read6502(0xFFFE) | ((uint16_t)read6502(0xFFFF) << 8);
|
pc = (uint16_t)read6502(0xFFFE) | ((uint16_t)read6502(0xFFFF) << 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t callexternal = 0;
|
|
||||||
void (*loopexternal)();
|
|
||||||
|
|
||||||
void exec6502(uint32_t tickcount) {
|
|
||||||
clockgoal6502 += tickcount;
|
|
||||||
|
|
||||||
while (clockticks6502 < clockgoal6502) {
|
|
||||||
opcode = read6502(pc++);
|
|
||||||
|
|
||||||
penaltyop = 0;
|
|
||||||
penaltyaddr = 0;
|
|
||||||
|
|
||||||
(*addrtable[opcode])();
|
|
||||||
(*optable[opcode])();
|
|
||||||
clockticks6502 += ticktable[opcode];
|
|
||||||
if (penaltyop && penaltyaddr) clockticks6502++;
|
|
||||||
|
|
||||||
if (callexternal) (*loopexternal)();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void step6502() {
|
void step6502() {
|
||||||
opcode = read6502(pc++);
|
opcode = read6502(pc++);
|
||||||
|
|
||||||
@ -758,12 +733,4 @@ void step6502() {
|
|||||||
if (penaltyop && penaltyaddr) clockticks6502++;
|
if (penaltyop && penaltyaddr) clockticks6502++;
|
||||||
clockgoal6502 = clockticks6502;
|
clockgoal6502 = clockticks6502;
|
||||||
|
|
||||||
if (callexternal) (*loopexternal)();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hookexternal(void *funcptr) {
|
|
||||||
if (funcptr != (void *)NULL) {
|
|
||||||
loopexternal = funcptr;
|
|
||||||
callexternal = 1;
|
|
||||||
} else callexternal = 0;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user