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.

21 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.

  5. Francesco says:

    Hi Luigi. It is possible to use your prg2tap with turbo250 with these color bars (https://csdb.dk/release/?id=136135)? i would really need it, please

  6. Francesco says:

    Yes but the turbo’s save option doesn’t save the turbo loader routine in standard kernal mode, only the program saved whith turbo, right?

    • OK, so if that’s not a possible route, what do you want me to do? Do you expect me to write a turbo loader with color bars? What’s wrong with mine? It has color bars, just a different color effect.

      • Francesco says:

        Yes I know, here in Italy there were sold more than 5.000 games that were saved with that turbo or with the same looking effect with that color bars and there is the need for fixing some of them keeping the same loading routine as the original italian tape. This is the reason I’m asking you if it could be possible to make a custom version for this.. If not no problem…thanks anyway

  7. If the turbo loader is part of a game that works fine, you can extract it from there and use the PRGs from the CBM part to inject it into prg2tap then.

  8. Francesco says:

    Can I send you and example so you can check it and tell me something about?

  9. TSM Carmine says:

    While it’s OK to create forged TAPs that resemble the originals, those should not be spread on the net, in order not to cause confusion. A loader with the same visual effect as the original isn’t necessarily the same, code-wise. Besides, mastering the same game from a PRG file taken from a different source isn’t accurate either, because the actual payload may vary (different compression, different split point in case of double loading). And let’s not forget about pilots, trailers, pauses and so on.

    • Fair point about spreading, indeed. My position is that the TAP community is already heavily polluted, so I see TAP files as playback material. For forensic provenance, and to avoid forgery, the DMP format should be used. The condition for DMP creation, as documented in the format spec article itself, is that these must be sampled from physical media with a hard-real-time embedded system. Unfortunately, some players in this space, such as Cute32 authors, have started creating DMP files in software, thus breaking the conditions of use of the format and what it stood for.

Leave a reply to luigidifraia Cancel reply