Create a fullscreen scrolltext

General software. From trouble with the Banyan Tree to OCP Art Studio, post any general software chat here. Could include game challenges...
yogyog
Berk
Posts: 11
Joined: Thu May 30, 2019 7:07 pm

Create a fullscreen scrolltext

Post by yogyog » Tue Jun 04, 2019 8:15 am

I'm looking for something where I can type in some text and have the ZX Spectrum turn it into a showy fullscreen scrolltext. Like you find on a ZX Spectrum demo.

I'm also hoping that

I want to have it on a screen in the background of the follow-up video to this: - the last one has credits on a ZX spectrum (which I faked) - for the next one I want to have a flashy scrolltext behind the puppet. I like the idea of these being made by a stopmotion animator in the 80's probably in Czechaslovacia, who uses a ZX Spectrum clone for credits, and I would rather have the added authenticity of using an actual ZX Spectrum program rather than something I put together in Blender taking the ZX Spectrum's colour limitations.
0 x

User avatar
arkannoyed
Manic Miner
Posts: 363
Joined: Mon Feb 05, 2018 9:56 am

Re: Create a fullscreen scrolltext

Post by arkannoyed » Tue Jun 04, 2019 8:33 am

Probably the easiest way would be to try and 'Hack' a Demo if you can find one with a scroller that you like. Just change the scroller text if thats possible?
0 x

User avatar
Ast A. Moore
Dynamite Dan
Posts: 1134
Joined: Mon Nov 13, 2017 3:16 pm

Re: Create a fullscreen scrolltext

Post by Ast A. Moore » Tue Jun 04, 2019 9:10 am

Oh, you mean a horizontal one-line scroller? That “full screen” kind of threw me for a loop. I thought you meant a vertical, multi-line scroller; that would be quite difficult to pull off without major slowdowns.

A horizontal scroller is pretty trivial, although the actual implementation will vary depending on how quickly you want the text to scroll (i.e. 1 pixel, 4 pixels, or 8 pixels).

Are you looking for a ready-made solution or just coding ideas? I mean, how well versed are you in Z80 assembly?
0 x
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.

User avatar
R-Tape
Site Admin
Posts: 2357
Joined: Thu Nov 09, 2017 11:46 am

Re: Create a fullscreen scrolltext

Post by R-Tape » Tue Jun 04, 2019 9:51 am

Nice animation!

One easy way is to use a utility like this one: https://spectrumcomputing.co.uk/index.p ... 6&id=24203

Press space to stop and go to BASIC, and you can edit line 30 with any text you want.

If that's too fancy, or not fancy enough, just try searching SC for "scroller" and there are a few choices.
0 x

User avatar
Alessandro
Manic Miner
Posts: 436
Joined: Wed Nov 15, 2017 11:10 am
Location: Messina, Italy
Contact:

Re: Create a fullscreen scrolltext

Post by Alessandro » Tue Jun 04, 2019 9:58 am

This is the scrolling text routine I have been using for years. I reworked it from a source I cannot remember now. It can display custom fonts and be relocated.

Code: Select all


  FONT EQU [your custom font address]

SCROLL:

  LD HL, TEXT

  LD (MESSAGE),HL    ; loads the text address in MESSAGE
  LD (L_35489),HL    ; points to the first character of the text
  
L_35387:  HALT
  CALL 00654                ; calls the control key routine
  INC E                     ; increases E by 1, if it's 255 (no key pressed) turns to 0
  RET NZ                     ; JP NZ, [address] to exit to a different memory location
  CALL L_35414
  JP L_35387
L_35413: DEC C
L_35414:  LD HL,20735       ; 20735 (default)
  PUSH HL
  LD B,008
L_35420:  PUSH BC
  PUSH HL
  LD B,032
  AND A
L_35425:  RL (HL)
  DEC L
  DJNZ L_35425
  POP HL
  INC H
  POP BC
  DJNZ L_35420
  LD HL,(L_35489)           ; get current place in the text
  LD L,(HL)                 ; get the letter 
  LD H,0  
  ADD HL,HL
  ADD HL,HL
  ADD HL,HL                 ; letter times 8
  LD DE,FONT-256            ; get font address ( don't forget its minus 256 -> 32*8 )
  ADD HL,DE                 ; HL now holds the address of the character in the font
  EX DE,HL                  ; exchange so DE is letter in memory we wish to use
  POP HL                    ; retrieve where on screen we are going to put this vertical line of pixels
  LD A,(PUNTO_A)
  LD C,A
  LD B,008
L_35459:  LD A,(DE)
  AND C
  JR Z,L_35464
  INC (HL)
L_35464:  INC H
  INC DE
  DJNZ L_35459
  LD HL,PUNTO_A
  RRC (HL)
  RET NC
  LD HL,(L_35489)
  INC HL
  LD A,(HL)
  AND A
  JR NZ,L_35485
  LD HL,(MESSAGE)
L_35485:  LD (L_35489),HL

   RET

L_35489: DEFS 2  
  
MESSAGE: DEFS 2

PUNTO_A:  ADD A,B 

TEXT:
  DEFM " Here goes your text."
  DEFM " Remember to put a space"
  DEFM " before every sentence, for better readability."

0 x

Joefish
Manic Miner
Posts: 569
Joined: Tue Nov 14, 2017 10:26 am

Re: Create a fullscreen scrolltext

Post by Joefish » Tue Jun 04, 2019 12:05 pm

Does this mean you need to make it move in steps to go with the stop-motion?
In which case speed isn't really an issue - if it's in BASIC and takes even a few seconds to render each step, then that's not a problem for stop-motion..?

The simplest method would be to take a text message and enlarge it by setting a whole character-square's attribute based on each pixel of the text, making it 8x larger. Or setting two characters so it's 16x taller and 8x wider.

You could go much fancier and design a large detailed sprite for each text character and render them with pixel-scrolling, but it's (a) a lot of effort and (b) you still need to decide how to synchronise it with your stop-motion animation.
0 x

yogyog
Berk
Posts: 11
Joined: Thu May 30, 2019 7:07 pm

Re: Create a fullscreen scrolltext

Post by yogyog » Tue Jun 04, 2019 12:13 pm

I know NO ZX Spectrum Assembly. Or any assembly at all.

I was after a horisontal scroller with HUGE TEXT.

The idea of hacking a demo sounds interesting... as does the program R-Tape suggested.

Thanks, guys!
0 x

User avatar
arkannoyed
Manic Miner
Posts: 363
Joined: Mon Feb 05, 2018 9:56 am

Re: Create a fullscreen scrolltext

Post by arkannoyed » Tue Jun 04, 2019 12:46 pm

If you look on something like ZX AAA Demo site and find something you like the look of, then I'm sure one of us on here would be able to extract/ modify it so you can utilise the scroller somehow.
0 x

User avatar
arkannoyed
Manic Miner
Posts: 363
Joined: Mon Feb 05, 2018 9:56 am

Re: Create a fullscreen scrolltext

Post by arkannoyed » Tue Jun 04, 2019 12:56 pm

Or if you want an ATTR based scroller that will fill 1/3rd of the screen vertically, then they're fairly plentiful
0 x

yogyog
Berk
Posts: 11
Joined: Thu May 30, 2019 7:07 pm

Re: Create a fullscreen scrolltext

Post by yogyog » Tue Jun 04, 2019 1:03 pm

Thank you, arkannoyed - that's exactly what I'm after - In return I could do some graphics/animation work maybe?
0 x

Post Reply