Making .TRD (for Pentagon and otherwise)

The place for codemasters or beginners to talk about programming any language for the Spectrum.
Post Reply
User avatar
Site Admin
Posts: 2662
Joined: Thu Nov 09, 2017 11:46 am

Making .TRD (for Pentagon and otherwise)

Post by R-Tape » Tue Aug 20, 2019 10:00 am

If I wanted to make a .TRD version of a game (or tape magazine), how do I go about it?

Would a .TRD for the Pentagon need to be different to any other .TRD?

(note—I know next to nothing about disk formats or the clone machines)
0 x

User avatar
Posts: 151
Joined: Sun Jun 17, 2018 1:54 pm

Re: Making .TRD (for Pentagon and otherwise)

Post by g0blinish » Tue Aug 20, 2019 10:13 am

use sjasmplus, Luke (:

Code: Select all

	device zxspectrum128
        ORG #6000
 ... your code
	display /d,end-begin
and save code to .trd:

Code: Select all

    EMPTYTRD "dust.trd" ;create empty TRD image
    SAVETRD "dust.trd","demo.C",begin,end-begin
Last step is create Basic-loader, it possible with sjasmplus:

Code: Select all

 db #00,10;number 10
 DW EndLine1 - Line1

 db $FD;clear
 db $B0;val
 db $22,"45055",$22,":"
 db $F9;randomize
 db $C0;usr
 db $B0;val
 db $22,"15619",$22,":"
 db $EA;rem
 db ":"
 db $EF;load
 db $22,"demo",$22
 db $AF;code
 db #0D

 db #00,20
 DW EndLine2 - Line2
 db $F9;randomize
 db $C0;usr
 db $B0;val
 db $22,"45056",$22
 db #0D

 db #80;for autorun
 db #AA,10,0

for save:
	SAVETRD "dust.trd", "boot.B",basic_b, basic_e-basic_b
I am using simple solution: .scl with monoblok and custom loader.
0 x

Dynamite Dan
Posts: 1350
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Making .TRD (for Pentagon and otherwise)

Post by Ralf » Tue Aug 20, 2019 4:01 pm

If you have a multiload program then everything gets harder, I guess.

Every time you load something from a tape in your code, you have to replace it by the code
which loads data from .trd disk.
0 x

Post Reply