English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 15 August 2018, 23:15   #1
roondar
Registered User

 
Join Date: Jul 2015
Location: The Netherlands
Posts: 633
GCR encoding

I wonder if any games used GCR encoding instead. The controller in Paula can apparently read/write this just fine so it might be an interesting thing to know.
roondar is offline  
Old 15 August 2018, 23:23   #2
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 41
Posts: 7,853
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by roondar View Post
I wonder if any games used GCR encoding instead. The controller in Paula can apparently read/write this just fine so it might be an interesting thing to know.
Yes, as stated in the Amiga Bible.
dlfrsilver is offline  
Old 16 August 2018, 10:11   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,107
Quote:
Originally Posted by roondar View Post
I wonder if any games used GCR encoding instead. The controller in Paula can apparently read/write this just fine so it might be an interesting thing to know.
Very unlikely (I don't trust any rumors as usual) because it requires them to be undumped. UAE does not have any GCR support. I am still waiting for game that requires it.. (It has been very long wait).
Toni Wilen is offline  
Old 20 September 2018, 21:01   #4
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 2,868
Quote:
Originally Posted by Toni Wilen View Post
Very unlikely (I don't trust any rumors as usual) because it requires them to be undumped. UAE does not have any GCR support. I am still waiting for game that requires it.. (It has been very long wait).
Alternate Reality has a GCR encoded track according to the WIP on the Softpres site:

Alternate Reality

The first Amiga game found that has a GCR encoded track.
BarryB is offline  
Old 21 September 2018, 00:44   #5
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 41
Posts: 7,853
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by BarryB View Post
Alternate Reality has a GCR encoded track according to the WIP on the Softpres site:

Alternate Reality

The first Amiga game found that has a GCR encoded track.
Interesting, one of my contributors sent me this game to check
dlfrsilver is offline  
Old 21 September 2018, 01:27   #6
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 2,868
Then don't make us wait, does it have any GCR tracks
BarryB is offline  
Old 21 September 2018, 14:00   #7
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,107
I am waiting for image. If there is image format that supports it today..

I guess technically it should work with any raw format but different bit density may cause issues if emulator can't know if track is 2us or 4us or even worse, single track has both densities..
Toni Wilen is offline  
Old 21 September 2018, 14:12   #8
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 41
Posts: 7,853
Send a message via MSN to dlfrsilver
ok, i will post it tonight
dlfrsilver is offline  
Old 21 September 2018, 18:24   #9
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 41
Posts: 7,853
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by Toni Wilen View Post
I am waiting for image. If there is image format that supports it today..

I guess technically it should work with any raw format but different bit density may cause issues if emulator can't know if track is 2us or 4us or even worse, single track has both densities..
I have zoned Alternate Reality v3.0.1 from Datasoft for you Toni.
dlfrsilver is offline  
Old 21 September 2018, 18:54   #10
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,336
There's really a GCR track on it
ross is online now  
Old 21 September 2018, 19:09   #11
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 2,868
Thanks for uploading Denis!


Quote:
Originally Posted by ross View Post
There's really a GCR track on it
Woo Hoo, Toni's long 'wait' is finally over
BarryB is offline  
Old 21 September 2018, 19:26   #12
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,336
Actually the GCR read (track 50) on CTraw image doesn't work (or better, works but the data read is invalid). If you skip the check the game works properly.
Attached Thumbnails
Click image for larger version

Name:	AR.jpg
Views:	118
Size:	37.4 KB
ID:	59913  
ross is online now  
Old 21 September 2018, 19:51   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,107
I added GCR sync emulation support but it does not seem to work.

If at least 9 one bits have been read and first zero bit is detected: sync found, allow DMA. Unless Amiga GCR means something else but HRM says "appl(e) type GCR". Or perhaps parts of whole sync word is also written to memory?
Toni Wilen is offline  
Old 21 September 2018, 19:55   #14
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 2,868
Does that imply the 'dump' was bad, the original disk was bad or that track wasn't mastered correctly?
BarryB is offline  
Old 21 September 2018, 20:00   #15
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 41
Posts: 7,853
Send a message via MSN to dlfrsilver
Quote:
Originally Posted by Toni Wilen View Post
I added GCR sync emulation support but it does not seem to work.

If at least 9 one bits have been read and first zero bit is detected: sync found, allow DMA. Unless Amiga GCR means something else but HRM says "appl(e) type GCR". Or perhaps parts of whole sync word is also written to memory?
Paula on the Amiga support GCR reading and writing, i found some informations inside my Amiga Bible book.

here it is :

ADKCON $09E (write) ADKCONR $010 (Read)

BIT - NAME - Function
-----------------------------------------
Bit 15 => SET/CLR => activated bits or disactivated

Bit 14-13 => PRECOMP = those bits contain PRECOMP value :
Bit 14 Bit 13 PRECOMP time

BIT 12 => MFMPREC => GCR = 0, MFM = 1

BIT 11 => UARTBRK

BIT 10 => WORDSYNC => WORDSYNC = 1 activates the GCR synchronisation of the disk controller on the word present in the register DSKSYNC

i guess this BIT 10 is what you need

BIT 9 => MSBSYNC => MSBSYNC = 1 activates the MSB synchronisation

BIT 8 => FAST => Clock rate of the disk controller
FAST = 1:2 microseconds/bit (MFM)
FAST = 0:4 microseconds/bit (GCR)

dlfrsilver is offline  
Old 21 September 2018, 20:10   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,107
Everyone knows that. It is in HRM! It does not tell anything how it actually works. (Just like WORDSYNC, actual exact behavior was not documented).
Toni Wilen is offline  
Old 21 September 2018, 20:14   #17
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,336
Quote:
Originally Posted by Toni Wilen View Post
I added GCR sync emulation support but it does not seem to work.

If at least 9 one bits have been read and first zero bit is detected: sync found, allow DMA. Unless Amiga GCR means something else but HRM says "appl(e) type GCR". Or perhaps parts of whole sync word is also written to memory?
Can possibly be only 8 one bits? Then if next bit 0 -> sync found and data written by DMA. (9 one bits seems to be a valid normal sequence)
Sure zero is not inserted by DMA because first byte check is for $CC.
ross is online now  
Old 21 September 2018, 20:18   #18
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,107
Quote:
Originally Posted by ross View Post
Sure zero is not inserted by DMA because first byte check is for $CC.
Yes, it checks for $cc but there is no guarantee it needs to be first read byte.
Toni Wilen is offline  
Old 21 September 2018, 20:27   #19
ross
Sum, ergo Cogito

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 48
Posts: 1,336
Quote:
Originally Posted by Toni Wilen View Post
Yes, it checks for $cc but there is no guarantee it needs to be first read byte.
Sure, but if I had to decide how to code a 'sync to MSB' I would do this:
- maximum number of 1 bits consecutive allowed in coding for 1 byte (FF)
- a 0 to invalidate the sequence making an impossible pattern
- a 1 to the MSB of the next byte to indicate valid data
then 'FF' "0" 'CC' it would tell me the first valid byte (CC) after a sync
But they are only suppositions

EDIT: the single "0" can be interpreted as maximum number of consecutive allowed zero on GCR
could be also "00" actual bits, the meaning would not change

Last edited by ross; 21 September 2018 at 20:35.
ross is online now  
Old 21 September 2018, 20:39   #20
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 22,107
I can't find FF<1 or 2 zeros>CC combination from the track buffer.
Toni Wilen is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoding and writing an MFM track phx Coders. Asm / Hardware 15 30 October 2013 11:33
Game with GCR track found ! dlfrsilver project.SPS (was CAPS) 11 18 April 2008 16:22
GCR Format on Amiga NOB Coders. General 24 20 August 2006 03:14

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.09614 seconds with 14 queries