SkoolKit 9.2

Introduce yourself. Pimp your website, competition, event or other activity here, as long as it's Spectrum related.
Post Reply
User avatar
SkoolKid
Manic Miner
Posts: 416
Joined: Wed Nov 15, 2017 3:07 pm

SkoolKit 9.2

Post by SkoolKid »

SkoolKit 9.2 has been released.

TL;DR version for the initiated: RZX support and faster Z80 simulation implemented in C.

For the uninitiated: SkoolKit is a suite of tools that can be used to create a disassembly of a Spectrum game (or any other piece of software), in HTML form or as plain assembly language, from a single set of source files. For example, it has been used in the production of many of the fine disassemblies on this page:

https://skoolkit.ca/links/

With SkoolKit you can:
  • use sna2ctl.py to generate a control file (an attempt to identify routines and data blocks by static analysis) from a snapshot (SNA, SZX or Z80) or raw memory file
  • enable sna2ctl.py to generate a much better control file that more reliably distinguishes code from data by using a code execution map produced by an emulator or rzxplay.py
  • use sna2skool.py along with this control file to produce a disassembly of a snapshot or raw memory file
  • add annotations to this disassembly (or the control file) as you discover the purpose of each routine and data block
  • use skool2html.py to convert a disassembly into a bunch of HTML files (with annotations in place, and the operands of CALL and JP instructions converted into hyperlinks)
  • use skool2asm.py to convert a disassembly into an assembly language source file (also with annotations in place)
  • use skool2ctl.py to convert a disassembly back into a control file (with annotations retained)
  • use skool2bin.py to convert a disassembly into a raw memory file
  • use tap2sna.py to convert a TAP or TZX file into a 'pristine' Z80 or SZX snapshot
  • use snapinfo.py to analyse a snapshot or raw memory file and list the BASIC program it contains, show register values, produce a call graph, find tile graphic data, find text, or find sequences of arbitrary byte values
  • use trace.py to trace the execution of machine code in a snapshot or raw memory file
  • use rzxplay.py to trace the execution of machine code in an RZX file, and produce a code execution map for sna2ctl.py
  • use tapinfo.py to analyse the blocks in a TAP or TZX file, and list the BASIC program it contains
  • use rzxinfo.py to analyse the blocks in an RZX file, and extract snapshots from it
  • use bin2tap.py to convert a snapshot or raw memory file into a TAP file
  • use bin2sna.py to convert a raw memory file into a Z80 or SZX snapshot
  • use snapmod.py to modify the register values or memory contents in a Z80 or SZX snapshot
  • use sna2img.py to convert graphic data in a disassembly, SCR file, snapshot or raw memory file into a PNG image
In an HTML disassembly produced by skool2html.py you can also:
  • use the image macros to build still and animated PNG images from graphic data
  • use the #AUDIO macro to build WAV files for sound effects and tunes
  • use the #R macro in annotations to create hyperlinks between routines and data blocks that refer to each other
  • use [Bug:*], [Fact:*] and [Poke:*] sections in a ref file to neatly render lists of bugs, trivia and POKEs on separate pages
For full details on what's new in 9.2, check the changelog.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
highrise
Manic Miner
Posts: 332
Joined: Fri Mar 20, 2020 11:29 pm

Re: SkoolKit 9.2

Post by highrise »

Just wanted to take the opportunity to thank you for all the work you have put into this over the years, the community really appreciates it.
User avatar
SkoolKid
Manic Miner
Posts: 416
Joined: Wed Nov 15, 2017 3:07 pm

Re: SkoolKit 9.2

Post by SkoolKid »

highrise wrote: Sun May 12, 2024 8:10 pm Just wanted to take the opportunity to thank you for all the work you have put into this over the years, the community really appreciates it.
Thanks! At 14+ years, SkoolKit's now in the cranky teenager phase. I'll nurture it until it reaches the age of majority, but after that who knows what will happen? :)
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
marenja
Microbot
Posts: 111
Joined: Sun Dec 26, 2021 4:15 pm

Re: SkoolKit 9.2

Post by marenja »

SkoolKid wrote: Sat May 11, 2024 1:52 pm SkoolKit 9.2 has been released.

TL;DR version for the initiated: RZX support and faster Z80 simulation implemented in C.
Should zip contain DLL or other binary file of C-simulator for Windows x64 ? I have no idea of how to compile csimulator.c

update

This helped to install Windows DLL to pyenv.
SkoolKid wrote: Fri Apr 12, 2024 7:24 pm

Code: Select all

> py -m venv venv
> cd venv\Scripts
> activate
(venv) > pip install -i https://test.pypi.org/simple/ skoolkit
But none of these commands is legal to force SLOW simulation.

Code: Select all

python t2s2sna.py --python skool-daze.t2s
python t2s2sna.py skool-daze.t2s --python
This command is legal and simulation works fast.

Code: Select all

python t2s2sna.py skool-daze.t2s
User avatar
SkoolKid
Manic Miner
Posts: 416
Joined: Wed Nov 15, 2017 3:07 pm

Re: SkoolKit 9.2

Post by SkoolKid »

marenja wrote: Sat May 18, 2024 5:39 pm Should zip contain DLL or other binary file of C-simulator for Windows x64 ?
No, there are no pre-built C modules in the zip archive or tarball. If you have a compiler installed, you can use the instructions here to build them, which boil down to running:

Code: Select all

python setup.py build_ext -i
Alternatively you could install SkoolKit in a virtualenv (as you did) and copy the C modules from the "skoolkit" package directory of that installation into the "skoolkit" directory of your unpacked zip archive. But make sure you use this command to get the latest version from the real PyPI, not the test PyPI:

Code: Select all

pip install skoolkit
marenja wrote:But none of these commands is legal to force SLOW simulation.
The option that forces tap2sna.py to use the pure Python simulator is -c python=1. So:

Code: Select all

tap2sna.py -c python=1 https://worldofspectrum.net/pub/sinclair/games/s/SkoolDaze.tzx.zip
But t2s2sna.py (from the t2sfiles repository) is a simple wrapper script around tap2sna.py that doesn't accept any arguments other than a t2s file, so you can't use --python or -c python=1 with it.
SkoolKit - disassemble a game today
Pyskool - a remake of Skool Daze and Back to Skool
User avatar
luny
Manic Miner
Posts: 224
Joined: Wed Apr 20, 2022 8:25 am
Contact:

Re: SkoolKit 9.2

Post by luny »

highrise wrote: Sun May 12, 2024 8:10 pm Just wanted to take the opportunity to thank you for all the work you have put into this over the years, the community really appreciates it.
As a fairly regular Skoolkit user, I'd like to second that.
I code to live (Job) and I live to code (Retro). One of them has to give!
Post Reply