PRG2TAP small update

As part of the update to 1.8 PRG2TAP allows the injection of payloads into CBM ROM Loader and Turbo Tape 250 Header blocks that load at $033c instead of just those that load at $0351. The area $033c-$0350 will just be ignored and overwritten based on the options provided to PRG2TAP (e.g. the filename).

This change is motivated by the fact that TAPClean extracts CBM ROM Loader Header contents from $033c so it would be handy to be able to use these files directly in PRG2TAP rather than having to cut out the initial section between $033c and $0350.

Updated packages are available as per below:

Remastering Cabal without customizations is now a matter of using just the original PRG files:

prg2tap -h "0593434142414C20202020202020201F" -p "cabal\001 (033C-03FB) [CABAL________].prg" "cabal\004 (02A7-0333).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\007 (0800-0C3F).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\009 (4000-4FFF).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\011 (0800-0C3F).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\013 (B43E-C7FF).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\015 (4000-43FE).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\017 (C800-CBFE).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\019 (E000-FF3F).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\021 (0C40-B43D).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\023 (C800-CFFE).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\025 (E000-FFF9).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\027 (0200-02A5).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\029 (0800-0C3F).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 "cabal\031 (B43E-C7FF).prg" cabal-side1-remastered-original.tap
prg2tap -a -f -l 1000000 -s "cabal\033 (0400-0C3F).prg" cabal-side1-remastered-original.tap

Quite powerful if you ask me 🙂

So what’s the advantage of doing the above instead of using the TAP cleaning tools available as of today? Of course with this method, PRGs can be customized/bugfixed/replaced prior to remastering. I for one would like to see the title screens fixed as there are at least 2 typos there:

“… YOU CAN INCREASE THE CAN INCREASE THE ODDS …”

“CABAL IS A TRADEMARK OF TAD CORORATION”

About Luigi Di Fraia

I am a Senior DevOps Engineer so I get to work with the latest technologies and open-source software. However, in my private time I enjoy retro-computing.
This entry was posted in Retrocomputing, Technical and tagged , , , , , . Bookmark the permalink.

9 Responses to PRG2TAP small update

  1. nmtcard says:

    Hey Luigi,
    Been keeping an eye on you developments for some time – incredible work!
    Any plans to add other ‘savers’ to PRG2TAP ?
    One that springs to mind is the well known and well documented Novaload – in case the original c64 mastering utility would help, please let me know.
    Cheers

    • luigidifraia says:

      Thanks for the offer! IIRC I do own a copy the masterer for Novaload on a D64 but I don’t recall whether or not I have access to any usage instructions.

      I don’t think it is very likely that I will add a zillion formats to the tool. The reason is that the functionality in PRG2TAP was (re-)written in order to be part of DC2N5 for on-the-fly conversion from PRG to TAP. For such purposes the CBM ROM Loader and Turbo Tape 250 loader, “powered” by my turbo loader implementation based on TrilogicV3.2, should be enough. Besides, when I published my recent development and offered to help mastering TAP files in a few contexts I was made aware of existing alternatives: I would recommend keeping an eye on those 🙂

  2. sharklodon says:

    Hi,
    I have two doubts, or improvements because I don’t know if they are implemented:
    -Could It show the famous color load bars during loading process (with tt250)?
    -Could you add RUN command (as a autorun) when load process has finished?
    Probably they are a tt250 options, but I don’t know.
    Thanks for your big job!!

    • – Color bars are generated by the loader program that runs on the C64: which one have you tried?
      – The RUN command (or alternative auto-start method) is also handled by the loader program.
      My own implementation of the loader has color bars and auto-starts the program after load completes. For an usage example I provide batch files for Windows and Linux, named “example_tt250_bootable”.

  3. sharklodon says:

    Hi Luigi,
    Your example appends in the same file, turbo and program, I want to load separately to reduce tape space. Currently I’m using Turbo 250 by Mr.Z. What turbo load program and process could you recommend me to use it?
    Thanks,

  4. sharklodon says:

    Hi Luigi,
    Related with your cabal’s example, I don’t know why you put -p at the beginning and -s at the last prg file, could you explain me?
    And to use turbo loader, could I put -t in every lines?
    Many thanks,

    • The ‘-p’ option is used to inject code into the CBM boot files (Header and Data), which is where the Freeload instance used by Cabal resides.

      The ‘-s’ option adds some silence at the end of the TAP file.

      You can’t just replace the encoding of data files to TT250 and expect them to be loaded by Freeload. Even if you were changing the loader code inside the CBM boot files themselves, you would still have the issue that some of the parts, after loading and executing, hand off execution to Freeload for loading more parts, meaning that the entry address of Freeload is hard-coded in such parts. Replacing a complex tape loader is a complex reverse engineering job.
      Back in the day it took the best minds to replace e.g. a tape loader with a disk loader: replacing a tape loader with a tape loader is just as demanding. However, the replace operation can be automated for certain tape loaders. I myself wrote a tool a long time ago that transfers a multi-load game that uses the Enigma loader from tape to disk and ensures that the resulting version on disk can be loaded with an Action Replay turbo loader for improved speed: https://csdb.dk/release/?id=144903&show=summary#summary

      By the way, if you run my program without arguments you get some brief help on all available options.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s