A library of tap2sna.py recipes

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Just added the t2s2sna.py utility to the repository. It's a simple wrapper around tap2sna.py that runs it against either a local t2s file or a remote one in the t2sfiles repository. For example:

Code: Select all

$ t2s2sna.py manic-miner.t2s
Downloading https://github.com/skoolkid/t2sfiles/raw/master/t2s/m/manic-miner.t2s
Downloading https://worldofspectrum.org/pub/sinclair/games/m/ManicMiner.tzx.zip
Extracting Manic Miner.tzx
Program: ManicMiner
Fast loading data block: 23755,78
Bytes: mmm       
Fast loading data block: 22784,256
Bytes: mm1       
Fast loading data block: 32768,32768
Tape finished
Simulation stopped (PC at start address): PC=33792
Writing manic-miner.z80
Perfect if you can't be bothered to keep a local clone of the t2sfiles repository up to date for some reason @PeterJ amirite! :D
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

@SkoolKid

What is a best way to create recipe for pure basic program?
Or even basic, that loads several code blocks, and then loads and runs another basic... ?
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Bedazzle wrote: Fri Sep 15, 2023 11:05 pm What is a best way to create recipe for pure basic program?
The way I've done it is to use these options:

Code: Select all

--start 1343
--sim-load-config finish-tape=1
See, for example, urban-upstart.t2s.

1343 (0x053F) is the address of SA/LD-RET.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

Perfect loader

Image


Jumbo2 on the left, Jumbo4 on the right

Image
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Bedazzle wrote: Sat Sep 16, 2023 9:40 pm Perfect loader...
Yes, that is definitely one of the most broken loaders (or tapes) you'll find anywhere in the archives!

The phantom typist in tap2sna.py 9.0 can come to the rescue, though:

Code: Select all

https://worldofspectrum.net/pub/sinclair/games/j/JumboStoomlok3737.tap.zip
jumbo-stoomlok-3737.z80
--tape-name "JUMBO.TAP"
--tape-sum 53e61fbb25d09447542b4caa472ee828
--tape-start 3
--start 1343
--sim-load-config finish-tape=1
--sim-load-config 'load=CLEAR 49151: LOAD "" CODE : LOAD "" CODE : LOAD "" CODE : LOAD "" CODE : LOAD "" CODE : LOAD "" CODE : LOAD ""'
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

One more interesting case. After the game loads, and user presses "N" for not loading save, it looks like game is hung.
But... it is basic doing some very long calculations in background...

https://spectrumcomputing.co.uk/pub/sin ... t).tzx.zip
damned-forest.z80
--sim-load
--tape-name "The Damned Forest - Alternate.tzx"
--tape-sum c5798f6eeeefb60c7e860d3f1b12f0d8
--start 1343
--sim-load-config finish-tape=1

Loaded / Pressed "N" key / After some time calculating:
Image Image Image
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Quick update on 128K games in the t2sfiles repository.

There are now 585 t2s files for 128K games in the repo, and I think I've t2s-ified every 128K-only game that actually can be t2s-ified.

For full details on what's in the repo (and what isn't, and why), visit the status page:

https://skoolkit.ca/t2sfiles/
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Achievement unlocked: Add 10000 recipes to the t2sfiles repository.

To be precise, there are now 10068 recipes in the repository. Full details as usual on the status page:

https://skoolkit.ca/t2sfiles/
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

@SkoolKid

If game does internal check for 48K/128K, and switches between beeper/AY - what is a best practice for t2s file? Do I need to create two files for different machines?
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Bedazzle wrote: Tue Sep 26, 2023 9:56 pm If game does internal check for 48K/128K, and switches between beeper/AY - what is a best practice for t2s file? Do I need to create two files for different machines?
I haven't done many 48K/128K titles yet, but yes, that was my plan: one t2s file for each machine, as already done with Chase H.Q. (for example).
Last edited by SkoolKid on Tue Sep 26, 2023 11:20 pm, edited 1 time in total.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

I've just added separate status pages for each of the 16K, 16K/48K, 48K, 48K/128K and 128K machine types:
@Bedazzle, my plan is to concentrate on the remaining 48K titles (https://skoolkit.ca/t2sfiles/48K/). Do you want to concentrate on one of the others so that we don't duplicate work?
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

SkoolKid wrote: Tue Sep 26, 2023 10:56 pm @Bedazzle, my plan is to concentrate on the remaining 48K titles (https://skoolkit.ca/t2sfiles/48K/). Do you want to concentrate on one of the others so that we don't duplicate work?
Yeah, splitting work is a great idea.

Usually before I start working on new titles, I get fresh list (save html), then clean out from there already done ones, and others, like "require contended ram", then these having 128K.
From remaining list trying to implement these I understand from versions point of view (if there is tap/tzx/z80 present, I always prefer tzx, then tap).
If there are different versions with different years and different publisher - at the moment I skip these, or do t2s for both.

Can you add pre-filtered list for TBI only?
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Bedazzle wrote: Wed Sep 27, 2023 5:33 am Can you add pre-filtered list for TBI only?
Yep.
It's still worth checking the repo before starting on any game in these lists, because in some cases there is a t2s file for a game from a compilation tape, but not from the game's individual tape. Bear Island is a good example: there is a t2s file for its release in the Games Tape 1 compilation, but not for its individual tape. So Bear Island really shouldn't be in the 16K TBI list, but my list-making scripts aren't smart enough to work that out.

By the way, if there are multiple releases of a game, I prefer the original published version, but if that doesn't work for some reason, then a re-release is fine.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

SkoolKid wrote: Wed Sep 27, 2023 12:23 pm It's still worth checking the repo before starting on any game in these lists, because in some cases there is a t2s file for a game from a compilation tape,
Yeah, already done several titles before figured that out. :)
SkoolKid wrote: Wed Sep 27, 2023 12:23 pm By the way, if there are multiple releases of a game, I prefer the original published version, but if that doesn't work for some reason, then a re-release is fine.
It is a tough decision anyway. Who knows, what differences (if any, excluding changed Basic/turbolader) are between first release and releases several years later of the same game?
For example, original release of Heavy on the magick from Gargoyle have critical bug (incorrect password given), that was later fixed in Rebound release.
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Status page(s) update: Individual pages for each status and machine type are now discoverable (via links) from the main status page:

https://skoolkit.ca/t2sfiles/

So, for example, to see which games are un-t2s-ifiable because their tapes contain unsupported TZX block types:

https://skoolkit.ca/t2sfiles/UBT/
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

SkoolKid wrote: Tue Sep 26, 2023 10:15 pm I haven't done many 48K/128K titles yet, but yes, that was my plan: one t2s file for each machine, as already done with Chase H.Q. (for example).
But it does not work even with example provided :(

Image
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Bedazzle wrote: Wed Oct 04, 2023 9:55 pm But it does not work even with example provided :(
You need SkoolKit 9.0 (the current development version) for 128K support.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

SkoolKid wrote: Wed Oct 04, 2023 9:59 pm You need SkoolKit 9.0 (the current development version) for 128K support.
Ahhh, I see. Thanks.
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

There are now 12280 recipes in the t2sfiles repository. Details of what's done and what's not on the status page (as usual):

https://skoolkit.ca/t2sfiles/

Only 165 titles remain to be investigated for t2s-ifiability:

https://skoolkit.ca/t2sfiles/TBI/
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: A library of tap2sna.py recipes

Post by Bedazzle »

SkoolKid wrote: Sun Oct 08, 2023 12:53 am Only 165 titles remain to be investigated for t2s-ifiability:
Strange that Corsarios is marked as NTA, while it is present, and more - you already t2sified it.
I did it too, but put 23296 as start address. :)

Archive contains two files for different sides of tape (game part one and two), while each side includes two versions: first one is for 48K, while second is running correctly as +2A (black case).
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Bedazzle wrote: Sun Oct 08, 2023 7:13 pm Strange that Corsarios is marked as NTA, while it is present, and more - you already t2sified it.
Only the 128K version is marked as NTA. I assumed that the 48K version is a pure 48K game (i.e. makes no use of 128K features). If that's incorrect, then I'll make a t2s for 128K.

At some point I'll review all the non-T2S statuses to see if they're correct.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
XvarZ
Drutt
Posts: 20
Joined: Wed Aug 07, 2019 11:59 am

Re: A library of tap2sna.py recipes

Post by XvarZ »

Great tool! :)

But what am I doing wrong with the 128k t2s?
Either they result in a 1K file or crashes when I open the file in Spectaculator.
With vallation-128k.t2s for instance:

Image

The 48k ones do not have any issues (at least all I tried worked fine).

I'm using the latest version from Github, v8.10.

TIA
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

XvarZ wrote: Tue Oct 10, 2023 6:54 pm But what am I doing wrong with the 128k t2s?

[snip]

I'm using the latest version from Github, v8.10.
128K support was added in SkoolKit 9.0 (the version currently in development). You'll have to grab the latest code from the master branch to get Vallation 128K working.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
SkoolKid
Manic Miner
Posts: 407
Joined: Wed Nov 15, 2017 3:07 pm

Re: A library of tap2sna.py recipes

Post by SkoolKid »

Status update on the status page!

I've now split compilations out into the individual titles they contain (where that's known either by me or by ZXDB). That's increased the TBI count a bit, but gives a better idea of what titles remain to be done.

https://skoolkit.ca/t2sfiles/
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
XvarZ
Drutt
Posts: 20
Joined: Wed Aug 07, 2019 11:59 am

Re: A library of tap2sna.py recipes

Post by XvarZ »

SkoolKid wrote: Tue Oct 10, 2023 7:37 pm 128K support was added in SkoolKit 9.0 (the version currently in development). You'll have to grab the latest code from the master branch to get Vallation 128K working.
Awesome!

Thanks a 1000000! ;)
Post Reply