Title Screen Data Load
-
- Posts: 16
- Joined: Mon Jul 22, 2024 7:29 pm
Title Screen Data Load
Hi,
I've created a title page using a combination of plot, draw and some custom UDGs using read DATA statements and the standard POKE USR "a" command - so far so good.
In a separate listing I also make use of custom UDGs for the main program - I've been attempting to type this into the listing for the title page but the second new DATA routine is not overwriting the UDG set and displays instead the UDGs from the first data load - is it not possible to overwrite a USR space in the same listing? (Admittedly I've not seen this done in any of the listings I've been learning from but it seemed logical to me!).
Cheers,
Jason
I've created a title page using a combination of plot, draw and some custom UDGs using read DATA statements and the standard POKE USR "a" command - so far so good.
In a separate listing I also make use of custom UDGs for the main program - I've been attempting to type this into the listing for the title page but the second new DATA routine is not overwriting the UDG set and displays instead the UDGs from the first data load - is it not possible to overwrite a USR space in the same listing? (Admittedly I've not seen this done in any of the listings I've been learning from but it seemed logical to me!).
Cheers,
Jason
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Title Screen Data Load
You can overwrite / redefine a UDG at any time.
If the UDG has been printed to the screen, these will not change if you redefine the UDG.
But when you print the relevant UDG again, the new "shape" will be used.
A program reads DATA statements and data item in sequence. Once read, the pointer used by BASIC moves on to the next data item.
However, you can move the pointer by using the RESTORE statement. This has RESTORE, followed by a line number.
I'm not sure if any of the above answers your question.
Mark
If the UDG has been printed to the screen, these will not change if you redefine the UDG.
But when you print the relevant UDG again, the new "shape" will be used.
A program reads DATA statements and data item in sequence. Once read, the pointer used by BASIC moves on to the next data item.
However, you can move the pointer by using the RESTORE statement. This has RESTORE, followed by a line number.
I'm not sure if any of the above answers your question.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
Re: Title Screen Data Load
Hi Jason,
Just save your screen as a SCREEN$ file and reload it on the screen without UDGs.
The UDG on Specrum 16k and 48k are located at the top of memory, and can't be retrieve or change with POKEs...
But POKE USR "a" point to the right memory segment for both Spectrum.
Try
10 PRINT"Hello"
20 SAVE"myscreen" SCREEN$
(Where SCREEN$= CTRL+SHIFT & CTRL+K)
NEW
Just save a BASIC loader to set colors, music and UDG.
10 LOAD"myscreen" SCREEN$
20 PAUSE 500
30 LOAD "MyProgram"
Just save your screen as a SCREEN$ file and reload it on the screen without UDGs.
The UDG on Specrum 16k and 48k are located at the top of memory, and can't be retrieve or change with POKEs...
But POKE USR "a" point to the right memory segment for both Spectrum.
Try
10 PRINT"Hello"
20 SAVE"myscreen" SCREEN$
(Where SCREEN$= CTRL+SHIFT & CTRL+K)
NEW
Just save a BASIC loader to set colors, music and UDG.
10 LOAD"myscreen" SCREEN$
20 PAUSE 500
30 LOAD "MyProgram"
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
-
- Posts: 16
- Joined: Mon Jul 22, 2024 7:29 pm
Re: Title Screen Data Load
Hmm - ok i thought it might have something to do with screen$ but where am i loading from?
By which I mean I’m working in ZX basic on a Next so I can either load the screen listing or the main listing - i have not really advanced to compiling in sequence like a tape load (i am only guessing this is how this would work based on your suggestion xavsnap - this is my first attempt at an original programme)
Can I share the two listings with you?
By which I mean I’m working in ZX basic on a Next so I can either load the screen listing or the main listing - i have not really advanced to compiling in sequence like a tape load (i am only guessing this is how this would work based on your suggestion xavsnap - this is my first attempt at an original programme)
Can I share the two listings with you?
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Title Screen Data Load
Although I have a Next, I've not tried saving or loading multiple files.
With a real ZX Spectrum with a real tape deck, or most emulators that run on a PC, then the sequence is something like this:
Save the "loader" program ( SAVE "name" LINE 10)
Save the screen data ( SAVE "screen" SCREEN$)
Save the main program ( SAVE "name" LINE 10)
With an emulator, the "tape" file can Then be saved as either a TZX type or a TAP type.
Then when loading:
Type LOAD ""
The ZX Spectrum loads the "loader" program.
This autostarts and runs, as it runs, it loads the screen data, then it loads the main program. Once the main program has loaded it will also autostart.
The "loader" is generally fairly simple:
Note that this assumes the main program is a BASIC program. Machine code main programs require a slightly different arrangement.
My poor quality video of an example is here: https://www.youtube.com/watch?v=iGsoo-n56ik
Mark
With a real ZX Spectrum with a real tape deck, or most emulators that run on a PC, then the sequence is something like this:
Save the "loader" program ( SAVE "name" LINE 10)
Save the screen data ( SAVE "screen" SCREEN$)
Save the main program ( SAVE "name" LINE 10)
With an emulator, the "tape" file can Then be saved as either a TZX type or a TAP type.
Then when loading:
Type LOAD ""
The ZX Spectrum loads the "loader" program.
This autostarts and runs, as it runs, it loads the screen data, then it loads the main program. Once the main program has loaded it will also autostart.
The "loader" is generally fairly simple:
Code: Select all
10 PAPER 1 : INK 5 : BORDER 1 : CLS
20 LOAD "screen" SCREEN$
30 LOAD "main"
My poor quality video of an example is here: https://www.youtube.com/watch?v=iGsoo-n56ik
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
Re: Title Screen Data Load
This video ?
https://www.youtube.com/watch?v=9mV7Vvqkdo4
Just save both files on the same tape file.
https://www.youtube.com/watch?v=9mV7Vvqkdo4
Just save both files on the same tape file.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Re: Title Screen Data Load
Just use a single UDG character...
Code: Select all
10 LET A$="\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a"
20 RESTORE 110
30 FOR c=0 TO 7:FOR I = USR "A" TO USR "A"+7:READ A:POKE I, A:NEXT I:PRINT AT 0,0;A$;AT 21,0;A$
50 PRINT AT (RND*20)+1,(RND*31);"\a"
60 NEXT c
80 GO TO 20
100 REM ==== DATAS UDG ====
120 DATA 0,60,126,54,30,126,60,0,0,120,252,108,60,252,120,0,0,240,249,216,120,249,240,0,0,225,243,177,240,243,225,0
130 DATA 0,195,231,99,225,231,195,0,0,135,207,198,195,207,135,0,0,15,159,141,135,159,15,0,0,30,63,27,15,63,30,0
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Title Screen Data Load
Arrrrggg - I’ll have nightmares about Pac-Man taking over my Sinclair....!!!

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
-
- Posts: 16
- Joined: Mon Jul 22, 2024 7:29 pm
Re: Title Screen Data Load
Me again!
Have watched the suggested youtube videos and think I get the theory of saving separate programs to a virtual tape then loading them in sequence but I think I've been staring at too much code today to put this in practice!
I've attached the .z80 code and loading screen as a .scr in the hope that someone can turn them into a shiny .TAP file!
This is the first listing I have ever written in basic (+3 in FUSE) so please be gentle!
Best,
Jason
Have watched the suggested youtube videos and think I get the theory of saving separate programs to a virtual tape then loading them in sequence but I think I've been staring at too much code today to put this in practice!
I've attached the .z80 code and loading screen as a .scr in the hope that someone can turn them into a shiny .TAP file!
This is the first listing I have ever written in basic (+3 in FUSE) so please be gentle!
Best,
Jason
- Attachments
-
- FF load scr and main.zip
- (10.2 KiB) Downloaded 224 times
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Title Screen Data Load
Give this a go...
Mark
Mark
- Attachments
-
- FF.zip
- (5.03 KiB) Downloaded 64 times
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...