1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 20:18:04 +11:00

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 440-489 unused
490 TRS-80 Recipe 520 Fonts 490 TRS-80 Recipe 520 Fonts
550 TI-84+ Recipe 580 RC2014 Recipe 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 650 AVR assembler 690 AVR SPI programmer
700-729 unused 730 8086 assembler 700-729 unused 730 8086 assembler
800 8086 boot code 830 PC/AT recipe 800 8086 boot code 830 PC/AT recipe

View File

@ -13,16 +13,16 @@ $(BLKPACK):
$(BLKUNPACK): $(BLKPACK) $(BLKUNPACK): $(BLKPACK)
stage: stage.c $(OBJS) blkfs stage: stage.c $(OBJS) blkfs
$(CC) stage.c $(OBJS) -o $@ $(CC) -DBLKFS_PATH=\"`pwd`/blkfs\" stage.c $(OBJS) -o $@
blkfs: $(BLKPACK) blkfs: $(BLKPACK)
$(BLKPACK) ../blk > $@ $(BLKPACK) ../blk > $@
forth: forth.c $(OBJS) 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 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 .PHONY: updatebootstrap

View File

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

View File

@ -3,6 +3,9 @@
#include <unistd.h> #include <unistd.h>
#include "vm.h" #include "vm.h"
#ifndef BLKFS_PATH
#error BLKFS_PATH needed
#endif
#define RAMSTART 0 #define RAMSTART 0
#define STDIO_PORT 0x00 #define STDIO_PORT 0x00
// To know which part of RAM to dump, we listen to port 2, which at the end of // 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[]) 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) { if (vm == NULL) {
return 1; return 1;
} }

View File

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

View File

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

View File

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