DarkStar.tzx in Spectaculator 6.25

edited September 2007 in Emulators
Hi all

I think I have found a bug in Spectaculator.

Darkstar.tzx(OriginalRelease) wiil not not load.

DarkStar.tap loads

The DarkStar Re-release tzx loads

DarkStar loads in other emulators

When you try to load it seems to keep restarting from a certain point.
Post edited by DodgyGeezer on
«1

Comments

  • edited November 2005
    Have you tried switching the emulated model (e.g. from 48 to 128 or vice versa?)
  • edited November 2005
    I get the same problem in all hardware models.

    I am running XP Pro and and have the XP version of Spectaculator.
  • edited November 2005
    Sometimes just switching off the turbo loader helps with awkward ones - don't know about darkstar though - email Mr. 'taculator himself if it's a bug. Better be quick though there's an update out sometime soon.
    ASpec.
    "I should use simulator loosely 'cos I don't think it's quite like this on the beach with helicopters and fires and the jumping beach buggy" - paulisthebest3uk 2020.
  • edited November 2005
    I normally run Spectaculator with auto loading and fast loading disabled.

    Whatever I try it will not load

    [ This Message was edited by: DodgyGeezer on 2005-11-17 13:53 ]
  • edited November 2005
    I have sent a bug report.

    Thanks for your help.
  • edited November 2005
    @DodgyGeezer,

    I'll try and have a look at it tonight.

    Anyroad, Steve has given me the tape to redump, so their might well be something dodgy anyway.

    Cheers

    Andy

    [ This Message was edited by: Andrew Barker on 2005-11-17 15:39 ]
  • edited November 2005
    Works for me (TM)

    Just tried it and it loads and seems to play fine.

    Windows 2K SP4 + hotfixes
    Spectaculator V 5.30.0371
    All "fast" loading options off
    48K Spectrum mode

    I got the tzx from my (backup dataset) site which I "think" is the same as the one here.

    IF this is a Spectaculator error then it appears to have arrived after my version.

    ADJB


    _________________
    http://www.zxsoftware.co.uk

    This message has been ROT-13 encrypted twice for higher security.

    [ This Message was edited by: ADJB on 2005-11-17 16:33 ]
  • cgcg
    edited November 2005
    I can't get it to load either (slow or fast) using Spectaculator 9.25.0552 - it seems to loose sync shortly (about two seconds) into the main data section of the turbo loader.

    I've tried using tap2wav and loading the wave file as an audio source, but that fails too with an 'R Tape loading error' right at the end of the normal data block that loads the turbo loader.

    The tzx and wave file both loaded into Spin okay.
  • edited November 2005
    @DodgyGeezer.

    Yep, see what you mean. I've got Spectaculator 6.30 here and indeed it fails to load. This MUST be why Steve gave me his original to redump. In fact the Firebird rerelease is beautified so that needs redumping too :o.

    I'll try dumping and using ID.11 blocks just to see if the custom loader uses any wierd timings, short pilot etc. ID.10 can't store these as their fixed in length.

    I've already made a WAV and interestingly the block name of Spectacle is Spectacle 3 so I'm unsure or the original source ?

    One problem with some of the TZXs that have slipped though the net, is that they we're submitted but ripped from compilations and covertapes masquerading as Original and/or ReReleases which kind of makes our job a little harder. Fortunately they put their sig in the TZX file so we know which ones could be effected. Some or which are beautified too.

    Many thanks for the info, I'll get right onto it... Well as soon as my son get's off the retro machine so I can resample it again.

    Cheers

    Andy
  • edited November 2005
    Thanks for your help Andrew.

    I am using the re-release.

    I had completely forgotten about Spectacle

    I used to play DarkStar as a kid on my Speccy 48k. Design Design had a quirky sence of humour! Read the high score table for a start. And of course "Pretty Damn Devastating" The graphics are really fast.

    Forbiddeb Planet is the sequel.

  • edited November 2005
    I have run DarkStar.tzx in RealSpectrum.
    I don't think it's the original version of Darkstar.

    The hi-score table (hall of fame) is different from what I remember.
    There was definatly the line
    MSX is a piece of japanese shit.
  • edited November 2005
    @Dodgy Geezer,

    I've made a new TZX from my original, so have WAV/CSW & TZXs to throw at it.

    The new TZX still acts strange even with ID.11 blocks :o. The CSW and WAV work though ;).

    I'll contact Jon about it.

    Cheers

    Andy
  • edited November 2005
    On 2005-11-17 16:29, ADJB wrote:

    Windows 2K SP4 + hotfixes
    Spectaculator V 5.30.0371
    All "fast" loading options off
    48K Spectrum mode

    To confirm, this works for me too.
    Spectaculator V5.30.0371
    48K mode
    fast load etc off
    Win 98se, AMD XP2400+ 512Mb



    Oh bugger!<br>
  • edited November 2005
    It's being looked into, possibly a conflift with another loader.

    Cheers

    Andy
  • edited December 2005
    Hi
    Has there been any progress?

    When will the new version of Spectaculator be released?

    Regards
    DodgyGeezer
  • edited December 2005
    On 2005-12-31 10:17, DodgyGeezer wrote:
    When will the new version of Spectaculator be released?

    You never give up, do you? ;)
  • edited January 2006
    On 2005-11-19 14:45, DodgyGeezer wrote:
    I have run DarkStar.tzx in RealSpectrum.
    I don't think it's the original version of Darkstar.

    The hi-score table (hall of fame) is different from what I remember.
    There was definatly the line
    MSX is a piece of japanese shit.

    I think that Darkstar had several different High Score sets built in, and it used a random set each time it was loaded. Try loading it (from a tape file, not a snapshot) several times, and see if the High Score texts differ. You can enter stuff as well, such as "Jet Set Willy" (or was it "Jetset Willy"?) and "C&VG" into the high score table instead of your name (don't enter the quotes, though), to get different responses. I think Crash magazine once listed a load of phrases you could enter that returned different responses.
  • edited January 2006
    Have you tried downloading a .SNA version? .. I've just tried the .TZX version on Spectaculator 6.0 and it does seem to have problems, the .SNA version works fine
  • edited August 2007
    Thought I'd resurrect this thread as I've finally got around to taking a look at it.

    My first thought was that it's a duff TZX, despite everyone telling me otherwise. Luckily it is - kinda :)

    The loader is actually polarity sensitive(!) It needs a "Set Signal Level" block adding before the main headerless block. Setting it to high should do it.

    Looking through my notes, it appears I changed the default polarity of the TZX renderer between v5 and v6 as it happened to get Mask and Basil working as they were the only polarity sensitive loaders known at the time.

    I haven't bothered disassembling the Firebird version although from a first glance, it appears the offending code was fixed for that release.

    Cheers,

    Jon.
  • edited August 2007
    I am no expert but 'The loader is actually polarity sensitive(!) It needs a "Set Signal Level" block adding before the main headerless block. Setting it to high should do it' would change the program. I know it won't change the way the game runs but the idea of TZX is to preserve the original files unaltered.
    I wonder if loading directly from tape into the emulator would do the trick?
    If this works then maybe the process of of converting audio to TZX isn't a good way of preserving files as this obviously changes the audio somehow defeating the objective of preservation.

    Most other files seem to load ok but it does not mean that no changes have been made to the tzx(when converted to wav) and the original wav file.

    Any thoughts?
  • edited August 2007
    You're making the assumption that the aim of TZX preservation is to capture an exact audio copy, which isn't necessarily the case - it just has to be good enough that it loads in exactly the same way as the original. (And let's not get into what "exact audio copy" means in the digital age... that's a question for vinyl-worshipping hi-fi geeks :-) ) For 99.9% of Spectrum tapes, polarity information is not required - the exceptional cases like this one can be regarded as bad behaviour in fact, because it's difficult or impossible to ensure that polarity will always be correct on a real tape.

    As an analogy, imagine if someone came up with a loader that looked like the standard ROM one, but required the very last pulse to be 0.1% shorter than normal, and crashed if it wasn't. (Again, something that would be hard to achieve reliably on a real tape...) Any automated TZXing software would rightly filter that out as a rounding error. Which is not to say that the TZX format can't represent that - it can, but you wouldn't want to represent every tiny variation in timing, because that would give you massive files all the time. So, in cases like that it's legitimate to do some hand-tuning of the TZX file to make sure it contains all the quirks that are necessary for it to load properly.
  • edited August 2007
    naz2000007 wrote: »
    but it does not mean that no changes have been made to the tzx(when converted to wav) and the original wav file.

    Exactly, it's the TZX->WAV conversion program that decides whether a high pulse level has positive amplitude and low pulse level negative amplitude or vice versa. In Dark Star's case, this is very important.

    With the latest TZX spec, polarity can be set which gets around this problem. PZX is much more elegant in this regard, though.

    As for loading it from a real tape, the loader is programmed to bail out after loading 256 bytes if the polarity was wrong - you can just rewind a bit and it'll try again. (I got the TZX to load into 6.30 of Spectaculator this way). I wonder how many people had this problem back in the day? I don't recall reading anything about it.

    Cheers,

    Jon.
  • edited August 2007
    I've just made a new TZX from the WAV file I have in my WIP folder. Indeed if you use ID.10 blocks it won't work (as per the WoS TZX), but if you force the main block to ID.11 it works (tested in Spectaculator 6.30). I didn't even need a polarity block, though I tried forgetting Spectaculator doesn't support TZX v1.20 :-o. Adding the polarity block didn't work in EightyOne saying that.

    Comparing it in Tapir reveals that the ID.10 block has pilot length of 8063 whereas the ID.11 block has 3129 (which is probably within tolerance of 3223). I imagine the loader is only looking for a short datablock pilot so it stops looking resulting in failure. I'm no expert in taper loaders, that it just my assumption.
    I've noticed a few titles where this occurs and I've released some TZXs using ID.11 for this very reason.

    In such cases and any other non-standard loader, it's worth keeping a WAV/CSW.

    Ah, I've just realised that the Firebird re-release needs redumping as it contains beautified blocks, I'll sower my hard drive
    as I'm sure Steve recently loaned me that to redo.

    Cheers

    Andy
  • edited August 2007
    Maybe I spoke too soon as usual :-o. Works in Spectaculator 6.30 with Fast Loading on or off. Works in Spin Beta 0.622 if you use 'none' for Acceleration Method and turn off Start/Stop the tape automatically (can use CTRL+F1 to speed uploading (Fast Loading)).

    I'll happily stand corrected for a better explanation which I'm sure there will be.

    I can provide a working CSW2 in the next update as well.

    Cheers

    Andy
  • edited August 2007
    Hi Andy,
    ...I imagine the loader is only looking for a short datablock pilot so it stops looking resulting in failure. I'm no expert in taper loaders, that it just my assumption.


    The overall length of the pilot tone is irrelevant as the loader doesn't actually care too much (other than it being <= 65k edges). It's relevant for presentation purposes though ;-)

    However, if the gap (pause) is wrong between the BASIC block and the main headerless block, the loader will regard the tape as a pirate copy and take appropriate action... later :)


    I've put 4 TZXes here. There's the official TZX Vault version, a version with id 11 blocks you sent me ages ago, and those two again but with "Set Signal Level High" blocks added.

    Both the TZX Vault and id 11 blocks version don't work on 6.30 of Spectaculator and 6.22 of SPIN (disable all loading acceleration/auto stop start tapes and make sure "invert tape polarity" is deselected).

    Turning on "invert tape polarity" in SPIN gets them both working. The same is true in Spectaculator if I manually do it in the source code.

    Both the TZXes with the "set signal level high" block work in Spectaculator (with Set Signal Level block support) and SPIN (make sure "invert polarity" is turned off otherwise it'll undo what the set signal level block fixes[1]).

    Cheers,

    Jon.

    [1] Think this might be a bug.
  • edited August 2007
    Interesting thread.
    One question. What does "beautified" mean?
    @DodgyGeezer.
    In fact the Firebird rerelease is beautified so that needs redumping too :o.

    Fortunately they put their sig in the TZX file so we know which ones could be effected. Some or which are beautified too.
  • edited August 2007
    @Jon

    Is it not possible to include a 'reverse signal' function in the emulator which would enable this to load those few programs that require it?
  • edited August 2007
    naz2000007 wrote: »
    @Jon

    Is it not possible to include a 'reverse signal' function in the emulator which would enable this to load those few programs that require it?


    Yes, it would be trivial to do. I'm hesitant to do it as
    1. version 1.20 of the TZX spec was designed to eliminate this problem (see Basil and Mask threads) so it should not be needed anymore.
    2. I don't know of another title that still needs it, and, with an improved TZX of Dark Star, it won't be needed in this case either :)
    3. It's a techy thing that should be hidden away from Joe User, IMO. Most users would not know what 'tape polarity' is in this case (with the exception of the knowledgeable users on this forum, ofc :) )
    Regards,

    Jon.
  • edited August 2007
    I think Jon is right. Since the emulation of Spectaculator
    is 100%(from my experience so far and what I've understood regarding the 'quality' of some TZX files the TZX converting program(forget what its called) needs to be updated to better deal with 'polarity' or a wav file is made available for download from wos for these particular games.

    Before someone says it would be a large file, I know!
  • edited August 2007
    Hi Andy,
    I'll happily stand corrected for a better explanation which I'm sure there will be.


    The offending error in the loader is here: $fc7d (set a breakpoint at $fc7d before loading the game):

    At this point the loader has locked onto the 2 sync pulses and is ready to load the actual data.

    The C register holds the current value of the signal level (EAR bit) up until this point.
    FC7D   01 F8 B0        LD BC,$B0F8
    
    The above code clears the EAR bit in C. This is okay if it's already clear. However, if it wasn't, the loader will now miss the first edge of the actual data coming in (since it misses the high->low transition) or it will see a phantom edge - both are fatal.
    FD26  04            INC B
    FD27  CA 00 FC      JP Z,$FC00
    FD2A  3E 7F         LD A,$7F
    FD2C  DB FE         IN A,($FE)
    FD2E  1F            RRA
    FD2F  A9            XOR C   ; DOH!
    FD30  E6 20         AND $20
    FD32  28 F2         JR Z,$FD26
    
    A possible fix would be
    FC7D  06 B0      LD B,$B0
    FC7F  00         NOP
    
    to avoid messing with C altogether.
    Jon Needle wrote: »
    My first thought was that it's a duff TZX, despite everyone telling me otherwise. Luckily it is - kinda :)

    To be fair, it's a buggy loader that's the real problem here ;-)



    Regards,
Sign In or Register to comment.