Gcopy Dim files

A forum for anything about the STEem Engine STE emulator, comments, problems, bug reports etc. The current version is v4.1. All support queries should be posted on the SourceForge site.

Moderators: Mug UK, Steem Authors, Moderator Team

User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

And, for emulation authors, (iljor, steem authors, leonard), here are my findings of the FCOPY dim format

UPDATED

offset explaination

00 "BB" header
02 low byte=1=get used sectors,hi byte=1=read disk conf
04 seems to be $0.w always?????
06 hi byte=sides
08 hi byte=sectors
0a hi byte=start track
0c hi byte=end track
0e sector size (bytes)
10 sectors per cluster??? Probably
12 cluster size (bytes)
14 root dir size (sectors)
16 FAT size (sectors)
18 FAT+bootsector size (sectors)??? Probably
1a bootsector+fat+root size (sectors)
1c number of clusters-1 (minus the contents of $1a offset)
1e pad? Seems to be 0 always??

UPDATED

Basically if you see "BB" at the start of the dim file, it's Fcopy. Otherwise it's ECopy.

Mail me if you have any other questions. I want to see full DIM file support on all future versions of our emulators ;)

George
Last edited by ggn on Fri May 13, 2005 12:55 pm, edited 1 time in total.
is 73 Falcon patched atari games enough ? ^^
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Well, v1.1 is now ready. At least a test run with all files provided my Marcer works ok!

Two things I want to add here:

a) FCopy Pro is reported (by Alien of PP IIRC) that it doesn't save te correct disk serial number, and that's probably because the author didn't want to make 1:1 copies because some protections check the serial. I dunno if DIM files store the original serial number or not but when it restores the file to disk, it dumps a different serial than the DIM file (plus changes the CRC to match)! Naturally, I dump whatever is in the file. I just don't know if it's ok.
b) FCopy and ECopy while restoring disks, fill empty clusters with either $e5e5 or $0000. I read from a FAT description that the first byte of the FAT contains the correct pattern to write for empty clusters and I put that.

As you see, these are just purists niggles, they don't alter performance (well, assuming you don't use images with protection :))

Well, that's about that. Please report any bugs, or stuff I neglected to find (I still haven't found out what 2 entries of the DIM file format do!)

George
You do not have the required permissions to view the files attached to this post.
is 73 Falcon patched atari games enough ? ^^
User avatar
Steem Authors
Steem Developer
Steem Developer
Posts: 540
Joined: Tue Apr 30, 2002 10:34 pm
Location: UK
Contact:

Post by Steem Authors »

Thanks a lot for the info ggn, I'll try and improve DIM support in the next version of Steem.

Russ
User avatar
zorg
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 109
Joined: Sat Aug 31, 2002 2:08 pm
Location: France (63)
Contact:

Post by zorg »

Hello,

same thing for me, i'll try to put it into MSA Converter's DIM file support when i'll find some time.

Thanks a lot.

Zorg
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Guys,

please note that the versions above are a bit duff (especially the ECopy support is flakey! Plus there is a bug at the way I check the FAT!!!)! So if anything looks suspicious to you or you need more info/explanations don't hesitate to mail me!

Once I figure out ECopy's imaging method I'll add a newer version here

George
is 73 Falcon patched atari games enough ? ^^
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

After a small talk with Cyclone/XTroll today, he pointed me the bleedin' obvious: that the FAT sizes are equal! So, the table I posted before was edited to what I think the "FAT 2 size" offset represents.

Sorry for this, but I'm still learning about these stuff.

Another nice hint is that you should read FAT 2, as it's the one GEM uses for primary, and FAT 1 is a mere copy of FAT 2 (unlike MSDOS that it's the other way round).

Lots more info should be available on the new Alive issue which is due tomorrow if all goes well (plus a bug-free version of the program I posted here).

George
is 73 Falcon patched atari games enough ? ^^
User avatar
Mug UK
Administrator
Administrator
Posts: 12170
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Post by Mug UK »

Does GCopy have a header to recognise?

If so, then my lazy psuedo code would be:

If recognized_header=fcopy
then go_fcopy
else if
then go_gcopy
else
go ecopy
end

;-)
Main site: www.mug-uk.co.uk - digging up bits from my past: Atari ST, ZX Spectrum, Sega 8-bit (game hacks) and NDS (ripping guides). I host a C64 Radio Show for a mate, Max Hall via www.chipsidshow.co.uk

I develop a free Word (for Windows) add-in for Word 2007 upwards. A toolbox that will allow power Word users to fix document errors. You can find it at: mikestoolbox.co.uk
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Mug,

I haven't even made any images with GCopy yet.

I haven't looked closely, but I think it might be the toughest one to figure out. I have seen another copier by the same company/coder and it copied disks with bad/weak sectors, etc (can't remember the name right now). If he does provide such functions for the images too, it might be a problem understanding the format

George
is 73 Falcon patched atari games enough ? ^^
User avatar
Mug UK
Administrator
Administrator
Posts: 12170
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Post by Mug UK »

My apologies .. mis-read the initial stages of the thread thinking that Marcer had sent you some G-Copy images too .. d'oh!
Main site: www.mug-uk.co.uk - digging up bits from my past: Atari ST, ZX Spectrum, Sega 8-bit (game hacks) and NDS (ripping guides). I host a C64 Radio Show for a mate, Max Hall via www.chipsidshow.co.uk

I develop a free Word (for Windows) add-in for Word 2007 upwards. A toolbox that will allow power Word users to fix document errors. You can find it at: mikestoolbox.co.uk
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Well, after some head scratching & some other in-between projects (such as writing for alive), I think I've fixed the crappy program to work with ECopy and FCopy!

Please use this version and delete all previous versions, they're buggy as hell!!!

And please report any bugs :)

George[/list]
You do not have the required permissions to view the files attached to this post.
is 73 Falcon patched atari games enough ? ^^
User avatar
Marcer
Atarilegend
Atarilegend
Posts: 4505
Joined: Wed Mar 10, 2004 6:21 pm
Location: sweden

Post by Marcer »

Now, i have tested this new version.

All Fcopy files i had worked except 2 of 757 files tested.
All Ecopy files worked except 41 of 1285 files tested.

so you are now very close to an 100% version of your Dim2St !

// Marcer
- Atari ST/FM/E - Mega sTe - Portfolio - Falcon 030 FX 3 in 1 -- Atari 7800/Lynx/Jaguar -
- FTP... Ask for info
- Atari Legend (Games all-a-round)
- Paradize (Chip Music)
- Elite (Atari Softs)
- The Legion (Demos)
- Alive Maggie Team
_/|\_YM-RockerZ_/|\_
User avatar
thothy
Hatari Developer
Hatari Developer
Posts: 449
Joined: Fri Jul 25, 2003 9:36 am
Location: Germany
Contact:

Post by thothy »

ggn wrote:And, for emulation authors, (iljor, steem authors, leonard), here are my findings of the FCOPY dim format
Hi ggn! Thanks a lot for these informations. I've got one thing to add:
According to http://www.atari-forum.com/viewtopic.php?t=2980 you can find a flag at offset $D if the disk is double density (0) or high density (1).
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

thothy wrote:
ggn wrote:And, for emulation authors, (iljor, steem authors, leonard), here are my findings of the FCOPY dim format
Hi ggn! Thanks a lot for these informations. I've got one thing to add:
According to http://www.atari-forum.com/viewtopic.php?t=2980 you can find a flag at offset $D if the disk is double density (0) or high density (1).
Thothy,

first, my apologies for not mentioning you in the list of emulation authors above :oops: I can be so forgetful at times :(

Secondly, here is the (final I hope) description of the DIM header, as found by me and Cyclone/XTroll:

00 "BB" header
02 1=read disk conf, 0=use user's entered data
03 1=get used sectors, 0=get all sectors
04 seems to be $0.w always?????
06 hi byte=sides
08 hi byte=sectors
0a hi byte=start track
0c hi byte=end track
0d 0=double density, 1=hi density
0e-1e a direct copy of the BPB (Cyclone's finding, I couldn't find it meself because I am not familiar with the BPB structure, he reckognised it though).

While implementing be very careful to check for the $4242 ("BB") header at the very start of the file, as ECopy and GCopy use the same extension, but not the same file format!

As Marcer mentions above, my program can parse most of ECopy's disks now (it's not that hard), but I'm waiting for him to send me the disks that don't work, so I can squash the bugs out of the program. Or a brave soul could help debugging the code :)

That's all for now

George
is 73 Falcon patched atari games enough ? ^^
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Hi guys,

I'm trying to fix the last few cases remaining in my program, and right now I'm on the process of converting disks that have invalid or corrupt FAT+BPB and I'm trying to figure ot valid sizes of disk images.

One method is to have a small table of fixed sizes (80,81 or 82 tracks 1 or 2 sides, 9, 10 or 11 sectors).

Another idea is to write a small algorithm like this:

Code: Select all

if int(size/512)=size/512 then      ;check if size is divisable by 512 (sector size)
    size=size/512                         ;convert to sectors
    if (size/9)=size/9                    ;check if it's divisable by 9 (sectors per track)
        size=size/9                        ;convert to tracks
        sectors=9
        if size>82                          ;check to see if we have 2 sides
            tracks=size/2                 ;2 sides
        else
            tracks=size
        endif
    elseif (size/11)=size/99           ;check for 11 sectors
        (........)
    elseif (size/10)=size/10           ;check for 10 sectors
        (........)
    endif
endif
Of course this code can get a bit bloated if I start adding high density disks too (18,19,20,21 sectors if I'm not mistaken)

Can anybody (emulator authors?) recommend something else? Is there an easiest method?

Thanks, George
is 73 Falcon patched atari games enough ? ^^
User avatar
Mug UK
Administrator
Administrator
Posts: 12170
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Post by Mug UK »

Wouldn't it be quicker to do

If MOD (size/512)=0

(i.e if no remainder after division, then must be a whole number)

or is GFA slow on the MOD command?


(also have a look in my PVK source as I do a few calcs on the BPB I think)
Main site: www.mug-uk.co.uk - digging up bits from my past: Atari ST, ZX Spectrum, Sega 8-bit (game hacks) and NDS (ripping guides). I host a C64 Radio Show for a mate, Max Hall via www.chipsidshow.co.uk

I develop a free Word (for Windows) add-in for Word 2007 upwards. A toolbox that will allow power Word users to fix document errors. You can find it at: mikestoolbox.co.uk
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Actually it would :) But this code also works on the 800XL's built in basic, and that's where I learnt about that piece of code and never bothered to think of a faster version ;) (it's not _that_ time critical anyway :))
is 73 Falcon patched atari games enough ? ^^
User avatar
Mug UK
Administrator
Administrator
Posts: 12170
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Post by Mug UK »

That's me told ;-)
Main site: www.mug-uk.co.uk - digging up bits from my past: Atari ST, ZX Spectrum, Sega 8-bit (game hacks) and NDS (ripping guides). I host a C64 Radio Show for a mate, Max Hall via www.chipsidshow.co.uk

I develop a free Word (for Windows) add-in for Word 2007 upwards. A toolbox that will allow power Word users to fix document errors. You can find it at: mikestoolbox.co.uk
User avatar
Steem Authors
Steem Developer
Steem Developer
Posts: 540
Joined: Tue Apr 30, 2002 10:34 pm
Location: UK
Contact:

Post by Steem Authors »

ggn wrote:Can anybody (emulator authors?) recommend something else? Is there an easiest method?
I'm afraid I can't help, Steem's system doesn't work for HD disks either.

Russ
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Steem Authors wrote:
ggn wrote:Can anybody (emulator authors?) recommend something else? Is there an easiest method?
I'm afraid I can't help, Steem's system doesn't work for HD disks either.

Russ
Ouch! Coming from the mouth of Steem developers themselves :)

I've taken the LUT method in the end, seems to work :)

And I've noticed that steem doesn't work ok with hdd disks, as I've converted succesfully 2 hdd disks that don't work ok with steem, but they do with aranym :) Perhaps it's time (for all) to take a peek at their implementation? :):):)

George
is 73 Falcon patched atari games enough ? ^^
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Well, I just now ran a version of my tool that converts all of Marcer's images ok (FCopy and ECopy).

It now works with high density disks.

Contains all sorts of tricks and algos I used to reckognise all possible variations that Marcer sent me over the last weeks.

So, if anyone is left with some interest, download & enjoy :)

George
You do not have the required permissions to view the files attached to this post.
is 73 Falcon patched atari games enough ? ^^
User avatar
Marcer
Atarilegend
Atarilegend
Posts: 4505
Joined: Wed Mar 10, 2004 6:21 pm
Location: sweden

Post by Marcer »

I must salut you GGN,

This version seems to be even better than 100% :)

I tested those bad images i had which got converted ok but didnt work, if you remeber our chat.

They even worked now!

This was a great surprice, Great works, and many thanks for this great tool!

Finally we have converters for all common Disk image formats :)

// Marcer
- Atari ST/FM/E - Mega sTe - Portfolio - Falcon 030 FX 3 in 1 -- Atari 7800/Lynx/Jaguar -
- FTP... Ask for info
- Atari Legend (Games all-a-round)
- Paradize (Chip Music)
- Elite (Atari Softs)
- The Legion (Demos)
- Alive Maggie Team
_/|\_YM-RockerZ_/|\_
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Marcer wrote:I must salut you GGN,

This version seems to be even better than 100% :)

I tested those bad images i had which got converted ok but didnt work, if you remeber our chat.

They even worked now!

This was a great surprice, Great works, and many thanks for this great tool!

Finally we have converters for all common Disk image formats :)

// Marcer
No problem :)

Just as long nobody turns up with 2000 gcopy images ;)

George
is 73 Falcon patched atari games enough ? ^^
User avatar
Steem Authors
Steem Developer
Steem Developer
Posts: 540
Joined: Tue Apr 30, 2002 10:34 pm
Location: UK
Contact:

Post by Steem Authors »

ggn wrote:And I've noticed that steem doesn't work ok with hdd disks, as I've converted succesfully 2 hdd disks that don't work ok with steem, but they do with aranym Perhaps it's time (for all) to take a peek at their implementation?
What TOS version are you using? I have had lots of HD disks that won't work on early versions of TOS but are fine on 2.06.

Russ
User avatar
ggn
Atari God
Atari God
Posts: 1309
Joined: Sat Dec 28, 2002 4:49 pm

Post by ggn »

Steem Authors wrote:
ggn wrote:And I've noticed that steem doesn't work ok with hdd disks, as I've converted succesfully 2 hdd disks that don't work ok with steem, but they do with aranym Perhaps it's time (for all) to take a peek at their implementation?
What TOS version are you using? I have had lots of HD disks that won't work on early versions of TOS but are fine on 2.06.

Russ
Oops, I get your drift! I use 1.62UK. Should probably try them on 2.06! Anyway they do work on aranym and that's exactly what I needed for testing.
is 73 Falcon patched atari games enough ? ^^
User avatar
Marcer
Atarilegend
Atarilegend
Posts: 4505
Joined: Wed Mar 10, 2004 6:21 pm
Location: sweden

Post by Marcer »

Hey GGN.

Belive it or not..

After I have runned about 1300+800 Dim files.. I found 4 (!) dim files which DIM2ST didnt have any ideas about.

they are 800kb sized.. I remeber this 1mb files didnt work. but these 4 may be able to be fixed?

I can send you the files.
just let me know how to send them

// Marcer
- Atari ST/FM/E - Mega sTe - Portfolio - Falcon 030 FX 3 in 1 -- Atari 7800/Lynx/Jaguar -
- FTP... Ask for info
- Atari Legend (Games all-a-round)
- Paradize (Chip Music)
- Elite (Atari Softs)
- The Legion (Demos)
- Alive Maggie Team
_/|\_YM-RockerZ_/|\_
Post Reply

Return to “Steem”