View Single Post
Old 21 June 2009, 11:22   #10
Vortex
Used Register
 
Vortex's Avatar
 
Join Date: Nov 2008
Location: Headvillage / The Nethervoids
Age: 50
Posts: 103
Good morning all,

Quote:
Originally Posted by pmc
Nice one. Like most things (!) I'd have no idea how to do that.
Takes a few simple steps to make your own bootblock with custom code. I don't know about this trackdisk.device Stingray mentioned so I'll just quickly explain how to make one for max 1024-12 bytes using ASMOne.

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:
Originally Posted by pmc
Cool.

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.
So far I've seen a sin scroller, plasma and a complete intro. Looks like you do get stuff to work I'd say..

Quote:
Originally Posted by StingRay
Hmm, how do you decode in your current loader then? Because I don't really understand that you can already decode your data but not to the right location? Enlighten me please.
I'll try.. What I ment was the first sector you read is not always the first sector of the track. As an example, in your MFM Buffer you could have sector 8 - 9 - 10 - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7.
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
Vortex is offline  
 
Page generated in 0.05384 seconds with 11 queries