Add loading screen to .tap file
Re: Add loading screen to .tap file
I use several utilities:
https://zx-pk.ru/threads/447-sjasmplus- ... post914142
https://zx-pk.ru/threads/447-sjasmplus- ... post914142
Re: Add loading screen to .tap file
Very useful thread, thanks.
Re: Add loading screen to .tap file
I meant snap2tzx which allows you to pass a scr filename as commandline parameter, something like
snap2tzx -$ test.scr test.z80
this is for snapshots which is not what you asked for
-
- Drutt
- Posts: 20
- Joined: Sat Dec 01, 2018 6:45 pm
Re: Add loading screen to .tap file
Hello all,
Thanks everyone for all the replies.
Looks like I have opened a bit of a can of worms with this.
I have tried some of the suggestions and so far none of them have worked.
Either I am clearly doing something wrong or some of the instructions have bits missing which I guess is due to people who know how to do it are maybe missing one small step out as they do it second nature but people trying to learn this black devil art of adding a loading screen to a tap are struggling.
How for example do you create a fresh, empty/blank .tap file to start adding elements to - i quote:-
I'm sure its quite easy when you know how, like most things in life!
D
Thanks everyone for all the replies.
Looks like I have opened a bit of a can of worms with this.
I have tried some of the suggestions and so far none of them have worked.
Either I am clearly doing something wrong or some of the instructions have bits missing which I guess is due to people who know how to do it are maybe missing one small step out as they do it second nature but people trying to learn this black devil art of adding a loading screen to a tap are struggling.
How for example do you create a fresh, empty/blank .tap file to start adding elements to - i quote:-
I m using ZX Spin also.In your emulator of choice, I use SPIN, insert a tape, and type SAVE”name”LINE 1. The line 1 is important, as it makes the BASIC autorun when loaded.
I'm sure its quite easy when you know how, like most things in life!
D
Re: Add loading screen to .tap file
It's easier than you think. As I asked you in another reply, can you paste here the content of the BASIC loader? Also, could you confirm my first assumption that you a have two TAPs/TZXs files, one with your program and other with the screen$?dwinters18 wrote: ↑Thu Dec 13, 2018 5:34 amEither I am clearly doing something wrong or some of the instructions have bits missing which I guess is due to people who know how to do it are maybe missing one small step out as they do it second nature but people trying to learn this black devil art of adding a loading screen to a tap are struggling.
Cheers.
-
- Drutt
- Posts: 20
- Joined: Sat Dec 01, 2018 6:45 pm
Re: Add loading screen to .tap file
I have two .tap files.
screen.tap which is a scr file exported as screen.tap in zx paintbrush. When asked for Header name I entered Screen (I have been unable to change the address of this so assume 16384,6912)
main.tap - this is the .tap file exported from SpecNetIDE visual studio editor/built in emulator (org at 24576)
My loader would say the following but I have no idea how to do the empty .tap file bit to get it in etc:-
10 CLEAR 24575: BORDER 0: LOAD””SCREEN$:POKE 23739,111:LOAD””CODE:PAUSE 0:CLEAR:RANDOMIZE USR 24576
Thanks - let me know if you need to know anymore
screen.tap which is a scr file exported as screen.tap in zx paintbrush. When asked for Header name I entered Screen (I have been unable to change the address of this so assume 16384,6912)
main.tap - this is the .tap file exported from SpecNetIDE visual studio editor/built in emulator (org at 24576)
My loader would say the following but I have no idea how to do the empty .tap file bit to get it in etc:-
10 CLEAR 24575: BORDER 0: LOAD””SCREEN$:POKE 23739,111:LOAD””CODE:PAUSE 0:CLEAR:RANDOMIZE USR 24576
Thanks - let me know if you need to know anymore
-
- Drutt
- Posts: 20
- Joined: Sat Dec 01, 2018 6:45 pm
Re: Add loading screen to .tap file
Hello again,
Also could you confirm please if I am making the loading screen tap file correctly - I am, using zx paintbrush, creating a new image 256 x 192, once I have drawn the picture, Export As -> .tap file. When asked for the header name, I enter SCREEN
Once the .tap file is created, I can load it into Spin using Insert Tape and it just appears at 16384 as expected.
D
Also could you confirm please if I am making the loading screen tap file correctly - I am, using zx paintbrush, creating a new image 256 x 192, once I have drawn the picture, Export As -> .tap file. When asked for the header name, I enter SCREEN
Once the .tap file is created, I can load it into Spin using Insert Tape and it just appears at 16384 as expected.
D
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Add loading screen to .tap file
If you only have two TAP files—your main code and your screen, then you’ll need to combine them into a single one. I believe your main TAP file consists of four data blocks: BASIC header, BASIC loader, main code header, and main code data. You’re going to want to insert the two blocks of your screen TAP files—screen header and screen data—between the BASIC loader and the main code header.
Could you just share all of your assets so we could take a look at them?
Could you just share all of your assets so we could take a look at them?
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Add loading screen to .tap file
Looks like the first thing you need to do is get some practise with Spin's settings, and learn how to SAVE out of the emulator.
First go TOOLS -> OPTIONS -> FILES -> TAPES and disable 'Load tapes automatically'.
Now when you select a .TAP file to have to manually load it with either the 128K tape loader or by typing LOAD "" or LOAD "" CODE, LOAD "" SCREEN$, etc.
To save stuff from the emulator you go to RECORDING -> TAPE RECORDING -> INSERT TAPE FOR SAVING
Then you name a new .TAP file.
Now you can use commands like SAVE "mystuff" LINE 10 in BASIC to save programs or code and whatever you save gets appended, one save after another, to a single .TAP file.
When you've finished, select RECORDING -> TAPE RECORDING -> STOP RECORDING and RECORDING -> TAPE RECORDING -> EJECT SAVE TAPE
This closes off the .TAP file and stops saving any more to it.
You can now select it as a .TAP file and LOAD from it.
When you've finished developing, you may want to switch 'Load tapes automatically' back on for loading games.
So now you can load your BASIC loader into the emulator, edit it, and save it to a new .TAP file.
And then use ZXBlockEditor to chop up and recombine the different file blocks from your various .TAP files into a single .TAP file.
First go TOOLS -> OPTIONS -> FILES -> TAPES and disable 'Load tapes automatically'.
Now when you select a .TAP file to have to manually load it with either the 128K tape loader or by typing LOAD "" or LOAD "" CODE, LOAD "" SCREEN$, etc.
To save stuff from the emulator you go to RECORDING -> TAPE RECORDING -> INSERT TAPE FOR SAVING
Then you name a new .TAP file.
Now you can use commands like SAVE "mystuff" LINE 10 in BASIC to save programs or code and whatever you save gets appended, one save after another, to a single .TAP file.
When you've finished, select RECORDING -> TAPE RECORDING -> STOP RECORDING and RECORDING -> TAPE RECORDING -> EJECT SAVE TAPE
This closes off the .TAP file and stops saving any more to it.
You can now select it as a .TAP file and LOAD from it.
When you've finished developing, you may want to switch 'Load tapes automatically' back on for loading games.
So now you can load your BASIC loader into the emulator, edit it, and save it to a new .TAP file.
And then use ZXBlockEditor to chop up and recombine the different file blocks from your various .TAP files into a single .TAP file.
-
- Drutt
- Posts: 20
- Joined: Sat Dec 01, 2018 6:45 pm
Re: Add loading screen to .tap file
Hi,
Yes that makes sense - I will look at that now. I am getting closer so all help is greatly appreciated!
D
Yes that makes sense - I will look at that now. I am getting closer so all help is greatly appreciated!
D
- textvoyage
- Drutt
- Posts: 35
- Joined: Sun Nov 12, 2017 9:11 pm
- Contact:
Re: Add loading screen to .tap file
A useful thing is that you can use DOS to concatenate multiple .tap files into 1 file, so if you have a loader, a screen & another screen you can type
copy /B loader.tap + screen1.tap + screen2.tap allInOneTap.tap
note the B switch (binary) and the space between screen2.tap and the final, bigger, all-in-one filename at the end
copy /B loader.tap + screen1.tap + screen2.tap allInOneTap.tap
note the B switch (binary) and the space between screen2.tap and the final, bigger, all-in-one filename at the end
Re: Add loading screen to .tap file
Thought I'd piggy back a question on this thread, rather than start another...
I'm trying to insert a loading screen in my game's tap file... I've followed the instructions given on page one, and it has mostly worked.
I created a game tap file from sjasmplus (with savetap "filename.tap"), loaded that into ZX-Blockeditor, stripped out all but the basic loader. Loaded the loader into Spin, inserted load "" screen$, saved, loaded back into ZX-Blockeditor then reinserted my game programme data header and data, then my screen header and data between them. The result looks like this:
And it mostly works. The game loads the screen, then the game and the game starts.
However - as soon as it finishes loading in the screen and the game data begins to load, the loading screen gets blanked and I can't figure out why. It just empties out to a mostly white screen with two black character lines at the bottom.
Anyone any idea what I'm missing?
Here's the loader, if it helps:
I'm trying to insert a loading screen in my game's tap file... I've followed the instructions given on page one, and it has mostly worked.
I created a game tap file from sjasmplus (with savetap "filename.tap"), loaded that into ZX-Blockeditor, stripped out all but the basic loader. Loaded the loader into Spin, inserted load "" screen$, saved, loaded back into ZX-Blockeditor then reinserted my game programme data header and data, then my screen header and data between them. The result looks like this:
And it mostly works. The game loads the screen, then the game and the game starts.
However - as soon as it finishes loading in the screen and the game data begins to load, the loading screen gets blanked and I can't figure out why. It just empties out to a mostly white screen with two black character lines at the bottom.
Anyone any idea what I'm missing?
Here's the loader, if it helps:
Re: Add loading screen to .tap file
Do you have any peripherals connected such as the Interface 1? Maybe try replacing the POKE with this.
POKE (PEEK 23631+256*PEEK 23632)+5,111
POKE (PEEK 23631+256*PEEK 23632)+5,111
Re: Add loading screen to .tap file
No peripherals - in fact, I've only tried loading it in an emulator with simulated loading, so I guess it could be an emulator thing, but it doesn't happen with other taps.
Should add that it happens with or without the poke.
Should add that it happens with or without the poke.
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Add loading screen to .tap file
Well, the way you make a tape file seems extremely convoluted, but then I’m not here to criticize your development tools. Perhaps, you could share your resulting file with us so we could take a closer look at? Maybe you’ve overlooked something else entirely?
Also, have you considered writing a simple loader in machine code and putting it inside your BASIC bootstrap instead? It’s dead easy and gives you the level of flexibility that cannot be achieved in BASIC (including, but not limited to, loading headerless blocks).
Also, have you considered writing a simple loader in machine code and putting it inside your BASIC bootstrap instead? It’s dead easy and gives you the level of flexibility that cannot be achieved in BASIC (including, but not limited to, loading headerless blocks).
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Re: Add loading screen to .tap file
Ha! I can't claim credit for the convolutedness... I was just following one of the earlier posts in this threadAst A. Moore wrote: ↑Mon Mar 02, 2020 10:35 am Well, the way you make a tape file seems extremely convoluted, but then I’m not here to criticize your development tools. Perhaps, you could share your resulting file with us so we could take a closer look at? Maybe you’ve overlooked something else entirely?
Also, have you considered writing a simple loader in machine code and putting it inside your BASIC bootstrap instead? It’s dead easy and gives you the level of flexibility that cannot be achieved in BASIC (including, but not limited to, loading headerless blocks).
Haven't considered the machine code loader route. Do you have a link to how to achieve this?
Cheers!
- Alessandro
- Dynamite Dan
- Posts: 1910
- Joined: Wed Nov 15, 2017 11:10 am
- Location: Messina, Italy
- Contact:
Re: Add loading screen to .tap file
Here is an example loader. It assumes that your program must starts at the beginning of its code.
You can turn it into a machine code program loaded as a BASIC one with Pasmo and BIN2DATA:
pasmo --bin loader.asm loader.bin
bin2data -org 24000 -rem loader.bin loader.tap
Remember to remove in ZX-Blockeditor the headers for the screen and main code blocks.
Edit: Use Pasmo v0.5.4 beta 2, 0.6.0 is untested and can cause problems. BIN2DATA can be downloaded from here.
You can turn it into a machine code program loaded as a BASIC one with Pasmo and BIN2DATA:
pasmo --bin loader.asm loader.bin
bin2data -org 24000 -rem loader.bin loader.tap
Remember to remove in ZX-Blockeditor the headers for the screen and main code blocks.
Edit: Use Pasmo v0.5.4 beta 2, 0.6.0 is untested and can cause problems. BIN2DATA can be downloaded from here.
Code: Select all
ORG 24000
XOR A
LD (23693),A ; PAPER 0, INK 0, BRIGHT 0
CALL 3503 ; CLS
LD IX,16384 ; first block address
LD DE,6912 ; first block length
CALL LOADER
LD IX,24064 ; second block address
LD DE,32766 ; second block length
CALL LOADER
JP 24064 ; main program start
LOADER:
LD A,255
SCF
CALL 1366 ; loads the block
RET
Last edited by Alessandro on Mon Mar 02, 2020 11:04 am, edited 3 times in total.
Re: Add loading screen to .tap file
Cool! Thanks
- Ast A. Moore
- Rick Dangerous
- Posts: 2641
- Joined: Mon Nov 13, 2017 3:16 pm
Re: Add loading screen to .tap file
The simplest headerless loader will look something like this:
34 bytes, if I’m not mistaken
Code: Select all
xor a ;clear screen (black ink on black paper)
ld (23693),a
call $daf
ld ix,$4000
ld de,$1b00
scf
sbc a,a
call $556 ;load screen$
ld ix,24064
ld de,32766
scf
sbc a,a
call $556 ;load main data
jp 24064 ;run game code
Every man should plant a tree, build a house, and write a ZX Spectrum game.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
- bob_fossil
- Manic Miner
- Posts: 661
- Joined: Mon Nov 13, 2017 6:09 pm
Re: Add loading screen to .tap file
As an aside, I have observed that using POKE 23739, 111 - which stops the tape loader printing 'Bytes: blah' over your screen - does seem to render the 128 Basic editor unusable if your basic loader has an error and needs to return you to the editor. 48 Basic and USR 0 mode seem unaffected. I used to use POKE 23739, CODE "o" to save a couple of bytes.Dr_Dave wrote: ↑Mon Mar 02, 2020 6:35 am Thought I'd piggy back a question on this thread, rather than start another...
I'm trying to insert a loading screen in my game's tap file... I've followed the instructions given on page one, and it has mostly worked.
I created a game tap file from sjasmplus (with savetap "filename.tap"), loaded that into ZX-Blockeditor, stripped out all but the basic loader. Loaded the loader into Spin, inserted load "" screen$, saved, loaded back into ZX-Blockeditor then reinserted my game programme data header and data, then my screen header and data between them. The result looks like this:
And it mostly works. The game loads the screen, then the game and the game starts.
However - as soon as it finishes loading in the screen and the game data begins to load, the loading screen gets blanked and I can't figure out why. It just empties out to a mostly white screen with two black character lines at the bottom.
Anyone any idea what I'm missing?
Here's the loader, if it helps:
- WhatHoSnorkers
- Manic Miner
- Posts: 254
- Joined: Tue Dec 10, 2019 3:22 pm
Re: Add loading screen to .tap file
POKE 23739,244 fixes that I think
I have a little YouTube channel of nonsense
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers
https://www.youtube.com/c/JamesOGradyWhatHoSnorkers