forum home page
register faq member list calendar search
MacShock.com - Apple Forums
Reload this Page
Old 01-08-2012, 10:30 PM
Kevin Dady
Guest
 
Posts: n/a
Default Disk II Head movement

Is there a program (to download or to type in) that I could move the
apple disk head to a track, and also report back what track the head
is currently on?

I have been digging around but not had that much luck

Thanks
  Reply With Quote
Old 01-08-2012, 10:30 PM
Vladimir Ivanov
Guest
 
Posts: n/a
Default Disk II Head movement


On Sun, 8 Jan 2012, Kevin Dady wrote:

> Is there a program (to download or to type in) that I could move the
> apple disk head to a track


Any track/sector editor. Give Locksmith 6.0 a try.

Alternatively, a short program that sets IOB and calls RWTS ($3D9) would
do. There's an example at the end of the message.

> and also report back what track the head is currently on?


It's the software solely that keeps track of the current track.

-- Vlad



Example: Read through disk (backwards). Call to WAIT was for testing
purposes, you can safely ignore it. It halts with BRK either upon normal
completion or I/O error.



ca65 V2.12.0 - (C) Copyright 1998-2005 Ullrich von Bassewitz
Main file : test.s
Current file: test.s

000000r 1 ; HDDD test code
000000r 1
000000r 1 ; -----------------------------------------------------------------------------
000000r 1
000000r 1 IOBTYPE = 0
000000r 1 IOBSLOT = 1
000000r 1 IOBDRV = 2
000000r 1 IOBVOL = 3
000000r 1 IOBTRK = 4
000000r 1 IOBSEC = 5
000000r 1 IOBDCT = 6
000000r 1 IOBBUF = 8
000000r 1 IOBLEN = 10
000000r 1 IOBCMD = 12
000000r 1 IOBSTAT = 13
000000r 1 IOBSMOD = 14
000000r 1
000000r 1 ; buffer at $1000
000000r 1
000000r 1 BUF = $1000
000000r 1
000000r 1 ; ROM entries
000000r 1
000000r 1 WAIT = $FCA8
000000r 1 COUT = $FDED
000000r 1
000000r 1 ; -----------------------------------------------------------------------------
000000r 1
000000r 1 .org $0300
000300 1
000300 1 ; init
000300 1 A9 01 lda #1 ; read
000302 1 8D 49 03 sta iob + IOBCMD
000305 1
000305 1 A9 23 lda #35
000307 1 8D 41 03 sta iob + IOBTRK
00030A 1 A9 00 lda #0
00030C 1 8D 42 03 sta iob + IOBSEC
00030F 1
00030F 1 ; loop over all sectors/tracks backwards
00030F 1
00030F 1 CE 42 03 loop: dec iob + IOBSEC
000312 1 10 11 bpl secok
000314 1
000314 1 A9 8D lda #$0D + $80
000316 1 20 ED FD jsr COUT
000319 1
000319 1 A9 0F lda #15
00031B 1 8D 42 03 sta iob + IOBSEC
00031E 1
00031E 1 CE 41 03 dec iob + IOBTRK
000321 1 10 02 bpl secok
000323 1 00 brk ; --- EXIT
000324 1 00 brk
000325 1 secok:
000325 1
000325 1 A9 AE lda #'.' + $80
000327 1 20 ED FD jsr COUT
00032A 1
00032A 1 A9 03 lda #>iob ; call RWTS
00032C 1 A0 3D ldy #<iob
00032E 1 20 D9 03 jsr $3D9
000331 1 90 02 bcc rwok
000333 1 00 brk ; --- I/O ERROR
000334 1 00 brk
000335 1 rwok:
000335 1
000335 1 A9 1E lda #$1E
000337 1 20 A8 FC jsr WAIT
00033A 1 4C 0F 03 jmp loop
00033D 1
00033D 1 ; -----------------------------------------------------------------------------
00033D 1
00033D 1 01 iob: .byte $01 ; type
00033E 1 60 .byte $60 ; slot * $10
00033F 1 01 .byte $01 ; drive (1 / 2)
000340 1 00 .byte $00 ; expected volume (0= any)
000341 1 00 .byte $00 ; track
000342 1 00 .byte $00 ; sector
000343 1 50 03 .word dct ; -> DCT
000345 1 00 10 .word BUF ; -> buffer
000347 1 00 01 .word $0100 ; one sector
000349 1 00 .byte $00 ; 1- read, 2- write, 4- format
00034A 1 00 .byte $00 ; status
00034B 1 00 .byte $00 ; status modifier (actual volume)
00034C 1 60 .byte $60 ; previous slot * $10
00034D 1 01 .byte $01 ; previous drive
00034E 1 00 00 .byte $00, $00 ; -- spares
000350 1
000350 1 00 01 EF D8 dct: .byte $00, $01, $EF, $D8 ; Disk II
000354 1
000354 1 .end
  Reply With Quote
Old 01-08-2012, 10:30 PM
Kevin Dady
Guest
 
Posts: n/a
Default Disk II Head movement

On Jan 8, 4:20*pm, Vladimir Ivanov <vlad...@XXXyahooXXX.com> wrote:
> On Sun, 8 Jan 2012, Kevin Dady wrote:
> > Is there a program (to download or to type in) that I could move the
> > apple disk head to a track

>
> Any track/sector editor. Give Locksmith 6.0 a try.
>
> Alternatively, a short program that sets IOB and calls RWTS ($3D9) would
> do. There's an example at the end of the message.
>
> > and also report back what track the head is currently on?

>
> It's the software solely that keeps track of the current track.
>
> * *-- Vlad
>
> Example: Read through disk (backwards). Call to WAIT was for testing
> purposes, you can safely ignore it. It halts with BRK either upon normal
> completion or I/O error.
>
> ca65 V2.12.0 - (C) Copyright 1998-2005 Ullrich von Bassewitz
> Main file * : test.s
> Current file: test.s
>
> 000000r 1 * * * * * * * ; HDDD test code
> 000000r 1
> 000000r 1 * * * * * * * ; -----------------------------------------------------------------------------
> 000000r 1
> 000000r 1 * * * * * * * IOBTYPE = * * * 0
> 000000r 1 * * * * * * * IOBSLOT = * * * 1
> 000000r 1 * * * * * * * IOBDRV *= * * * 2
> 000000r 1 * * * * * * * IOBVOL *= * * * 3
> 000000r 1 * * * * * * * IOBTRK *= * * * 4
> 000000r 1 * * * * * * * IOBSEC *= * * * 5
> 000000r 1 * * * * * * * IOBDCT *= * * * 6
> 000000r 1 * * * * * * * IOBBUF *= * * * 8
> 000000r 1 * * * * * * * IOBLEN *= * * * 10
> 000000r 1 * * * * * * * IOBCMD *= * * * 12
> 000000r 1 * * * * * * * IOBSTAT = * * * 13
> 000000r 1 * * * * * * * IOBSMOD = * * * 14
> 000000r 1
> 000000r 1 * * * * * * * ; buffer at $1000
> 000000r 1
> 000000r 1 * * * * * * * BUF * * = * * * $1000
> 000000r 1
> 000000r 1 * * * * * * * ; ROM entries
> 000000r 1
> 000000r 1 * * * * * * * WAIT * *= * * * $FCA8
> 000000r 1 * * * * * * * COUT * *= * * * $FDED
> 000000r 1
> 000000r 1 * * * * * * * ; -----------------------------------------------------------------------------
> 000000r 1
> 000000r 1 * * * * * * * * * * * .org * *$0300
> 000300 *1
> 000300 *1 * * * * * * * ; init
> 000300 *1 *A9 01 * * * * * * * *lda * * #1 * * * * * * * * * * * * * * *; read
> 000302 *1 *8D 49 03 * * * * * * sta * * iob + IOBCMD
> 000305 *1
> 000305 *1 *A9 23 * * * * * * * *lda * * #35
> 000307 *1 *8D 41 03 * * * * * * sta * * iob + IOBTRK
> 00030A *1 *A9 00 * * * * * * * *lda * * #0
> 00030C *1 *8D 42 03 * * * * * * sta * * iob + IOBSEC
> 00030F *1
> 00030F *1 * * * * * * * ; loop over all sectors/tracks backwards
> 00030F *1
> 00030F *1 *CE 42 03 * * loop: * dec * * iob + IOBSEC
> 000312 *1 *10 11 * * * * * * * *bpl * * secok
> 000314 *1
> 000314 *1 *A9 8D * * * * * * * *lda * * #$0D + $80
> 000316 *1 *20 ED FD * * * * * * jsr * * COUT
> 000319 *1
> 000319 *1 *A9 0F * * * * * * * *lda * * #15
> 00031B *1 *8D 42 03 * * * * * * sta * * iob + IOBSEC
> 00031E *1
> 00031E *1 *CE 41 03 * * * * * * dec * * iob + IOBTRK
> 000321 *1 *10 02 * * * * * * * *bpl * * secok
> 000323 *1 *00 * * * * * * * * * brk * * * * * * * * * * * * * * * * * * ; --- EXIT
> 000324 *1 *00 * * * * * * * * * brk
> 000325 *1 * * * * * * * secok:
> 000325 *1
> 000325 *1 *A9 AE * * * * * * * *lda * * #'.' + $80
> 000327 *1 *20 ED FD * * * * * * jsr * * COUT
> 00032A *1
> 00032A *1 *A9 03 * * * * * * * *lda * * #>iob * * * * * * * * * * * * * ; call RWTS
> 00032C *1 *A0 3D * * * * * * * *ldy * * #<iob
> 00032E *1 *20 D9 03 * * * * * * jsr * * $3D9
> 000331 *1 *90 02 * * * * * * * *bcc * * rwok
> 000333 *1 *00 * * * * * * * * * brk * * * * * * * * * * * * * * * * * * ; --- I/O ERROR
> 000334 *1 *00 * * * * * * * * * brk
> 000335 *1 * * * * * * * rwok:
> 000335 *1
> 000335 *1 *A9 1E * * * * * * * *lda * * #$1E
> 000337 *1 *20 A8 FC * * * * * * jsr * * WAIT
> 00033A *1 *4C 0F 03 * * * * * * jmp * * loop
> 00033D *1
> 00033D *1 * * * * * * * ; -----------------------------------------------------------------------------
> 00033D *1
> 00033D *1 *01 * * * * * iob: * *.byte * $01 * * * * * * * * * * * * * * ; type
> 00033E *1 *60 * * * * * * * * * .byte * $60 * * * * * * * * * * * * * * ; slot * $10
> 00033F *1 *01 * * * * * * * * * .byte * $01 * * * * * * * * * * * * * * ; drive (1 / 2)
> 000340 *1 *00 * * * * * * * * * .byte * $00 * * * * * * * * * * * * * * ; expected volume (0= any)
> 000341 *1 *00 * * * * * * * * * .byte * $00 * * * * * * * * * * * * * * ; track
> 000342 *1 *00 * * * * * * * * * .byte * $00 * * * * * * * * * * * * * * ; sector
> 000343 *1 *50 03 * * * * * * * *.word * dct * * * * * * * * * * * * * * ; -> DCT
> 000345 *1 *00 10 * * * * * * * *.word * BUF * * * * * * * * * * * * * * ; -> buffer
> 000347 *1 *00 01 * * * * * * * *.word * $0100 * * * * * * * * * * * * * ; one sector
> 000349 *1 *00 * * * * * * * * * .byte * $00 * * * * * * * * * * * * * * ; 1- read, 2- write, 4- format
> 00034A *1 *00 * * * * * * * * * .byte * $00 * * * * * * * * * * * * * * ; status
> 00034B *1 *00 * * * * * * * * * .byte * $00 * * * * * * * * * * * * * * ; status modifier (actual volume)
> 00034C *1 *60 * * * * * * * * * .byte * $60 * * * * * * * * * * * * * * ; previous slot * $10
> 00034D *1 *01 * * * * * * * * * .byte * $01 * * * * * * * * * * * * * * ; previous drive
> 00034E *1 *00 00 * * * * * * * *.byte * $00, $00 * * * * * * * * * * * *; -- spares
> 000350 *1
> 000350 *1 *00 01 EF D8 *dct: * *.byte * $00, $01, $EF, $D8 * * * * * * *; Disk II
> 000354 *1
> 000354 *1 * * * * * * * * * * * .end


cool, thanks a bunch
  Reply With Quote
Old 01-09-2012, 04:30 AM
Michael J. Mahon
Guest
 
Posts: n/a
Default Disk II Head movement

Kevin Dady <kevin@hackaday.com> wrote:
> Is there a program (to download or to type in) that I could move the
> apple disk head to a track, and also report back what track the head
> is currently on?
>
> I have been digging around but not had that much luck
>
> Thanks


Try the CIA utilities, too.

Locksmith and CIA will allow you to read in a track without any head
positioning. That will allow you to read the track from the address marks.

-michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon
  Reply With Quote
Old 01-09-2012, 04:30 AM
Kevin Dady
Guest
 
Posts: n/a
Default Disk II Head movement

On Jan 8, 9:57*pm, Michael J. Mahon <mjma...@aol.com> wrote:
> Kevin Dady <ke...@hackaday.com> wrote:
> > Is there a program (to download or to type in) that I could move the
> > apple disk head to a track, and also report back what track the head
> > is currently on?

>
> > I have been digging around but not had that much luck

>
> > Thanks

>
> Try the CIA utilities, too.
>
> Locksmith and CIA will allow you to read in a track without any head
> positioning. That will allow you to read the track from the address marks..
>
> -michael - NadaNet 3.1 and AppleCrate II:http://home.comcast.net/~mjmahon


I acutally ended up using disc commander for the moment as its the
most idiot proof ... I am just learning how all the signals going into
the drive work at the moment
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:13 PM.
Copyright ©2007-2008 MacShock.com. Powered by vBulletin
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.