English Amiga Board


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

 
 
Thread Tools
Old 16 February 2018, 12:30   #61
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 732
Quote:
Originally Posted by bloodline View Post
For some reason, even though I have tried to emulate 4 floppy drives, only the internal drive has it's drive head stepped from track 0 to 1 and then back again (about every 10 seconds, how do the other drives signal to the amiga they are present on the system?), this appears to be based on an interrupt generated by CIAA. Full Debugging output is provided via command line.
Additional drives are detected by the OS by clocking the SEL line 32 times and looking at the pulse train coming out of the RDY line (this is one of the reasons you need extra hw to connect an external drive). These pulse trains are pretty simple (like $00000000, $ffffffff, $aaaaaaaa and $55555555).
hooverphonique is offline  
AdSense AdSense  
Old 16 February 2018, 13:35   #62
bloodline
Registered User

 
Join Date: Jan 2017
Location: London
Posts: 96
Quote:
Originally Posted by hooverphonique View Post
Additional drives are detected by the OS by clocking the SEL line 32 times and looking at the pulse train coming out of the RDY line (this is one of the reasons you need extra hw to connect an external drive). These pulse trains are pretty simple (like $00000000, $ffffffff, $aaaaaaaa and $55555555).
Excellent, I wandered why the drive select lines were being rapidly pulsed during boot! Cheers, I can easily get the emulated drives to respond correctly if I need them.

Last edited by bloodline; 16 February 2018 at 13:52.
bloodline is offline  
Old 16 February 2018, 13:41   #63
bloodline
Registered User

 
Join Date: Jan 2017
Location: London
Posts: 96
Quote:
Originally Posted by kolla View Post
Are you kidding, this is mighty entertaining and fun!

Just a silly idea I've had, throwing it out there... UAE as an EFI loadable, taking over the system at boot time.
This is essentially my idea. But my plan was to only have the bare minimum hardware emulation to get the OS into a usable state.

I think I have achieved this for KS1.2, it only needs the CIAs (for the timers) an the interrupt hardware.

But I want to boot KS3.0 so I can emulate the IDE for booting and direct that to the real mass storage hardware. KS3 is more tricky so I am implementing more of the hardware emulation to see what is going wrong, and it's really good fun!
bloodline is offline  
Old 16 February 2018, 13:58   #64
bloodline
Registered User

 
Join Date: Jan 2017
Location: London
Posts: 96
Quote:
Originally Posted by Toni Wilen View Post
Yes, it should work under KS 1.x trackdisk.device because it does not use word sync mode. (AFAIK because code was made before word sync hardware existed/worked, it was rewritten for KS 2.x)
Ok, I fed the output of rawread into my disk DMA (cutting off the 2004byte header), and after 5,984 MFM words have been read into memory, I generate a DSKBLK interrupt.

The OS then turns the disk motor off... all good! After a few seconds the emulator Gurus

I must be missing something

-edit- My address calculation was off, I now read in 7358 MFM words (as requested in dsklen) starting the address specified by dskpt... when I generate a dskblk int at this point the OS starts to randomly read memory... So I must be nuking something important in ram :-|

-edit 2- I found another bug, I was halving the address in dskpt (because my earlier implementation addressed the memory as words), now that is fixed, the MFM track loads fine and the blitter is fired up! let's see where this rabbit hole leads :-D

Last edited by bloodline; 16 February 2018 at 14:48.
bloodline is offline  
Old 16 February 2018, 16:04   #65
bloodline
Registered User

 
Join Date: Jan 2017
Location: London
Posts: 96
Observing this more... it seems the track is loaded into ram, the blitter operates upon it, the result is garbage* (I am observing the memory pointed by channel D)... the OS tries again, and again, and again... same result... it steps the head to track 1 and then back to 0,and tries a further 4 times... since the result is meaningless each time it just fails... eventually the OS just gives up, switches the drive motor off and stops working.

Not ideal, but definitely progress

-Edit- Conveniently to OS makes Long write to bltbmod register when it is using the blitter for floppy disk work, which makes trapping that call rather easy.

*Actually not garbage, but what appears to be encoded MFM data... I assumed the blitter was supposed to be helping decode the data...

Last edited by bloodline; Yesterday at 18:44.
bloodline is offline  
Old Yesterday, 21:51   #66
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 732
Very interesting to follow, this thread is

Quote:
Originally Posted by bloodline View Post
*Actually not garbage, but what appears to be encoded MFM data... I assumed the blitter was supposed to be helping decode the data...
yes, those old kickstart versions (1.2, 1.3) do use the blitter for mfm decoding..
hooverphonique is offline  
AdSense AdSense  
 


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 11:14
Amiga emulator for a PSP? Vars191 support.OtherUAE 1 09 May 2010 03:08
Frederic's Emulator inside and Emulator thread Fred the Fop Retrogaming General Discussion 22 09 March 2006 08:31
ADF Files -> Amiga(amiga with dos Emulator) Schattenmeister support.Hardware 8 14 October 2003 01:10
Which Amiga emulator is best? Tim Janssen Amiga scene 45 15 February 2002 20: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:22.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Page generated in 0.12364 seconds with 14 queries