Tag - Source

Missing Link World Map to STE Hardware Scroll Converter

By Neil Halliday

Here’s a quick and dirty routine to convert a Missing Link “World” map into an over-sized image that can be used for STE hardware scrolling.

You need to have the Missing Link & STORM Development extension installed in order to render the map and use the simple STE Hardware scrolling command.

Graphics & map taken from the Missing Link examples disk, which appear to be the graphics from Magic Pockets!

DOWNLOAD

SNDH Replay and Archive

By Neil Halliday

The SNDH file format was created in the mid 90’s by BDC of Aura Crew to unify replay routines for the multiple sound players that existed at the time. This meant hundreds of music files could be played using a single consistent interface.  The files themselves contain the original reply source code, but with an SNDH wrapper around them to not only make replay simpler, but to contain meta data about the file too.

Load the SNDHPLAY.BAS file from the _STOS directory in the archive and follow the below text.

100 erase 12 : reserve as work 12,40960 : bload “verminat.snd”,12 : S12 = START(12)

So here we create 40kb of working space in bank 12. This is just me being really lazy and not bothering to find out the uncompressed size of the file and copying it to a different bank etc. most music files come in around 20kb or so, with the odd one being large, so 40kb will cover most files.  We then load the SNDH file into bank 12 using the bload command, and set the S12 variable to the memory address of the start of bank 12.

110 d crunch S12

Now we d crunch the file using the GBP Extension. The extension will determine the packer that was used, and automatically decompress using the appropriate code. As GBP uses A0->A0 decompression, it means the uncompressed data overwrites the compressed data. Make sure that the memory bank has sufficient space reserved, otherwise you will be overwriting memory!

140 dreg(0)=1 : Call S12 : loke $4D2,S12+8

For those that don’t know, the DREG & AREG commands within STOS let you interact directly with the registers of the CPU. D standing for data and A standing for address. Here we are setting data register 0 to 1. This is because the replay routine uses the contents of D0 to hold the tune number that we want to play (a single SNDH file can have multiple pieces of music in it).

We then CALL S12. This is a direct call to the code at the beginning of bank 12. In this instance, it relates to the init_music_driver call which initialises the replay routine.

Once the driver is initialised, we install the VBL replay routine. This can be done actually in STOS code if we want. To do this we would just use CALL S12+8 after each WAITVBL command, but if our program isn’t running in 1 VBL, then neither will the music – it will slow down!  Therefore the best way to call the music is to put it on the VBL List. The VBL list is a series of addresses that are executed every VBL, with priority over everything else. Therefore, we can guarantee that this code is executed every VBL and maintain it’s proper speed. There are a number of VBL list addresses, I’ve chosen $4D2.  Once the address is loked to the VBL list, we can forget about it, and let it tinkle away whilst we get on with other things.

350 loke $4D2,0 : silence : call S12+4

Once we are done with our routine, we need to clear the VBL List. We do that by resetting the $4D2 address with 0. We use the SILENCE command from STOS to clear the sound registers, although we could do that manually if we wanted. The final CALL S12+4 calls the exit_music_driver routine provided by SNDH. This will clean everything up for us.

And that’s all there is to it!

The SNDH Format

All the files are generally compressed. I’ve found the ones that I’ve looked at so far have all been compressed using the Ice Packer. It doesn’t really matter which packer they are compressed with, my GBP Extension can cope with it. So, first of all we need to reserve some space for the uncompressed file.

In the zip file, you will find the current SNDH archive that was last updated in January 2018. Along with all the files is a _STOS directory where I have written a quick and dirty replay routine used in the above tutorial. This works with pretty much all the files in the archive, but there are a few drivers that don’t seem to work (the Spaz Crikey Wot a Scorcher for example don’t seem to work). If and when I figure these out, I’ll repost. Note that some of the sampled replay routines don’t conform properly to the specs, leaving the interrupts active. As I said, this is a quick and dirty replay routine, so I’ve not dealt with that!

Have fun listening to all the classic tunes, and enjoy the trip down memory lane using all the files in your STOS productions!

For more SNDH updates, visit the SNDH Archive Web Site.

DOWNLOAD

The Siner Demo Screen

By Neil Halliday

The Siner Screen is a demo that was written for the Hellbender Demo, which was a mega demo that Bruno Azzara and myself were writing. Alas, we never finished it before work and life got in the way!

This demo features a 320×200 single plane 1 pixel horizontal sine scroller (in real-time), with 3 single plane bobs and single plane vu meters.

In the zip you will find the full source code for the demo screen.

DOWNLOAD

STORM Development Extension

By Neil Halliday

This is the source code to an unfinished extension that introduced lots of commands into STOS Basic to deal with the Atari STE. It contains commands to interact with the Jaguar controllers, along with automated hardware scrolling commands, and reading joysticks that are connected to the Centronics ports.

Full interpreter, source code and instruction manual included in the zip file.

DOWNLOAD

Disk Boot v1.00

By Neil Halliday

This is the full source code to Disk Boot v1.00 that I created for my A-Level project from 1992/1993.

Disk Boot is a floppy disk boot sector management application that allows the copying, storing and restoring of boot sectors on a floppy disk. The main idea for the program was to enable the recreation of boot sectors where they had been overwritten accidentally, or by a boot sector virus.

Along with the program is the extension that I created to allow STOS Basic to do some low level disk functions, and a series of pre-saved boot sectors.

I have also included all my thesis notes about the project in the PDF file.

** NOTE: I cannot guarantee the operation of this program, and therefore cannot be held responsible for any damage or loss of data as a result of using it!

DOWNLOAD