Jump to content
IGNORED

Game Engine 256


senior_falcon

Recommended Posts

The winning entry in the 10 line BASIC/XB contest was Game Engine X by KL99. The idea for the game is quite interesting, but I found that the "rubbery" feel of the graphics and the 40 pixel scrolling left much to be desired. Since XB256 offers scolling by single pixels, plus programs written for XB256 can be compiled, I decided to try to make a port of Game Engine X for XB256 to see better results could be achieved. The results are contained in the attached disk image.

 

ENGINE256 is the original source program which runs using XB256. Although the XB256 subroutines are written in assembly, there is a lot of overhead (both assembly and XB) involved in scrolling the platform. When running in straight XB256 the program is way too slow, with gameplay happening at a glacial pace. CPU overdrive in Classic99 helps out a lot. The game is much more playable and easier to test. Of course, from the beginning the intention was to compile the program, which these days happens pretty quickly. On my old Dell Optiplex 780 it takes just 22 seconds to save, compile, assemble, load and save the compiled program. A modern computer would be even faster.

 

The compiled program is ENGINE256X. This loads and runs like any XB program. Start by choosing speed 2. The controls are just like Game Engine X - use joystick left/right to move and the fire button to jump. On a keyboard, left and right arrow keys to move and Q to jump. Death of the player is not very elegant - he is immediately dropped back into the game again.

 

One thing you will notice is the sound effects. Constantly playing is a wonderfully frantic composition called Bumble Bee Boogie by Jack Fina, Sam Moore and Ollie Hebert. Superimposed on that is a rising scale when you jump and a descending scale when you fall. The sound list player in XB256 makes this possible and it can be used in both XB and compiled programs. When the game ends or if you break the program the sound list will hang. Press any letter and enter to cause an error which will clear the sound chip. SLCONVERT was used to create the sound list. The XB source program for the sound effects is called BUMBLE.

 

This program was written to be a demo and proof of concept, and I will not develop it further. There are rough edges that could be ironed out, and it ends abruptly just where Klaus's program ends. In a more developed version there would be objects to collect, monsters/aliens to shoot at, different levels, etc. Although compiled programs are fast, this one really pushes the limits and the horizontal scrolling is right on the edge of being too slow. You will see this if you choose a speed of 1. The edges of the platform flicker a bit. In later posts I will offer thoughts on how to improve the horizontal scrolling. If you want to make changes to the program, there is an important step that must be taken. When running in XB256 you must activate line 1 by removing the exclamation point. This reserves the proper amount of memory for the sound list. When compiling, line 1 must be turned back into a comment or the program will crash.

ENGINE256.DSK

  • Like 10
Link to comment
Share on other sites

  • 2 weeks later...

One of the purposes of the GameEngine256 demo program was to show off the advanced sound list capabilities of XB256, both when running in XB and when compiled. 

 

After listening to many TI XB music programs, I decided to use Bumblebee Boogie for the main theme. I did not want to play the entire composition, just a loop that was long enough to be interesting. To do this I had to decide what lines would be the first and last lines of the loop. This required some patience. I pressed F4 in various places in the song to try to get an idea of where the program was and using GOTO's was able to narrow it down to lines 200 to 400. This music will be played constantly.

 

Superimposed on that I wanted a rising chromatic scale from 220 to 440 Hz to be played when "Tex" jumps, and a falling chromatic scale from 220 to 110 Hz to be played when "Tex" falls. This is pretty simple. For the rising scale:
20 SN=220::INTV=2^(1/12)::FOR I=1 TO 13 :: CALL SOUND(25,SN,0)::SN=SN*INTV::NEXT I
And the falling scale is similar.

 

Here is a tutorial showing how I created the sound lists to do this.

 

Building on the original Bumblebee boogie program which started at line 100, I added the code for the scales before this. I also broke up some of the long lines in the original program to isolate the FOR/NEXT loops on one line. As written, Bumblebee boogie is all played at volume 0. Because I wanted the sound effects to be louder than the main theme I changed the volume to 10. This is the variable V in line 165. The resulting program is listed below. 

 

Spoiler


15 !CALL LABEL("JUMP")
18 !CALL PLAYER2
20 SN=220::INTV=2^(1/12)::FOR I=1 TO 13 :: CALL SOUND(25,SN,0)::SN=SN*INTV::NEXT I
22 END !CALL STOP  !done with this sound list
25 !CALL LABEL("FALL")
26 !CALL PLAYER2
28 SN=220::INTV=2^(1/12)::FOR I=1 TO 13 :: CALL SOUND(25,SN,0)::SN=SN/INTV::NEXT I
32 END !CALL STOP  !done with this sound list
100 ! BUMBLEBOOG                Flight of the Bumblebee  by Jack Fina.  Program (and jazz) by Sam Moore, Jr.     Changes: Ollie Hebert, 1987
102 RESTORE 110
110 DATA 000E314080700C0300010307FF0301023048844424120A865455555555555554,0408000000000000060F5F5F5E00008040200000000000000000F
120 CALL DELSPRITE(ALL):: CALL CLEAR :: CALL SCREEN(12):: CALL CHARSET :: CALL MAGNIFY(1)! Also UPPER CASE only, all for RUN ALL sequencing.
130 FOR Y=128 TO 132 STEP 4 :: READ A$ :: CALL CHAR(Y,A$):: NEXT Y :: CALL SOUND(1,111,30):: FOR Z=8 TO 18 STEP 5
140 DISPLAY AT(Z,8):"€‚   €‚   €‚":"       ƒ…‡ ƒ…‡ ƒ…‡":"       „ †  „ †  „ †" :: NEXT Z :: DISPLAY AT(4,8):"BUMBLE-BOOGIE"
150 DISPLAY AT(6,6):"BASE BY JACK FINA" :: DISPLAY AT(22,2):"JAZZED UP BY SAM MOORE, JR." :: READ A,B,C,D,DS,E,F,FS,G,GS,HA,HAS,HB,HC,HCS
160 READ HD,HDS,HE,HF,HFS,HG,HGS,HHA,HHC,HHCS,HHD,HHDS,HHE,HHF,HHFS,HHG,HHGS,LA,LC,LCS,LD,LDS,LE,LF,LG,LGS,LLA,LLAS,LLB,T 
165 V=10::T=75::  !@p-
166 !GOTO 201
170 FOR Z=0 TO 3 :: CALL SOUND(T,LLA,V,A,V):: CALL SOUND(T,LLA,V,LA,V):: CALL SOUND(T,LA,V,HA,V):: CALL SOUND(T,LA,V,A,V)
180 CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,C,V):: CALL SOUND(T,LD,V,HD,V):: CALL SOUND(T,LD,V,D,V):: CALL SOUND(T,LDS,V,HDS,V)
190 CALL SOUND(T,LDS,V,DS,V):: CALL SOUND(T,LE,V,HE,V):: CALL SOUND(T,LE,V,E,V):: CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,C,V)
200 CALL SOUND(T,LE,V,HE,V):: CALL SOUND(T,LE,V,E,V):: NEXT Z :: FOR Y=0 TO 2 
201 !CALL LABEL("BUMBLE")
202 FOR Z=0 TO 2 !CALL LABEL("LOOP1")
204 CALL SOUND(T,LLA,V,HE,V)
210 CALL SOUND(T,LLA,V,HDS,V):: CALL SOUND(T,LA,V,HD,V):: CALL SOUND(T,LA,V,HCS,V):: CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,HF,V)
220 CALL SOUND(T,LD,V,HE,V):: CALL SOUND(T,LD,V,HDS,V):: CALL SOUND(T,LDS,V,HE,V):: CALL SOUND(T,LDS,V,HDS,V):: CALL SOUND(T,LE,V,HD,V)
230 CALL SOUND(T,LE,V,HCS,V):: CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,HCS,V):: CALL SOUND(T,LE,V,HD,V):: CALL SOUND(T,LE,V,HDS,V)
240 NEXT Z !CALL LOOP("LOOP1",3)
241 CALL SOUND(T,LLA,V,A,V,HE,V):: CALL SOUND(T,LLA,V,LA,V):: CALL SOUND(T,LA,V,HA,V):: CALL SOUND(T,LA,V,A,V)
250 CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,C,V):: CALL SOUND(T,LD,V,HD,V):: CALL SOUND(T,LF,V,D,V):: CALL SOUND(T,LDS,V,HDS,V)
260 CALL SOUND(T,LDS,V,DS,V):: CALL SOUND(T,LE,V,HA,V):: CALL SOUND(T,LE,V,A,V):: CALL SOUND(T,LC,V,HA,V):: CALL SOUND(T,LC,V,A,V)
270 CALL SOUND(T,LE,V,HF,V):: CALL SOUND(T,LF,V,F,V)
272 FOR Z=0 TO 2 !CALL LABEL("LOOP2")
274 CALL SOUND(T,LD,V,HA,V):: CALL SOUND(T,LD,V,HGS,V)
280 CALL SOUND(T,D,V,HG,V):: CALL SOUND(T,D,V,HFS,V):: CALL SOUND(T,LF,V,HF,V):: CALL SOUND(T,LF,V,HAS,V):: CALL SOUND(T,LG,V,HA,V)
290 CALL SOUND(T,LG,V,HGS,V):: CALL SOUND(T,LGS,V,HA,V):: CALL SOUND(T,LGS,V,HGS,V):: CALL SOUND(T,LA,V,HG,V):: CALL SOUND(T,LA,V,HFS,V)
300 CALL SOUND(T,LLA,V,HF,V):: CALL SOUND(T,LLA,V,HFS,V):: CALL SOUND(T,LA,V,HG,V):: CALL SOUND(T,LA,V,HGS,V)
302 NEXT Z !CALL LOOP("LOOP2",3)
310 CALL SOUND(T,LD,V,HA,V,HD,V):: CALL SOUND(T,LD,V,D,V):: CALL SOUND(T,D,V,HHD,V):: CALL SOUND(T,D,V,HD,V):: CALL SOUND(T,LF,V,HF,V)
320 CALL SOUND(T,LF,V,F,V):: CALL SOUND(T,LG,V,HG,V):: CALL SOUND(T,LG,V,G,V):: CALL SOUND(T,LGS,V,HGS,V):: CALL SOUND(T,LGS,V,GS,V)
330 CALL SOUND(T,LA,V,HD,V):: CALL SOUND(T,LA,V,D,V):: CALL SOUND(T,LLA,V,HF,V):: CALL SOUND(T,LLA,V,F,V):: CALL SOUND(T,LA,V,HA,V)
340 CALL SOUND(T,LA,V,A,V)
342 FOR Z=0 TO 1 !CALL LABEL("LOOP3")
344 CALL SOUND(T,LE,V):: CALL SOUND(T,LE,V,E,V):: CALL SOUND(T,E,V,HD,V,HHE,V)
350 CALL SOUND(T,E,V,HE,V):: CALL SOUND(T,LE,V,HE,V):: CALL SOUND(T,LE,V,E,V):: CALL SOUND(T,E,V,HG,V):: CALL SOUND(T,E,V,G,V)
360 CALL SOUND(T,LE,V,HGS,V):: CALL SOUND(T,LE,V,GS,V):: CALL SOUND(T,E,V,HB,V):: CALL SOUND(T,E,V,B,V):: CALL SOUND(T,LE,V,HHCS,V)
370 CALL SOUND(T,LE,V,HCS,V):: CALL SOUND(T,E,V,HHE,V):: CALL SOUND(T,E,V,HE,V):: CALL SOUND(T,LF,V,HGS,V,HHF,V):: CALL SOUND(T,LF,V,F,V)
380 CALL SOUND(T,F,V,HF,V):: CALL SOUND(T,HF,V,HHF,V):: CALL SOUND(T,LF,V,F,V):: CALL SOUND(T,F,V,HF,V):: CALL SOUND(T,F,V,HGS,V,HHF,V)
390 CALL SOUND(T,HF,V,HHF,V):: CALL SOUND(T,LF,V,F,V):: CALL SOUND(T,LF,V,F,V):: CALL SOUND(T,F,V,HF,V):: CALL SOUND(T,HF,V,HHF,V)
400 CALL SOUND(T,LF,V,HGS,V,HHF,V):: CALL SOUND(T,LF,V,F,V):: CALL SOUND(T,F,V,HF,V):: CALL SOUND(T,HF,V,HHF,V)
402 NEXT Z !CALL LOOP("LOOP3",2)
404 !GOTO 201 !CALL GOTO("BUMBLE")
406 !CALL LASTLINE  !last line of the sound list
408 !END !none of the following call sounds will be performed
410 FOR Z=0 TO 3 :: CALL SOUND(T,LLA,V,HA,V):: CALL SOUND(T,LLA,V,HAS,V):: CALL SOUND(T,LA,V,HA,V):: CALL SOUND(T,LA,V,HGS,V):: NEXT Z
420 CALL SOUND(T,LLA,V,HA,V):: CALL SOUND(T,LLA,V,HAS,V):: CALL SOUND(T,LA,V,HB,V):: CALL SOUND(T,LA,V,HHC,V):: CALL SOUND(T,LLA,V,HHCS,V)
430 CALL SOUND(T,LLA,V,HHC,V):: CALL SOUND(T,LA,V,HB,V):: CALL SOUND(T,LA,V,HAS,V):: CALL SOUND(T,LLA,V,HA,V):: CALL SOUND(T,LLA,V,HAS,V)
440 CALL SOUND(T,LA,V,HB,V):: CALL SOUND(T,LA,V,HHC,V):: CALL SOUND(T,LLA,V,HHCS,V):: CALL SOUND(T,LLA,V,LA,V):: CALL SOUND(T,LA,V,A,V)
450 CALL SOUND(T,A,V,HA,V):: FOR Z=0 TO 1 :: CALL SOUND(T,LD,V):: CALL SOUND(T,LD,V,D,V):: CALL SOUND(T,D,V,HC,V,HHD,V)
460 CALL SOUND(T,D,V,HD,V):: CALL SOUND(T,LD,V,HD,V):: CALL SOUND(T,LD,V,D,V):: CALL SOUND(T,D,V,HF,V):: CALL SOUND(T,D,V,F,V)
470 CALL SOUND(T,LD,V,HFS,V):: CALL SOUND(T,LD,V,FS,V):: CALL SOUND(T,D,V,HA,V):: CALL SOUND(T,D,V,A,V):: CALL SOUND(T,LD,V,HB,V)
480 CALL SOUND(T,LD,V,B,V):: CALL SOUND(T,D,V,HHD,V):: CALL SOUND(T,D,V,HD,V):: CALL SOUND(T,LDS,V,HCS,V,HHDS,V):: CALL SOUND(T,LDS,V,DS,V)
490 CALL SOUND(T,DS,V,HDS,V):: CALL SOUND(T,HDS,V,HHDS,V):: CALL SOUND(T,LDS,V,DS,V):: CALL SOUND(T,DS,V,HDS,V)
500 CALL SOUND(T,DS,V,HCS,V,HHDS,V):: CALL SOUND(T,HDS,V,HHDS,V):: CALL SOUND(T,LDS,V,DS,V):: CALL SOUND(T,LDS,V,DS,V)
510 CALL SOUND(T,DS,V,HDS,V):: CALL SOUND(T,HDS,V,HHDS,V):: CALL SOUND(T,LDS,V,HCS,V,HHDS,V):: CALL SOUND(T,LDS,V,DS,V)
520 CALL SOUND(T,DS,V,HDS,V):: CALL SOUND(T,HDS,V,HHDS,V):: NEXT Z :: FOR Z=0 TO 3 :: CALL SOUND(T,LD,V,HHD,V):: CALL SOUND(T,LD,V,HHDS,V)
530 CALL SOUND(T,D,V,HHD,V):: CALL SOUND(T,D,V,HHCS,V):: NEXT Z :: CALL SOUND(T,LD,V,HHD,V):: CALL SOUND(T,LD,V,HHDS,V)
540 CALL SOUND(T,D,V,HHE,V):: CALL SOUND(T,D,V,HHF,V):: CALL SOUND(T,LD,V,HHFS,V):: CALL SOUND(T,LD,V,HHF,V):: CALL SOUND(T,D,V,HHE,V)
550 CALL SOUND(T,D,V,HHDS,V):: CALL SOUND(T,LD,V,HHD,V):: CALL SOUND(T,LD,V,HHDS,V):: CALL SOUND(T,D,V,HHE,V):: CALL SOUND(T,D,V,HHF,V)
560 CALL SOUND(T,LD,V,HHFS,V):: CALL SOUND(T,LD,V,D,V):: CALL SOUND(T,D,V,HD,V):: CALL SOUND(T,HD,V,HHD,V):: CALL SOUND(T,LG,V,HHD,V)
570 CALL SOUND(T,LG,V,HHCS,V):: CALL SOUND(T,G,V,HHC,V):: CALL SOUND(T,G,V,HB,V):: CALL SOUND(T,LG,V,HAS,V):: CALL SOUND(T,LG,V,HHDS,V)
580 CALL SOUND(T,G,V,HHD,V):: CALL SOUND(T,G,V,HHCS,V):: CALL SOUND(T,LG,V,HHD,V):: CALL SOUND(T,LG,V,HHCS,V):: CALL SOUND(T,G,V,HHC,V)
590 CALL SOUND(T,G,V,HB,V):: CALL SOUND(T,LG,V,HAS,V):: CALL SOUND(T,LG,V,HB,V):: CALL SOUND(T,G,V,HHC,V):: CALL SOUND(T,G,V,HHCS,V)
600 CALL SOUND(T,LG,V,HHD,V):: CALL SOUND(T,LG,V,HHCS,V):: CALL SOUND(T,G,V,HHC,V):: CALL SOUND(T,G,V,HB,V):: CALL SOUND(T,LG,V,HHC,V)
610 CALL SOUND(T,LG,V,HB,V):: CALL SOUND(T,G,V,HAS,V):: CALL SOUND(T,G,V,HA,V):: CALL SOUND(T,LG,V,HAS,V):: CALL SOUND(T,LG,V,HB,V)
620 CALL SOUND(T,G,V,HHC,V):: CALL SOUND(T,G,V,HHCS,V):: CALL SOUND(T,LG,V,HHD,V):: CALL SOUND(T,LG,V,HHDS,V):: CALL SOUND(T,G,V,HHE,V)
630 CALL SOUND(T,G,V,HHF,V):: CALL SOUND(T,LE,V,HHE,V):: CALL SOUND(T,LE,V,HHDS,V):: CALL SOUND(T,E,V,HHD,V):: CALL SOUND(T,E,V,HHCS,V)
640 CALL SOUND(T,LE,V,HHD,V):: CALL SOUND(T,LE,V,HHCS,V):: CALL SOUND(T,E,V,HHC,V):: CALL SOUND(T,E,V,HB,V):: CALL SOUND(T,LE,V,HHC,V)
650 CALL SOUND(T,LE,V,HB,V):: CALL SOUND(T,E,V,HAS,V):: CALL SOUND(T,E,V,HA,V):: CALL SOUND(T,LE,V,HGS,V):: CALL SOUND(T,LE,V,HG,V)
660 CALL SOUND(T,E,V,HFS,V):: CALL SOUND(T,E,V,HF,V):: FOR Z=0 TO 7 :: CALL SOUND(T,LE,V,HE,V):: CALL SOUND(T,LE,V,HF,V)
670 CALL SOUND(T,E,V,HE,V):: CALL SOUND(T,E,V,HGS,V):: NEXT Z :: CALL SOUND(T,LE,V,HE,V,HHE,V):: CALL SOUND(T,LE,V,E,V,HE,V)
680 CALL SOUND(T,LE,V,HE,V,HHE,V):: CALL SOUND(T,LE,V,E,V,HE,V):: CALL SOUND(T,LDS,V,HDS,V,HHDS,V):: CALL SOUND(T,LDS,V,DS,V,HDS,V)
690 CALL SOUND(T,LD,V,HE,V,HHE,V):: CALL SOUND(T,LD,V,E,V,HE,V):: CALL SOUND(T,LCS,V,HF,V,HHF,V):: CALL SOUND(T,LCS,V,F,V,HF,V)
700 CALL SOUND(T,LC,V,HFS,V,HHFS,V):: CALL SOUND(T,LC,V,FS,V,HFS,V):: CALL SOUND(T,LLB,V,HG,V,HHG,V):: CALL SOUND(T,LLB,V,G,V,HG,V)
710 CALL SOUND(T,LLAS,V,HGS,V,HHGS,V):: CALL SOUND(T,LLAS,V,GS,V,HGS,V):: FOR Z=0 TO 1 :: CALL SOUND(T,LLA,V,HA,V,HHA,V)
720 CALL SOUND(T,LLA,V,LA,V):: CALL SOUND(T,LA,V,HA,V):: CALL SOUND(T,LA,V,A,V):: CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,C,V)
730 CALL SOUND(T,LD,V,HD,V):: CALL SOUND(T,LD,V,D,V):: CALL SOUND(T,LDS,V,HDS,V):: CALL SOUND(T,LDS,V,DS,V):: IF Z THEN 760
740 CALL SOUND(T,LE,V,HE,V):: CALL SOUND(T,LE,V,E,V):: CALL SOUND(T,LC,V,HC,V):: CALL SOUND(T,LC,V,C,V):: CALL SOUND(T,LE,V,HE,V)
750 CALL SOUND(T,LE,V,E,V)
760 NEXT Z :: CALL SOUND(T,LE,V,HHE,V):: CALL SOUND(T,LE,V,HE,V):: CALL SOUND(T,LC,V,HHE,V):: CALL SOUND(T,LC,V,HE,V)
770 CALL SOUND(T,LE,V,HHC,V):: CALL SOUND(T,LE,V,HC,V):: NEXT Y :: FOR Z=V TO 30 STEP 2 :: CALL SOUND(T,LLA,Z,HE,Z):: CALL SOUND(T,LLA,Z,HDS,Z)
780 CALL SOUND(T,LA,Z,HD,Z):: CALL SOUND(T,LA,Z,HCS,Z):: CALL SOUND(T,LC,Z,HC,Z):: CALL SOUND(T,LC,Z,HF,Z):: CALL SOUND(T,LD,Z,HE,Z)
790 CALL SOUND(T,LD,Z,HDS,Z):: CALL SOUND(T,LDS,Z,HE,Z):: CALL SOUND(T,LDS,Z,HDS,Z):: CALL SOUND(T,LE,Z,HD,Z):: CALL SOUND(T,LE,Z,HCS,Z)
800 CALL SOUND(T,LC,Z,HC,Z):: CALL SOUND(T,LC,Z,HCS,Z):: CALL SOUND(T,LE,Z,HD,Z):: CALL SOUND(T,LE,Z,HDS,Z):: NEXT Z :: RUN "DSK1.LOAD"
810 DATA 440,494,262,294,311,330,349,370,392,415,880,932,988,523,554,587,622,659,698
820 DATA 740,784,831,1760,1047,1109,1175,1245,1319,1397,1480,1568,1661,220,131,139,147,156,165,175,196,208
830 DATA 110,117,123,-99

 

 

You can test the three parts with RUN 15, RUN 25, and RUN 100. When you RUN 100 it plays the entire composition from beginning to end. There is a slight choppiness which will go away when the sound list is created. You can set up the endless loop by uncommenting lines 166 and 404. 
166 !GOTO 201
404 !GOTO 201 !CALL GOTO("BUMBLE")
Then RUN 100 will test out the loop. The remaining code after line 404 is not executed but there is no harm in leaving it.

 

XB256 should be loaded and running for the next steps. Because it can handle numeric variables, we will use SLCONVERT to create the soundlist. It is described on pages 17-19 of the XB256 manual. SLCONVERT intercepts CALL SOUND statements and, instead of playing them, converts them into a sound list. If the CALL SOUNDs are in an endless loop, an endless sound list will be produced. Not good. If a FOR/NEXT loops 3 times there will be 3 copies of that section of the sound list, wasting memory. There are ways to deal with these problems. Once you are satisfied the XB program plays the sound effects as desired, you have to make some modifications to the music program so SLCONVERT can send instructions to the sound list being created. 

 

I have made it easy to do this in the demo program. For example:
   202 FOR Z=0 TO 2 !CALL LABEL("LOOP1")    becomes         202 CALL LABEL("LOOP1")
   ...call sound statements in the loop                     ...call sound statements in the loop
   240 NEXT Z !CALL LOOP("LOOP1",3)         becomes         240 CALL LOOP("LOOP1",3)
This loops 3 times in XB. Remove the code up to CALL LABEL and CALL LOOP and now XB will only perform the call sound statements once. But CALL LABEL and CALL LOOP create labels and instructions that tell the sound list processor to perform that loop 3 times when it plays. 

 

To prepare the program for SLCONVERT, remove everything up to the CALL in these lines as described above:
15,18,22,25,26,32,201,202,240,272,302,342,402,406. 
All now start with CALL LABEL, CALL PLAYER2, CALL STOP, etc. Uncomment 166,404, and 408 so they read:
166 GOTO 201    404 GOTO 201    408 END
While making these changes, you should study the manual and the code to help understand these concepts. 

 

Once that is done, double checked, and a backup saved (I saved it as DSK1.BUMBLE), type MERGE "DSK1.SLCONVERT". This uses line 1 and lines from 32000 and up which means that your XB program cannot use these lines. 

At last it's time to make a sound list. Be sure XB256 is loaded and running, and CPU overdrive helps a lot here! Type RUN and the program asks:
"Sound List Output File?"
Enter DSK1.BUMBLE.TXT
When the sound list source code file  has been created the program ends and you are returned to the immediate mode of XB256. The next steps are described in the XB256 manual starting at the middle of page 14 

 

First assemble the program. Return to the XBGDP main menu and select ASSEMBLER. 
I used a source file name of DSK1.BUMBLE.TXT
And the object file name was DSK1.BUMBLE.OBJ
Press ENTER 3 times and the assembly process will start. When finished press ENTER once more. 

 

At the XBGDP menu select XB256. Press F3 to kill the auto complete routine. 
Following the manual we type:
CALL LOAD(“DSK1.BUMBLE.OBJ”)    loads the object code
CALL LINK(“ST2VDP”,1)          moves sound table into VDP buffer1
And we are greeted with this error message:
"SOUND TABLE TOO LARGE  IT IS 960 BYTES LONG  CANNOT EXCEED 640 BYTES"
Now we know that the sound table will not fit into VDP buffer 1

 

OK, let's try VDP buffer 2
CALL LOAD(“DSK1.BUMBLE.OBJ”)    loads the object code
CALL LINK(“ST2VDP”,2)          moves sound table into VDP buffer2
The error message is similar: "VDP RAM BUFFER TOO SMALL   Enter CALL LINK("XB256",960)  Enter NEW  Then reload the sound table"

 

Now we know what to do:
CALL LINK("XB256",960) 
NEW
CALL LOAD(“DSK1.BUMBLE.OBJ”)    loads the object code
CALL LINK(“ST2VDP”,2)          moves sound table into VDP buffer2
Success!!! Now we get a screen similar to the one at the top of page 15 giving the three addresses we care about:
BUMBLE  6319
FALL    6245
JUMP    6176
 
We can test these in the immediate mode:
CALL LINK("PLAY",6319)  will play the main bumbleboogie music
CALL LINK("PLAY",6245)  superimposes the falling sound on the music
CALL LINK("PLAY",6176)  superimposes the jumping sound on the music.

To turn off the sound just press a key and then enter. The honk will turn off the sound list.

 

Now that those pesky error messages have been taken care of, at this point pages 15 and 16 of the XB256 manual describe how to use COMPRESS to make compressed DATA statements and how to incorporate them into your program. When XB256 is loaded, be sure you have reserved 960 bytes in vdp buffer 2. You can do this from the immediate mode as described above:
CALL LINK("XB256",960) 
NEW

Or you can have your program do it for you:
1 CALL LINK("XB256",960)::RUN 2
2 START OF PROGRAM
If you do this you must remember to comment out line 1 for compiling, and uncomment it when testing in XB256.

 

Remember that the sound list player can be used in both XB256 programs and compiled programs. 


 

Edited by senior_falcon
  • Like 4
Link to comment
Share on other sites

  • 1 year later...

For first thanks a lot for your sharing and explanation.... 

I'm trying to embed a sound track in a XB256 program . I've aleady produced the sound list table in assembly format (see attachment) but now I'm completely lost ... I check the XB256 manual (pag.12-21) in particular the session regarding "Creating a Sound Table in Assembly Language" ... but at the page 21. when say "Once created, the sound table should be assembled and loaded as described above in the SLCOMPILER tutorial." I don't understand on how to proceeed...

Any suggestion ?

 

attached my sound table list 

bgm_xb.txt

Link to comment
Share on other sites

I have no idea what this is or what to do with it.

It assembled without error. I loaded it with CALL LOAD

The DEF table has one entry, MUSIC, but CALL LINK("MUSIC") just crashes the computer.

 

(Edit)

The real question is, how did this come into existence? Did you start with an XB program that used CALL SOUNDs to make the music and then use one of the sound list compilers in XBGDP?  If so, then PM me the music program and I will get it to work and show you how you can do that.

 

Tursi's utility was discussed in another thread. I know nothing about that. I understand that the sound table and player reside in low memory, so that should be compatible with the compiler. But first it needs to be in a form that can be played from XB.

Edited by senior_falcon
Link to comment
Share on other sites

I believe @whoami999ster has created a music file that must be played using Tursi's player as explained here:

https://atariage.com/forums/topic/159998-game-port-prospect-acorn-electrons-gunsmoke/?do=findComment&comment=4899186

This is not a sound list, so it cannot be handled using the sound list tools in XB256 or played using the console's music player. Instead the music and Tursi's player must be loaded from XB as it was any other assembly support program. 

Link to comment
Share on other sites

8 minutes ago, whoami999ster said:

You're compltely right ... so my big problem is to "translate" the sound table derived from vgmomp2 tool in the format compatible with XB246... 

Just a curiosity but where did you find the sound table for the "Flight of the Bumblebee" ? ...  

I still don't understand why you don't want to play the music using Tursi's tools? That would be a really cool and unique thing to do.

Regarding "Flight of the BumblebeeI extracted it using my tool Sound List Ripper from somewhere that I no longer remember. I put the tool to work on a lot of game binaries and it magically appeared. ? I'm sure someone here remembers where it's from.

 

Link to comment
Share on other sites

4 minutes ago, Asmusr said:

I still don't understand why you don't want to play the music using Tursi's tools? That would be a really cool and unique thing to do.

Regarding "Flight of the BumblebeeI extracted it using my tool Sound List Ripper from somewhere that I no longer remember. I put the tool to work on a lot of game binaries and it magically appeared. ? I'm sure someone here remembers where it's from.

 

 

I would not use the Tursi's tool but vgmcomp2 was the only tool I found to conver a .vgm file into something playable by TI99...

the story is the following: I created a game (gunsmoke for TI) and now I would like to implement the soudtrack... I found a nice sound track in .vgm format so the way I found to covert the file .vgm into a something playble by TI99 was vgmcomp2 tool by Tursi... But finally I realize that the file produced .sbf was only playable by Tursi's player ... since the idea was to use XB256 I saw the possibility to use the SLCOMPILE/SLCONVERTER I try to conbert .sbf into sound list table in assembly (using the Tursi's tool bin2inc) and I got the sound list that also works fine with TISNONLY (works fine only in XB and not in XB256)... so I believed that the same sound table list with little adjustment following the procedure in XB256 manual pag,12-21 suggstions... just an illusion

Now I could try with the soud list ripper you suggest in order to get a sound list table more compatible...

 

what's your suggestion ? ... the poit it's easy ... add a soundtrack (compiled) to my program ... the soundtrack is in .vgm format 

 

attached .dsk with the soundtrack example that works with Tursi's tool YYY.dsk  

 

Link to comment
Share on other sites

11 minutes ago, whoami999ster said:

what's your suggestion ? ... the poit it's easy ... add a soundtrack (compiled) to my program ... the soundtrack is in .vgm format 

I have no suggestions for turning a vgm into a sound list. Most likely it would take up a lot of memory, perhaps even more than is available to XB? That's why Tursi's tool compress the data really well.

So you need to put TISNONLY on your own disk together with your own music, then load both using CALL LOAD and then use CALL LINK("SONGGO") to start the music. As far as I understand, this should also work if your game is compiled.

Do you have the original vgm, I would like to know what we are talking about?

Link to comment
Share on other sites

just tried with sound list ripper ... as far I've understood it accept only .bin sound list and I've the txt format ... here the one million dollar question ... is it possible to convert correctly my bgmb.txt into .bin?

bgmb.txt

 

It's like my file is already the output of Assembly and I would need to be simply convert in XB .... the conversion Table is used for?  

image.thumb.png.03d10ce1b0cef9c4abcf4ef766e3872d.png 

Edited by whoami999ster
adjustment
Link to comment
Share on other sites

6 minutes ago, Asmusr said:

I have no suggestions for turning a vgm into a sound list. Most likely it would take up a lot of memory, perhaps even more than is available to XB? That's why Tursi's tool compress the data really well.

So you need to put TISNONLY on your own disk together with your own music, then load both using CALL LOAD and then use CALL LINK("SONGGO") to start the music. As far as I understand, this should also work if your game is compiled.

Do you have the original vgm, I would like to know what we are talking about?

 

MainBGM.vgz

Edited by whoami999ster
erra
Link to comment
Share on other sites

4 minutes ago, whoami999ster said:

I tried to run TISNONLY in XB256 it's seems not yo work :(  ... if you simply run the pgm LOAD in XB256 didn't run (from my YYY.DSK)  ... only strange sounds ... I fear that the CALL LINK("SONGGO") (and stop) are in memory overlapping of something ...

 

This is moving out of my knowledge area, but I think you would have to post your current source code for @Tursi or @senior_falcon to investigate.

 

Link to comment
Share on other sites

I will look at this tonight. It should be pretty easy to get it all working together. One problem is that Tursi's player and XB256 want to be in the same place when running in XB. However, that problem goes away when compiled.

"Flight of the Bumblebee" in Game Engine 256 is from "Bumblebee Boogie", an XB music program by Sam Moore. I used one of the compilers (Probably SLCONVERT) in XBGDP to convert it to a sound list. XB256 can play 2 sound lists at the same time. Bumblebee Boogie plays all the time, with additional sounds superimposed when the player jumps or falls. I don't know if this can be done with Tursi's player.

The performance of Game Engine 256 is marginal. I believe that the ability to incorporate assembly subs could make this much more satisfactory. An assembly sub to handle the scrolling should leave plenty of time for the actual gameplay.

Link to comment
Share on other sites

Yeah, the confusion that you are seeing, @whoami999ster, is that my compressed audio is NOT a sound list. It's just data. A "sound list" is actually another specific data format, that is played by the TI's ROM code. The byte data looks the same, true, but the meaning of all those bytes is completely different.

 

Your music has a lot of volume changes (to make the sound of the instrument), and in a sound list each of those is another couple of bytes of data. I don't think your music would fit in memory as a sound list. IIRC, it was pretty close to full even with the compressed music.

 

@senior_falcon - the player I've suggested that he use doesn't have sound effect capability, but I have one that does. The "sfx" version will let the music keep playing with only the channels that the sound effects use being overridden. However, since it takes twice the RAM and up to twice the CPU time, I wanted to keep it simple. Sorry it turned out not to be ;)

 

Link to comment
Share on other sites

1 hour ago, Asmusr said:

I have no suggestions for turning a vgm into a sound list. Most likely it would take up a lot of memory, perhaps even more than is available to XB?

When I convert VGMs to ISR, complex music turns out very large.  Sonic the Hedgehog, for instance.  The attached is a conversion from Sega Master System.  It can be loaded with SoundListRipper.jar.  You can see some of the sound effects, fanfare, and songs.  The intro fanfare alone is >822 bytes long, or just over 2k.

Sonic_the_Hedgehog(SMS).bin

Link to comment
Share on other sites

7 minutes ago, OLD CS1 said:

When I convert VGMs to ISR, complex music turns out very large.  Sonic the Hedgehog, for instance.  The attached is a conversion from Sega Master System.  It can be loaded with SoundListRipper.jar.  You can see some of the sound effects, fanfare, and songs.  The intro fanfare alone is >822 bytes long, or just over 2k.

Sonic_the_Hedgehog(SMS).bin 107.8 kB · 1 download

... and how did you convert VGMs to ISR ? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...