-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Impossible to implement phantom drive properly #54
Comments
The solution to this problem is setting up two flags in the LUN_INFO:
It is generally possible to merge these two flags into the one flag (phantom/non-bootable) if Nextor is not going to implement phantom drives and will leave this task to the driver. If driver sets this flag, device is not attempted to be booted from. |
Final version of Nextor 2.1.0 will provide:
Those two should allow to implement the functionality that you mention. |
Unfortunately this did not solve the problem of the "insert diskette" at the startup. Driver, in its DEV_STAT routine, still asks to insert phantom disk into logical drive to get its status because kernel asks for the status of the phantom drive/LUN. |
Please look at how the Rookie Drive FDD does it: https://github.com/Konamiman/RookieDrive-FDD-ROM/blob/master/msx/bank1/misc.asm#L128 - that Basically:
|
The driver does exactly this you describe. Look at the very top picture of my original post. You can see machine says "-D1", then "-D2", then 3 hex codes and "insert diskette". "-Dx" is kernel invoking DEV_STATUS routine. Thus when kernel starts, it tries to obtain the status of the all devices, and calls DEV_STATUS several times. Of course, as soon as it calls DEV_STATUS for phantom device (-D2), driver sees that kernel selects another logical floppy drive (phantom one) and displays "insert diskette". Now look further into the picture. Kernel obtains status of other devices (-D3, -D4 ... -D7), driver displays nothing because these devices do not exist or they have no phantoms. Then kernel again tries to obtain status of primary drive (-D1), causing another "insert diskette" prompt because last drive accesses was drive 2 (phantom drive when querying its status). Then again, kernel queries phantom drive for status "-D2" and driver displays another "insert diskette" message. Now look at the second picture. Before booting. kernel again checks the status of the device 1 (primary floppy, "-D1"), but as it was querying status of phantom before, this causes another "insert diskette" message. Thus there're in total 5 "insert diskette" messages appearing when Nextor kernel starts. I hope it is clearer now. |
- Fix: broken RAM disk (introduced in RC1). - Fix: disk errors for old MSX-DOS 1 file functions in BASIC crash the computer (#59). - Add: new flag returned by LUN_INFO allows to instruct Nextor to ignore devices when searching devices for automatic device to drive mapping (#54). - Fix: files can't have 3 or 4 in their names in DOS 1 mode (#55). - Fix: after booting directly yo BASIC by pressing 3, CALL SYSTEM doesn't work. - Fix: slot disable keys don't work on real MSX computers (#49). - Add: new boot key, pressing N at boot time disables all the Nextor kernels present. - Add: default DPB gets a fixed address of 7BAAh in banks 0 and 3, so it can be customized reliably. - Add: PROMPT routine made available to drivers at address 41E8h (#42). - Fix: the DOS 1 variables "data buffer changed" and "redirect console output to printer" were not zeroed when switching to DOS 1 mode at boot time. - Fix: can't change volume name when there are long filename entries in the root directory (#57). - Fix: absolute sector read/write functions not working properly when a file is mounted to a drive (#43). - Fix: bad sector buffer management when writing to a mounted file causing data corruption on the mounted file (#58). - Fix: drive parameters not updated on first access to a drive after a media change if the driver provides drive mapping via DRV_CONFIG, causing bad data read (#45).
Implemented in v2.1.0 ("ignore when auto-assigning" flag in LUN_INFO) |
The problem starts just at the system start: after DRV_CONFIG is finished, kernel tries to identify the contents of the media in the drives reading boot sectors, however as there's only one diskette drive and another one is phantom, this action causes messages
as kernel has no idea that these drive letters are the same physical drive. It is not possible to overcome at the driver level, and requires changes in the kernel.
Second issue, where to obtain current the letter of the current device to display the prompt: YF33F seems to contain invalid information when device enumeration is being performed (see prompt strings above - for all the devices enumerated YF33F has value of 0). However it seems to contain correct drive letter reference when booting is started.
Third issue, at some point in time (when booting is attempted) the PROMPT hook XF24F is set with jump to somewhere, and machine crashes. When device enumeration is performed before this event, the hook properly contains the RET.
On the pictures -Dx means calling the prompt checking routine for the device x. If prompt is going to be displayed, routine also displays contents of 3 bytes starting XF24F. The first pictures show C9C9C9, while second at the top shows jump to some address EAC6. The jump to this EAC6 ends at some Nextor kernel location displaying arbitrary strings from built-in FDISK application.
Also you can see as soon as booting process started and DOS2 is loaded, YF33F contains correct reference to device current number (as it starts displaying A: and B: in the prompt).
The text was updated successfully, but these errors were encountered: