From 5877d36bf5f026a327a57251d786aba42ed281be Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 4 Nov 2021 19:38:55 -0500 Subject: [PATCH] Add sectorlisp and sectorforth --- index.html | 4 +++- src/browser/main.js | 20 ++++++++++++++++++++ src/floppy.js | 5 ++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c6df44e50c..2d75dbc39b 100644 --- a/index.html +++ b/index.html @@ -55,8 +55,10 @@

Select profile

A homebrew operating system from scratch, written in assembly language Solar OS 0.3 MB Simple graphical OS - Bootchess 0.1 MB + Bootchess 512 B A tiny chess program written in the boot sector + SectorLISP 512 B + A LISP interpreter that fits into the boot sector
diff --git a/src/browser/main.js b/src/browser/main.js index 309931dd94..2dd3981b11 100644 --- a/src/browser/main.js +++ b/src/browser/main.js @@ -402,6 +402,26 @@ name: "bootBASIC", homepage: "https://github.com/nanochess/bootBASIC", }, + { + id: "sectorlisp", + fda: { + "url": HOST + "sectorlisp.img", + "async": false, + "size": 512, + }, + name: "SectorLISP", + homepage: "https://justine.lol/sectorlisp/", + }, + { + id: "sectorforth", + fda: { + "url": HOST + "sectorforth.img", + "async": false, + "size": 512, + }, + name: "sectorforth", + homepage: "https://github.com/cesarblum/sectorforth", + }, { id: "floppybird", fda: { diff --git a/src/floppy.js b/src/floppy.js index b9f09043d9..2e58762ebe 100644 --- a/src/floppy.js +++ b/src/floppy.js @@ -73,6 +73,9 @@ function FloppyController(cpu, fda_image, fdb_image) 1440 : { type: 4, tracks: 80, sectors: 18, heads: 2 }, 1722 : { type: 5, tracks: 82, sectors: 21, heads: 2 }, 2880 : { type: 5, tracks: 80, sectors: 36, heads: 2 }, + + // not a real floppy type, used to support sectorlisp and friends + 0 : { type: 1, tracks: 1, sectors: 1, heads: 1 }, }; var number_of_cylinders, @@ -80,7 +83,7 @@ function FloppyController(cpu, fda_image, fdb_image) number_of_heads, floppy_type = floppy_types[this.floppy_size >> 10]; - if(floppy_type && (this.floppy_size & 0x3FF) === 0) + if(floppy_type && ((this.floppy_size & 0x3FF) === 0 || this.floppy_size === 512)) { cpu.devices.rtc.cmos_write(CMOS_FLOPPY_DRIVE_TYPE, floppy_type.type << 4);