janzh Posted May 30, 2023 Share Posted May 30, 2023 I did an update to address the performance issue @Ricky Spanish reported. https://github.com/HolgerJanz/BW-DOS Feedback welcome. @Ricky Spanish Please could you check whether it is helping in your cases, too. During my tests the performance profile is much better now. There are still delays if you delete two files with a great sector distance e.g., file1 sector 100-110 and file2 sector 10100-10110, and than write a file larger than file1. In this case there will be a delay for finding the next gap after sector 100-110 (assuming that there is no other gap until sector 10100-10110). According the key click: In the STARTUP.BAT on the BW-DOS 1.4 ATR there is the line: POKE 02DB FF This switch off the key click. The key click is reinitialized by OS after reset. You can just type in this poke again to switch it off. 3 Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 30, 2023 Share Posted May 30, 2023 Hi! 2 hours ago, janzh said: I did an update to address the performance issue @Ricky Spanish reported. https://github.com/HolgerJanz/BW-DOS Feedback welcome. @Ricky Spanish Please could you check whether it is helping in your cases, too. During my tests the performance profile is much better now. There are still delays if you delete two files with a great sector distance e.g., file1 sector 100-110 and file2 sector 10100-10110, and than write a file larger than file1. In this case there will be a delay for finding the next gap after sector 100-110 (assuming that there is no other gap until sector 10100-10110). I see, now you set the last alloc sector number to the first sector deleted, before it was set to 1/16 of the total number of sectors. Don´t see how the previous logic made sense, the new logic is a lot better. But, I think that it would be worth testing a different logic: simply keep the last-alloc sector unchanged on file deletion. That would mean that new files will always be appended on disk, up until the disk is full, where the allocation would start at the beginning again. This would make sense when the disk is big and the usage is low. Have Fun! Quote Link to comment Share on other sites More sharing options...
Ricky Spanish Posted May 30, 2023 Author Share Posted May 30, 2023 8 hours ago, janzh said: Please could you check whether it is helping in your cases, too. Works beautifully ! Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 31, 2023 Share Posted May 31, 2023 Hi! I was able to assemble the original sources using XATMAS2, from https://github.com/ivop/xatmas2 , after some fixes to the cross-assembler (available in a pull-request). The sources were split (to allow editing on the Atari) using fixes labels, it was probably a lot of work to edit one file, assemble, lookup the labels and update the rest of the sources by hand... probably it would be better now to simply concatenate the sources in one big file. @janzh, do you plan on updating your disassembled sources with the labels from the original sources? Have Fun! 1 Quote Link to comment Share on other sites More sharing options...
janzh Posted May 31, 2023 Share Posted May 31, 2023 20 hours ago, dmsc said: Don´t see how the previous logic made sense, the new logic is a lot better. But, I think that it would be worth testing a different logic: simply keep the last-alloc sector unchanged on file deletion. That would mean that new files will always be appended on disk, up until the disk is full, where the allocation would start at the beginning again. This would make sense when the disk is big and the usage is low. The 1/16 logic works for floppy disks SS-DD. The sectors at the beginning are spared for directories (to keep them locally together for fast search because for real disk drives the sectors should be on the same track) and the rest is for files. The whole sector map of this disk formats fits in one sector (OK for MD one sector plus something) so long distance between sectors cannot be appear. If you habe a 16MB hard disk partition then there are 32 sectors for the sector map. If most of the data wont be changed (because most of them are programs, archives, game collection etc.) and only some data are changed (e.g. a folder where I compile the BW-DOS sources) then the task is to keep the files that are changed together so that no long distances between freed sectors occur. If one further assume that there are in general no big changes to the files (e.g. like the change I did to the BW-DOS sources for this correction) then most of the time the changed file will fit into the sectors that have been freed by deleting it before. So that was my ration to take the first sector of the last delete operation. Quote Link to comment Share on other sites More sharing options...
janzh Posted May 31, 2023 Share Posted May 31, 2023 15 hours ago, Ricky Spanish said: Works beautifully ! Fine. If you see any other issue just drop a post here or PM. 1 Quote Link to comment Share on other sites More sharing options...
janzh Posted May 31, 2023 Share Posted May 31, 2023 10 hours ago, dmsc said: do you plan on updating your disassembled sources with the labels from the original sources? I have not thought of it before but it sounds like a good idea. So one can better follow how the sources have been changed. I will do it. 2 Quote Link to comment Share on other sites More sharing options...
janzh Posted May 31, 2023 Share Posted May 31, 2023 10 hours ago, dmsc said: The sources were split (to allow editing on the Atari) using fixes labels, it was probably a lot of work to edit one file, assemble, lookup the labels and update the rest of the sources by hand... probably it would be better now to simply concatenate the sources in one big file. If you have combined sources for the original BW-DOS 1.3 that can be cross compiled then it would be great gain. If you like then I can add them to the GitHub repository in the folder for BW-DOS 1.30. The original BW-DOS 1.3 was first loaded to area around $3000 and then copied to $700. This has the advantage you could just start the BW-DOS from any other DOS just by calling it. I used this for my The!Cart (https://www.wudsn.com/index.php/productions-atari800/tools/thecart) experiment. You can just put it on the cartridge like an executable. Furthermore I made a PoC to use The!Cart like a "flash disk" and the extra RAM like a hard disk partition for changing data and flashing the "flash disks". I called it BW-DOS 1.31 TC. https://github.com/HolgerJanz/RAMCART/tree/master/BW-DOS 3 Quote Link to comment Share on other sites More sharing options...
dmsc Posted May 31, 2023 Share Posted May 31, 2023 Hi! 42 minutes ago, janzh said: If you have combined sources for the original BW-DOS 1.3 that can be cross compiled then it would be great gain. If you like then I can add them to the GitHub repository in the folder for BW-DOS 1.30. Attached is the "extracted" sources, I used my mkatr tool and zip, this preserves the file and folder dates: mkdir bwdos-original-sources lsatr 'BW-DOS 1.30 Sources.atr' -l -X bwdos-original-sources/ zip -9r bwdos-original-sources.zip bwdos-original-sources/ I'm preparing a repo with the source history - just give about a week to finish it. The original source includes code to patch the assembled binaries to fix limitations of the ATMAS assembler, as it does not have an "EXOR" operator for it´s expressions. So, if you assemble with xatmas2, you have to manually patch the resulting binary. IMHO, it would be easier to simply convert the sources to be able to assemble with MADS. So, my plan is to have a repo with a commit for each new version, and then a commit with the adaptation to MADS. 42 minutes ago, janzh said: The original BW-DOS 1.3 was first loaded to area around $3000 and then copied to $700. This has the advantage you could just start the BW-DOS from any other DOS just by calling it. I used this for my The!Cart (https://www.wudsn.com/index.php/productions-atari800/tools/thecart) experiment. You can just put it on the cartridge like an executable. Furthermore I made a PoC to use The!Cart like a "flash disk" and the extra RAM like a hard disk partition for changing data and flashing the "flash disks". I called it BW-DOS 1.31 TC. https://github.com/HolgerJanz/RAMCART/tree/master/BW-DOS The other advantage of loading at $3000 is that you can load a DOS from another, to replace the running one. This allows you to load different versions of BW-DOS as needed. Have Fun! bwdos-original-sources.zip 1 Quote Link to comment Share on other sites More sharing options...
ivop Posted May 31, 2023 Share Posted May 31, 2023 14 hours ago, dmsc said: Hi! I was able to assemble the original sources using XATMAS2, from https://github.com/ivop/xatmas2 , after some fixes to the cross-assembler (available in a pull-request). The sources were split (to allow editing on the Atari) using fixes labels, it was probably a lot of work to edit one file, assemble, lookup the labels and update the rest of the sources by hand... probably it would be better now to simply concatenate the sources in one big file. @janzh, do you plan on updating your disassembled sources with the labels from the original sources? Have Fun! Thanks for the fixes to xatmas2! Merged them to master. Note that it was originally written by Richard Jackman. I picked it up six years ago, did a lot of cleaning up, and put it on github. Glad to see it received some fixes now. The wonders of open source 3 Quote Link to comment Share on other sites More sharing options...
Marius Posted May 31, 2023 Share Posted May 31, 2023 Wow this turns out to be an amazing topic! Nice to read about the problem I described, and I keep my fingers crossed for fixed. I remember I used BW DOS also quite a lot in the beginning of the MyIDE developed by @mr-atari when I had not the MyBIOS in Rom yet. Man, what a wonderful time was that. Using MyIDE with a booted OS from floppy disk and then booting BEWEDOS partitions from the MyIDE interface. It was a wonderful time. I used it quite a lot. I am so happy to see that BEWEDOS is still alive (or alive again). Speaking of the author... in the AssKicker Demo there is this hidden part. That demo was also written by him. I love that demo. Nice tune and such a funny story about those multitasking effects. Also very nice to see the Bewesoft LOGO in the scroller. Greetz Marius 1 Quote Link to comment Share on other sites More sharing options...
+CharlieChaplin Posted May 31, 2023 Share Posted May 31, 2023 2 hours ago, Marius said: Speaking of the author... in the AssKicker Demo there is this hidden part. That demo was also written by him. I love that demo. Nice tune and such a funny story about those multitasking effects. Also very nice to see the Bewesoft LOGO in the scroller. Greetz Marius Simply hold down SELECT when booting Asskicker to load this hidden demo. Or boot the fileversion of it... HIDPART.xex 3 Quote Link to comment Share on other sites More sharing options...
dmsc Posted June 6, 2023 Share Posted June 6, 2023 Hi! On 5/31/2023 at 7:49 AM, janzh said: If you have combined sources for the original BW-DOS 1.3 that can be cross compiled then it would be great gain. If you like then I can add them to the GitHub repository in the folder for BW-DOS 1.30. The original BW-DOS 1.3 was first loaded to area around $3000 and then copied to $700. This has the advantage you could just start the BW-DOS from any other DOS just by calling it. I used this for my The!Cart (https://www.wudsn.com/index.php/productions-atari800/tools/thecart) experiment. You can just put it on the cartridge like an executable. Furthermore I made a PoC to use The!Cart like a "flash disk" and the extra RAM like a hard disk partition for changing data and flashing the "flash disks". I called it BW-DOS 1.31 TC. https://github.com/HolgerJanz/RAMCART/tree/master/BW-DOS I created two repos on github: - https://github.com/dmsc/bwdos-original : This is the repo with the original sources, one tag for each version. The only modification to the sources is the conversion of the line endings from orignal "CR" line endings to modern "LF" ones. This allows the github interface to show the diffs from each version. For example, you can see that the changes from 1.0 to 1.1 are minimal: https://github.com/dmsc/bwdos-original/commit/8fa47d61c1c04797ee2b79d0afbcacb434d5f46e - https://github.com/dmsc/bwdos-mads : This repo is my work in progress to convert the sources to MADS syntax. I already converted the DOS (split in four files) and half of the utilities. See the README for details. Have Fun! 3 2 Quote Link to comment Share on other sites More sharing options...
janzh Posted June 6, 2023 Share Posted June 6, 2023 12 hours ago, dmsc said: I created two repos on github: - https://github.com/dmsc/bwdos-original : This is the repo with the original sources, one tag for each version. The only modification to the sources is the conversion of the line endings from orignal "CR" line endings to modern "LF" ones. This allows the github interface to show the diffs from each version. Thanx! That is cool for references. BTW - I just convert your MADS source of XL Rev 2 to FastAssembler than you can compile the OS on a real Atari. 1 Quote Link to comment Share on other sites More sharing options...
dmsc Posted June 7, 2023 Share Posted June 7, 2023 Hi! So, I completed the conversion, and included a Makefile to easily recreate all the files in the original disk of BW-DOS 1.3: https://github.com/dmsc/bwdos-mads I included a little C program that recreates the "protection" in some of the original programs, this is simply EOR of the code with the constant $55 that was performed after assembly in the original sources. From the README over github: Description of the files DOS Sources, those are assembled using the ASM file that includes all the parts: dos/bwdos.asm dos/bwdosa.src dos/bwdosb.src dos/bwdosc.src dos/bwmac.src dos/comtab.src Standard tools, those are assembled directly: utils/bload.src utils/boot.src utils/chkdsk.src utils/chvol.src utils/copy.src utils/cut.src utils/date.src utils/dirmast.src utils/disass.src utils/dump.src utils/else.src utils/endif.src utils/format.src utils/hexedit.src utils/if.src utils/mdump.src utils/mem.src utils/memedit.src utils/move.src utils/msdos.src utils/msini.src utils/newed.src utils/offload.src utils/pause.src utils/save.src utils/time.src utils/unerase.src utils/verify.src utils/xbat.src The following utilities are multi-part sources, and must be assembled with the stub that includes all parts: utils/backup.asm utils/bk_a.src utils/bk_b.src utils/menu.asm utils/menu_a.src utils/menu_b.src utils/menu_c.src And the following utilities were "protected" in the original distribution by exclusive-or-ing the program in the file with the constant $55. After assembling those, there is a little C program that generates the protected binary from the unprotected one: utils/argsprn.src utils/argsrtc.src utils/autocwd.src utils/clock.src utils/dosdrive.src utils/keybuff.src utils/rambox.src utils/ramdisk.src utils/rtime8.src utils/xfsio.src utils/xlrdisk.src From here, I would like to include all the changes that @janzh made in his 1.4 version to have an "universal" source, and then remove the "protection" to produce smaller binaries. Have Fun! 2 Quote Link to comment Share on other sites More sharing options...
dmsc Posted June 7, 2023 Share Posted June 7, 2023 Hi! 10 hours ago, janzh said: Thanx! That is cool for references. BTW - I just convert your MADS source of XL Rev 2 to FastAssembler than you can compile the OS on a real Atari. Mmmm.... what sources? Have Fun! Quote Link to comment Share on other sites More sharing options...
sanny Posted June 7, 2023 Share Posted June 7, 2023 On 6/6/2023 at 6:20 AM, dmsc said: - https://github.com/dmsc/bwdos-original : This is the repo with the original sources, one tag for each version. You mean one commit for each version? I don't see tags there. Quote Link to comment Share on other sites More sharing options...
dmsc Posted June 7, 2023 Share Posted June 7, 2023 Hi! 3 hours ago, sanny said: You mean one commit for each version? I don't see tags there. I meant tags, but forgot to push them 😛 . Now the tags are there: https://github.com/dmsc/bwdos-original/tags I'm planning to upload the binary releases on github for each tag. Have Fun! Quote Link to comment Share on other sites More sharing options...
janzh Posted June 8, 2023 Share Posted June 8, 2023 On 6/7/2023 at 5:04 AM, dmsc said: From here, I would like to include all the changes that @janzh made in his 1.4 version to have an "universal" source, and then remove the "protection" to produce smaller binaries. I tried to merge but was not lucky. The changes from 1.30 to 1.40 are very big. My starting point was this disassembly: https://github.com/HolgerJanz/BW-DOS/blob/31b91c96007fd20901981b0e1260066ce3cfec28/1.30/XBW130.ASM Then there have been a lot of changes. Roughly: - made the sources FastAssembler compatible so you can compile BW-DOS on a real Atari (see https://github.com/HolgerJanz/FastAssembler) - removed the loader to $36xx and copy step to $700 - several changes to make the code more readable - remove obfuscating of starting text - remove jump to cartridge at start up - set left margin always to 0 - change the name auf the internal commands - introduce command MAN - introduce vector BW_FAIL like U_FAIL on SpartaDOS X (see next point) - rearrange coding to move COMTAB to page 700 and introduce absolute addressing to COMTAB (this made it easier to write the SDXLIB for FastAssembler) - change of several heuristics for better handling of large partitions (the last one was the performance issue see above) That are the things I can remember. 1 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted June 8, 2023 Share Posted June 8, 2023 I'm still unable to properly understand the workings of the general purpose MOVE subroutine, but while playing with the code which pulls in-line arguments off the stack, I made a few changes which save a few bytes: .proc GetArg stx SaveX+1 sty SaveY+1 tsx inc $0103,x ; bump LSB of PC ldy $0103,x sne inc $0104,x ; bump MSB of PC lda $0104,x sta Adr+2 Adr lda $ff00,y SaveX ldx #0 SaveY ldy #0 rts .endp I can't see that this breaks anything aside from stack wrap-around (by which point the thing would probably have crashed anyway), but if I overlooked something, let me know. 1 Quote Link to comment Share on other sites More sharing options...
sanny Posted June 8, 2023 Share Posted June 8, 2023 What is "sne"? Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted June 8, 2023 Share Posted June 8, 2023 5 minutes ago, sanny said: What is "sne"? Sorry - 'skip next instruction if not equal'. MADS macro. Quote Link to comment Share on other sites More sharing options...
janzh Posted June 8, 2023 Share Posted June 8, 2023 Macro Command of MADS https://www.mads.atari8.info/mads_eng.html#makrorozkazy Quote Link to comment Share on other sites More sharing options...
janzh Posted June 8, 2023 Share Posted June 8, 2023 35 minutes ago, flashjazzcat said: I'm still unable to properly understand the workings of the general purpose MOVE subroutine, but while playing with the code which pulls in-line arguments off the stack, I made a few changes which save a few bytes: Really cool! I took your change and my first smoke tests are fine. I will check further and if all tests OK then I will commit this change to 1.4. @flashjazzcat OK, if I take your IP? Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted June 8, 2023 Share Posted June 8, 2023 Great - no worries. 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.