English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 January 2013, 19:38   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
NetBSD with A1200/A4000 IDE emulation

Following on from trying to install NetBSD with A2091 or A3000 SCSI emulation, I tried with A1200 and A4000 IDE emulation.

In both cases NetBSD detects the IDE controller but doesn't seem to detect the drive. I noticed that with A1200 emulation NetBSD seems to mis-detect the machine as an A4000, and in both cases though emulation was of an NTSC machine it thought the system was PAL (715909Hz CIA). Since I don't have an actual machine to test with I can't say for sure whether or not that's expected behaviour. Also, if I select Cycle-exact chipset emulation the machine goes to a black screen after the initial loading display.
Attached Thumbnails
Click image for larger version

Name:	A1200_WinUAE_2013-01-04_1850.png
Views:	163
Size:	5.2 KB
ID:	34335   Click image for larger version

Name:	A4000_WinUAE_2013-01-04_1850.png
Views:	153
Size:	5.3 KB
ID:	34336  
Attached Files
File Type: uae NetBSD_install_A1200.uae (13.0 KB, 60 views)
File Type: uae NetBSD_install_A4000.uae (14.1 KB, 60 views)

Last edited by mark_k; 20 February 2013 at 15:37. Reason: Strike through wrong comment about PAL/CIA frequency
mark_k is offline  
AdSense AdSense  
Old 05 January 2013, 20:43   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,794
MMU and cycle-exact at the same time does not exist.
Toni Wilen is offline  
Old 05 January 2013, 22:25   #3
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
If A1200 IDE controller is present, but machine is misdetected as A4000 then IDE won't work. A4000 and A1200 IDE are a bit different and driver is trying to bang the IDE controller at different memory locations.
strim is offline  
Old 06 January 2013, 11:56   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,794
Thanks for ide debugging kernel.

Argh.. During 2.4.0 betas code was modified and "ide->status &= ~IDE_STATUS_BSY" had become "ide->status = ~ IDE_STATUS_BSY" after execute_drive_diagnostics command execution. Result is very illegal status bit combinations..

This don't affect all drivers (KS built-in for example) if they don't care about other status bits until later, other instruction(s) clear bogus bits.

I have said it previously and I say it again: KS built-in driver allows all kinds of weird or impossible drive behavior. I guess in early 1990s there were lots of buggy IDE drives that required workarounds.

(winuae.zip fixed)
Toni Wilen is offline  
Old 06 January 2013, 20:48   #5
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
Booting with A4000 emulation now gets significantly further. With A1200 emulation NetBSD still mis-detects the machine as an A4000, hence gets no further than before.
mark_k is offline  
Old 06 January 2013, 21:14   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,794
I am quite sure it is netbsd issue. According to sources it tries to guess model instead of checking if Gayle ID register returns valid values.
Toni Wilen is offline  
Old 07 January 2013, 00:05   #7
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by Toni Wilen View Post
I am quite sure it is netbsd issue. According to sources it tries to guess model instead of checking if Gayle ID register returns valid values.
AFAIR it does try to guess model if this information is not passed from boot loader for some reason. Anyway, maybe it's time to fix that. Where can I get info about this Gayle ID register and its possible values?
strim is offline  
Old 07 January 2013, 10:51   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,794
It is quite simple. Gayle ID register is at $DE1000 but first you need to check if it is chipset mirror (For example write to INTENA mirror at DE009C and check if real INTENAR changes or if you already know chipset mirror isn't possible)

Write any byte to $DE1000
Read $DE1000 8 times, store bit 7 each time. Result is byte value (first comes high bit, last is low bit)

$D0 = A600 Gayle, $D1 = A1200 Gayle (No known other versions). $00 or $ff if no Gayle.
Toni Wilen is offline  
Old 07 January 2013, 15:45   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
Another way to check if the machine is an A4000 would be for the boot loader to do FindResident("A4000 bonus").

If that succeeds you're running on an A4000. If it doesn't, you probably aren't. (Though of course if the user has soft-loaded a non-A4000 Kickstart that module won't be found. That's unlikely to be a problem with real-world systems though.)

Edit: It looks like that method of detecting an A4000 is already in loadbsd. Maybe the NetBSD boot loader doesn't use that method for some reason???

Edit 2: Looks like it's necessary to also check for "A4000 Bonus" and "A1000 Bonus" to cover all possible A4000 ROMs, sigh...

Last edited by mark_k; 07 January 2013 at 16:07.
mark_k is offline  
Old 07 January 2013, 18:51   #10
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
mark_k, this check is already present in both loadbsd and boot block loader.

It seems to work right both on my real A1200 and A4000. Are you using correct A4000 Kickstart ROM in WinUAE? I can't test this since I don't have any Windows machine. Does WinUAE run in wine?

I'll implement Gayle ID check on kernel level anyway, might be useful.
strim is offline  
Old 07 January 2013, 19:33   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
I use WinUAE under Wine myself. It works (mostly) fine.

I tested using the configs I attached above. The "A1200" config is with A1200 Kickstart 3.1 (40.68). According to the text shown in the A1200_WinUAE_2013-01-04_1850.png pic above, NetBSD is mis-detecting that as an A4000.
mark_k is offline  
Old 07 January 2013, 20:04   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,794
I selected A1200 quickstart, changed memory and CPU types and added my netbsd5 bootable image: A1200 was detected correctly.
Toni Wilen is offline  
Old 07 January 2013, 20:36   #13
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
What happens if you try the NetBSD_install_A1200.uae config file I attached above? That's got A1200 chipset extra, A1200 Kickstart 3.1, Compatible Settings checked in Adv.Chipset, 8MB ZII RAM, 68030+MMU. For me, booting the NetBSD 6.0.1 install HD image I attached before, it always reports A4000 not A1200.
mark_k is offline  
Old 07 January 2013, 20:49   #14
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 42
Posts: 19,794
Your NetBSD6 image seems to never detect A1200. NetBSD5 works.
Toni Wilen is offline  
Old 10 January 2013, 17:51   #15
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
Testing with the 2013-01-10 15:41 winuae.exe and A4000 emulation the installer boots further. Fingers crossed, it might even actually install fully; but I haven't tried that yet.

Update: Installation might be possible via FTP and WinUAE's A2065 emulation, but I was running under Wine where that probably won't work. So I created an Amiga FFS partition on the HD and copied the NetBSD installation files there. On booting next time, after specifying the Amiga FFS partition the NetBSD installer reported:
mount_ados: /dev/wd0d on /mnt2: Device busy
Cannot mount disk. Aborting.

The FFS partition I created uses 1024-byte blocks. I'll try reformatting it to use 512-byte blocks in case that was the cause of the problem. Edit: it wasn't, same happens with 512-byte-block FFS partition.

If anyone wants to test this without the hassle of copying the NetBSD files to the HD first, I will upload an archive containing my HD image. It's about 162MB in size. Use the NetBSD_install_A4000.uae config file above with it. http://www..com/archive/LYteB...-01-10tar.html
Attached Thumbnails
Click image for larger version

Name:	NetBSD_install_2013-01-10.png
Views:	197
Size:	15.7 KB
ID:	33822   Click image for larger version

Name:	NetBSD_install_2013-01-10_2.png
Views:	230
Size:	15.7 KB
ID:	33825  

Last edited by mark_k; 10 January 2013 at 18:58.
mark_k is offline  
Old 11 January 2013, 01:45   #16
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
I'm not sure what's the deal here. Are you sure that you're referencing the right parition name? Device buys sounds as it was already mounted. You can always drop down to shell by pressing ctrl+C and use mount comand to examine already mounted filesystems. Also disklabel command will display the partition table.
strim is offline  
Old 11 January 2013, 14:10   #17
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
The partition wasn't already mounted. It turns out that though the installer said "Cannot mount disk. Aborting.", it did actually mount the partition. If I then answer y to Extract more sets? and specify /mnt2 for the partition with installation sets, the installer finds them and I can proceed with installation.

So I'm not sure whether that's a NetBSD installer bug or WinUAE issue. If you have a few minutes to check yourself, load the NetBSD_install_A4000.uae config into WinUAE and use the ~162MB hardfile I uploaded (see previous message). The hardfile partitions are: wd0a (will be root partition), wd0b (swap, miniroot.fs written there), wd0d (Amiga FFS, contains install sets).
mark_k is offline  
Old 11 January 2013, 17:03   #18
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
Good news! The installer seemed to complete successfully and I was able to reboot, log in as root, and run startx. After quite a long wait I got the default X background and mouse pointer, but then X quit with the display shown below. I don't know whether or not that's normal/expected behaviour.

If anyone wants to test/use the installed NetBSD further, I have uploaded an updated HD image. The archive is about 88.5MB. It's the HD image after installation completed, with the AmigaDOS partition (which used to contain the NetBSD installation sets) zeroed-out to save space. http://www..com/archive/UhZ_t...nstall_ze.html
Attached Thumbnails
Click image for larger version

Name:	NetBSD_2013-01-11.png
Views:	206
Size:	16.1 KB
ID:	33831  

Last edited by mark_k; 11 January 2013 at 17:08.
mark_k is offline  
Old 13 January 2013, 21:31   #19
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,627
I noticed that with the -A option (which is the default) on AGA machines NetBSD uses a programmed Euro72-like mode. [I have no idea why it doesn't use a similar mode on ECS machines; it just uses normal NTSC there.]

In that mode the right part of the display (the last 8 character columns, so about 64 pixels) is blanked. And there's a large blank part to the left of the text. Does that happen on a real Amiga?

Booting on an emulated AGA machine, WinUAE reports the custom mode like this:
Code:
NTSC mode dblscan V=69.0292Hz H=31399.5175Hz (114x450+1) IDX=11 (NTSC) D=0 RTG=0
P96FREQ: 450*69.0292 = 31063.1579 / 69.0 = 450
POS (0 0 768 576) - (12 -75 780 501)[768,576] (0 0)
BEAMCON0=1B88 VTOTAL=01C1  HTOTAL=0071
  HSSTOP=0016 HBSTRT=0005  HBSTOP=0016
  VSSTOP=0006 VBSTRT=0001  VBSTOP=0019
  HSSTRT=000C VSSTRT=0003 HCENTER=004A
NTSC mode dblscan V=69.0292Hz H=31399.5175Hz (114x450+1) IDX=11 (NTSC) D=0 RTG=0
P96FREQ: 450*69.0292 = 31063.1579 / 69.0 = 450
Attached Thumbnails
Click image for larger version

Name:	NetBSD_boot_A4000_AGA.png
Views:	152
Size:	13.8 KB
ID:	33856   Click image for larger version

Name:	NetBSD_boot_A3000_ECS.png
Views:	161
Size:	14.8 KB
ID:	33857  
mark_k is offline  
Old 14 January 2013, 21:19   #20
strim
NetBSD developer
 
Join Date: May 2012
Location: Warsaw, Poland
Posts: 398
Quote:
Originally Posted by mark_k View Post
Good news! The installer seemed to complete successfully
Congratulations . Knowing user-friendliness of the NetBSD installer, I think you deserve them.

Quote:
I got the default X background and mouse pointer, but then X quit with the display shown below. I don't know whether or not that's normal/expected behaviour.
No, that's not normal or expected. But I never saw this on a real machine. Do you have ptyfs mounted on /dev/pts ? Not enough ptys error is weird.

Quote:
I noticed that with the -A option (which is the default) on AGA machines NetBSD uses a programmed Euro72-like mode. [I have no idea why it doesn't use a similar mode on ECS machines; it just uses normal NTSC there.]
It should work on ECS, but I think that the person who added support for these modes had only access to AGA machine. That's something I should look into (one day...).

Quote:
In that mode the right part of the display (the last 8 character columns, so about 64 pixels) is blanked. And there's a large blank part to the left of the text. Does that happen on a real Amiga?
No, that does not happen on a real Amiga. At lesast it didn't when I used this mode last time (I usually use NetBSD on my A3000, where -A isn't even needed because of integrated scan doubler).
strim 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
A600 IDE emulation alexh support.WinUAE 2 23 October 2012 22:08
WinUAE 2.3.2 IDE emulation does not work any more thomas support.WinUAE 4 03 July 2011 15:51
A4000 Ide Heavyweight7t6 support.Hardware 22 07 April 2006 14:25
a4000/a1200 ide controller.. poppe support.Hardware 3 14 June 2005 08:36
IDE cd-burner for A4000 th4t1guy support.Hardware 6 19 January 2003 20:28

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 02:00.


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