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

v2.1.2 #136

merged 21 commits into from Dec 1, 2023

Conversation

Konamiman and others added 21 commits April 13, 2023 18:05
- MAPDRV was corrupting the register holding the drive number
  while unmapping all the drives in case the device reports
  it has changed. Thus the mapping information ended up written
  to an incorrect memory area.

- The MFRSD driiver was reporting "device changed" even after
  the device had been accessed with DEV_RW. A device is no longer
  considered as "changed" after it has been accessed.

Scenario to reproduce the issue:

- MFRSD with two cards, second one has at least 2 partitions
- On boot, A: is card 1 partition 1, B: is card 2 partition 1
- Right after boot map any drive to card 2 partition 2:
  MAPDDRV d: 2 3 1-3
- Now switch to drive D:, computer crashes
("extended partition LBA") as a valid extended partition type,
additionally to 5 ("extended partition CHS") in the kernel
and in MAPDRV.COM.

Additionally, small fix in FDISK, which was creating FATs with one
extra sector when creating FAT16 filesystems.
The MSX-DOS 2 documentation says that DOSVER in DOS 1 returns B=0
and C undefined, but the fact is that in MSX-DOS 1 register C is
preserved (so 6Fh) and seems like some programs rely on that fact
to detect the DOS 1 mode. Nextor was corrupting C in this case,
so even if strictly speaking that shouldn't be an issue, this commit
changes the behavior of DOSVER in DOS 1 to return C=6Fh.
The issue of only recognizing the slave device with the regular
Sunrise IDE driver happens only in blueMSX, not in all emulators
as the documentation was incorrectly stating.
Code 15 is "extended partition LBA", code 5 is the old
"extended partition CHS".
This PR gives the MegaFlashROM the same boot behavior as the Sunrise IDE driver 0.1.7, that is restore the MSX saved screen parameters at boot if they've been saved by the RTC on MSX2 or higher computers.

Given that I'm currently traveling, I was only able to test and confirm it working with OpenMSX on a FS-A1WSX and FS-A1GT using both 1 and 2 slots flavors of the ROM.

Thankfully the changes made shouldn't bring up any unrelated behaviors since they're cosmetic at most and don't affect the driver itself.
Add a paragraph explaining that 15 (extended LBA) is recognized
as a valid extended partition type code since Nextor 2.1.2.
The code in drv.mac was assuming that the call to the driver routine
DEV_RW/DSKIO was setting Cy=1 to signal an error, however this is true
only for drive-based drivers, but not for device-based drivers.
This incorrect behavior was happening only in DOS 1 mode and only
for transfers to page 1.
It was being taken from register L, but in newer SDCCs it's passed
in register A instead.
- Doc comment fixed: now it correctly says that the modifier
  for integers is "u" (not "ud" or "ui") and for unsigned long
  is "lu" (not "ul")

- Fixed the "l" modifier, it was skipping the next character
@Konamiman Konamiman added the release Release branch label Nov 30, 2023
@Konamiman Konamiman added this to the v2.1.2 milestone Nov 30, 2023
@Konamiman Konamiman self-assigned this Nov 30, 2023
@Konamiman Konamiman merged commit 3a1e520 into v2.1 Dec 1, 2023
2 checks passed
@Konamiman Konamiman deleted the v2.1.2 branch December 1, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants