Casio FX-8000G Manuel d'utilisateur Page 13

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 15
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 12
Using songs in homebrew software 13
© 1991 Ulf Petersen/Sven Tegethoff PDFied by Alphasys in 2010
17 Using songs in homebrew software
Before you can use the songs, created by this program, in your own homebrew software, you'll need
to use the "PACK" option in the "COMP" menu. When you click this option, it'll ask you if you're sure.
THIS IS IMPORTANT! Because, when you execute this function, it'll erase the entire composer from
memory, and compiles the song module into an executable format. There's no returning to the editor,
except when you reboot the disk!
WHEN you answered "YES" to this question, you're asked how many songs there are in the module,
to stop the compiled song module from getting overly large. It will then optimise the song, which will
take a few seconds. Unneeded data is cut out, instruments are optimised, aswell as translating the
digitised sounds. Also, the definative length of the executable is calculated. This process takes a few
seconds.
Now, you're asked what starting adress should be used to load the compiled module. After that, the
routines are modified to reflect the adress, and you'll be prompted for a filename. This will then be the
end of your editing session. The song can be saved multiple times, but there's nothing else to be done
except rebooting your Atari.
18 Using songs in BASIC
On the original disk, a little basic program is included, called "PLAYER.BAS", which uses some data-
lines to setup two small machine language routines. The first is the load routine, the second is the
player invoker. You can use his program as a template to incorporate the sound modules into your
own basic program.
The module file should be loaded at the start of the program. The supplied program uses the data
starting at line 20000 for that and the call X=USR(1536,1,7,ST,EN-ST). In Turbo-Basic, this could be
replaced by a BLOAD command.
The secundary machine language routine is then installed and used, to start a song in your module by
calling X=USR(1536,Startadress,Songnumber). If the song doesn't have any digitised sounds, the
basic program will run on after starting the song. Otherwise, it'll be halted until <Start> is pressed. A
running tune can be stopped by the command X=USR(1536,Startadress,0) otherwise.
But how to come up with a good starting adress to use for the compiler? Well, it's not overly
complicated, yet has it's downside. First, you check the top of memory by doing "? PEEK(106)*256"
then converting it to hexadecimal. This adress will give you the first byte of memory that you can't use
anymore, and thus the end of your memory space. In Turbo-Basic this can be easily retrieved by "?
HEX$(PEEK(106)*256)". Whatever the result, note it down.
After that, start the composer, load your song package, and select "PACK". Select the number of
songs, let it cook, and you'll get the songmodule-length. Subtract this from the value you had before
to get your optimum starting adress.
For example: The highest adressable location you got first is $A000, the song-module shows a length
of $2000, so your optimum location would be $8000.
Enter the optimum location, and save the module.
Once that's all done, and you want to use the module, first set locaton 106 to the page where your
optimised sound starts, devided by 256, then issue a graphics command. In the example above that
would be: "POKE 106,128:GRAPHICS 0" Or use any other graphics mode. The only reason for the
Vue de la page 12
1 2 ... 8 9 10 11 12 13 14 15

Commentaires sur ces manuels

Pas de commentaire