Shop OBEX P1 Docs P2 Docs Learn Events
Tachyon Forth for P2 -FAT32+WIZnet- Now Smartpins - wOOt! - Page 7 — Parallax Forums

Tachyon Forth for P2 -FAT32+WIZnet- Now Smartpins - wOOt!

1234579

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-07-06 13:49
    Still playing with my P2 CV-A9 + motherboard and testing out RS485 communications with a string of P1s sitting off it. I even tried chatting to each P1 over telnet, through the P2, and to the P1 via RS485 using the ping-pong protocol so that it emulates a full-duplex connection. I can even download new source code to the P1 via the P2 via telnet. I just made the mistake of telling it to "cat WARPEACE.TXT" and it just kept spewing the contents of the book for several minutes. BTW, I even have SD cards on some of the P1s so I suppose I could chat with one of them and get it to do the same.

    Anyway, I will probably make up my little PIC serial boot emulator so I can run the P2 stand-alone. The PIC only needs to load up a serial flash routine so that I can restore my backup image from flash. It's almost the same thing for SD as well but I'm just working with Flash booting at the moment.

    Here's a terminal capture of me connecting to the P2 over telnet, checking a couple of things and then chatting with a P1 on the RS485 network in full-duplex mode. (10 CHAT is when I connect to a P1)
    peter@peter-XPS-15-9550 ~ $ telnet tachyonforth.com 10001
    Trying 58.161.247.42...
    Connected to tachyonforth.com.
    Escape character is '^]'.
    WELCOME TO THE IoT5500 TELNET SESSION
    Use Forth commands, for help type QWORDS
    Try ls or DIR for directory
    Session time is unlimited but all other network ports
    will be blocked until Telnet is disconnected
    
    
      ok
    TF2# q
     
    --------------------------------------------------------------------------------
    CODE MEMORY  @ $00.8026 for 28,710
    NAME MEMORY  @ $00.B3BA for 9,995
    DATA MEMORY  @ $00.E2FB for 290
    FREE MEMORY  = 13,204
    
    MODULES LOADED: 
    7041: EASYNET.fth         WIZNET NETWORK SERVERS 151111.0800 
    6405: W5500.fth           WIZNET W5500 driver for TF2 151110.1500 
    4E44: SDFAT.fth           P2 SDFAT FILE SYSTEM - 160619.0000 
    4C59: EEPROM.fth          EEPROM UTILIES - 160625.0000 
    2D80: EXTEND.fth          TACHYON FORTH EXTENSIONS for the P2 - 151121-1400 
    POLL #0 ?EASYNET
    2016/07/06 WED 23:56:15
    -------------------------------------------------------------------------------- ok
    TF2# ls
    
    NO NAME    
    WARPEACE.TXT   EXTEND  .FTH   EEWORDS .FTH   VGA     .FTH   CLOCK   .FTH   
    EASYFILE.FTH   BREAKOUT.FTH   SDCARD  .FTH   W5500   .FTH   LIFE    .FTH   
    EASYNET .FTH   IOT5500 .HTM   WELCOME .TEL   POPCORN .MP3   HOME    .HTM   
    P8CPU   .JPG   IOTPINS .JPG   LOVE    .WAV   HELP    .TXT   P8      .H     
    IOT5500H.JPG   DRAGON  .JPG   IOT5500 .JPG   128K    .BIN   256K    .BIN   
    W5200   .FTH   PREVIOUS.ROM   DEBUG   .ROM   POPCORN .WAV   P8X32A  .PDF   
    IMAGE3         FRED    .PNG   FSRSCH  .PNG   FSRPCB  .PNG   IMAGE          
    HTTP404 .HTM   IMAGE2         IMAGE1         LOGON   .HTM   TACHYON .HTM   
    WELCOME .FTP   P2BOOT  .IMG   POWERMAX.LOG   SITE0002.LOG   SITE0001.LOG   
    FAVICON .ICO   PARALLAX.PNG   HOME1   .HTM   SYSLOG  .TXT   HCB4208 .JPG   
    CE1372  .JPG   CE1372  .PDF   CHARLCD .JPG   ECOLCD  .PDF   LOVE    .MP3   
    FIRMWARE.ROM     ok
    TF2# 10 CHAT
     
      ok
    qw
    qw 
    QV ?AUTOLOAD FCRC (LOADROM) LOADIMG LOADROM SAVEIMG SAVEROM FIXBIN ROMSZ .FILES 
    .FX .FILE ls .LIST (.LIST) (ls) lscnt .UTIME .FNAME (SLIST) (DIR) DIR udir (.DIR) 
    .DIR .ATR PROMPT .PATH pwd cd$ cd cwd$ cat (cat) FPRINT$ FRUN FLOAD DELETE RENAME 
    RENAME$ RW APPEND APPEND.BLK eof -FERASE @RCD >|RCDSZ RCDSZ FCREATE$ FOPEN FOPEN$ 
    FOPEN# FCLOSE FOUTPUT >FILE FINPUT FILE> FPUTB FPUT FGET fkey FREM @FWRITE @FREAD 
    fstat fwrite fread FFC@ FC@ FC! FILE@ FSECT@ FSIZE@ StartCluster CLUSTERS? ROUNDUP/ 
    CLUSTER@ @CLUSTER NextFreeDir .FTIME .FDATE .FYEAR FSTAMP FTIME! +DIR! FDATE! DECS 
    DIR! DIR? dir$ @DIRBUF @FSIZE @FCLST @FDATE @FTIME @FCLSTH @ADATE @CDATE @CTIME 
    @CMS @ATR @FEXT @FNAME >F83 fname$ FILE$ file$ ?SDCARD ?MOUNT MOUNT .FAT READFAT32 
    CLUST>SECT FAT2 FAT1 @FAT @BOOT cwdsect @ROOT fboot dirbuf file diradr rootdir clshift 
    mounted fatname  ok
    .PPCFG
    .PPCFG #10 @1,000,000 TR/TE=14/15 ok
    $7F BL DO I EMIT LOOP
    $7F BL DO I EMIT LOOP  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ok
    'C .
    'C . 29 ok
    ls
    ls *No Card inserted!* *Card Error* *Card Error* 
                 ok
    .VER
    .VER   Propeller .:.:--TACHYON--:.:. Forth V29160613.0000
     ok
    ^Q
     ok
    TF2#   ok
    TF2# 
    
  • Neat, I'm on the list for a couple MB's and any booter boards you make work up for the CV-A9.
    A few of those discontinued flash parts would be nice to boot. Couldn't help it. Very quiet in P2 land.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-07-07 15:22
    I think the forum in terms of actual P1 or P2 stuff is extremely quiet and has been for years now. P2 has been a long long time coming, I wonder if we will ever get that forum energy back again.

    Here is a TF2 decompiler I cobbled together quickly, I will probably enhance it bit by bit. I've now included it in EXTEND.fth although you will find the SEE.fth in the P2 folder.
    (Updated 8th July 2016)
    TF2# SEE ?FTP
    7D65: 7350     FTP
    7D67: 6A1B     SOCKET
    7D69: 7520     CONNECTED?
    7D6B: 00EA     IF $7DBC
    7D6F: 009D       $0046 (70) 'F'
    7D73: 75E4       constat
    7D75: 0087       C!
    7D77: 28E8       CON
    7D79: 152D       CR
    7D7B: 0181       ON
    7D7D: 7413       QUIET
    7D7F: 6DB7       autosend
    7D81: 319A       C~~
    7D83: 6EE7       LANCON
    7D85: 1D87       PRINT" 220 WELCOME TO THE TACHYON WIZNET FTP SESSION!"
    7DB6: 152D       CR
    7DB8: 74FE       KEEPALIVE
    7DBA: 74D8       LANSKT
                   THEN
    7DBC: 7570     DSCTD?
    7DBE: 00EA     IF $7DCC
    7DC2: 009D       $0066 (102) 'f'
    7DC6: 75E4       constat
    7DC8: 0087       C!
    7DCA: 351D       CONIO
                   THEN
    7DCC: 000D     ;  ok
    
  • Cluso99Cluso99 Posts: 18,066
    Nice work as usual Peter. I probably should have invested the time to learn your Tachyon but I prefer assembler.
    The forums are extremely quiet. Makes me wonder if there will be a volume market for P2 when it finally arrives.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-07-07 00:58
    Cluso99 wrote: »
    Nice work as usual Peter. I probably should have invested the time to learn your Tachyon but I prefer assembler.
    The forums are extremely quiet. Makes me wonder if there will be a volume market for P2 when it finally arrives.

    I use assembler all the time on small micros but with anything that has enough resources I usually implement a Forth so that I can be more productive and develop and debug interactively at a much higher level. I also like my assemblers "flat" in that I can control what goes where and how which is also how Forth operates too as you can discern from a decompilation that there is a one-to-one correspondence with the compiled code and the source code, in fact I can fancy up my decompiler so that it reconstructs the source code along with indentation etc in a compilation ready form. So I see Forth much like I see assembler language, it gives me full control over the hardware and compilation while still running close to the metal but providing that interactive hands-on hardware feel.

    BTW, Forth is just the assembler, along with directives and macros of the virtual stack machine, so there wouldn't be much for you to learn then seeing it is "just another assembler language" :)
  • Cluso99Cluso99 Posts: 18,066
    Peter,
    I love the way the prop works. It makes assembler easy without interrupts. I know we now have these too, but they are quite simple when you need them. What also helps is that you can throw more cogs at a job to keep the assembly separate.
    I also like spin because its also quite simple and easy to learn. No point in everything being in assembler. But we don't have this yet on P2.

    So I am concentrating on a debugger for now. I want it to be able to be called from within a cog, or from another cog.

    Once I am happy, I might give Tachyon2 a go to work with my debugger. We will see.

    Anyway, you have proven Tachyon to be a fantastic tool to work with !!!
  • Cluso99 wrote: »
    Peter,
    I love the way the prop works. It makes assembler easy without interrupts. I know we now have these too, but they are quite simple when you need them. What also helps is that you can throw more cogs at a job to keep the assembly separate.
    I also like spin because its also quite simple and easy to learn. No point in everything being in assembler. But we don't have this yet on P2.

    So I am concentrating on a debugger for now. I want it to be able to be called from within a cog, or from another cog.

    Once I am happy, I might give Tachyon2 a go to work with my debugger. We will see.

    Anyway, you have proven Tachyon to be a fantastic tool to work with !!!

    Well I agree with Spin being easy to use and it's a pity that it is no longer promoted. If I had to wrangle with a C compiler and its "red tape" I might not have developed a fondness for the Prop in the first place but with just a few lines of Spin and an F11 the Prop comes to life.

    However the Tachyon VM is all assembler under the hood, it would be good if you had a look at the source to see if you could offer any suggestions too, as I have not delved too deeply into the newer P2 instructions just quite yet :)

  • jmgjmg Posts: 15,140
    Cluso99 wrote: »
    The forums are extremely quiet. Makes me wonder if there will be a volume market for P2 when it finally arrives.

    My worries are more immediate - I wonder if there is enough P2 testing going down, for release sign-off
    USB (host & device?) seems to have gone quiet, and getting working HyperRAM with some bandwidth numbers, and comparison with working SDRAM & even SRAM looks to have also paused...

  • cgraceycgracey Posts: 14,133
    edited 2016-07-07 20:50
    jmg wrote: »
    Cluso99 wrote: »
    The forums are extremely quiet. Makes me wonder if there will be a volume market for P2 when it finally arrives.

    My worries are more immediate - I wonder if there is enough P2 testing going down, for release sign-off
    USB (host & device?) seems to have gone quiet, and getting working HyperRAM with some bandwidth numbers, and comparison with working SDRAM & even SRAM looks to have also paused...

    I've taken some time off over the last few weeks, mainly because summer is happening and there are lots of outdoor things to be done.

    Lately, I've been getting back into the documentation, as it needs to be more complete. I was starting to work on the ROM code, but realized that lack of documentation was holding me up. It took me a while to re-figure out what ALTI does, as it's needed by the SHA-256 code. So, I got that documented for, at least, my own use. It's in the main doc file. I think I will document the pixel instructions next, as people have been asking about them.
  • Peter:

    I have TF2 running on the 1-2-3 FPGA (P2 Vs 10a). I am working through EXTEND . However, I noted that after loading TF2, I found #421 on the data stack. After clearing the stack and loading EXTEND.fth, -#59038737 & #421 were on the stack. I am using the latest EXTEND version.

    Nick
  • @nglordi - I am getting this:
    TF2# .s  0000 [ 0000.0000  0000.0000  0000.0000  0000.01A5 ]TOP  ok
    TF2# .VER   Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V11160702.1400 PIONEER
     ok
    TF2# IFDEF VOCAB:  ok
    TF2#   ok
    TF2# P2 TACHYON 1 flags CLR   Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V11160702.1400 PIONEER
     ok
    <snip>
    10:10:26  End of source code, 0471 lines processed and 0000 errors found
    Load time = 609114733 cycles or @160MHZ 7.613sec
    --------------------------------------------------------------------------------
    CODE MEMORY  @ $00.4F9A for 16,282
    NAME MEMORY  @ $00.C4B9 for 5,644
    DATA MEMORY  @ $00.E000 for 202
    FREE MEMORY  = 29,983
    
    MODULES LOADED:
    2D80: EXTEND.fth          TACHYON FORTH EXTENSIONS for the P2 - 160707-1500
    2016/07/18 MON 10:10:26
    -------------------------------------------------------------------------------- ok
    TF2#   ok
    TF2# .S
     DATA   x1    DEAD.BEEF
     BRANCH x0
     LOOP   x0
     RETURN x3    0000.26C7 0000.4F9C 0000.37EB ok
    TF2#
    
    I note too that 7.6 seconds is my actual not projected load time so I will have to fix that reporting but otherwise it seems fine. Can you post your screen copy in a similar manner.
    btw, there is no need for any delays or extra stop bits, just let it rip. I'm running at TeraTerm's maximum rate of 921,600 baud.
  • Peter: I am also using TerraTerm at 921699 baud and 1 stop bit. I am using the EXTEND version with "SEE".

    TF2# .S  0000 [ 0000.0000  0000.0000  0000.0000  0000.01A5 ]TOP  ok
    TF2# .VER   Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V11160702.1400 PIONEER
     ok
    
    TF2# IFDEF VOCAB:  ok
    TF2#   ok
    TF2# P2 TACHYON 1 flags CLR   Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V11160702.1400 
    
    PIONEER
     ok
    
    
    00:00:45  End of source code, 0475 lines processed and 0000 errors found
    Load time = 2004125361 cycles or @160MHZ 25.51sec
    --------------------------------------------------------------------------------
    CODE MEMORY  @ $00.4FA9 for 16,297
    NAME MEMORY  @ $00.C4B9 for 5,644
    DATA MEMORY  @ $00.E000 for 202
    FREE MEMORY  = 29,968
    
    MODULES LOADED:
    2D80: EXTEND.fth          TACHYON FORTH EXTENSIONS for the P2 - 160707-1500
    2000/00/00 Þ  00:00:03
    -------------------------------------------------------------------------------- ok
    TF2#   ok
    TF2# .S
     DATA   x1    DEAD.BEEF
     BRANCH x0
     LOOP   x0
     RETURN x3    0000.26C7 0000.4FAB 0000.37E6 ok
    
    TF2#   ok
    TF2#   ok
    TF2# $1A5 . 421 ok
    TF2# $DEAD.BEEF . -559038737 ok
    TF2#     [spoiler][/spoiler][/color]
    
    

    I note that loading EXTEND is significantly longer on the 1-2-3.

    Nick

  • That's really strange but it is as if there is a delay in the TeraTerm line delay settings or something. It's easy enough to check the speed of the unit:
    TF2# 1,000,000 LAP FOR NEXT LAP .LAP 32000096 cycles or @160MHZ 200.0ms ok

    I wonder if the 123 needs to have a clock setup. This is the A9 version of the board isn't it?
  • I am using the A9 version. I also get 200 ms when I checked the speed.

    What is "$Dead.BEEF" ?

    Nick
  • nglordi wrote: »
    I am using the A9 version. I also get 200 ms when I checked the speed.

    What is "$Dead.BEEF" ?

    Nick

    decimal 4728199954159

    It is used as a unique signature or as a special terminator or indicator with some morbid humor attached along the way. It is easy to spot in a HEX dump if your first language is english.

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-07-19 03:03
    $CAFE.BABE is another one I could also use and do but traditionally $DEAD.BEEF is used for diagnostics as it is easily recognizable in a hex dump. I use it on the stack as a unique value to look for stack corruption. If I do a !!SP it leaves a single $DEAD.BEEF on the stack which should still be there after I test functions as some functions may drop too many items but the stack will not pop beyond zero items and this dropping may be missed otherwise.

    The use of hex numbers in this manner is referred to as Hexspeak but here are some combos I can think of (updated)
    DEADBEEF
    CAFEBABE
    CAFED00D
    DEADBABE
    DEADD00D
    DEADDEAD
    DEADD0D0
    DEADC0DE
    DEADFACE
    DEAFD00D
    D0BED0BE
    ABADDEED
    F0BED0FF
    C0DEFADE
    C0DED00D
    FADED0FF
    C0FFEE42
    DABBAD00
    D00GF00D
    FEEDFACE
    DEFACED1
    EFFACED1
    BADDECAF
    
    etc
  • D00GF00D?

    I often use $DEADC0DE
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-07-19 06:17
    ozpropdev wrote: »
    D00GF00D?

    I often use $DEADC0DE
    Actually, that should have been D00DF00D as there is no G - woops!

    It's good to use the DEAD words as they can be picked out easily but FEEDFACE is a good reminder that I need to take a break :) (with D00DF00D)
    TF2# .S
     DATA   x2    FEED.FACE D00D.F00D
     BRANCH x0
     LOOP   x0
     RETURN x3    0000.26C7 0000.8154 0000.37EB ok
    TF2#
    
  • kwinnkwinn Posts: 8,697
    No "G" in hex, but 6 makes a pretty good substitute just as 0 replaces O, so DOO6FOOD
  • It's been a while since I have bothered to update Tachyon Forth for the P2 but now I'm thinking I'd like to use it as a development system since I already have FAT32 and FTP working etc and I can write macroassemblers for ARM and P2 in Forth itself which I have done before. There are three ways I can edit text files on the P2, one is to use an ANSI terminal as the screen, the second is to edit files over FTP, and the third is to make the system stand-alone with VGA. But VGA is problematic since there are many different FPGA configurations so I was thinking I would just use a simple bit-bashed graphic driver that would work on any system, using simple 4 or 8-bit color. That way I can get everything up and running, write my text editor and macroassemblers, and be able to reuse a lot of the code on the target systems too. Since the macroassembler would be running on top of Tachyon it can host very powerful macros since we simply extend the language to suit.

    So I'll put my ARM stuff on hold for a couple of weeks to test out the latest image, upgrade Tachyon to work with that, maybe introduce some of the new instructions, but concentrate on making it a stand-alone system. Later on I can add VGA support for those boards loaded with DACs perhaps.

    The implementation itself will be a good test of the P2 but I can also have CODE definitions so that we could test out PASM interactively too.
  • cgraceycgracey Posts: 14,133
    edited 2017-02-26 02:45
    It's been a while since I have bothered to update Tachyon Forth for the P2 but now I'm thinking I'd like to use it as a development system since I already have FAT32 and FTP working etc and I can write macroassemblers for ARM and P2 in Forth itself which I have done before. There are three ways I can edit text files on the P2, one is to use an ANSI terminal as the screen, the second is to edit files over FTP, and the third is to make the system stand-alone with VGA. But VGA is problematic since there are many different FPGA configurations so I was thinking I would just use a simple bit-bashed graphic driver that would work on any system, using simple 4 or 8-bit color. That way I can get everything up and running, write my text editor and macroassemblers, and be able to reuse a lot of the code on the target systems too. Since the macroassembler would be running on top of Tachyon it can host very powerful macros since we simply extend the language to suit.

    So I'll put my ARM stuff on hold for a couple of weeks to test out the latest image, upgrade Tachyon to work with that, maybe introduce some of the new instructions, but concentrate on making it a stand-alone system. Later on I can add VGA support for those boards loaded with DACs perhaps.

    The implementation itself will be a good test of the P2 but I can also have CODE definitions so that we could test out PASM interactively too.

    That's great news, Peter. I'm anxious to hear how it goes. Hopefully, you'll have a good time with it.

  • DEADBEEF
    kwinn wrote: »
    No "G" in hex, but 6 makes a pretty good substitute just as 0 replaces O, so DOO6FOOD

  • BADF00D0 thru BADF00D9 or BADF00DF
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-02-28 13:19
    Had to make a few minor changes but Tachyon is up and running for V16. Now off to load the V16a image and double check and then load EASYFILE and EASYNET. If that works then I will concentrate on writing a macroassembler for the P2 to run interactively on the P2. So we will be able to exercise P2 instructions from the terminal (or VGA). Then a screen editor that will work with an ANSI terminal or a bit-bashed P2 VGA. Then after all this I can add Cortex M0 ARM, M4, M7, and other targets including P1. If P2 turns up on my doorstep in the meantime I will throw my ARMy buddies out into the street!

    I think I will simply call it MACRO rather than another ???ASM. How does that sound?
    TF2#
      Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V12170228.1940 BOYSCOUT
    ----------------------------------------------------------------
    TF2# SEE SEE IMMEDIATE
    4F8D: 4CC9     ex
    4F8F: 009D     $0016 (22)
    4F93: 013D     ERASE
    4F95: 0162     4
    4F97: 4CD1     ind
    4F99: 0087     C!
    4F9B: 1A4F     NFA'
    4F9D: 1A7F     GRAB
    4F9F: 0017     ?DUP
    4FA1: 00D5     IF $4FCC
    4FA5: 0018       DUP
    4FA7: 007C       C@++
    4FA9: 0033       +
    4FAB: 007F       C@
    4FAD: 0158       BL
    4FAF: 0045       AND
    4FB1: 00D5       IF $4FC2
    4FB5: 1D8F         PRINT"  IMMEDIATE"
                     THEN
    4FC2: 23DE       NFA>CFA
    4FC4: 23F0       >PFA
    4FC6: 4F17       SEE?
    4FC8: 00D3       GOTO $4FDA
                   THEN
    4FCC: 1D8F     PRINT"  not found "
    4FDA: 000D     ;  ok
    

  • cgraceycgracey Posts: 14,133
    Had to make a few minor changes but Tachyon is up and running for V16. Now off to load the V16a image and double check and then load EASYFILE and EASYNET. If that works then I will concentrate on writing a macroassembler for the P2 to run interactively on the P2. So we will be able to exercise P2 instructions from the terminal (or VGA). Then a screen editor that will work with an ANSI terminal or a bit-bashed P2 VGA. Then after all this I can add Cortex M0 ARM, M4, M7, and other targets including P1. If P2 turns up on my doorstep in the meantime I will throw my ARMy buddies out into the street!

    I think I will simply call it MACRO rather than another ???ASM. How does that sound?
    TF2#
      Parallax Propeller 2 .:.:--TACHYON--:.:. Forth V12170228.1940 BOYSCOUT
    ----------------------------------------------------------------
    TF2# SEE SEE IMMEDIATE
    4F8D: 4CC9     ex
    4F8F: 009D     $0016 (22)
    4F93: 013D     ERASE
    4F95: 0162     4
    4F97: 4CD1     ind
    4F99: 0087     C!
    4F9B: 1A4F     NFA'
    4F9D: 1A7F     GRAB
    4F9F: 0017     ?DUP
    4FA1: 00D5     IF $4FCC
    4FA5: 0018       DUP
    4FA7: 007C       C@++
    4FA9: 0033       +
    4FAB: 007F       C@
    4FAD: 0158       BL
    4FAF: 0045       AND
    4FB1: 00D5       IF $4FC2
    4FB5: 1D8F         PRINT"  IMMEDIATE"
                     THEN
    4FC2: 23DE       NFA>CFA
    4FC4: 23F0       >PFA
    4FC6: 4F17       SEE?
    4FC8: 00D3       GOTO $4FDA
                   THEN
    4FCC: 1D8F     PRINT"  not found "
    4FDA: 000D     ;  ok
    

    There is no v16a image, only PNut_v16a.exe and instructions_v16a.txt.
  • Yeah, realized that real quick :)
  • jmgjmg Posts: 15,140
    edited 2017-02-28 20:39
    Had to make a few minor changes but Tachyon is up and running for V16.

    Great progress. Did you use the recent bytecode/wordcode opcodes yet, and what gains did they give ?

  • I've only done a quick hack so I haven't tried to use any of the new stuff yet.
  • Cluso99Cluso99 Posts: 18,066
    Well done Peter!

    Just shows how flexible you have made Tachyon.

    I will be interested to see some timing comparisons.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2017-03-01 08:07
    I'm having a rather busier than usual week so I haven't had much time at all to look at TF2 but I did introduce wordcode decoding similar to TF1 V4. In this case I encode byte literals as $FFxx and test for this in my address interpreter loop. Normally a byte literal would take two words, one for the wordcode and one for the literal. Before I did have instructions for some selected fast constants such as 0, 1, 2, 16 etc. This took up cog memory but ran faster and only needed a single wordcode for these fast constants. As in V4, I did away with fixed fast constants and introduced encoded byte constants. That is any "address" that is $FFxx is not executed but the low byte is pushed onto the stack instead. Does this run faster?

    The fast constant 16 takes 400ns yet an encoded byte constant only takes 300ns, so it is faster and I don't need to allocate any cog memory for a limited number of fast constants. This decompilation here still referred to fast constants which have since been removed except for -1.
    TF2# LAP 16 LAP .LAP 64 cycles or @160MHZ 400ns  ok
    TF2# LAP 87 LAP .LAP 48 cycles or @160MHZ 300ns  ok
    TF2# LAP 255 LAP .LAP 48 cycles or @160MHZ 300ns  ok
    TF2# LAP 256 LAP .LAP 81 cycles or @160MHZ 506ns  ok
    TF2# : TEST  0 1 16 87 254 1234 $12345678 ;  ok
    TF2# SEE TEST
    4E32: 016B     0
    4E34: 016A     1
    4E36: 015E     16
    4E38: FF57
    4E3A: FFFE
    4E3C: 00A2     $04D2 (1234)
    4E40: 00A0     $$1234.5678 (305419896)
    4E46: 0012     ;  ok
    

    I need to look at locking TF2 into Flash though via the bootloader.
Sign In or Register to comment.