Jump to content
IGNORED

XB Game Developers Package


senior_falcon

Recommended Posts

  • 2 weeks later...

I would like to include a library of sounds that is automatically loaded with XB256 such as CHIME, CRASH, BEEP, HONK, etc. This can be up to 680 bytes long and will not reduce the available space for programming. If you have favorite sound effects that you think would be appropriate, send them to me either as an assembly language source file for the sound list, or as an XB program using CALL SOUNDs which I can then convert. Thanks!

Link to comment
Share on other sites

Attached is an updated version of the XB Game Developers Package. This is also in post #1 of this thread. Automatic sprite motion can be turned off and on with FREEZE and THAW. One call to IRND can now return up to 8 random numbers. There was some general polishing and a minor bug was fixed that caused problems with an input prompt of 28 bytes long. Also some general polishing was done.

 

The animated GIF below shows a couple parts of 256DEMO2. This is running in XB with support from XB256. First, the hilighted menu selection is easy to do in XB256; almost impossible in regular XB because there aren't enough characters to redefine. The pixel scrolling is just plain cool. The choppiness is caused by the animated GIF. In the final selection, the entire screen is drawn, and all 256 characters and their colors are redefined, all in under 2 seconds and from Extended BASIC. This is done using compressed DATA statements and writing to VDP memory with the CWRITE subprogram.

This is a great way to make your XB program both smaller and faster.

 

gallery_34177_1071_2266456.gif

XB Game Developers Package Nov 30 2014.zip

  • Like 4
Link to comment
Share on other sites

One of the challenges in working with the compiler is adjusting delays until they are what you want. You write the XB program, save in merge format, compile it, assemble it, load it, and test it only to find out that the delay is wrong. So you modify the program and repeat the process over and over until it is just right, or until you are sick of the whole thing.

 

There is a much better way using XB256. You can set the program up to go to a debugging page in the other screen where you can adjust values, then return to the main program to test them out. You would probably be working in screen2, so the debugging should happen in screen1 to avoid disrupting the game screen. The simple XB program below gives a quick example of how to do this. It defines A as a ball and used the ESDX keys to move it around on the screen. Press <Fctn 1> goes to the editing page in line 210 where you can modify DLY. Note that when you return to Screen2 everything is just the same as when you left.

 

100 CALL LINK("CHAR2",65,"3C7EFFFFFFFF7E3C"):: R=12 :: C=16 :: DLY=1
110 CALL LINK("SCRN2")
120 CALL HCHAR(R,C,65)
130 FOR I=1 TO DLY
140 CALL KEY(0,K,S):: IF S=1 THEN 160
150 NEXT I
160 IF K=3 THEN 210
170 RN=R-(K=69)*(R>1)+(K=88)*(R<24):: CN=C-(K=83)*(C>1)+(K=68)*(C<32)
190 IF RN=R AND CN=C THEN 130
200 CALL HCHAR(R,C,32):: R=RN :: C=CN :: GOTO 120
210 CALL LINK("SCRN1"):: CALL CLEAR :: INPUT "DELAY VALUE? ":DLY :: GOTO 110

The animated GIF below shows the compiled version of this program (with a few comments thrown in):

gallery_34177_1071_106897.gif

 

 

 

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

How about these two goodies:

BYTE >07,>9F,>BF,>DF,>FF,>80,>05,>99,>0A          * F41
BYTE >02,>80,>06,>0A
BYTE >02,>80,>05,>06                              * F41
BYTE >02,>80,>06,>06
BYTE >02,>80,>05,>05                              * F41
BYTE >02,>80,>06,>05
BYTE >02,>80,>05,>04                              * F41
BYTE >02,>80,>06,>04
BYTE >02,>80,>05,>03                              * F41
BYTE >02,>80,>06,>03
BYTE >02,>80,>05,>02                              * F41
BYTE >02,>80,>06,>02
BYTE >02,>80,>05,>01                              * F41
BYTE >02,>80,>06,>01
BYTE >01,>9F,>00
BYTE >04,>9F,>BF,>DF,>FF,>01
BYTE >06,>81,>2C,>96,>A0,>2C,>B6,>02
BYTE >04,>81,>2E,>A0,>2E,>02
BYTE >04,>81,>30,>A0,>30,>02
BYTE >04,>81,>32,>A0,>32,>03
BYTE >04,>81,>34,>A0,>34,>03
BYTE >04,>81,>35,>A0,>35,>03
BYTE >04,>81,>36,>A0,>36,>04
BYTE >04,>81,>37,>A0,>37,>04
BYTE >04,>81,>38,>A0,>38,>05
BYTE >04,>81,>39,>A0,>39,>05
BYTE >04,>81,>3A,>A0,>3A,>06
BYTE >04,>81,>3B,>A0,>3B,>07
BYTE >04,>81,>3C,>A0,>3C,>08                      * A#02
BYTE >04,>81,>3D,>A0,>3D,>09
BYTE >04,>81,>3E,>A0,>3E,>0A
BYTE >04,>81,>3F,>A0,>3F,>14
BYTE >07,>9F,>BF,>DF,>CC,>01,>F2,>E3,>05          * B53, P3
BYTE >01,>F3,>04
BYTE >01,>F4,>04
BYTE >01,>F5,>03
BYTE >01,>F6,>03
BYTE >01,>F7,>02
BYTE >01,>F8,>02
BYTE >01,>F9,>01
BYTE >01,>FA,>01
BYTE >04,>9F,>BF,>DF,>FF,>00
Link to comment
Share on other sites

  • 4 weeks later...

This should be the final update of the XB256/COMPILER256 combination. There is a built in utility that forces a program to be saved in IV254 format. If the XB program segments are in IV254 fomat then large programs running under XB256 can be chained together without overwriting the screen, character definitions and colors used when in screen2. A subroutine has been added that will load a font with true lower case characters with descenders. There is a subprogram CALL LINK("SCREEN",color) that works exactly like CALL SCREEN except the screen color is saved. That way when you change screens the screen background colors are saved/restored. And of course, the usual tweaks to the documents.

XB Game Developers Package 12-23-14.zip

  • Like 6
Link to comment
Share on other sites

  • 5 months later...

Disk access has been added to the XB compiler. Post #1 has the updated version of XB Game Developer's Package. DISPLAY, VARIABLE only, but any length from 1 to 254 is OK. Up to 3 files open at a time. You must use file #1, #2, or #3 only. Error checking implemented for disk access - read the docs for details. Other peripherals may work provided they can use DV files.

 

Enjoy!

  • Like 6
Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...

Yea, well the more I promoted GPL the more flak I got for it.

Some fans but as most are Assembly and C people on this site.

I feel I was flogging a dead horse.

Which is why I do not show up much anymore.

(Not that I am picking a fight, just pointing out the truth of my feelings on this matter.)

 

 

http://atariage.com/forums/topic/153704-ti-994a-development-resources/

 

Look at GPL Section.

 

I will try my best to dedicate time to GPL. I am trying to get to grips with the new paradigm without asking too many questions in this forum. I know that if I get stuck the atariage members are always willing to assist, but on the other hand I do not want to abuse of your time.

Link to comment
Share on other sites

This should be the final update of the XB256/COMPILER256 combination. There is a built in utility that forces a program to be saved in IV254 format. If the XB program segments are in IV254 fomat then large programs running under XB256 can be chained together without overwriting the screen, character definitions and colors used when in screen2. A subroutine has been added that will load a font with true lower case characters with descenders. There is a subprogram CALL LINK("SCREEN",color) that works exactly like CALL SCREEN except the screen color is saved. That way when you change screens the screen background colors are saved/restored. And of course, the usual tweaks to the documents.

 

Well done for your work, I probably will not use it much for now so that I will force myself into GPL but I appreciate your great work here.

Link to comment
Share on other sites

  • 6 months later...

another question

I use x=int(rnd*3)+1 this gives me a value from 1 to 3

how do I do this with CALL LINK("IRND",3,X)

 

ALSO..... When pasting into XB, all of the quotes are removed from the CALL LINK("xxx") lines.

 

Thanks again!

Edited by 1980gamer
Link to comment
Share on other sites

Taking your questions in order:

1-There is indeed a bug with CALL LINK("DELAY") Assembly subroutines in XB use a lookup table to find the address of the subroutine. Somehow DELAY was removed from that table. All the code is there, and I checked that it is also in the compiler, so if you use DELAY and want to compile the program it will be recognized. The fix is to add DELAY to the lookup table. Here's how:

Type OLD DSK1.XB256 which will load XB256.
Be sure the loader is dated December 23,2014. Edit the loader so that it becomes:

5 ! XB256 by Harry Wilhelm December 23, 2014 Copyright 2013,2014 Free distribution only
9 CALL INIT :: CALL LOAD(8192,255,154)
10 CALL LINK("X"):: CALL LOAD(8197,224,"",16096,68,69,76,65,89,32,50,90):: CALL LINK("XB256")!:: RUN "DSKn.PROGNAME"

Type SAVE DSK1.XB256 to save the modified program.

With DELAY added to the table, it should work as described. Someday I will get around to doing a proper fix for this, but I am waiting for folks to find all the other bugs!!

 

2 - CALL LINK("IRND",3,X) returns an integer value of 0,1 or 2 in X. This is the same as X=INT(RND*3). If X must be 1,2 or 3 then you have to add one to it. Remember that you can generate up to 8 random numbers with one call to IRND.

 

3 - "When pasting into XB, all of the quotes are removed from the CALL LINK("xxx") lines" - I don't know why this would happen. Using Classic99 (QI 381) running on Windows XP and using Notepad as the text editor, paste XB works as expected. It could be a problem with a newer version of windows, a newer version of Classic99, or with the text editor you are using.

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

Thank you Senior_Falcon.

I will try the fix.

 

So X=INT(RND*3)+1 :: Y=INT(RND*36)+1 would be CALL LINK("IRND",3,X,36,Y) :: X=X+1 :: Y=Y+1

 

I am using QI 365, I'll look for a newer version. Hmmmm, wonder if I had a reason to have not updated?

 

As always...Thank you!

Link to comment
Share on other sites

 

So X=INT(RND*3)+1 :: Y=INT(RND*36)+1 would be CALL LINK("IRND",3,X,36,Y) :: X=X+1 :: Y=Y+1

 

Yep, that will do it. It would be slightly faster if you can adjust your program to avoid having to add one to X and Y, but that's not always possible.

 

I am using QI 365, I'll look for a newer version. Hmmmm, wonder if I had a reason to have not updated?

 

And I thought my version QI 381was out of date!

 

Link to comment
Share on other sites

  • 9 months later...

Attached is a folder containing BXLOADER. This is a TI BASIC program that lets you load a compiled XB program about 20x faster. Instructions are in a PDF in the folder. Editor/Assembler cartridge is required.

 

(Edit April 28, 2017) BXLOADER is updated to support both compressed and uncompressed object code files. See post 1 or post 78 for the updated version.

Edited by senior_falcon
  • Like 5
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...
×
×
  • Create New...