Jump to content
IGNORED

Playground


senior_falcon

Recommended Posts

Here is the latest version of my assembly loader for TI BASIC. It is called "Playground" because that's where you go after you graduate from the sandbox. There is a PDF of the docs. All the source code is there. MAKEBX-S.TXT and MAKEBX-O is the program that embeds the assembly program and generates a BASIC program. It is the heart of Playground. DEMO-S.TXT and DEMO-O is an assembly language demo program, slightly modified from the one posted earlier on this site. DEMO is the BASIC program containing the assembly language demo. Be sure to run it under TI BASIC. Press any key to pause the scrolling and read the text.

 

Enjoy!

 

(Edited February 28, 2013 with revised version of playground - see post #10 for more)

Playground.zip

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

Here is the latest version of my assembly loader for TI BASIC. It is called "Playground" because that's where you go after you graduate from the sandbox. There is a PDF of the docs. All the source code is there. MAKEBX-S.TXT and MAKEBX-O is the program that embeds the assembly program and generates a BASIC program. It is the heart of Playground. DEMO-S.TXT and DEMO-O is an assembly language demo program, slightly modified from the one posted earlier on this site. DEMO is the BASIC program containing the assembly language demo. Be sure to run it under TI BASIC. Press any key to pause the scrolling and read the text.

 

Enjoy!

 

Hey thanks! I downloaded it and will hang on to it and give it a whirl as soon as I get my P-Box!

Link to comment
Share on other sites

  • 2 weeks later...

Here's a zipped folder called LIFE which contains 3 files. These are programs for Conway's game of Life. LIFEXB is an Extended BASIC program that contains an embedded assembly language version of the game. LIFE uses the Playground loader and runs out of TI BASIC. You will see it is about 3 times faster than the older version. LIFE-S.TXT is the source code for the BASIC version. If you don't know about Conway's life, look it up on wikipedia before you try to use these programs.

(Modified source code to remove some lines that are no longer used and to comment a bit more)

(A slight additional modification was made)

 

LIFE.zip

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

  • 4 weeks later...

Here's an animated GIF showing two versions of the LIFE cellular automaton by Conway. The first runs out of TI BASIC using the playground loader. In the center there is an oscillating pattern that takes 15 cycles to repeat. On either side are what are called lightweight spaceships. One is the compact version; the other is the stretch version. Remember that this program only has 256 bytes of RAM to use and must load pages out of the VDP ram. Then comes a version that uses XB and the 32K memory expansion. Without the need for paging it should run lots faster, right? But you will see that it actually is much slower. This is partly because the playground version runs on the 16 bit data bus, but mostly because the programming is better and maximizes the speed. Just an idea of what can be done using an unexpanded TI!

 

gallery_34177_1071_167237.gif

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

HI! I find this break out of the TI Basic Sandbox very interesting.

Could this playground help somehow to dump those cartridges that haven't been dumped yet? I could think of a debugger-like util that runs from TI basic that loads the program that is on the cartridge.

Link to comment
Share on other sites

I think that a program could be written to copy the ROM and GROM in a cartridge and same them to disk. Not by me - I have no idea what format the files should be in. Since this runs out of TI BASIC that should be quite feasable. Another possibility is to run ROM cartridges on a V2.2 console. But you need to have a disk drive for that to work.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Attached is the latest incarnation of the Playground package. There are many improvements. Besides saving in TI BASIC format, it is now possible to save in E/A5 format and to make a Supercart loader. A supercart program can be burned to a physical cartridge.

It is no longer necessary to tell the loader which version of the TI-99 you have. There is a library of subroutines for GPLLNK, HCHAR, VCHAR, CLEAR, generate a random number, print a number, print text, scroll, etc. Source code for three programs is part of the package.

(edited February 24, 2014 - LIFE and DEMO now use latest loader which doesn't ask what console you have)(February 28, 2014 - modified to clear screen at startup.)

Playground.zip

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

  • 8 months later...

I just learned of this because the topic was bumped by Wildstar... very interesting! I think several games that don't require too much memory could be produced this way... games in the vein of Centipede, Berzerk, Frogger, Galaxian, Jetpac, Joust, Pac-Man, Skiing, Phoenix, Pinball, Scramble, Space Invaders, Soccer, and nearly any game that only required one CPU-ROM (8K) or one GROM on cartridge (as well as 8K games on other systems). Yes, I know many of those already have been released for the TI-99... just wanted to show which type of games would be possible.

Link to comment
Share on other sites

  • 4 weeks later...

I've now managed to create a payload of my own. I think this hasn't been done before... speech on the unexpanded TI-99, and a pretty long one at that (about 29 seconds of speech). At the end it crashes though...

 

On a side note, there's something more special about that speech sample... it hasn't been processed with QBOX, but with a VB program I wrote myself. It does some things QBOX doesn't do like supporting many more WAV formats (downsampling included) and properly supporting the TI synth's coding table. However, it does still have its rough edges... the detection of voiced/unvoiced frames sometimes errs, and there's currently no way to manually correct anything about the speech generated before it gets generated. But I think it sounds quite nice already...

 

I've attached a DSK file. You'll need to run the program SPEECHBAS from TI BASIC, only the speech synthesizer as a peripherial is needed. I've also added the source code... it's actually quite short since it fits into one page easily (without the data though which gets fed from VDP RAM into the synth directly).Oh, the speech itself was inspired by Mark Wills' speech demo which heavily influenced and inspired this. But this version is spoken by Richard Burton, taken from Jeff Wayne's version of "War of the worlds". ;-)

 

EXPERIMENT.zip

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

... I think this hasn't been done before... speech on the unexpanded TI-99, and a pretty long one at that (about 29 seconds of speech). ...

 

 

I did some speech demos with spectra2 that run on the unexpanded TI-99. It runs from the cartridge space and only uses scratchpad memory.

Not that this changes anything, it's really impressive what you've done and it shows what's possible on the TI.

 

And I'm especially looking forward seeing how your VB program further develops, would be way cool to have a replacement program for Qbox offering clearer speech.

If only all of this would have been available back in the early 80's. The TI would have kicked **** big-time ;-)

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

I've now managed to create a payload of my own. I think this hasn't been done before... speech on the unexpanded TI-99, and a pretty long one at that (about 29 seconds of speech). At the end it crashes though...

...

 

 

I am surely missing something regarding the following snippet of your code in UNBELIEV2 and EVEOFWAR:

130 READ O$
135 M=VAL(O$)
140 A$=A$&CHR$(M) 

Why do you not READ the DATA lines directly into M?:

130 READ M
140 A$=A$&CHR$(M)

...lee

Link to comment
Share on other sites

Wow! I'd love to know how your VB program works. I've never been able to fathom the algorithm for turning a sound sample into LPC. It must be quite complex?

 

Well, yes it is, although I've also employed some kind of brute force. First the input is de-emphasized (or emphasized? Don't know...) so that the high sounds get more prominent over the low ones. Before that (!) I do pitch estimation and voiced/unvoiced decision. The pitch is decided by running through the samples and comparing two samples with a fixed distance to each other corresponding to the pitch period. The I compute the statistical r between the first and second items of the pairs. The pitch that yields the greatest R should be the correct one for this frame (keep in mind that LPC on the TI-99 is divided in 40 frames per second), and encoded using the nearest possible code to that pitch. The energy calculation is fairly easy (though maybe incorrect). The voiced/unvoiced decision is made by comparing the energy of the signal before pre-emphasis with the signal after and taking into account some minimum energy. The LPC coefficients are found by brute force... here I simulate an LPC frame with the already known coefficients and one more that cycles through all the possible values. In the simulation, the normal exitation doesn't take place, instead the actual samples are at the start of the chain going down to the "throat" and compared to what comes up the "throat". The error of that comparison is summed up for the frame, and the coefficient value giving the minimum error gets taken. This is cycled through all coefficients. After that, the simulation starts again for that frame, now trying to find out if with the other coefficients known, one of them would actually better have a different value than in the previous "round": This is repeated until all coefficients keep their value for a simulation round.

 

After determining all the values for all frames, the data gets serialized into a string of "0" and "1" bits containing all parameters since the frames have odd lengths of up to 50 bits, depending on if it's voiced or if the energy is 0 (in this case, the frame only consists of the 4-bit energy value), and the parameters range up to 6 bits in length. That bitstream is then divided into bytes for an XBasic output (complete program) and an assembler output (data only). There's also an output of a simulated speech signal, but it doesn't sound as good as on M.E.S.S. or a real TI-99.

 

I hope this is the answer you were looking for...

  • Like 1
Link to comment
Share on other sites

 

I am surely missing something regarding the following snippet of your code in UNBELIEV2 and EVEOFWAR:

130 READ O$
135 M=VAL(O$)
140 A$=A$&CHR$(M) 

Why do you not READ the DATA lines directly into M?:

130 READ M
140 A$=A$&CHR$(M)

...lee

Hmmm... you are right, your version seems to be smaller and quicker. It seems to me that line 135 was inserted later after the rest of the program was written, but I don't quite know why I programmed it the way I did.

Link to comment
Share on other sites

 

The LPC coefficients are found by brute force... here I simulate an LPC frame with the already known coefficients and one more that cycles through all the possible values. In the simulation, the normal exitation doesn't take place, instead the actual samples are at the start of the chain going down to the "throat" and compared to what comes up the "throat". The error of that comparison is summed up for the frame, and the coefficient value giving the minimum error gets taken. This is cycled through all coefficients. After that, the simulation starts again for that frame, now trying to find out if with the other coefficients known, one of them would actually better have a different value than in the previous "round": This is repeated until all coefficients keep their value for a simulation round.

 

 

So for each frame, are you in effect cycling through all the coefficient values, seeing what sound they produce, and comparing that with the input?

 

Could you post a recording of the audio to see what sort of quality you're getting? ;-)

Edited by Stuart
Link to comment
Share on other sites

Yes, in effect, I'm cycling through all the coefficient values, but I'm not comparing the actual sound, rather the error is a measure of how good the prediction is with the given set of coefficients. Also I'm not cycling through all possible combinations of coefficient values... that would take far too long.

 

Which recording would you need? I have the original samples, then the audio output of my program, the output of M.E.S.S. running the speech, and then I could probably record it from the real TI-99 (which I'd have to put up first and find a way to transfer the program... probably via the tape cord from the PC)

 

 

So for each frame, are you in effect cycling through all the coefficient values, seeing what sound they produce, and comparing that with the input?

 

Could you post a recording of the audio to see what sort of quality you're getting? ;-)

  • Like 1
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...