-
Circuits.CC is back
05/11/2019 at 03:26 • 0 commentsYesterday 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
05/19/2018 at 18:35 • 0 commentsAs 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 ;)