Emulation Request

want to talk about MESS/model b/beebem/b-em/electrem/elkulator? do it here!
User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Emulation Request

Post by billcarr2005 » Thu Aug 04, 2011 12:17 am

Would it be at all feasible to add an additional descriptive file as a companion to the standard SSD?
Using Martin's excellent cable and a little tinkering, i've been able to retrieve the full physical dump of a disks data, ie. with the data usually hidden by the track/sector IDs not matching the standard physical descriptors.
If it was possible to have a small file that contained the details of the disk map, which then allowed the disk to be emulated more fully, it could be useful for protected disks, without having to use FDI images

The disk i tested the read theory on was Acornsoft's Labyrinth, which contains unformatted tracks (FA'd when read using BUPXSSD) and tracks with the track/sector IDs messed up, eg. Track 2 Sector 0 has the Track ID 26, Sector ID 80...

I'm not sure if the same methods would work with all disks, must research it further, but regarding an extension to the emulators... any possibility? [-o<

User avatar
Rich Talbot-Watkins
Posts: 1299
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Emulation Request

Post by Rich Talbot-Watkins » Thu Aug 04, 2011 5:55 am

Me too!

I've also thought about this in the past - basically, a way of preserving a DFS disc's format, without needing to turn to such a verbose format as .fdi.

I'm not sure whether it'd be better to implement the extra data as a separate file, or interleaved in (or at the end of) a new type of disc image file (with a different extension). Obviously the advantage of a separate file is that it remains compatible with the old format (provided the disc image has only 256 byte sectors), but it's a bit more messy to require two files.

Anyway, it wouldn't need very much extra data. I'm guessing, per track you'd need the following:

1 byte - Number of sectors in the track (0 for unformatted)

Per sector:
1 byte - Logical track number
1 byte - Head number
1 byte - Logical sector number
1 byte - Sector size
1 byte - Misc flags (bit 0 = CRC error, the rest reserved for future use)

The sectors should be stored starting with the one which appears at the index mark, in order to preserve this information.

I don't think there'd be any need to store things like gap sizes, nor the actual CRCs, given that these things aren't readable by OSWORD 7F anyway.

This would create a very compact format for preserving DFS disc images!

User avatar
MartinB
Posts: 4848
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Emulation Request

Post by MartinB » Thu Aug 04, 2011 7:02 am

For a no emulator-change solution... :-k

If we assume that most discs of this type are single-sided, you could actually create a dsd where intially, the raw image is on the opposite side (Drive 2) with the map and a re-builder program on Drive 0. On booting the disc, the loader is launched which would then re-build the image onto Drive 0 re-creating the jumbled id's. If the map data couldn't all be loaded into memory together with the re-builder, it could be stored well down the initial Drive 0 tracks such that it would gradually be-overwritten as the new image was created. Once complete, the system would re-boot and away you go :D

If the process were considered too slow, the initial boot could ask you to set BeebEm to 100x speed (would need to add that feature to B-em :wink:) and ask you to reset to normal speed a few seconds later before re-booting.

This method would also allow these pseudo-dsd images to be used on a real Beeb where you would finish with a genuine working disc.

User avatar
SarahWalker
Posts: 1093
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Emulation Request

Post by SarahWalker » Thu Aug 04, 2011 8:21 am

The problem with this suggestion is that this would push the number of Acorn protected disc formats to 4 (FDI, IPF, APD, and then this). The first was hard enough, I'm already keeping the third away from 8-bit in an attempt to simplify matters (even though it would be pretty suitable) and I'm not sure I want to put the effort in to getting another format going.

User avatar
MartinB
Posts: 4848
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Emulation Request

Post by MartinB » Thu Aug 04, 2011 8:43 am

I guessed that's how you would feel and hence my suggestion isn't a new format, it would be completely transparent since it's effectively just a complex loader within a normal dsd image that would even run on real hardware. When I mentioned a change to B-em, it was only in relation to a speed control along the lines of the BeebEm feature such that the suggested loader, which needs to create a disc image on the fly, would only take seconds in emulator 'Turbo' mode :wink:

Speed wouldn't be an issue on a real Beeb since you'd only need to run the loader dsd once to create a bootable ssd disc which you could then keep.

User avatar
Rich Talbot-Watkins
Posts: 1299
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Emulation Request

Post by Rich Talbot-Watkins » Thu Aug 04, 2011 9:13 am

I know what you mean Tom about introducing yet another format. In hindsight, it's a shame the original .ssd/.dsd DFS formats weren't 'chunked', as this way it'd be really easy to extend them whilst retaining compatibility with older emulators.

There is actually provision in the .uef specification for disc images (chunk types 0x200-0x202) but I don't know any emulators which use them, nor have I ever seen any disc image files in .uef format. The problem with .uef files is you don't know what they are until you try opening them!

User avatar
SarahWalker
Posts: 1093
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Emulation Request

Post by SarahWalker » Thu Aug 04, 2011 10:27 am

MartinB wrote:When I mentioned a change to B-em, it was only in relation to a speed control along the lines of the BeebEm feature such that the suggested loader, which needs to create a disc image on the fly, would only take seconds in emulator 'Turbo' mode :wink:
Problem is that the 'rebuilding' will require a _lot_ of changes to disc emulation, as no emulator allows that sort of low-level writing to disc. Also the existing 'extended' image formats aren't intended to be written to, and B-em - for very good reasons - won't keep a whole disc in memory, so it has to be stored somewhere and somehow.

Also there's no way B-em can run as fast as you suggest on current hardware - the speed control is limited to 5x for a reason.

User avatar
MartinB
Posts: 4848
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: Emulation Request

Post by MartinB » Thu Aug 04, 2011 11:20 am

If a little knowledge is a dangerous thing, then as far as emulators are concerned I am clearly lethal :D

User avatar
jgharston
Posts: 3126
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Emulation Request

Post by jgharston » Fri Aug 05, 2011 9:07 pm

Rich Talbot-Watkins wrote:Anyway, it wouldn't need very much extra data. I'm guessing, per track you'd need the following:
I drafted such a specification some years back, if I can find it. (I've changed to using auto-generated index files which aren't alphabetical...)

Ah ha!: RawDisk.
1 byte - Number of sectors in the track (0 for unformatted)
Per sector:
1 byte - Logical track number
1 byte - Head number
1 byte - Logical sector number
1 byte - Sector size
1 byte - Misc flags (bit 0 = CRC error, the rest reserved for future use)
The sectors should be stored starting with the one which appears at the index mark, in order to preserve this information.
That's partway between data-only disk image and fully raw disk image, so a sort-of half-cooked format ;)
This would create a very compact format for preserving DFS disc images!
In fact, any disk images.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Mon Jan 02, 2012 4:11 pm

Had some time on my hands yesterday to tinker with my superfluous UPURS transfer program for copy protected disks, which details each track that is read. Details below belong to Labyrinth, it appears more readable in the logfile that is produced, using a fixed font width :?
Disk Information Dumper wrote: Drive 0 80 tracks
Tr# NoS Se# TID SID Hd# IDsiz REsiz Err
00 0A Standard


01 Unformatted


02 0A 00 26 80 00 0100 0100 OK
01 26 81 00 0100 0100 OK
02 26 82 00 0100 0100 OK
03 26 83 00 0100 0100 OK
04 26 84 00 0100 0100 OK
05 26 85 00 0100 0100 OK
06 26 86 00 0100 0100 OK
07 26 87 00 0100 0100 OK
08 26 88 00 0100 0100 OK
09 26 89 00 0100 0100 OK

03 Unformatted


04 0A 00 26 80 00 0100 0100 OK
01 26 81 00 0100 0100 OK
02 26 82 00 0100 0100 OK
03 26 83 00 0100 0100 OK
04 26 84 00 0100 0100 OK
05 26 85 00 0100 0100 OK
06 26 86 00 0100 0100 OK
07 26 87 00 0100 0100 OK
08 26 88 00 0100 0100 OK
09 26 89 00 0100 0100 OK

05 Unformatted


06 Unformatted


07 Unformatted


08 0A 00 24 80 00 0100 0100 OK
01 24 81 00 0100 0100 OK
02 24 82 00 0100 0100 OK
03 24 83 00 0100 0100 OK
04 24 84 00 0100 0100 OK
05 24 85 00 0100 0100 OK
06 24 86 00 0100 0100 OK
07 24 87 00 0100 0100 OK
08 24 88 00 0100 0100 OK
09 24 89 00 0100 0100 OK

09 Unformatted


0A Unformatted


0B Unformatted


0C 0A 00 22 80 00 0100 0100 OK
01 22 81 00 0100 0100 OK
02 22 82 00 0100 0100 OK
03 22 83 00 0100 0100 OK
04 22 84 00 0100 0100 OK
05 22 85 00 0100 0100 OK
06 22 86 00 0100 0100 OK
07 22 87 00 0100 0100 OK
08 22 88 00 0100 0100 OK
09 22 89 00 0100 0100 OK

0D Unformatted


0E Unformatted


0F Unformatted


10 0A 00 20 80 00 0100 0100 OK
01 20 81 00 0100 0100 OK
02 20 82 00 0100 0100 OK
03 20 83 00 0100 0100 OK
04 20 84 00 0100 0100 OK
05 20 85 00 0100 0100 OK
06 20 86 00 0100 0100 OK
07 20 87 00 0100 0100 OK
08 20 88 00 0100 0100 OK
09 20 89 00 0100 0100 OK

11 Unformatted


12 Unformatted


13 Unformatted


14 0A 00 1E 80 00 0100 0100 OK
01 1E 81 00 0100 0100 OK
02 1E 82 00 0100 0100 OK
03 1E 83 00 0100 0100 OK
04 1E 84 00 0100 0100 OK
05 1E 85 00 0100 0100 OK
06 1E 86 00 0100 0100 OK
07 1E 87 00 0100 0100 OK
08 1E 88 00 0100 0100 OK
09 1E 89 00 0100 0100 OK

15 Unformatted


16 Unformatted


17 Unformatted


18 0A 00 1C 80 00 0100 0100 OK
01 1C 81 00 0100 0100 OK
02 1C 82 00 0100 0100 OK
03 1C 83 00 0100 0100 OK
04 1C 84 00 0100 0100 OK
05 1C 85 00 0100 0100 OK
06 1C 86 00 0100 0100 OK
07 1C 87 00 0100 0100 OK
08 1C 88 00 0100 0100 OK
09 1C 89 00 0100 0100 OK

19 Unformatted


1A Unformatted


1B Unformatted


1C 0A 00 1A 80 00 0100 0100 OK
01 1A 81 00 0100 0100 OK
02 1A 82 00 0100 0100 OK
03 1A 83 00 0100 0100 OK
04 1A 84 00 0100 0100 OK
05 1A 85 00 0100 0100 OK
06 1A 86 00 0100 0100 OK
07 1A 87 00 0100 0100 OK
08 1A 88 00 0100 0100 OK
09 1A 89 00 0100 0100 OK

1D Unformatted


1E Unformatted


1F Unformatted


20 0A 00 18 80 00 0100 0100 Dd
01 18 81 00 0100 0100 Dd
02 18 82 00 0100 0100 Dd
03 18 83 00 0100 0100 Dd
04 18 84 00 0100 0100 Dd
05 18 85 00 0100 0100 Dd
06 18 86 00 0100 0100 Dd
07 18 87 00 0100 0100 Dd
08 18 88 00 0100 0100 Dd
09 18 89 00 0100 0100 Dd

21 Unformatted


22 Unformatted


23 Unformatted


24 0A 00 16 80 00 0100 0100 Dd
01 16 81 00 0100 0100 Dd
02 16 82 00 0100 0100 Dd
03 16 83 00 0100 0100 Dd
04 16 84 00 0100 0100 Dd
05 16 85 00 0100 0100 Dd
06 16 86 00 0100 0100 Dd
07 16 87 00 0100 0100 Dd
08 16 88 00 0100 0100 Dd
09 16 89 00 0100 0100 Dd

25 Unformatted


26 Unformatted


27 Unformatted


28 0A 00 14 80 00 0100 0100 Dd
01 14 81 00 0100 0100 Dd
02 14 82 00 0100 0100 Dd
03 14 83 00 0100 0100 Dd
04 14 84 00 0100 0100 Dd
05 14 85 00 0100 0100 Dd
06 14 86 00 0100 0100 Dd
07 14 87 00 0100 0100 Dd
08 14 88 00 0100 0100 Dd
09 14 89 00 0100 0100 Dd

29 Unformatted


2A Unformatted


2B Unformatted


2C 0A 00 12 80 00 0100 0100 Dd
01 12 81 00 0100 0100 Dd
02 12 82 00 0100 0100 Dd
03 12 83 00 0100 0100 Dd
04 12 84 00 0100 0100 Dd
05 12 85 00 0100 0100 Dd
06 12 86 00 0100 0100 Dd
07 12 87 00 0100 0100 Dd
08 12 88 00 0100 0100 Dd
09 12 89 00 0100 0100 Dd

2D Unformatted


2E Unformatted


2F Unformatted


30 0A 00 10 80 00 0100 0100 Dd
01 10 81 00 0100 0100 Dd
02 10 82 00 0100 0100 Dd
03 10 83 00 0100 0100 Dd
04 10 84 00 0100 0100 Dd
05 10 85 00 0100 0100 Dd
06 10 86 00 0100 0100 Dd
07 10 87 00 0100 0100 Dd
08 10 88 00 0100 0100 Dd
09 10 89 00 0100 0100 Dd

31 Unformatted


32 Unformatted


33 Unformatted


34 0A 00 0E 80 00 0100 0100 Dd
01 0E 81 00 0100 0100 Dd
02 0E 82 00 0100 0100 Dd
03 0E 83 00 0100 0100 Dd
04 0E 84 00 0100 0100 Dd
05 0E 85 00 0100 0100 Dd
06 0E 86 00 0100 0100 Dd
07 0E 87 00 0100 0100 Dd
08 0E 88 00 0100 0100 Dd
09 0E 89 00 0100 0100 Dd

35 Unformatted


36 Unformatted


37 Unformatted


38 0A 00 0C 80 00 0100 0100 Dd
01 0C 81 00 0100 0100 Dd
02 0C 82 00 0100 0100 Dd
03 0C 83 00 0100 0100 Dd
04 0C 84 00 0100 0100 Dd
05 0C 85 00 0100 0100 Dd
06 0C 86 00 0100 0100 Dd
07 0C 87 00 0100 0100 Dd
08 0C 88 00 0100 0100 Dd
09 0C 89 00 0100 0100 Dd

39 Unformatted


3A Unformatted


3B Unformatted


3C 0A 00 0A 80 00 0100 0100 Dd
01 0A 81 00 0100 0100 Dd
02 0A 82 00 0100 0100 Dd
03 0A 83 00 0100 0100 Dd
04 0A 84 00 0100 0100 Dd
05 0A 85 00 0100 0100 Dd
06 0A 86 00 0100 0100 Dd
07 0A 87 00 0100 0100 Dd
08 0A 88 00 0100 0100 Dd
09 0A 89 00 0100 0100 Dd

3D Unformatted


3E Unformatted


3F Unformatted


40 0A 00 08 80 00 0100 0100 Dd
01 08 81 00 0100 0100 OK
02 08 82 00 0100 0100 OK
03 08 83 00 0100 0100 OK
04 08 84 00 0100 0100 OK
05 08 85 00 0100 0100 OK
06 08 86 00 0100 0100 OK
07 08 87 00 0100 0100 OK
08 08 88 00 0100 0100 OK
09 08 89 00 0100 0100 OK

41 Unformatted


42 Unformatted


43 Unformatted


44 0A 00 06 80 00 0100 0100 OK
01 06 81 00 0100 0100 OK
02 06 82 00 0100 0100 OK
03 06 83 00 0100 0100 OK
04 06 84 00 0100 0100 OK
05 06 85 00 0100 0100 OK
06 06 86 00 0100 0100 OK
07 06 87 00 0100 0100 OK
08 06 88 00 0100 0100 OK
09 06 89 00 0100 0100 OK

45 Unformatted


46 Unformatted


47 Unformatted


48 0A 00 04 80 00 0100 0100 OK
01 04 81 00 0100 0100 OK
02 04 82 00 0100 0100 OK
03 04 83 00 0100 0100 OK
04 04 84 00 0100 0100 OK
05 04 85 00 0100 0100 OK
06 04 86 00 0100 0100 OK
07 04 87 00 0100 0100 OK
08 04 88 00 0100 0100 OK
09 04 89 00 0100 0100 OK

49 Unformatted


4A Unformatted


4B Unformatted


4C 0A 00 02 80 00 0100 0100 OK
01 02 81 00 0100 0100 OK
02 02 82 00 0100 0100 OK
03 02 83 00 0100 0100 OK
04 02 84 00 0100 0100 OK
05 02 85 00 0100 0100 OK
06 02 86 00 0100 0100 OK
07 02 87 00 0100 0100 OK
08 02 88 00 0100 0100 OK
09 02 89 00 0100 0100 OK

4D Unformatted


4E Unformatted


4F Unformatted

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Mon Mar 05, 2012 10:57 pm

Decided to create an image of Exile, just to get the

.....x...S..(..........Well, good evening. Hope you're having fun!........

on the track IDs on sector 1.

On BeebEM 4.14, i've attempted to read the track & sector IDs from the DLF file when the disk image is loaded by altering disc8271.cpp, but couldn't get anything working.
Anybody up for a challenge? [-o<
Attachments
Exile.zip
Exile SSD + DLF
(96.23 KiB) Downloaded 135 times

BBCB+64K
Posts: 221
Joined: Mon Mar 22, 2010 9:51 pm
Location: North Norfolk
Contact:

Re: Emulation Request

Post by BBCB+64K » Sun Mar 11, 2012 3:04 pm

I was thinking along the same lines as Bill was about having an additional file format for protected disks like Mini Office II and Stretch, both of which I have on their original disk. FDI images work in B-em but the disk images are on the large size compared to IPF's which are roughly 1/3 of FDI's file size.

So we need a similar format to IPF which stores the extra data in unreadable sectors and tracks. I was thinking of an extension like XDF (eXtended Disk File) which would store all the unreadable data. Question is whose up for the challenge?

Steve
My current setup...

BBC B+ 128k with external DataCentre with 2GB CF Card, 64MB ARM7TDMI Co-Processor and BeebOPL.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Sun Mar 11, 2012 6:17 pm

"Unreadable" data is possibly a misnomer. On the Exile disk, all the data used in the game and protection has been read fine, using standard OSWORD commands, and then stored in the SSD as a usual block of data. The only question is if/when/how the BBC emulator would be able to see that data. In the case of Exile, it's "just" a case of matching the logical track with the physical track, as recorded in the DLF file.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Wed Mar 14, 2012 10:17 am

Mini Office II has only a couple of dodgy tracks, and also has data on the 41st and 42nd tracks. Unfortunately, none of my disc drives seem able to read the last track! :(
What is Stretch? :?:

Drive 0 42 tracks
Tr# NoS Se# TID SID Hd# IDsiz REsiz Err
00 0A Damaged

01 10 00 01 00 00 0080 0100 OK
01 01 02 00 0080 0080 OK
02 01 03 00 0080 0080 OK
03 01 04 00 0080 0080 OK
04 01 05 00 0080 0080 OK
05 01 06 00 0080 0080 Dd
06 01 07 00 0080 0080 Dd
07 01 08 00 0080 0080 Dd
08 01 09 00 0080 0080 Dd
09 01 0A 00 0080 0080 Dd
0A 01 0B 00 0080 0080 Dd
0B 01 0C 00 0080 0080 OK
0C 01 0D 00 0080 0080 OK
0D 01 0E 00 0080 0080 OK
0E 01 0F 00 0080 0080 OK
0F 01 10 00 0080 0080 OK

02 0A Standard
03 0A Standard
04 0A Standard
05 0A Standard
06 0A Standard
07 0A Standard
08 0A Standard
09 0A Standard
0A 0A Standard
0B 0A Standard
0C 0A Standard
0D 0A Standard
0E 0A Standard
0F 0A Standard
10 0A Standard
11 0A Standard
12 0A Standard
13 0A Standard
14 0A Standard
15 0A Standard
16 0A Standard
17 0A Standard
18 0A Standard
19 0A Standard
1A 0A Standard
1B 0A Standard
1C 0A Standard
1D 0A Standard
1E 0A Standard
1F 0A Standard
20 0A Standard
21 0A Standard
22 0A Standard
23 0A Standard
24 0A Standard
25 0A Standard
26 0A Standard
27 0A Standard
28 0A Standard
29 Unformatted

BBCB+64K
Posts: 221
Joined: Mon Mar 22, 2010 9:51 pm
Location: North Norfolk
Contact:

Re: Emulation Request

Post by BBCB+64K » Wed Mar 14, 2012 2:02 pm

Stretch is like an art package by 4mation. It's a flippy disk with the main program on side 1 and the fonts on side 2. Side 1 of the disk has 42 tracks and track 39 seems to be unformatted which an emulated disk image sees it as formatted hence it doesn't load.

Mini Office II seems to have odd sector lengths and sizes. Track 0 seems to have 8 sectors (0-7) and Track 1 has data in it but cannot be copied due to having some odd sector size according to the Kryoflux device I use for imaging.

Steve
My current setup...

BBC B+ 128k with external DataCentre with 2GB CF Card, 64MB ARM7TDMI Co-Processor and BeebOPL.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Wed Mar 14, 2012 3:24 pm

BBCB+64K wrote: Mini Office II seems to have odd sector lengths and sizes. Track 0 seems to have 8 sectors (0-7) and Track 1 has data in it but cannot be copied due to having some odd sector size
Yes, that information mirrors the report above. The Mini Office 2 image i have has padded out 3 sectors on track 0 to make it standard sized, and has a 16 sector track on track 1 :)

BBCB+64K
Posts: 221
Joined: Mon Mar 22, 2010 9:51 pm
Location: North Norfolk
Contact:

Re: Emulation Request

Post by BBCB+64K » Wed Mar 14, 2012 10:39 pm

Hi Bill,

I've managed to extract some data from Track 1 of Mini Office II, don't know if this will be of any use to you? No luck so far trying to get the data from Tracks 40 and 41.

Steve
Attachments
MO2TRK1.zip
(2 KiB) Downloaded 124 times
My current setup...

BBC B+ 128k with external DataCentre with 2GB CF Card, 64MB ARM7TDMI Co-Processor and BeebOPL.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Thu Mar 15, 2012 12:46 am

BBCB+64K wrote:I've managed to extract some data from Track 1 of Mini Office II, don't know if this will be of any use to you?
That "slice" of data correlates with track 1 of a disc image i have. I'm not sure if i've altered the sorting method for reading each sector, or if i've imaged another copy of the disc, since the result i have now is a little different #-o

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Sun Nov 25, 2012 2:30 pm

Thought i would resurrect this thread.
Could somebody check that this works OK?
I've continued in my disk transfer program using Martin's UPURS cable and decided to use a single file instead of having two.
I thought of FSD as Flexible Sector Dump, since the tracks don't have to contain 10 sectors and the sectors don't have to be 256 bytes long.
Since Exile has a strange track 1 in that it has the sector headers but no data, i decided to make this my test subject.
Would somebody who is more capable in C++ programming be able to check over / tidy up my code?
I'm not sure what is wrong, but the disk drive sound chugs constantly (with every sector) and it takes ages to load, but
turning Sound / Sound Effects / Disc Drives off makes it load normal speed.
To load, copy FSDBeebEm into the usual BeebEm directory and the Exile.FSD wherever disc images are.
Attachments
EXILE FSD.zip
Exile FSD
(85.96 KiB) Downloaded 105 times
Last edited by billcarr2005 on Thu Nov 29, 2012 8:59 am, edited 1 time in total.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Sun Nov 25, 2012 4:57 pm

Here is White Panther's Infinity, a 40 track disk with 2816 bytes on 38 of the 40 tracks, instead of the usual 2560.
Attachments
INFINITY.zip
Infinity FSD
(56.23 KiB) Downloaded 116 times

User avatar
jgharston
Posts: 3126
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: Emulation Request

Post by jgharston » Sun Nov 25, 2012 8:15 pm

jgharston wrote:Ah ha!: RawDisk.
1 byte - Number of sectors in the track (0 for unformatted)
Per sector:
1 byte - Logical track number
1 byte - Head number
1 byte - Logical sector number
1 byte - Sector size
Having been extracting data from IMD disk images and reading through the documentaion, the IMD disk format is so close to my putative "raw" format that it's not worth me fiddling with it any more, and use IMD instead. The file format is:
header: arbitary text terminated with &1A
for each track:
1 byte - Track format (&00 = SD FM)
1 byte - Logical track number
1 byte - Head number
1 byte - Number of sectors (s)
1 byte - Sector size (&01=256 bytes)
n bytes - Sector numbers
(n+1)*s bytes - sector contents, prefixed by flag byte (flag=&01 for normal data)
The only problem is that you have to scan the file to count how many tracks it represents.
ExtractIMD is some initial code I've been using to convert an IMD to to SSD or DSD.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Sun Nov 25, 2012 9:14 pm

jgharston wrote: for each track:
1 byte - Track format (&00 = SD FM)
1 byte - Logical track number
1 byte - Head number
1 byte - Number of sectors (s)
1 byte - Sector size (&01=256 bytes)
n bytes - Sector numbers
FSD contains a 6 byte leadin for every sector
1 byte - Logical track number
1 byte - Head number
1 byte - Logical Sector number
1 byte - Sector Size (reported)
The above 4 appear in the track IDs, but i also have
1 byte - Sector Size (physical)
1 byte - Error code
The only problem with this format is that it has all sector sizes the same.
Infinity has tracks 1 to 38 laid out as
track 1
sector id &04, size 1024bytes
sector id &06, size 1024bytes
sector id &08, size 512 bytes
sector id &0A, size 256 bytes

Also the sector size on the track ID can be misreported, as seen on Mini Office II.
I've cobbled together my file from examining copy protected disks and recording what is required to get the disc image emulated correctly. Yes, it might be very specific to only BBC DFS disks but from that point of view it works fine!
Also, with the transfer program, i can create each disc image in a few minutes and it's ready to run immediately.
I appreciate there are many other file formats out there already, but after getting a kryoflux board and seeing how difficult it was to get an IPF file created/supported, i wanted to have a go myself!
Also if ExtractIMD is converting to an SSD or DSD then by definition it won't contain the necessary logical track and sector numbers to allow copy protected games to run properly.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Thu Nov 29, 2012 9:02 am

Through transferring other disks, i'm able to tweak the emulation process. I'm hoping it'll now work with all Acornsoft titles!

EDIT: it didn't!
Attachments
Magic Mushrooms.zip
Magic Mushrooms FSD
(9.76 KiB) Downloaded 108 times

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Thu Nov 29, 2012 11:54 am

Arcadians (40 track) uses tracks with unequal track IDs, then tries to read them.
The catalogue appears to be messed up because BeebEM must strip some of the control codes away, i think.
Attachments
Arcadians.zip
Arcadians
40 track
40|80 track
(27.97 KiB) Downloaded 112 times
Last edited by billcarr2005 on Fri Nov 30, 2012 11:16 am, edited 1 time in total.

User avatar
Rich Talbot-Watkins
Posts: 1299
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Emulation Request

Post by Rich Talbot-Watkins » Thu Nov 29, 2012 12:57 pm

How are you flagging a sector as containing deleted or normal data? I assume also that you always start with physical sector 0, in order to discriminate the case where multiple sectors have the same logical number?

User avatar
Rich Talbot-Watkins
Posts: 1299
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Emulation Request

Post by Rich Talbot-Watkins » Thu Nov 29, 2012 1:09 pm

Also: how is it possible to format a track with sectors of different sizes? Isn't this a fixed parameter of the format command (at least on 8271)?

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Thu Nov 29, 2012 1:49 pm

Rich Talbot-Watkins wrote:How are you flagging a sector as containing deleted or normal data?
If the error code is &20, then it's deleted data. Mini Office II checks the error code, so it's something that needs to be passed on after the sector has been read.
Rich Talbot-Watkins wrote: I assume also that you always start with physical sector 0, in order to discriminate the case where multiple sectors have the same logical number?
Yes. I've only encountered this on Mini Office II so far, i think having a variable LastSector to check which physical sector was just read will allow the second set of sectors to be read.
Rich Talbot-Watkins wrote:Also: how is it possible to format a track with sectors of different sizes? Isn't this a fixed parameter of the format command (at least on 8271)?
I don't know, i guess that's why it was advantageous for copy protection purposes!
Attachments
Acornsoft.zip
Boxer
Volcano
Meteors
Labyrinth
(42.45 KiB) Downloaded 112 times

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Fri Nov 30, 2012 9:09 am

I've written a BBC BASIC program to check/display the contents of an FSD file, all that is required is the title, eg. "EXILE" for EXILE.FSD and the details of each track will be displayed. It's a compiled EXE, which Avast wanted to open in a sandbox, but it contains no malicious code!
It just requires to be in the same directory as the FSD files.

EDIT: bad copy/paste to one line meant it wasn't reporting the real size correctly.
Attachments
FSD_Report.zip
(53.36 KiB) Downloaded 115 times
Last edited by billcarr2005 on Fri Nov 30, 2012 11:18 am, edited 1 time in total.

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Fri Nov 30, 2012 11:18 am

With the addition of correct reporting of error codes, Starquake now works!
Attachments
STARQUAKE.zip
Starquake
(33.7 KiB) Downloaded 114 times

User avatar
billcarr2005
Posts: 1204
Joined: Fri Sep 09, 2005 3:01 pm
Location: UK
Contact:

Re: Emulation Request

Post by billcarr2005 » Sun Dec 02, 2012 9:40 pm

Have steadily been working through my Acornsoft disks this weekend and also some other disks i wanted to see if it was possible to get working.
Attachments
other FSD.zip
+ some others
(185.29 KiB) Downloaded 125 times
more Acornsoft.zip
Acornsoft sector dumps
(314.65 KiB) Downloaded 123 times
Last edited by billcarr2005 on Fri Jan 11, 2013 10:40 am, edited 1 time in total.

Post Reply