add msbasic

This commit is contained in:
Kilian committed 2026-09-27 00:34:42 +02:00
1 parent d37d434228
commit c5a028c8c6
104 files changed
+25598 -13802

No files matched your search

+28 -10
View File
@@ -1,11 +1,29 @@
#include "rom.h"
#include "io.h"
uint8_t rom[ROM_SIZE] = {0};
void initRom(uint8_t *rom) {
/* Reset Vector */
rom[0xFFFC - ROM_BASE] = 0x00; // Lower byte base of ROM
rom[0xFFFD - ROM_BASE] = 0x04; // Upper byte of base of ROM
#include "rom.h"
#include "io.h"
#include <stdio.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");
if (!fp) {
perror("fopen");
return;
}
fread(rom, 1, ROM_SIZE, fp);
if (ferror(fp)) {
perror("fread");
fclose(fp);
return;
}
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
}