Acorn Riscos Machines ( RiscPC A3010 a3000 )

HxC Floppy emulator support for all others computers...
Post Reply
adutchuser
Posts: 4
Joined: Tue Oct 06, 2015 11:22 pm

Acorn Riscos Machines ( RiscPC A3010 a3000 )

Post by adutchuser »

I am having a few teething problems with my new HxC

Model : SD HxC Floppy Emulator REV C (HE10 34 pins interface)
Firmware : v1.8.2.40
Host OS : Acorn RiscOS
Original Disk image file format : Acorn ADF converted to HFE

Jumper settings :
{ 34 PIN } [ ][X][][] {POWER}
_________[X][X][][]
_________[X][ ][][]

HFE Interface mode : 1.44Mb
Double step [x]

Nature of the problem:
- I have to load the disk twice before the host machine recognises a disk exists.
- I manage to read the disk on the acorn riscpc but I get for all images
a variety of errors : disc error 23 at 0/00005000 and 0/00048c00 and 0/0000AC00

Any idea what setting is wrong?

Also would it be possible to add the other acorn ADFS imaging formats ADF / APD / JFD

Thankyou in advance for the advice

references: for JFD etc
http://forums.jaspp.org.uk:9000/forum/viewforum.php?f=25&sid=6c7ac7dd45c106dc3f6220a834b22eee
http://adffs.filecore.net/

adutchuser
Posts: 4
Joined: Tue Oct 06, 2015 11:22 pm

Re: Acorn Riscos Machines ( RiscPC A3010 a3000 )

Post by adutchuser »

Adf works is following settings used
Interface cfg from hfe
Bittrate 250kb s
Track step single step

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Acorn Riscos Machines ( RiscPC A3010 a3000 )

Post by Jeff »

So the issue is solved ?

adutchuser
Posts: 4
Joined: Tue Oct 06, 2015 11:22 pm

Re: Acorn Riscos Machines ( RiscPC A3010 a3000 )

Post by adutchuser »

Yes solved just the support for jfd being added if possible.
After solving I thought someone else would appreciate the settings.
Still only loads floppy after second try :-)

adutchuser
Posts: 4
Joined: Tue Oct 06, 2015 11:22 pm

Re: Acorn Riscos Machines ( RiscPC A3010 a3000 )

Post by adutchuser »

I found some more information on the APD and JFD acorn image formats.
They can be found in the file !structure inside the ZIP of ADFFS (http://adffs.filecore.net/)

----------------------------
APD file structure
------------------

- The APD file is a GZip of an original APD file
- Compressed file always starts:
1F 8B 08 00 00 00 00 00 00 0B EC BD
^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^
| | | | | | | | | |
| | | | | | | | | +- OS
| | | | | | | | +---- xfl
| | | | +--+--+--+------- time
| | | +------------------- gzip flags
| | +---------------------- gzip compression*
| |
+--+------------------------- gzip header

* Compression method: 8 is the only supported format

Original APD file structure:
0 - 7 "APDX0001" identifier
8 - B t0sd - Track 0 SD length in bits
C - F t0dd - Track 0 DD length in bits
10 - 13 t0qd - Track 0 QD length in bits
14 - 1F t1sd - Track 1 SD length in bits
20 - 23 t1dd - Track 1 DD length in bits
24 - 27 t1qd - Track 1 QD length in bits
... repeated to Track 159
77C - 787 Track 160 (blank)
7C4 - 7CF Track 166 (blank)

7D0 Track 0 SD data
+ (t0sd + 7) >> 3 Track 0 DD data
+ (t0dd + 7) >> 3 Track 0 QD data

+ (t0qd + 7) >> 3 Track 1 SD data
+ (t1sd + 7) >> 3 Track 1 DD data
+ (t1dd + 7) >> 3 Track 1 QD data

SD data is big-endian raw FM words
DD/QD data is big-endian raw MFM words

As far as I can tell, the tracks are always sequential, so
physical tracks translate as:

Physical APD
-------------- -------
Side 0 Track 0 > Track 0
Side 1 Track 0 > Track 1
Side 0 Track 1 > Track 2
etc.



MFM details:
------------

Sectors start at the byte following &44895545 - which may not be
byte aligned, so you have to step though a bit at a time

MFM track header (not in an APD, here for reference):

MFM Byte
--- ----
5224 C2
5224 C2
?? FC
9254 4E (repeated 50 times)


MFM sector header:

MFM Byte
--- ----
4489 A1
4489 A1
4489 A1
5554 FE (sector ID marker)
tttt
hhhh
ssss
LLLL
crc1 (CRC of ID)
crc2
9254 4E (repeated 22 times)
AAAA 00 (repeated 12 times)
4489 A1
4489 A1
4489 A1
5545 FB (data ID marker)
1<<(L+7) bytes of data
crc1 (CRC of data)
crc2
9254 4E (repeated 40 times)


FM details:
----------

FM sector header:

MFM Byte
--- ----
AAAA 00
AAAA 00
AAAA 00
AAAA 00
AAAA 00
AAAA 00
F57E FE (sector ID marker)
tttt
hhhh
ssss
LLLL
crc1 (CRC of ID)
crc2
AAAA 00 (repeated 17 times)
F56A FB (data ID marker)
1<<(L+7) bytes of data
crc1 (CRC of data)
crc2
AAAA 00 (repeated 10 times)


Where:
tttt - Track number
hhhh - Side (0 / 1)
ssss - Sector number
LLLL - Sector length (1 << LLLL+7)



Calculating sector timing:

The following equation is used to calculate each sectors timing
from the start of the track, whilst reading an APD file:

200 - ( (200 / (track length in bits))) * (bits left) )



JFD file structure
------------------

A JFD file is a gzip compressed version of the original JFD
file.

Official files should be named "[optional text name] Fxxxxxnn"
(see below for xxxx / nn explanation) eg "Fire & Ice (1995)
(Warner Interactive Entertainment) F0000101" or shortened to
"F0000101" on an Arc that doesn't support long file names.
Provided the last char is the disc number, this could actually
be anything, so "FireIce1" would be valid.

Original JFD file structure:

+0 "JFDI" identifier
+4 Min. version of ADFFS required to handle file * 100
eg 1.25 would be 125
+8 Memory allocation required to load file in bytes
ie uncompressed file size
+12 Disc sequence number - SSSSnnnn
Where:
SSSS is the number of discs in this set
nnnn is the number of this disc
+16 Game ID number (xxxxx) - official release ID of this
floppy set. Unofficial releases should an ID of zero
+20 Image version number: VVVwwwww
Where:
VVV - major release version, 0 being initial release
wwwww - minor versionm, reset to 0 on a major release
and is incremented on each flush / save as
+24 Offset to Track Table, the end of which is denoted by
the start of the Sector Table
+28 Offset to Sector Table, end of which is denoted by
the start of the Data Table
+32 Offset to Data Table
+36 Offset to optional Delta Track Table. Changes to the
Track table are written here post initial release
0 denotes not present
+40 Offset to optional Delta Sector Table. Changes to the
Sector table are written here post initial release
0 denotes not present
+44 Offset to optional Delta Data Table. Changes to the
Data table are written here post initial release
0 denotes not present
+48 Disc title. eg "Fire & Ice (1995) (Warner Interactive
Entertainment) disc 1 of 2", zero terminated.
+304 ... future expansion space (additions in 2.04+)

+304 Bit flags:
0 - Disk write protected
1 - Disk is RW, write delta changes back to JFD
2 - Protect CMOS required
3 - Protect Modules required
4 - Hide Hourglass
5 - Requires Shift-Break to load
6 - Remap video memory to 1FFFFFF downwards

8 - ARM3 compatible
9 - ARM250 compatible
10 - ARM610/710 compatible
11 - ARM7500 compatible
12 - StrongArm compatible
13 = ARM11 compatible

16 - RiscOS 2 compatible
17 - RiscOS 3.1 compatible
18 - RiscOS 3.5 compatible
19 - RiscOS 3.7 compatible
20 - RiscOS 3.8 / 4.x compatible
21 - RiscOS 5.x compatible
22 - RiscOS 6.x compatible
+308 FPS of the original game * 2 (eg 12.5 FPS is 25)
+309 - 311 reserved
+312 Length of Obey file
+316 ... future expansion space (currently 0 bytes)

[Track Table]
+0 Track 0 offset within Sector Table
+4 Track 1 offset within Sector Table
...
+n*4 Track n offset within Sector Table

n can be any value, although to allow writes should be at
least 160. For reference, APD's are 166
A blank track is denoted by FFFFFFFF

[Sector Table]
+0 tt0dnnCs - Sector Header description (see below)
+4 Offset within Data Table of sector data, if this value is
FFFFFFFF no data is associated with the sector. In the
case of a sector with C set, the sector is a stub to
produce a specific error. If C is clear it means the
sector is blank and should be allocated space in the Data
table only if written too.
.. repeats for all sectors in track, two doubles per sector
+n FFFFFFFF - end of track marker

The above repeats for all tracks containing sector data.

[Data Table]
... X bytes of sector data in native byte format.
Does not need to be in disc order, as sectors are located
individually during reads.

[Obey file]
... Obey file used to run the game, can use ADFFS$OSVersion to
check the OS version, in the format &37100 for RO 3.71


Sector Header description: tt0dnnCs
Where:

tt - time of sector from start of index marker in milliseconds
max being 200 (optional, required for duplicate sectors)
0 - currently unused nibble
d - Density value, where:
1 - single
2 - double
4 - quad
8 - octal
nn - sector number
C - CRC bits, where:
bit 0 - ID CRC invalid
bit 1 - Data CRC invalid
bits 2/3 - reserved
s - 1772 sector size, where:
0 - 128 bytes
1 - 256 bytes
2 - 512 bytes
3 - 1024 bytes


ConvRec sector table (16 bytes per entry):

+0 - sector
+1 - track
+2 - 0 normal sector read
1 manually add sector ID without reading from the disc
2 (+12) contains length of raw DiscOp 3 data
+3 - reserved (byte)
+4 - density
+5 - heads
+6 - secspertrack
+7 - log2secsize
+8 - discsize
+12 - 0 or DiscOp 3 data length
+16 - DiscOp 3 data (optional)


ADFFS recording structure (20 bytes per entry):

+0 - DiscOp 0 / 1 / 2 / 3
F manually forced sector ID without data
E DiscOp 3 returns data block, instead of sector ID's (Slappit)
bit 31 indicates a duplicate sector
+4 - disc address
+8 - size of data read
+12 - DiscRec
+16 - disc size

Post Reply