Fix run on linux
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
#ifndef IO_H
|
||||
#define IO_H
|
||||
|
||||
#include "ram.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define IO_SIZE (1 * 1024) // 1KiB
|
||||
|
||||
#define IO_BASE (RAM_SIZE) // 55KiB RAM
|
||||
#define IO_BASE (55 * 1024) // 55KiB RAM, hard coded
|
||||
|
||||
#define SCREEN_ADDRESS 0
|
||||
#define KEYBOARD_ADDRESS 1
|
||||
#define ROM_BANKED_OUT 2
|
||||
|
||||
int putChar(uint8_t c);
|
||||
int getChar(void);
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
uint8_t readMemory(uint16_t address, uint8_t *ram, uint8_t *rom);
|
||||
void writeMemory(uint16_t address, uint8_t value, uint8_t *ram, uint8_t *rom);
|
||||
void writeMemory(uint16_t address, uint8_t value, uint8_t *ram);
|
||||
|
||||
uint8_t readStack(uint8_t address, uint8_t *ram);
|
||||
void writeStack(uint8_t address, uint8_t value, uint8_t *ram);
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
#define RAM_SIZE (55 * 1024) // 55KiB
|
||||
//#define RAM_SIZE (64 * 1024) // Full range, DEBUG mode
|
||||
|
||||
#define RAM_SIZE (64 * 1024) // 55KiB
|
||||
#define RAM_BASE (0x00) // 0
|
||||
|
||||
int createRAM(uint8_t **ram);
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
#ifndef ROM_H
|
||||
#define ROM_H
|
||||
|
||||
#include "io.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define ROM_SIZE (8 * 1024) // 8KiB
|
||||
#define ROM_BASE (IO_BASE + IO_SIZE) // 55KiB RAM + 1KiB IO
|
||||
#define ROM_SIZE (8 * 1024) // 8KiB
|
||||
#define ROM_BASE (56 * 1024) // 55KiB RAM + 1KiB IO, hard coded
|
||||
|
||||
uint8_t rom[ROM_SIZE];
|
||||
extern uint8_t rom[ROM_SIZE];
|
||||
|
||||
void initRom(uint8_t *rom);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user