English Amiga Board


Go Back   English Amiga Board > Other Projects > project.SPS (was CAPS)

 
 
Thread Tools
Old 03 January 2021, 09:42   #581
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
I tried loading the IPFs I just uploaded to the Zone in WinUAE 4.4.0. It didn't work.

Toni: Any chance you could take a quick look. The IPF track should decode as MFM 2us timing, 105500 bitcells, and I was hoping that would then get automatically converted to GCR 4us timing according to ADKCON.

As said above, I have successfully written the IPF to disk and tested it, so it is sort of basically right. But an IPF that doesn't work in emulation is no good. One of us has a fix to do.
Keir is offline  
Old 03 January 2021, 10:55   #582
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,692
Quote:
Originally Posted by Keir View Post
I tried loading the IPFs I just uploaded to the Zone in WinUAE 4.4.0. It didn't work.

Toni: Any chance you could take a quick look. The IPF track should decode as MFM 2us timing, 105500 bitcells, and I was hoping that would then get automatically converted to GCR 4us timing according to ADKCON.

As said above, I have successfully written the IPF to disk and tested it, so it is sort of basically right. But an IPF that doesn't work in emulation is no good. One of us has a fix to do.
There is no conversion, stream is assumed to be in correct "format" already.

But if it isn't, how is emulator supposed to know if it is 4us or 2us stream? (if 4us, use it as is, if 2us "convert" it). Or is caps library data always returned in 2us format? (there does not seem to be define for 4us in any header file..)

And how to convert it? It surely isn't as simple as dropping every other bit
(I am not interested in trying to emulate some PLL...)
Toni Wilen is offline  
Old 03 January 2021, 11:28   #583
ross
Defendit numerus

ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 3,213
Sorry Toni maybe I oversimplify the situation and miss some key point because I've no idea how CAPS dll works, but even if it return only 2ns cells when you know by ADKCON that cells are 4ns cannot you convert it in real time?

You do not need a PLL emulation if you trust the flux that is actually 4ns and not 2ns because it must necessarily be consistent with the enlarged cells.

Just an exemple relative to this situation (1 as switch polarity, 0 not):
Code:
2ns cells: 10 10 00 00 10 10 00 00 
4ns cells:  1  1  0  0  1  1  0  0
that is exactly what game protection expect.

I suppose in the IPF there is a similar repeated sequence.
What you need is simply to 'sync' to a 1 in the flux.

EDIT.
Yes, just checked, disk 2, last track, contain a long sequence of $82828282... that exactly one of the expected patterns

Last edited by ross; 03 January 2021 at 11:49.
ross is offline  
Old 03 January 2021, 12:23   #584
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,692
Library returns raw decoded data, not flux changes. Library does all the heavy lifting. Which is nice. But in this case it means emulator gets 2us raw data (perhaps even decoded as MFM so some important data might be already lost?) when it should have been 4us.
Toni Wilen is offline  
Old 03 January 2021, 12:24   #585
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Yes there's the question: Should the bit stream from CAPS library be 4us or 2us cells for this track?

Since IPF only enumerates 2us cells in its type fields, that made sense to me. You could also auto-detect the average cell size by 200ms / #cells.

From that, I was hoping you would basically do what ross says.

Emitting a track with 4us cells is an option, too. I don't think it really matters either way to any of my own IPF routines.

EDIT: This track is stored in the IPF as raw, since it is not valid MFM. The CAPS library will simply spit out the raw bitstream stored in the IPF. It really doesn't do any processing on it.
Keir is offline  
Old 03 January 2021, 12:34   #586
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Also, if the game is being played from a CTRaw or SCP dump, you can expect 2us bitcells. The former I don't think you can do anything about (the flux->bitcell conversion is done in the Amiga or Kryoflux software). The SCP you could, because there's a PLL in UAE's SCP handler, and you could poke the base clock based on ADKCON.
Keir is offline  
Old 03 January 2021, 13:15   #587
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,692
Quote:
Originally Posted by ross View Post
Sorry Toni maybe I oversimplify the situation and miss some key point because I've no idea how CAPS dll works, but even if it return only 2ns cells when you know by ADKCON that cells are 4ns cannot you convert it in real time?

You do not need a PLL emulation if you trust the flux that is actually 4ns and not 2ns because it must necessarily be consistent with the enlarged cells.

Just an exemple relative to this situation (1 as switch polarity, 0 not):
Code:
2ns cells: 10 10 00 00 10 10 00 00 
4ns cells:  1  1  0  0  1  1  0  0
that is exactly what game protection expect.

I suppose in the IPF there is a similar repeated sequence.
What you need is simply to 'sync' to a 1 in the flux.

EDIT.
Yes, just checked, disk 2, last track, contain a long sequence of $82828282... that exactly one of the expected patterns
I can't see any long repeating sequences when looking at the buffer that caps library returns.

If I use above decoding, there is only few dozens of complete $3333, $6666 or $9999 words. Protection code expects 2752(!) of them.
Toni Wilen is offline  
Old 03 January 2021, 13:46   #588
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Quote:
Originally Posted by Toni Wilen View Post
I can't see any long repeating sequences when looking at the buffer that caps library returns.

If I use above decoding, there is only few dozens of complete $3333, $6666 or $9999 words. Protection code expects 2752(!) of them.
Really? Track 159 (aka 79.1) of Zoned smb.zip:b.ipf? I see 141414... for full track returned by CAPS lib.
Keir is offline  
Old 03 January 2021, 13:50   #589
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,692
Quote:
Originally Posted by Keir View Post
Really? Track 159 (aka 79.1) of Zoned smb.zip:b.ipf? I see 141414... for full track returned by CAPS lib.
I didn't notice smb.zip. It does work fine with above logic. (*.ct files don't work)
Toni Wilen is offline  
Old 03 January 2021, 13:58   #590
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Quote:
Originally Posted by Toni Wilen View Post
I didn't notice smb.zip. It does work fine with above logic. (*.ct files don't work)
I don't know that we can do anything about CTR. The problem is that the track is already decoded to bitcells, and with a base clock of 2us it is quite hard to correctly lock onto the flux stream, as 12us is a long zeroes sequence. This is exacerbated by the closer fluxes tending to superimpose and record further apart unless a lot of write precomp is applied. Hence you can end up with something like 4.5us, 11.5us, ... which is much closer to 1010000 than 10100000. And then the PLL goes haywire.

Regarding IPF, what would you rather do: Implement 2us->4us conversion, or have 4us directly in the IPF?
Keir is offline  
Old 03 January 2021, 14:46   #591
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 46
Posts: 24,692
Quote:
Originally Posted by Keir View Post
Regarding IPF, what would you rather do: Implement 2us->4us conversion, or have 4us directly in the IPF?
I added conversion (everything is assumed to always 2us except if image is extended adf and track size "too small" for 2us) but I am not sure which option is best.

There is always need for conversion at least in theory if someone decides to read the 4us track using 2us mode and expect something specific. (It probably does not exist but still..)
Toni Wilen is offline  
Old 03 January 2021, 15:09   #592
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Perhaps the answer is both then. It's hard to say what is "morally right" to put in the IPF. It's a hack either way. I have it working with 4us bit times on that track now, so I think I will go with that. Then it also works with existing releases of UAE.
Keir is offline  
Old 03 January 2021, 15:16   #593
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Ok, disk-analyse is updated (in github) and the final unofficial IPFs are in the Zone. These work for me in WinUAE 4.4.0, no problem!

I am also able to write back to real disk using Greaseweazle. Does anyone else have one and can also give it a try? Kryoflux is untested.
Keir is offline  
Old 03 January 2021, 17:12   #594
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,550
Yes, now works in WinUAE

It also passes the protection check on Disk 2 for me when written back to real disks with a Kryoflux Wrote with my usual Sony MPF920 to random DD disks, tested on an A500, 1.3 with 1mb and loads just fine
BarryB is offline  
Old 03 January 2021, 18:42   #595
Keir
Registered User
 
Join Date: May 2011
Location: Cambridge
Posts: 640
Quote:
Originally Posted by BarryB View Post
Yes, now works in WinUAE

It also passes the protection check on Disk 2 for me when written back to real disks with a Kryoflux Wrote with my usual Sony MPF920 to random DD disks, tested on an A500, 1.3 with 1mb and loads just fine
Case closed then! Thanks Mr B!
Keir is offline  
Old 03 January 2021, 19:33   #596
BarryB
Amigaholic

 
Join Date: Dec 2009
Location: UK
Posts: 3,550
Thanks for creating a working IPF too
BarryB is offline  
Old 03 January 2021, 19:43   #597
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 44
Posts: 20,162
I've now uploaded "Super Mathane Bros.zip" to the Amiga File Server under the directory /Non TOSEC IPFs - Unofficial
DamienD is offline  
Old 04 January 2021, 12:50   #598
dlfrsilver
CaptainM68K-SPS France
dlfrsilver's Avatar
 
Join Date: Dec 2004
Location: Melun nearby Paris/France
Age: 43
Posts: 8,731
Send a message via MSN to dlfrsilver
excellent ! thanks for the work guys !
dlfrsilver is offline  
Old 04 January 2021, 13:11   #599
jurassicman
Registered User

jurassicman's Avatar
 
Join Date: Dec 2017
Location: Bologna/Italy
Posts: 358
Quote:
Originally Posted by DamienD View Post
I've now uploaded "Super Mathane Bros.zip" to the Amiga File Server under the directory /Non TOSEC IPFs - Unofficial

Great!
Thanks Damiend!
jurassicman is offline  
Old 04 January 2021, 15:38   #600
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 44
Posts: 20,162
Quote:
Originally Posted by BarryB View Post
In The Zone Das Telekommando, SPS #1810

Big thanks to Denis for sending me the IPF
Seems I missed this...

Now uploaded to the Amiga File Server under the directory /Non TOSEC IPFs - Official
DamienD 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
SPS/CAPS incomplete for ever Wepl project.SPS (was CAPS) 7 21 August 2018 13:39
How do I install SPS and CAPS games with Whdload? retrogamer project.WHDLoad 8 06 July 2011 17:56
RFC: SPS/CAPS @ back2roots ? hippie2000 project.SPS (was CAPS) 29 06 November 2007 23:25
CAPS (SPS) Plugin... DamienD project.SPS (was CAPS) 8 08 November 2005 09:27
CAPS becomes SPS...!!! Joe Maroni News 37 24 August 2005 10:44

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 05:16.


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