@database "HArbiter.guide" ;right margin 71 @author "Paweî Gawroïski" @$VER: HArbiter.guide 1.01 (16-Oct-1998) updated by Minder @node Main "Arbiter.guide" Primo: Sorry for poor english. @{b}Hegemon's Arbiter@{ub} Copyright © 1998 Pawel Gawronski Program idea & design: Dominik Kozaczko --------------------------------------- Thanks to: Robert Lotocki for the logo Michal Grzedzicki for the icons, installer script, and for being the first registered. All @{"betatesters" link "Testowali"} for bughunting :) Choose one of the following to get some info: @{" Author " link "Autorek"} @{" Introduction " link "Wstëp"} @{" Requirements " link "Wymagania"} @{" Installation " link "Instalacja"} Using the program @{" Fight " link "Walka"} @{" Tournament " link "Turniej"} @{" Preferences " link "Preferencje"} About Core Wars @{" The Core " link "Rdzeï"} @{" Argument types " link "Typy argumentów"} @{" Commands " link "Rozkazy"} @{" Standards " link "Standardy"} @{" Compiler " link "Kompilator"} Other @{" ShareWare " link "ShareWare"} @{" Betatesters " link "Testowali"} @{" Program history " link "History.doc/main"} @endnode @node "Wstëp" "Introduction to Hegemon's Arbiter" @prev "Uwagi" @{b}Hegemon's Arbiter@{ub} Copyright © 1998 Pawel Gawronski -------------------------------- Introduction Core Wars are frequently called "games for progammers". They rely on writing programs in special language Red Code. The programs fight in virtual, separated in computer's memory array called "The Core" and the flow of the fight is supervised by MARS - Memory Array Redcode Simulator. Hegemon's Arbiter includes integrated Red Code environment designed for Amiga. It consists of: Red Code compiler and MARS, which allow you to make duels and tournaments. The program allows you to observe the fight in two forms: First is the array window, where you can see in realtime what do the fighting programs do, the second way are the windows displaying decompiled piece of the core, where you can see the fighters. @endnode @node "Wymagania" "What do you need to run Hegemon's Arbiter" @{b}Hegemon's Arbiter@{ub} -------------------------------- Hegemon's Arbiter - Requirements - An Amiga ;-) - AmigaOS 2.0 or higher - reqtools.library (© Nico François) @endnode @node "Instalacja" "How to install?" @{b}Hegemon's Arbiter@{ub} -------------------------------- Installation Just double-click on the "Install Arbiter" icon and make your choices. @endnode @node "Walka" "A few words about the fight" @{b}Hegemon's Arbiter@{ub} -------------------------------- Fight This gadget starts a duel between two Red Code programs, which you select from the appearing requester. The fighters are compiled "at the moment". By now there is no need for pre-compilation, because even A500 compiles warriors very fast. After compiling, the programs are placed on the core. The following windows should appear: Control, and eventually @{"Core window" link "okno-Rdzeï"} and @{"Disasembled window" link "okno-Deasemblacja"}, if you've selected so in @{"the preferences" link "preferencje"}. In the control window you'd see the following gadgets: @{"Start" link "start"},@{"Stop" link "stop"} and @{"Step" link "krok"}. The slider placed beneath sets @{"Running Delay" link "tempo"}. The game flows under conditions set up in @{"the preferences" link "preferencje"}. The fight can end after victory of one of the programs, or after a draw. The result of the fight is displayed in the requester @endnode @node "Turniej" "Few words about the tournament" @{b}Hegemon's Arbiter@{ub} -------------------------------- Tournament This gadget allows you to play a tournament between many Red Code programs. In the tournament have to start at least two programs. Tournament is a series of fights in the system "everyone with everyone", and every two programs repeat their fights as many times as set in @{"the preferences" link "preferencje"}. Scoring: Win - 10 points Draw - 5 points Lose - 0 points During the tournament two windows are displayed: Control Window and Statistics Window. In the Control Window are placed the following gadgets: @{"Start" link "Start"}, @{"Stop" link "Stop"} and @{"Restart" link "Restart"}. The Statistics Window contains information about currently fighting programs and their places in the chart. The number of names displaed here depends on the window's size. After the tournament completes a requester is shown. The result of tournament can be saved in a text file.@{b}(Not in unregistered version!)@{ub} The whole tournament can be replyed @endnode @node "Preferencje" "Opis preferencji" @{b}Hegemon's Arbiter@{ub} -------------------------------- Preferences In the preferences window you can set all Arbiter's parameters and save them to disc. @{b}In the uregeistered version you cannot cave the preferences!@{ub} Paremetes: Instruction limit. Compiled programs cannot have more instructions as stated here. Size of arena. All fights are played on the cpecified core lenght. Cucle limit. This tells you how many steps the programs can do before the fight is a draw. Delay. This slider sets the @{"Running Dely" link "tempo"}. Far left means no delay. Arena window width. This parameter sets the duel window width (in pixels). The height of this window is calculated by the program and depends on size of the core. @{B}WARNING! The window won't show up if it's width is greater than current screen width. A 640x256 screens fills an arena of 9163 cells. A 640x512 can hold about 19000.@{UB} Split limit. This deifnes the maximum number of child processes to which the fighter may split during the fight. Fights in tournament. Every two programs fights defined number of duels. Show disassembled. Switches the Disassembled Window (default off). Show arena window. Switches the Arena Window (default on). Files. This is the path where you keep your warriors. @endnode @node "Rdzeï" "The Core" The Core is a virtual, separated incomputer's memmory array on which the programs ar fighting. It is treaten as a ring, so all address calls are relative. One cell contains informations about the command, its parameters, and their types: INSTUCTION fieldA filedB See also @{"The Core Window" link "okno-Rdzeï") @endnode @node "Typy argumentów" "Argument types" @{b}Hegemon's Arbiter@{ub} -------------------------------- Argument types # - Immediate, e.g. #12 (the number twelve) $ - Independent - address you are pointing at @ - Dependent - address of the cell, which in it fieldB contains the address you are pointing at < - Depndent with predecrementation - as above with exception, that the adress of the cell you are pointing at is decreased by one avery time this argument is executed In the Dependent arguments (@, <) the address of the cell you are pointing at is counted from the cell pointed in the command with Dependent argument. I know it's writtnen very strange, so here is an example: DAT $0 $2 start: JMP @-1 MOV 0 1 The JMP command will take the biledB of the cell placed -1 of it's position (DAT) and jump 2 fields ahead, but counted from the DAT, so it's only one field ahead from the JMP. The default is Independent ($), so you can skip it during programming. @endnode @node "Rozkazy" "Commands" @{b}Hegemon's Arbiter@{ub} -------------------------------- Red Code Commands Red Code consists of 11 commands (ICWS 91). Most requires two parameters except DAT, JMP. SPL, in which you can skip the argument placed in square brackets. If you do so compiler will place there value $0 DAT [A] B - Probably the most important Red Code command. It destroys process which tries to execute it. Formally DAT is treaten as a variable. MOV A B - Moves A to B. If A is # it's value will be written in filed B of cell you are pointing at. In other cases whole cell is written including the command. E.g. MOV $0 $1 - this copies itself to next cell. ADD A B - Adds A- to B. If A is # it's value will be added to B field of cell you are pointing at. In other cases both values of A and B fields of the cell pointed with arg. A are added to appropiate fileds of the cell pointed ith arg. B. E.g. ADD $1 $2 JMP $-1 $0 DAT $1 $1 - after executing ADD command this cell becomes DAT $0 $1 SUB A B - Same as ADD, but substracts. JMP a [B] - Jump to address pointed with A argument. JMZ A B - Jump to address pointed with A. This is a dependent jump, executed only when value of field B of the cell pointed with B (in JMZ) is zero. Else ignored. JMN A B - The same as JMZ, but when not equal zero. Else ignored. DJN A B - Also a dependent jump, but more complex. First the value of field B of the cell pointed with B is decreased by one and if the result is not equal zero it jumps to address pointed with A. Else ignored. CMP A B - This command compares addresses A and B. If they are equal next command is skipped. If A is a # type this value is compared with field B of the cell pointed with B. SPL A [B] - It produces anindependent task starting from address pointed with A. Fighter can split until he reaches the number of child tasks set in the preferences (after this the SPL command does no effect). If one of child tasks becomes killed the SPL works again. Splitted figters run slower, because the make moves in shifts: 1. Father-task executes SPL 2. Enemy-task 3. Child-task 4. Enemy-task 5. Father-task 6. Enemy-task and so on. SLT A B - Same as CMP. except that it checks if A is smaller than B. If yes, it skips next command. It compares only arguments, not the command. @endnode @node "Standardy" "Standards" Hegemon's Arbiter supports standard ICWS'91 (Improved Corewars Standard of 1991) which expands the standard CWS'88. The main change is that every type of parameter is accepted. E.g. JMP #3 $0 - this wouldn't be accepted in CWS'88 now is translated to JMP $0 $0 Programs written under CWS'88 runs under ICWS'91 but not reverese. @endnode @node "Kompilator" "Compiler" Arbiter's compile allow you to use: - labels (the don't have to be ended with colon [:]) - constants (eg. one = 1; two equ 1+1) - arithmetic expressions on decimal numbers This compiler ignores letter cases. A Red Code program should be ended with a pseudo-command END (but it's not a "must"), which is treaten as end-of-file. With END you can specify the label from which your fighter will start. E.g. init: MOV $0 $1 END init - program will start from the label named 'init'. If there is no label name after END the program will start from label named 'start'. If even this one couldn't be found the program will start from first command. @endnode @node "ShareWare" @next "autorek" This software is subject to the "Standard Amiga FD-Software Copyright Note" It is SHAREWARE as defined in paragraph 4s. If you use it and like it please send US$10 or 18DM to the @{"author" link autorek}. For more information please read @{"AFD-COPYRIGHT" link "AFD-COPYRIGHT/main"} (Version 1 or higher). @{B} The shareware version have any "Save" operations disabled. @{UB} If you register via snail-mail you should send me an addressed envelope with correct stamp and floppy disc, or add $1 or 2DM for it. I cannot accept any cheques, credit cards (or maybe ;) or coins. The best way of registering is sending me money via postal order and sending your email to: minder@friko2.onet.pl (the keyfile-man) @endnode @node "start" START - no comments. The figt can be stopped by: 1. Pressing the @{"stop" link "stop"} gadget. 2. Pressing Close Window gadget. The fight is stopped automatically after resolving. @endnode @node "Stop" STOP - no comments. The fight can be continued after pressing the @{"start" link "start"} gadget. @endnode @node "krok" "Step" STEP. Fighters make one command each. @endnode @node "tempo" "Delay" The Delay slider lets you observe the fight slower, step-by-step. It's very useful for deep-analyse of the fight especially when @{"Disassembled" link okno-Deasemblacja} windows are shown. @endnode @node "okno-rdzeï" The Core window pictures the Arena. Each cell is represented by small sign. Colors represent appropiate program, or cell which was written by it. Blue means empty cell containing DAT $0 $0. The meaning of signs: #### #### #### -Here is actual process' starting point #### #### # # # # -This cell was executed some time before #### ## ## -Target of MOV (Empty) -All other cases @endnode @node "okno-Deasemblacja" "Disassembled window" These two windows named XXXX, where XXXX is the name of program. contain disassembled pieces of the core around actual process' starting point. The number of commands displayed here depends only on window's size. These windows can be turned off in preferences which speeds up the fight. @endnode @node "restart" "Restart" This resets the tournament clearing the scores, but leaving the figters. @endnode @node "autorek" "How to contact with the author?" @prev "shareware" @next "main" Support great software. Pay @{"shareware!" link "ShareWare"} This is the author's address Pawel Gawronski ul. Komorowicka 92/5 43-300 Bielsko-Biala Poland The registration site: minder@friko2.onet.pl @endnode @node testowali "All the beta-testers" List of all beta-testers on day 22-Nov-1998 All versions: Dominik 'Minder' Kozaczko Prerelases: Zbigniew Biernacki Michal "-BANAN-" Caluzynski Cyb.org Marcin Dubiel Piotr Gapinski Slawomir Girgielewicz Michal Grzedzicki Lukasz Jodlowski Ireneusz Kaminski Tmislav "Cromax" Kitynski Krzysztof Koziarek Szczepan Kuzniarz Tomasz Lachowicz Adam Lewandowski Oskar Lewanski Mariusz Listowski Jejek Mierzowski Marcin "MIM" Misiejuk Marcin Nowak Marek Praszkiewicz Artur "Scandal" Skrzypczynski Dariusz Woloch Zabora @endnode