Jump to content

TheBF

+AtariAge Subscriber
  • Content Count

    2,876
  • Joined

  • Last visited

Posts posted by TheBF


  1. 47 minutes ago, GDMike said:

    I hope it's something I can grasp. Hehe...

    I'm wondering, would the BSave load into VRAM or could it partition into SAMS.. because, I'm afraid of running outta VRAM and MAIN CPU ram to continue coding...or Maybe I'm missing something.. not unusual..

    What is the project you are making that uses all of CPU RAM and VDP RAM?

    • Like 1

  2. Looking at my Github site I find a few half-baked files. Oops.

    So I fixed up this one that might be useful.

     

    \ *
    \ * Boot tracking
    \ *
    \ * Code copied more or less verbatim from:
    \ * 1.7. The Art Of Assembly Part 7. Why A Duck?
    \ * By Bruce Harrison 1991
    \ *
    \ BOOTTR MOV  @>83D0,R12          * GET THE CRU BASE IN R12
    \        MOV  @>83D2,R9           * GET THE ROM ADDRESS FOR \DEVICE
    \        SBO  0                   * ENABLE THE ROM
    \        AI   R9,4                * ADDING FOUR PUTS US AT THE LENGTH BYTE
    \        MOVB *R9+,R4             * PLACE THAT IN R4 AND INCREMENT R9
    \        SRL  R4,8                * RIGHT JUSTIFY LENGTH IN R4
    \        LI   R10,FILEDV          * POINT TO TEXT BUFFER
    \ MOVIT  MOVB *R9+,*R10+          * MOV ONE BYTE FROM ROM TO TEXT BUFFER
    \        DEC  R4                  * FINISHED?
    \        JNE  MOVIT               * NO, DO ANOTHER BYTE
    \        SBZ 0                    * DISABLE THE ROM (R4 IS ZERO AT THIS POINT)
    \        B   *R11                 * BRANCH TO NEXT SECTION OF CODE
    \ FILEDV TEXT "DSK1."             * File device
    
    \ NEEDS MARKER     FROM DSK1.MARKER
    \ NEEDS .S         FROM DSK1.TOOLS
    \ MARKER REMOVE
    
    DECIMAL
    24 USER 'R12  \ address of R12 in any CAmel99 workspace
                  \ >8324 in other TI-99 Forths
    
    HEX
    CODE 0SBO  ( -- ) 1D00 ,  NEXT, ENDCODE
    CODE 0SBZ  ( -- ) 1E00 ,  NEXT, ENDCODE
    
    83D0 CONSTANT DISKCARD
    83D2 CONSTANT ROMADDR
    
    HEX
    : BOOTDISK ( -- addr len)
              DISKCARD @ 'R12 !
              0SBO
              ROMADDR @ 4 + COUNT PAD PLACE
              0SBZ
              PAD COUNT ;

     

     

     

     

     

    BOOTDISK.png

    • Like 2

  3. 2 minutes ago, Lee Stewart said:

     

    TurboForth’s block buffers live in VRAM.

     

    ...lee

    So that's a bit of a wrinkle but not too hard to overcome I think. It's might better for this that my system since I have both in Low Ram.

    In Camel99 you would have to put the SAMS window at >2000. The 3 block buffers start at:  >3FFF  >404 3 * -   ( -- >33F3)

    • Like 1

  4. 39 minutes ago, Willsy said:

    Yeah, BSAVE ain't gonna work if you're using SAMS banks, sorry!

    The good news is that saving a 4K sams block to disk blocks should be pretty simple no?

     

    I don't know where TF's block buffers live so this could bomb badly

    \ UNTESTED!
    $400 CONSTANT 1K
    $3000 CONSTANT WINDOW
    
    : SAMS>BLOCK ( bank# block# --)
                  SWAP  WINDOW MAP
                 4 0 DO
                       WINDOW 1K I * + ( -- addr1 )
                       I BLOCK         ( -- addr1 addr2 )
                       1K CMOVE
                  LOOP ; 

     

    • Like 1

  5. 7 minutes ago, Lee Stewart said:

     

    Here is a @FALCOR4 post from SAMS usage in Assembly.

     

    ...lee

    I think this is a slightly different situation that that doc addresses in that the AMSINI code from Bruce, is writing a word to the SAMS register but it still doesn't work on Classic99.

    I think Classic99 actually gives you more than 1M of memory although I have never tested how much.

    The first byte is counting pages 0..255 for a 1M card and the second byte lets you access more pages.

    Or am I missing something completely. Been known to happen. :)

     

     

     


  6. Just now, Vorticon said:

    Why is this the case?

    Something to do with supporting bigger cards.

    The old cards wanted duplicate values in each byte. Bigger cards need the extra byte to go beyond 256 total pages. 

     

    I can't remember if I sent this to @Tursi in a clear enough manner. (oops my bad)

    He has said he hasn't done much with SAMS somewhere in the forum so probably not a top priority.

     

    • Thanks 1

  7. 2 hours ago, Vorticon said:

    Hi. Aside from Thierry's documentation of the SAMS card, is there another reference available, particularly aimed at the software side of things and for the 1meg card? 

    I should also mention this difference between Classic99 and real iron.

     

    The AMSINI code below works on real IRON.

    To use it on Classic99 you must change the >0101 to >0100.

     

    * SUBROUTINES SECTION
    *
    * AMSINI SETS AMS CARD TO "POWER-UP" CONDITION
    *
    AMSINI 	LI R12,>1E00 		AMS CRU BASE
    		SBO 0 				TURN ON AMS
    		LI R1,>FEFF 		(THIS IS ->0101)
    		LI R0,>4000 		START OF MEMORY
    		AMSLP AI R1,>0101 	ADD 1 PAGE
    		MOV R1,*R0+ MOVE 	2 BYTES TO MEM-MAPPER
    		CI R0,>4020 		ALL DONE?
    		JLT 				AMSLP NO, INIT MORE
    		RT  				RETURN

     


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

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

  10. I have forgotten a lot of XBASIC stuff, but here is some ideas that might help.

    Although a shark is probably not within the artistic motiviation here. :) 

    But you can see a method to keep your wake running while checking for other things to happen. You can play with the RND number anyway you want to

    randomly make things happen without going into a delay loop.

     

    Spoiler
    
    
    10 CALL CLEAR
    20 CALL MAGNIFY(3)
    
    80 CALL CHAR(112,"FFFFFFFFFFFFFFFF")
    90 REM SHIP
    100 REM Venstre topp
    110 CALL CHAR(36,"0000000000FF000000000000000000000704020100FF01020404080810204040")
    120 REM Høyre topp
    130 CALL CHAR(40,"F090A0C080FFC0A090908888848281810000000000FF00000000000000000000")
    140 REM Venstre mid
    150 CALL CHAR(44,"00000101020204087F1F0F0818080F078181010139013913FFFFFF888888FFFF")
    160 REM Høyre mid
    170 CALL CHAR(48,"C0C0C0C0CEC0CEE4FFFFFF888888FFFF8080404020201008FFFCFC888C88F8F0")
    180 REM Venstre bunn
    190 CALL CHAR(52,"03010000000000000000000000000000FFFFFFFF000000000000000000000000")
    200 REM Høyre bunn
    210 CALL CHAR(56,"FFFFFFFF000000000000000000000000E0C08000000000000000000000000000")
    
    220 REM SAIL
    230 REM SAIL LEFT UP
    240 CALL CHAR(64,"00000000000000FF7F7F7F7F7F7F7F7F00000000000000FDFFFFFFFFFFFFFFFF")
    250 REM SAIL RIGHT UP
    260 CALL CHAR(68,"000000000000005FFFFFFFFFFFFFFFFF00000000000000FFFEFEFEFEFEFEFEFE")
    270 REM SAIL LEFT DOWN
    280 CALL CHAR(72,"7F7F7F7F7F7F7F000000000000000000FFFFFFFFFFFFFF000000000000000000")
    290 REM SAIL RIGHT DOWN
    300 CALL CHAR(76,"FFFFFFFFFFFFFF000000000000000000FEFEFEFEFEFEFE000000000000000000")
    
    310 REM LIGHT
    320 REM LEFT WINDOWS
    330 CALL CHAR(80,"0000000707070000000000000000000000000077777700000000000000000000")
    340 REM RIGHT WINDOWS
    350 CALL CHAR(84,"0000007777770000000000000000000000000070707000000000000000000000")
    
    360 REM WAKE
    370 CALL CHAR(96,"2940245108101000224252142004040048244829A28024888850042848400000")
    380 CALL CHAR(100,"004429402451081214002A4212140000842048244829A2802488885000204000")
    390 CALL CHAR(104,"2524104429402451081214000A0202041020842048244829A280248880400000")
    400 CALL CHAR(108,"4400252410442940240108020400020248441020842048244828A08020808040")
    
    
    770 CALL COLOR(11,5,1)
    780 FOR A=19 TO 24
    790 CALL HCHAR(A,1,112,32)
    800 NEXT A
    
    810 REM SAIL
    820 CALL SPRITE(#11,64,15,112,112,0,0)
    830 CALL SPRITE(#12,68,15,112,128,0,0)
    840 CALL SPRITE(#13,72,15,128,112,0,0)
    850 CALL SPRITE(#14,76,15,128,128,0,0)
    
    910 REM SHIP
    920 CALL SPRITE(#1,36,2,112,112,0,0)
    930 CALL SPRITE(#2,40,2,112,128,0,0)
    940 CALL SPRITE(#3,44,2,128,112,0,0)
    950 CALL SPRITE(#4,48,2,128,128,0,0)
    960 CALL SPRITE(#5,52,2,144,112,0,0)
    970 CALL SPRITE(#6,56,2,144,128,0,0)
    
    1010 REM LIGHT
    1020 CALL SPRITE(#7,80,11,136,112,0,0)
    1030 CALL SPRITE(#8,84,11,136,128,0,0)
    1032 REM CALL SPRITE(#9,81,11,148,120,0,0)
    1034 REM CALL SPRITE(#10,82,11,148,128,0,0)
    
    1040 CALL CHAR(124,"0000000000000000000010181C3E3EFF00000000000000000000000000000000")
    1050 CALL CHAR(120,"000000000000000000000818387C7CFF00000000000000000000000000000000")
    
    
    2040 REM Wake & random shark movement
    2044 CALL SPRITE(#28,124,15,160,15,0,2)
    
    2050 CALL SPRITE(#13,96,6,150,120,0,0)
    2060 FOR A=96 TO 108 STEP 4
    2070    CALL PATTERN(#13,A)
    2082    IF RND >0.5 THEN GOSUB 5010  ELSE GOSUB 5040
    2084    IF RND >0.95 THEN GOSUB 3000
    2090 NEXT A
    2999 GOTO 2050
    
    3000 REM JAWS
    3020 CALL SOUND(400,110,8)
    3030 CALL SOUND(400,118,8)
    3999 RETURN
    
    5000 ! MOVEFIN LEFT
    5010 CALL PATTERN(#28,124) :: CALL MOTION(#28,0,2)
    5020 RETURN
    
    5030 ! MOVE FIN RIGHT
    5040 CALL PATTERN(#28,120) :: CALL MOTION(#28,0,-2)
    5050 RETURN
    

     

     


  11. 1 minute ago, oddemann said:

    Chime in and play with it, that is why I share it! And your learning Norwegian ;)

    I have a new update soon that has fixed the lights... just need to get the right numbers to land the Sprite in the right place

    Norwegian is almost readable to me a I can hear some of it too, because I speak Dutch (Nederlands) by marriage. :) 

    I enjoy watching this series for different languages on Youtube. Here is the Nordic family.  Islandic  wow! 

     

    Can they understand Norwegian without prior learning? | Norwegian vs Danish vs Swedish vs Icelandic - YouTube

     


  12. 36 minutes ago, oddemann said:

    Great, well not so great!

    I have sea now... it is black... WHY??? I do not understand why it is black I have defined it to be blue. - Fixed, moved CHAR to a higher number!

     

    And suddenly part of the light shows up as letters - Why?
    AND the wake after the ship is part letters and part graphics - Why? Same line numbers (copying lines to save time and forgetting to update line numbers.)

    I am pretty sure it is a stupid mistake and a mix of number or something... But I cant see it.

    Help?

    Two steps forward and one back... But I am getting to something cool. I might just get to a cool animation. But I am happy with that. I think it kinda looks OK!

     

      Hide contents
    
    10 CALL CLEAR
    20 CALL MAGNIFY(3)
    
    80 CALL CHAR(112,"FFFFFFFFFFFFFFFF")
    90 REM SHIP
    100 REM Venstre topp
    110 CALL CHAR(36,"0000000000FF000000000000000000000704020100FF01020404080810204040")
    120 REM Høyre topp
    130 CALL CHAR(40,"F090A0C080FFC0A090908888848281810000000000FF00000000000000000000")
    140 REM Venstre mid
    150 CALL CHAR(44,"00000101020204087F1F0F0818080F078181010139013913FFFFFF888888FFFF")
    160 REM Høyre mid
    170 CALL CHAR(48,"C0C0C0C0CEC0CEE4FFFFFF888888FFFF8080404020201008FFFCFC888C88F8F0")
    180 REM Venstre bunn
    190 CALL CHAR(52,"03010000000000000000000000000000FFFFFFFF000000000000000000000000")
    200 REM Høyre bunn
    210 CALL CHAR(56,"FFFFFFFF000000000000000000000000E0C08000000000000000000000000000")
    
    220 REM SAIL
    230 REM SAIL LEFT UP
    240 CALL CHAR(64,"00000000000000FF7F7F7F7F7F7F7F7F00000000000000FDFFFFFFFFFFFFFFFF")
    250 REM SAIL RIGHT UP
    260 CALL CHAR(68,"000000000000005FFFFFFFFFFFFFFFFF00000000000000FFFEFEFEFEFEFEFEFE")
    270 REM SAIL LEFT DOWN
    280 CALL CHAR(72,"7F7F7F7F7F7F7F000000000000000000FFFFFFFFFFFFFF000000000000000000")
    290 REM SAIL RIGHT DOWN
    300 CALL CHAR(76,"FFFFFFFFFFFFFF000000000000000000FEFEFEFEFEFEFE000000000000000000")
    
    310 REM LIGHT
    320 REM LEFT WINDOWS
    330 CALL CHAR(80,"0000000707070000000000000000000000000077777700000000000000000000")
    340 REM RIGHT WINDOWS
    350 CALL CHAR(84,"0000007777770000000000000000000000000070707000000000000000000000")
    
    360 REM WAKE
    370 CALL CHAR(96,"2940245108101000224252142004040048244829A28024888850042848400000")
    380 CALL CHAR(100,"422440290408090012222A09100202002A492525A98228444492082840400000")
    390 CALL CHAR(104,"242940245108101000224252142004048448244829A280248888500428484000")
    400 CALL CHAR(108,"28422440290408090012222A091002028420492525A982284444920828404000")
    
    770 CALL COLOR(11,5,1)
    780 FOR A=19 TO 24
    790 CALL HCHAR(A,1,112,32)
    800 NEXT A
    
    810 REM SAIL
    820 CALL SPRITE(#9,64,15,112,112,0,0)
    830 CALL SPRITE(#10,68,15,112,128,0,0)
    840 CALL SPRITE(#11,72,15,128,112,0,0)
    850 CALL SPRITE(#12,76,15,128,128,0,0)
    
    910 REM SHIP
    920 CALL SPRITE(#3,36,2,112,112,0,0)
    930 CALL SPRITE(#4,40,2,112,128,0,0)
    940 CALL SPRITE(#5,44,2,128,112,0,0)
    950 CALL SPRITE(#6,48,2,128,128,0,0)
    960 CALL SPRITE(#7,52,2,144,112,0,0)
    970 CALL SPRITE(#8,56,2,144,128,0,0)
    
    1010 REM LIGHT
    1020 CALL SPRITE(#1,80,11,136,112,0,0)
    1030 CALL SPRITE(#2,84,11,136,128,0,0)
    
    1040 REM Wake
    1050 CALL SPRITE(#13,96,6,148,120,0,0)
    1060 FOR A=96 TO 108 STEP 4
    1070 CALL PATTERN(#13,A)
    1080 FOR DELAY=1 TO 100 :: NEXT DELAY
    1090 NEXT A
    
    5000 GOTO 1050

     

     

    I like it.

    And I learned a new word.  "Høyre"  :)

    I have a couple of ideas...

     


  13. I suppose since I don't have BLOAD/BSAVE mechanism I should spell out how one makes a custom "loaded" system for yourself 

    This assumes you have your Camel99 disk in DSK1. 

    It's not quite as tidy as  30 BSAVE.   :)   

    Chuck Moore had a gift for simplicity.

     

    (I need to do one of these for the SuperCart system as well. That is just slightly more complicated but doable)

    \ Edit this script to build a Custom Forth system the way you want it
    
    INCLUDE DSK1.MARKER
    
    MARKER  Kernel   \ this will remove everything  except the kernel
    \                  (case sensitive)
    
    \ add the files you want in the final program
    INCLUDE DSK1.ASM9900
    INCLUDE DSK1.ELAPSE
    INCLUDE DSK1.TOOLS
    INCLUDE DSK1.SOUND
    
    \ Add your favourite words here
    : SCREEN  ( fg bg -- ) SWAP 4 LSHIFT SWAP OR  7 VWTR ;
    
    \ make a new boot word to start the way you like things
    HEX
    : COLD
         WARM        \ Must have this to "warm" boot Forth first.
         F 1 SCREEN  \ white on black
         DECIMAL
         ABORT
    ;
    
    LOCK  \ locks the dictionary to everything before this point on boot
    
    INCLUDE DSK1.SAVESYS  \ Now this will not be saved in the final program
    
    \ save your new forth system
    ' COLD SAVESYS DSK5.MYFORTH
    

     

     

    • Like 2
    • Thanks 1

  14. 39 minutes ago, GDMike said:

    Just created a 1500 block file... but of, course I'm showing off..lol...I like the style of keeping a small but relatively large enough block file and including a block file that I don't want permanent or as testing would see it. And just drop it as not needed. I can already do that in TF, just not exactly the same smoothness as your include makes it. Lol thx 

    Wow! 1500 blocks is enough for a very big system.

    The thing with blocks is that you can do everything with them. code, data, binary programs. So it's not a big sacrifice.

    • Like 1

  15. 21 minutes ago, GDMike said:

    Does this change in cl99 at overspend ? Or do the basic misses just happen faster?

    Oh, btw. What's the code for your include look like? I was playing with TF and it's uses

    of S" xxx" USE but the filename, (block), is downstream from my word.

    I'd like to be able to leave my current block file as a boot file and USE any other block file the way you do, with a, include file.

    Currently, TF does allow S" DSK4.BLKFIL" USE for my fulfilment.

     

    I think in Overspeed BASIC would scan for a collision at about the same speed as Forth does natively so it might work just fine although it means Classic99 would have to slow down the Sprite Automotion as well.

    Don't know if that happens. ??

     

    My INCLUDE is based on the ANS Forth view of the world so it's different than older Forth systems. The source code wouldn't help.

    I am pretty sure Mark has a BLOCK with an include word defined somewhere. Look at the docs web site.

     

    The old days Forth answer to your problem is just make a bigger block file and put everything you need in it. :) 

    In the old days my DOS Forth with two 360K floppy drives started at BLOCK 0 and went up to BLOCK 719.

    Seamless.

    TI-FORTH does the same thing. With two DSSD drives I think you have BLOCK 0..359 (I have to double check)

     

     

     

    • Like 2
×
×
  • Create New...