Page 1 of 5

New game uploaded: Core War

Posted: Fri Jun 11, 2021 4:38 am
by rje



Core War




View File






This is a proof of concept of a Core War VM for the X16.

It implements all ICWS'88 opcodes (plus a couple extra); as proof of concept it runs many of the "historical" redcode programs from that period.  It has a PETSCII arena view which follows colorized redcode programs.  Up to 8 programs may run at a time, and each may have up to 8 processes.

It does not handle operand expression math.

The project is here: https://github.com/bobbyjim/x16-corewar


title screen.png






  • Submitter




    rje




  • Submitted


    06/10/21




  • Category







 

New game uploaded: Core War

Posted: Fri Jun 11, 2021 4:04 pm
by rje

I just spent a morning writing a kind of test framework for debugging the opcode handling.

I just re-learned that C functions on the X16 need to be relatively simple; the fewer params passed, the better.

No worries.

 


New game uploaded: Core War

Posted: Fri Jun 11, 2021 4:14 pm
by rje

I've been thinking about different ways of using banked RAM for the ARENA.

(1) Just slop it into banks.  This is probably what I'd do.  Just occupy as many banks as I want, and have appropriate boundary checking etc.

(2) Use Bank 1 as an index.  If I keep the core size to <= 8192, then Bank 1 can indicate which bank each cell is located in.  This is more or less a way of skipping one operation in #1 above, but it creates an indirect dereference and in the end it doesn't sound like it's worth the effort.  I mean, if the relationship is a simple div to begin with, why store an indirect ref in a table?

 


New game uploaded: Core War

Posted: Fri Jun 11, 2021 4:18 pm
by rje

I've been thinking about how to EDIT core warriors.  I wonder if I can use our text-editor utility...

 


New game uploaded: Core War

Posted: Fri Jun 11, 2021 11:01 pm
by rje

So far, I've debugged MOV in two modes, ADD (and SUB) in three modes, and started on MUL and DIV.

It's slow going.

 


New game uploaded: Core War

Posted: Sat Jun 12, 2021 7:12 pm
by svenvandevelde


On 6/11/2021 at 6:04 PM, rje said:




I just spent a morning writing a kind of test framework for debugging the opcode handling.



I just re-learned that C functions on the X16 need to be relatively simple; the fewer params passed, the better.



No worries.



 



It depends which c compiler you use. 


New game uploaded: Core War

Posted: Mon Jun 14, 2021 2:20 am
by rje

Added a CLI to help me debug a bit better.

 

 


New game uploaded: Core War

Posted: Mon Jun 14, 2021 7:29 pm
by svenvandevelde


17 hours ago, rje said:




Added a CLI to help me debug a bit better.



 



 



What is a CLI?


New game uploaded: Core War

Posted: Mon Jun 14, 2021 7:47 pm
by Ed Minchau


18 minutes ago, svenvandevelde said:




What is a CLI?



Command Line Interface. 


New game uploaded: Core War

Posted: Mon Jun 14, 2021 7:47 pm
by Elektron72


18 minutes ago, svenvandevelde said:




What is a CLI?



CLI stands for Command-Line Interface.