From 44a1ea6542c812b173fb9685837c0b2fdc6a7c61 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Wed, 29 Nov 2023 17:38:56 +1100 Subject: bug fix apple.c:9 + inconsequential refactoring --- src/cpu/6502.h | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/cpu/6502.h') diff --git a/src/cpu/6502.h b/src/cpu/6502.h index 14d65f3..bad36fb 100644 --- a/src/cpu/6502.h +++ b/src/cpu/6502.h @@ -1,8 +1,7 @@ // 6502.h // Main elements of the 6502 CPU -#ifndef CPU_H -#define CPU_H +#pragma once #include"stdio.h" #include"core.h" @@ -19,7 +18,7 @@ byte getFlag(byte flag); // Get the value of a flag. -void setFlag(byte flag, int x); +void SetFlag(byte flag, int x); // Set a flag with some value. void flagSet(byte flag); @@ -30,38 +29,36 @@ void flagClear(byte flag); // Functions which perform reusable routines for finding if a specific flag should be set. -void setFlagN(byte x); +void SetFlagN(byte x); //Perform prior to any changes -void setFlagV(byte x, byte y); +void SetFlagV(byte x, byte y); -//void setFlagB(); +//void SetFlagB(); //May not need since its dependent on the BRK insturction -//void setFlagD(); +//void SetFlagD(); //Might not be necessary. -//void setFlagI(); +//void SetFlagI(); //Need to work on. -void setFlagZ(int x); +void SetFlagZ(int x); -//void setFlagC(); +//void SetFlagC(); //Only 6 instructions, 2 not including stack instructions, use the carry flag. // The following two may be better defined within apple.c -//byte getMemory(address x); +//byte GetMemory(address x); // Retrieve value from the computers address space. // It is important not to directly access the memory array because some value hold special meaning. -//void setMemory(address x, byte y); +//void SetMemory(address x, byte y); // Set a piece of memory to some value. -byte getStack(); +byte GetStack(); // Get top value of the stack. -void setStack(byte z); -// Set top value of the stack. - -#endif \ No newline at end of file +void SetStack(byte z); +// Set top value of the stack. \ No newline at end of file -- cgit v1.2.3