Fix BASIC

Fix cycle waiting
Fix warnings
This commit is contained in:
Kilian committed 2026-09-27 04:48:39 +02:00
1 parent 8101cc3f62
commit a5e30a7b28
14 files changed
+114 -61

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
#define DIAG_STRINGIFY_(x) #x
#define DIAG_STRINGIFY(x) DIAG_STRINGIFY_(x)
#define DIAG_DO_PRAGMA(x) _Pragma(DIAG_STRINGIFY(x))
#if defined(__clang__)
#define DIAG_PUSH() DIAG_DO_PRAGMA(clang diagnostic push)
#define DIAG_POP() DIAG_DO_PRAGMA(clang diagnostic pop)
#define DIAG_IGNORE(w) DIAG_DO_PRAGMA(clang diagnostic ignored w)
#elif defined(__GNUC__)
#define DIAG_PUSH() DIAG_DO_PRAGMA(GCC diagnostic push)
#define DIAG_POP() DIAG_DO_PRAGMA(GCC diagnostic pop)
#define DIAG_IGNORE(w) DIAG_DO_PRAGMA(GCC diagnostic ignored w)
#else
#define DIAG_PUSH()
#define DIAG_POP()
#define DIAG_IGNORE(w)
#endif
+1 -1
View File
@@ -3,7 +3,7 @@
#include <stdint.h>
#define IO_SIZE (1 * 1024) // 1KiB
#define IO_SIZE (1 * 1024) // 1KiB
#define IO_BASE (47 * 1024) // 47KiB RAM, hard coded, 0xBC00
#define SCREEN_ADDRESS 0
+2 -2
View File
@@ -1,12 +1,12 @@
#ifndef MEMORY_MAP_H
#define MEMORY_MAP_H
#include <stdint.h>
#include "io.h"
#include "ram.h"
#include "rom.h"
#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);
+3 -3
View File
@@ -1,10 +1,10 @@
#ifndef RAM_H
#define RAM_H
#include "stdint.h"
#include <stdint.h>
#define RAM_SIZE (64 * 1024) // 55KiB
#define RAM_BASE (0x00) // 0
#define RAM_SIZE (64 * 1024) // 64KiB, read/write to IO is ignored, ROM can be banked
#define RAM_BASE (0x00) // 0
int createRAM(uint8_t **ram);
void destroyRAM(uint8_t *ram);
+1 -1
View File
@@ -3,7 +3,7 @@
#include <stdint.h>
#define ROM_SIZE (16 * 1024) // 16KiB
#define ROM_SIZE (16 * 1024) // 16KiB
#define ROM_BASE (48 * 1024) // 47KiB RAM + 1KiB IO, hard coded
extern uint8_t rom[ROM_SIZE];