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

+6 -7
View File
@@ -1,20 +1,23 @@
#include "rom.h"
#include "io.h"
#include <stdio.h>
#include "io.h"
uint8_t rom[ROM_SIZE] = {0};
void initRom(uint8_t *rom) {
FILE *fp = fopen("/mnt/c/Users/llego/source/repos/6502PC/msbasic/tmp/kilian.bin", "rb");
FILE *fp = fopen("msbasic/tmp/kilian.bin", "rb");
if (!fp) {
perror("fopen");
return;
}
DIAG_PUSH();
DIAG_IGNORE("-Wunused-result");
fread(rom, 1, ROM_SIZE, fp);
DIAG_POP();
if (ferror(fp)) {
perror("fread");
fclose(fp);
@@ -22,8 +25,4 @@ void initRom(uint8_t *rom) {
}
fclose(fp);
/* Reset Vector, BASIC at DF02 */
//rom[0xFFFC - ROM_BASE] = 0x02; // Lower byte base of ROM
//rom[0xFFFD - ROM_BASE] = 0xDF; // Upper byte of base of ROM
}