tschak909 Posted May 16, 2020 Share Posted May 16, 2020 Certain DOS (MyDOS, SpartaDOS, etc.) implement binary load in the FMS, which means they'll be off limits to my N: device. Which means, I need to implement CIO commands 39 and 40. (WHY THE FUCK ARE THERE _TWO_ OF THEM?!) I think I have two options: (1) write my own little loader and shove into CIO handler. (2) figure out which DOS I am under, and call its handler on the open IOCB. Am I smoking crack? Which one is better? Is there a third option I haven't considered? -Thom Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 16, 2020 Share Posted May 16, 2020 Hi! 6 minutes ago, tschak909 said: Certain DOS (MyDOS, SpartaDOS, etc.) implement binary load in the FMS, which means they'll be off limits to my N: device. Which means, I need to implement CIO commands 39 and 40. (WHY THE FUCK ARE THERE _TWO_ OF THEM?!) I think I have two options: (1) write my own little loader and shove into CIO handler. (2) figure out which DOS I am under, and call its handler on the open IOCB. Am I smoking crack? Which one is better? Is there a third option I haven't considered? Best alternative is not implementing them, as probably nobody uses them anyway - because those are not standard I would say that no application actually uses them. Have Fun! Quote Link to comment Share on other sites More sharing options...
tschak909 Posted May 16, 2020 Author Share Posted May 16, 2020 (edited) sigh, and once again, you miss the point. I am implementing them. The reason is, if I try to load a binary file over N: in the DUP (or CPs) of these DOSes, IT WILL FAIL in these operating systems. ...with an Error 146 (not implemented.) I am trying to prevent this, and actually have it work for the user. Edited May 16, 2020 by tschak909 Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 17, 2020 Share Posted May 17, 2020 (edited) Hi! Quote sigh, and once again, you miss the point. I am implementing them. The reason is, if I try to load a binary file over N: in the DUP (or CPs) of these DOSes, IT WILL FAIL in these operating systems. ...with an Error 146 (not implemented.) I am trying to prevent this, and actually have it work for the user. Calm down I understood you. The problem is, you are trying to do something that is not really possible: be compatible with MyDOS and SpartaDOS at the same time. You already saw that the CIO command for "load binary file" is different between MyDOS and SpartaDos 3.x, so you can't support both. And if you keep trying, you will discover that MyDOS also cheats: the DUP first opens the file, reads the first two bytes checking for $FF/$FF, and then calls the XIO #39 command without closing the file. The handler knows this and start loading the binary segments right away. The reality is that the multiple Atari DOS were programmed assuming that there is only one "extended" CIO handler, so all operations assume that you use the "D :" handler. Have Fun! Edited May 17, 2020 by dmsc Quote Link to comment Share on other sites More sharing options...
Rybags Posted May 17, 2020 Share Posted May 17, 2020 Do your own, won't cost too much coding (maybe under 150 bytes) Or are you using some sort of dynamic load/relocate for your handler that would make sense to check Dos version and optionally exclude your own loader? Quote Link to comment Share on other sites More sharing options...
evilmoo Posted May 17, 2020 Share Posted May 17, 2020 7 hours ago, tschak909 said: Is there a third option I haven't considered? 3) Steal someone else's. Quote Link to comment Share on other sites More sharing options...
tschak909 Posted May 17, 2020 Author Share Posted May 17, 2020 Ok, so I'll try to implement my own, and see if I can implement both MyDOS and SpartaDOS binary loading. urgh. I seriously want to thwap the DOS authors for some of the stupid things i've uncovered. -Thom Quote Link to comment Share on other sites More sharing options...
+Stephen Posted May 17, 2020 Share Posted May 17, 2020 11 minutes ago, tschak909 said: Ok, so I'll try to implement my own, and see if I can implement both MyDOS and SpartaDOS binary loading. urgh. I seriously want to thwap the DOS authors for some of the stupid things i've uncovered. -Thom This is why some of us push for only using SDX moving forward. These machines did not start out with 1990 technology and code. They started in 1979 with DOS 1.0. Be happy we evolved from that to SDX 4.49, but don't try to support DOS 1.0 and SDX 4.49 in the same package, and be upset when there are incompatibilities. We've all learned to write better code these past 30 or 40 years. 1 Quote Link to comment Share on other sites More sharing options...
Alfred Posted May 17, 2020 Share Posted May 17, 2020 You might as well write your own loader, since you don't know if you'll be running under a version of DOS that even has one. It's pretty straight forward and with DOS to handle the i/o it ought to be on the short side. Maybe a couple hundred bytes or less. 1 Quote Link to comment Share on other sites More sharing options...
tschak909 Posted May 17, 2020 Author Share Posted May 17, 2020 Ok, makes sense. -Thom Quote Link to comment Share on other sites More sharing options...
thorfdbg Posted May 17, 2020 Share Posted May 17, 2020 14 hours ago, tschak909 said: Certain DOS (MyDOS, SpartaDOS, etc.) implement binary load in the FMS, which means they'll be off limits to my N: device. Dos 1.0 and Dos 2.0 did not have a XIO for binary load. The first Dos that provided one was Dos 3.0 by Atari at position XIO 41 (neither 39 nor 40 is correct). Unfortunately, Atari failed to include the same Xio in Dos 2.5 which came later. Quote Link to comment Share on other sites More sharing options...
+DjayBee Posted May 17, 2020 Share Posted May 17, 2020 (edited) 7 hours ago, tschak909 said: Ok, so I'll try to implement my own, and see if I can implement both MyDOS and SpartaDOS binary loading. Why don't you try @HiassofT's approach on relocation of the code? https://atariage.com/forums/topic/306336-dos-20-dup-overwrites-my-cio-handler Load a small stub which in a first step detects the running DOS and makes a SIO-call to Fujinet transmitting the running DOS. The second step then receives the 100% matching N:-handler from Fujinet for this particular DOS. If you cannot detect the DOS, have a fallback handler without the binary load component implemented. Edited May 17, 2020 by DjayBee fighting with formatting Quote Link to comment Share on other sites More sharing options...
tschak909 Posted May 17, 2020 Author Share Posted May 17, 2020 4 hours ago, DjayBee said: Why don't you try @HiassofT's approach on relocation of the code? https://atariage.com/forums/topic/306336-dos-20-dup-overwrites-my-cio-handler Load a small stub which in a first step detects the running DOS and makes a SIO-call to Fujinet transmitting the running DOS. The second step then receives the 100% matching N:-handler from Fujinet for this particular DOS. If you cannot detect the DOS, have a fallback handler without the binary load component implemented. That will probably be the approach I take. I'm not trying to make a one size fits all, I'm trying to map out all the DOS differences, so I can try to figure out how many potential versions of the handler I need to make, and then I can figure out what to send over. -Thom Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted May 17, 2020 Share Posted May 17, 2020 Afaik, MyDOS originally used XIO 39 for binary load, while SpartaDOS used XIO 40. Then MyDOS added XIO 40 for binary load to be somewhat Sparta compatible. (MyDOS now has two XIOs for binary load, XIO 39 and XIO 40.) In the end, both MyDOS and SpartaDOS support XIO 40 for binary load... see Atari Wiki Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 17, 2020 Share Posted May 17, 2020 Hi! 26 minutes ago, CharlieChaplin said: Afaik, MyDOS originally used XIO 39 for binary load, while SpartaDOS used XIO 40. Then MyDOS added XIO 40 for binary load to be somewhat Sparta compatible. (MyDOS now has two XIOs for binary load, XIO 39 and XIO 40.) In the end, both MyDOS and SpartaDOS support XIO 40 for binary load... see Atari Wiki But that is not the problem. What Thom is trying to do is that a binary load from MyDOS DUP works from the new "N:" device. And the DUP uses XIO 39 to load the file. Have Fun! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.