Add loading screen to .tap file

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Add loading screen to .tap file

Post by dwinters18 »

Hi,

I am creating a .tap file using SpecNet IDE for visual studio.

How do I add a screen$ / loading screen at 16384 to my .tap file - I have seen a few utils that say they do it but I couldn't get them to work - is there a "simple" straight-forward way to do this?

Any help appreciated - thanks!

D
User avatar
oblo
Drutt
Posts: 31
Joined: Mon Dec 10, 2018 9:24 pm

Re: Add loading screen to .tap file

Post by oblo »

There are many ways to to that. Personally, I use Basin's Tape Creator utility -it's simple and gets the work done. But if you need more features to work with tape blocks, ZX Blockeditor is a good option.
Image
Cheers.
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Re: Add loading screen to .tap file

Post by dwinters18 »

Hi,

Thanks for your reply. Sadly your suggestion isn't without it's issues (for me at least).

I have tried ZX Blockeditor and just fail each and everytime to achieve adding a loading screen$ to an existiing .tap file.

Likewise, BASin once unzipped has a broken help CHM file so it is impossible to learn how the program works.

Does anyone have a working, easy for idiots like myself, step by step how to achieve adding a load "" SCREEN$ file to an existing .tap file please?

D
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Re: Add loading screen to .tap file

Post by dwinters18 »

Hi again oblo,
Personally, I use Basin's Tape Creator utility -it's simple and gets the work done. But if you need more features to work with tape blocks, ZX Blockeditor is a good option.
Maybe a step by step of how you got the contents of the screen grab you attached please?

D
User avatar
oblo
Drutt
Posts: 31
Joined: Mon Dec 10, 2018 9:24 pm

Re: Add loading screen to .tap file

Post by oblo »

dwinters18 wrote: Wed Dec 12, 2018 10:08 am Hi again oblo,
Personally, I use Basin's Tape Creator utility -it's simple and gets the work done. But if you need more features to work with tape blocks, ZX Blockeditor is a good option.
Maybe a step by step of how you got the contents of the screen grab you attached please?

D
Ok, I'm assuming you have two files: a .TAP/.TZX with your code that usually contains a Basic Loader program followed by your code (the BYTES block), and another .TAP/.TZX that contains another BYTES block with your screen$. Giving that, try these steps:

1) Open Basin -> Tools -> Tape Creator
2) Click Add button -> From File and select the .TAP/.TZX with your code
3) At this point, you'll have two entries: one called PROGRAM (the BASIC loader) and another one called BYTES with your code
4) Click again the Add button -> From File and this time, select the .TAP/.TZX with your screen$
5) At this point, you'll have three entries; the previous two and a new one at the bottom, called BYTES with your screen$ name.
6) Click/select the screen$ row and click the Up Arrow button. This way, you'll rearrange the blocks the way is suppose to be:
- First, the BASIC loader block
- Second, the SCREEN$ bytes code block
- Third, the MAIN code block with your program

7) Click File -> Save Image As and save it with a new name (don't overwrite your originals CODE and SCREEN$ TAP/TZX files!)

HTH
Cheers.
User avatar
Einar Saukas
Bugaboo
Posts: 3070
Joined: Wed Nov 15, 2017 2:48 pm

Re: Add loading screen to .tap file

Post by Einar Saukas »

What's probably missing is, you must modify the initial loader program, to add a LOAD ""SCREEN$ somewhere.
User avatar
oblo
Drutt
Posts: 31
Joined: Mon Dec 10, 2018 9:24 pm

Re: Add loading screen to .tap file

Post by oblo »

Einar Saukas wrote: Wed Dec 12, 2018 10:54 am What's probably missing is, you must modify the initial loader program, to add a LOAD ""SCREEN$ somewhere.
Right, but the only way to know is if [mention]dwinters18[/mention] paste here the contents of the BASIC loader.
[mention]dwinters18[/mention], can you do that?
Cheers.
User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Add loading screen to .tap file

Post by Joefish »

Yes, I use BlockEditor.

First make a copy of your .TAP and load the copy into BlockEditor. Note that the header and data part of each file are two separate blocks that it's up to you to keep together. Delete all but the initial BASIC program and its header and save. That gives you a .TAP with just the BASIC loader. Now load that into an emulator and edit it to insert a LOAD "" SCREEN$ command after the CLEAR statement and before the LOAD "" CODE that loads the main block of code.

To do that you'll want to turn off auto-tape-loading in the emulator. Then you select the .TAP file, then type MERGE "" to load it without running it. Then when you've edited it, use the emulator's 'Tape for Saving' mode to create a new .TAP file, SAVE "Loader" LINE 10 or whatever to save your edited loader to it, then close/stop the .TAP saving file. This gives you a new .TAP file with just your new BASIC loader in it, set to auto-run.

Now load that in BlockEditor, import your SCREEN$ file at the end of it, then import your original .TAP file after that. Now that will leave you with the old BASIC loader half-way down the list, so delete that and its header. The blocks should now look like:

1. BASIC Program Header
2. New BASIC loader
3. Code (Screen$) Header
4. Screen$ Data (16384,6912)
5. Code Header
6. Main Program Code

You can edit the file names of each header too, if you want. And if your SCREEN$ was saved from high memory, you can adjust its start address down to 16384.

And save that as your final .TAP.
User avatar
R-Tape
Site Admin
Posts: 6353
Joined: Thu Nov 09, 2017 11:46 am

Re: Add loading screen to .tap file

Post by R-Tape »

It may not be the easiest way, but I use the new-oldschool method in an emulator. Before starting you'll need your loading screen already saved as a .TAP (ZX-Paintbrush can do this), and your game code already saved as a .TAP.

1-type in a BASIC loader. This sets things up (border colour, clear etc), loads the loading screen, then loads your own code. Mine is something like this, using a game that starts at 32768:

10 CLEAR 32767: BORDER 0: LOAD””SCREEN$:POKE 23739,111:LOAD””CODE:PAUSE 0:CLEAR:RANDOMIZE USR 32768

^this puts the stack safely below your game code; loads the loading picture; the POKE 32739 is a trick to avoid the BASIC overwriting your screen with the Bytes:xxxx message when your game code loads; the PAUSE 0 waits for a keypress after loading, that way people get to see it even with flashloaders; the final CLEAR removes your POKE 32739 from earlier (it can cause problems).

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.

2-So now your BASIC loader is commited to tape. You’ll need your loading screen already saved as a .TAP file. Go File>Load, and load your picture somewhere safe in memory (40000 will be safe at this point). SO LOAD””CODE 40000. Then type SAVE””CODE 40000,6912. You loading screen is now committed to tape.

3-I now load the game code in the same way, already saved as a .TAP to it’s correct place in memory (remember the stack needs to be safely out the way). Type SAVE”gamecode”32768,*codelength*

Eject the tape. It should work... :?

An alternative way to learn would be to download a game already done (one of mine here has a similar loader). And open the TAP in ZX-Blockeditor. You can copy cut and paste, even edit your own loading screen with it.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Add loading screen to .tap file

Post by hikoki »

tapeconv from fuse-utils
User avatar
g0blinish
Manic Miner
Posts: 281
Joined: Sun Jun 17, 2018 2:54 pm

Re: Add loading screen to .tap file

Post by g0blinish »

User avatar
8BitAG
Dynamite Dan
Posts: 1487
Joined: Sun Dec 17, 2017 9:25 pm
Contact:

Re: Add loading screen to .tap file

Post by 8BitAG »

Very useful thread, thanks.
8-bit Text Adventure Gamer - games - research.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Add loading screen to .tap file

Post by hikoki »

hikoki wrote: Wed Dec 12, 2018 11:54 am tapeconv from fuse-utils
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
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Re: Add loading screen to .tap file

Post by dwinters18 »

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:-
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 using ZX Spin also.

I'm sure its quite easy when you know how, like most things in life!

D
User avatar
oblo
Drutt
Posts: 31
Joined: Mon Dec 10, 2018 9:24 pm

Re: Add loading screen to .tap file

Post by oblo »

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.
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$?
Cheers.
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Re: Add loading screen to .tap file

Post by dwinters18 »

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
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Re: Add loading screen to .tap file

Post by dwinters18 »

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
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Add loading screen to .tap file

Post by Ast A. Moore »

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?
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.
hikoki
Manic Miner
Posts: 576
Joined: Thu Nov 16, 2017 10:54 am

Re: Add loading screen to .tap file

Post by hikoki »

User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Add loading screen to .tap file

Post by Joefish »

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.
dwinters18
Drutt
Posts: 20
Joined: Sat Dec 01, 2018 6:45 pm

Re: Add loading screen to .tap file

Post by dwinters18 »

Hi,

Yes that makes sense - I will look at that now. I am getting closer so all help is greatly appreciated!

D
User avatar
textvoyage
Drutt
Posts: 34
Joined: Sun Nov 12, 2017 9:11 pm
Contact:

Re: Add loading screen to .tap file

Post by textvoyage »

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
Dr_Dave
Drutt
Posts: 32
Joined: Wed Feb 05, 2020 9:58 am

Re: Add loading screen to .tap file

Post by Dr_Dave »

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:

Image

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:

Image
User avatar
djnzx48
Manic Miner
Posts: 729
Joined: Wed Dec 06, 2017 2:13 am
Location: New Zealand

Re: Add loading screen to .tap file

Post by djnzx48 »

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
Dr_Dave
Drutt
Posts: 32
Joined: Wed Feb 05, 2020 9:58 am

Re: Add loading screen to .tap file

Post by Dr_Dave »

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.
Post Reply