How to add a loading screen to my tap file

edited January 2015 in Development
I?ve got my game created as a tap file generated by Pasmo. I now want to add a loading screen. Can anyone explaine the best way to go about doing this so I can create a new tap file with the loading screen?
Post edited by Mr Millside on

Comments

  • edited June 2014
    I did it several times but may way is probably very hacky and unoptimal

    You probably know it but you need a loader like
    1 LOAD "" SCREEN$ -to load screen
    2 LOAD "" CODE - to load game
    3 RANDOMIZE USR nn - to start game
    

    So you must save screenshot block after loader and before game code on the same tape.

    I basically executed SAVE "name" screen$ command, pressed enter and at the same moment imported .scr file to emulator. This way I avoided problem with bottom two lines being overwritten.

    Or you can rename .scr to .bin, import to any part of memory and execute SAVE "name" CODE 30000,6912 or something to save it to tape.

    It adds the screenshot data to .tap or .tzx tape image but at the end of it.
    Then if I wanted rearrange the blocks on the tape I run Tapir utility to do it.
  • edited June 2014
    I use ZX BlockEditor for these things. Check your email :)
    The comp.sys.sinclair crap games competition 2015
    "Let's not be childish. Let's play Spectrum games."
  • edited December 2014
    It's working well if you follow the instructions there:
    http://little-shop-of-pixels.blogspot.fr/2012/02/making-of-spectrum-loading-screen-part2.html

    It's what I did and it's quite easy. However, now I'd like to load 2 images in my TAP.
    I tried:
    org 0
    incbin "screen01.scr"
    org 0
    incbin "screen02.scr"
    

    in the assembly code. It's only loading the second image (as expected). I've tried to set:
    org 0
    incbin "screen01.scr"
    org 1
    incbin "screen02.scr"
    

    Then I got errors when using this code:
    200 LOAD "" SCREEN$
    

    I don't know how to tell I'd like to load another screen.
  • edited December 2014
    not in batch mode, try Tape Explorer:
    ftp://ftp.worldofspectrum.org/pub/sinclair/tools/pc/tapex.zip

    you may add any file and change order of files.

    or try bin2tap/introspec, I cannot find link to the tool.
  • edited December 2014
    Even better, use either the old, tried, tested and reliable Tapir, or the new kid on the block (no pun intended), ZX-Blockeditor.

    EDIT: Note that the version on WOS is old and the Tapir website seems to be down. Here is version 1.0 build 0906071950, hosted on my website.
  • edited December 2014

    sigh... I only mentioned that six months ago :D
    The comp.sys.sinclair crap games competition 2015
    "Let's not be childish. Let's play Spectrum games."
  • edited December 2014
    well if you have a basic loader on one tap file, a screen on another and your game code on another

    you could do this in a bat file

    copy /b basic.tap+screen.tap+gamecode.tap nameofyourgame.tap

    zx paintbrush can export an scr to a tap file with a header and the likes
  • edited December 2014
    I've seen Tapir but I don't know how to tell in the basic code to change the image (LOAD "" SCREEN$). Anyway, it doesn't matter, since I need to script it, I'll change a few things so I'll use some PAPER 0 : print AT Y,X to add a black area on my original image and one will be enough...
    @BiNMaN: I'll also ressort to this trick if I need this in the future, good idea.
  • edited January 2015
    I suggest that you create your BASIC loader .tap file first using zmakebas (with -a 10 option to auto run at line 10)
    e.g. 10 LOAD "" SCREEN$: PAUSE 0
    20 LOAD "" SCREEN$: PAUSE 0
    30 LOAD "" CODE
    40 RANDOMIZE USR nnnnn
    then add your loading screens (which from previous post above are binary .scr files with org address $4000/16384)
    using bin2tap with the -append option
    or tapmaker (included with z88dk build and which defaults to appending to an existing .tap file).
    Then add your executable code (assembled to a .bin file with pasmo) using bin2tap or tapmaker

    Regards,
    Derek.
    1985: ZX Spectrum+ 48K Interface 1 ZX81 16KB ASZMIC/SP ROM Philips 12" B/W TV Epson Dot Matrix Printer ZX Printer Now: Late 2015 iMac 5K 27" 4GHz i7 32GB RAM macOS 10.15.7 1TB Ext SSD USB C Drive Ext 4TB 3TB and 2TB USB 3 Hard Disks Ext USB 3 Blu-Ray iPad R7 32GB iPhone 6s 64GB iOS 14.0.1 Apple TV Gen 2
  • edited January 2015
    leespoons wrote: »
    sigh... I only mentioned that six months ago :D
    :oops: Didn't check the thread thoroughly! Well, maybe because it is too short and not old enough :D
    farvardin wrote: »
    I've seen Tapir but I don't know how to tell in the basic code to change the image (LOAD "" SCREEN$). Anyway, it doesn't matter, since I need to script it, I'll change a few things so I'll use some PAPER 0 : print AT Y,X to add a black area on my original image and one will be enough...
    @BiNMaN: I'll also ressort to this trick if I need this in the future, good idea.

    Neither Tapir nor ZX-Blockeditor are meant to manipulate BASIC blocks: you must use them to assemble the different parts into a single tape image file (disk image as well if you use the latter), create and/or strip headers, and add turbo blocks if you fancy them - like I do ;)

    For BASIC, I heartily recommend you ZX-Editor. It made my BASIC program writing immensely easier.
  • edited January 2015
    @dbolli : thank you, it worked with bin2tap if I call the screen like this:

    LOAD "name_of_my_screen" SCREEN$

    thanks also to the other posters.
  • edited January 2015
    :oops: Didn't check the thread thoroughly! Well, maybe because it is too short and not old enough :D

    Yeah, wasn't the same question asked in 2004? :razz:


    Neither [Tapir nor] ZX-Blockeditor are meant to manipulate BASIC blocks ...
    For BASIC, I heartily recommend you ZX-Editor. It made my BASIC program writing immensely easier.

    Of course if you have both ZX-Blockeditor and ZX-Editor you can call ZX-Editor from within ZX-Blockeditor. It's what all the cool kids are doing these days, apparently :D
    The comp.sys.sinclair crap games competition 2015
    "Let's not be childish. Let's play Spectrum games."
  • edited January 2015
    leespoons wrote: »
    Yeah, wasn't the same question asked in 2004? :razz:
    I don't remember Claus's ZX-Modules suite being around in 2004... ;)
    leespoons wrote: »
    Of course if you have both ZX-Blockeditor and ZX-Editor you can call ZX-Editor from within ZX-Blockeditor. It's what all the cool kids are doing these days, apparently :D
    I've done it myself - really superb program integration. Hats off to Claus for his efforts.
Sign In or Register to comment.