Hello,
having the idea such a function could be useful in own programs I reviewed the code (Kevin Hill 1983) in more detail to learn how this could be done.
In principle the program seems to work.
I am saying "in principle" as for one I am working with an emulator not knowing how representative this might be for real hardware.
The second reason is that instead of the expected 2 parts the TZX Manager is coming up with four parts (with content as expected):
- Name
- Start, length
- Name
- data block
I assume on a real tape the data would be simply sequential but the TZX is identifying them as being separate blocks?
So the first question I am having is: For the TZX would one have to use a single memory block, i.e. copy first name and any metadata next to the data and write all in a single go? Or can this somehow get controlled?
The second issue I am having is related on getting the TZX starting up.
This code is starting the TZX while it using a call into ROM to OUT_BYTE $031E. I copied this code as well with this idea to eventually play around on bit level. But using a plain copy where I think I have not changed anything:
Code: Select all
0108: [4111] 5E OUTBYTE:LD E,(HL)
0109: [4112] 37 SCF
010A: [4113] CB 13 EACHBIT:RL E
010C: [4115] C8 RET Z ; return after 8 bits
010D: [4116] 9F SBC A,A
010E: [4117] E6 05 AND $05
0110: [4119] C6 04 ADD A,$04
0112: [411B] 4F LD C,A ; if bit c=9, else c=4
0113: [411C] D3 FF PULSES: OUT ($FF),A
0115: [411E] 06 23 LD B,$23
0117: [4120] 10 FE DELAY2: DJNZ DELAY2 ; 35*8+13 T-states / 3.25 MHz = 0.09 msec
0119: [4122] CD 46 0F CALL break1 ; BREAK-1 A=+7F, IN A,(+FE)
011C: [4125] 30 0C jr nc,REPORTD
011E: [4127] 06 1E LD B,$1E
0120: [4129] 10 FE DELAY3: DJNZ DELAY3 ; 30*8+13 T-states = 0.08 msec
0122: [412B] 0D DEC C
0123: [412C] 20 EE JR NZ,PULSES
0125: [412E] A7 DELAY4: AND A ; reset carry for bit counter
0126: [412F] 10 FD DJNZ DELAY4 ; trailing silence 256*8+13 = 0.6 msec
0128: [4131] 18 E0 JR EACHBIT
012A: [4133] C3 A6 03 REPORTD:jp $03A6 ; allow relative jump inside SAVE
is not starting the TZX. Although the wave loader seem to indicate that some output is happening. What might I be missing to get the TZX-Manager to react?
Here is the version from procount/fruitcake with same additional comments and descriptive labels as well as a sample in Basic (FASM-ZX or ZX-IDE):