Qwe Posted October 20, 2016 Share Posted October 20, 2016 Hi friends,is there somebody who knows how to show a sector counter while the program is loading? Quote Link to comment Share on other sites More sharing options...
Xuel Posted October 20, 2016 Share Posted October 20, 2016 An XEX won't know what DOS or media it's loading from so it there's no general way to show a sector counter. However, you could break the XEX into many approximately sector-sized segments with INI segments in between. Each INI segment could call a routine to update a "sector" counter. That routine would be in one of the first segments that's loaded at the start of the XEX. The downside is that all these segments may cause inefficient disk reading behavior with possible redundant sector reads in some DOSes. Big segments usually load more efficiently. If you create an ATR, you can write your own DOS which can show the sector counter efficiently. But many people prefer XEXs since they don't tie you to Floppy Disk hardware or emulations thereof. Quote Link to comment Share on other sites More sharing options...
xxl Posted October 20, 2016 Share Posted October 20, 2016 with xB (http://xxl.atari.pl/) it easy. xBUFSIZE stores sector size. xSEGMENT - amount of data to load. with this, you can calculate how many sectors file has. change of sectors check in variable xDAUX1 / 2 but simplest base on data in xSEGMENT. like this: 2 Quote Link to comment Share on other sites More sharing options...
Rybags Posted October 21, 2016 Share Posted October 21, 2016 That has a potentiall big colour change area, how does it handle IRQs at that time? Or is it using SIO polling method. Another idea is the progress bar - it can be done by using some of the calculations of the Bresenham's line-draw algorithm to determine what the current X-pos of the line should be, given that you know the current buffer full state vs what it will be on full load. Quote Link to comment Share on other sites More sharing options...
xxl Posted October 21, 2016 Share Posted October 21, 2016 Or is it using SIO polling method. yes, polling ( jsr xBIOS_SET_DEFAULT_DEVICE ) Quote Link to comment Share on other sites More sharing options...
Qwe Posted October 21, 2016 Author Share Posted October 21, 2016 Hi,Thanks for your answers.I though I did not understand properly, I was convinced that it was a resident task.Is there no way to have an example commented in English? I don't know Polish. Quote Link to comment Share on other sites More sharing options...
Rybags Posted October 21, 2016 Share Posted October 21, 2016 (edited) How it's implemented can depend on how the program loads and what media it's on. In the old days the media was either floppy or tape in almost all cases and turbo loading was a rarity. But today we have the IDE class devices and turbo SIO is more common than standard. Plus you have boot media vs executable file which in itself might be via simple boot menu, more complex boot menu or full blown Dos. File loads are somewhat hard since you don't have any idea what the origin sector will be or what speed the data is coming down at. Another possible method could be a short VBlank routine that monitors landmark memory locations where you know what data is expected then updates a progress meter or counter to suit. It's not like you need exact 10th of a percantage accuracy, few progress meters even in the modern day are like that. Something that updates every 5% would be more than enough. Edited October 21, 2016 by Rybags Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted October 21, 2016 Share Posted October 21, 2016 question is for what do you need a sector counter... to show how long it takes to load? or something else? because checking the change of the sector registers of OS could trigger a counter. Quote Link to comment Share on other sites More sharing options...
Rybags Posted October 21, 2016 Share Posted October 21, 2016 With file load by Dos or menu though you don't have the determination of what sector size is in use (could easily enough be deducted with a few closely packed Init segments). Also you don't know the file ordering. A sector jump might take place e.g. from 100 to 300 in the space of 2 records but be due to fragmentation, not load speed. I think - with specific media (disk) boot you're close to the hardware anyway and telling it directly what sectors you want which makes a counter easy. With file based loads you're going through unknown layers of abstraction so the way to go would be landmark monitoring of pieces of memory. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted October 21, 2016 Share Posted October 21, 2016 in Arsantica etc I only implemented sector counter loader... because it was released as ATRs so I new the layout and in Arsantica 3 I even had a custom IO loader so again... full control. Quote Link to comment Share on other sites More sharing options...
snicklin Posted October 21, 2016 Share Posted October 21, 2016 Hi, Thanks for your answers. I though I did not understand properly, I was convinced that it was a resident task. Is there no way to have an example commented in English? I don't know Polish. It isn't an example, but at the start of this year I got all the different xBIOS documents at the time, translated them (with Google Translate) where it was required, cleaned them up and put them together into this: https://atariwiki.org/wiki/Wiki.jsp?page=XBIOS I'm not expert in xBios myself so feel free to update the documents if you would like to, though you'll need to get an AtariWiki account. 4 Quote Link to comment Share on other sites More sharing options...
+Larry Posted October 22, 2016 Share Posted October 22, 2016 That's great, Snicklin. I've been interested in xbios, but severely handicapped by being "Polish language challenged!" Thanks for the link and your translation efforts. Larry 1 Quote Link to comment Share on other sites More sharing options...
Mclaneinc Posted October 22, 2016 Share Posted October 22, 2016 Is this a standard size font sector counter or are you looking for a big Demo type counter? Also are you talking BASIC or Machine code? A machine code one should be pretty easy if its a standard normal size font one, as long as you know sector number, loading location and can do the simple incremental maths with a simple routine that updates your display then its not a huge task, I remember doing it many years ago for a disk copier I wrote (was a 2 drive copier simultaneous r/w rather than read X sectors and then write x sectors and it really was quite rubbish Paul.... 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.