Author Topic: winape + Symbiface 2 + IDE devices  (Read 6137 times)

0 Members and 1 Guest are viewing this topic.

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 781
  • Country: es
  • Liked: 631
  • Likes Given: 430
winape + Symbiface 2 + IDE devices
« on: 01:15, 06 May 15 »
Hi

I think that it was discussed before... but, i can't make work an ide device on winape.

Bonnydos always shows "drive: ---".

Anyone can explain how to make winape work with ide devices?

and the "ide file" i don't know what format to use. Anyone has an "ide file" working on winape to share?


Offline KaosOverride

  • 464 Plus
  • *****
  • Posts: 308
  • Country: es
  • Liked: 191
  • Likes Given: 44
Re: winape + Symbiface 2 + IDE devices
« Reply #1 on: 02:37, 06 May 15 »
If you have a 1 or 2gb FAT16/32 compactflash or other memory card, with no partition table (Formated with RMPrepUSB as USB-FDD) dump it to a file with Winimage


Or if you use Linux create a 1gb file and "format" it with mkfs.fat95 (depends of distro, mkfs.vfat, etc...)


Then use that file with symbos under winape. (Configure for no partition)


Works? If you did it well, then it should work ok.


The problem is, I think, that the "drive" emulation just answers to some IDE commands, the basic for read and write sectors and little more needed to access a known geometry Fat partition dump. All the info is at the FAT header, number of sectors, etc.


But raw geometry is not well emulated, no vendor model info, etc.


I ported an IDE drive info for symbiface, works on real hardware, not at emulators... BDos needs some raw geometry data that the drive should give, but FAT header has the needed replica of that info, so FAT "drives" will work under emulator, other dumps not...


Please someone tell me if I'm not correct.


I uploaded the IDE info drive util link to this forum at a threath asking for the IDE status command, but I think it's also at my MEGA folder at my signature at Amstrad.es.


Edit:

https://mega.co.nz/#!yFlVQAYC!z6LuJaI5u1zZpjBvavtgz4mCQs3VRZ4oFyZszX0_rk0


Here it is.


Source has a custom crt0 header to let return to Basic without messing things with a Run" 
« Last Edit: 02:49, 06 May 15 by KaosOverride »
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #2 on: 17:39, 06 May 15 »
BDOS is using CHS mode for addressing sectors. For this mode you need to know the geometry of the harddisc. I guess WinApe doesn't supports the IDE info command or CHS addressing mode, so BDOS won't work in WinApe.
SymbOS is using LBA mode for addressing sectors, which is the faster way as you don't need to calculate head and track numbers anymore.

Regarding the geometry:
In the 90ies (or even earlier?) harddiscs started to provide only fake data for the old CHS mode: The heads and tracks you addressed didn't exist in reality as the geometry of the harddisc became more complex (more sectors in tracks close to the edge of the platter, less in tracks in the middle, additional spare sectors which replace damaged ones etc.). So CHS mode was only still existing for compatibility with old software but didn't make sense anymore compared to LBA mode.

In LBA mode you don't need any additional information about the device when accessing existing partitions, as the total size is stored in the MBR and the partition header.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 781
  • Country: es
  • Liked: 631
  • Likes Given: 430
Re: winape + Symbiface 2 + IDE devices
« Reply #3 on: 21:45, 06 May 15 »
Now we need a rom for patching AMSDOS compatible with LBA & FAT32  :(

i'm waiting for ACMEDOS, this will be tha bomb!

@Prodatron, SYMDOS was a great idea, why is not in development anymore?




 

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #4 on: 23:15, 06 May 15 »
@Prodatron, SYMDOS was a great idea, why is not in development anymore?

I don't know. It was Flynns idea and project (the WinCPC author), but he disappeared suddenly. The Amsdos FAT implementation of Nilquader, which was nearly finished end of last year (it was based on his working NCxxx SD card driver), has been canceled, too. There seem to be a curse on FAT implementations for the CPC??

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 495
  • Country: de
    • index.php?action=treasury
  • Liked: 244
  • Likes Given: 1252
Re: winape + Symbiface 2 + IDE devices
« Reply #5 on: 23:28, 06 May 15 »
@Prodatron: Just a question. In the Wiki there are two Low-Level-Routines from you to set an address before reading / writing command. Is it correct that I only could use the "IDE48B -> set 48bit address"-Routine (LBA-mode) and not the "IDEADR -> set address" is for CHS mode?
« Last Edit: 00:05, 07 May 15 by HAL 6128 »
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #6 on: 00:05, 07 May 15 »
This article:
SYMBiFACE II:IDE routines - CPCWiki
includes a routine for 28bit LBA or normal CHS addressing and 48bit LBA addressing.

"IDEADR" can be used for both 28bit LBA and CHS, you just have to set the SDH register in a different way to activate LBA or not.
When using 28bit LBA mode you use the following parameters:
Sector = LBA Bit 0-7 (E register)
Track = LBA Bit 8-23 (HL register)
Head = LBA Bit 24-27 (D register)
The upper three bits of the SDH (head+modus -> D) register (bit 5,6,7) must be set to 1, bit 4 selects master(0)/slave(1).

Would be helpful to expand the descriptions in this article a little bit with these information.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 495
  • Country: de
    • index.php?action=treasury
  • Liked: 244
  • Likes Given: 1252
Re: winape + Symbiface 2 + IDE devices
« Reply #7 on: 00:15, 07 May 15 »
Today I tried a little bit by testing your routines in WinApe. If I want to read - let's say - the MBR, is my preparing for the Input HL=&0000, DE=&A000 and BC=&0100 (just to read one sector)?
What is that "call subslp" in the iderdy (Busy-Routine) about? Is that for reading out another Bit (6 or 0) or another waiting loop?
« Last Edit: 00:18, 07 May 15 by HAL 6128 »
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #8 on: 00:23, 07 May 15 »
Today I tried a little bit by testing your routines in WinApe. If I want to read - let's say - the MBR, is my preparing for the Input HL=&0000, DE=&A000 and BC=&0100 (just to read one sector)?
What is that "call subslp" in the iderdy (Busy-Routine) about? Is that for reading out another Bit (6 or 0 )?
Register values seem to be fine!
SubSlp is SymbOS specific and does a "sleep" (RST #30) inside the multitasking environment to pass the CPU time to other tasks for a while. This usually takes 1 framefly, so in the CPCs standard singletasking environment you can replace it with CALL #BD19 or whatever to wait a little bit and do something else.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 495
  • Country: de
    • index.php?action=treasury
  • Liked: 244
  • Likes Given: 1252
Re: winape + Symbiface 2 + IDE devices
« Reply #9 on: 00:32, 07 May 15 »
Oh, thanks.
Just my last question: the general steps for handling a Harddisc are:
1. Wait for drive ready
2. Wait for data request
3. Issue a command
4. Read or Write
(5. Anlayse the data in RAM)?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #10 on: 00:54, 07 May 15 »
Yes, it's exactly like this:
- wait for "ready"
- write SDH register
- wait for "ready"
- write all other LBA parameters (or CHS)
- write command
- wait for "datarequest"
- send/receive 512byte sector
- check error status
If you need more help please ask, I would be very happy to help you with any IDE project :)
« Last Edit: 02:07, 07 May 15 by Prodatron »

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 781
  • Country: es
  • Liked: 631
  • Likes Given: 430
Re: winape + Symbiface 2 + IDE devices
« Reply #11 on: 01:59, 07 May 15 »
The Amsdos FAT implementation of Nilquader, which was nearly finished end of last year (it was based on his working NCxxx SD card driver), has been canceled, too. There seem to be a curse on FAT implementations for the CPC??

And is not possible to get the source code?

if the project is canceled, why not share it with the community?

I don't understand sometimes...

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #12 on: 02:33, 07 May 15 »
And is not possible to get the source code?

if the project is canceled, why not share it with the community?

I don't understand sometimes...

We have to accept, that these are hobby projects. People are not forced to finish something, but it may motivate others to do it.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 781
  • Country: es
  • Liked: 631
  • Likes Given: 430
Re: winape + Symbiface 2 + IDE devices
« Reply #13 on: 03:16, 07 May 15 »
i'm not saying that nobody must finish anything! but if you decide to leave the project... then make it open source an make all avaliable, perhaps someone will continue your project...

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #14 on: 12:10, 07 May 15 »
Yes, but as I said, there seem to be a curse on this on the CPC ;)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.284
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1172
  • Likes Given: 80
Re: winape + Symbiface 2 + IDE devices
« Reply #15 on: 13:04, 07 May 15 »
Yes, but as I said, there seem to be a curse on this on the CPC ;)
my hope is with @SyX and acmedos.
« Last Edit: 00:40, 11 May 15 by CraigsBar »
IRC:  #Retro4All on Freenode

Offline Joseman

  • 6128 Plus
  • ******
  • Posts: 781
  • Country: es
  • Liked: 631
  • Likes Given: 430
Re: winape + Symbiface 2 + IDE devices
« Reply #16 on: 14:15, 07 May 15 »
my hopes are with @SyX tb  ;)

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 495
  • Country: de
    • index.php?action=treasury
  • Liked: 244
  • Likes Given: 1252
Re: winape + Symbiface 2 + IDE devices
« Reply #17 on: 00:52, 09 May 15 »
Yes, it's exactly like this:
- wait for "ready"
- write SDH register
- wait for "ready"
- write all other LBA parameters (or CHS)
- write command
- wait for "datarequest"
- send/receive 512byte sector
- check error status
If you need more help please ask, I would be very happy to help you with any IDE project :)
I got it working! Thanks again.
I'm able to read and analyse the boot sector of WinApe's "blank.ide". It seems to be a somehow assembled FAT32-Image out of WindowNT/XP. But I'm not very familiar with further addressing via LBA. If I want to find e.g. the Root-Directory (better the the LBA) of the first DATA-Cluster, I took a look into the Boot Sector table where I can find the Information of 512 Bytes per Sector / 2 FATs / 10768 Sectors per FAT32 Cluster / Hidden Sectors: 63. Normally I should be able to calculate the address.
I calculated: &5440.
For the 48-Bit addressing (LBA) I loaded Register IX (32-47) with &0000, HL (16-31) with &0000 and DE (0-15) with &5440, A (SDH) with &0A and E with &01.
With without success (only &FF the next 512 Bytes)
What do I do wrong?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #18 on: 01:42, 09 May 15 »
Let me check this tomorrow! (too late today)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #19 on: 10:05, 09 May 15 »
WinApe doesnt support LBA48bit.
Did you already try the LBA28bit addressing methode? This should work fine.

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 495
  • Country: de
    • index.php?action=treasury
  • Liked: 244
  • Likes Given: 1252
Re: winape + Symbiface 2 + IDE devices
« Reply #20 on: 16:59, 10 May 15 »
Yes, you are right. I used LBA48Bit addressing. With 28Bit addressing I have success and an entry to the right calculated cluster to the root Directory where SymbOS is installed.
Cheers.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #21 on: 23:15, 10 May 15 »
Wow, really cool! Are you preparing something?? :)

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 495
  • Country: de
    • index.php?action=treasury
  • Liked: 244
  • Likes Given: 1252
Re: winape + Symbiface 2 + IDE devices
« Reply #22 on: 20:22, 11 May 15 »
First I was just curious about your Low-Level-Routines, how they work, am I able to understand them. The topic becomes interesting, but I doubt that I am able to understand the FAT32 filesystem properly enough to create something. MS FAT32 specs are hard to read or at least to understand (for me). :D
Let's see.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 832
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
  • Liked: 1059
  • Likes Given: 555
Re: winape + Symbiface 2 + IDE devices
« Reply #23 on: 21:19, 11 May 15 »
If you have any questions regarding FAT, just ask! It's much improved compared to CP/M, but it's still very simple and logical and still easy to handle on an 8bit machine. IMHO the Microsoft documentation is written in a very good way, as it is even talking about problems regarding missunderstanding of special definitions (the typical "by 0"/"by 1" problem and other things like "what are the REAL rules for detecting if it's FAT16 or FAT32" etc. etc.).

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 391
  • Likes Given: 60
Re: winape + Symbiface 2 + IDE devices
« Reply #24 on: 01:34, 09 July 15 »
WinApe doesnt support LBA48bit.
Did you already try the LBA28bit addressing methode? This should work fine.

I didn't even know it existed until you mentioned it here. I'll look at implementing LBA-48 but only up to 2TB for now.