Jump to content

Photo

Playground


134 replies to this topic

#1 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 946 posts
  • Location:Lansing, NY, USA

Posted Thu Nov 21, 2013 10:01 PM

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)

Attached Files


Edited by senior_falcon, Fri Feb 28, 2014 7:13 PM.


#2 --- Ω --- OFFLINE  

--- Ω ---

    TI-Runner

  • 10,605 posts

Posted Thu Nov 21, 2013 10:07 PM

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!



#3 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,465 posts
  • Location:Denmark

Posted Thu Nov 21, 2013 11:22 PM


Press any key to pause the scrolling and read the text.

 

Impressive! And with a secret challenge...  :)



#4 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • Topic Starter
  • 946 posts
  • Location:Lansing, NY, USA

Posted Fri Dec 6, 2013 10:21 PM

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)

 

Attached Files

  • Attached File  LIFE.zip   6.34KB   45 downloads

Edited by senior_falcon, Sat Dec 7, 2013 10:18 AM.


#5 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,807 posts
  • Location:Eagan, MN, USA

Posted Sat Dec 7, 2013 3:46 AM

Nice work Harry! I assume that the Basic program can be loaded from tape, correct?



#6 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • Topic Starter
  • 946 posts
  • Location:Lansing, NY, USA

Posted Sat Dec 7, 2013 8:01 AM

It should load fine from tape.  This is about as minimal a system as is possible - the only way to have a more minimal system is to get rid of the tape player, but then you'd never be able to key in a program like this.



#7 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • Topic Starter
  • 946 posts
  • Location:Lansing, NY, USA

Posted Mon Dec 30, 2013 3:18 PM

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, Tue Dec 31, 2013 2:57 PM.


#8 kl99 OFFLINE  

kl99

    Dragonstomper

  • 676 posts
  • Location:Vienna, Austria

Posted Mon Dec 30, 2013 3:47 PM

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.



#9 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • Topic Starter
  • 946 posts
  • Location:Lansing, NY, USA

Posted Mon Dec 30, 2013 4:19 PM

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.  



#10 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • Topic Starter
  • 946 posts
  • Location:Lansing, NY, USA

Posted Sun Feb 23, 2014 8:17 PM

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.)

Attached Files


Edited by senior_falcon, Fri Feb 28, 2014 7:15 PM.


#11 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 2,807 posts
  • Location:Eagan, MN, USA

Posted Sun Feb 23, 2014 10:15 PM

Thanks Harry. I have updated the gameshelf site with this new file.



#12 Wildstar OFFLINE  

Wildstar

    Star Raider

  • 77 posts

Posted Wed Oct 29, 2014 12:06 AM

Playground seems to be the ticket to a clever strategy for programming on my TI-99/4A without the memory upgrade carts but with just the F18A VDP.

 

This sounds like it would be interesting.



#13 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,219 posts

Posted Thu Oct 30, 2014 8:37 AM

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.



#14 Wildstar OFFLINE  

Wildstar

    Star Raider

  • 77 posts

Posted Thu Oct 30, 2014 11:14 AM

Yep, I just bought a Mini Memory module to aid in developing Assembly/ML programs for my TI-99/4A when I want to do something more sophisticated than what could be done through this method.

 

There is a few tools that is convenient to use with at least a Mini Memory module.



#15 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,219 posts

Posted Fri Nov 21, 2014 6:01 PM

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". ;-)

 

Attached File  EXPERIMENT.zip   21.23KB   37 downloads


Edited by Kurt_Woloch, Fri Nov 21, 2014 6:07 PM.


#16 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,824 posts
  • HarmlessLion
  • Location:BUR

Posted Sat Nov 22, 2014 12:02 AM

Definitely looking forward to trying this, Kurt!

#17 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • Topic Starter
  • 946 posts
  • Location:Lansing, NY, USA

Posted Sat Nov 22, 2014 12:07 AM

Way cool, and it is nice to see someone using Playground.  War of the Worlds is one of my favorites.  I listen to it nice and loud about once a year, usually when driving.  



#18 Willsy OFFLINE  

Willsy

    River Patroller

  • 3,022 posts
  • Location:Uzbekistan (no, really!)

Posted Sat Nov 22, 2014 12:20 AM

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?

#19 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,824 posts
  • HarmlessLion
  • Location:BUR

Posted Sat Nov 22, 2014 1:42 AM

I spent way too long trying to load via CS1, but my TI wasn't having it tonight, so I finally gave in and used disk. ;) Sounds pretty good!

I was going to attempt a brute force converter, but it sounds like yours is already nearly perfect!

#20 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,537 posts
  • Location:Germany

Posted Sat Nov 22, 2014 3:30 AM

... 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, Sat Nov 22, 2014 3:31 AM.


#21 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,386 posts
  • Location:Silver Run, Maryland

Posted Sat Nov 22, 2014 9:10 AM

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



#22 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,219 posts

Posted Sat Nov 22, 2014 1:58 PM

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...



#23 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,219 posts

Posted Sat Nov 22, 2014 2:00 PM

 

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.



#24 Stuart OFFLINE  

Stuart

    Dragonstomper

  • 707 posts
  • Location:Southampton, UK

Posted Sat Nov 22, 2014 3:38 PM

 

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, Sat Nov 22, 2014 3:39 PM.


#25 Kurt_Woloch OFFLINE  

Kurt_Woloch

    Stargunner

  • 1,219 posts

Posted Sat Nov 22, 2014 4:44 PM

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?  ;-)






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users