Close
0%
0%

nedoPC SDK

Software Development Kit for DIY programmable devices, Retro computers and Supercon badges ;)

Public Chat
Similar projects worth following
I'm working on nedoPC SDK since 2001 (although some parts were started as early as 1996) and prior to 2004 this SDK was called RW1P2. It uses my own high-level programming language Robby (previously known as RW1 v2) that is kind of simplified C which does not require semicolons at the end of each line, uses only 16-bit signed integers and compilable to intermediate byte-code representation that is converted to assembly language of target platform (many targets use universal assembler RASM that I created in 1997).

As I wrote above, before 2004 nedoPC SDK was called RW1P2 (Robot Warfare 1 Platform 2). A few versions was officially released (initially it was only partially open source with executables prepared for DOS, Win32 and Linux):

  • RW1P2 v1.0 (28-APR-2001) - cross development for Orion-128 and ZX-Spectrum using 8080 coding and tiled graphics
  • RW1P2 v1.1 (15-MAY-2001) - cross development for Orion-128 and ZX-Spectrum
  • RW1P2 v1.2 (16-JAN-2002) - cross development for Orion-128, ZX-Spectrum and Radio-86RK
  • RW1P2 v1.2.1 (18-JAN-2002) - cross development for Orion-128, ZX-Spectrum and Radio-86RK (Tetris was added here as an example for a first time)
  • RW1P2 v1.3 (20-JAN-2002) - cross development for Orion-128, ZX-Spectrum, Radio-86RK and Spetsialist
  • RW1P2 v1.4 (12-JUN-2002) - cross development for Orion-128, ZX-Spectrum, Radio-86RK, Specialist and also Z80 specific coding for ZX-Spectrum (with TR-DOS support) and PetersPlus Sprinter
  • RW1P2 v1.5 beta aka Sprinter SDK (26-APR-2003) - only Z80 specific coding for PetersPlus Sprinter and only for Windows (SDK was bundled with source code editor and Sprinter emulator)
  • Never released version of nedoPC SDK (last updated 23-JAN-2006) - added pixel level graphics for ZX-Spectrum and nedoPC font 8x8 pixels instead of ZX Spectrum one

Also initially I wrote some m68k rules to support Palm Pilots and 8086 rules to support IBM PC, but this effort was never completed and nothing from it was published.

CREDITS & ACKNOWLEDGEMENTS

It looks like in 2001 I "borrowed" 16-bit math subroutines for 8080 microprocessor from SMALL C v2.1 by Jim Hedrix ( http://www.cpm.z80.de/small_c/smallc21.zip )  - more precisely from CLIB.ARC file and I see now that it even has its own copyright: Small-C Library:  Copyright 1984 J. E. Hendrix, L. E. Payne (currently working on rewriting those subroutines to make library 100% PUBLIC DOMAIN).

Also I used open source utility bin2trd.c to generate TRD files (TR-DOS floppy disk images for ZX Spectrum) from Vyacheslav Mednonogov aka "Copper Feet".

For Z80 code generation SDK uses public domain cross-assembler zmac that was developed since 1978 by Bruce Norskog, John Providenza, Colin Kelley, Russell Marks, Mark Rison (up to v1.3) and some last changes from 2005 were done by nedoPC forum user Vasil Ivanov (up to v1.33).


History of RW1 programming language started in 1998 when I released shareware game for programmers called "Robot Warfare 1" (it was featured in a few Russian computer magazines and British magazine "Computer Shopper" in 1999):

Programming language RW1 v2 (created by me in about 2000) was more C-like:

and this version became programming language Robby

Purpose of this particular Hackaday project is resurrection of nedoPC SDK as a new fully open source (GPLv3) software development kit for DIY programmable devices and Retro computers with new GitLab repository: https://gitlab.com/nedopc/sdk

voja4.tab

Table file with RoboAssembler rules to assemble programs for 4-bit processor designed by Voja Antonic (I called it "Voja4").

tab - 66.95 kB - 10/30/2022 at 11:19

Download

  • Compiled test example MAPGEN for multiple platforms

    SHAOS07/16/2024 at 06:49 0 comments

    Major reincarnation milestone has passed - I was able to compile old test project for all supported platforms (at this moment) - program PRJ/MAPGEN/MAIN.R written in Robby programming language:

    robot "MapGen"
    author "Shaos"
    
    +INC/ROBBY
    +TILES
    
    @DMBOX=10
    @DX=20
    @DY=10
    @SIZE=200
    
    main()
    {
     DEF map[@SIZE]
     buff = 0
     SetRand(14)
     _M_reactor = 0x2
     _M_hole    = 2
     _M_box     = 5
     _M_rock    = 20
     DEF _X_box[@DMBOX]
     DEF _Y_box[@DMBOX]
     _N_box = 0;
     dx = 0
     dy = 0
    
     command @P2_TERMINFO
     dx=A;dy=B
     x0=(dx-20)/2
     y0=(dy-12)/2
     A=x0;B=y0;C=2
     command @P2_SETSAY
     say "  ROBOT WARFARE  1  "
     A=x0;B=y0+11;C=1
     command @P2_SETSAY
     SayRand(0)
    
    again:
    
     SayRand(1)
     MakeMap(2,@DX,@DY)
    
     kk = 0
     for(jj=1,jj<=@DY,jj++)
     {
       for(ii=0,ii<@DX,ii++)
       {
           c = map[kk]>>4;
           kk = kk+1
           select(x0+ii,y0+jj)
           if(c==0) set @sp_e
           if(c==1) set @sp_h
           if(c==2) set @sp_s
           if(c==3) set @sp_b
           if(c==4) set @sp_r
           if(c==6) set @sp_r0
       }
     }
    
     while(1)
     {
        recv buff
        if(buff) break
     }
    
     goto again
    }
    
    
    +LIB/RANDOM
    
    SayRand()
    {
      say "MAPGEN #&RAND        "
    }
    
    // A-N, B-X, C-Y
    MakeMap()
    {
       num = A
       dx = B
       dy = C
       sz = dx*dy
       reactor = num * _M_reactor
       hole    = num * _M_hole
       box     = num * _M_box
       rock    = num * _M_rock
       for(A=0,A<sz,A++)
       {
          map[A] = 0
       }
       C = 0
       for(B=0,B<rock,B++)
       {
          while(map[C])
          {
             Random(sz)
          }
          map[C] = 0x25
       }
       for(B=0,B<hole,B++)
       {
          while(map[C])
          {
             Random(sz)
          }
          map[C] = 0x10
       }
       for(B=0,B<box,B++)
       {
          while(map[C])
          {
             Random(sz)
          }
          map[C] = 0x30
          if(_N_box<@DMBOX)
          {
             _X_box[_N_box]=B%dx
             _Y_box[_N_box]=B/dx
             _N_box = _N_box+1
          }
       }
       for(B=0,B<reactor,B++)
       {
          while(map[C])
          {
             Random(sz)
          }
          map[C] = 0x40
       }
       for(B=0,B<num,B++)
       {
          while(map[C])
          {
             Random(sz)
          }
          map[C] = 0x60 + B
       }
    }
    

     Old library LIB/RANDOM.R:

    SetRand() // A-RAND
    {
      Rand = A
    }
    
    Random() // A-RANGE => C-RESULT L=C
    {
      Rand = 0x6255*Rand+0x3619
      C = ((Rand&0xFF00)|(((Rand>>8)^Rand)&0x00FF))&0x7FFF
      if(A) C=C%A; 
      return C
    }
    

     Original tiles defined in text file PRJ/MAPGEN/TILES.SPR:

    ;8x8-2/16
    
    SP_E    DB  #55,#AA,#55,#AA,#55,#AA,#55,#AA,#F0 ;.!
    SP_H    DB  #55,#BE,#7F,#FE,#7F,#FE,#7D,#AA,#F0 ;O!
    SP_S    DB  #00,#2A,#54,#2A,#54,#2A,#54,#00,#07 ;@
    SP_B    DB  #00,#54,#7E,#54,#54,#7E,#54,#00,#30 ;#!
    SP_R    DB  #00,#76,#6E,#42,#7A,#56,#4E,#00,#CE ;*
    SP_F    DB  #55,#AA,#5D,#BE,#5D,#AA,#55,#AA,#CE ;+
    SP_R0   DB  #18,#7E,#7E,#3C,#3C,#7E,#7E,#00,#40 ;R!
    SP_0    DB  #00,#00,#00,#00,#00,#00,#00,#00,#00 ;
    SP_1    DB  #00,#00,#00,#00,#00,#00,#00,#00,#11 ;.!
    

    Z80 target estex (computer PetersPlus Sprinter from 2002 with Estex operating system):

    Z80 target trdos (computer ZX Spectrum with beta-disk interface and TR-DOS operating system):

    i8080 target speccy (the same computer ZX Spectrum in original 48k form from 1982, but code was compiled through i8080 assembler and this build uses original ZX Spectrum font):

    i8080 target orion (soviet computer Orion-128/256 from 1990 with ORDOS operating system):

    i8080 target spetsmx (soviet computer Spetsialist-MX from 1991 that had 16-color graphics):

    i8080 target spets (soviet computer Spetsialist from 1987 in original monochrome form):

    i8080 target radio (soviet computer Radio-86RK from 1986 that had text mode only):

    This target is default one - nedomake will build it if no target is specified - it should be easy enough to create a text suit on it running on GitLab CI/CD after every push to make sure everything is correct...

  • New version of building script engine NEDOMAKE

    SHAOS07/14/2024 at 18:10 0 comments

    I renamed SHJOB to NEDOMAKE and extended it with new commands to make possible to create universal build script that builds every supported target for any nedoPC SDK example:

    #!./nedomake
    # Universal NEDO script to build any nedoPC SDK example
    \say Build ${project}
    $src=MAIN
    $spr=TILES
    \if ${1} : checksys
    \goto radio # by default it's Radio-86RK
    \label checksys
    # i8080 targets:
    \if ${1}==radio  : radio
    \if ${1}==orion  : orion
    \if ${1}==spets  : spets
    \if ${1}==speccy : speccy
    # z80 targets:
    \if ${1}==trdos  : speccy2
    \if ${1}==estex  : sprinter
    # other targets:
    \if ${1}==clear  : clear
    \say ERROR : unknown target "${1}"
    \exit
    \label clear
    \remove ${spr}.R
    \remove ${src}.RO
    \remove ${src}.BIN
    \remove ${project}.EXE
    \remove ${project}.BIN
    \remove ${project}.bin
    \remove ${project}.tap
    \remove ${project}.trd
    \remove ${project}$.bru
    \goto endclear
    \label radio
    $syst=radio
    \goto i8080
    \label orion
    $syst=orion
    \goto i8080
    \label spets
    $syst=spets
    \label i8080
    $proc=i8080
    $abin=0000
    $aspr=5000
    $avar=6000
    \goto action
    \label speccy
    $proc=i8080
    \goto speccy1
    \label speccy2
    $proc=z80
    \label speccy1
    $syst=speccy
    $abin=8000
    $aspr=D000
    $avar=E000
    \goto action
    \label sprinter
    $syst=sprinter
    $proc=z80
    $ahdr=3F00
    $abin=4100
    $aspr=9000
    $avar=A000
    \label action
    \remove ${spr}.BIN
    \remove ${spr}.R
    spr_comp -S${syst} -O#${aspr} ${spr}.SPR
    \remove ${src}.RO
    robbyc -p -l ${src}.R
    \need ${src}.RO
    \remove ${src}.A
    robbycc ${src}.RO -P${proc} -S${syst} -O#${abin} -B#${avar}
    \need ${src}.A
    \remove ${src}.BIN
    \if ${proc}!=z80 : rasm
    \remove ${src}.bin
    zmac ${src}.A
    \need ${src}.bin
    \rename ${src}.bin ${src}.BIN
    \remove ${src}.lst
    \goto bincont
    \label rasm
    rasm ${src}.A -t${EXEPATH}LIB/I8080/__RULES
    \label bincont
    \need ${src}.BIN
    \if ${syst}==radio    : endradio
    \if ${syst}==sprinter : sprinterexe
    \remove ${project}.bin
    \glue ${project}.bin ${src}.BIN #${abin}
    \glue ${project}.bin ${spr}.BIN #${aspr}
    \ltrim ${project}.bin
    \need ${project}.bin
    \if ${syst}==spets : endclear
    \if ${syst}==speccy : endspeccy
    # it must be orion at this point
    bin2bru ${project}.bin #${abin}
    \need ${project}$.bru
    \remove ${project}.bin
    \goto endclear
    \label endspeccy
    \if ${1}==trdos : endtrdos
    # it must be tap at this point
    \remove ${project}.tap
    bin2tap ${project}.bin #${abin} ${EXEPATH}LIB/Z80/SPECCY/TAPE
    \need ${project}.tap
    \remove ${project}.bin
    \goto endclear
    \label endtrdos
    \remove ${project}.trd
    \remove ${project}.trl
    \append ${project}.trl NORMAL "${project}"
    \append ${project}.trl TRUNCATED
    \append ${project}.trl hobeta "${EXEPATH}LIB/Z80/SPECCY/BOOT","boot","B"
    \append ${project}.trl binary "${project}.bin","robot","C",32768
    bin2trd ${project}.trl
    \need ${project}.trd
    \remove ${project}.trl
    \remove ${project}.bin
    \goto endclear
    \label sprinterexe
    \remove ${project}.EXE
    \glue ${project}.EXE ${EXEPATH}LIB/Z80/SPRINTER/HEAD.BIN #${ahdr}
    \glue ${project}.EXE ${src}.BIN #${abin}
    \glue ${project}.EXE ${spr}.BIN #${aspr}
    \ltrim ${project}.EXE
    \need ${project}.EXE
    \goto endclear
    \label endradio
    \rename ${src}.BIN ${project}.BIN
    \label endclear
    \remove ${spr}.BIN
    \remove ${spr}.R
    \remove ${src}.BIN
    \remove ${src}.LST
    \remove ${src}.R!
    \remove ${src}.RO
    \remove ${src}.RLS
    \remove ${src}.A
    

    This is a source code of the utility:

    https://gitlab.com/nedopc/sdk/-/blob/master/sdk/nedomake.c?ref_type=heads 

  • Added source code of zmac to SDK repo

    SHAOS07/13/2024 at 08:07 0 comments

    Today I added source code of classic public domain assembler zmac to nedoPC SDK repo (it's used by SDK to build Zilog Z80 code):

    https://gitlab.com/nedopc/sdk/-/tree/master/zmac?ref_type=heads

    It was added in a few commits to show what was changed in 2005 by our forum user Vasil Ivanov:

    v1.32: https://gitlab.com/nedopc/sdk/-/commit/ce00665e44cff00515c33e000170bccb87784d62

    v1.33: https://gitlab.com/nedopc/sdk/-/commit/f2f4a71a8acf64f28210d868ac1258743c205014

    Vasil worked directly inside of generated zmac.c, so now we don't use zmac.y to build it - and that's way it could be built even for DOS by OpenWatcom-C/C++ v1.9 for example:

    SET WATCOM=C:\SYSTEM\WATCOM19
    SET PATH=%WATCOM%\BINW
    SET INCLUDE=%WATCOM%\H
    WCC386 /onatx /oh /ei /3 /fp3 getoptn.c
    WCC386 /onatx /oh /ei /3 /fp3 mio.c
    WCC386 /onatx /oh /ei /3 /fp3 zmac.c
    WLINK system pmodew option stack=32k file getoptn,mio,zmac name zmac
    

    Changes from 2005 on top of classic public domain version from 2000:

    2005-03-30  Vasil Ivanov from http://forum.nedopc.org
            * Version 1.33 -- changes were done directly in generated zmac.c
            * All messages stderr now go to stdout to be able to redirect everything to 1 file
            * Fixed issue in new function doincbin() that caused "phase error".
    
    2005-02-25  Vasil Ivanov from http://forum.nedopc.org
            * Version 1.32 -- changes were done directly in generated zmac.c
            * Put all labels starting with @ to file .tbl
            * Added directive INCBIN to include binary file
            * Note: Quotation is not needed for include and incbin
            * Note: This assembler doesn't know undocumented instructions

    Now I'm working on new command interpreter to have unified build script covering multiple platforms at once...

  • Tetris was running on the badge

    SHAOS11/13/2022 at 09:11 0 comments

    We actually finished port of Tetris for the Badge, but as a custom firmware for PIC24 (yea I know it's kind of cheating):

    But anyway I'm still planning to support Supercon.6 badge target in my SDK and I even connected Cherry-MX keys to the badge to make playing future 4-bit Tetris as easy as possible :)

  • RASM is now fully supporting Voja4 CPU

    SHAOS10/30/2022 at 11:18 5 comments

    I just finished creation of the table:

    https://gitlab.com/nedopc/sdk/-/blob/master/rasm/voja4.tab

    It was partially generated by C-program:

    https://gitlab.com/nedopc/sdk/-/blob/master/utils/voja4gen.c

    Also rasm.c was extended to support new rules (now it's v2.6):

    https://gitlab.com/nedopc/sdk/-/blob/master/rasm/rasm.c

    In order to run it on your machine you need to do:

    > git clone https://gitlab.com/nedopc/sdk.git
    Cloning into 'sdk'...
    remote: Enumerating objects: 1216, done.
    remote: Counting objects: 100% (1216/1216), done.
    remote: Compressing objects: 100% (506/506), done.
    remote: Total 1216 (delta 732), reused 1130 (delta 688), pack-reused 0
    Receiving objects: 100% (1216/1216), 491.77 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (732/732), done.
    Checking connectivity... done.
    > cd sdk
    > cd rasm
    > make
    gcc -O2 -I../common -c rasm.c
    gcc -O2 -I../common -c ../common/my_text.c
    gcc rasm.o my_text.o -o rasm
    

    After that you will be able to assemble Voja4 programs using ./rasm FILENAME.A -tvoja4.tab
    (or you can copy voja4.tab to default.tab and then you can do just ./rasm FILENAME.A).

    A little bit about RASM - it's slightly unusual assembler - for example for comments it may use \ or //

    All numbers are decimals. For hexadecimals you need to use # (like #100 is 256).

    Your program can have ORG as 1st directive (without ORG assembling will be done from address 0).

    Macros defined by EQU must start with @ to differentiate them from labels. Includes are started with +

    Other supported directives are  DB, DW (sequence of bytes and sequence of words respectively) and DUP - unfortunatelly for this particular CPU they are unusable, because data memory is not available for assembler here and all data locations must be defined through EQUs (I'll prepare include file soon).

  • Voja's 4-bit CPU support in RASM

    SHAOS10/26/2022 at 05:10 0 comments

    My assembler RASM (so called RoboAssembler that I started in January 1997) has external table file where you can write rules to convert assembler instructions to sequence of bytes - some of such rules are simple and straightforward:

    ADD_R0,-1      #00 #1F
    ADD_R0,R0      #01 #00
    MOV_[R0,R0],R0 #0A #00
    

    As you can see every 12-bit instruction is represented by 2 bytes (higher byte 1st, lower byte 2nd and sorry I can't support [R0:R0] because colon : means label in RASM and instruction prefixes may not have spaces inside so that's why it's having _ in it)

    And some rules have logic inside the code of RASM. For example relative jumps were already supported in code when I implemented 8086 support about 20 years ago.

    JR             #0F B

     RASM already knows that if we put label as argument of such instruction it will calculate offset:

    LABELUP:
        ADD_R0,R0
        JR    LABELUP
        JR    LABELDOWN
        MOV_[R0,R0],R0
    LABELDOWN:
        ADD_R0,-1
    

    will assemble into

     000 01 LABELUP:    ADD_R0,R0
         00
     001 0F        JR    LABELUP
         FE
     002 0F        JR    LABELDOWN
         01
     003 0A        MOV_[R0,R0],R0
         00
     004 00 LABELDOWN:    ADD_R0,-1
         1F
    

    Some instructions will require to add more logic into RASM to support new rules, for example 4-bit argument should be summarized with 2nd byte of instruction in some cases - such rule in table file may look like this:

    ADD_R0,         #00 #10+
    

    That means that ADD_R0, 1 should be translated into #00 #11  and for example ADD_R0, 12 into #00 #1C etc.

    Also we need to add some logic that in case of label as an argument of such instruction will take 4 lower bits of the label to implement MOV_PCL, label

    Long jumps and long calls most likely should be converted to pair of instructions transparently and invisibly for user:

    JMP            #0E B #09 #D0+ // MOV_PC,(LBL>>4) MOV_PCL,LBL&15
    CALL           #0E B #09 #C0+ // MOV_PC,(LBL>>4) MOV_JSR,LBL&15
    

    Also RASM is not able to support instructions looking like MOV [NN],R0 and MOV R0,[NN] so instead I'll add new aliases for these two: SR0 NN (Save R0) and LR0 NN (Load R0).

  • Robby compiler for Voja's 4-bit processor?

    SHAOS10/24/2022 at 03:39 0 comments

    Since new Supercon badge was introduced I started thinking about possible porting of my Robby compiler (aka nedoPC SDK) to this 4-bit processor - it should be doable. Robby is a programming language that operates only 16-bit signed integers. I can write libraries to calculate 16-bit math using 4-bit instructions (but technically possible to create 8-bit Robby flavor where all variables are 8-bit instead of 16-bit).

    I can start this effort by creating instruction table for my 2-pass RoboAssembler (that is part of nedoPC SDK and even if I stop on this stage it already becomes useful thing I think). 

    Graphics in nedoPC SDK usually works with 8x8 tiles, but Supercon.6 badge only have 8x16 LED matrix, so I'll probably limit myself by PIXEL x,y and CLEAR x,y graphics commands (that currently available only for ZX Spectrum machine in unreleased version of SDK) leaving tile API out of the picture. If I'll be able to support Supercon.6 CPU then it should be relatively easy for me to port TETRIS ( nobody wrote tetris for this badge yet, right? ; ) that was already re-written in Robby (formerly known as RW1 programming language) by me 20 years ago:

    it was for Sprinter 320x256 screen (256 colors) and this one is for ZX Spectrum 256x192 screen:

    In case of Supercon.6 badge it will be LED "pixels" instead of 8x8 tiles (as above) - so game area will shrink to 8x16, but it still should be playable. The only thing to add to hardware must be add-on board with navigation keys connected to input pins of the connector. Any thoughts about usefulness of all of these? ;)

    Voja's project with CPU docs: https://hackaday.io/project/182568-badge-for-2020-supercon-years-of-lockdown

  • Circuits.CC is back

    SHAOS05/11/2019 at 03:26 0 comments

    Yesterday I released new version of http://Circuits.CC web-editor for schematics and PCB in ASCII (kind of) - this version 0.3 (released 6.5 years after v0.2) has Rgrid.js as AJAX engine with virtual machine that is capable of running multiple "robots" written in Robby programming language (formerly known as RW1 or "Robot Warfare 1"). As in the last version it has robot-librarian that handles library of components on the left side of the screen. Now I rewrote back-end from Hope programming language with SQLite3 database to PHP programming language with MySQL database - now it's working a little faster and it should have some room to scale. And I even added comments with help of IntenseDebate service :)

    As I already mentioned in previous log, Circuits.CC had a little peak of popularity (kind of) at the end of 2012 when Dangerous Prototypes and Adafruit blogs wrote a short articles about it:

    In August 2017 I switched Circuits.CC back-end off after moving to another server, but I saved a database with full history of all (almost 100,000) user clicks since November 23rd, 2012 (with IP-addresses and Timestampes after December 5th, 2012) so recently I decided to make an animated movie clip from it to visualize that history and yesterday uploaded it to YouTube - see what 1000 people did with it in 100,000 mouse clicks ;)

    As you can see at the end of this video I used this editor to draw schematics of XORYA in 2015 (and in the last year I used the same Rgrid-engine for TERNARO web-site).

    So now Circuits.CC is alive again! Welcome to try it - in near future I will even add ability to write your own "robots" - Rgrid.js performs simultaneous interpretation of multiple robots in the same time (actually it's more like compilation to JS than interpretation). Enjoy! :)

    You can find all source codes on GitLab: https://gitlab.com/shaos/circuits_cc

  • Robot Warfare 1

    SHAOS05/19/2018 at 18:35 0 comments

    As I wrote in details of this project, programming language that I use here came from my "hobby" game "Robot Warfare 1" that I released in 1998 as shareware - it was used to program robots - something like this:

       % ================= WSIMPLE.RW1 ==================
       % Example of simple robot 
       % with an eye
       % and a gun.
       % Run:    RW1_DUEL.EXE  WSIMPLE.RW1
    
       ROBOT "WinSimple Robot"
    
         COLOR FFD010
    
         FRONT EYE
         LEFT  GUN
    
       START:
    
         ACT FRONT        % Look in front
         if N!=6 : L1     % If there is a robot there then
            RIGHT
            ACT LEFT      % shoot
            LEFT
            GOTO START
         L1:
         if N!=3 : L3     % If there is a box with missles then
            STEP          % go ahead
            GOTO START
         L3:              % If there is neither box nor robot then
                          % it means that there is a barrier in the direction 
         if D==1 : L4     % If the distance from it is greater then 1 then
            STEP          % make a step
            GOTO START
         L4:
         RIGHT            % If the barrier is in the next cell
         GOTO START       % turn to right
    
       END
    

    In 1999-2000 I upgraded this programming language for "Robot Warfare 1" v2  to make it more C-like (in the same time I released its compiler as open source software under GPL) - now simplest robot looks like this:

    robot "NewSimple"
    author "SANYA"
    
    color 000030
    
    front eye
    left  gun
    right gun
    
    +rw1_std.rwi
    
    main()
    {
       act front
       if(N==@t_robot) call shoot1
       else
       {
          say "See &N ( &D ) M=&M E=&E !"
          if(N==@t_box||D>1) step
          else
          {
             if(R>500) right
             else left
          }
       }
    }
    
    shoot1()
    {
      right
      A = @left
      for(aa=0,aa<3,aa++)
      {
         call shoota
      }
      left
    }
    
    shoota()
    {
      act A
      act A
      act A
      act A
      act A
    }
    
    

    then I created RW1P2 - crosscompiler that compiles robot bytecode to i8080 assembler program using some set of rules and libraries, for example we can have a tile 8x8:

       ########  => #FF
       #      #  => #81
       # #  # #  => #A5
       #      #  => #81
       #      #  => #81
       #  #####  => #9F
       #      #  => #81
       ########  => #FF
    

    with black ink and red paper - it's hexadecimal 40:

       ;8x8-2/16
       ;myspr.spr file
       MYSPR  DB  #FF,#81,#A5,#81,#81,#9F,#81,#FF,#40 ;@ 

     then tile compiler will turn it into binary with header file that could be included into the program:

       // MY.RW1
       robot "MY"
       author "Shaos"
       +myspr.rwi
       main()
       {
          dx = 20
          dy = 10
          for(xx=0,xx<dx,xx++)
          {
            for(yy=0,yy<dy,yy++)
            {
               select xx yy // choose cell for tile output
               set @MYSPR // print tile there
            }
          }
       }
    

    Most significant thing that I did on this programming language was port of "Just Another Tetris" (GPL software by Mattias Wadman) to PetersPlus Sprinter computer in 2002 (and other computers supported by RW1P2):


    P.S. Another pretty noisy thing written in this programming language was ASCII PCB and schematics online editor at the end of 2012, but it is totally different story ;)

View all 9 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates