-
Notifications
You must be signed in to change notification settings - Fork 32
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
MEGA65: Refactor how image mounting works #367
Comments
@lgblgblgb In version of December 21, 2021 I could reach this: In later versions this config is a white page. Could it be that those unreachable settings have impact on what is in the issue description? |
@nobruinfo Thanks for the report. Some points here:
Really, the only problem here, that The |
@lgblgblgb I see. Let us track the white screen thing as a separate ticket #368. To 4.: But if a save a BASIC programme to the disk in U8 wouldn't this end up in |
From Discord: One suggestion you can try though it's a highly work-in-progress stuff: enable HDOS virtualization, you can do it from the UI menu as well (in advaned/debug). Then try DIR U12. What you will see hopefully at this point that it shows the hdos sub-dir (or hdos-root depending on your version of Xemu) content in your preferences directory (if you don't know where it is: UI menu again then debug/advanced -> browse system folder). At this point you don't even need to deal with the sd-card image at all. You can just put D81s into that directory, and you'll see its content immediately with DIR U12 and you should be able to mount it as well with the BASIC65 MOUNT command. Though again, it's a relative new and unfinished area of Xemu, some HDOS calls won't work when using HDOS virtualization like loading files directly from SD-card then (not from a mounted D81).
Please correct me if I did this wrong. Otherwise if this way the hard coded EXTERNAL.D81 mount cannot be worked around it is simply how it is. We can leave this ticket open until anyone comes up with new ideas. WINDOWS: console is open HDOS: entering function #$12 (opendir) A=$12 X=$00 Y=$00 Z=$00 HDOS: VIRT: returning OK (A=$00) from virtualized function #$12 bypassing Hyppo HDOS: leaving function #$12 (opendir) with carry SET (A,X,Y,Z=$00,$00,$00,$00) HDOS: VIRT: was marked as virtualized, so end of opendir in hdos_leave() HDOS: entering function #$14 (readdir) A=$14 X=$00 Y=$13 Z=$00 HDOS: VIRT: hdos_virt_readdir(): accepted filename = "mega65.d81" HDOS: VIRT: returning OK (A=$14) from virtualized function #$14 bypassing Hyppo HDOS: leaving function #$14 (readdir) with carry SET (A,X,Y,Z=$14,$00,$13,$00) HDOS: VIRT: was marked as virtualized, so end of readdir in hdos_leave() HDOS: entering function #$14 (readdir) A=$14 X=$00 Y=$13 Z=$00 HDOS: VIRT: hdos_virt_readdir(): end-of-directory HDOS: VIRT: returning ERROR (A=$85) from virtualized function #$14 bypassing Hyppo HDOS: leaving function #$14 (readdir) with carry CLEAR (A,X,Y,Z=$85,$00,$13,$00) HDOS: VIRT: was marked as virtualized, so end of readdir in hdos_leave() HDOS: entering function #$16 (closedir) A=$16 X=$00 Y=$13 Z=$00 HDOS: closing directory descriptor #$00: 0 HDOS: VIRT: returning OK (A=$16) from virtualized function #$16 bypassing Hyppo HDOS: leaving function #$16 (closedir) with carry SET (A,X,Y,Z=$16,$00,$13,$00) HDOS: VIRT: was marked as virtualized, so end of closedir in hdos_leave() HDOS: entering function #$2E (setname) A=$2E X=$00 Y=$04 Z=$00 HDOS: VIRT: unvirtualized DOS function #$2E pass-through to Hyppo HDOS: leaving function #$2E (setname) with carry SET (A,X,Y,Z=$2E,$00,$04,$00) HDOS: setname: selected filename is [mega65.d81] from $0400 HDOS: entering function #$40 (d81attach0) A=$40 X=$08 Y=$0B Z=$00 SDCARD: D81: sdcard_force_external_mount(0, "C:\Users\Superuser\AppData\Roaming\xemu-lgb\mega65\hdos\mega65.d81", "(null)"); SDCARD: D81: external mount #0 but no change, "C:\Users\Superuser\AppData\Roaming\xemu-lgb\mega65\hdos\mega65.d81" = "C:\Users\Superuser\AppData\Roaming\xemu-lgb\mega65\hdos\mega65.d81" HDOS: VIRT: mount of image "C:\Users\Superuser\AppData\Roaming\xemu-lgb\mega65\hdos\mega65.d81" on unit 0 went well. HDOS: VIRT: returning OK (A=$40) from virtualized function #$40 bypassing Hyppo HDOS: leaving function #$40 (d81attach0) with carry SET (A,X,Y,Z=$40,$08,$0B,$00) HDOS: VIRT: was marked as virtualized, so end of d81attach0 in hdos_leave() |
@lgblgblgb Ahh, dang. I made a mistake. This looks like the perfect workaround to me. I'm now investigating this further. So please forget my before post. Thank you for the advice you made. |
@nobruinfo Yeah, tricky, since The disk image "title" says In my opinion, 99% of people would be happy with HDOS virtualization used by default so they don't need to deal with the SD-card image at all, anymore (let alone this kind of bug like this whole issue we're in, for example). The only reason it's not the default, that it has some problems with certain |
@lgblgblgb Yesterday evening I for myself came to similar conclusions and as I wanted to share with you Today I read your last post in here. Yes, to me I think we need to take care of testing, right? Pre-attaching and having .d81 stitched is neither the real hardware's behaviour as you already stated, nor is it something that we would confront beginners with. But somehow this made it as the default, funny. So we're simply at a point of many-year-development where such things might be for a change. One that certainly had to be discussed in the Mega's committee. Speaking of which, not yet in Discord for Today, Yesterday I got the impression from Gürçe he could have had the same line of thoughts while implementing the intro disk 2. Funny number two. ;) And for the last your first paragraph: Yes, EXTERNAL.D81 being not the same as "EXTERNAL" as a title really caught me, ha ha. Now all good. |
@nobruinfo The reason "HDOS virtualization" is not yet the default: it's incomplete and may fault badly in case of some programs wants to do more than just using MOUNT/UMOUNT |
@lgblgblgb I'm not expecting As a matter of fact my first KickC tests were possibly unsuccesful because of the now state of things. But I'm still unsure as I see assembly projects like Manche making full use of navigating withing the SD card using hyppo traps. — On the other hand, I haven't seen this working for me in Xemu. Will investigate in this aswell, this time for me on the low prio side. |
@nobruinfo Just to make it clear, partly I do these issues for myself too, since I can easily forget the process of some fix, feature, etc later, especially if needed a year from now (even if it's closed, can be seen/searched). So when I wrote "HDOS virtualization" is not made default, I didn't mean you expect that etc, I expect that to be the default, ie I am on that road ;) |
@lgblgblgb I think I got you right in the first place. – I wanted to test-compare my little C-programmes Yesterday. Wanted to find out whether they behave differently doing file access things with or without |
Some effects of this change: * Writing FDC-mount-related registers not from hyppo has no effect, expect for the "umounting" case as it seems ROM uses that * Mounting via CLI opt (of cfg file) has delayed effect till the first "reset trap" finished
It seems - for whatever unknown reasons - HDOS instructs R/O mounts when HDOS virtualisation is turned off (ie, D81 mounts from the - emulated - SD-card). No idea why it happens, but here it is a quick workaround which forces R/W mount, rehardless of whatever HDOS want to do. Part of #367
Is your feature request related to a problem? Please describe.
Steps to reproduce:
MOUNT"MEGA65.D81"
and hitReturn
EXTERNAL.D81
-8
the commandMOUNT
is not considered.MOUNT
is not considered.Describe the solution you'd like
-8
should be a preselection for a.D81
disk image..D81
disk image.MOUNT
commands (no matter whether issued from assembly language or BASIC) should re-attach unit 8.MOUNT
with no options should re-attachEXTERNAL.D81
as there is no internal drive in Xmega65.Describe alternatives you've considered
If it is not possible to image mount on the emulators level the now existing behaviour maybe could be slightly improved by simply exchange
EXTERNAL.D81
on the emulator's level. To do so maybe a CLI option for Xmega65 could be the solution.Additional context
See the now behaviour in this video:
mountfailcurrentvanillaimg.mp4
The text was updated successfully, but these errors were encountered: