Do some stuff

This commit is contained in:
2025-02-18 14:44:08 +01:00
parent 4d3755e2ce
commit 8f46a76fd4
21 changed files with 649 additions and 150 deletions

View File

@@ -6,9 +6,10 @@
#define RISCB_CORE_H
#include <stdint.h>
#include <SDL_render.h>
#include "stdio.h"
#define MEM_SIZE 65535
#define MEM_SIZE 2097120
// Register count (register names R0 to R7)
#define REG_COUNT 64
#define STACK_SIZE 255
@@ -39,11 +40,12 @@ typedef struct {
uint32_t programEnd;
uint8_t mode;
uint32_t cycle;
SDL_Renderer *renderer;
} CPU;
void step(CPU *cpu);
void init_cpu(CPU *cpu);
void init_cpu(CPU *cpu, SDL_Renderer *renderer);
// Helper function for setting flags in the CPU (here we assume bit0 is the Zero flag,
// and bit1 is the Negative flag).