wwarthen / RomWBW

System Software for Z80/Z180/Z280 Computers
GNU Affero General Public License v3.0
330 stars 96 forks source link

V320RC3 - ZPM3 Named Directory scheme not working correctly when pointing to different user areas #324

Closed MorfeoMatrixx closed 1 year ago

MorfeoMatrixx commented 1 year ago

The following test sequence shows that something is not working correctly when using the Named Directory mechanism to change user areas. It worked just fine with V3.11pre40 that was the previous version I used and customized. Also failed in V320RC1, and also with standard generated disk image of ZPM3 without customization. It looks like something has changed in ZCPR3 from V3.11pre40 to V320RC1.

18:41 A0:SYS>sd: ---> Change to sd: that is pointing to J0: 18:42 J0:SD>sys: ---> Correctly changed to different drive and same user area 18:42 A0:SYS>root: ---> Intended change to root: that is pointing to A15: 18:42 A0:SYS>a15: ---> Not changing to same drive but different user area 15 here 18:42 A15:ROOT>sys: ---> Intended change to sys: that is pointing to A0: 18:42 A15:ROOT>j15: ---> Not changing to user area 0 here 18:43 J15:UPGRADE>sd: ---> Intended change to sd: that is pointing to J0: 18:43 J15:UPGRADE>a0: ---> Not changing to same drive but different user area 0 here 18:43 A0:SYS>j15: ..... and so on the same error pattern 18:44 J15:UPGRADE>root: 18:44 A15:ROOT>sys: 18:44 A15:ROOT>a0: 18:44 A0:SYS> 18:44 A0:SYS>

The custom named directory thet I used looks like this:


13:11 A0:SYS>editndr Command (? for help):

Entries - 12 Maximum - 12

DU : DIR Name - Password DU : DIR Name - Password


A 0: SYS - A 1: TEMP - A 3: MUSIC - A 5: GAMES - A 10: HELP - A 11: DEV - A 14: CONFIG - A 15: ROOT -

G 0: WS -

H 2: WS4 -

J 0: SD - J 15: UPGRADE -

Command (? for help): q

13:13 A0:SYS>

wwarthen commented 1 year ago

Hi @MorfeoMatrixx,

First, thank you for creating this issue. I don't have a solution, but thus far it is interesting.

I had no trouble recreating your symptoms. The only real change to ZPM in the timeframe you describe is that I replaced the ZPM core files (resbdos.spr & bnkbdos.spr) with ones that were patched to fix a few issues. When I reverted to the original ZPM core files, the named directory issue went away.

I am attaching the file that documents the fixes. I'm afraid this is a bit of a conundrum. The original core files have some known issues. However, the patched core files introduce the named directory issue described here. The patches came from Tilman Reh who spent a ridiculous amount of time doing a disassembly of ZPM3. I have a copy of the full set of disassembled source files.

If you are comfortable running the RomWBW build, you can confirm this for yourself. The original versions of resbdos.spr and bnkbdos.spr are saved in the Source/ZPM3 directory as resbdos.spr.bak and bnkbdos.spr.bak. The .bak files are the originals that have the issues documented in zpm3fix. You can switch back to the original files, run a build, and refresh your media.

So, this is not a RomWBW issue per se. I intend to take a quick look at this tomorrow, but I'm not going to spend days trying to figure this out. Are you (or anyone else) up for hunting this down??? I may be stuck trying to decide which version of the core files is "less" broken.

Thanks,

Wayne

zpm3fix.txt

MorfeoMatrixx commented 1 year ago

Hi Wayne, as always I have to thank you for your incredibly responsive support to ROMWBW users and all the colossal effort, care and devotion to make this distribution a fantastic software for the Z80/180/280 community of retrocomputing enthusiasts!

I can easily implement the fixes you describe so It's OK for me. As many others I'm eagerly waiting for V3.20 launch day (by the way will it include the very useful and cool front-panel switches boot options handling ?), so I think you shouldn't spend your scarce time now to fix this bug that as you say, it is not part of ROMWBW per se.

I have limited experience with Z80 assembly but I'll be happy to collaborate comparing sources to try to help isolate the problematic code maybe, if this is of any help. I can also test and document any test cases for potential fixes for this or any other thing that you could need help with. My platform is an SC-126 SBC loaded with may expansion boards (AY & SN sound, TMS9918A video, PPIDE, SIO+CTC, IDE, Floppy, etc.).

Regarding the usage of the Named Directory feature of ZCPR3, I think you could include in the next release the EDITNDR and SAVENDR programs that I downloaded somewhere that work just fine to make the NDR useful (I can document usage if needed). I also compiled and customized the SD program (Super Directory ?) that I consider is one of the best enhanced Dir apps for ZPM3. By using it you can list all your media in every drive and user area at once (including Library members!) to obtain a complete Catalog of files referenced with Named Directories.

Kind regards, Jose Luis.

wwarthen commented 1 year ago

Hi Wayne, as always I have to thank you for your incredibly responsive support to ROMWBW users and all the colossal effort, care and devotion to make this distribution a fantastic software for the Z80/180/280 community of retrocomputing enthusiasts!

I sincerely appreciate your thoughts!

I can easily implement the fixes you describe so It's OK for me. As many others I'm eagerly waiting for V3.20 launch day (by the way will it include the very useful and cool front-panel switches boot options handling ?), so I think you shouldn't spend your scarce time now to fix this bug that as you say, it is not part of ROMWBW per se.

I am going to leave this bug open for now. I don't expect a fix to be incorporated in v3.2. As you say, a user can pick their preferred ZPM core files as desired.

I committed to a soft-freeze of the code base before the front-panel switch concept came along. So, sadly, that feature will not be in v3.2 However, I can assure you that there will be another release with the front panel support very soon afterwards. The long delay in getting v3.2 out was due to the extensive documentation updates needed that I kept putting off. Going forward, I expect to produce new releases on a much faster timescale.

I have limited experience with Z80 assembly but I'll be happy to collaborate comparing sources to try to help isolate the problematic code maybe, if this is of any help. I can also test and document any test cases for potential fixes for this or any other thing that you could need help with. My platform is an SC-126 SBC loaded with may expansion boards (AY & SN sound, TMS9918A video, PPIDE, SIO+CTC, IDE, Floppy, etc.).

Thanks. Unfortunately, I only have the patched source. I do not have the un-patched source to compare it with. This makes it much harder to find the problem because you cannot just compare the sources. Sigh. The patched sources can be found at http://cpmarchives.classiccmp.org/cpm/mirrors/www.triton.vg/TesseractRCPM+Catalog.html#vol93.

Regarding the usage of the Named Directory feature of ZCPR3, I think you could include in the next release the EDITNDR and SAVENDR programs that I downloaded somewhere that work just fine to make the NDR useful (I can document usage if needed). I also compiled and customized the SD program (Super Directory ?) that I consider is one of the best enhanced Dir apps for ZPM3. By using it you can list all your media in every drive and user area at once (including Library members!) to obtain a complete Catalog of files referenced with Named Directories.

EDITNDR.COM and SAVENDR.COM are included on the NZ-COM drive. The original ZPM3 distribution did not really come with any "official" supporting files. As a result, the RomWBW ZPM3 drive contents are a bit of a hodgepodge. I will add EDITNDR and SAVENDR. There is a copy of SDZ.COM on the NZ-COM drive. I understand this to be a refinement of SD.COM I will also add this to the ZPM3 drive contents. Let me know if you have enhancements to the existing SDZ.COM that I should consider.

Thanks,

Wayne

wwarthen commented 1 year ago

Hi @MorfeoMatrixx,

I think I have patched the problem. When convenient, can you try Release v3.2.0-rc.6.

This is a patch on top of the patches that caused the problem, so it should be the optimal version of ZPM3 at this point.

Thanks,

Wayne

MorfeoMatrixx commented 1 year ago

Hi Wayne, tested and worked perfectly, huge thanks !

11:49 A0:SYS>root: 11:49 A15:ROOT>sd: 11:49 J0:SD>upgrade: 11:49 J15:UPGRADE>dev: 11:50 A12:DEV>sys: 11:50 A0:SYS> 11:52 A0:SYS> VT102 Offline [ALT-Z]-Menu 57600 8N1 FDX 8 LF ? ? CP LG ? 11:52:00

Regards, JL.

wwarthen commented 1 year ago

Excellent. I am happily closing this issue.

Thanks for your help @MorfeoMatrixx.

-Wayne

erikarn commented 1 year ago

hi! since i hit this issue too, do you have the source patch to that ZPM distribution? I see you uploaded the updated SPR files, but you're not keeping the ZPM3 source + modifications anywhere?

Thanks!

wwarthen commented 1 year ago

Hi @erikarn,

Sorry, I should have added a comment here. I have created a separate repository for some of the applications distributed with RomWBW. I did this because the RomWBW repository was getting very large. Anyway, please see the wwarthen/CPMBuilds Repository. One of the subdirectories is ZPM3. The initial commit is the original code distribution as it was provided to me. You can review the history of the commits in this repository and you will see the changes I made.

Let me know if this is sufficient for your needs.

Thanks,

Wayne

erikarn commented 1 year ago

Neat, thanks!

-adrian

Message ID: @.***>