GEMDOS Drive and MiNT

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
frank.lukas
Hardware Guru
Hardware Guru
Posts: 1587
Joined: Tue Jan 29, 2008 5:33 pm
Location: Germany

GEMDOS Drive and MiNT

Postby frank.lukas » Tue Oct 08, 2013 11:03 am

The GEMDOS Drive is not working under MiNT and Hatari ...
fancy Atari Musik anDA Dance "Agare Hinu Harukana" 1998 ATARI http://www.youtube.com/watch?v=JX10fxb5eYE

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby AtariZoll » Tue Oct 08, 2013 1:20 pm

That's normal - because Mint installs hard disk driver on low level, while GEMDOS drives are emulated via Trap #1 hook.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Tue Oct 08, 2013 10:07 pm

One can use Hatari debugger to set the Hatari GEMDOS emulation cartridge trampoline code address back as GEMDOS trap handler.

That doesn't work very well though, because MiNT's GEMDOS replacement added huge number of extra GEMDOS calls which aren't emulated by Hatari.

MiNT has old support for using original TOS routines, if you enable that, I guess Hatari GEMDOS emulation might work. I think that with latest MiNT versions you need to patch MiNT code to get that enabled & working properly though...

Easiest is using disk images, especially with EmuTOS as EmuTOS can boot from a FAT partition image without partition table. Just remember to make it FAT, not VFAT partition.

helmut
Captain Atari
Captain Atari
Posts: 171
Joined: Thu Jan 07, 2010 4:30 pm

Re: GEMDOS Drive and MiNT

Postby helmut » Tue Oct 08, 2013 11:04 pm

Eero Tamminen wrote:
MiNT has old support for using original TOS routines, if you enable that, I guess Hatari GEMDOS emulation might work. I think that with latest MiNT versions you need to patch MiNT code to get that enabled & working properly though...


That works, though there are some 68000-addressing-related bugs which I've fixed. Very handy for testing stuff (similar to aranyms hostfs).

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Wed Oct 09, 2013 9:33 pm

helmut wrote:
Eero Tamminen wrote:MiNT has old support for using original TOS routines, if you enable that, I guess Hatari GEMDOS emulation might work. I think that with latest MiNT versions you need to patch MiNT code to get that enabled & working properly though...


That works, though there are some 68000-addressing-related bugs which I've fixed. Very handy for testing stuff (similar to aranyms hostfs).


Do you have a MiNT build I could test at some point? You could e.g. announce it on mint-devel.

For fun I could profile where time goes with MiNT on emulated Falcon or TT. Or if there's also 68000 binary, on emulated ST. :-)

helmut
Captain Atari
Captain Atari
Posts: 171
Joined: Thu Jan 07, 2010 4:30 pm

Re: GEMDOS Drive and MiNT

Postby helmut » Wed Oct 09, 2013 10:44 pm

I'll commit it the next days. But I'm not sure if OLDTOSFS should go into the "official" builds, it's only useful for hatari I guess. I could enable it for 68000 in my branch or so, better discuss this on mintlist when my stuff is in. But it really works very good.

Here's a screenshot (no drivers involved):

http://forum.atari-home.de/index.php?ac ... 5317;image

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby AtariZoll » Thu Oct 10, 2013 6:55 am

Eero Tamminen wrote:...
Easiest is using disk images, especially with EmuTOS as EmuTOS can boot from a FAT partition image without partition table. Just remember to make it FAT, not VFAT partition.


Surely, disk images are the way for Mint.
Just a question: what VFAT partition exactly means ? Because as I know VFAT refers on Windows long file names. And you can have them in any DOS FAT16, FAT32, NTSC partition ...

As I know, Mint will work with AHDI/TOS type partition without XHDI. With DOS type FAT16 needs XHDI too. So, simplest way should be hard disk driver with XHDI support - and they need partition table. Or, if EmuTOS supports straight boot from AHDI partition, without partition table ... But I doubt that Mint will work without hard disk driver SW - what can not install without MBR . Only if EmuTOS handles properly BIOS Rwabs calls in physical drive mode .
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 746
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: GEMDOS Drive and MiNT

Postby mfro » Thu Oct 10, 2013 10:21 am

AtariZoll wrote:Or, if EmuTOS supports straight boot from AHDI partition, without partition table ... But I doubt that Mint will work without hard disk driver SW - what can not install without MBR . Only if EmuTOS handles properly BIOS Rwabs calls in physical drive mode .


Never tried that, but if EmuTOS runs fine on such "headerless" partitions, MiNT should do well on top of it.
If MiNT finds an XHDI capable driver (the one built into EmuTOS should qualify), it uses that.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Thu Oct 10, 2013 7:19 pm

AtariZoll wrote:Or, if EmuTOS supports straight boot from AHDI partition, without partition table ... But I doubt that Mint will work without hard disk driver SW - what can not install without MBR . Only if EmuTOS handles properly BIOS Rwabs calls in physical drive mode .


EmuTOS supports booting IDE/ACSI disk that has either DOS style partition table, or disk with just a single partition starting from disk beginning (i.e. no MBR). EmuTOS supports only FAT (not VFAT) as partition file system format.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Thu Oct 10, 2013 7:27 pm

helmut wrote:I'll commit it the next days. But I'm not sure if OLDTOSFS should go into the "official" builds, it's only useful for hatari I guess. I could enable it for 68000 in my branch or so, better discuss this on mintlist when my stuff is in. But it really works very good.


Thanks, that's great to hear!

helmut wrote:Here's a screenshot (no drivers involved):
http://forum.atari-home.de/index.php?ac ... 5317;image


In case you're interested on using Hatari for profiling MiNT/XaAES, here's some documentation:
  • http://hg.tuxfamily.org/mercurialroot/hatari/hatari/raw-file/tip/doc/manual.html#The_debugger
  • http://www.atari-forum.com/viewtopic.php?f=51&t=25576&p=239228 (automating profiling / tracing / debugging)

(In the Hatari debugger section, for performance analysis I would suggest quickly browsing through everything, then reading more carefully "Usage examples", symbols, tracing and profiling subsections.)

I'd be glad to answer questions on using the debugger, either on hatari-devel / mintl mailist lists, or here.

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby AtariZoll » Fri Oct 11, 2013 11:26 am

8)
Eero Tamminen wrote:
AtariZoll wrote:Or, if EmuTOS supports straight boot from AHDI partition, without partition table ... But I doubt that Mint will work without hard disk driver SW - what can not install without MBR . Only if EmuTOS handles properly BIOS Rwabs calls in physical drive mode .


EmuTOS supports booting IDE/ACSI disk that has either DOS style partition table, or disk with just a single partition starting from disk beginning (i.e. no MBR). EmuTOS supports only FAT (not VFAT) as partition file system format.


Sorry to be nickpick, but you did not answer my question(s) . There is some terminology confusion, I think: so, what term VFAT exactly means ?

Myself did in past driver version what can work with just single partition disk. But it is really rare case, and has no real benefit. As I pointed, booting self is not enough. If partition is DOS and not AHDI type, you need XHDI too. And all depends on Mint mostly - if it looks for MBR and partititon table in it, and no such, then will fail, except explicit support for mbr-less partition, what somehow seems unlikely. Anyway, I will do some tests in next days on Falcon and with Hatari.
Last question: what version(s) of Mint+XAES are most recent and good for ST, Falcon ?
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Fri Oct 11, 2013 8:41 pm

As I stated, EmuTOS supports disks having DOS partition table with multiple partitions and disks with single "raw" FAT file system partition (both over ACSI and IDE).

While it provides/supports XHDI API for accessing the data on the disk, I don't know whether it supports disks that have AHDI partition table (in addition to disks with DOS one).

For VFAT, see: http://en.wikipedia.org/wiki/File_Allocation_Table#VFAT

Did that answer your question?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby AtariZoll » Sat Oct 12, 2013 9:38 am

Well, I force this because you said that 'make FAT partition and not VFAT partition'. But it is visible in Wiki too that no such thing as VFAT partition. You create FAT (FAT16) partition and during usage you create/copy some Windows long file named file on it, and it becomes 'VFAT partition' :D
Get the point ?

I did some tests with diverse images and latest EmuTOS 0.9.1 + Hatari 1.7 . It boots from DOS type and AHDI type hard disk images. But only if there is partition table. If it is only partition self image - no boot - stays for both types. What is by me not some big flaw, btw.
Work with DOS partitions over 32MB is good thing, and it was not present in earlier versions of EmuTOS .
I miss option to allow boot via hard disk driver instead EmuTOS driver - or at least I don't see it in emutos.txt or at emutos site.

P.S. tried with setting checksum of bootsector of partition only to $1234, but it changed nothing - no boot, no C drive.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Sat Oct 12, 2013 8:38 pm

AtariZoll wrote:You create FAT (FAT16) partition and during usage you create/copy some Windows long file named file on it, and it becomes 'VFAT partition'.


Correct. Directory entries are part of the file system metadata. With TOS, even drive name is also given as directory entry.

It's fairly typical that newer driver can handle older file system versions/variations, creates them by default in new format and convert old ones to new format when you use the file system, and older drivers not being able to handle the new format. Windows and mtools [1] on Linux "create" VFAT file systems by default. While old MS-DOS just show ugly file names for VFAT, (Emu)TOS is worse, it can corrupt your VFAT file system.

AtariZoll wrote:It boots from DOS type and AHDI type hard disk images. But only if there is partition table. If it is only partition self image - no boot - stays for both types


In case you're interested debugging that issue, EmuTOS code for support disks without partition tables is following, bios/disk.c:

Code: Select all

/*
 * determine whether we're looking at a partitioned
 * or a partitionless disk (like a floppy)
 *
 * returns the size in sectors if it appears to be partitionless
 * otherwise return 0
 */
static ULONG check_for_no_partitions(UBYTE *sect)
{
    struct fat16_bs *bs = (struct fat16_bs *)sect;
    ULONG size = 0UL;
    int i;

    if ((bs->media == 0xf8)
     && (bs->ext == 0x29)
     && (memcmp(bs->fstype,"FAT16   ",8) == 0)
     && (bs->sec[0] == 0)
     && (bs->sec[1] == 0)) {
        for (i = 3; i >= 0; i--)
            size = (size << 8) + bs->sec2[i];
    }

    return size;
}
...
/*
 * scans for Atari partitions on 'xhdidev' and adds them to blkdev array
 *
 */
static int atari_partition(int xhdidev)
{
...
    /* check for DOS disk without partitions */
    if (sect[510] == 0x55 && sect[511] == 0xaa) {
        ULONG size = check_for_no_partitions(sect);
        if (size) {
            add_partition(xhdidev,"BGM",0UL,size);
            KINFO((" fake BGM\n"));
            return 1;
        }
    }


Images created with mformat from mtools work fine:

Code: Select all

$ mformat -i test.img -C -t 9 -h 16 -s 63 ::
$ MTOOLS_NO_VFAT=1 mcopy  -i test.img emudesk.inf ::
$ hatari --tos etos512k.img --acsi test.img

(Change "-t" arg option to make larger disk images.)


[1] You need to use MTOOLS_NO_VFAT environment variable to prevent mtools from "creating" VFAT file system.

PS. If you're really want to argue about semantics, we could start from whether (V)FAT even is a file system... :-)

helmut
Captain Atari
Captain Atari
Posts: 171
Joined: Thu Jan 07, 2010 4:30 pm

Re: GEMDOS Drive and MiNT

Postby helmut » Sat Oct 12, 2013 9:56 pm

Eero Tamminen wrote:
helmut wrote:I'll commit it the next days. But I'm not sure if OLDTOSFS should go into the "official" builds, it's only useful for hatari I guess. I could enable it for 68000 in my branch or so, better discuss this on mintlist when my stuff is in. But it really works very good.


Thanks, that's great to hear!

helmut wrote:Here's a screenshot (no drivers involved):
http://forum.atari-home.de/index.php?ac ... 5317;image


In case you're interested on using Hatari for profiling MiNT/XaAES, here's some documentation:
  • http://hg.tuxfamily.org/mercurialroot/hatari/hatari/raw-file/tip/doc/manual.html#The_debugger
  • http://www.atari-forum.com/viewtopic.php?f=51&t=25576&p=239228 (automating profiling / tracing / debugging)

(In the Hatari debugger section, for performance analysis I would suggest quickly browsing through everything, then reading more carefully "Usage examples", symbols, tracing and profiling subsections.)

I'd be glad to answer questions on using the debugger, either on hatari-devel / mintl mailist lists, or here.



Currently I'm mainly interested in getting the GEMDOS-drive work together with images. I guess there is a clash in drive-letters (GEMDOS is C: and the first partition of the image also?), but I have not done much testing.

The initial version of the code is now in the cvs. If you like you can test it (helmut-enhancements only and only mint000.prg, xaaesst.km). Recently TOS crashes when I lseek from XaAES the boot.log-file from MiNT (on the GEMDOS-drive), don't know why, it worked before. For now it can be disabled by setting write_boot=false in xaaes.cnf.

Also TOS 1.04 without MiNT crashes in 1024x768x4 (double bus-fault), but runs in 640x400x1, but that's another story ...

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Sat Oct 12, 2013 10:31 pm

helmut wrote:Currently I'm mainly interested in getting the GEMDOS-drive work together with images. I guess there is a clash in drive-letters (GEMDOS is C: and the first partition of the image also?), but I have not done much testing.


You can specify what partitions are GEMDOS drives, see Hatari manual:
http://hg.tuxfamily.org/mercurialroot/h ... _emulation
http://hg.tuxfamily.org/mercurialroot/h ... isk_images

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby AtariZoll » Sun Oct 13, 2013 8:41 am

Eero Tamminen wrote:Correct. Directory entries are part of the file system metadata. With TOS, even drive name is also given as directory entry.
It's fairly typical that newer driver can handle older file system versions/variations, creates them by default in new format and convert old ones to new format when you use the file system, and older drivers not being able to handle the new format. Windows and mtools [1] on Linux "create" VFAT file systems by default. While old MS-DOS just show ugly file names for VFAT, (Emu)TOS is worse, it can corrupt your VFAT file system.
In case you're interested debugging that issue, EmuTOS code for support disks without partition tables is following, bios/disk.c:

Code: Select all

....
     && (bs->ext == 0x29)
...


[1] You need to use MTOOLS_NO_VFAT environment variable to prevent mtools from "creating" VFAT file system.
PS. If you're really want to argue about semantics, we could start from whether (V)FAT even is a file system... :-)


That bs->ext is not mandatory for FAT16 partitions. So, better dismiss that condition. What I did is some parameter sanity check - for sector sizes and similar.
I must again say, that not partition creation is relevant, but OS filesystem handler. If it can work with WLFN, then it is 'VFAT' compatible, and as we know DOS and TOS aren't such. There may be some extra arguments, what MicroSoft added when introduced LFN, but it is really irrelevant for old TOS. TOS will screw things with LFN with, or without that, for him unknown extra things.

ANd if I want to discuss about semantics: yes, VFAT is very misleading name. But it can say for ROM and RAM - random access memory ? Isn't ROM such too ? But at least, everyone know what is ROM and what is RAM. With FAT and related it is not the case, and there is a lot of confusion in heads, and many problems.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Sun Oct 13, 2013 2:32 pm

AtariZoll wrote:That bs->ext is not mandatory for FAT16 partitions.


With what FAT format programs checking that is a problem? What about FAT12 or FAT32?

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby AtariZoll » Sun Oct 13, 2013 5:05 pm

Checking self is not problem - and can be done in several ways. Current one not recognise flawless FAT16 partitions where no EBPB. In normal case, you see partition type in MBR, so EBPB is not necessary. If no MBR and ESPB, you still can judge exact partition type with some tests. It can't be much hard. Especially if want only FAT16 support.
And support for AHDI type partitions can be done too without big effort - you need to check usual parameters as sectors/cluster, bytes per sector, etc - and will know that it is AHDI specific FAT16 with large logical sectors.
Well, this is how I see that it will be more useful, for people having diverse partitions, some created long, long time ago.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

BlankVector
Captain Atari
Captain Atari
Posts: 446
Joined: Wed Oct 24, 2007 7:52 pm
Location: France
Contact:

Re: GEMDOS Drive and MiNT

Postby BlankVector » Sun Oct 13, 2013 8:31 pm

Eero Tamminen wrote:EmuTOS supports only FAT (not VFAT) as partition file system format.

EmuTOS supports FAT12 (floppies) and FAT16 (hard disks) partitions of any size (up to the 2GB limit).
If a filesystem contains VFAT long file names, the long file names are safely ignored (unlike Atari TOS) and the short file names will be used instead. In other words, it is safe to use a partition with long file names on EmuTOS. But if you move/copy such files, you will lose the long file names (similar to MS-DOS behaviour). Except that, EmuTOS will not corrupt VFAT partitions.
Subscribe to my new channel Vretrocomputing on YouTube and Facebook.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1718
Joined: Sun Jul 31, 2011 1:11 pm

Re: GEMDOS Drive and MiNT

Postby Eero Tamminen » Sun Oct 13, 2013 8:42 pm

BlankVector wrote:But if you move/copy such files, you will lose the long file names (similar to MS-DOS behaviour). Except that, EmuTOS will not corrupt VFAT partitions.


Looking at the emutos-devel ML archive (and your comment there :)), I see that EmuTOS not working properly with VFAT should have been fixed already in 2010. I think I never got around to testing that and then forgot that the corruption was supposed to be fixed... Sorry about that.

User avatar
patrick295767
Captain Atari
Captain Atari
Posts: 265
Joined: Sun Aug 13, 2006 2:15 pm
Contact:

Re: GEMDOS Drive and MiNT

Postby patrick295767 » Sat Nov 02, 2013 6:34 pm

Would it be possible to port and use the MINT on Linux Debian/Ubuntu?

http://www.thebigconsultant.com/probe/p ... itask2.jpg

I could try to compile sources, if you'd like


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 1 guest