Jump to content

Photo

Camel99 Forth Information goes here

Camel99 Forth Concatentive Programming ANS Forth

86 replies to this topic

#76 TheBF OFFLINE  

TheBF

    Dragonstomper

  • Topic Starter
  • 568 posts
  • Location:The Great White North

Posted Fri May 11, 2018 5:52 PM

I have developed a healthy respect for the authors of the Sprite control in X-BASIC.

I found this old XB Demo program and wondered how I could do it in "GOLLY GEE WHIZ" Forth.

Without Automotion I had to create a timer variable for each motion element and down count to zero, like the ROM code does.

 

Was able to gain some efficiency by creating words that only play with X or Y in a sprite independently.

 

Anyway for those studying Forth this might provide some ideas.

 

Spoiler

 

 

Attached Files



#77 Tursi OFFLINE  

Tursi

    Quadrunner

  • 5,055 posts
  • HarmlessLion
  • Location:BUR

Posted Tue May 15, 2018 1:20 AM

Hah, that looks familiar. ;) I wrote that for the Summerland TI Users Group back when I was still in high school, based on a picture in 99er Magazine (was part of an explanation of sprites). ;)

(edit: the original XB version, that is ;) )

Edited by Tursi, Tue May 15, 2018 1:20 AM.


#78 TheBF OFFLINE  

TheBF

    Dragonstomper

  • Topic Starter
  • 568 posts
  • Location:The Great White North

Posted Wed May 16, 2018 8:37 AM

Hah, that looks familiar. ;) I wrote that for the Summerland TI Users Group back when I was still in high school, based on a picture in 99er Magazine (was part of an explanation of sprites). ;)

(edit: the original XB version, that is ;) )

 

You know you are history when... :-)

 

That's really cool.  Thanks for letting everybody know.

 

B



#79 D-Type OFFLINE  

D-Type

    Space Invader

  • 14 posts
  • Location:Zürich

Posted Thu May 17, 2018 3:53 PM

So now there's 3 Forth systems for the TI?

I assume this one is based on Brad's Camel Forth?

But, by the look of it, you're not cross compiling from a PC?

I'm also using Brad's Camel Forth, but the 6809 variant and using his Chromium cross compiler.

Target is the Vectrex, probably a lot less work than you need to put it as it has the correct processor!

#80 TheBF OFFLINE  

TheBF

    Dragonstomper

  • Topic Starter
  • 568 posts
  • Location:The Great White North

Posted Thu May 17, 2018 5:05 PM

So now there's 3 Forth systems for the TI?

I assume this one is based on Brad's Camel Forth?

But, by the look of it, you're not cross compiling from a PC?

I'm also using Brad's Camel Forth, but the 6809 variant and using his Chromium cross compiler.

Target is the Vectrex, probably a lot less work than you need to put it as it has the correct processor!

 

 

Yes I am the last of the noble group.  I am cross-compiling actually.  On a "real" PC,  the DOSBOX. :-)

 

The cross-compiler is here.  https://github.com/b...master/Compiler

It actually began with the TI-Forth assembler that I modified to assemble into a different memory segment.

 

It runs on an old DOS Forth from the '90s called HsForth which I upgraded to something a little closer to ANS Forth.

 

I stripped the comments from Brad's MSP430 Camel Forth Assembly Language source , which are Forth and wrote the compiler to compile the comments. :-)  It still had to write all the primitives in 9900 assembler however.

 

Edit: The cross-compiler builds an 8K kernel that can extend itself with source code.

The latest version now can compile TI DV80 source files and I have the beginnings of ANS file word set support.

 

I had to do it the hard way. It's been on my bucket list for 35 years to make a cross-compiler so time was running out.

 

 

Brian


Edited by TheBF, Thu May 17, 2018 5:16 PM.


#81 TheBF OFFLINE  

TheBF

    Dragonstomper

  • Topic Starter
  • 568 posts
  • Location:The Great White North

Posted Thu May 17, 2018 9:14 PM

Improved Background Sound List Player

 

Spent some time working on what I think can be my goto sound list player. 

I will test it a little harder and then put it up on GitHub.

But I notice that even though it does not use interrupts it plays very solid when I exercise the screen heavily.

 

The features are:

  1. It can Queue up to 16 sound lists
  2. Sound lists are stored in VDP RAM
  3. Code includes VDP byte directive so lists are as easy to code as Assembler
  4. Player task goes to sleep when sound Queue is empty
  5. Uses the TMS9901 timer for sound duration
  6. Task memory is allocated in Low RAM
  7. Size: Multi-tasker, VDP memory manager, VDP byte compiler, BG player adds 1218 bytes to the Forth dictionary
  8. >SNDQ command enqueues a sound list
  9. PLAYQ command plays whatever is the sound queue
  10. KILLQ command emptys the sound queue. (playing sounds will continue until finished)

Sound lists look like this:

VCREATE NOKIA
       VBYTE 01,9F,20
       VBYTE 03,90,85,05,09
       VBYTE 02,8F,05,09
       VBYTE 02,87,09,12
       VBYTE 02,87,08,12
       VBYTE 02,85,06,09
       VBYTE 02,81,07,09
       VBYTE 02,8E,0B,12
       VBYTE 02,8A,0A,12
       VBYTE 02,81,07,09
       VBYTE 02,8F,07,09
       VBYTE 02,8A,0C,12
       VBYTE 02,8A,0A,12
       VBYTE 02,8F,07,24
       VBYTE 01,9F,00
/VEND
Spoiler

Edited by TheBF, Thu May 17, 2018 9:25 PM.


#82 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

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

Posted Fri May 18, 2018 6:08 AM

Brian...

 

I would like to be more involved, but my focus for a few weeks is getting my left knee back to normal function after successful surgery.  I am not looking for sympathy—just explaining why I have not been more responsive.

 

You would not, perchance, be coming to the Chicago Faire in November, would you?

 

...lee



#83 TheBF OFFLINE  

TheBF

    Dragonstomper

  • Topic Starter
  • 568 posts
  • Location:The Great White North

Posted Fri May 18, 2018 6:31 AM

Brian...

 

I would like to be more involved, but my focus for a few weeks is getting my left knee back to normal function after successful surgery.  I am not looking for sympathy—just explaining why I have not been more responsive.

 

You would not, perchance, be coming to the Chicago Faire in November, would you?

 

...lee

 

 

Hi Lee,

 

No worries.   First things first is always a good strategy.

 

I have been feeling off myself with a flu like thing.

 

 I have not given Chicago any thought.  It would be a significant expense but would be fun I'm sure.  I will give it some thought.

 

Brian



#84 D-Type OFFLINE  

D-Type

    Space Invader

  • 14 posts
  • Location:Zürich

Posted Yesterday, 7:30 AM

 

 

Yes I am the last of the noble group.  I am cross-compiling actually.  On a "real" PC,  the DOSBOX. :-)

 

The cross-compiler is here.  https://github.com/b...master/Compiler

It actually began with the TI-Forth assembler that I modified to assemble into a different memory segment.

 

<<CHOP>>

 

Brian

 

Ah yes...actually I read your release notes etc. perhaps 4 or 5 weeks back, then I went on holiday for a week and forgot everything about it :-) My memory now of what I read is that you compiled (assembled?) the primitives and put that onto the '99 and then loaded the rest of Forth and any extensions using the '99 to compile. When you've got access to disk/flash, I guess that gives you a nice usable system to do that.

 

My CamelForth is running on 6809 and Brad R's "Chromium" cross-compiler is quite complete, so I'm compiling everything on the PC. As the target is the Vectrex with it's vector monitor and joystick, there is no keyboard or character-based display, and <1k of usable RAM, so compiling on the Vectrex is a non-starter without hardware mods. I do have a serial port/terminal added to mine for interactive testing, but a ~700 byte dictionary has some limitations!

 

My aim is to allow creation new cartridge programs/games by other developers, so hardware changes can only be minimal, thus PC is the IDE. There are some great emulators for the Vectrex with build-in debuggers and one has a full IDE for assembly language development, but it still works quite nicely with the output from the Chromium compiler. With some help from the Forth community, I have Camel Forth 6809 Chromium compiler now running on Gforth instead of F83 and with plain text files instead of block files, I saw this as mandatory to get any new users. One day I'll learn how to use Github...

 

I'm new to the TI processors,a quick look shows the 430 to be similar to the '99 processor, but with more capability, so it makes perfect sense to port 430 Camel Forth to the '99.

 

It looks like you've put a lot of effort into your Forth, just like the other two Forths for the TI, they all look excellent. I've really enjoyed reading about them and the '99 in general, especially after learning so much about the machine on the Floppy Days series of '99 podcasts. I owe it to myself to download Classic99 and give'em a go!


Edited by D-Type, Yesterday, 7:34 AM.


#85 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,194 posts
  • Location:Germany

Posted Yesterday, 7:51 AM

I'm new to the TI processors,a quick look shows the 430 to be similar to the '99 processor, but with more capability

 

This is what I recently learned about as well, and indeed, there is quite some similarity. People who know TMS9900 should have a look here: https://en.wikipedia...P430#MSP430_CPU



#86 D-Type OFFLINE  

D-Type

    Space Invader

  • 14 posts
  • Location:Zürich

Posted Yesterday, 9:06 AM

 

Ah yes...actually I read your release notes etc. perhaps 4 or 5 weeks back, then I went on holiday for a week and forgot everything about it :-) My memory now of what I read is that you compiled (assembled?) the primitives and put that onto the '99 and then loaded the rest of Forth and any extensions using the '99 to compile. When you've got access to disk/flash, I guess that gives you a nice usable system to do that.

 

<<CHOP>>

 

Actually something I forgot to mention, I once owned a TI-99/4A. I can't remember where I got it from, but my eBay auction text from Jan 2002 when I listed it said "This is an auction for a Texas Instruments TI99/4A computer main unit only. I have no power supply or other leads so I do not know if it works."

 

No wonder I can't really remember much about it, except it seemed really nicely made. I'm a bit sad now that I didn't stick it in a box in the garage for later!


Edited by D-Type, Yesterday, 9:06 AM.


#87 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,194 posts
  • Location:Germany

Posted Yesterday, 9:46 AM

I recently pondered over throwing away my old analog SLR camera. Better not. It would not have been the first time that I regret throwing away something later.







Also tagged with one or more of these keywords: Camel99, Forth, Concatentive Programming, ANS Forth

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users