mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-01 04:04:28 +00:00
Remove cycles field from mos6502 struct
It was both unused and not necessary, as we can simply compute the number of cycles in the execute function.
This commit is contained in:
parent
f79bd60d96
commit
50a84b4099
@ -54,21 +54,6 @@ typedef struct {
|
||||
*/
|
||||
vm_16bit last_addr;
|
||||
|
||||
/*
|
||||
* This field contains the number of CPU cycles that the last
|
||||
* instruction handled should consume. In order to accurately
|
||||
* emulate any architecture, we must model the type of "wait" time
|
||||
* each instruction would cause.
|
||||
*
|
||||
* It should also be pointed out that the number of cycles is both
|
||||
* informed by the instruction _and_ the address mode. For example,
|
||||
* an instruction executed in zero-page address mode would consume
|
||||
* fewer cycles than one executed in absolute address mode, because
|
||||
* in the latter, the CPU would have to read ahead to discover a
|
||||
* 16-bit operand vs. the 8-bit operand in the former.
|
||||
*/
|
||||
int cycles;
|
||||
|
||||
/*
|
||||
* Our program counter register; this is what we'll use to determine
|
||||
* where we're "at" in memory while executing opcodes. We use a
|
||||
|
@ -150,7 +150,6 @@ mos6502_create()
|
||||
cpu->memory = vm_segment_create(MOS6502_MEMSIZE);
|
||||
|
||||
cpu->last_addr = 0;
|
||||
cpu->cycles = 0;
|
||||
cpu->PC = 0;
|
||||
cpu->A = 0;
|
||||
cpu->X = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user