English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 04 May 2022, 17:51   #1
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 183
questions to di and did debugger commands

Code:
>di r 0
Disk breakpoint mode R-- track 0
>g
DSKLEN: drive 0 motor  on cylinder  0 sel yes rw mfmpos 52533/101344
5295 5555 5255 5555|5495 5555 5555 5555 5495 5555 5555 5555 5295 5555 5255 5555 5295
side 0 dma 2 off 1 word 5555 pt 00002064 len 9CBE bytr 80AA adk 1100 sync 0000
  D0 00009CBE   D1 00000400   D2 00009CBE   D3 00000000
  D4 00000000   D5 00000000   D6 00000000   D7 00000000
  A0 00C04800   A1 00DFF000   A2 00002064   A3 00C04730
  A4 00FEA22A   A5 00000000   A6 00C03AA4   A7 00C04A8C
USP  00C04A8C ISP  00C80000
T=00 S=0 M=0 X=0 N=1 Z=0 V=0 C=0 IMASK=0 STP=0
Prefetch 4e75 (RTS) 43fa (LEA) Chip latch FFFF9CBE
00fea232 4e75                     rts  == $00fea1fc
Next PC: 00fea234
>
1. what triggers this break?
2. what are the numbers and letters stand for?
DSKLEN: drive 0 motor on cylinder 0 sel yes rw mfmpos 52533/101344
5295 5555 5255 5555|5495 5555 5555 5555 5495 5555 5555 5555 5295 5555 5255 5555 5295
side 0 dma 2 off 1 word 5555 pt 00002064 len 9CBE bytr 80AA adk 1100 sync 0000

3. also with
Code:
>did 4
Disk logging level 4
>g

...
DSKLEN: drive 0 motor  on cylinder 55 sel yes ro mfmpos 98972/101344
9555 2A51 4A52 5149|1524 492A AA91 5255 1512 A455 24AA 52A9 1149 5111 514A A949 124A
side 0 dma 2 off 15 word 5149 pt 00005DC6 len 98F0 bytr 80A2 adk 1500 sync 4489
SYNC: drive 0 motor  on cylinder 55 sel yes ro mfmpos 5648/101344
AAAA AAAA AAAA 4489|4489 5515 2AA5 5544 AAA9 2AAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA
side 0 dma 2 off 15 word 4489 pt 00005DC6 len 98F0 bytr 8089 adk 1500 sync 4489
4. are there different log level and for what?
did <log level> Enable disk logging.

5. for what is this breakpoint and logging feature helpful? maybe to understand mfm/gcr-encoding?
or disc data structure?
Rock'n Roll is offline  
Old 07 May 2022, 11:30   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
1. what triggers this break?
DMA start when track is zero. (R=read default, W=write, P=DSKBYTR CPU read)

Quote:
2. what are the numbers and letters stand for?
DSKLEN: drive 0 motor on cylinder 0 sel yes rw mfmpos 52533/101344
5295 5555 5255 5555|5495 5555 5555 5555 5495 5555 5555 5555 5295 5555 5255 5555 5295
side 0 dma 2 off 1 word 5555 pt 00002064 len 9CBE bytr 80AA adk 1100 sync 0000
Floppy drive state (motor, cylinder, selected, side select) and register contents (DMA pointer, length, DSKBYTR, ADKCON, DSKSYNC)

MFMPOS = current bit position of track/total length. Raw bit stream dump (| = current position)

Quote:
4. are there different log level and for what?
did <log level> Enable disk logging.
Undefined The bigger the value the more gets dumped.

Quote:
5. for what is this breakpoint and logging feature helpful? maybe to understand mfm/gcr-encoding?
or disc data structure?
Debug/crack/hack some loader? Log is usually enough to find out where it is called.
Toni Wilen is offline  
Old 07 May 2022, 20:55   #3
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 183
I try to understand:

first line:
DSKLEN: - info label, like SYNC:
drive 0 - ok, it's df0:
motor on - motor state
cylinder 0 - track 0, side 0 (info)
sel yes rw - ?
mfmpos 52533/101344 - ok, current bit position

total length: 101344?
1 track = 11*512 Bytes*8= 45056 Bits
MFM=11*(2*(64Byte+512Byte))*8=101376 Bits

second line:
data - 17 words, mfm data (but not synchronized)
data are not from the beginning of a track?
the current position stands anywhere? like here: 52533?
(Then a breakpoint for a certain mfmpos would be good?
To analyze mfm-data from beginning of a track)

| = current position - ok, from the raw bit stream dump

third line:
side 0 - ok, see cylinder 0
dma 2 - ? dma is always 2?
off 1 - ? off with different numbers from 1 to 13?
word 5555 - ok, current value
pt 00002064 - DSK pointer ($dff020,22 DSKPTH, DSKPTL)
len 9CBE - ok, length ($dff024 DSKLEN)
bytr 80AA - ok, DSKBYTR ($dff01A DSKBYTR)
adk 1100 - ok, ADKCON ($dff010 ADKCONR)
sync 0000 - ok, DSKSYNC ($dff07E DSKSYNC)

SYNC: drive 0 motor on cylinder 69 sel yes rw mfmpos 5648/101344
AAAA AAAA AAAA 4489|4489 5545 2AA5 552A AAA9 2AAA AAAA AAAA AAAA AAAA AAAA AAAA AAAA
side 0 dma 2 off 0 word 4489 pt 00070000 len 9F40 bytr 8044 adk 1500 sync 4489

What means SYNC?
It's this preamble and syncword? AAAA AAAA 4489|4489
But why there are three times AAAA AAAA AAAA and not only 2 times?
Rock'n Roll is offline  
Old 12 May 2022, 21:21   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by Rock'n Roll View Post
o)
sel yes rw - ?
Drive selected (yes) or not selected (no). (SEL0-SEL3 bits)

Quote:
total length: 101344?
Total number of bits in this track.

Quote:
1 track = 11*512 Bytes*8= 45056 Bits
MFM=11*(2*(64Byte+512Byte))*8=101376 Bits
It is theoretical max bits that Amiga can write. It is not logical floppy format size.

PAL: 3546895 / (7 * 5)
NTSC: 3579545 / (7 * 5)

(7 = clocks per bit, 5 = 5 revs/second)

Quote:
dma 2 - ? dma is always 2?
DMA state.
0 = off.
1 = first DSKLEN write only done.
2 = read DMA active.
3 = write DMA active.

Quote:
off 1 - ? off with different numbers from 1 to 13?
Current bit position in current loaded word. (Not very useful)

Quote:
What means SYNC?
It means debug log message was caused by DSKSYNC match. Another possibility is DSKLEN write (DMA started).


Quote:
It's this preamble and syncword? AAAA AAAA 4489|4489
But why there are three times AAAA AAAA AAAA and not only 2 times?
It always shows last 4 words. Nothing to do with sync.
Toni Wilen is offline  
Old 14 May 2022, 17:33   #5
Rock'n Roll
German Translator
 
Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 49
Posts: 183
thank you for the information.

What I'm missing at the end is an example of what it could be useful.
So, how I have to interpret the raw bit stream data?

I see no connection between the data on an adf file and the raw bit stream.
I also don't get a connecetion between the current bitposition 98972 and to the hex data, e.g. of an adf file.
Rock'n Roll is offline  
Old 14 May 2022, 19:12   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Learn how Amiga MFM encoding works

WinUAE does not care or need to know. Raw bit stream is DMA'd to memory. MFM decoding is done by Amiga side software (trackdisk.device or game/demo trackloader).

In theory UAE could decode it but it would return garbage if format is not standard AmigaDOS.
Toni Wilen is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Winuae Debugger - Profile commands? mcgeezer support.WinUAE 1 02 October 2020 20:59
Debugger noob questions rikkles support.WinUAE 3 18 September 2019 23:46
Step commands in debugger are throwing exceptions in console Dr. MefistO support.WinUAE 8 29 December 2015 13:48
visual DMA debugger crash and questions selco support.WinUAE 4 28 April 2015 09:53
Automate debugger commands Patarival request.UAE Wishlist 3 23 July 2010 23:40

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

Forum Jump


All times are GMT +2. The time now is 13:05.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14291 seconds with 13 queries