Jump to content
GDMike

Foxit - in progress

Recommended Posts

Problem with that is, 

1. There could be...let's say, for argument, 8 individual routines. Totalling 62 75K. (There not all 4k chunks, but ).

SAMs can handle that. But the SAMs mapper has to be employed and running, meaning the program has to be assembled prior in order for the mapper to be running.

Point 2, I don't have finished routines that are set aside because I haven't found a way to load them for testing, except for one, my help file.

It loads up at assembly Time and waits for the mapper to kick in, then it gets pushed into SAMS.

That's fine, but it doesn't work for additional files that same way, because there's only so much room for swapping VRAM.

It's really hard to explain in text on a phone as you can't see my arms wailing in the air..lol.

Bwhaha

Edited by GDMike
  • Haha 1

Share this post


Link to post
Share on other sites

My 2 rules of S/W always apply:

1. Everything is possible.

2. Nothing is easy.

:) 

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
17 hours ago, GDMike said:

Thank you, yes. I have played with, hmm.. maybe it was gees.. I've forgotten the word... C save, F save, I can't remember what the heck it was now in FB forth...it's been a couple 3 years now...

 

fbForth does it pretty much the same as TurboForth:

BSAVE ( address blockStart -- blockAfterSave )

You give BSAVE the start address of the machine code to save and the block in the current blocks file (say DSK1.MYBLOCKS) where storage should start.  It returns the next free block in the blocks file after storing the code. In fbForth, (unless you really know what you are doing) you should use the pfa of TASK , as the start of the machine code to store. This insures that everything not in the cartridge part of the dictionary is saved in the blocks file. The following snippet saves the RAM part of the dictionary to the blocks file, DSK1.MYBLOCKS, beginning at block 30:

USEBFL DSK1.MYBLOCKS     \ for TurboForth:   S" DSK1.MYBLOCKS" USE
' TASK 30 BSAVE .        \ not sure what address you should use in TurboForth

If the saved segment of code took up 5 blocks, the above snippet would print

35  ok:0

You can then restore the code at a later time with the following:

30 BLOAD

...lee

Edited by Lee Stewart
CLARIFICATION
  • Like 2

Share this post


Link to post
Share on other sites
35 minutes ago, Lee Stewart said:

pfa of TASK ,

This is how I know of doing the BSave. Absolutely, remember it.

What a difference it makes to the program. You ain't done nothing, until you done a BSave. Haha. 

I found an article online as I recall before finding it in the docs, because I was just doing some general reading and then I ran the exact same words, I may have been in a different blend of forth, but I then remember looking at the FB docs.  and I was amazed.

Edited by GDMike

Share this post


Link to post
Share on other sites
1 hour ago, Lee Stewart said:

It returns the next free block in the blocks file after storing the code.

Than wouldn't 35, be a free block, and the saved segment of code took up 4 blocks?:ponder:

Share this post


Link to post
Share on other sites

I found my old blocks file. Maybe I can add to it..

It's using 3 banks to set SAMs, sound, and the display.

the word A: will set dsk1.blocks active and the word  B: will set dsk2.blocks active.

A: is also the boot disk. 

It's cute, come on..

 

Edited by GDMike
  • Like 2

Share this post


Link to post
Share on other sites
10 hours ago, HOME AUTOMATION said:

Than wouldn't 35, be a free block, and the saved segment of code took up 4 blocks?:ponder:

 

Block 35 is the first block after the BSAVE , free or not, and the BSAVE did, in fact, use 5 blocks: 30, 31, 32, 33, 34.

 

...lee

  • Thanks 1

Share this post


Link to post
Share on other sites

Yeah, TurboForth is the same wrt BLOAD and BSAVE. It simply saves an area of memory to disk in binary format (the B in BSAVE means binary).

This is normally used to save the current dictionary (everything that you have loaded and/or compiled into memory) to a blocks file. The advantage being, when loaded, it is many times faster to load because the compilation phase has been skipped - it was already compiled when you BSAVED it.

 

To try it, load some stuff into memory (from a freshly booted TF system) from the UTILS disk (say, the assembler, on block 9, and DUMP, on block 36):

 

9 LOAD 36 LOAD

 

Then create a new block file on DSK3 like this:

 

80 MKBLK DSK3.BINARIES

 

Then save the current dictionary to the block file (when you used MKBLK to create the block file, it already did USE for you, so you are USEing the new BINARIES disk file). We need to know the first word to save from - well, the first word of the assembler is called R0, so we tick it to get the CFA (code field address) and use >LINK ("to link") to get the dictionary link field address. That is the address we will save FROM. BSAVE always saves from the address you give it, to the address in HERE (the last thing you compiled). It baiscally takes a snapshot of the dictionary and saves from the address you give it, to the end of the dictionary.

 

' R0 >LINK 1 BSAVE

 

This will save the assembler, and the DUMP utility to the new BINARIES blocks file, pre-compiled. The value 5 will be on the stack. This is put there by BSAVE, it means 5 is the next block that you can use (which may or may not be empty - if it's a new file then it is obviously empty).

 

Now, reboot using COLD.

 

Then, USE the new BINARIES file:

 

S" DSK3.BINARIES" USE

 

Now, load the dictionary snapshot you saved:

 

1 BLOAD

 

It takes a fraction of the time, and all the words of the assembler and the DUMP utility are there. Voila.

 

Note: Anything that was in memory before will be gone. BLOAD restores the memory pointers to the state they were when you saved the dictionary. It is possible to save other areas of the dictionary by manipulating HERE (via the word H) but that's for another day!

 

  • Like 3

Share this post


Link to post
Share on other sites

I'll be doing this to my "forth essentials" disk once I get it where I like it..

And I can put away the source in case I need to modify it, unless there is a b-UNSAVE(uncompress or decompile).. then that would be keen. 

Thx because this is always a nice tool in forth.

Share this post


Link to post
Share on other sites
9 hours ago, Lee Stewart said:

 

Block 35 is the first block after the BSAVE , free or not, and the BSAVE did, in fact, use 5 blocks: 30, 31, 32, 33, 34.

 

...lee

Yeah - the TF documentation for BSAVE mentions the value returned by BSAVE as being the next free block number, which is of course nonsense. It's just the next block number, free or not, as you say. I've updated the online docs for BSAVE tonight (first edit in a loooong time!) and also added a ruck of explanation.

 

The critical thing to understand with BSAVE and BLOAD is, when you BLOAD something, your entire Forth system is restored to the state it was in when you BSAVED the thing you are loading! That might not always be what you want. It can be gotten around by saving H, FFAILM, FFAIHM, and possibly a few other things, and doing some dictionary patching and pointer hacking, but that's for another time. I used it on DarkStar IIRC to produce a version that loaded really quickly, rather than have to compile it via LOAD.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
2 minutes ago, GDMike said:

I'll be doing this to my "forth essentials" disk once I get it where I like it..

And I can put away the source in case I need to modify it, unless there is a b-UNSAVE(uncompress or decompile).. then that would be keen. 

Thx because this is always a nice tool in forth.

I definitely stole it from TI FORTH. They have got it from FIG or some other Forth system :-)

  • Like 2

Share this post


Link to post
Share on other sites

I'm just finishing 12hr shifts, and haven't looked at my TF manual i put together in awhile...I'll review. Thx..oh, and update my docs..

Edited by GDMike

Share this post


Link to post
Share on other sites

I might have a fix for my issue regarding Foxit, I'll do some testing and see how it goes.

 

 

Edited by GDMike

Share this post


Link to post
Share on other sites
On 1/10/2022 at 3:36 AM, GDMike said:

I found my old blocks file. Maybe I can add to it..

It's using 3 banks to set SAMs, sound, and the display.

the word A: will set dsk1.blocks active and the word  B: will set dsk2.blocks active.

A: is also the boot disk. 

It's cute, come on..

 

 

I adapted this for TurboForth from my code.

If you put this code in a couple of blocks and run the word BIGCAPS you will have the big font used by TI for the title screen. :) 

CHARSET restores the default TI-99 characters if you ever need them.

 

Spoiler
\ CHARSET TI-99 default characters from GROM for Turbo Forth
HEX
\ GROM ports for reference
\ 9800 CONSTANT GRMRD ( GROM base)   \ GROM read byte
\ 9802 CONSTANT GRMRA                \ GROM set read address
\ 9C00 CONSTANT GRMWD                \ GROM write byte
\ 9C02 CONSTANT GRMWA                \ GROM set write address

HEX
: GROM   ( addr -- ) DUP 9C02 ! 9C02 C! ;  \ set GROM address
: [email protected]+   ( -- c)   9800 [email protected] ;               \ read & auto-incr
: ]PDT   ( char# -- 'pdt[n] )  8 * 800 + ;  \ patt. Descriptor table
: ]GFONT ( ascii -- grom_adr) BL -  7 * 6B4 + ; \ GROM TIFont data

\ transfer from GROM to VDP
 : GVMOVE  ( grom_addr vdp_addr cnt -- )
        ROT GROM OVER + SWAP  DO  [email protected]+ I V!  LOOP ;

: CHARSET ( -- ) ( change to ti-99 default )
        ASCII ~ 1+  BL                \ all ASCII chars
        DO
           I ]GFONT  I ]PDT  0 OVER V! 1+ 7 GVMOVE  
        LOOP ;

\ BONUS WORD: loads the TITLE screen font from GROM
 : BIGCAPS  ( -- ) 4B4 900 200 GVMOVE ;  \ TI title page fonts

\ move data from GROM to CPU RAM
\ : GCMOVE  ( grom addr cnt -- ) ROT GROM  BOUNDS DO  [email protected]+ I C!  LOOP  ;

 

 

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, TheBF said:

I adapted this for TurboForth from my code.

If you put this code in a couple of blocks and run the word BIGCAPS you will have the big font used by TI for the title screen. :) 

CHARSET restores the default TI-99 characters if you ever need them.

 

  Hide contents

\ CHARSET TI-99 default characters from GROM for Turbo Forth
HEX
\ GROM ports for reference
\ 9800 CONSTANT GRMRD ( GROM base)   \ GROM read byte
\ 9802 CONSTANT GRMRA                \ GROM set read address
\ 9C00 CONSTANT GRMWD                \ GROM write byte
\ 9C02 CONSTANT GRMWA                \ GROM set write address

HEX
: GROM   ( addr -- ) DUP 9C02 ! 9C02 C! ;  \ set GROM address
: [email protected]+   ( -- c)   9800 [email protected] ;               \ read & auto-incr
: ]PDT   ( char# -- 'pdt[n] )  8 * 800 + ;  \ patt. Descriptor table
: ]GFONT ( ascii -- grom_adr) BL -  7 * 6B4 + ; \ GROM TIFont data

\ transfer from GROM to VDP
 : GVMOVE  ( grom_addr vdp_addr cnt -- )
        ROT GROM OVER + SWAP  DO  [email protected]+ I V!  LOOP ;

: CHARSET ( -- ) ( change to ti-99 default )
        ASCII ~ 1+  BL                \ all ASCII chars
        DO
           I ]GFONT  I ]PDT  0 OVER V! 1+ 7 GVMOVE  
        LOOP ;

\ BONUS WORD: loads the TITLE screen font from GROM
 : BIGCAPS  ( -- ) 4B4 900 200 GVMOVE ;  \ TI title page fonts

\ move data from GROM to CPU RAM
\ : GCMOVE  ( grom addr cnt -- ) ROT GROM  BOUNDS DO  [email protected]+ I C!  LOOP  ;

 

 

Sweet..I'll try in as soon as I get a break... just finished recapping and replacing transistors in my Akai reel to reel PLUS I added a Bluetooth board...I'm having good luck in that category..

Usually Saturday and Sunday nights are dedicated to my TI world..lol... thank you, this gotta look better when added in.

  • Like 2

Share this post


Link to post
Share on other sites
12 hours ago, TheBF said:

I adapted this for TurboForth from my code.

If you put this code in a couple of blocks and run the word BIGCAPS you will have the big font used by TI for the title screen. :) 

CHARSET restores the default TI-99 characters if you ever need them.

 

  Hide contents

\ CHARSET TI-99 default characters from GROM for Turbo Forth
HEX
\ GROM ports for reference
\ 9800 CONSTANT GRMRD ( GROM base)   \ GROM read byte
\ 9802 CONSTANT GRMRA                \ GROM set read address
\ 9C00 CONSTANT GRMWD                \ GROM write byte
\ 9C02 CONSTANT GRMWA                \ GROM set write address

HEX
: GROM   ( addr -- ) DUP 9C02 ! 9C02 C! ;  \ set GROM address
: [email protected]+   ( -- c)   9800 [email protected] ;               \ read & auto-incr
: ]PDT   ( char# -- 'pdt[n] )  8 * 800 + ;  \ patt. Descriptor table
: ]GFONT ( ascii -- grom_adr) BL -  7 * 6B4 + ; \ GROM TIFont data

\ transfer from GROM to VDP
 : GVMOVE  ( grom_addr vdp_addr cnt -- )
        ROT GROM OVER + SWAP  DO  [email protected]+ I V!  LOOP ;

: CHARSET ( -- ) ( change to ti-99 default )
        ASCII ~ 1+  BL                \ all ASCII chars
        DO
           I ]GFONT  I ]PDT  0 OVER V! 1+ 7 GVMOVE  
        LOOP ;

\ BONUS WORD: loads the TITLE screen font from GROM
 : BIGCAPS  ( -- ) 4B4 900 200 GVMOVE ;  \ TI title page fonts

\ move data from GROM to CPU RAM
\ : GCMOVE  ( grom addr cnt -- ) ROT GROM  BOUNDS DO  [email protected]+ I C!  LOOP  ;

 

 

Hey that's really nice! Works like a charm! Can I ask, what is the thinking behind the use of ] on the words ]PDT and ]GFONT? There's some kind of idiom at work, but I couldn't fathom it. I'm going to steal your code and put in the TF website if that's okay - with attribution of course!

 

Another question: Is the TI title screen drawn in code, or is it a byte-stream that is simply dumped to VDP upon boot? Anyone know? Brian, the words you have presented above would form a nice start to a TI title screen rendering lexicon. Would just need a few words to initialise the colour sets appropriately, and draw text boxes. I presume the TI logo/graphic is also in GROM memory somewhere?

 

M

Edited by Willsy
  • Like 2

Share this post


Link to post
Share on other sites
17 minutes ago, Willsy said:

Another question: Is the TI title screen drawn in code, or is it a byte-stream that is simply dumped to VDP upon boot? Anyone know?

 

It is essentially “drawn in code” after loading color table; copying large font, TI symbol characters, and copyright-sign character; etc.—see the console GROM 0 power-up routine in Heiner Martin’s TI Intern, pp 99 – 101.

 

26 minutes ago, Willsy said:

I presume the TI logo/graphic is also in GROM memory somewhere?

 

Yes—see top of page 108 of TI Intern.

 

...lee

  • Like 3

Share this post


Link to post
Share on other sites
2 hours ago, Willsy said:

Hey that's really nice! Works like a charm! Can I ask, what is the thinking behind the use of ] on the words ]PDT and ]GFONT? There's some kind of idiom at work, but I couldn't fathom it. I'm going to steal your code and put in the TF website if that's okay - with attribution of course!

 

Another question: Is the TI title screen drawn in code, or is it a byte-stream that is simply dumped to VDP upon boot? Anyone know? Brian, the words you have presented above would form a nice start to a TI title screen rendering lexicon. Would just need a few words to initialise the colour sets appropriately, and draw text boxes. I presume the TI logo/graphic is also in GROM memory somewhere?

 

M

I first saw that ']' notation in Open Firmware by Mitch Bradley.  It is just a reminder that this word needs an index ie. some kind of array.

It's not pretty, but it helps my old memory. Kind of like $ for strings.

 

I am sure there is world of stuff in the GROMs that I have never investigated. I found the listing of what is there somewhere... 

http://www.unige.ch/medecine/nouspikel/ti99/groms.htm

 

So yes the colour table and the patterns are all there.  I might try that myself some day.

 

Address Contents
>0451 Default values of the 8 VDP registers.
>0459 Content of the color table, for title screen.
>04B4 Characters 32 to 95 patterns, for title screen.
>06B4 Regular upper case character patterns.
>0874 Lower case character patterns.
>16E0 Joysticks codes returned by SCAN.
>1700 Key codes returned by SCAN.
>1730 Ditto with SHIFT.
>1760 Ditto with FCTN.
>1790 Ditto with CTRL.
>17C0 Key codes in keyboard modes 1 et 2 (half-keyboards).
>2022 Error messages (with Basic bias of >60, and lenght byte).
>285C Reserved words in Basic, and corresponding tokens.

Revision 1. 3/2/00 Preliminary
Revision 2. 3/4/00 OK to release
Revision 3. 5/25/01 Corrected clock and Vss info.
  • Like 4

Share this post


Link to post
Share on other sites

@TheBF

 

Do you have a definition for BOUNDS?

 

Thanks

 

M

Edited by Willsy

Share this post


Link to post
Share on other sites
20 minutes ago, Willsy said:

@TheBF

 

Do you have a definition for BOUNDS?

 

Thanks

 

M

Sorry. Fixed it in one but not the last one.

It comes from MPE Forth. 

 

: BOUNDS   OVER + SWAP ;

 

But much faster as code of course 

 

 

  • Like 2

Share this post


Link to post
Share on other sites
On 1/12/2022 at 2:16 PM, TheBF said:

Sorry. Fixed it in one but not the last one.

It comes from MPE Forth. 

 

: BOUNDS   OVER + SWAP ;

 

But much faster as code of course 

 

 

AHH, this works. So nice. Ill use it in my essentials disk if you don't mind..+ ill study the table in post#320, this is so cool.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, GDMike said:

AHH, this works. So nice. Ill use it in my essentials disk if you don't mind..+ ill study the table in post#320, this is so cool.

You can thank an English gentleman named Stephen Pelc, founder of Micro Processor Engineering.

  • Like 3

Share this post


Link to post
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...