recipes/sms: move recipe blocks into local overlay

This commit is contained in:
Virgil Dupras 2020-09-20 10:21:21 -04:00
parent c9ce0f8cfd
commit 8e624034bf
25 changed files with 30 additions and 16 deletions

View File

@ -10,7 +10,7 @@ MASTER INDEX
440-489 unused
490 TRS-80 Recipe 520 Fonts
550 TI-84+ Recipe 580 RC2014 Recipe
600-619 unused 620 Sega Master System Recipe
600-649 unused
650 AVR assembler 690 AVR SPI programmer
700-729 unused 730 8086 assembler
800 8086 boot code 830 PC/AT recipe

View File

@ -13,16 +13,16 @@ $(BLKPACK):
$(BLKUNPACK): $(BLKPACK)
stage: stage.c $(OBJS) blkfs
$(CC) stage.c $(OBJS) -o $@
$(CC) -DBLKFS_PATH=\"`pwd`/blkfs\" stage.c $(OBJS) -o $@
blkfs: $(BLKPACK)
$(BLKPACK) ../blk > $@
forth: forth.c $(OBJS)
$(CC) forth.c $(OBJS) -lncurses -o $@
$(CC) -DBLKFS_PATH=\"`pwd`/blkfs\" forth.c $(OBJS) -lncurses -o $@
vm.o: vm.c blkfs
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -DBLKFS_PATH=\"`pwd`/blkfs\" -c -o vm.o vm.c
$(CC) -DFBIN_PATH=\"`pwd`/forth.bin\" -c -o vm.o vm.c
.PHONY: updatebootstrap

View File

@ -5,6 +5,9 @@
#include <termios.h>
#include "vm.h"
#ifndef BLKFS_PATH
#error BLKFS_PATH needed
#endif
#define WCOLS 80
#define WLINES 32
#define STDIO_PORT 0x00
@ -74,7 +77,7 @@ static void iowr_sety(uint8_t val)
int main(int argc, char *argv[])
{
VM *vm = VM_init();
VM *vm = VM_init(BLKFS_PATH);
if (!vm) {
return 1;
}

View File

@ -3,6 +3,9 @@
#include <unistd.h>
#include "vm.h"
#ifndef BLKFS_PATH
#error BLKFS_PATH needed
#endif
#define RAMSTART 0
#define STDIO_PORT 0x00
// To know which part of RAM to dump, we listen to port 2, which at the end of
@ -41,7 +44,11 @@ static void iowr_here(uint8_t val)
int main(int argc, char *argv[])
{
vm = VM_init();
if (argc < 2) {
vm = VM_init(BLKFS_PATH);
} else {
vm = VM_init(argv[1]);
}
if (vm == NULL) {
return 1;
}

View File

@ -11,9 +11,6 @@
// 5 - dest addr LSB
#define BLK_PORT 0x03
#ifndef BLKFS_PATH
#error BLKFS_PATH needed
#endif
#ifndef FBIN_PATH
#error FBIN_PATH needed
#endif
@ -271,9 +268,9 @@ static void native(NativeWord func) {
vm.nativew[vm.nativew_count++] = func;
}
VM* VM_init() {
fprintf(stderr, "Using blkfs %s\n", BLKFS_PATH);
blkfp = fopen(BLKFS_PATH, "r+");
VM* VM_init(char *blkfs_path) {
fprintf(stderr, "Using blkfs %s\n", blkfs_path);
blkfp = fopen(blkfs_path, "r+");
if (!blkfp) {
fprintf(stderr, "Can't open\n");
return NULL;

View File

@ -1,12 +1,19 @@
TARGET = os.bin
BASE = ../../
STAGE = $(BASE)/cvm/stage
BLKPACK = $(BASE)/tools/blkpack
EMUL = $(BASE)/emul/hw/sms/sms
.PHONY: all
all: $(TARGET)
$(TARGET): xcomp.fs $(STAGE)
cat xcomp.fs | $(STAGE) > $@
$(TARGET): xcomp.fs $(STAGE) blkfs
cat xcomp.fs | $(STAGE) blkfs > $@
$(BLKPACK):
$(MAKE) -C ../tools
blkfs: $(BLKPACK)
$(BLKPACK) $(BASE)/blk blk > $@
$(STAGE):
$(MAKE) -C $(BASE)/cvm stage

View File

@ -27,8 +27,8 @@ CURRENT @ XCURRENT !
283 335 LOADR ( boot.z80 )
353 LOAD ( xcomp core low )
CREATE ~FNT CPFNT7x7
623 628 LOADR ( VDP )
632 637 LOADR ( PAD )
603 608 LOADR ( VDP )
612 617 LOADR ( PAD )
380 LOAD ( xcomp core high )
(entry) _
( Update LATEST )