10 June 2009, 11:44 | #1 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
ASMOne: Sectors and Tracks
Gentlemen,
I'm a little bit confused about the terms 'track' and 'sector' as used by ASMOne in relation to the Amiga floppy disk geometry of a DD disk described here: http://lclevy.free.fr/ Based on the info from the ASMOne guide (V1.4x) I come to the following conclusion: Sector: From the ASMOne guide: "The Amiga floppy disk (880 Kb formatted) has 1760 sectors. Each sector is 512 bytes in size". A sector in ASMOne is what they call a block on the website. So a RS command with offset = 22 and length = 11 would read 11 * 512 bytes from cylinder 1, side 0 (up). Track: From the ASMOne guide: "The Amiga floppy disk (880 Kb formatted) has 80 tracks. Each divided into 11 sectors." That makes 880 sectors, only half of the 1760 they mentioned before. I think what they call tracks in ASMOne they call cylinders on the website and the ASMOne guide should really state: "The Amiga floppy disk (880 Kb formatted) has 80 tracks (cylinders). Each track (cylinder) has 2 sides, each in turn divided into 11 sectors." So a RT command with offset 0 (start track = 0) and length 1 (1 track) would read 22 * 512 bytes from cylinder 0, both sides of disk. Same as block (sector in ASMOne) 0 - 21. Hope some of the enlightened can confirm (or trash...) my findings. Cheers, Lar... Eh Vortex.. |
10 June 2009, 12:05 | #2 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
RT with length 1 reads 512*11 bytes. You can easily check that yourself, create a buffer, fill it with a pattern and do the RT command. You can easily see how much data was read then. I.e.
BUF dcb.l 10000,"TRK!" Assemble this and when asked for the "RAM PTR" just use BUF. Once you executed the RT command you can check the buffer with "h.l BUF". Hope that helps. |
10 June 2009, 12:32 | #3 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Thanks Stingray...
RT indeeds reeds 512 * 11 bytes. Also tried to read track 159, works ok. Fails when I try to read track 160 (as would be expected). Guess that '80 tracks' in the ASMOne guide tricked me.. I.ve been doing a lot of reading on disk related stuff, want to make a trackloader... All theory up till now. No trial and terror yet..., will do that soon enough. Your little example shows it's the best way of discovering how something works. |
10 June 2009, 12:38 | #4 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
|
16 June 2009, 14:58 | #5 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Well, a disk has 80* cylinders, each containing one track per head, just as for harddisks. So "sector 1759" and "track 159" is an arbitrary addressing method. Sectors per track depends on density and file system, so it's different for every type of media and file system, whereas cylinders and heads are physical characteristics of any disc-based media. Er, except CDs, which the drive manufs in their infinite wisdom made a spiral, like on a good ol' LP.
And, what Stingray said, get Hardware Reference Manual if you haven't already. It's a reliable source for correct info. |
17 June 2009, 07:56 | #6 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Stingray, Photon, thanks for the info.
So far almost no time for Amiga. Only managed to put my silly copper routine (http://eab.abime.net/showthread.php?t=44895) on the bootblock in a lost hour. Like how you just insert your disk and zap.., instant copper bars on screen. Hardly a major achievement, but I'm having a blast (from the past...). Guess I really should find the time now to get some coding done, cause I've run out of stuff to read... Lars |
20 June 2009, 13:05 | #7 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Little update: I spent my Friday night coding the track loader (), and it's is almost finished. It loads and decodes without any problem as far as I can tell.
As a test, I loaded the copperbars routine (mentioned earlier in this thread) from track 0 into mem. After scanning the loaded data using: "h DataBuffer", I located the start address of the copperbar routine. j $<copperbar_routine_start_address> showed me 3 moving bars... Only thing left to do is to decode the MFM data to the right position in the data buffer but that doesn't look like rocket science to me. I'm quite pleased I must say. Hey PMC, what about a mega demo? If any one is interested I can put the code in the code tutorial sub forum once completely done Cheers Last edited by Vortex; 20 June 2009 at 13:07. Reason: typos |
20 June 2009, 15:29 | #8 | ||||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Quote:
Quote:
Quote:
Two things I'd be struggling with: one - coming up with ideas for routines and two - when I do come up with an idea, actually making code for it that works! I still feel like such a lamor most of the time. |
||||
20 June 2009, 22:25 | #9 | ||
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
Quote:
Not hard to do, if your code is smaller than 1024-12 (bootblock header is 3*4 bytes) bytes you can just create a normal bootblock and include your code, i.e. after the bootblock header your code follows. If it's larger than 1024-12 bytes you can just load your code via trackdisk.device. |
||
21 June 2009, 11:22 | #10 | |||
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Good morning all,
Quote:
Add: bootBLockHeader: dc.b "DOS",0 dc.l 0,880 to the start of your code. 1st long word contains disktype + flags. 2nd long word is the checksum (we'll get to that later). 3rd long word is the # for the rootblock, which is 880 ($370) by default but when you're using your own track loader you don't care what this is. I just set it to 880. Now, assemble your code and use WS (Write Sector) in ASMOne (I guess the others xASMx's will have this option too). You need to enter dataPtr, which is bootBLockHeader. start sector, which is 0 and length which is 2 (so you'll write sector 0 and 1 for an ass-whooping 1024 bytes ). Next, you'll need to make sure the checksum is ok. You can use CC in ASMOne for this. Just enter CC on the command line and ASMOne will calculate and write the checksum for you. Now, reset the mig and watch your code running from the bootblock. Quote:
Quote:
If you decode this without paying attention to what sector needs to be decoded first you'll end up with correctly decoded data in the wrong order (block wise). The decoding itself works fine though. Hope I did a better job of explaining, but with low levels of coffee in my system on a sunday morning it's really hard... Once ready I'll post the code in the tutorial sub forum for you to have a laugh... Cheers, Lars |
|||
21 June 2009, 12:56 | #11 | ||
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
Quote:
|
||
21 June 2009, 13:12 | #12 | |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Quote:
Code:
; calc bootblock checksum lea BOOT,a0 lea 4(a0),a1 clr.l (a1) move.w #1024/4-1,d7 moveq #0,d0 moveq #0,d1 .calc add.l (a0)+,d0 addx.l d1,d0 dbf d7,.calc not.l d0 move.l d0,(a1) rts Ok, now I understand. That problem is not hard to fix, all info you need is in the sector header. |
|
22 June 2009, 22:02 | #13 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Gents,
It appears I have a working hardware track loader. Wasted some time tracing a silly bug. . Initially it would go KABOOM on me when trying to load more than 1 track but that's fixed now. So, guess I'll run some more tests, clean up the code and post it in the 'Coders Tutorials' section for any one who might be interested... Now for that mega demo... Any volunteers P.S. df0: is still in one piece Last edited by Vortex; 22 June 2009 at 22:04. Reason: added more text |
23 June 2009, 09:24 | #14 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Cool. Well done Vortex. And without killing your hardware too - result.
Quote:
I can't promise I can produce anything worthy but I'd be willing to try. |
|
23 June 2009, 09:38 | #15 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
As said on IRC already, it's cool that you finished the trackloader! And your drive even survived the attacks of the killer trackloader. :P
|
23 June 2009, 15:22 | #16 | |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Track loader source is in the coders tutorials section... http://eab.abime.net/showthread.php?t=45654 Have fun.
Quote:
But not to worry, that's fixed in the example code.. Have fun |
|
23 June 2009, 15:28 | #17 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,507
|
Most drives ignore the step in this situation (or "noclick" programs would not have never worked). AFAIK only really old drives (for example A1000-era drives) try to step beyond cylinder 0 and make strange sounds
Last edited by Toni Wilen; 23 June 2009 at 15:29. Reason: most is better than 99% |
23 June 2009, 15:43 | #18 |
Used Register
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
|
Yup, HRM mentions that all 'new' drives must refuse to step beyond cylinder 0.
Only problem here is, what can be considered a 'new' drive? Judging by the fact that mine still works, I consider the one in my mig a 'new' drive |
03 December 2009, 06:33 | #19 |
-
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,861
|
Like Toni said, only the very old 84-85 clunkers don't like it.
Noclick works in the same fashion. If your drive goes silent with a noclick program, then you can feel free to step outwards from track0 as much as you like. |
03 December 2009, 08:31 | #20 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Is there a difference between NoClick and AntiClick? For me, I always had trouble with NoClick and AntiClick worked properly.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange AsmOne operator | phx | Coders. Asm / Hardware | 23 | 18 March 2015 23:13 |
AsmOne: Undefined symbol | copse | Coders. Asm / Hardware | 2 | 02 April 2012 01:41 |
AsmOne doesn't like my accelerator... | Photon | Coders. General | 6 | 03 February 2011 23:37 |
AsmOne even directive...? | pmc | Coders. General | 30 | 04 December 2009 09:33 |
Why nobody continue Asmone/AsmPro development ? | kamelito | Amiga scene | 16 | 25 March 2007 15:08 |
|
|