Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.2 #136

Merged
merged 21 commits into from Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3084861
Fix a bug in MAPDRV and a bug in the MFRSD kernel.
Konamiman Apr 13, 2023
7985450
Add support for recognizing partition type code 15
Konamiman Apr 16, 2023
3a21bde
Update kernel version number to 2.1.2
Konamiman Apr 16, 2023
0bcecfa
Make the DOSVER function call return 6Fh in C in DOS 1 mode
Konamiman Oct 28, 2023
f5edece
Rename "SunriseIDE.emulators.ROM" file to "SunriseIDE.blueMSX.ROM"
Konamiman Oct 29, 2023
fd5631e
FDISK now creates new partitions with code 15, not 5.
Konamiman Oct 29, 2023
d98e0b9
Update MegaFlashROM SCC+ SD Boot Behavior
Steveneska Nov 3, 2023
014de7c
Add EPTCFT (Extended Partition Code Fix Tool).
Konamiman Oct 29, 2023
4b9c0d4
Update the description of _GPART in the programmers reference.
Konamiman Nov 5, 2023
4dcfa14
Fix DSKIO driver error check in DOS 1, page 1 transfers
Konamiman Nov 14, 2023
8a104a6
Fix error code returned to the OS in crt0_msxdos_advanced.
Konamiman Nov 19, 2023
b9a0176
Fixes in long integer handling in printf.c
Konamiman Nov 19, 2023
a7e89f3
Add EPTCFT.COM to the tools Makefile
Konamiman Nov 23, 2023
a8aebf1
Merge pull request #134 from Konamiman/fix-driver-error-check-in-dskio
Konamiman Nov 30, 2023
7e8d5f8
Merge pull request #121 from Konamiman/support-extended-partition-lba
Konamiman Nov 30, 2023
bd871d4
Merge pull request #119 from Konamiman/fix/bad_mapdrv_on_device_chang…
Konamiman Nov 30, 2023
6989ce2
Merge pull request #129 from Konamiman/rename-sunrise-ide-emulators-r…
Konamiman Nov 30, 2023
f73a87d
Merge pull request #128 from Konamiman/make-dosver-return-6f-in-c-in-…
Konamiman Nov 30, 2023
7e1998e
Merge pull request #132 from Steveneska/v2.1
Konamiman Nov 30, 2023
5ae2444
Merge pull request #135 from Konamiman/fix-crt0-msxdos-and-printf
Konamiman Nov 30, 2023
bdbdcba
Merge pull request #122 from Konamiman/update/version-numbers-2.1.2
Konamiman Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Nextor 2.1 Getting Started Guide.md
Expand Up @@ -41,7 +41,7 @@ This section explains the steps needed to setup blueMSX in order to follow this

a. Download the following files from [the lastest release of Nextor in GitHub](https://github.com/Konamiman/Nextor/releases/latest):

* Nextor kernel with Sunrise IDE driver. Please choose the file with _.SunriseIDE.emulators.ROM_ extension (the _.SunriseIDE.ROM_ version works but only recgonizes the slave IDE device in emulators).
* Nextor kernel with Sunrise IDE driver. Please choose the file with _.SunriseIDE.blueMSX.ROM_ extension (the _.SunriseIDE.ROM_ version works but only recognizes the slave IDE device in blueMSX), if you are using another emulator or a physical Sunrise IDE (or compatible) controller hardware you can use the file with _.SunriseIDE.ROM_ extension instead.

* Nextor tools disk image (_tools.dsk.zip_).

Expand Down
5 changes: 4 additions & 1 deletion docs/Nextor 2.1 Programmers Reference.md
Expand Up @@ -501,11 +501,14 @@ The partition type code returns information about the filesystem that the partit
0: None (the partition with the specified number does not exist)
1: FAT12
4: FAT16, smaller than 32MB (obsolete)
5: Extended (see below)
5: Extended (CHS) (see below)
6: FAT16 (CHS)
14: FAT16 (LBA)
15: Extended (LBA)
```

**Note:** Prior to version 2.1.2, Nextor would only recognize a partition as extended if it had the partition type code 5 (extended CHS), and FDISK would use this code when creating extended partitions. Starting with Nextor 2.1.2, FDISK will use partition type code 15 (extended LBA) when creating extended partitions, and both 5 and 15 will be recognized as valid extended partition type codes when scanning existing partitions with `_GPART`. In the description below, "Extended" means "Either extended CHS or extended LBA".

There are many more partition type codes defined, but they refer to filesystems that can't be handled by Nextor so they are not listed here.

A device can have up to four primary partitions, numbered 1 to 4. In order to accommodate more than four partitions, partition number 2 may be of a special type named "Extended". An extended partition is actually a container for more partitions; there is no limit in the number of extra partitions that a partition of type "Extended" can contain. Primary partitions 3 and 4 do not exist when partition 2 is extended.
Expand Down
14 changes: 7 additions & 7 deletions source/kernel/Makefile
Expand Up @@ -8,7 +8,7 @@
# N80=/path/to/N80 make


VERSION := 2.1.1
VERSION := 2.1.2

ifeq ($(strip $(N80)),)
N80=N80
Expand Down Expand Up @@ -126,11 +126,11 @@ drivers/SunriseIDE/sunride.masteronly.bin: \
$(call assemble_as,drivers/SunriseIDE/sunride.asm,$$/sunride.masteronly.bin,--build-type abs --output-file-extension bin --define-symbols MASTER_ONLY,BAD_POPS)


### Sunrise IDE, ROM for emulators
### Sunrise IDE, ROM for blueMSX

ide-emu: drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.emulators.ROM
ide-emu: drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.blueMSX.ROM

drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.emulators.ROM: \
drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.blueMSX.ROM: \
nextor_base.dat \
drivers/SunriseIDE/driver.bin \
drivers/SunriseIDE/chgbnk.bin \
Expand All @@ -146,11 +146,11 @@ drivers/SunriseIDE/driver.bin: \
$(call assemble,drivers/SunriseIDE/driver.mac,--build-type abs --output-file-extension bin)


### Sunrise IDE, ROM for emulators, master device only
### Sunrise IDE, ROM for blueMSX, master device only

ide-masteronly-emu: drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.MasterOnly.emulators.ROM
ide-masteronly-emu: drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.MasterOnly.blueMSX.ROM

drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.MasterOnly.emulators.ROM: \
drivers/SunriseIDE/Nextor-$(VERSION).SunriseIDE.MasterOnly.blueMSX.ROM: \
nextor_base.dat \
drivers/SunriseIDE/drvmonly.bin \
drivers/SunriseIDE/chgbnk.bin \
Expand Down
12 changes: 0 additions & 12 deletions source/kernel/bank2/val.mac
Expand Up @@ -8,20 +8,8 @@
INCLUDE ../const.inc
RAMMOD

MBR_PSTART equ 01BEh ;Start of partition table in MBR
MBR_PSIZE equ 16 ;Size of partition table entry
POFF_TYPE equ 4 ;Offset of partition type in p. table entry
POFF_PSTART equ 8 ;Offset of partition start in p. table entry
POFF_PSIZE equ 12 ;Offset of partition size in p. table entry
PT_FAT12 equ 1 ;Partition type code for FAT12
PT_FAT16_S equ 4 ;Partition type code for FAT16 (< 32M)
PT_EXT equ 5 ;Partition type code for extended partition
PT_FAT16 equ 6 ;Partition type code for FAT16
PT_FAT16_L equ 14 ;Partition type code for FAT16 (LBA)
MBR_SIG equ 512-2 ;MBR signature offset in MBR (55h, AAh)
MAXCLUS_FAT12 equ 4084
MAXCLUS_12BITS equ 4095

;
;-----------------------------------------------------------------------------
;
Expand Down
30 changes: 22 additions & 8 deletions source/kernel/bank4/partit.mac
Expand Up @@ -23,7 +23,8 @@ POFF_PSTART equ 8 ;Offset of partition start in p. table entry
POFF_PSIZE equ 12 ;Offset of partition size in p. table entry
PT_FAT12 equ 1 ;Partition type code for FAT12
PT_FAT16_S equ 4 ;Partition type code for FAT16 (< 32M)
PT_EXT equ 5 ;Partition type code for extended partition
PT_EXT equ 5 ;Partition type code for extended partition (CHS)
PT_EXT_LBA equ 15 ;Partition type code for extended partition (LBA)
PT_FAT16 equ 6 ;Partition type code for FAT16
PT_FAT16_L equ 14 ;Partition type code for FAT16 (LBA)

Expand Down Expand Up @@ -205,7 +206,7 @@ DO_EXTPAR:
;--- If extended partition requested, first check that partition is actually extended

ld a,(ix+POFF_TYPE)
cp PT_EXT
call IS_EXT_PART
jp nz,UNEX_PART

ld a,(ix+POFF_PSTART) ;Save the start sector number of the outer extended partition
Expand Down Expand Up @@ -285,7 +286,7 @@ EXTP_NEXT:
pop bc

ld a,(ix+POFF_TYPE)
cp PT_EXT
call IS_EXT_PART
jr nz,TPIY_UNEX_PART

jr EXTP_LOOP
Expand Down Expand Up @@ -1232,7 +1233,7 @@ AA_PX_DOEMU:

AA_PX_NOEMU:
ld a,b ;Partition type
cp PT_EXT
call IS_EXT_PART
jr nz,AA_PX_NOEX
ld a,(ix+AAD_CURR_PART_INDEX)
or 80h
Expand Down Expand Up @@ -3137,7 +3138,7 @@ MAP_SPECIFIC:

MAP_DRV_UNK:
;Unknown change status: assume unchanged media.
;If it has changed, the boot checksum checksum
;If it has changed, the boot checksum
;mechanism will do the work of unassigning
;all other drives mapped to this device
;if necessary.
Expand All @@ -3147,6 +3148,7 @@ MAP_DRV_UNK:
MAP_DRV_CH:
push hl
push iy
push bc
ld e,(hl)
inc hl
ld d,(hl)
Expand All @@ -3156,6 +3158,7 @@ MAP_DRV_CH:
ld d,(iy+2)
ld e,(iy+3)
call UNMAPALL
pop bc
pop iy
pop hl

Expand Down Expand Up @@ -4169,7 +4172,7 @@ IDRVR_RET:

DOSV1_2:
xor a
ld b,a
ld bc,_DOSVER## ;Make B=0 and preserve C, some programs actually check it
ret


Expand Down Expand Up @@ -4505,7 +4508,7 @@ MAPDRV_NOP0:
ld c,_GPART##
call BASIC_DOS
ld a,b
cp 5 ;Extended partition?
call IS_EXT_PART ;Extended partition?

pop bc
ld a,b
Expand Down Expand Up @@ -4540,7 +4543,7 @@ MAPDRV_GOTPAR:
ld a,b
or a
jp z,BASIC_ERR
cp 5
call IS_EXT_PART
jp z,BASIC_ERR ;"Invalid partition" error if non existing or extended partition
ld e,c

Expand Down Expand Up @@ -6278,5 +6281,16 @@ STRCOMP:
inc de
jr STRCOMP


; Check if the partition type passed in A
; corresponds to a recognized extended partition type,
; return Z if so or NZ otherwise

IS_EXT_PART:
cp PT_EXT
ret z
cp PT_EXT_LBA
ret

finish <PARTIT>
end
2 changes: 1 addition & 1 deletion source/kernel/bank5/fdisk.c
Expand Up @@ -841,7 +841,7 @@ byte GetDiskPartitionsInfo()
DosCallFromRom(_GPART, REGS_ALL);
error = regs.Bytes.A;
if(error == 0) {
if(regs.Bytes.B == PARTYPE_EXTENDED) {
if(regs.Bytes.B == PARTYPE_EXTENDED || regs.Bytes.B == PARTYPE_EXTENDED_LBA) {
extendedIndex = 1;
} else {
currentPartition->primaryIndex = primaryIndex;
Expand Down
4 changes: 2 additions & 2 deletions source/kernel/bank5/fdisk2.c
Expand Up @@ -415,7 +415,7 @@ int CalculateFatFileSystemParametersFat16(ulong fileSystemSizeInK, dosFilesystem
clusterCount = dataSectorsCount >> sectorsPerClusterPower;
sectorsPerFat = (clusterCount + 2) >> 8;

if(((clusterCount + 2) & 0x3FF) != 0) {
if(((clusterCount + 2) & 0xFF) != 0) {
sectorsPerFat++;
}

Expand Down Expand Up @@ -515,7 +515,7 @@ int CreatePartition(int index)

if(index != (partitionsCount - 1)) {
tableEntry++;
tableEntry->partitionType = PARTYPE_EXTENDED;
tableEntry->partitionType = PARTYPE_EXTENDED_LBA;
tableEntry->firstAbsoluteSector = nextDeviceSector;
if(index == 0) {
mainExtendedPartitionFirstSector = nextDeviceSector;
Expand Down
54 changes: 0 additions & 54 deletions source/kernel/bank6/partit.h

This file was deleted.