Hi good afternoon.
The SL2 is a converted BMP.
- BMP with 256 colors 256x192 pixels
- BMP was tilted Vertical
- 1072 bytes were removed from the beginning
- new BMP now has 49152 bytes and can be loaded in NextBasic
Such a conversion program can be done quickly
write yourself.
Greeting
Next basic snippets
Re: Next basic snippets
This from FB, in case it helps others here:Luzie wrote: ↑Sun Apr 03, 2022 4:36 pm@Jbizzel How can we change the transparency colour from NextBASIC? Maybe with the "Global Transparency Register" $14 ? https://wiki.specnext.dev/Global_Transparency_Registeris this the way to maybe change transparency colour to bright yellow for displaying a Layer 2 picture under Tranz Am´s brihgt yellow (ATTR=112 dez/01110000 bin http://www.overtakenbyevents.com/lets-t ... en-layout/) Playfield?Short Description Sets the "transparent" colour for Layer 2, ULA and LoRes pixel data.
These are the Next palette indexes for the standard ULA colours.
Dim Ink: 0..7
Bright Ink: 8..15
Dim Paper: 16..23
Bright Paper: 24..31
Within those sets of eight the normal Spectrum colour sequence applies: black (0), blue (1), red (2), magenta (3), green (4), cyan (5), yellow (6) and white (7).
Running programs use the ULA first palette (palette 0).
The global transparency colour can be read from and written to REG 20. The default value in BASIC is 227, which is a shade of magenta that's not used anywhere else in the ULA palette. So this is a good value to use.
What you want to do is decide which background colour(s) the game uses, and work out the palette indexes for those colour(s), and redefine them as the global transparency colour.
So for example, if the game uses dim blue paper for its background colour, the palette index for that would would be 16 (dim paper) + blue (1) = 17. So write this program:
10 REG 20, 227; Set global transparency
20 REG 67, 0; Select palette 0 (ULA first palette)
30 REG 64, 17; Select index 16 (dim blue paper)
40 REG 65, 226; Set palette value same as global transparency
50 ; Load your game here
Note that REG 20 returns an 8bit colour not 9bit, and we're also using REG 65 to write 8bit colours. The transparency doesn't match on the 9th bit anyway, so although we could use 9 bit colours and they would work, it's not necessary and just results in longer code.
- flatduckrecords
- Manic Miner
- Posts: 840
- Joined: Thu May 07, 2020 11:47 am
- Location: Oban, Scotland
- Contact:
Re: Next basic snippets
Geoff's bit in the latest Spectrum Show has a nice intro to palette cycling. I've seen it used for cool stuff on the Megadrive (water, lava effects) and Jon Burton described a really cool technique to turn a handful of (very carefully set up) animation frames that can be smoothed out efficiently by rotating the palette in between frames. I'm not sure to what extent that's applicable in Next BASIC, but it seems like a potentially very useful technique?
- flatduckrecords
- Manic Miner
- Posts: 840
- Joined: Thu May 07, 2020 11:47 am
- Location: Oban, Scotland
- Contact:
Re: Next basic snippets
Geoff's bit in the latest Spectrum Show has a nice intro to palette cycling. I've seen it used for cool stuff on the Megadrive (water, lava effects) and Jon Burton described a really cool technique to turn a handful of (very carefully set up) animation frames that can be smoothed out efficiently by rotating the palette in between frames. I'm not sure to what extent that's applicable in Next BASIC, but it seems like a potentially very useful technique?
Re: Next basic snippets
Re: Next basic snippets
Nice!
Does it work for both the yellow background and the black background? Or is that impossible, do you think?
Does it work for both the yellow background and the black background? Or is that impossible, do you think?
Re: Next basic snippets
Impossible is nothing , but for this we need to change the original games code. And I personally prefer Night/Day-Change on Tranz-Am.
I not yet find many time to test further with Transparency/Layer 2. ATM I´m into reading the SpecNext Manual.
Is your Background JUNGLED.SL2/NextBASIC-Code free for distribution? Maybe one could do a "Jungle-Edition-Package" of Games like Silversofts Orbiter or Bug-Bytes Spectral Invaders ... like this:
Re: Next basic snippets
@Luzie yes of course, have fun! The background looks good for all of those games
Re: Next basic snippets
ATM I´m experiment with some free Background Pictures from royalty free pictures from Images-Site: https://www.publicdomainpictures.net
than cropping them to 256x192 Pixels and than convert them to Nexts .SL2-Format with Remy Sharps Tools at: https://zx.remysharp.com/tools/:
than cropping them to 256x192 Pixels and than convert them to Nexts .SL2-Format with Remy Sharps Tools at: https://zx.remysharp.com/tools/: