Skip to content

Commit

Permalink
Merge branch 'v2.1' into v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Konamiman committed Mar 27, 2023
2 parents 78167b3 + 55205c8 commit 70dee4f
Show file tree
Hide file tree
Showing 233 changed files with 10,710 additions and 9,302 deletions.
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: konamiman
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
65 changes: 65 additions & 0 deletions .github/workflows/ci.yaml
@@ -0,0 +1,65 @@
name: CI

on:
pull_request:
paths:
- 'source/**'
- 'buildtools/**'
- '.github/workflows/**'
push:
paths:
- 'source/**'
- 'buildtools/**'
- '.github/workflows/**'
branches:
- 'v**'
tags:
- 'v**'

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y binutils make curl cpm
curl -Lo sdcc.tar.bz2 https://sourceforge.net/projects/sdcc/files/sdcc-linux-amd64/4.2.0/sdcc-4.2.0-amd64-unknown-linux2.5.tar.bz2/download
mkdir sdcc
cd sdcc
tar xjf ../sdcc.tar.bz2
sudo cp -r sdcc-4.2.0/* /usr/local/
sdcc -v
- name: Install Nestor80
env:
N80_VERSION: '1.1'
LK80_VERSION: '1.0'
LB80_VERSION: '1.0'
run: |
curl -Lo n80.zip https://github.com/Konamiman/Nestor80/releases/download/n80-v${N80_VERSION}/N80_${N80_VERSION}_SelfContained_linux-x64.zip
unzip n80.zip
sudo install -v N80 /usr/local/bin
rm N80
rm n80.zip
curl -Lo lk80.zip https://github.com/Konamiman/Nestor80/releases/download/lk80-v1.0/LK80_1.0_SelfContained_linux-x64.zip
unzip lk80.zip
sudo install -v LK80 /usr/local/bin
rm LK80
rm lk80.zip
curl -Lo lb80.zip https://github.com/Konamiman/Nestor80/releases/download/lb80-v${LB80_VERSION}/LB80_${LB80_VERSION}_SelfContained_linux-x64.zip
unzip lb80.zip
sudo install -v LB80 /usr/local/bin
rm LB80
rm lb80.zip
- name: Add buildtools
run: |
for NAME in buildtools/linux/*; do
sudo install -v ${NAME} /usr/local/bin
done
- name: Make all
run: make -C source
7 changes: 6 additions & 1 deletion .gitignore
Expand Up @@ -13,6 +13,7 @@ bin/**
*.hex
*.HEX
*.bin
*.BIN
*.ihx
*.IHX
*.lk
Expand All @@ -24,18 +25,19 @@ dos250ba.dat
kernel.dat
nextor2.rom
info/*.pdf
source/kernel/*.bytes
source/kernel/bank*/*.inc
source/kernel/drivers/*.inc
source/kernel/drivers/**/*.inc
source/kernel/drivers/**/*.lst
!source/kernel/drivers/MegaFlashRomSD/*.bin
source/kernel/drivers/**/*.rom
source/kernel/drivers/**/*.ROM
source/kernel/bank5/*.dat
source/kernel/bank5/*.asm
source/command/msxdos/*.inc
source/command/msxdos/codes.mac
source/command/msxdos/data.mac
source/command/msxdos/USEKMSG.MAC
source/tools/**.inc
source/tools/**.asm
source/tools/**.com
Expand All @@ -47,3 +49,6 @@ source/tools/data.mac
*.suo
NEXTOR.SYS
NEXTORK.SYS
nextor_base.dat
*.LST

44 changes: 16 additions & 28 deletions README.md
Expand Up @@ -18,43 +18,31 @@ Note that there is no `master` branch, but branches for each major version of Ne

* [**tools**](source/tools): The new command line tools created for Nextor.

* [**wintools**](/wintools): Windows tools needed for building Nextor. Includes the source for two custom made tools: [`mknexrom`](/wintools/mknexrom.c) (C) and [`SymToEqus`](/wintools/SymToEqus.cs) (C#).
* [**buildtools**](/buildtools): Tools needed for building Nextor on Windows (deprecated) and Linux (recommended). Includes the source for two custom made tools: [`mknexrom`](/buildtools/sources/mknexrom.c) (C) and [`SymToEqus`](/buildtools/sources/SymToEqus.cs) (C#).

* [**docs**](/docs): Documentation for both users and developers.

## How to build Nextor

You need:
Nextor requires Linux to be built. It should work on macOs too, but that hasn't been tested. If you are on Windows 10 or 11 you can use [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10).

1. A Windows machine (if you don't have one see ["No Windows?"](#no-windows) below)
2. SDCC ([http://sdcc.sourceforge.net](http://sdcc.sourceforge.net)), targetting the Z80 processor, to build FDISK.
3. .NET Framework 2.0 or higher (for the `SymToEqus` tool in the `wintools` folder)
4. The `wintools` folder must be added to the `PATH` environment variable
To build Nextor you'll need:

### To build the Nextor kernel
* `make`. On Debian/Ubuntu-ish systems you can just `apt-get install make`.
* [The Nestor80 tools](https://github.com/Konamiman/Nestor80). Go to [the releases section](https://github.com/Konamiman/Nestor80/releases) and download the appropriate variant of the latest version for the assembler (N80), the linker (LK80) and the library manager (LB80).
* [SDCC](http://sdcc.sourceforge.net/) **v4.2 or newer**, for FDISK and the command line tools written in C. On Debian/Ubuntu-ish systems you can just `apt-get install sdcc`.
* `objcopy` from [the binutils package](https://www.gnu.org/software/binutils/). On Debian/Ubuntu-ish systems you can just `apt-get install binutils`.
* `mknexrom` to generate the ROM files with the drivers. You have it in the `buildtools/Linux` folder, but you can also build it from the source in the `buildtools/sources` directory.

Run the `compile.bat` script located in the `source\kernel` folder. If the FDISK tool has not been compiled already (the `fdisk.dat` and `fdisk2.dat` files do not exist in the `bank5` folder), they will be compiled on the fly.
Except for those obtained via `apt`, you'll need to place these tools at a suitable location to be able to use them, e.g. `/usr/bin`.

The generated kernel base file and the complete ROM files will be generated in the `bin\kernels` folder. One ROM file will be generated for each folder existing in the `source\kernel\drivers` folder.
There are five makefiles that will take care of building the different components of Nextor. Once the tools are in place you can just `cd` to the appropriate directory and run `make`:

### To build the FDISK tool only
* `source/kernel`: builds the kernel ROM files and copies them to the `bin/kernels` directory. There are handy aliases for the different ROM files, so you can run e.g. `make ide`; see the `kernels` rule at the beginning of the file for the full list.
* `source/command/msxdos`: builds `NEXTOR.SYS` and copies it to the `bin/tools` directory.
* `source/tools`: builds the command line tools written in assembler and copies them to the `bin/tools` directory.
* `source/tools/C`: builds the command line tools written in C and copies them to the `bin/tools` directory.
* `source`: this one just invokes the other four in sequence, so it builds pretty much everything. It supports `make clean` too.

If you make a change in the FDISK tool, you can compile it without having to compile the full kernel again. Just run the `compile.bat` script in the `source\kernel\bank5` folder (do NOT run `compfdsk.bat`). The ROM files in `bin\kernels` will be appropriately updated.
You may want to take a look at [this now closed pull request from Dean Netherton](https://github.com/Konamiman/Nextor/pull/79) that contains a different attempt at writing makefiles for bulding Nextor. It even has some nice extra features like building FDD and HDD images with Nextor, and building the `mknexrom` tool itself.

### To build the command line tools

Run the `compile.bat` script in the `source\tools` folder. The tools will be generated in the `bin\tools` folder.

### To build `NEXTOR.SYS`

Run the `compile.bat` script in the `source\command\msxdos` folder. The file will be generated in the `bin\tools` folder.

### To build `COMMAND2.COM`

Run the `compile.bat` script in the `source\command\command` folder. The file will be generated in the `bin\tools` folder.

At this time there's no specific script (other than the original makefile) for building the original MSX-DOS command line tools.

### No Windows?

If your machine doesn't run Windows you can still build Nextor by using Xesco's [Nextor builder](https://github.com/xesco/NextorBuilder).
Binary file added buildtools/linux/mknexrom
Binary file not shown.

0 comments on commit 70dee4f

Please sign in to comment.