English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 21 February 2018, 15:33   #81
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by bloodline View Post
Do you have the file spec for the extended ADF?
(from disk.c)

/* UAE-1ADF (ADF_EXT2)
* W reserved
* W number of tracks (default 2*80=160)
*
* W reserved
* W type, 0=normal AmigaDOS track, 1 = raw MFM (upper byte = disk revolutions - 1)
* L available space for track in bytes (must be even)
* L track length in bits
*/
Toni Wilen is offline  
Old 21 February 2018, 16:00   #82
coder76
Registered User
 
Join Date: Dec 2016
Location: Finland
Posts: 168
Quote:
Originally Posted by Toni Wilen

PC floppy controller uses DMA and does not need CPU to transfer data (Amiga needs CPU power or blitter for MFM decoding). It is just historic software reasons (BIOS/DOS) that it works like it does and no one bothered because everyone had a HD, floppy was only used for data transfer.

Hardwired format requirement is practically the only real limit, in all other situations it is better than Amiga floppy "controller". It is only flexible because it is so simple, not much more than a PLL + bi-directional 16-bit parallel/serial converter + few CIA software controllable IO lines.
Yes, but I think leaving DMA support out here was a good idea, as decoding an MFM track doesn't take a long time anyway, probably less than 1/50 s judging on data amount. This gives flexibility to handle different formats, as the coding/decoding is not hardcoded anywhere. The Amiga should also be able to support GCR format, which packs more data on a track than MFM, although loading goes slower. One can also decode MFM tracks without $4489 syncmarker, looking for syncmarks slows down the reading. This makes decoding data trickier again. One can also choose to read half tracks instead of whole tracks via cia controlled diskside. Don't know if its any use, but some games also loaded like this.
coder76 is offline  
Old 21 February 2018, 16:03   #83
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
Quote:
Originally Posted by Toni Wilen View Post
(from disk.c)

/* UAE-1ADF (ADF_EXT2)
* W reserved
* W number of tracks (default 2*80=160)
*
* W reserved
* W type, 0=normal AmigaDOS track, 1 = raw MFM (upper byte = disk revolutions - 1)
* L available space for track in bytes (must be even)
* L track length in bits
*/
Perfect, many thanks
bloodline is offline  
Old 21 February 2018, 17:11   #84
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
For coding/decoding data via blitter in in Amiga-MFM format, this may be helpful:

http://aminet.net/package/util/pack/Blitter

This Utility could be used to code files to an format,which is necessary
for decoding datas,which are loaded with an own Trackloader.These Datas
can be decoded EASY AND FAST with the BLITTER ! But the Datas must be
saved in the MFM-Format on Disk before decoding !

I'll give the instruction how to decode the datas in your own sourcecode.
Gorf is offline  
Old 21 February 2018, 18:54   #85
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
I've tried my own build extended ADF in WinUAE and it doesn't work, so I was correct, my code is defective...
Attached Files
File Type: zip wbraw.adf.zip (539.3 KB, 171 views)
bloodline is offline  
Old 22 February 2018, 08:28   #86
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by coder76 View Post
Yes, but I think leaving DMA support out here was a good idea, as decoding an MFM track doesn't take a long time anyway, probably less than 1/50 s judging on data amount. This gives flexibility to handle different formats, as the coding/decoding is not hardcoded anywhere. The Amiga should also be able to support GCR format, which packs more data on a track than MFM, although loading goes slower. One can also decode MFM tracks without $4489 syncmarker, looking for syncmarks slows down the reading. This makes decoding data trickier again. One can also choose to read half tracks instead of whole tracks via cia controlled diskside. Don't know if its any use, but some games also loaded like this.
Yeah, it made it flexible but if it had (optional) hardware MFM encoding/decoding, it would have been possible to use HD disks without ugly rotational speed hacks.. (Of course correct fix would have been Paula 16bit -> 32bit upgrade when AGA was designed but it didn't happen)
Toni Wilen is offline  
Old 22 February 2018, 11:00   #87
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
Quote:
Originally Posted by bloodline View Post
I've tried my own build extended ADF in WinUAE and it doesn't work, so I was correct, my code is defective...
I just tried the rawread produced extended ADF files in WiniUAE 3.6.0 (under wine), and they don't boot either
bloodline is offline  
Old 22 February 2018, 12:10   #88
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by bloodline View Post
I just tried the rawread produced extended ADF files in WiniUAE 3.6.0 (under wine), and they don't boot either
There is no guarantee rawread works reliably, especially with amigados tracks that are mostly empty, it probably chose bad splice point...
Toni Wilen is offline  
Old 22 February 2018, 12:13   #89
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
Quote:
Originally Posted by Toni Wilen View Post
There is no guarantee rawread works reliably, especially with amigados tracks that are mostly empty, it probably chose bad splice point...
That's good to know, I will keep trying until I get one that works. I will then be able to use that as a "known good" image.
bloodline is offline  
Old 22 February 2018, 12:21   #90
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
I just added command line option to winuae (winuae.7z, you should be able to find the complete url..), -rawextadf that forces writing of all tracks, even if it decodes to amigados, as raw data.

Create extended adf, format it in emulation: you have valid extedended adf, all tracks in original undecoded format.
Toni Wilen is offline  
Old 22 February 2018, 12:48   #91
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
Quote:
Originally Posted by Toni Wilen View Post
I just added command line option to winuae (winuae.7z, you should be able to find the complete url..), -rawextadf that forces writing of all tracks, even if it decodes to amigados, as raw data.

Create extended adf, format it in emulation: you have valid extedended adf, all tracks in original undecoded format.
That is brilliant!
bloodline is offline  
Old 22 February 2018, 13:04   #92
NorthWay
Registered User
 
Join Date: May 2013
Location: Grimstad / Norway
Posts: 839
Quote:
Originally Posted by Toni Wilen View Post
not much more than a PLL + bi-directional 16-bit parallel/serial converter + few CIA software controllable IO lines.
Wouldn't an _optional_ MFM decoder just have been a few wires and some selector logic?
NorthWay is offline  
Old 22 February 2018, 13:50   #93
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Quote:
Originally Posted by NorthWay View Post
Wouldn't an _optional_ MFM decoder just have been a few wires and some selector logic?
that was my thinking as well. But you need probably some extra logic to read/write these "illegal" MFM-code sync-markers and gaps....
But probably nothing a cheap 6502-variant could not handle back than - or some Arduino Nano could now.

PS:
the CSG 4510 "Victor" was a 65EC02 with two CIAs in one chip-package;
used in the CDTV-II prototype as well as in the C65 prototype.
That one would have made good match to provide hd-floppys for Amiga and even save space/costs on the board.
Gorf is offline  
Old 22 February 2018, 14:00   #94
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
Quote:
Originally Posted by Toni Wilen View Post
I just added command line option to winuae (winuae.7z, you should be able to find the complete url..), -rawextadf that forces writing of all tracks, even if it decodes to amigados, as raw data.

Create extended adf, format it in emulation: you have valid extedended adf, all tracks in original undecoded format.
Just confirming that the -rawextadf option works as expected and does produce a vaild mfm image.

I really appreciate the support. I will try this with my emulator over the weekend.

-edit- I couldn't resist trying to feed in the raw mfm data into my disk DMA as produced by Toni's modified winUAE... amazingly it boots (after loading track 0 it then steps up to track 40 - as expected, this is where the root is located and continues to boot) then crashes... I will have to investigate at the weekend.

Last edited by bloodline; 22 February 2018 at 15:10.
bloodline is offline  
Old 22 February 2018, 16:51   #95
Gorf
Registered User
 
Gorf's Avatar
 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,294
Ok, here comes the next (maybe) useful link:

http://amigadrive.blogspot.de

This guy programmed his raspi to act like a real Amiga floppy drive - also bare-metal without a linux-kernel!

So it reads from sd-card (FAT) and encodes correctly to Amiga-MFM - and the other way as well.
Gorf is offline  
Old 23 February 2018, 11:41   #96
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
This might qualify as one of the most boring screenshots in history... But (not visible in a static shot) the power LED is flashing and a Guru is in progress

I think my floppy emulation is still not quite right, because the OS keeps trying to load cylinder 40 (track 80) over and over, it clearly can't seem to read the root dir.

-edit- It appear that when CIAB prb bit 2 is high the upper surface is selected (this appears to be counter to the HRM)...
Attached Thumbnails
Click image for larger version

Name:	bootscreen14.png
Views:	371
Size:	24.2 KB
ID:	56968  

Last edited by bloodline; 23 February 2018 at 14:39.
bloodline is offline  
Old 23 February 2018, 13:52   #97
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
A Mac build if you want to try at home.

A bootable adf is included in the archive. command line arguments:

zorro <kickstart rom> <bootable raw extended adf>

When you see the "insert workbench" screen hit the "a" key to insert the loaded disk.

Last edited by bloodline; 01 March 2018 at 15:56.
bloodline is offline  
Old 24 February 2018, 08:37   #98
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
My Emulator as "progressed" to the point that the Guru works properly now... I really hope this will help debugging.

Anyone here good with KS1.2 guru numbers?
Attached Thumbnails
Click image for larger version

Name:	guru2.png
Views:	314
Size:	31.6 KB
ID:	56980   Click image for larger version

Name:	guru3.png
Views:	269
Size:	31.8 KB
ID:	56981  
bloodline is offline  
Old 24 February 2018, 09:03   #99
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by bloodline View Post
My Emulator as "progressed" to the point that the Guru works properly now... I really hope this will help debugging.
nice progress
Quote:
Anyone here good with KS1.2 guru numbers?
Amigalove website has an informative article:
Guru Meditation Errors - How to Read Them
emufan is offline  
Old 24 February 2018, 09:15   #100
bloodline
Registered User
 
bloodline's Avatar
 
Join Date: Jan 2017
Location: London, UK
Posts: 433
Quote:
Originally Posted by emufan View Post
nice progress

Amigalove website has an informative article:
Guru Meditation Errors - How to Read Them
If I've read this correctly, intuition seems to think my emulation is crap This is unsurprising... I will try harder.
bloodline 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
Amiga emulator for iOS steviebwoy support.OtherUAE 35 15 November 2014 10:14
Amiga emulator for a PSP? Vars191 support.OtherUAE 1 09 May 2010 02:08
Frederic's Emulator inside and Emulator thread Fred the Fop Retrogaming General Discussion 22 09 March 2006 07:31
ADF Files -> Amiga(amiga with dos Emulator) Schattenmeister support.Hardware 8 14 October 2003 00:10
Which Amiga emulator is best? Tim Janssen Amiga scene 45 15 February 2002 19:52

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 08:08.

Top

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