Ultimo Primo Bin to PTP file converter v1.2 (c) 2024 by Fast&Force Usage: bin2ptp file_name.bin load_address [start_address] Example 1: bin2ptp.exe primo_game1.bin 17408 Example 2: bin2ptp.exe primo_game2.bin 17408 18201 Output will be a PTP packed file for Ultimo Primo Emulator with the same filename (truncated at 16 characters) but with .ptp extension. Only Z80 assembly program is supported (machine-code ptp blocks). Maximum input binary file size is: 49152 byte load_address must be between 16384 and 65535-(size of input file) The binary program will be loaded into the memory from load_address and will be auto started from start_address. start_address is optional parameter, if it is not defined, the load_address will be the auto start entry point. PTP format description (HU): http://primo.homeserver.hu/html/konvertfajlok.html Usage Steps ----------- 1. create a Z80 assembly program for Primo with any Z80 assembler IDE and build tool - Primo Hardware Manual (HU): http://primo.homeserver.hu/doc/konyvek/primofuzetek-hardver.pdf - Primo Software Manual (HU): http://primo.homeserver.hu/doc/konyvek/primofuzetek-szoftver.pdf - suggested tool: TVC Developer Tool: http://tvc.hu/cas/2023/Util/TVCDeveloperTool_420alfa.zip 2. organize code to $4400 address (17408 decimal) - code example for TVC Developer Tool org $4400 ; organize code to RAM area of Primo genbinary ; TVC DevTool will generate raw binary file of machine-code jp START_MUSIC dw 399 ; 32.7 Hz C1 dw 422 ; 34.65 Hz CISZ1 ... ... dw 0 ; 0 Hz MUTE START_MUSIC nop ; the program code ... ... 3. build the assembly program into binary - with TVC Developer Tool just press CTRL+SHIFT+B, the output file will be a binary machine-code file with .bin extension 4. use this tool to convert binary file into PTP (Primo Tape) format - bin2ptp.exe music.bin 17408 5. run Ultimo Emulator - on Tape menu attach PTP - then type LOAD - the assembly program will be loaded then started automatically Source Code ----------- - implemented with Notepad++ in one night:) - can be built with DotNet6.0 SDK from command line - there is no external dependency - no nuget packages - the main processing part is here: ProcessBinToPtp(string binFileName, int orgAddr, int startAddr) To build: >dotnet build To release: >dotnet publish -r win-x86 -c Release /p:PublishSingleFile=true or >dotnet publish -r win-x64 -c Release /p:PublishSingleFile=true