Skip to content

Commit

Permalink
Merge branch 'v2.1' into v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Konamiman committed Nov 5, 2023
2 parents 48fd740 + 181d3e0 commit f2db0d7
Show file tree
Hide file tree
Showing 180 changed files with 6,876 additions and 4,963 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']
40 changes: 29 additions & 11 deletions .github/workflows/ci.yaml
Expand Up @@ -25,19 +25,37 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y \
sdcc binutils make curl cpm
- name: Install M80
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:
VERSION: 1.1
N80_VERSION: '1.1'
LK80_VERSION: '1.0'
LB80_VERSION: '1.0'
run: |
curl -Lo m80.zip https://github.com/Konamiman/M80dotNet/releases/download/v${VERSION}/M80dotNet_${VERSION}_SelfContained_linux_x64.zip
unzip m80.zip
for NAME in M80 L80 LIB80; do
sudo install -v ${NAME} /usr/local/bin
rm ${NAME}
done
rm m80.zip
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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -51,3 +51,4 @@ NEXTOR.SYS
NEXTORK.SYS
nextor_base.dat
*.LST

24 changes: 4 additions & 20 deletions README.md
Expand Up @@ -24,17 +24,14 @@ Note that there is no `master` branch, but branches for each major version of Ne

## How to build Nextor

The "official" environment for building Nextor is Linux. Legacy support for Windows is still offered but it's deprecated. Read on for the ugly details.
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).

### Linux

To build Nextor on Linux you'll need:
To build Nextor you'll need:

* `make`. On Debian/Ubuntu-ish systems you can just `apt-get install make`.
* The native MACRO80 tools provided by [the M80dotNet project](https://github.com/Konamiman/M80dotNet). Go to [the releases section](https://github.com/Konamiman/M80dotNet/releases) and download the appropriate variant of the latest version.
* [SDCC](http://sdcc.sourceforge.net/), for FDISK and the command line tools written in C. On Debian/Ubuntu-ish systems you can just `apt-get install sdcc`.
* [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`.
* `sjasm` v0.39 to assemble some of the drivers. You have it in the `buildtools/Linux` folder, but you can also build it from [the sources](https://github.com/Konamiman/Sjasm/tree/v0.39) (remember to switch to the `v0.39` branch).
* `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.

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`.
Expand All @@ -49,16 +46,3 @@ There are five makefiles that will take care of building the different component

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.

## Windows

If you use Windows 10 the recommended approach is to use the Linux tools and scripts with [WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10). If you use an older Windows the recommended approach is to upgrade to Windows 10 (or to install Linux in a separate partition or disk, or in a virtual machine).

However, if for some reason you are still using a non-WSL capable Windows, support for building Nextor is available as well; but note that it will probably be removed at some point in the future, as it's a maintenance burden (seriously, give Windows 10 and WSL a try, it's really worth it).

To build Nextor on Windows you need:

* The tools in the `buildtools/Windows` folder. These must be placed in some folder included in the `PATH` environment variable.
* [SDCC](http://sdcc.sourceforge.net/), for FDISK and the command line tools written in C.
* .NET Framework 2.0 or higher, for the `SymToEqus` tool.

You'll find a number of `.bat` files available at the same locations of the Linux makefiles except for the one in `source` (see "Linux" section above). These are not "makefile-ish" and always build the whole set of kernels/tools.
Empty file modified buildtools/linux/mknexrom 100644 → 100755
Empty file.
Binary file removed buildtools/linux/sjasm
Binary file not shown.
82 changes: 0 additions & 82 deletions buildtools/sources/SymToEqus.cs

This file was deleted.

Binary file removed buildtools/windows/CPM32.EXE
Binary file not shown.
Binary file removed buildtools/windows/HEX2BIN.EXE
Binary file not shown.
Binary file removed buildtools/windows/SymToEqus.exe
Binary file not shown.
Binary file removed buildtools/windows/dd.exe
Binary file not shown.
Binary file removed buildtools/windows/mknexrom.exe
Binary file not shown.
Binary file removed buildtools/windows/sjasm.exe
Binary file not shown.
8 changes: 4 additions & 4 deletions source/command/chkdsk/const.inc
Expand Up @@ -89,11 +89,11 @@ CF_TE EQU 4 ;Set => filename terminator
;
DR_FILE equ 0 ;Filename
DR_EXT equ 8 ;Filename extension
DR_ATTR equ 11 ;Attributes byte
DR_DCHAR equ 12 ;Deleted filename character
DR_TIME equ 22 ;Time of last update
DR_ATTRIBUTES equ 11 ;Attributes byte
DR_DELETED_FIRST_CHAR equ 12 ;Deleted filename character
DR_UPDATED_TIME equ 22 ;Time of last update
DR_DATE equ 24 ;Date of last update
DR_CLU equ 26 ;Fisrt cluster number
DR_FIRST_CLUSTER equ 26 ;Fisrt cluster number
DR_SIZE equ 28 ;File size
;
;
10 changes: 5 additions & 5 deletions source/command/chkdsk/dir.mac
Expand Up @@ -279,8 +279,8 @@ memory_ok: ld hl,(DIR_START##) ;Remember start cluster for
pop hl ;Record start cluster of
ld (DIR_PARENT##),hl ; sub-directories parent
;
ld l,(ix+DR_CLU)
ld h,(ix+DR_CLU+1) ;Setup DIR_START ready to
ld l,(ix+DR_FIRST_CLUSTER)
ld h,(ix+DR_FIRST_CLUSTER+1) ;Setup DIR_START ready to
ld (DIR_START##),hl ; search this sub-directory.
;
ld hl,(FILE_PTR##) ;Store the address of this
Expand Down Expand Up @@ -389,13 +389,13 @@ flst_new_2: ld hl,ER_FLAGS## ;If file list is not being
ld (RAM_TOP##),hl ;Record new top of RAM and
ld (FILE_PTR##),hl ; pointer to this record.
;
use_dummy_rec: ld a,(ix+DR_ATTR) ;Store attributes byte in
use_dummy_rec: ld a,(ix+DR_ATTRIBUTES) ;Store attributes byte in
ld (hl),a ; the file record.
inc hl
ld a,(ix+DR_CLU)
ld a,(ix+DR_FIRST_CLUSTER)
ld (hl),a ;Store this entry's cluster
inc hl ; number in the file record.
ld a,(ix+DR_CLU+1)
ld a,(ix+DR_FIRST_CLUSTER+1)
ld (hl),a
inc hl
;
Expand Down
22 changes: 11 additions & 11 deletions source/command/chkdsk/main.mac
Expand Up @@ -352,8 +352,8 @@ scan_dir_entry: push hl ;Point IX at directory entry
cp 0E5h
jr nz,not_deleted ;If entry is deleted then
xor a ; remove the saved first
cp (ix+DR_DCHAR) ; character so it can't be
ld (ix+DR_DCHAR),a ; un-deleted and mark buffer
cp (ix+DR_DELETED_FIRST_CHAR) ; character so it can't be
ld (ix+DR_DELETED_FIRST_CHAR),a ; un-deleted and mark buffer
call nz,DIRTY_BUFFER## ; as dirty if it was non-zero.
jr scan_dir_next
;
Expand All @@ -364,7 +364,7 @@ scan_dir_entry: push hl ;Point IX at directory entry
not_deleted: call FLST_NEW## ;Create a new record for this
call ENT_DEBUG## ; entry in the file list.
;
ld a,(ix+DR_ATTR) ;Test volume-name bit and
ld a,(ix+DR_ATTRIBUTES) ;Test volume-name bit and
bit AT_VOL,a ; skip if not set.
jr z,not_vol_name
;
Expand All @@ -389,7 +389,7 @@ kill_vol_name: call QER_MSG## ;Give error message
;
not_vol_name: call CHECK_CHAIN ;Check that chain is valid
ex af,af' ;Save file size check flag
bit AT_DIR,(ix+DR_ATTR) ;If entry is a file then skip
bit AT_DIR,(ix+DR_ATTRIBUTES) ;If entry is a file then skip
jr z,not_sub_dir ; to file size checking.
;
call DRE_SV## ;Setup for sub-dir search
Expand All @@ -401,7 +401,7 @@ not_vol_name: call CHECK_CHAIN ;Check that chain is valid
call DRE_SAME## ; back to its parent.
ld a,__CVD_MSG## ;Print out an error message.
call QER_MSG##
ld (ix+DR_ATTR),ATM_ARC ;Convert the directory into
ld (ix+DR_ATTRIBUTES),ATM_ARC ;Convert the directory into
call DIRTY_BUFFER## ; a file, both in the sector
ld hl,(FILE_PTR##) ; buffer and in the file
ld (hl),ATM_ARC ; list record.
Expand Down Expand Up @@ -440,8 +440,8 @@ CHECK_CHAIN:
ld bc,0 ;Start cluster count
exx ; at zero.
;
ld e,(ix+DR_CLU) ;Get first cluster from
ld d,(ix+DR_CLU+1) ; directory entry and if
ld e,(ix+DR_FIRST_CLUSTER) ;Get first cluster from
ld d,(ix+DR_FIRST_CLUSTER+1) ; directory entry and if
ld a,d ; it is zero then return
or e ; immediately with BC=0
jr z,chain_done_z ; to indicate null chain.
Expand Down Expand Up @@ -481,8 +481,8 @@ invalid_first: ld hl,(FILE_PTR##) ;First cluster number is
ld (hl),0 ; number both in the file
inc hl ; list record and also in the
ld (hl),0 ; directory entry itself.
ld (ix+DR_CLU),0
ld (ix+DR_CLU+1),0 ;Flag sector as dirty to
ld (ix+DR_FIRST_CLUSTER),0
ld (ix+DR_FIRST_CLUSTER+1),0 ;Flag sector as dirty to
call DIRTY_BUFFER## ; ensure it gets written out
ld a,__IENT_MSG##
call QER_MSG## ;Print an error message.
Expand All @@ -508,7 +508,7 @@ endif
chain_done_z: xor a ;Allow file size check.
chain_done: push af ;Save file size check flag
exx
ld a,(ix+DR_ATTR)
ld a,(ix+DR_ATTRIBUTES)
ld hl,DIR_COUNT## ;Point HL at correct count
bit AT_DIR,a ; variable for this directory
jr nz,got_count_addr ; entry. There are seperate
Expand Down Expand Up @@ -662,7 +662,7 @@ dot_fail_nz_1: pop bc ; failure.
ld bc,0 ; this is what should be in
not_root_clu: ; the entry.
;
ld de,DR_CLU-DR_ATTR ;Get cluster number from
ld de,DR_FIRST_CLUSTER-DR_ATTRIBUTES ;Get cluster number from
add hl,de ; directory entry and compare
ld e,(hl) ; it with the one passed in BC.
inc hl
Expand Down
2 changes: 1 addition & 1 deletion source/command/command/cli.mac
Expand Up @@ -1496,7 +1496,7 @@ if 1
CALL _BDOS ; we can proceed.
RET NZ ; Report any errors.

LD A,(BUFF##+20) ; We had better define "FIB_ID".
LD A,(BUFF##+20) ; We had better define "FIB_VOLUME_ID".
BIT 7,A ; This is not actuall a
LD A,.BADVER## ; "Wrong DOS version" what the error
RET NZ ; code was intended for.
Expand Down
Binary file removed source/command/msxdos/CPM32.EXE
Binary file not shown.
Binary file removed source/command/msxdos/L80.CPM
Binary file not shown.
Binary file removed source/command/msxdos/LIB80.CPM
Binary file not shown.
Binary file removed source/command/msxdos/M80.CPM
Binary file not shown.

0 comments on commit f2db0d7

Please sign in to comment.